@polymarbot/nuxt-layer-shadcn-ui 0.2.2 → 0.3.1
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/globals.css +1 -20
- package/app/assets/styles/index.stories.ts +1 -1
- package/app/assets/styles/tailwind-preset.css +15 -0
- package/app/components/ui/Accordion/index.stories.ts +5 -0
- package/app/components/ui/AdminLayout/index.stories.ts +72 -56
- package/app/components/ui/Alert/index.stories.ts +4 -0
- package/app/components/ui/AlertDialog/index.stories.ts +6 -0
- package/app/components/ui/AsyncDataTable/index.stories.ts +6 -0
- package/app/components/ui/AsyncDataTable/index.vue +8 -4
- package/app/components/ui/AsyncDataTable/types.ts +2 -0
- package/app/components/ui/Avatar/index.stories.ts +6 -0
- package/app/components/ui/Badge/index.stories.ts +5 -0
- package/app/components/ui/Breadcrumb/index.stories.ts +5 -0
- package/app/components/ui/Button/index.stories.ts +9 -0
- package/app/components/ui/ButtonGroup/index.stories.ts +6 -0
- package/app/components/ui/Card/index.stories.ts +5 -0
- package/app/components/ui/Checkbox/index.stories.ts +5 -0
- package/app/components/ui/CopyButton/index.stories.ts +7 -0
- package/app/components/ui/DataTable/index.stories.ts +37 -4
- package/app/components/ui/DataTable/index.vue +16 -9
- package/app/components/ui/DataTable/types.ts +2 -0
- package/app/components/ui/DatePicker/index.stories.ts +9 -0
- package/app/components/ui/DateRangePicker/index.stories.ts +7 -0
- package/app/components/ui/Divider/index.stories.ts +4 -0
- package/app/components/ui/Drawer/index.stories.ts +6 -0
- package/app/components/ui/Dropdown/index.stories.ts +9 -0
- package/app/components/ui/FormItem/index.stories.ts +7 -0
- package/app/components/ui/Help/index.stories.ts +4 -0
- package/app/components/ui/Icon/index.stories.ts +4 -0
- package/app/components/ui/Input/index.stories.ts +9 -0
- package/app/components/ui/InputCurrency/index.stories.ts +7 -0
- package/app/components/ui/InputNumber/index.stories.ts +7 -0
- package/app/components/ui/Loading/index.stories.ts +3 -0
- package/app/components/ui/Modal/index.stories.ts +6 -0
- package/app/components/ui/ModalContent/index.stories.ts +5 -0
- package/app/components/ui/PageCard/index.stories.ts +14 -0
- package/app/components/ui/Pagination/index.stories.ts +5 -0
- package/app/components/ui/Popover/index.stories.ts +4 -0
- package/app/components/ui/Qrcode/index.stories.ts +4 -0
- package/app/components/ui/RadioCardGroup/index.stories.ts +30 -7
- package/app/components/ui/RadioGroup/index.stories.ts +7 -0
- package/app/components/ui/ScrollArea/index.stories.ts +4 -0
- package/app/components/ui/SearchSelect/index.stories.ts +6 -0
- package/app/components/ui/SearchSelect/index.vue +5 -4
- package/app/components/ui/Select/index.stories.ts +8 -0
- package/app/components/ui/Skeleton/index.stories.ts +4 -0
- package/app/components/ui/Slider/index.stories.ts +6 -0
- package/app/components/ui/Surface/index.stories.ts +5 -0
- package/app/components/ui/Tabs/index.stories.ts +8 -0
- package/app/components/ui/Tag/index.stories.ts +5 -0
- package/app/components/ui/Textarea/index.stories.ts +7 -0
- package/app/components/ui/Toast/index.stories.ts +5 -0
- package/app/components/ui/Tooltip/index.stories.ts +4 -0
- package/app/components/ui/WebLink/index.stories.ts +7 -0
- package/nuxt.config.ts +1 -6
- package/package.json +5 -5
- /package/app/assets/styles/{colors.css → tailwind-colors.css} +0 -0
- /package/app/assets/styles/{utilities.css → tailwind-utilities.css} +0 -0
|
@@ -65,14 +65,12 @@ const meta = {
|
|
|
65
65
|
argTypes: {
|
|
66
66
|
selectionMode: { control: 'select', options: [ undefined, 'single', 'multiple' ]},
|
|
67
67
|
loading: { control: 'boolean' },
|
|
68
|
-
|
|
69
|
-
sortOrder: { control: 'select', options: [ null, 1, -1 ]},
|
|
68
|
+
clickable: { control: 'boolean' },
|
|
70
69
|
},
|
|
71
70
|
args: {
|
|
72
71
|
selectionMode: undefined,
|
|
73
72
|
loading: false,
|
|
74
|
-
|
|
75
|
-
sortOrder: null,
|
|
73
|
+
clickable: false,
|
|
76
74
|
},
|
|
77
75
|
render: args => ({
|
|
78
76
|
components: { DataTable: DataTable as any },
|
|
@@ -88,9 +86,12 @@ const meta = {
|
|
|
88
86
|
export default meta
|
|
89
87
|
type Story = StoryObj<typeof meta>
|
|
90
88
|
|
|
89
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
90
|
+
|
|
91
91
|
export const Default: Story = {}
|
|
92
92
|
|
|
93
93
|
export const SingleSelection: Story = {
|
|
94
|
+
parameters: noControls,
|
|
94
95
|
render: () => ({
|
|
95
96
|
components: { DataTable: DataTable as any },
|
|
96
97
|
setup () {
|
|
@@ -114,6 +115,7 @@ export const SingleSelection: Story = {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
export const MultipleSelection: Story = {
|
|
118
|
+
parameters: noControls,
|
|
117
119
|
render: () => ({
|
|
118
120
|
components: { DataTable: DataTable as any },
|
|
119
121
|
setup () {
|
|
@@ -137,6 +139,7 @@ export const MultipleSelection: Story = {
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
export const Sortable: Story = {
|
|
142
|
+
parameters: noControls,
|
|
140
143
|
render: () => ({
|
|
141
144
|
components: { DataTable: DataTable as any },
|
|
142
145
|
setup () {
|
|
@@ -173,6 +176,7 @@ export const Sortable: Story = {
|
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
export const ColumnTypes: Story = {
|
|
179
|
+
parameters: noControls,
|
|
176
180
|
render: () => ({
|
|
177
181
|
components: { DataTable: DataTable as any },
|
|
178
182
|
setup: () => ({ data: sampleData, typeColumns }),
|
|
@@ -185,6 +189,7 @@ export const ColumnTypes: Story = {
|
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
export const CustomSlots: Story = {
|
|
192
|
+
parameters: noControls,
|
|
188
193
|
render: () => ({
|
|
189
194
|
components: { DataTable: DataTable as any },
|
|
190
195
|
setup: () => ({ data: sampleData, slotColumns }),
|
|
@@ -213,6 +218,7 @@ export const CustomSlots: Story = {
|
|
|
213
218
|
}
|
|
214
219
|
|
|
215
220
|
export const EmptyState: Story = {
|
|
221
|
+
parameters: noControls,
|
|
216
222
|
render: () => ({
|
|
217
223
|
components: { DataTable: DataTable as any },
|
|
218
224
|
setup: () => ({ basicColumns }),
|
|
@@ -225,6 +231,7 @@ export const EmptyState: Story = {
|
|
|
225
231
|
}
|
|
226
232
|
|
|
227
233
|
export const FooterSlot: Story = {
|
|
234
|
+
parameters: noControls,
|
|
228
235
|
render: () => ({
|
|
229
236
|
components: { DataTable: DataTable as any },
|
|
230
237
|
setup: () => ({ data: sampleData, slotColumns }),
|
|
@@ -245,6 +252,7 @@ export const FooterSlot: Story = {
|
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
export const FrozenColumns: Story = {
|
|
255
|
+
parameters: noControls,
|
|
248
256
|
render: () => ({
|
|
249
257
|
components: { DataTable: DataTable as any },
|
|
250
258
|
setup () {
|
|
@@ -269,6 +277,7 @@ export const FrozenColumns: Story = {
|
|
|
269
277
|
}
|
|
270
278
|
|
|
271
279
|
export const Loading: Story = {
|
|
280
|
+
parameters: noControls,
|
|
272
281
|
render: () => ({
|
|
273
282
|
components: { DataTable: DataTable as any },
|
|
274
283
|
setup: () => ({ data: sampleData, basicColumns }),
|
|
@@ -279,3 +288,27 @@ export const Loading: Story = {
|
|
|
279
288
|
`,
|
|
280
289
|
}),
|
|
281
290
|
}
|
|
291
|
+
|
|
292
|
+
export const RowClick: Story = {
|
|
293
|
+
parameters: noControls,
|
|
294
|
+
render: () => ({
|
|
295
|
+
components: { DataTable: DataTable as any },
|
|
296
|
+
setup () {
|
|
297
|
+
const lastClicked = ref<User | null>(null)
|
|
298
|
+
return { data: sampleData, basicColumns, lastClicked }
|
|
299
|
+
},
|
|
300
|
+
template: `
|
|
301
|
+
<div class="w-full">
|
|
302
|
+
<DataTable
|
|
303
|
+
:data="data"
|
|
304
|
+
:columns="basicColumns"
|
|
305
|
+
clickable
|
|
306
|
+
@rowClick="row => lastClicked = row"
|
|
307
|
+
/>
|
|
308
|
+
<div class="mt-2 text-sm text-muted-foreground">
|
|
309
|
+
Last clicked: {{ lastClicked?.name ?? 'none' }}
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
`,
|
|
313
|
+
}),
|
|
314
|
+
}
|
|
@@ -25,11 +25,13 @@ const props = withDefaults(defineProps<DataTableProps<TData>>(), {
|
|
|
25
25
|
sortBy: undefined,
|
|
26
26
|
sortOrder: undefined,
|
|
27
27
|
loading: false,
|
|
28
|
+
clickable: false,
|
|
28
29
|
})
|
|
29
30
|
|
|
30
31
|
const emit = defineEmits<{
|
|
31
32
|
'update:sortBy': [value: string | null]
|
|
32
33
|
'update:sortOrder': [value: number | null]
|
|
34
|
+
'rowClick': [row: TData, event: MouseEvent]
|
|
33
35
|
}>()
|
|
34
36
|
|
|
35
37
|
const selection = defineModel<TData | TData[] | null>('selection', { default: null })
|
|
@@ -91,6 +93,11 @@ function toggleRow (row: TData) {
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
function onRowClick (row: TData, event: MouseEvent) {
|
|
97
|
+
emit('rowClick', row, event)
|
|
98
|
+
if (showSelectionColumn.value) toggleRow(row)
|
|
99
|
+
}
|
|
100
|
+
|
|
94
101
|
// -- Sorting --
|
|
95
102
|
// Sort cycle: null → asc(1) → desc(-1) → null (removable sort)
|
|
96
103
|
|
|
@@ -208,8 +215,8 @@ function buildColumnClass (column: DataTableColumn, headerIndex?: number): strin
|
|
|
208
215
|
column.align === 'right' && 'text-right',
|
|
209
216
|
// Header-specific
|
|
210
217
|
isHeader && column.sortable && `
|
|
211
|
-
cursor-pointer select-none
|
|
212
218
|
hover:text-foreground
|
|
219
|
+
cursor-pointer select-none
|
|
213
220
|
`,
|
|
214
221
|
hasDivider && headerDividerClass,
|
|
215
222
|
// Fixed column last — sticky overrides relative via tailwind-merge
|
|
@@ -258,7 +265,7 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
258
265
|
|
|
259
266
|
<template>
|
|
260
267
|
<div
|
|
261
|
-
:class="cn('
|
|
268
|
+
:class="cn('rounded-lg bg-border px-1 text-foreground relative', !$slots.footer && `
|
|
262
269
|
pb-1
|
|
263
270
|
`)"
|
|
264
271
|
>
|
|
@@ -272,8 +279,8 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
272
279
|
<div
|
|
273
280
|
v-if="loading"
|
|
274
281
|
class="
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
inset-0 rounded-lg bg-background/60 absolute z-20 flex items-center
|
|
283
|
+
justify-center
|
|
277
284
|
"
|
|
278
285
|
>
|
|
279
286
|
<Icon
|
|
@@ -317,7 +324,7 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
317
324
|
>
|
|
318
325
|
<div
|
|
319
326
|
:class="cn(
|
|
320
|
-
'flex items-center
|
|
327
|
+
'gap-1 flex items-center',
|
|
321
328
|
column.align === 'center' && 'justify-center',
|
|
322
329
|
column.align === 'right' && 'justify-end',
|
|
323
330
|
)"
|
|
@@ -349,9 +356,9 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
349
356
|
<TableRow
|
|
350
357
|
v-for="(row, index) in data"
|
|
351
358
|
:key="index"
|
|
352
|
-
:class="showSelectionColumn && 'cursor-pointer'"
|
|
359
|
+
:class="(showSelectionColumn || clickable) && 'cursor-pointer'"
|
|
353
360
|
:data-state="isRowSelected(row) ? 'selected' : undefined"
|
|
354
|
-
@click="
|
|
361
|
+
@click="onRowClick(row, $event)"
|
|
355
362
|
>
|
|
356
363
|
<!-- Selection cell: stop click to prevent double toggle with row click -->
|
|
357
364
|
<TableCell
|
|
@@ -386,7 +393,7 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
386
393
|
<span
|
|
387
394
|
v-if="!formatCellValue(get(row, column.field), column) && column.type !== 'empty'"
|
|
388
395
|
class="
|
|
389
|
-
|
|
396
|
+
h-0.5 w-2.5 bg-muted-foreground/50 inline-block rounded-full
|
|
390
397
|
align-middle
|
|
391
398
|
"
|
|
392
399
|
/>
|
|
@@ -402,7 +409,7 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
402
409
|
<TableEmpty :colspan="totalColumns">
|
|
403
410
|
<slot name="empty">
|
|
404
411
|
<div
|
|
405
|
-
class="flex flex-col items-center
|
|
412
|
+
class="gap-2 text-muted-foreground flex flex-col items-center"
|
|
406
413
|
>
|
|
407
414
|
<Icon
|
|
408
415
|
name="inbox"
|
|
@@ -51,9 +51,12 @@ const meta = {
|
|
|
51
51
|
export default meta
|
|
52
52
|
type Story = StoryObj<typeof meta>
|
|
53
53
|
|
|
54
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
55
|
+
|
|
54
56
|
export const Default: Story = {}
|
|
55
57
|
|
|
56
58
|
export const MonthPicker: Story = {
|
|
59
|
+
parameters: noControls,
|
|
57
60
|
render: () => ({
|
|
58
61
|
components: { DatePicker },
|
|
59
62
|
setup () {
|
|
@@ -70,6 +73,7 @@ export const MonthPicker: Story = {
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
export const YearPicker: Story = {
|
|
76
|
+
parameters: noControls,
|
|
73
77
|
render: () => ({
|
|
74
78
|
components: { DatePicker },
|
|
75
79
|
setup () {
|
|
@@ -86,6 +90,7 @@ export const YearPicker: Story = {
|
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
export const WithTime: Story = {
|
|
93
|
+
parameters: noControls,
|
|
89
94
|
render: () => ({
|
|
90
95
|
components: { DatePicker },
|
|
91
96
|
setup () {
|
|
@@ -102,6 +107,7 @@ export const WithTime: Story = {
|
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
export const Preselected: Story = {
|
|
110
|
+
parameters: noControls,
|
|
105
111
|
render: () => ({
|
|
106
112
|
components: { DatePicker },
|
|
107
113
|
setup () {
|
|
@@ -118,6 +124,7 @@ export const Preselected: Story = {
|
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
export const ValueFormat: Story = {
|
|
127
|
+
parameters: noControls,
|
|
121
128
|
render: () => ({
|
|
122
129
|
components: { DatePicker },
|
|
123
130
|
setup () {
|
|
@@ -134,6 +141,7 @@ export const ValueFormat: Story = {
|
|
|
134
141
|
}
|
|
135
142
|
|
|
136
143
|
export const Disabled: Story = {
|
|
144
|
+
parameters: noControls,
|
|
137
145
|
render: () => ({
|
|
138
146
|
components: { DatePicker },
|
|
139
147
|
setup () {
|
|
@@ -149,6 +157,7 @@ export const Disabled: Story = {
|
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
export const Readonly: Story = {
|
|
160
|
+
parameters: noControls,
|
|
152
161
|
render: () => ({
|
|
153
162
|
components: { DatePicker },
|
|
154
163
|
setup () {
|
|
@@ -51,9 +51,12 @@ const meta = {
|
|
|
51
51
|
export default meta
|
|
52
52
|
type Story = StoryObj<typeof meta>
|
|
53
53
|
|
|
54
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
55
|
+
|
|
54
56
|
export const Default: Story = {}
|
|
55
57
|
|
|
56
58
|
export const WithTime: Story = {
|
|
59
|
+
parameters: noControls,
|
|
57
60
|
render: () => ({
|
|
58
61
|
components: { DateRangePicker },
|
|
59
62
|
setup () {
|
|
@@ -70,6 +73,7 @@ export const WithTime: Story = {
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
export const MaxSpanDays: Story = {
|
|
76
|
+
parameters: noControls,
|
|
73
77
|
render: () => ({
|
|
74
78
|
components: { DateRangePicker },
|
|
75
79
|
setup () {
|
|
@@ -86,6 +90,7 @@ export const MaxSpanDays: Story = {
|
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
export const Preselected: Story = {
|
|
93
|
+
parameters: noControls,
|
|
89
94
|
render: () => ({
|
|
90
95
|
components: { DateRangePicker },
|
|
91
96
|
setup () {
|
|
@@ -105,6 +110,7 @@ export const Preselected: Story = {
|
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
export const Disabled: Story = {
|
|
113
|
+
parameters: noControls,
|
|
108
114
|
render: () => ({
|
|
109
115
|
components: { DateRangePicker },
|
|
110
116
|
setup () {
|
|
@@ -123,6 +129,7 @@ export const Disabled: Story = {
|
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
export const Readonly: Story = {
|
|
132
|
+
parameters: noControls,
|
|
126
133
|
render: () => ({
|
|
127
134
|
components: { DateRangePicker },
|
|
128
135
|
setup () {
|
|
@@ -33,9 +33,12 @@ const meta = {
|
|
|
33
33
|
export default meta
|
|
34
34
|
type Story = StoryObj<typeof meta>
|
|
35
35
|
|
|
36
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
37
|
+
|
|
36
38
|
export const Default: Story = {}
|
|
37
39
|
|
|
38
40
|
export const Horizontal: Story = {
|
|
41
|
+
parameters: noControls,
|
|
39
42
|
render: () => ({
|
|
40
43
|
components: { Divider },
|
|
41
44
|
template: `
|
|
@@ -49,6 +52,7 @@ export const Horizontal: Story = {
|
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
export const Vertical: Story = {
|
|
55
|
+
parameters: noControls,
|
|
52
56
|
render: () => ({
|
|
53
57
|
components: { Divider },
|
|
54
58
|
template: `
|
|
@@ -58,9 +58,12 @@ const meta = {
|
|
|
58
58
|
export default meta
|
|
59
59
|
type Story = StoryObj<typeof meta>
|
|
60
60
|
|
|
61
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
62
|
+
|
|
61
63
|
export const Default: Story = {}
|
|
62
64
|
|
|
63
65
|
export const WithDescription: Story = {
|
|
66
|
+
parameters: noControls,
|
|
64
67
|
render: () => ({
|
|
65
68
|
components: { Drawer, Button, Input },
|
|
66
69
|
setup () {
|
|
@@ -88,6 +91,7 @@ export const WithDescription: Story = {
|
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
export const ScrollableContent: Story = {
|
|
94
|
+
parameters: noControls,
|
|
91
95
|
render: () => ({
|
|
92
96
|
components: { Drawer, Button },
|
|
93
97
|
setup () {
|
|
@@ -110,6 +114,7 @@ export const ScrollableContent: Story = {
|
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
export const Sides: Story = {
|
|
117
|
+
parameters: noControls,
|
|
113
118
|
render: () => ({
|
|
114
119
|
components: { Drawer, Button },
|
|
115
120
|
setup () {
|
|
@@ -145,6 +150,7 @@ export const Sides: Story = {
|
|
|
145
150
|
}
|
|
146
151
|
|
|
147
152
|
export const EventHandling: Story = {
|
|
153
|
+
parameters: noControls,
|
|
148
154
|
render: () => ({
|
|
149
155
|
components: { Drawer, Button },
|
|
150
156
|
setup () {
|
|
@@ -83,9 +83,12 @@ const meta = {
|
|
|
83
83
|
export default meta
|
|
84
84
|
type Story = StoryObj<typeof meta>
|
|
85
85
|
|
|
86
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
87
|
+
|
|
86
88
|
export const Default: Story = {}
|
|
87
89
|
|
|
88
90
|
export const HoverTrigger: Story = {
|
|
91
|
+
parameters: noControls,
|
|
89
92
|
render: () => ({
|
|
90
93
|
components: { Dropdown, Button },
|
|
91
94
|
setup: () => ({ basicMenus }),
|
|
@@ -98,6 +101,7 @@ export const HoverTrigger: Story = {
|
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
export const ClickTrigger: Story = {
|
|
104
|
+
parameters: noControls,
|
|
101
105
|
render: () => ({
|
|
102
106
|
components: { Dropdown, Button },
|
|
103
107
|
setup: () => ({ basicMenus }),
|
|
@@ -110,6 +114,7 @@ export const ClickTrigger: Story = {
|
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
export const WithDisabledItems: Story = {
|
|
117
|
+
parameters: noControls,
|
|
113
118
|
render: () => ({
|
|
114
119
|
components: { Dropdown, Button },
|
|
115
120
|
setup: () => ({ accountMenus }),
|
|
@@ -122,6 +127,7 @@ export const WithDisabledItems: Story = {
|
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
export const WithLinks: Story = {
|
|
130
|
+
parameters: noControls,
|
|
125
131
|
render: () => ({
|
|
126
132
|
components: { Dropdown, Button },
|
|
127
133
|
setup: () => ({ linkMenus }),
|
|
@@ -134,6 +140,7 @@ export const WithLinks: Story = {
|
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
export const WithGroups: Story = {
|
|
143
|
+
parameters: noControls,
|
|
137
144
|
render: () => ({
|
|
138
145
|
components: { Dropdown, Button },
|
|
139
146
|
setup: () => ({ groupedMenus }),
|
|
@@ -146,6 +153,7 @@ export const WithGroups: Story = {
|
|
|
146
153
|
}
|
|
147
154
|
|
|
148
155
|
export const CustomSlots: Story = {
|
|
156
|
+
parameters: noControls,
|
|
149
157
|
render: () => ({
|
|
150
158
|
components: { Dropdown, Button },
|
|
151
159
|
setup: () => ({ customMenus }),
|
|
@@ -170,6 +178,7 @@ export const CustomSlots: Story = {
|
|
|
170
178
|
}
|
|
171
179
|
|
|
172
180
|
export const PopupSlot: Story = {
|
|
181
|
+
parameters: noControls,
|
|
173
182
|
render: () => ({
|
|
174
183
|
components: { Dropdown, Button },
|
|
175
184
|
template: `
|
|
@@ -39,9 +39,12 @@ const meta = {
|
|
|
39
39
|
export default meta
|
|
40
40
|
type Story = StoryObj<typeof meta>
|
|
41
41
|
|
|
42
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
43
|
+
|
|
42
44
|
export const Default: Story = {}
|
|
43
45
|
|
|
44
46
|
export const Required: Story = {
|
|
47
|
+
parameters: noControls,
|
|
45
48
|
render: () => ({
|
|
46
49
|
components: { FormItem, Input },
|
|
47
50
|
setup () {
|
|
@@ -59,6 +62,7 @@ export const Required: Story = {
|
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
export const WithError: Story = {
|
|
65
|
+
parameters: noControls,
|
|
62
66
|
render: () => ({
|
|
63
67
|
components: { FormItem, Input },
|
|
64
68
|
template: `
|
|
@@ -72,6 +76,7 @@ export const WithError: Story = {
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
export const WithDescription: Story = {
|
|
79
|
+
parameters: noControls,
|
|
75
80
|
render: () => ({
|
|
76
81
|
components: { FormItem, Input },
|
|
77
82
|
template: `
|
|
@@ -85,6 +90,7 @@ export const WithDescription: Story = {
|
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
export const Horizontal: Story = {
|
|
93
|
+
parameters: noControls,
|
|
88
94
|
render: () => ({
|
|
89
95
|
components: { FormItem, Input },
|
|
90
96
|
template: `
|
|
@@ -98,6 +104,7 @@ export const Horizontal: Story = {
|
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
export const Responsive: Story = {
|
|
107
|
+
parameters: noControls,
|
|
101
108
|
render: () => ({
|
|
102
109
|
components: { FormItem, Input },
|
|
103
110
|
template: `
|
|
@@ -24,9 +24,12 @@ const meta = {
|
|
|
24
24
|
export default meta
|
|
25
25
|
type Story = StoryObj<typeof meta>
|
|
26
26
|
|
|
27
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
28
|
+
|
|
27
29
|
export const Default: Story = {}
|
|
28
30
|
|
|
29
31
|
export const Positions: Story = {
|
|
32
|
+
parameters: noControls,
|
|
30
33
|
render: () => ({
|
|
31
34
|
components: { Help },
|
|
32
35
|
template: `
|
|
@@ -53,6 +56,7 @@ export const Positions: Story = {
|
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
export const InlineWithLabel: Story = {
|
|
59
|
+
parameters: noControls,
|
|
56
60
|
render: () => ({
|
|
57
61
|
components: { Help },
|
|
58
62
|
template: `
|
|
@@ -29,9 +29,12 @@ const meta = {
|
|
|
29
29
|
export default meta
|
|
30
30
|
type Story = StoryObj<typeof meta>
|
|
31
31
|
|
|
32
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
33
|
+
|
|
32
34
|
export const Default: Story = {}
|
|
33
35
|
|
|
34
36
|
export const CommonIcons: Story = {
|
|
37
|
+
parameters: noControls,
|
|
35
38
|
render: () => ({
|
|
36
39
|
components: { Icon },
|
|
37
40
|
setup: () => ({ commonIcons }),
|
|
@@ -51,6 +54,7 @@ export const CommonIcons: Story = {
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
export const Sizes: Story = {
|
|
57
|
+
parameters: noControls,
|
|
54
58
|
render: () => ({
|
|
55
59
|
components: { Icon },
|
|
56
60
|
template: `
|
|
@@ -31,9 +31,12 @@ const meta = {
|
|
|
31
31
|
export default meta
|
|
32
32
|
type Story = StoryObj<typeof meta>
|
|
33
33
|
|
|
34
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
35
|
+
|
|
34
36
|
export const Default: Story = {}
|
|
35
37
|
|
|
36
38
|
export const Controlled: Story = {
|
|
39
|
+
parameters: noControls,
|
|
37
40
|
render: () => ({
|
|
38
41
|
components: { Input },
|
|
39
42
|
setup () {
|
|
@@ -50,6 +53,7 @@ export const Controlled: Story = {
|
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export const WithPrefix: Story = {
|
|
56
|
+
parameters: noControls,
|
|
53
57
|
render: () => ({
|
|
54
58
|
components: { Input, Icon },
|
|
55
59
|
setup () {
|
|
@@ -70,6 +74,7 @@ export const WithPrefix: Story = {
|
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
export const WithSuffix: Story = {
|
|
77
|
+
parameters: noControls,
|
|
73
78
|
render: () => ({
|
|
74
79
|
components: { Input, Icon },
|
|
75
80
|
setup () {
|
|
@@ -90,6 +95,7 @@ export const WithSuffix: Story = {
|
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
export const Password: Story = {
|
|
98
|
+
parameters: noControls,
|
|
93
99
|
render: () => ({
|
|
94
100
|
components: { Input },
|
|
95
101
|
setup () {
|
|
@@ -106,6 +112,7 @@ export const Password: Story = {
|
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
export const Disabled: Story = {
|
|
115
|
+
parameters: noControls,
|
|
109
116
|
render: () => ({
|
|
110
117
|
components: { Input },
|
|
111
118
|
template: '<Input disabled placeholder="Disabled input" class="max-w-sm" />',
|
|
@@ -113,6 +120,7 @@ export const Disabled: Story = {
|
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
export const Readonly: Story = {
|
|
123
|
+
parameters: noControls,
|
|
116
124
|
render: () => ({
|
|
117
125
|
components: { Input },
|
|
118
126
|
template: '<Input readonly modelValue="Read-only value" class="max-w-sm" />',
|
|
@@ -120,6 +128,7 @@ export const Readonly: Story = {
|
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
export const Invalid: Story = {
|
|
131
|
+
parameters: noControls,
|
|
123
132
|
render: () => ({
|
|
124
133
|
components: { Input },
|
|
125
134
|
template: '<Input invalid modelValue="Invalid value" class="max-w-sm" />',
|
|
@@ -32,9 +32,12 @@ const meta = {
|
|
|
32
32
|
export default meta
|
|
33
33
|
type Story = StoryObj<typeof meta>
|
|
34
34
|
|
|
35
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
36
|
+
|
|
35
37
|
export const Default: Story = {}
|
|
36
38
|
|
|
37
39
|
export const UsdSymbol: Story = {
|
|
40
|
+
parameters: noControls,
|
|
38
41
|
render: () => ({
|
|
39
42
|
components: { InputCurrency },
|
|
40
43
|
setup () {
|
|
@@ -51,6 +54,7 @@ export const UsdSymbol: Story = {
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
export const EurCodeDisplay: Story = {
|
|
57
|
+
parameters: noControls,
|
|
54
58
|
render: () => ({
|
|
55
59
|
components: { InputCurrency },
|
|
56
60
|
setup () {
|
|
@@ -67,6 +71,7 @@ export const EurCodeDisplay: Story = {
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
export const CadSymbol: Story = {
|
|
74
|
+
parameters: noControls,
|
|
70
75
|
render: () => ({
|
|
71
76
|
components: { InputCurrency },
|
|
72
77
|
setup () {
|
|
@@ -83,6 +88,7 @@ export const CadSymbol: Story = {
|
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
export const CadNarrowSymbol: Story = {
|
|
91
|
+
parameters: noControls,
|
|
86
92
|
render: () => ({
|
|
87
93
|
components: { InputCurrency },
|
|
88
94
|
setup () {
|
|
@@ -99,6 +105,7 @@ export const CadNarrowSymbol: Story = {
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
export const JpyNameDisplay: Story = {
|
|
108
|
+
parameters: noControls,
|
|
102
109
|
render: () => ({
|
|
103
110
|
components: { InputCurrency },
|
|
104
111
|
setup () {
|
|
@@ -40,9 +40,12 @@ const meta = {
|
|
|
40
40
|
export default meta
|
|
41
41
|
type Story = StoryObj<typeof meta>
|
|
42
42
|
|
|
43
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
44
|
+
|
|
43
45
|
export const Default: Story = {}
|
|
44
46
|
|
|
45
47
|
export const WithMinMax: Story = {
|
|
48
|
+
parameters: noControls,
|
|
46
49
|
render: () => ({
|
|
47
50
|
components: { InputNumber },
|
|
48
51
|
setup () {
|
|
@@ -59,6 +62,7 @@ export const WithMinMax: Story = {
|
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
export const CustomStep: Story = {
|
|
65
|
+
parameters: noControls,
|
|
62
66
|
render: () => ({
|
|
63
67
|
components: { InputNumber },
|
|
64
68
|
setup () {
|
|
@@ -75,6 +79,7 @@ export const CustomStep: Story = {
|
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
export const WithoutButtons: Story = {
|
|
82
|
+
parameters: noControls,
|
|
78
83
|
render: () => ({
|
|
79
84
|
components: { InputNumber },
|
|
80
85
|
setup () {
|
|
@@ -90,6 +95,7 @@ export const WithoutButtons: Story = {
|
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
export const Disabled: Story = {
|
|
98
|
+
parameters: noControls,
|
|
93
99
|
render: () => ({
|
|
94
100
|
components: { InputNumber },
|
|
95
101
|
setup () {
|
|
@@ -105,6 +111,7 @@ export const Disabled: Story = {
|
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
export const Invalid: Story = {
|
|
114
|
+
parameters: noControls,
|
|
108
115
|
render: () => ({
|
|
109
116
|
components: { InputNumber },
|
|
110
117
|
setup () {
|
|
@@ -20,9 +20,12 @@ const meta = {
|
|
|
20
20
|
export default meta
|
|
21
21
|
type Story = StoryObj<typeof meta>
|
|
22
22
|
|
|
23
|
+
const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
24
|
+
|
|
23
25
|
export const Default: Story = {}
|
|
24
26
|
|
|
25
27
|
export const CustomSize: Story = {
|
|
28
|
+
parameters: noControls,
|
|
26
29
|
render: () => ({
|
|
27
30
|
components: { Loading },
|
|
28
31
|
template: `
|