@nuxt/ui 3.2.0 → 3.3.0
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/.nuxt/ui/button.ts +42 -42
- package/.nuxt/ui/command-palette.ts +2 -1
- package/.nuxt/ui/file-upload.ts +290 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/kbd.ts +167 -3
- package/.nuxt/ui/table.ts +8 -0
- package/.nuxt/ui/tabs.ts +4 -2
- package/.nuxt/ui/toast.ts +8 -15
- package/.nuxt/ui/tooltip.ts +1 -1
- package/cli/templates.mjs +4 -3
- package/dist/module.d.mts +15 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +2 -2
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
- package/dist/runtime/components/Button.vue +6 -6
- package/dist/runtime/components/Button.vue.d.ts +1 -5
- package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue.d.ts +1 -1
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +18 -14
- package/dist/runtime/components/Carousel.vue.d.ts +1 -1
- package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/ColorPicker.vue +1 -2
- package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue +4 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +6 -1
- package/dist/runtime/components/Container.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +1 -1
- package/dist/runtime/components/Drawer.vue +4 -4
- package/dist/runtime/components/Drawer.vue.d.ts +6 -1
- package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
- package/dist/runtime/components/FileUpload.vue +242 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
- package/dist/runtime/components/Form.vue.d.ts +6 -5
- package/dist/runtime/components/FormField.vue +2 -2
- package/dist/runtime/components/FormField.vue.d.ts +4 -4
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.vue +10 -7
- package/dist/runtime/components/Input.vue.d.ts +9 -9
- package/dist/runtime/components/InputMenu.vue +17 -10
- package/dist/runtime/components/InputMenu.vue.d.ts +15 -12
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -4
- package/dist/runtime/components/InputTags.vue +2 -0
- package/dist/runtime/components/InputTags.vue.d.ts +5 -3
- package/dist/runtime/components/Kbd.vue +2 -1
- package/dist/runtime/components/Kbd.vue.d.ts +5 -1
- package/dist/runtime/components/Link.vue +6 -5
- package/dist/runtime/components/Link.vue.d.ts +1 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/NavigationMenu.vue +3 -2
- package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
- package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/PinInput.vue.d.ts +1 -1
- package/dist/runtime/components/Popover.vue +2 -1
- package/dist/runtime/components/Popover.vue.d.ts +8 -2
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
- package/dist/runtime/components/Select.vue.d.ts +1 -1
- package/dist/runtime/components/SelectMenu.vue +9 -6
- package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +1 -1
- package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/Slideover.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue.d.ts +5 -5
- package/dist/runtime/components/Stepper.vue.d.ts +1 -1
- package/dist/runtime/components/Switch.vue.d.ts +1 -1
- package/dist/runtime/components/Table.vue +83 -8
- package/dist/runtime/components/Table.vue.d.ts +20 -4
- package/dist/runtime/components/Tabs.vue +11 -2
- package/dist/runtime/components/Tabs.vue.d.ts +8 -3
- package/dist/runtime/components/Textarea.vue +10 -7
- package/dist/runtime/components/Textarea.vue.d.ts +10 -9
- package/dist/runtime/components/Timeline.vue.d.ts +1 -1
- package/dist/runtime/components/Toast.vue +12 -4
- package/dist/runtime/components/Toast.vue.d.ts +14 -13
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue +2 -1
- package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
- package/dist/runtime/components/Tree.vue +3 -2
- package/dist/runtime/components/Tree.vue.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +5 -3
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFileUpload.d.ts +19 -0
- package/dist/runtime/composables/useFileUpload.js +63 -0
- package/dist/runtime/composables/useFormField.d.ts +3 -6
- package/dist/runtime/composables/useFormField.js +5 -2
- package/dist/runtime/composables/useKbd.d.ts +1 -1
- package/dist/runtime/composables/useLocale.js +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +28 -1
- package/dist/runtime/composables/useOverlay.js +4 -4
- package/dist/runtime/composables/usePortal.d.ts +1 -1
- package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/inertia/stubs.d.ts +1 -0
- package/dist/runtime/inertia/stubs.js +4 -2
- package/dist/runtime/locale/ar.js +2 -1
- package/dist/runtime/locale/az.js +1 -0
- package/dist/runtime/locale/bg.js +1 -0
- package/dist/runtime/locale/bn.js +1 -0
- package/dist/runtime/locale/ca.js +1 -0
- package/dist/runtime/locale/ckb.js +2 -1
- package/dist/runtime/locale/cs.js +1 -0
- package/dist/runtime/locale/da.js +1 -0
- package/dist/runtime/locale/de.js +1 -0
- package/dist/runtime/locale/el.js +1 -0
- package/dist/runtime/locale/en.js +1 -0
- package/dist/runtime/locale/es.js +1 -0
- package/dist/runtime/locale/et.js +1 -0
- package/dist/runtime/locale/fa_ir.js +1 -0
- package/dist/runtime/locale/fi.js +1 -0
- package/dist/runtime/locale/fr.js +1 -0
- package/dist/runtime/locale/he.js +1 -0
- package/dist/runtime/locale/hi.js +2 -1
- package/dist/runtime/locale/hu.js +1 -0
- package/dist/runtime/locale/hy.js +1 -0
- package/dist/runtime/locale/id.js +1 -0
- package/dist/runtime/locale/it.js +1 -0
- package/dist/runtime/locale/ja.js +1 -0
- package/dist/runtime/locale/kk.js +1 -0
- package/dist/runtime/locale/km.js +2 -1
- package/dist/runtime/locale/ko.js +1 -0
- package/dist/runtime/locale/ky.js +1 -0
- package/dist/runtime/locale/lb.js +1 -0
- package/dist/runtime/locale/lt.js +1 -0
- package/dist/runtime/locale/mn.js +1 -0
- package/dist/runtime/locale/ms.js +1 -0
- package/dist/runtime/locale/nb_no.js +1 -0
- package/dist/runtime/locale/nl.js +1 -0
- package/dist/runtime/locale/pl.js +1 -0
- package/dist/runtime/locale/pt.js +1 -0
- package/dist/runtime/locale/pt_br.js +1 -0
- package/dist/runtime/locale/ro.js +1 -0
- package/dist/runtime/locale/ru.js +1 -0
- package/dist/runtime/locale/sk.js +1 -0
- package/dist/runtime/locale/sl.js +1 -0
- package/dist/runtime/locale/sv.js +1 -0
- package/dist/runtime/locale/th.js +1 -0
- package/dist/runtime/locale/tj.js +1 -0
- package/dist/runtime/locale/tr.js +1 -0
- package/dist/runtime/locale/ug_cn.js +1 -0
- package/dist/runtime/locale/uk.js +1 -0
- package/dist/runtime/locale/ur.js +1 -0
- package/dist/runtime/locale/uz.js +1 -0
- package/dist/runtime/locale/vi.js +1 -0
- package/dist/runtime/locale/zh_cn.js +1 -0
- package/dist/runtime/locale/zh_tw.js +1 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/locale.d.ts +1 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +9 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +1 -0
- package/dist/runtime/vue/stubs.js +3 -1
- package/dist/shared/{ui.BPVxSPGY.mjs → ui.BkSj2DmF.mjs} +278 -29
- package/dist/unplugin.d.mts +2 -0
- package/dist/unplugin.mjs +6 -3
- package/dist/vite.mjs +1 -1
- package/package.json +24 -24
package/.nuxt/ui/kbd.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
const color = [
|
|
2
|
+
"primary",
|
|
3
|
+
"secondary",
|
|
4
|
+
"success",
|
|
5
|
+
"info",
|
|
6
|
+
"warning",
|
|
7
|
+
"error",
|
|
8
|
+
"neutral"
|
|
9
|
+
] as const
|
|
10
|
+
|
|
1
11
|
const variant = [
|
|
2
12
|
"solid",
|
|
3
13
|
"outline",
|
|
14
|
+
"soft",
|
|
4
15
|
"subtle"
|
|
5
16
|
] as const
|
|
6
17
|
|
|
@@ -13,10 +24,20 @@ const size = [
|
|
|
13
24
|
export default {
|
|
14
25
|
"base": "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",
|
|
15
26
|
"variants": {
|
|
27
|
+
"color": {
|
|
28
|
+
"primary": "",
|
|
29
|
+
"secondary": "",
|
|
30
|
+
"success": "",
|
|
31
|
+
"info": "",
|
|
32
|
+
"warning": "",
|
|
33
|
+
"error": "",
|
|
34
|
+
"neutral": ""
|
|
35
|
+
},
|
|
16
36
|
"variant": {
|
|
17
|
-
"solid": "
|
|
18
|
-
"outline": "
|
|
19
|
-
"
|
|
37
|
+
"solid": "",
|
|
38
|
+
"outline": "",
|
|
39
|
+
"soft": "",
|
|
40
|
+
"subtle": ""
|
|
20
41
|
},
|
|
21
42
|
"size": {
|
|
22
43
|
"sm": "h-4 min-w-[16px] text-[10px]",
|
|
@@ -24,8 +45,151 @@ export default {
|
|
|
24
45
|
"lg": "h-6 min-w-[24px] text-[12px]"
|
|
25
46
|
}
|
|
26
47
|
},
|
|
48
|
+
"compoundVariants": [
|
|
49
|
+
{
|
|
50
|
+
"color": "primary" as typeof color[number],
|
|
51
|
+
"variant": "solid" as typeof variant[number],
|
|
52
|
+
"class": "text-inverted bg-primary"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"color": "secondary" as typeof color[number],
|
|
56
|
+
"variant": "solid" as typeof variant[number],
|
|
57
|
+
"class": "text-inverted bg-secondary"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"color": "success" as typeof color[number],
|
|
61
|
+
"variant": "solid" as typeof variant[number],
|
|
62
|
+
"class": "text-inverted bg-success"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"color": "info" as typeof color[number],
|
|
66
|
+
"variant": "solid" as typeof variant[number],
|
|
67
|
+
"class": "text-inverted bg-info"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"color": "warning" as typeof color[number],
|
|
71
|
+
"variant": "solid" as typeof variant[number],
|
|
72
|
+
"class": "text-inverted bg-warning"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"color": "error" as typeof color[number],
|
|
76
|
+
"variant": "solid" as typeof variant[number],
|
|
77
|
+
"class": "text-inverted bg-error"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"color": "primary" as typeof color[number],
|
|
81
|
+
"variant": "outline" as typeof variant[number],
|
|
82
|
+
"class": "ring ring-inset ring-primary/50 text-primary"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"color": "secondary" as typeof color[number],
|
|
86
|
+
"variant": "outline" as typeof variant[number],
|
|
87
|
+
"class": "ring ring-inset ring-secondary/50 text-secondary"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"color": "success" as typeof color[number],
|
|
91
|
+
"variant": "outline" as typeof variant[number],
|
|
92
|
+
"class": "ring ring-inset ring-success/50 text-success"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"color": "info" as typeof color[number],
|
|
96
|
+
"variant": "outline" as typeof variant[number],
|
|
97
|
+
"class": "ring ring-inset ring-info/50 text-info"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"color": "warning" as typeof color[number],
|
|
101
|
+
"variant": "outline" as typeof variant[number],
|
|
102
|
+
"class": "ring ring-inset ring-warning/50 text-warning"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"color": "error" as typeof color[number],
|
|
106
|
+
"variant": "outline" as typeof variant[number],
|
|
107
|
+
"class": "ring ring-inset ring-error/50 text-error"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"color": "primary" as typeof color[number],
|
|
111
|
+
"variant": "soft" as typeof variant[number],
|
|
112
|
+
"class": "text-primary bg-primary/10"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"color": "secondary" as typeof color[number],
|
|
116
|
+
"variant": "soft" as typeof variant[number],
|
|
117
|
+
"class": "text-secondary bg-secondary/10"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"color": "success" as typeof color[number],
|
|
121
|
+
"variant": "soft" as typeof variant[number],
|
|
122
|
+
"class": "text-success bg-success/10"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"color": "info" as typeof color[number],
|
|
126
|
+
"variant": "soft" as typeof variant[number],
|
|
127
|
+
"class": "text-info bg-info/10"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"color": "warning" as typeof color[number],
|
|
131
|
+
"variant": "soft" as typeof variant[number],
|
|
132
|
+
"class": "text-warning bg-warning/10"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"color": "error" as typeof color[number],
|
|
136
|
+
"variant": "soft" as typeof variant[number],
|
|
137
|
+
"class": "text-error bg-error/10"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"color": "primary" as typeof color[number],
|
|
141
|
+
"variant": "subtle" as typeof variant[number],
|
|
142
|
+
"class": "text-primary ring ring-inset ring-primary/25 bg-primary/10"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"color": "secondary" as typeof color[number],
|
|
146
|
+
"variant": "subtle" as typeof variant[number],
|
|
147
|
+
"class": "text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"color": "success" as typeof color[number],
|
|
151
|
+
"variant": "subtle" as typeof variant[number],
|
|
152
|
+
"class": "text-success ring ring-inset ring-success/25 bg-success/10"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"color": "info" as typeof color[number],
|
|
156
|
+
"variant": "subtle" as typeof variant[number],
|
|
157
|
+
"class": "text-info ring ring-inset ring-info/25 bg-info/10"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"color": "warning" as typeof color[number],
|
|
161
|
+
"variant": "subtle" as typeof variant[number],
|
|
162
|
+
"class": "text-warning ring ring-inset ring-warning/25 bg-warning/10"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"color": "error" as typeof color[number],
|
|
166
|
+
"variant": "subtle" as typeof variant[number],
|
|
167
|
+
"class": "text-error ring ring-inset ring-error/25 bg-error/10"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"color": "neutral" as typeof color[number],
|
|
171
|
+
"variant": "solid" as typeof variant[number],
|
|
172
|
+
"class": "text-inverted bg-inverted"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"color": "neutral" as typeof color[number],
|
|
176
|
+
"variant": "outline" as typeof variant[number],
|
|
177
|
+
"class": "ring ring-inset ring-accented text-default bg-default"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"color": "neutral" as typeof color[number],
|
|
181
|
+
"variant": "soft" as typeof variant[number],
|
|
182
|
+
"class": "text-default bg-elevated"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"color": "neutral" as typeof color[number],
|
|
186
|
+
"variant": "subtle" as typeof variant[number],
|
|
187
|
+
"class": "ring ring-inset ring-accented text-default bg-elevated"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
27
190
|
"defaultVariants": {
|
|
28
191
|
"variant": "outline" as typeof variant[number],
|
|
192
|
+
"color": "neutral" as typeof color[number],
|
|
29
193
|
"size": "md" as typeof size[number]
|
|
30
194
|
}
|
|
31
195
|
}
|
package/.nuxt/ui/table.ts
CHANGED
|
@@ -22,6 +22,7 @@ export default {
|
|
|
22
22
|
"caption": "sr-only",
|
|
23
23
|
"thead": "relative",
|
|
24
24
|
"tbody": "divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
|
|
25
|
+
"tfoot": "relative",
|
|
25
26
|
"tr": "data-[selected=true]:bg-elevated/50",
|
|
26
27
|
"th": "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
27
28
|
"td": "p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",
|
|
@@ -38,7 +39,14 @@ export default {
|
|
|
38
39
|
},
|
|
39
40
|
"sticky": {
|
|
40
41
|
"true": {
|
|
42
|
+
"thead": "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur",
|
|
43
|
+
"tfoot": "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
|
|
44
|
+
},
|
|
45
|
+
"header": {
|
|
41
46
|
"thead": "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
|
|
47
|
+
},
|
|
48
|
+
"footer": {
|
|
49
|
+
"tfoot": "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
|
|
42
50
|
}
|
|
43
51
|
},
|
|
44
52
|
"loading": {
|
package/.nuxt/ui/tabs.ts
CHANGED
|
@@ -35,11 +35,13 @@ export default {
|
|
|
35
35
|
"group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75",
|
|
36
36
|
"transition-colors"
|
|
37
37
|
],
|
|
38
|
-
"content": "focus:outline-none w-full",
|
|
39
38
|
"leadingIcon": "shrink-0",
|
|
40
39
|
"leadingAvatar": "shrink-0",
|
|
41
40
|
"leadingAvatarSize": "",
|
|
42
|
-
"label": "truncate"
|
|
41
|
+
"label": "truncate",
|
|
42
|
+
"trailingBadge": "shrink-0",
|
|
43
|
+
"trailingBadgeSize": "sm",
|
|
44
|
+
"content": "focus:outline-none w-full"
|
|
43
45
|
},
|
|
44
46
|
"variants": {
|
|
45
47
|
"color": {
|
package/.nuxt/ui/toast.ts
CHANGED
|
@@ -18,45 +18,38 @@ export default {
|
|
|
18
18
|
"avatar": "shrink-0",
|
|
19
19
|
"avatarSize": "2xl",
|
|
20
20
|
"actions": "flex gap-1.5 shrink-0",
|
|
21
|
-
"progress": "absolute inset-x-0 bottom-0
|
|
21
|
+
"progress": "absolute inset-x-0 bottom-0",
|
|
22
22
|
"close": "p-0"
|
|
23
23
|
},
|
|
24
24
|
"variants": {
|
|
25
25
|
"color": {
|
|
26
26
|
"primary": {
|
|
27
27
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",
|
|
28
|
-
"icon": "text-primary"
|
|
29
|
-
"progress": "bg-primary"
|
|
28
|
+
"icon": "text-primary"
|
|
30
29
|
},
|
|
31
30
|
"secondary": {
|
|
32
31
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary",
|
|
33
|
-
"icon": "text-secondary"
|
|
34
|
-
"progress": "bg-secondary"
|
|
32
|
+
"icon": "text-secondary"
|
|
35
33
|
},
|
|
36
34
|
"success": {
|
|
37
35
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success",
|
|
38
|
-
"icon": "text-success"
|
|
39
|
-
"progress": "bg-success"
|
|
36
|
+
"icon": "text-success"
|
|
40
37
|
},
|
|
41
38
|
"info": {
|
|
42
39
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info",
|
|
43
|
-
"icon": "text-info"
|
|
44
|
-
"progress": "bg-info"
|
|
40
|
+
"icon": "text-info"
|
|
45
41
|
},
|
|
46
42
|
"warning": {
|
|
47
43
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning",
|
|
48
|
-
"icon": "text-warning"
|
|
49
|
-
"progress": "bg-warning"
|
|
44
|
+
"icon": "text-warning"
|
|
50
45
|
},
|
|
51
46
|
"error": {
|
|
52
47
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error",
|
|
53
|
-
"icon": "text-error"
|
|
54
|
-
"progress": "bg-error"
|
|
48
|
+
"icon": "text-error"
|
|
55
49
|
},
|
|
56
50
|
"neutral": {
|
|
57
51
|
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted",
|
|
58
|
-
"icon": "text-highlighted"
|
|
59
|
-
"progress": "bg-inverted"
|
|
52
|
+
"icon": "text-highlighted"
|
|
60
53
|
}
|
|
61
54
|
},
|
|
62
55
|
"orientation": {
|
package/.nuxt/ui/tooltip.ts
CHANGED
|
@@ -3,7 +3,7 @@ export default {
|
|
|
3
3
|
"content": "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",
|
|
4
4
|
"arrow": "fill-default",
|
|
5
5
|
"text": "truncate",
|
|
6
|
-
"kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['·'] before:me-0.5",
|
|
6
|
+
"kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['·'] not-first-of-type:before:me-0.5",
|
|
7
7
|
"kbdsSize": "sm"
|
|
8
8
|
}
|
|
9
9
|
}
|
package/cli/templates.mjs
CHANGED
|
@@ -35,7 +35,7 @@ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
|
|
|
35
35
|
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
|
|
36
36
|
${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
|
|
37
37
|
|
|
38
|
-
type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${
|
|
38
|
+
type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
|
|
39
39
|
|
|
40
40
|
export interface ${upperName}Props {
|
|
41
41
|
/**
|
|
@@ -80,7 +80,7 @@ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
|
|
|
80
80
|
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
|
|
81
81
|
${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
|
|
82
82
|
|
|
83
|
-
type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${
|
|
83
|
+
type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
|
|
84
84
|
|
|
85
85
|
export interface ${upperName}Props extends Pick<${upperName}RootProps> {
|
|
86
86
|
class?: any
|
|
@@ -147,7 +147,8 @@ const test = ({ name, prose, content }) => {
|
|
|
147
147
|
? undefined
|
|
148
148
|
: `
|
|
149
149
|
import { describe, it, expect } from 'vitest'
|
|
150
|
-
import ${upperName}
|
|
150
|
+
import ${upperName} from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue'
|
|
151
|
+
import type { ${upperName}Props, ${upperName}Slots } from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue'
|
|
151
152
|
import ComponentRender from '../${content ? '../' : ''}component-render'
|
|
152
153
|
|
|
153
154
|
describe('${upperName}', () => {
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
export * from '../dist/runtime/types/index.js';
|
|
3
3
|
|
|
4
|
+
type Color = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | (string & {});
|
|
5
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
|
|
4
6
|
interface ModuleOptions {
|
|
5
7
|
/**
|
|
6
8
|
* Prefix for components
|
|
@@ -30,13 +32,25 @@ interface ModuleOptions {
|
|
|
30
32
|
* @defaultValue `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
|
|
31
33
|
* @link https://ui.nuxt.com/getting-started/installation/nuxt#themecolors
|
|
32
34
|
*/
|
|
33
|
-
colors?:
|
|
35
|
+
colors?: Color[];
|
|
34
36
|
/**
|
|
35
37
|
* Enable or disable transitions on components
|
|
36
38
|
* @defaultValue `true`
|
|
37
39
|
* @link https://ui.nuxt.com/getting-started/installation/nuxt#themetransitions
|
|
38
40
|
*/
|
|
39
41
|
transitions?: boolean;
|
|
42
|
+
defaultVariants?: {
|
|
43
|
+
/**
|
|
44
|
+
* The default color variant to use for components
|
|
45
|
+
* @defaultValue `'primary'`
|
|
46
|
+
*/
|
|
47
|
+
color?: Color;
|
|
48
|
+
/**
|
|
49
|
+
* The default size variant to use for components
|
|
50
|
+
* @defaultValue `'md'`
|
|
51
|
+
*/
|
|
52
|
+
size?: Size;
|
|
53
|
+
};
|
|
40
54
|
};
|
|
41
55
|
}
|
|
42
56
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defu } from 'defu';
|
|
2
2
|
import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
|
|
3
|
-
import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.
|
|
3
|
+
import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.BkSj2DmF.mjs';
|
|
4
4
|
import '../dist/runtime/utils/index.js';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'scule';
|
|
@@ -8,7 +8,7 @@ import 'tailwindcss/colors';
|
|
|
8
8
|
import 'knitwork';
|
|
9
9
|
|
|
10
10
|
const name = "@nuxt/ui";
|
|
11
|
-
const version = "3.
|
|
11
|
+
const version = "3.3.0";
|
|
12
12
|
|
|
13
13
|
const module = defineNuxtModule({
|
|
14
14
|
meta: {
|
|
@@ -38,7 +38,7 @@ const module = defineNuxtModule({
|
|
|
38
38
|
}
|
|
39
39
|
async function registerModule(name2, key, options2) {
|
|
40
40
|
if (!hasNuxtModule(name2)) {
|
|
41
|
-
await installModule(name2, options2);
|
|
41
|
+
await installModule(name2, defu(nuxt.options[key], options2));
|
|
42
42
|
} else {
|
|
43
43
|
nuxt.options[key] = defu(nuxt.options[key], options2);
|
|
44
44
|
}
|
|
@@ -53,7 +53,7 @@ export interface AlertProps {
|
|
|
53
53
|
ui?: Alert['slots'];
|
|
54
54
|
}
|
|
55
55
|
export interface AlertEmits {
|
|
56
|
-
|
|
56
|
+
'update:open': [value: boolean];
|
|
57
57
|
}
|
|
58
58
|
export interface AlertSlots {
|
|
59
59
|
leading(props?: {}): any;
|
|
@@ -66,7 +66,7 @@ export interface AlertSlots {
|
|
|
66
66
|
};
|
|
67
67
|
}): any;
|
|
68
68
|
}
|
|
69
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps,
|
|
69
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
70
70
|
"update:open": (value: boolean) => any;
|
|
71
71
|
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
72
72
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
@@ -28,7 +28,7 @@ export interface AvatarProps {
|
|
|
28
28
|
export interface AvatarSlots {
|
|
29
29
|
default(props?: {}): any;
|
|
30
30
|
}
|
|
31
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps,
|
|
31
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
32
32
|
as: any;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
34
34
|
default?: (props: {}) => any;
|
|
@@ -22,7 +22,7 @@ export interface AvatarGroupProps {
|
|
|
22
22
|
export interface AvatarGroupSlots {
|
|
23
23
|
default(props?: {}): any;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps,
|
|
25
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
|
|
26
26
|
export default _default;
|
|
27
27
|
type __VLS_WithSlots<T, S> = T & {
|
|
28
28
|
new (): {
|
|
@@ -32,7 +32,7 @@ export interface BadgeSlots {
|
|
|
32
32
|
default(props?: {}): any;
|
|
33
33
|
trailing(props?: {}): any;
|
|
34
34
|
}
|
|
35
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps,
|
|
35
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
36
36
|
as: any;
|
|
37
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
|
|
38
38
|
export default _default;
|
|
@@ -10,7 +10,7 @@ import { useAppConfig } from "#imports";
|
|
|
10
10
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
11
11
|
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
12
12
|
import { formLoadingInjectionKey } from "../composables/useFormField";
|
|
13
|
-
import { omit } from "../utils";
|
|
13
|
+
import { omit, mergeClasses } from "../utils";
|
|
14
14
|
import { tv } from "../utils/tv";
|
|
15
15
|
import { pickLinkProps } from "../utils/link";
|
|
16
16
|
import UIcon from "./Icon.vue";
|
|
@@ -41,11 +41,11 @@ const props = defineProps({
|
|
|
41
41
|
as: { type: null, required: false },
|
|
42
42
|
type: { type: null, required: false },
|
|
43
43
|
disabled: { type: Boolean, required: false },
|
|
44
|
-
active: { type: Boolean, required: false
|
|
44
|
+
active: { type: Boolean, required: false },
|
|
45
45
|
exact: { type: Boolean, required: false },
|
|
46
46
|
exactQuery: { type: [Boolean, String], required: false },
|
|
47
47
|
exactHash: { type: Boolean, required: false },
|
|
48
|
-
inactiveClass: { type: String, required: false
|
|
48
|
+
inactiveClass: { type: String, required: false },
|
|
49
49
|
to: { type: null, required: false },
|
|
50
50
|
href: { type: null, required: false },
|
|
51
51
|
external: { type: Boolean, required: false },
|
|
@@ -56,7 +56,7 @@ const props = defineProps({
|
|
|
56
56
|
prefetch: { type: Boolean, required: false },
|
|
57
57
|
prefetchOn: { type: [String, Object], required: false },
|
|
58
58
|
noPrefetch: { type: Boolean, required: false },
|
|
59
|
-
activeClass: { type: String, required: false
|
|
59
|
+
activeClass: { type: String, required: false },
|
|
60
60
|
exactActiveClass: { type: String, required: false },
|
|
61
61
|
ariaCurrentValue: { type: String, required: false },
|
|
62
62
|
viewTransition: { type: Boolean, required: false },
|
|
@@ -89,10 +89,10 @@ const ui = computed(() => tv({
|
|
|
89
89
|
variants: {
|
|
90
90
|
active: {
|
|
91
91
|
true: {
|
|
92
|
-
base: props.activeClass
|
|
92
|
+
base: mergeClasses(appConfig.ui?.button?.variants?.active?.true?.base, props.activeClass)
|
|
93
93
|
},
|
|
94
94
|
false: {
|
|
95
|
-
base: props.inactiveClass
|
|
95
|
+
base: mergeClasses(appConfig.ui?.button?.variants?.active?.false?.base, props.inactiveClass)
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -35,11 +35,7 @@ export interface ButtonSlots {
|
|
|
35
35
|
default(props?: {}): any;
|
|
36
36
|
trailing(props?: {}): any;
|
|
37
37
|
}
|
|
38
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps,
|
|
39
|
-
activeClass: string;
|
|
40
|
-
active: boolean;
|
|
41
|
-
inactiveClass: string;
|
|
42
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
38
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
43
39
|
export default _default;
|
|
44
40
|
type __VLS_WithSlots<T, S> = T & {
|
|
45
41
|
new (): {
|
|
@@ -23,7 +23,7 @@ export interface ButtonGroupProps {
|
|
|
23
23
|
export interface ButtonGroupSlots {
|
|
24
24
|
default(props?: {}): any;
|
|
25
25
|
}
|
|
26
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps,
|
|
26
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
27
27
|
orientation: ButtonGroup["variants"]["orientation"];
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
|
|
29
29
|
export default _default;
|
|
@@ -20,7 +20,7 @@ export interface CardSlots {
|
|
|
20
20
|
default(props?: {}): any;
|
|
21
21
|
footer(props?: {}): any;
|
|
22
22
|
}
|
|
23
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps,
|
|
23
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CardSlots>;
|
|
24
24
|
export default _default;
|
|
25
25
|
type __VLS_WithSlots<T, S> = T & {
|
|
26
26
|
new (): {
|
|
@@ -6,7 +6,7 @@ import theme from "#build/ui/carousel";
|
|
|
6
6
|
import { computed, ref, watch, onMounted } from "vue";
|
|
7
7
|
import useEmblaCarousel from "embla-carousel-vue";
|
|
8
8
|
import { Primitive, useForwardProps } from "reka-ui";
|
|
9
|
-
import { reactivePick
|
|
9
|
+
import { reactivePick } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
11
|
import { useLocale } from "../composables/useLocale";
|
|
12
12
|
import { tv } from "../utils/tv";
|
|
@@ -62,34 +62,36 @@ const options = computed(() => ({
|
|
|
62
62
|
axis: props.orientation === "horizontal" ? "x" : "y",
|
|
63
63
|
direction: dir.value === "rtl" ? "rtl" : "ltr"
|
|
64
64
|
}));
|
|
65
|
-
const plugins =
|
|
66
|
-
|
|
65
|
+
const plugins = ref([]);
|
|
66
|
+
async function loadPlugins() {
|
|
67
|
+
const emblaPlugins = [];
|
|
67
68
|
if (props.autoplay) {
|
|
68
69
|
const AutoplayPlugin = await import("embla-carousel-autoplay").then((r) => r.default);
|
|
69
|
-
|
|
70
|
+
emblaPlugins.push(AutoplayPlugin(typeof props.autoplay === "boolean" ? {} : props.autoplay));
|
|
70
71
|
}
|
|
71
72
|
if (props.autoScroll) {
|
|
72
73
|
const AutoScrollPlugin = await import("embla-carousel-auto-scroll").then((r) => r.default);
|
|
73
|
-
|
|
74
|
+
emblaPlugins.push(AutoScrollPlugin(typeof props.autoScroll === "boolean" ? {} : props.autoScroll));
|
|
74
75
|
}
|
|
75
76
|
if (props.autoHeight) {
|
|
76
77
|
const AutoHeightPlugin = await import("embla-carousel-auto-height").then((r) => r.default);
|
|
77
|
-
|
|
78
|
+
emblaPlugins.push(AutoHeightPlugin(typeof props.autoHeight === "boolean" ? {} : props.autoHeight));
|
|
78
79
|
}
|
|
79
80
|
if (props.classNames) {
|
|
80
81
|
const ClassNamesPlugin = await import("embla-carousel-class-names").then((r) => r.default);
|
|
81
|
-
|
|
82
|
+
emblaPlugins.push(ClassNamesPlugin(typeof props.classNames === "boolean" ? {} : props.classNames));
|
|
82
83
|
}
|
|
83
84
|
if (props.fade) {
|
|
84
85
|
const FadePlugin = await import("embla-carousel-fade").then((r) => r.default);
|
|
85
|
-
|
|
86
|
+
emblaPlugins.push(FadePlugin(typeof props.fade === "boolean" ? {} : props.fade));
|
|
86
87
|
}
|
|
87
88
|
if (props.wheelGestures) {
|
|
88
89
|
const { WheelGesturesPlugin } = await import("embla-carousel-wheel-gestures");
|
|
89
|
-
|
|
90
|
+
emblaPlugins.push(WheelGesturesPlugin(typeof props.wheelGestures === "boolean" ? {} : props.wheelGestures));
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
-
}
|
|
92
|
+
plugins.value = emblaPlugins;
|
|
93
|
+
}
|
|
94
|
+
watch(() => [props.autoplay, props.autoScroll, props.autoHeight, props.classNames, props.fade, props.wheelGestures], loadPlugins, { immediate: true });
|
|
93
95
|
const [emblaRef, emblaApi] = useEmblaCarousel(options.value, plugins.value);
|
|
94
96
|
watch([options, plugins], () => {
|
|
95
97
|
emblaApi.value?.reInit(options.value, plugins.value);
|
|
@@ -162,8 +164,7 @@ defineExpose({
|
|
|
162
164
|
<div
|
|
163
165
|
v-for="(item, index) in items"
|
|
164
166
|
:key="index"
|
|
165
|
-
|
|
166
|
-
aria-roledescription="slide"
|
|
167
|
+
v-bind="dots ? { role: 'tabpanel' } : { 'role': 'group', 'aria-roledescription': 'slide' }"
|
|
167
168
|
:class="ui.item({ class: [props.ui?.item, isCarouselItem(item) && item.ui?.item, isCarouselItem(item) && item.class] })"
|
|
168
169
|
>
|
|
169
170
|
<slot :item="item" :index="index" />
|
|
@@ -195,10 +196,13 @@ defineExpose({
|
|
|
195
196
|
/>
|
|
196
197
|
</div>
|
|
197
198
|
|
|
198
|
-
<div v-if="dots" :class="ui.dots({ class: props.ui?.dots })">
|
|
199
|
+
<div v-if="dots" role="tablist" :aria-label="t('carousel.dots')" :class="ui.dots({ class: props.ui?.dots })">
|
|
199
200
|
<template v-for="(_, index) in scrollSnaps" :key="index">
|
|
200
201
|
<button
|
|
202
|
+
type="button"
|
|
203
|
+
role="tab"
|
|
201
204
|
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
|
205
|
+
:aria-selected="selectedIndex === index"
|
|
202
206
|
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
|
203
207
|
:data-state="selectedIndex === index ? 'active' : void 0"
|
|
204
208
|
@click="scrollTo(index)"
|