-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from qianmoQ/feature-dev
Release for `2024.1.1`
- Loading branch information
Showing
22 changed files
with
1,928 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ dist-ssr | |
yarn.lock | ||
src/components/ui | ||
.npmrc | ||
docs/.vitepress/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
yarn run build | ||
|
||
time=$(date "+%Y-%m-%d %H:%M:%S") | ||
|
||
echo "Publish to NPM $VERSION on $time" | ||
|
||
yarn publish --access public --non-interactive | ||
|
||
echo "Publish to NPM done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env sh | ||
VERSION=$(jq -r '.version' package.json) | ||
set -e | ||
|
||
yarn run docs:build | ||
|
||
cd docs/.vitepress/dist | ||
|
||
echo 'shadcn.vue.devlive.org' > CNAME | ||
|
||
time=$(date "+%Y-%m-%d %H:%M:%S") | ||
|
||
echo "GitHub Action Auto Deploy $VERSION on $time" | ||
|
||
git init | ||
git add -A | ||
git commit -m "GitHub Action Auto Deploy $VERSION on $time" | ||
|
||
git push -f [email protected]:devlive-community/view-shadcn-ui.git master:gh-pages | ||
|
||
echo "GitHub Action Auto Deploy done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
export default { | ||
title: 'View Shadcn UI', | ||
description: 'A component library built on Shadcn UI and Tailwind CSS.', | ||
themeConfig: { | ||
nav: [ | ||
{text: 'Home', link: '/'}, | ||
{ | ||
text: "Guide", | ||
link: "/guide/installation", | ||
activeMatch: '/guide/' | ||
}, | ||
{ | ||
text: 'Components (v2024.1.1)', | ||
items: [ | ||
{ | ||
text: '2024.1.1', | ||
link: '/components/2024.1.1/release-notes', | ||
activeMatch: '/components/2024.1.1/' | ||
}, | ||
] | ||
} | ||
], | ||
socialLinks: [ | ||
{icon: "github", link: "https://github.com/devlive-community/view-shadcn-ui"}, | ||
], | ||
sidebar: { | ||
"/guide/": [ | ||
{ | ||
text: "Guide", | ||
collapsed: false, | ||
base: "/guide/", | ||
items: [ | ||
{text: "Installation", link: "installation"}, | ||
{text: "Quick Start", link: "quickstart"}, | ||
] | ||
} | ||
], | ||
'/components/2024.1.1/': [ | ||
{ | ||
text: 'Release Notes', | ||
base: '/components/2024.1.1/', | ||
link: 'release-notes', | ||
}, | ||
{ | ||
text: 'Base Components', | ||
base: '/components/2024.1.1/', | ||
collapsed: false, | ||
items: [ | ||
{text: 'Button', link: 'button'}, | ||
{text: 'Icon', link: 'icon'}, | ||
{text: 'Copy', link: 'copy'}, | ||
] | ||
}, | ||
{ | ||
text: 'Layout Components', | ||
base: '/components/2024.1.1/', | ||
collapsed: false, | ||
items: [ | ||
{text: 'Card', link: 'card'} | ||
] | ||
}, | ||
{ | ||
text: 'View Components', | ||
base: '/components/2024.1.1/', | ||
collapsed: false, | ||
items: [ | ||
{text: 'Modal', link: 'modal'}, | ||
{text: 'Tooltip', link: 'tooltip'}, | ||
{text: 'Code', link: 'code'}, | ||
] | ||
}, | ||
{ | ||
text: 'Form Components', | ||
base: '/components/2024.1.1/', | ||
collapsed: false, | ||
items: [ | ||
{text: 'Input', link: 'input'}, | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<ShadcnCard> | ||
<template #content> | ||
<div class="p-2 border-b space-y-10"> | ||
<div class="font-bold">{{ title }}</div> | ||
</div> | ||
|
||
<table class="w-full"> | ||
<thead> | ||
<tr> | ||
<th v-for="(header, index) in headers" :key="index" class="p-2 text-left"> | ||
{{ header }} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="(column, rowIndex) in columns" :key="rowIndex"> | ||
<td v-for="(value, colIndex) in column" :key="colIndex" class="p-2"> | ||
{{ value }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</template> | ||
</ShadcnCard> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const props = defineProps({ | ||
title: { | ||
type: String, | ||
required: true | ||
}, | ||
headers: { | ||
type: Array as () => string[], | ||
required: true | ||
}, | ||
columns: { | ||
type: Array as () => string[][], | ||
required: true | ||
} | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.vp-doc table { | ||
margin: 0; | ||
display: table; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<ShadcnCard> | ||
<template #content> | ||
<div class="p-2 border-b space-y-10"> | ||
<div class="font-bold">{{ title }}</div> | ||
<div class="text-sm text-muted-foreground">{{ description }}</div> | ||
</div> | ||
<div class="p-3 space-x-2"> | ||
<slot/> | ||
</div> | ||
</template> | ||
|
||
<template #footer> | ||
<div v-if="onlineLink" class="flex items-center justify-center p-2 border-t w-full"> | ||
<ShadcnButton type="primary" @click="handleGoToOnline">{{ goToOnline }}</ShadcnButton> | ||
</div> | ||
</template> | ||
</ShadcnCard> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const props = withDefaults(defineProps<{ | ||
title: String | ||
description?: String | ||
onlineLink?: String | ||
goToOnline?: String | ||
}>(), { | ||
goToOnline: 'Go to online' | ||
}) | ||
const handleGoToOnline = () => { | ||
window.open(props.onlineLink) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import DefaultTheme from 'vitepress/theme' | ||
|
||
import CodeRunner from './components/CodeRunner.vue' | ||
import ApiTable from "./components/ApiTable.vue"; | ||
|
||
export default { | ||
...DefaultTheme, | ||
enhanceApp: async ({app, router, siteData}) => { | ||
// Fixed window is not defined | ||
if (!import.meta.env.SSR) { | ||
const module = await import('view-shadcn-ui') | ||
app.use(module.default) | ||
} | ||
|
||
app.component('CodeRunner', CodeRunner) | ||
app.component('ApiTable', ApiTable) | ||
} | ||
} |
Oops, something went wrong.