@nuxt/ui 3.1.2 → 3.1.3
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/checkbox-group.ts +1 -1
- package/.nuxt/ui/context-menu.ts +2 -1
- package/.nuxt/ui/dropdown-menu.ts +2 -1
- package/.nuxt/ui/input-menu.ts +2 -2
- package/.nuxt/ui/navigation-menu.ts +43 -34
- package/.nuxt/ui/radio-group.ts +1 -1
- package/.nuxt/ui/select-menu.ts +2 -2
- package/.nuxt/ui/select.ts +2 -2
- package/.nuxt/ui/tooltip.ts +1 -1
- package/.nuxt/ui.css +4 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/CommandPalette.vue +1 -1
- package/dist/runtime/components/ContextMenuContent.vue +58 -56
- package/dist/runtime/components/Drawer.vue +15 -1
- package/dist/runtime/components/DropdownMenuContent.vue +60 -58
- package/dist/runtime/components/Input.vue +1 -0
- package/dist/runtime/components/Input.vue.d.ts +7 -0
- package/dist/runtime/components/InputMenu.vue +3 -3
- package/dist/runtime/components/Modal.vue +2 -2
- package/dist/runtime/components/Modal.vue.d.ts +3 -0
- package/dist/runtime/components/NavigationMenu.vue +82 -24
- package/dist/runtime/components/NavigationMenu.vue.d.ts +30 -17
- package/dist/runtime/components/Popover.vue +4 -0
- package/dist/runtime/components/Popover.vue.d.ts +1 -0
- package/dist/runtime/components/Select.vue +3 -3
- package/dist/runtime/components/SelectMenu.vue +3 -3
- package/dist/runtime/components/Slideover.vue +9 -2
- package/dist/runtime/components/Slideover.vue.d.ts +3 -0
- package/dist/runtime/components/Textarea.vue +4 -1
- package/dist/runtime/components/Textarea.vue.d.ts +7 -1
- package/dist/runtime/locale/index.d.ts +6 -2
- package/dist/runtime/locale/index.js +6 -2
- package/dist/runtime/locale/ky.d.ts +3 -0
- package/dist/runtime/locale/ky.js +54 -0
- package/dist/runtime/locale/lt.d.ts +3 -0
- package/dist/runtime/locale/lt.js +54 -0
- package/dist/runtime/locale/mn.d.ts +3 -0
- package/dist/runtime/locale/mn.js +54 -0
- package/dist/runtime/locale/ms.d.ts +3 -0
- package/dist/runtime/locale/ms.js +54 -0
- package/dist/shared/{ui.BvUP-pSb.mjs → ui.Bix4DSU4.mjs} +51 -37
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +19 -19
|
@@ -127,7 +127,7 @@ export default {
|
|
|
127
127
|
"orientation": "horizontal" as typeof orientation[number],
|
|
128
128
|
"variant": "table" as typeof variant[number],
|
|
129
129
|
"class": {
|
|
130
|
-
"item": "first-of-type:rounded-
|
|
130
|
+
"item": "first-of-type:rounded-s-lg last-of-type:rounded-e-lg",
|
|
131
131
|
"fieldset": "gap-0 -space-x-px"
|
|
132
132
|
}
|
|
133
133
|
},
|
package/.nuxt/ui/context-menu.ts
CHANGED
|
@@ -18,7 +18,8 @@ const size = [
|
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
"slots": {
|
|
21
|
-
"content": "min-w-32 bg-default shadow-lg rounded-md ring ring-default
|
|
21
|
+
"content": "min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",
|
|
22
|
+
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
22
23
|
"group": "p-1 isolate",
|
|
23
24
|
"label": "w-full flex items-center font-semibold text-highlighted",
|
|
24
25
|
"separator": "-mx-1 my-1 h-px bg-border",
|
|
@@ -18,7 +18,8 @@ const size = [
|
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
"slots": {
|
|
21
|
-
"content": "min-w-32 bg-default shadow-lg rounded-md ring ring-default
|
|
21
|
+
"content": "min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",
|
|
22
|
+
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
22
23
|
"arrow": "fill-default",
|
|
23
24
|
"group": "p-1 isolate",
|
|
24
25
|
"label": "w-full flex items-center font-semibold text-highlighted",
|
package/.nuxt/ui/input-menu.ts
CHANGED
|
@@ -38,8 +38,8 @@ export default {
|
|
|
38
38
|
"trailing": "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
39
39
|
"trailingIcon": "shrink-0 text-dimmed",
|
|
40
40
|
"arrow": "fill-default",
|
|
41
|
-
"content": "max-h-60 w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto",
|
|
42
|
-
"viewport": "divide-y divide-default scroll-py-1",
|
|
41
|
+
"content": "max-h-60 w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",
|
|
42
|
+
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
43
43
|
"group": "p-1 isolate",
|
|
44
44
|
"empty": "py-2 text-center text-sm text-muted",
|
|
45
45
|
"label": "font-semibold text-highlighted",
|
|
@@ -43,24 +43,25 @@ export default {
|
|
|
43
43
|
"linkLeadingIcon": "shrink-0 size-5",
|
|
44
44
|
"linkLeadingAvatar": "shrink-0",
|
|
45
45
|
"linkLeadingAvatarSize": "2xs",
|
|
46
|
-
"linkTrailing": "ms-auto inline-flex gap-1.5 items-center",
|
|
46
|
+
"linkTrailing": "group ms-auto inline-flex gap-1.5 items-center",
|
|
47
47
|
"linkTrailingBadge": "shrink-0",
|
|
48
48
|
"linkTrailingBadgeSize": "sm",
|
|
49
49
|
"linkTrailingIcon": "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
50
50
|
"linkLabel": "truncate",
|
|
51
51
|
"linkLabelExternalIcon": "inline-block size-3 align-top text-dimmed",
|
|
52
|
-
"childList": "",
|
|
52
|
+
"childList": "isolate",
|
|
53
|
+
"childLabel": "text-xs text-highlighted",
|
|
53
54
|
"childItem": "",
|
|
54
|
-
"childLink": "group size-full
|
|
55
|
-
"childLinkWrapper": "
|
|
55
|
+
"childLink": "group relative size-full flex items-start text-start text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
56
|
+
"childLinkWrapper": "min-w-0",
|
|
56
57
|
"childLinkIcon": "size-5 shrink-0",
|
|
57
|
-
"childLinkLabel": "
|
|
58
|
+
"childLinkLabel": "truncate",
|
|
58
59
|
"childLinkLabelExternalIcon": "inline-block size-3 align-top text-dimmed",
|
|
59
|
-
"childLinkDescription": "text-
|
|
60
|
+
"childLinkDescription": "text-muted",
|
|
60
61
|
"separator": "px-2 h-px bg-border",
|
|
61
62
|
"viewportWrapper": "absolute top-full left-0 flex w-full",
|
|
62
63
|
"viewport": "relative overflow-hidden bg-default shadow-lg rounded-md ring ring-default h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] z-[1]",
|
|
63
|
-
"content": "
|
|
64
|
+
"content": "",
|
|
64
65
|
"indicator": "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[2] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
|
|
65
66
|
"arrow": "relative top-[50%] size-2.5 rotate-45 border border-default bg-default z-[1] rounded-xs"
|
|
66
67
|
},
|
|
@@ -68,31 +69,31 @@ export default {
|
|
|
68
69
|
"color": {
|
|
69
70
|
"primary": {
|
|
70
71
|
"link": "focus-visible:before:ring-primary",
|
|
71
|
-
"childLink": "focus-visible:
|
|
72
|
+
"childLink": "focus-visible:before:ring-primary"
|
|
72
73
|
},
|
|
73
74
|
"secondary": {
|
|
74
75
|
"link": "focus-visible:before:ring-secondary",
|
|
75
|
-
"childLink": "focus-visible:
|
|
76
|
+
"childLink": "focus-visible:before:ring-secondary"
|
|
76
77
|
},
|
|
77
78
|
"success": {
|
|
78
79
|
"link": "focus-visible:before:ring-success",
|
|
79
|
-
"childLink": "focus-visible:
|
|
80
|
+
"childLink": "focus-visible:before:ring-success"
|
|
80
81
|
},
|
|
81
82
|
"info": {
|
|
82
83
|
"link": "focus-visible:before:ring-info",
|
|
83
|
-
"childLink": "focus-visible:
|
|
84
|
+
"childLink": "focus-visible:before:ring-info"
|
|
84
85
|
},
|
|
85
86
|
"warning": {
|
|
86
87
|
"link": "focus-visible:before:ring-warning",
|
|
87
|
-
"childLink": "focus-visible:
|
|
88
|
+
"childLink": "focus-visible:before:ring-warning"
|
|
88
89
|
},
|
|
89
90
|
"error": {
|
|
90
91
|
"link": "focus-visible:before:ring-error",
|
|
91
|
-
"childLink": "focus-visible:
|
|
92
|
+
"childLink": "focus-visible:before:ring-error"
|
|
92
93
|
},
|
|
93
94
|
"neutral": {
|
|
94
95
|
"link": "focus-visible:before:ring-inverted",
|
|
95
|
-
"childLink": "focus-visible:
|
|
96
|
+
"childLink": "focus-visible:before:ring-inverted"
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
"highlightColor": {
|
|
@@ -114,11 +115,16 @@ export default {
|
|
|
114
115
|
"list": "flex items-center",
|
|
115
116
|
"item": "py-2",
|
|
116
117
|
"link": "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
117
|
-
"childList": "grid p-2"
|
|
118
|
+
"childList": "grid p-2",
|
|
119
|
+
"childLink": "px-3 py-2 gap-2 before:inset-x-px before:inset-y-0",
|
|
120
|
+
"childLinkLabel": "font-medium",
|
|
121
|
+
"content": "absolute top-0 left-0 w-full"
|
|
118
122
|
},
|
|
119
123
|
"vertical": {
|
|
120
124
|
"root": "flex-col",
|
|
121
|
-
"link": "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
125
|
+
"link": "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
|
|
126
|
+
"childLabel": "px-1.5 py-0.5",
|
|
127
|
+
"childLink": "p-1.5 gap-1.5 before:inset-y-px before:inset-x-0"
|
|
122
128
|
}
|
|
123
129
|
},
|
|
124
130
|
"contentOrientation": {
|
|
@@ -132,15 +138,15 @@ export default {
|
|
|
132
138
|
},
|
|
133
139
|
"active": {
|
|
134
140
|
"true": {
|
|
135
|
-
"childLink": "bg-elevated text-highlighted",
|
|
141
|
+
"childLink": "before:bg-elevated text-highlighted",
|
|
136
142
|
"childLinkIcon": "text-default"
|
|
137
143
|
},
|
|
138
144
|
"false": {
|
|
139
145
|
"link": "text-muted",
|
|
140
146
|
"linkLeadingIcon": "text-dimmed",
|
|
141
147
|
"childLink": [
|
|
142
|
-
"hover:bg-elevated/50 text-default hover:text-highlighted",
|
|
143
|
-
"transition-colors"
|
|
148
|
+
"hover:before:bg-elevated/50 text-default hover:text-highlighted",
|
|
149
|
+
"transition-colors before:transition-colors"
|
|
144
150
|
],
|
|
145
151
|
"childLinkIcon": [
|
|
146
152
|
"text-dimmed group-hover:text-default",
|
|
@@ -179,6 +185,23 @@ export default {
|
|
|
179
185
|
"content": "w-60"
|
|
180
186
|
}
|
|
181
187
|
},
|
|
188
|
+
{
|
|
189
|
+
"orientation": "vertical" as typeof orientation[number],
|
|
190
|
+
"collapsed": false,
|
|
191
|
+
"class": {
|
|
192
|
+
"childList": "ms-5 border-s border-default",
|
|
193
|
+
"childItem": "ps-1.5 -ms-px",
|
|
194
|
+
"content": "data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"orientation": "vertical" as typeof orientation[number],
|
|
199
|
+
"collapsed": true,
|
|
200
|
+
"class": {
|
|
201
|
+
"link": "px-1.5",
|
|
202
|
+
"content": "shadow-sm rounded-sm min-h-6 p-1"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
182
205
|
{
|
|
183
206
|
"orientation": "horizontal" as typeof orientation[number],
|
|
184
207
|
"highlight": true,
|
|
@@ -319,6 +342,7 @@ export default {
|
|
|
319
342
|
"variant": "pill" as typeof variant[number],
|
|
320
343
|
"active": true,
|
|
321
344
|
"highlight": true,
|
|
345
|
+
"disabled": false,
|
|
322
346
|
"class": {
|
|
323
347
|
"link": [
|
|
324
348
|
"hover:before:bg-elevated/50",
|
|
@@ -476,21 +500,6 @@ export default {
|
|
|
476
500
|
"class": {
|
|
477
501
|
"link": "after:bg-inverted"
|
|
478
502
|
}
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
"orientation": "vertical" as typeof orientation[number],
|
|
482
|
-
"collapsed": false,
|
|
483
|
-
"class": {
|
|
484
|
-
"childList": "ms-5 border-s border-default",
|
|
485
|
-
"childItem": "ps-1.5 -ms-px"
|
|
486
|
-
}
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"orientation": "vertical" as typeof orientation[number],
|
|
490
|
-
"collapsed": true,
|
|
491
|
-
"class": {
|
|
492
|
-
"link": "px-1.5"
|
|
493
|
-
}
|
|
494
503
|
}
|
|
495
504
|
],
|
|
496
505
|
"defaultVariants": {
|
package/.nuxt/ui/radio-group.ts
CHANGED
|
@@ -219,7 +219,7 @@ export default {
|
|
|
219
219
|
"orientation": "horizontal" as typeof orientation[number],
|
|
220
220
|
"variant": "table" as typeof variant[number],
|
|
221
221
|
"class": {
|
|
222
|
-
"item": "first-of-type:rounded-
|
|
222
|
+
"item": "first-of-type:rounded-s-lg last-of-type:rounded-e-lg",
|
|
223
223
|
"fieldset": "gap-0 -space-x-px"
|
|
224
224
|
}
|
|
225
225
|
},
|
package/.nuxt/ui/select-menu.ts
CHANGED
|
@@ -40,10 +40,10 @@ export default {
|
|
|
40
40
|
"placeholder": "truncate text-dimmed",
|
|
41
41
|
"arrow": "fill-default",
|
|
42
42
|
"content": [
|
|
43
|
-
"max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto",
|
|
43
|
+
"max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
|
|
44
44
|
"origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"
|
|
45
45
|
],
|
|
46
|
-
"viewport": "divide-y divide-default scroll-py-1",
|
|
46
|
+
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
47
47
|
"group": "p-1 isolate",
|
|
48
48
|
"empty": "py-2 text-center text-sm text-muted",
|
|
49
49
|
"label": "font-semibold text-highlighted",
|
package/.nuxt/ui/select.ts
CHANGED
|
@@ -39,8 +39,8 @@ export default {
|
|
|
39
39
|
"value": "truncate pointer-events-none",
|
|
40
40
|
"placeholder": "truncate text-dimmed",
|
|
41
41
|
"arrow": "fill-default",
|
|
42
|
-
"content": "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto",
|
|
43
|
-
"viewport": "divide-y divide-default scroll-py-1",
|
|
42
|
+
"content": "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
|
|
43
|
+
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
44
44
|
"group": "p-1 isolate",
|
|
45
45
|
"empty": "py-2 text-center text-sm text-muted",
|
|
46
46
|
"label": "font-semibold text-highlighted",
|
package/.nuxt/ui/tooltip.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"slots": {
|
|
3
|
-
"content": "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2 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",
|
|
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
6
|
"kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['·'] before:me-0.5",
|
package/.nuxt/ui.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@source "./ui";
|
|
2
2
|
|
|
3
|
-
@theme
|
|
3
|
+
@theme static {
|
|
4
4
|
--color-old-neutral-50: oklch(98.5% 0 0);
|
|
5
5
|
--color-old-neutral-100: oklch(97% 0 0);
|
|
6
6
|
--color-old-neutral-200: oklch(92.2% 0 0);
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
--color-old-neutral-800: oklch(26.9% 0 0);
|
|
13
13
|
--color-old-neutral-900: oklch(20.5% 0 0);
|
|
14
14
|
--color-old-neutral-950: oklch(14.5% 0 0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@theme default inline {
|
|
15
18
|
--color-primary-50: var(--ui-color-primary-50);
|
|
16
19
|
--color-primary-100: var(--ui-color-primary-100);
|
|
17
20
|
--color-primary-200: var(--ui-color-primary-200);
|
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.Bix4DSU4.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.1.
|
|
11
|
+
const version = "3.1.3";
|
|
12
12
|
|
|
13
13
|
const module = defineNuxtModule({
|
|
14
14
|
meta: {
|
|
@@ -141,7 +141,7 @@ const groups = computed(() => {
|
|
|
141
141
|
</ListboxFilter>
|
|
142
142
|
|
|
143
143
|
<ListboxContent :class="ui.content({ class: props.ui?.content })">
|
|
144
|
-
<div v-if="groups?.length" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
144
|
+
<div v-if="groups?.length" role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
145
145
|
<ListboxGroup v-for="group in groups" :key="`group-${group.id}`" :class="ui.group({ class: props.ui?.group })">
|
|
146
146
|
<ListboxGroupLabel v-if="get(group, props.labelKey)" :class="ui.label({ class: props.ui?.label })">
|
|
147
147
|
{{ get(group, props.labelKey) }}
|
|
@@ -91,68 +91,70 @@ const groups = computed(
|
|
|
91
91
|
<component :is="sub ? ContextMenu.SubContent : ContextMenu.Content" :class="props.class" v-bind="contentProps">
|
|
92
92
|
<slot name="content-top" />
|
|
93
93
|
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<ContextMenu.
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
95
|
+
<ContextMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: uiOverride?.group })">
|
|
96
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
97
|
+
<ContextMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: [uiOverride?.label, item.ui?.label, item.class] })">
|
|
98
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
99
|
+
</ContextMenu.Label>
|
|
100
|
+
<ContextMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: [uiOverride?.separator, item.ui?.separator, item.class] })" />
|
|
101
|
+
<ContextMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
|
|
102
|
+
<ContextMenu.SubTrigger
|
|
103
|
+
as="button"
|
|
104
|
+
type="button"
|
|
105
|
+
:disabled="item.disabled"
|
|
106
|
+
:text-value="get(item, props.labelKey)"
|
|
107
|
+
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
108
|
+
>
|
|
109
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
110
|
+
</ContextMenu.SubTrigger>
|
|
111
|
+
|
|
112
|
+
<UContextMenuContent
|
|
113
|
+
sub
|
|
114
|
+
:class="props.class"
|
|
115
|
+
:ui="ui"
|
|
116
|
+
:ui-override="uiOverride"
|
|
117
|
+
:portal="portal"
|
|
118
|
+
:items="item.children"
|
|
119
|
+
:align-offset="-4"
|
|
120
|
+
:label-key="labelKey"
|
|
121
|
+
:checked-icon="checkedIcon"
|
|
122
|
+
:loading-icon="loadingIcon"
|
|
123
|
+
:external-icon="externalIcon"
|
|
124
|
+
v-bind="item.content"
|
|
125
|
+
>
|
|
126
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
127
|
+
<slot :name="name" v-bind="slotData" />
|
|
128
|
+
</template>
|
|
129
|
+
</UContextMenuContent>
|
|
130
|
+
</ContextMenu.Sub>
|
|
131
|
+
<ContextMenu.CheckboxItem
|
|
132
|
+
v-else-if="item.type === 'checkbox'"
|
|
133
|
+
:model-value="item.checked"
|
|
104
134
|
:disabled="item.disabled"
|
|
105
135
|
:text-value="get(item, props.labelKey)"
|
|
106
136
|
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
137
|
+
@update:model-value="item.onUpdateChecked"
|
|
138
|
+
@select="item.onSelect"
|
|
107
139
|
>
|
|
108
140
|
<ReuseItemTemplate :item="item" :index="index" />
|
|
109
|
-
</ContextMenu.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
:
|
|
114
|
-
:
|
|
115
|
-
|
|
116
|
-
:portal="portal"
|
|
117
|
-
:items="item.children"
|
|
118
|
-
:align-offset="-4"
|
|
119
|
-
:label-key="labelKey"
|
|
120
|
-
:checked-icon="checkedIcon"
|
|
121
|
-
:loading-icon="loadingIcon"
|
|
122
|
-
:external-icon="externalIcon"
|
|
123
|
-
v-bind="item.content"
|
|
141
|
+
</ContextMenu.CheckboxItem>
|
|
142
|
+
<ContextMenu.Item
|
|
143
|
+
v-else
|
|
144
|
+
as-child
|
|
145
|
+
:disabled="item.disabled"
|
|
146
|
+
:text-value="get(item, props.labelKey)"
|
|
147
|
+
@select="item.onSelect"
|
|
124
148
|
>
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
:text-value="get(item, props.labelKey)"
|
|
135
|
-
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
136
|
-
@update:model-value="item.onUpdateChecked"
|
|
137
|
-
@select="item.onSelect"
|
|
138
|
-
>
|
|
139
|
-
<ReuseItemTemplate :item="item" :index="index" />
|
|
140
|
-
</ContextMenu.CheckboxItem>
|
|
141
|
-
<ContextMenu.Item
|
|
142
|
-
v-else
|
|
143
|
-
as-child
|
|
144
|
-
:disabled="item.disabled"
|
|
145
|
-
:text-value="get(item, props.labelKey)"
|
|
146
|
-
@select="item.onSelect"
|
|
147
|
-
>
|
|
148
|
-
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
149
|
-
<ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })">
|
|
150
|
-
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
151
|
-
</ULinkBase>
|
|
152
|
-
</ULink>
|
|
153
|
-
</ContextMenu.Item>
|
|
154
|
-
</template>
|
|
155
|
-
</ContextMenu.Group>
|
|
149
|
+
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
150
|
+
<ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })">
|
|
151
|
+
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
152
|
+
</ULinkBase>
|
|
153
|
+
</ULink>
|
|
154
|
+
</ContextMenu.Item>
|
|
155
|
+
</template>
|
|
156
|
+
</ContextMenu.Group>
|
|
157
|
+
</div>
|
|
156
158
|
|
|
157
159
|
<slot />
|
|
158
160
|
|
|
@@ -4,7 +4,7 @@ import theme from "#build/ui/drawer";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, toRef } from "vue";
|
|
7
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
7
|
+
import { VisuallyHidden, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { DrawerRoot, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerTitle, DrawerDescription, DrawerHandle } from "vaul-vue";
|
|
9
9
|
import { reactivePick } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
@@ -65,6 +65,20 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.drawer || {}
|
|
|
65
65
|
<DrawerContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" v-on="contentEvents">
|
|
66
66
|
<DrawerHandle v-if="handle" :class="ui.handle({ class: props.ui?.handle })" />
|
|
67
67
|
|
|
68
|
+
<VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
|
|
69
|
+
<DrawerTitle v-if="title || !!slots.title">
|
|
70
|
+
<slot name="title">
|
|
71
|
+
{{ title }}
|
|
72
|
+
</slot>
|
|
73
|
+
</DrawerTitle>
|
|
74
|
+
|
|
75
|
+
<DrawerDescription v-if="description || !!slots.description">
|
|
76
|
+
<slot name="description">
|
|
77
|
+
{{ description }}
|
|
78
|
+
</slot>
|
|
79
|
+
</DrawerDescription>
|
|
80
|
+
</VisuallyHidden>
|
|
81
|
+
|
|
68
82
|
<slot name="content">
|
|
69
83
|
<div :class="ui.container({ class: props.ui?.container })">
|
|
70
84
|
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description)" :class="ui.header({ class: props.ui?.header })">
|
|
@@ -96,70 +96,72 @@ const groups = computed(
|
|
|
96
96
|
<component :is="sub ? DropdownMenu.SubContent : DropdownMenu.Content" :class="props.class" v-bind="contentProps">
|
|
97
97
|
<slot name="content-top" />
|
|
98
98
|
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<DropdownMenu.
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
100
|
+
<DropdownMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: uiOverride?.group })">
|
|
101
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
102
|
+
<DropdownMenu.Label v-if="item.type === 'label'" :class="ui.label({ class: [uiOverride?.label, item.ui?.label, item.class] })">
|
|
103
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
104
|
+
</DropdownMenu.Label>
|
|
105
|
+
<DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="ui.separator({ class: [uiOverride?.separator, item.ui?.separator, item.class] })" />
|
|
106
|
+
<DropdownMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
|
|
107
|
+
<DropdownMenu.SubTrigger
|
|
108
|
+
as="button"
|
|
109
|
+
type="button"
|
|
110
|
+
:disabled="item.disabled"
|
|
111
|
+
:text-value="get(item, props.labelKey)"
|
|
112
|
+
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
113
|
+
>
|
|
114
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
115
|
+
</DropdownMenu.SubTrigger>
|
|
116
|
+
|
|
117
|
+
<UDropdownMenuContent
|
|
118
|
+
sub
|
|
119
|
+
:class="props.class"
|
|
120
|
+
:ui="ui"
|
|
121
|
+
:ui-override="uiOverride"
|
|
122
|
+
:portal="portal"
|
|
123
|
+
:items="item.children"
|
|
124
|
+
align="start"
|
|
125
|
+
:align-offset="-4"
|
|
126
|
+
:side-offset="3"
|
|
127
|
+
:label-key="labelKey"
|
|
128
|
+
:checked-icon="checkedIcon"
|
|
129
|
+
:loading-icon="loadingIcon"
|
|
130
|
+
:external-icon="externalIcon"
|
|
131
|
+
v-bind="item.content"
|
|
132
|
+
>
|
|
133
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
134
|
+
<slot :name="name" v-bind="slotData" />
|
|
135
|
+
</template>
|
|
136
|
+
</UDropdownMenuContent>
|
|
137
|
+
</DropdownMenu.Sub>
|
|
138
|
+
<DropdownMenu.CheckboxItem
|
|
139
|
+
v-else-if="item.type === 'checkbox'"
|
|
140
|
+
:model-value="item.checked"
|
|
109
141
|
:disabled="item.disabled"
|
|
110
142
|
:text-value="get(item, props.labelKey)"
|
|
111
143
|
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
144
|
+
@update:model-value="item.onUpdateChecked"
|
|
145
|
+
@select="item.onSelect"
|
|
112
146
|
>
|
|
113
147
|
<ReuseItemTemplate :item="item" :index="index" />
|
|
114
|
-
</DropdownMenu.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
:
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
:portal="portal"
|
|
122
|
-
:items="item.children"
|
|
123
|
-
align="start"
|
|
124
|
-
:align-offset="-4"
|
|
125
|
-
:side-offset="3"
|
|
126
|
-
:label-key="labelKey"
|
|
127
|
-
:checked-icon="checkedIcon"
|
|
128
|
-
:loading-icon="loadingIcon"
|
|
129
|
-
:external-icon="externalIcon"
|
|
130
|
-
v-bind="item.content"
|
|
148
|
+
</DropdownMenu.CheckboxItem>
|
|
149
|
+
<DropdownMenu.Item
|
|
150
|
+
v-else
|
|
151
|
+
as-child
|
|
152
|
+
:disabled="item.disabled"
|
|
153
|
+
:text-value="get(item, props.labelKey)"
|
|
154
|
+
@select="item.onSelect"
|
|
131
155
|
>
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
:text-value="get(item, props.labelKey)"
|
|
142
|
-
:class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color })"
|
|
143
|
-
@update:model-value="item.onUpdateChecked"
|
|
144
|
-
@select="item.onSelect"
|
|
145
|
-
>
|
|
146
|
-
<ReuseItemTemplate :item="item" :index="index" />
|
|
147
|
-
</DropdownMenu.CheckboxItem>
|
|
148
|
-
<DropdownMenu.Item
|
|
149
|
-
v-else
|
|
150
|
-
as-child
|
|
151
|
-
:disabled="item.disabled"
|
|
152
|
-
:text-value="get(item, props.labelKey)"
|
|
153
|
-
@select="item.onSelect"
|
|
154
|
-
>
|
|
155
|
-
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
156
|
-
<ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color, active })">
|
|
157
|
-
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
158
|
-
</ULinkBase>
|
|
159
|
-
</ULink>
|
|
160
|
-
</DropdownMenu.Item>
|
|
161
|
-
</template>
|
|
162
|
-
</DropdownMenu.Group>
|
|
156
|
+
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
157
|
+
<ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.ui?.item, item.class], color: item?.color, active })">
|
|
158
|
+
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
159
|
+
</ULinkBase>
|
|
160
|
+
</ULink>
|
|
161
|
+
</DropdownMenu.Item>
|
|
162
|
+
</template>
|
|
163
|
+
</DropdownMenu.Group>
|
|
164
|
+
</div>
|
|
163
165
|
|
|
164
166
|
<slot />
|
|
165
167
|
|
|
@@ -29,6 +29,7 @@ const props = defineProps({
|
|
|
29
29
|
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
30
30
|
disabled: { type: Boolean, required: false },
|
|
31
31
|
highlight: { type: Boolean, required: false },
|
|
32
|
+
modelModifiers: { type: Object, required: false },
|
|
32
33
|
class: { type: null, required: false },
|
|
33
34
|
ui: { type: null, required: false },
|
|
34
35
|
icon: { type: String, required: false },
|
|
@@ -34,6 +34,13 @@ export interface InputProps extends UseComponentIconsProps {
|
|
|
34
34
|
disabled?: boolean;
|
|
35
35
|
/** Highlight the ring color like a focus state. */
|
|
36
36
|
highlight?: boolean;
|
|
37
|
+
modelModifiers?: {
|
|
38
|
+
string?: boolean;
|
|
39
|
+
number?: boolean;
|
|
40
|
+
trim?: boolean;
|
|
41
|
+
lazy?: boolean;
|
|
42
|
+
nullify?: boolean;
|
|
43
|
+
};
|
|
37
44
|
class?: any;
|
|
38
45
|
ui?: Input['slots'];
|
|
39
46
|
}
|