@polymarbot/nuxt-layer-shadcn-ui 0.1.9 → 0.2.0-w
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/assets/styles/colors.css +10 -10
- package/app/assets/styles/globals.css +1 -0
- package/app/assets/styles/z-index.css +27 -0
- package/app/components/ui/Accordion/index.stories.ts +60 -56
- package/app/components/ui/Accordion/index.vue +1 -1
- package/app/components/ui/AdminLayout/SidebarMenus.vue +0 -2
- package/app/components/ui/AdminLayout/index.stories.ts +9 -8
- package/app/components/ui/Alert/index.stories.ts +28 -26
- package/app/components/ui/Alert/index.vue +6 -6
- package/app/components/ui/Alert/types.ts +2 -1
- package/app/components/ui/AlertDialog/index.stories.ts +85 -50
- package/app/components/ui/AsyncDataTable/index.stories.ts +53 -36
- package/app/components/ui/Avatar/index.stories.ts +56 -51
- package/app/components/ui/Avatar/index.vue +1 -1
- package/app/components/ui/Avatar/types.ts +5 -2
- package/app/components/ui/Badge/index.stories.ts +41 -41
- package/app/components/ui/Badge/index.vue +1 -1
- package/app/components/ui/Badge/types.ts +3 -1
- package/app/components/ui/Breadcrumb/index.stories.ts +48 -37
- package/app/components/ui/Breadcrumb/index.vue +1 -1
- package/app/components/ui/Button/index.stories.ts +94 -90
- package/app/components/ui/Button/index.vue +1 -1
- package/app/components/ui/Button/types.ts +4 -1
- package/app/components/ui/ButtonGroup/index.stories.ts +61 -49
- package/app/components/ui/Card/index.stories.ts +55 -47
- package/app/components/ui/Card/index.vue +1 -1
- package/app/components/ui/Checkbox/index.stories.ts +69 -46
- package/app/components/ui/Checkbox/index.vue +1 -1
- package/app/components/ui/CopyButton/index.stories.ts +89 -31
- package/app/components/ui/DataTable/index.stories.ts +218 -168
- package/app/components/ui/DataTable/index.vue +1 -1
- package/app/components/ui/DatePicker/index.stories.ts +131 -37
- package/app/components/ui/DateRangePicker/index.stories.ts +107 -33
- package/app/components/ui/Divider/index.stories.ts +46 -24
- package/app/components/ui/Divider/index.vue +1 -1
- package/app/components/ui/Drawer/index.stories.ts +131 -81
- package/app/components/ui/Drawer/index.vue +1 -7
- package/app/components/ui/Drawer/types.ts +1 -1
- package/app/components/ui/Dropdown/index.stories.ts +134 -89
- package/app/components/ui/Dropdown/index.vue +5 -1
- package/app/components/ui/Dropdown/types.ts +1 -1
- package/app/components/ui/FormItem/index.stories.ts +87 -43
- package/app/components/ui/FormItem/index.vue +1 -1
- package/app/components/ui/Help/index.stories.ts +46 -35
- package/app/components/ui/Icon/index.stories.ts +41 -43
- package/app/components/ui/Input/index.stories.ts +95 -41
- package/app/components/ui/Input/index.vue +1 -1
- package/app/components/ui/InputCurrency/index.stories.ts +89 -49
- package/app/components/ui/InputNumber/index.stories.ts +93 -29
- package/app/components/ui/InputNumber/index.vue +1 -1
- package/app/components/ui/InputOtp/index.stories.ts +6 -7
- package/app/components/ui/InputOtp/index.vue +1 -1
- package/app/components/ui/InputPercent/index.stories.ts +6 -7
- package/app/components/ui/InputRange/index.stories.ts +6 -7
- package/app/components/ui/Loading/index.stories.ts +19 -19
- package/app/components/ui/Markdown/index.stories.ts +7 -10
- package/app/components/ui/Modal/index.stories.ts +135 -80
- package/app/components/ui/Modal/index.vue +1 -6
- package/app/components/ui/Modal/types.ts +1 -1
- package/app/components/ui/ModalContent/index.stories.ts +54 -26
- package/app/components/ui/ModalContent/index.vue +2 -2
- package/app/components/ui/PageCard/index.stories.ts +177 -67
- package/app/components/ui/Pagination/index.stories.ts +68 -51
- package/app/components/ui/Pagination/index.vue +2 -2
- package/app/components/ui/Popover/index.stories.ts +47 -45
- package/app/components/ui/Popover/index.vue +1 -1
- package/app/components/ui/Qrcode/index.stories.ts +42 -34
- package/app/components/ui/RadioCardGroup/index.stories.ts +23 -32
- package/app/components/ui/RadioCardGroup/index.vue +1 -1
- package/app/components/ui/RadioGroup/index.stories.ts +123 -0
- package/app/components/ui/RadioGroup/index.vue +73 -0
- package/app/components/ui/RadioGroup/types.ts +13 -0
- package/app/components/ui/ScrollArea/index.stories.ts +69 -37
- package/app/components/ui/ScrollArea/index.vue +1 -1
- package/app/components/ui/SearchSelect/index.stories.ts +104 -66
- package/app/components/ui/Select/index.stories.ts +152 -98
- package/app/components/ui/Select/index.vue +3 -3
- package/app/components/ui/Skeleton/index.stories.ts +27 -30
- package/app/components/ui/Skeleton/index.vue +1 -1
- package/app/components/ui/Slider/index.stories.ts +73 -31
- package/app/components/ui/Slider/index.vue +1 -1
- package/app/components/ui/Surface/index.stories.ts +47 -21
- package/app/components/ui/Surface/index.vue +39 -28
- package/app/components/ui/Surface/types.ts +2 -2
- package/app/components/ui/Switch/index.stories.ts +6 -7
- package/app/components/ui/Switch/index.vue +1 -1
- package/app/components/ui/Tabs/index.stories.ts +103 -61
- package/app/components/ui/Tabs/index.vue +1 -1
- package/app/components/ui/Tag/index.stories.ts +42 -25
- package/app/components/ui/Tag/index.vue +39 -28
- package/app/components/ui/Tag/types.ts +2 -2
- package/app/components/ui/Textarea/index.stories.ts +73 -9
- package/app/components/ui/Textarea/index.vue +1 -1
- package/app/components/ui/Toast/index.stories.ts +71 -18
- package/app/components/ui/Toast/index.vue +1 -1
- package/app/components/ui/Tooltip/index.stories.ts +45 -38
- package/app/components/ui/Tooltip/index.vue +1 -1
- package/app/components/ui/WebLink/index.stories.ts +76 -41
- package/app/components/ui/WebLink/index.vue +1 -1
- package/package.json +2 -2
- package/app/components/ui/Radio/index.stories.ts +0 -71
- package/app/components/ui/Radio/index.vue +0 -10
- package/app/components/ui/Radio/types.ts +0 -3
|
@@ -1,69 +1,163 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import type { DatePickerType } from './types'
|
|
2
3
|
import DatePicker from './index.vue'
|
|
3
4
|
|
|
5
|
+
const types: DatePickerType[] = [ 'date', 'month', 'year' ]
|
|
6
|
+
|
|
4
7
|
const meta = {
|
|
5
8
|
title: 'UI/DatePicker',
|
|
6
9
|
component: DatePicker,
|
|
7
10
|
argTypes: {
|
|
11
|
+
modelValue: { control: 'date' },
|
|
12
|
+
type: { control: 'select', options: types },
|
|
8
13
|
showTime: { control: 'boolean' },
|
|
9
14
|
disabled: { control: 'boolean' },
|
|
15
|
+
readonly: { control: 'boolean' },
|
|
16
|
+
placeholder: { control: 'text' },
|
|
17
|
+
minDate: { control: 'date' },
|
|
18
|
+
maxDate: { control: 'date' },
|
|
19
|
+
valueFormat: { control: 'text' },
|
|
20
|
+
autoApply: { control: 'boolean' },
|
|
21
|
+
class: { control: 'text' },
|
|
10
22
|
},
|
|
11
23
|
args: {
|
|
24
|
+
modelValue: null,
|
|
25
|
+
type: 'date',
|
|
12
26
|
showTime: false,
|
|
13
27
|
disabled: false,
|
|
28
|
+
readonly: false,
|
|
29
|
+
placeholder: '',
|
|
30
|
+
minDate: undefined,
|
|
31
|
+
maxDate: undefined,
|
|
32
|
+
valueFormat: '',
|
|
33
|
+
autoApply: false,
|
|
34
|
+
class: '',
|
|
14
35
|
},
|
|
36
|
+
render: args => ({
|
|
37
|
+
components: { DatePicker },
|
|
38
|
+
setup () {
|
|
39
|
+
const value = ref<Date | string | null>(null)
|
|
40
|
+
return { args, value }
|
|
41
|
+
},
|
|
42
|
+
template: `
|
|
43
|
+
<div class="max-w-xs">
|
|
44
|
+
<DatePicker v-model="value" v-bind="args" />
|
|
45
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ value }}</div>
|
|
46
|
+
</div>
|
|
47
|
+
`,
|
|
48
|
+
}),
|
|
15
49
|
} satisfies Meta<typeof DatePicker>
|
|
16
50
|
|
|
17
51
|
export default meta
|
|
18
52
|
type Story = StoryObj<typeof meta>
|
|
19
53
|
|
|
20
|
-
export const Default: Story = {
|
|
21
|
-
|
|
54
|
+
export const Default: Story = {}
|
|
55
|
+
|
|
56
|
+
export const MonthPicker: Story = {
|
|
57
|
+
render: () => ({
|
|
22
58
|
components: { DatePicker },
|
|
23
59
|
setup () {
|
|
24
|
-
const date = ref<Date | null>(null)
|
|
25
|
-
const preselected = ref<Date>(new Date(2025, 5, 15))
|
|
26
|
-
const formatted = ref<string | null>(null)
|
|
27
60
|
const month = ref<Date | null>(null)
|
|
61
|
+
return { month }
|
|
62
|
+
},
|
|
63
|
+
template: `
|
|
64
|
+
<div class="max-w-xs">
|
|
65
|
+
<DatePicker v-model="month" type="month" placeholder="Pick a month" />
|
|
66
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ month }}</div>
|
|
67
|
+
</div>
|
|
68
|
+
`,
|
|
69
|
+
}),
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const YearPicker: Story = {
|
|
73
|
+
render: () => ({
|
|
74
|
+
components: { DatePicker },
|
|
75
|
+
setup () {
|
|
28
76
|
const year = ref<Date | null>(null)
|
|
29
|
-
return {
|
|
77
|
+
return { year }
|
|
30
78
|
},
|
|
31
79
|
template: `
|
|
32
|
-
<div class="
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
80
|
+
<div class="max-w-xs">
|
|
81
|
+
<DatePicker v-model="year" type="year" placeholder="Pick a year" />
|
|
82
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ year }}</div>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
}),
|
|
86
|
+
}
|
|
39
87
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
export const WithTime: Story = {
|
|
89
|
+
render: () => ({
|
|
90
|
+
components: { DatePicker },
|
|
91
|
+
setup () {
|
|
92
|
+
const date = ref<Date | null>(null)
|
|
93
|
+
return { date }
|
|
94
|
+
},
|
|
95
|
+
template: `
|
|
96
|
+
<div class="max-w-xs">
|
|
97
|
+
<DatePicker v-model="date" showTime />
|
|
98
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ date }}</div>
|
|
99
|
+
</div>
|
|
100
|
+
`,
|
|
101
|
+
}),
|
|
102
|
+
}
|
|
46
103
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
104
|
+
export const Preselected: Story = {
|
|
105
|
+
render: () => ({
|
|
106
|
+
components: { DatePicker },
|
|
107
|
+
setup () {
|
|
108
|
+
const preselected = ref<Date>(new Date(2025, 5, 15))
|
|
109
|
+
return { preselected }
|
|
110
|
+
},
|
|
111
|
+
template: `
|
|
112
|
+
<div class="max-w-xs">
|
|
113
|
+
<DatePicker v-model="preselected" />
|
|
114
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ preselected }}</div>
|
|
115
|
+
</div>
|
|
116
|
+
`,
|
|
117
|
+
}),
|
|
118
|
+
}
|
|
53
119
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
120
|
+
export const ValueFormat: Story = {
|
|
121
|
+
render: () => ({
|
|
122
|
+
components: { DatePicker },
|
|
123
|
+
setup () {
|
|
124
|
+
const formatted = ref<string | null>(null)
|
|
125
|
+
return { formatted }
|
|
126
|
+
},
|
|
127
|
+
template: `
|
|
128
|
+
<div class="max-w-xs">
|
|
129
|
+
<DatePicker v-model="formatted" valueFormat="yyyy-MM-dd" placeholder="Pick a date" />
|
|
130
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ formatted }}</div>
|
|
131
|
+
</div>
|
|
132
|
+
`,
|
|
133
|
+
}),
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const Disabled: Story = {
|
|
137
|
+
render: () => ({
|
|
138
|
+
components: { DatePicker },
|
|
139
|
+
setup () {
|
|
140
|
+
const date = ref<Date>(new Date(2025, 5, 15))
|
|
141
|
+
return { date }
|
|
142
|
+
},
|
|
143
|
+
template: `
|
|
144
|
+
<div class="max-w-xs">
|
|
145
|
+
<DatePicker v-model="date" disabled />
|
|
146
|
+
</div>
|
|
147
|
+
`,
|
|
148
|
+
}),
|
|
149
|
+
}
|
|
60
150
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
151
|
+
export const Readonly: Story = {
|
|
152
|
+
render: () => ({
|
|
153
|
+
components: { DatePicker },
|
|
154
|
+
setup () {
|
|
155
|
+
const date = ref<Date>(new Date(2025, 5, 15))
|
|
156
|
+
return { date }
|
|
157
|
+
},
|
|
158
|
+
template: `
|
|
159
|
+
<div class="max-w-xs">
|
|
160
|
+
<DatePicker v-model="date" readonly />
|
|
67
161
|
</div>
|
|
68
162
|
`,
|
|
69
163
|
}),
|
|
@@ -1,66 +1,140 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import type { DateRangePickerValue } from './types'
|
|
2
3
|
import DateRangePicker from './index.vue'
|
|
3
4
|
|
|
4
5
|
const meta = {
|
|
5
6
|
title: 'UI/DateRangePicker',
|
|
6
7
|
component: DateRangePicker,
|
|
7
8
|
argTypes: {
|
|
9
|
+
modelValue: { control: 'object' },
|
|
8
10
|
showTime: { control: 'boolean' },
|
|
9
11
|
disabled: { control: 'boolean' },
|
|
12
|
+
readonly: { control: 'boolean' },
|
|
13
|
+
startPlaceholder: { control: 'text' },
|
|
14
|
+
endPlaceholder: { control: 'text' },
|
|
15
|
+
minDate: { control: 'date' },
|
|
16
|
+
maxDate: { control: 'date' },
|
|
10
17
|
maxSpanDays: { control: 'number' },
|
|
18
|
+
valueFormat: { control: 'text' },
|
|
19
|
+
autoApply: { control: 'boolean' },
|
|
20
|
+
class: { control: 'text' },
|
|
11
21
|
},
|
|
12
22
|
args: {
|
|
23
|
+
modelValue: { start: null, end: null },
|
|
13
24
|
showTime: false,
|
|
14
25
|
disabled: false,
|
|
26
|
+
readonly: false,
|
|
27
|
+
startPlaceholder: '',
|
|
28
|
+
endPlaceholder: '',
|
|
29
|
+
minDate: undefined,
|
|
30
|
+
maxDate: undefined,
|
|
15
31
|
maxSpanDays: undefined,
|
|
32
|
+
valueFormat: '',
|
|
33
|
+
autoApply: false,
|
|
34
|
+
class: '',
|
|
16
35
|
},
|
|
36
|
+
render: args => ({
|
|
37
|
+
components: { DateRangePicker },
|
|
38
|
+
setup () {
|
|
39
|
+
const range = ref<DateRangePickerValue>({ start: null, end: null })
|
|
40
|
+
return { args, range }
|
|
41
|
+
},
|
|
42
|
+
template: `
|
|
43
|
+
<div class="max-w-lg">
|
|
44
|
+
<DateRangePicker v-model="range" v-bind="args" />
|
|
45
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ range }}</div>
|
|
46
|
+
</div>
|
|
47
|
+
`,
|
|
48
|
+
}),
|
|
17
49
|
} satisfies Meta<typeof DateRangePicker>
|
|
18
50
|
|
|
19
51
|
export default meta
|
|
20
52
|
type Story = StoryObj<typeof meta>
|
|
21
53
|
|
|
22
|
-
export const Default: Story = {
|
|
23
|
-
|
|
54
|
+
export const Default: Story = {}
|
|
55
|
+
|
|
56
|
+
export const WithTime: Story = {
|
|
57
|
+
render: () => ({
|
|
58
|
+
components: { DateRangePicker },
|
|
59
|
+
setup () {
|
|
60
|
+
const withTime = ref<DateRangePickerValue>({ start: null, end: null })
|
|
61
|
+
return { withTime }
|
|
62
|
+
},
|
|
63
|
+
template: `
|
|
64
|
+
<div class="max-w-lg">
|
|
65
|
+
<DateRangePicker v-model="withTime" showTime />
|
|
66
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ withTime }}</div>
|
|
67
|
+
</div>
|
|
68
|
+
`,
|
|
69
|
+
}),
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const MaxSpanDays: Story = {
|
|
73
|
+
render: () => ({
|
|
24
74
|
components: { DateRangePicker },
|
|
25
75
|
setup () {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
76
|
+
const maxSpan = ref<DateRangePickerValue>({ start: null, end: null })
|
|
77
|
+
return { maxSpan }
|
|
78
|
+
},
|
|
79
|
+
template: `
|
|
80
|
+
<div class="max-w-lg">
|
|
81
|
+
<DateRangePicker v-model="maxSpan" :maxSpanDays="7" />
|
|
82
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ maxSpan }}</div>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
}),
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const Preselected: Story = {
|
|
89
|
+
render: () => ({
|
|
90
|
+
components: { DateRangePicker },
|
|
91
|
+
setup () {
|
|
92
|
+
const preselected = ref<DateRangePickerValue>({
|
|
30
93
|
start: new Date(2025, 5, 1),
|
|
31
94
|
end: new Date(2025, 5, 15),
|
|
32
95
|
})
|
|
33
|
-
return {
|
|
96
|
+
return { preselected }
|
|
34
97
|
},
|
|
35
98
|
template: `
|
|
36
|
-
<div class="max-w-lg
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<!-- With Time -->
|
|
45
|
-
<section>
|
|
46
|
-
<h3 class="mb-4 text-lg font-medium">With Time</h3>
|
|
47
|
-
<DateRangePicker v-model="withTime" showTime />
|
|
48
|
-
<div class="mt-2 text-sm text-muted-foreground">Value: {{ withTime }}</div>
|
|
49
|
-
</section>
|
|
99
|
+
<div class="max-w-lg">
|
|
100
|
+
<DateRangePicker v-model="preselected" />
|
|
101
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ preselected }}</div>
|
|
102
|
+
</div>
|
|
103
|
+
`,
|
|
104
|
+
}),
|
|
105
|
+
}
|
|
50
106
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
107
|
+
export const Disabled: Story = {
|
|
108
|
+
render: () => ({
|
|
109
|
+
components: { DateRangePicker },
|
|
110
|
+
setup () {
|
|
111
|
+
const range = ref<DateRangePickerValue>({
|
|
112
|
+
start: new Date(2025, 5, 1),
|
|
113
|
+
end: new Date(2025, 5, 15),
|
|
114
|
+
})
|
|
115
|
+
return { range }
|
|
116
|
+
},
|
|
117
|
+
template: `
|
|
118
|
+
<div class="max-w-lg">
|
|
119
|
+
<DateRangePicker v-model="range" disabled />
|
|
120
|
+
</div>
|
|
121
|
+
`,
|
|
122
|
+
}),
|
|
123
|
+
}
|
|
57
124
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
125
|
+
export const Readonly: Story = {
|
|
126
|
+
render: () => ({
|
|
127
|
+
components: { DateRangePicker },
|
|
128
|
+
setup () {
|
|
129
|
+
const range = ref<DateRangePickerValue>({
|
|
130
|
+
start: new Date(2025, 5, 1),
|
|
131
|
+
end: new Date(2025, 5, 15),
|
|
132
|
+
})
|
|
133
|
+
return { range }
|
|
134
|
+
},
|
|
135
|
+
template: `
|
|
136
|
+
<div class="max-w-lg">
|
|
137
|
+
<DateRangePicker v-model="range" readonly />
|
|
64
138
|
</div>
|
|
65
139
|
`,
|
|
66
140
|
}),
|
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import Divider from './index.vue'
|
|
3
3
|
|
|
4
|
+
const types = [ 'horizontal', 'vertical' ] as const
|
|
5
|
+
|
|
4
6
|
const meta = {
|
|
5
7
|
title: 'UI/Divider',
|
|
6
8
|
component: Divider,
|
|
9
|
+
argTypes: {
|
|
10
|
+
type: { control: 'select', options: types },
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
type: 'horizontal',
|
|
14
|
+
},
|
|
15
|
+
render: args => ({
|
|
16
|
+
components: { Divider },
|
|
17
|
+
setup: () => ({ args }),
|
|
18
|
+
template: `
|
|
19
|
+
<div v-if="args.type === 'vertical'" class="flex h-8 items-center gap-4">
|
|
20
|
+
<span>Left</span>
|
|
21
|
+
<Divider v-bind="args" />
|
|
22
|
+
<span>Right</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-else class="space-y-4">
|
|
25
|
+
<p>Content above</p>
|
|
26
|
+
<Divider v-bind="args" />
|
|
27
|
+
<p>Content below</p>
|
|
28
|
+
</div>
|
|
29
|
+
`,
|
|
30
|
+
}),
|
|
7
31
|
} satisfies Meta<typeof Divider>
|
|
8
32
|
|
|
9
33
|
export default meta
|
|
10
34
|
type Story = StoryObj<typeof meta>
|
|
11
35
|
|
|
12
|
-
export const Default: Story = {
|
|
13
|
-
|
|
36
|
+
export const Default: Story = {}
|
|
37
|
+
|
|
38
|
+
export const Horizontal: Story = {
|
|
39
|
+
render: () => ({
|
|
14
40
|
components: { Divider },
|
|
15
|
-
setup: () => ({ args }),
|
|
16
41
|
template: `
|
|
17
|
-
<div class="space-y-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
</section>
|
|
42
|
+
<div class="space-y-4">
|
|
43
|
+
<p>Content above</p>
|
|
44
|
+
<Divider />
|
|
45
|
+
<p>Content below</p>
|
|
46
|
+
</div>
|
|
47
|
+
`,
|
|
48
|
+
}),
|
|
49
|
+
}
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</section>
|
|
51
|
+
export const Vertical: Story = {
|
|
52
|
+
render: () => ({
|
|
53
|
+
components: { Divider },
|
|
54
|
+
template: `
|
|
55
|
+
<div class="flex h-8 items-center gap-4">
|
|
56
|
+
<span>Left</span>
|
|
57
|
+
<Divider type="vertical" />
|
|
58
|
+
<span>Center</span>
|
|
59
|
+
<Divider type="vertical" />
|
|
60
|
+
<span>Right</span>
|
|
39
61
|
</div>
|
|
40
62
|
`,
|
|
41
63
|
}),
|