File tree Expand file tree Collapse file tree 7 files changed +206
-0
lines changed Expand file tree Collapse file tree 7 files changed +206
-0
lines changed Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import DocumentEditorHeader from ' ./DocumentEditorHeader.vue'
3+ </script >
4+
5+ <template >
6+ <Stories
7+ title =" DocumentEditorHeader"
8+ :component =" DocumentEditorHeader"
9+ >
10+ <Story title =" Default" >
11+ <DocumentEditorHeader heading =" Document Title" />
12+ </Story >
13+ <Story title =" Different Sections" >
14+ <div class =" space-y-4" >
15+ <DocumentEditorHeader heading =" Required Fields" />
16+ <DocumentEditorHeader heading =" Optional Fields" />
17+ <DocumentEditorHeader heading =" General" />
18+ </div >
19+ </Story >
20+ </Stories >
21+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { ref } from ' vue'
3+ import DocumentEditorInput from ' ./DocumentEditorInput.vue'
4+
5+ const shortText = ref (' Short text' )
6+ const longText = ref (
7+ ' This is a much longer text that demonstrates auto-growing behavior' ,
8+ )
9+ </script >
10+
11+ <template >
12+ <Stories
13+ title =" DocumentEditorInput"
14+ :component =" DocumentEditorInput"
15+ >
16+ <Story title =" Empty" >
17+ <DocumentEditorInput />
18+ </Story >
19+ <Story title =" With Short Text" >
20+ <DocumentEditorInput v-model =" shortText" />
21+ </Story >
22+ <Story title =" With Long Text" >
23+ <DocumentEditorInput v-model =" longText" />
24+ </Story >
25+ </Stories >
26+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import DownloadButton from ' ./DownloadButton.vue'
3+ </script >
4+
5+ <template >
6+ <Stories
7+ title =" DownloadButton"
8+ :component =" DownloadButton"
9+ >
10+ <Story title =" Default" >
11+ <DownloadButton
12+ text =" Download JabRef"
13+ href =" https://github.com/JabRef/jabref/releases/latest"
14+ />
15+ </Story >
16+ <Story title =" Without Icon" >
17+ <DownloadButton
18+ text =" Download"
19+ href =" #"
20+ :show-icon =" false"
21+ />
22+ </Story >
23+ <Story title =" Custom Text" >
24+ <DownloadButton
25+ text =" Get Latest Version"
26+ href =" #"
27+ />
28+ </Story >
29+ </Stories >
30+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import HorizontalRule from ' ./HorizontalRule.vue'
3+ </script >
4+
5+ <template >
6+ <Stories
7+ title =" HorizontalRule"
8+ :component =" HorizontalRule"
9+ >
10+ <Story title =" Default (no content)" >
11+ <HorizontalRule />
12+ </Story >
13+ <Story title =" With Text" >
14+ <HorizontalRule content =" OR" />
15+ </Story >
16+ <Story title =" With Longer Text" >
17+ <HorizontalRule content =" Continue with" />
18+ </Story >
19+ </Stories >
20+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { ref } from ' vue'
3+ import ModalDialog from ' ./ModalDialog.vue'
4+
5+ const showSimpleModal = ref (false )
6+ const showCustomModal = ref (false )
7+ </script >
8+
9+ <template >
10+ <Stories
11+ title =" ModalDialog"
12+ :component =" ModalDialog"
13+ >
14+ <Story title =" Simple Modal" >
15+ <div >
16+ <n-button @click =" showSimpleModal = true" >Open Modal</n-button >
17+ <ModalDialog
18+ v-model =" showSimpleModal"
19+ header =" Simple Modal"
20+ >
21+ <p >This is a simple modal dialog with default content and footer.</p >
22+ </ModalDialog >
23+ </div >
24+ </Story >
25+ <Story title =" With Custom Content" >
26+ <div >
27+ <n-button @click =" showCustomModal = true" >Open Modal</n-button >
28+ <ModalDialog
29+ v-model =" showCustomModal"
30+ header =" Confirmation Dialog"
31+ >
32+ <p class =" text-lg" >
33+ Are you sure you want to proceed with this action?
34+ </p >
35+ <p class =" text-sm text-gray-500 mt-2" >
36+ This action cannot be undone.
37+ </p >
38+ </ModalDialog >
39+ </div >
40+ </Story >
41+ </Stories >
42+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import PasswordInput from ' ./PasswordInput.vue'
3+ </script >
4+
5+ <template >
6+ <Stories
7+ title =" PasswordInput"
8+ :component =" PasswordInput"
9+ >
10+ <Story title =" Default" >
11+ <PasswordInput placeholder =" Enter password" />
12+ </Story >
13+ <Story title =" With Value" >
14+ <PasswordInput
15+ placeholder =" Password"
16+ value =" SecretPassword123"
17+ />
18+ </Story >
19+ </Stories >
20+ </template >
Original file line number Diff line number Diff line change 1+ <!-- eslint-disable vue/multi-word-component-names -->
2+ <script setup lang="ts">
3+ import { ref } from ' vue'
4+ import Tagify from ' ./tagify.vue'
5+
6+ const inputTags = ref ([])
7+ const textareaTags = ref ([])
8+ const whitelistTags = ref ([])
9+ </script >
10+
11+ <template >
12+ <Stories
13+ title =" tagify"
14+ :component =" Tagify"
15+ >
16+ <Story title =" Input Type" >
17+ <Tagify
18+ type =" input"
19+ :value =" inputTags"
20+ delimiters =" ,"
21+ :whitelist =" []"
22+ />
23+ </Story >
24+ <Story title =" Textarea Type" >
25+ <Tagify
26+ type =" textarea"
27+ :value =" textareaTags"
28+ delimiters =" ,"
29+ :whitelist =" []"
30+ />
31+ </Story >
32+ <Story title =" With Whitelist" >
33+ <Tagify
34+ type =" input"
35+ :value =" whitelistTags"
36+ delimiters =" ,"
37+ :whitelist =" [
38+ { value: 'JavaScript' },
39+ { value: 'TypeScript' },
40+ { value: 'Vue.js' },
41+ { value: 'React' },
42+ { value: 'Angular' },
43+ ]"
44+ />
45+ </Story >
46+ </Stories >
47+ </template >
You canβt perform that action at this time.
0 commit comments