@nuxt/ui 3.0.1 → 3.1.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/accordion.ts +25 -4
- package/.nuxt/ui/alert.ts +52 -31
- package/.nuxt/ui/avatar-group.ts +24 -3
- package/.nuxt/ui/avatar.ts +26 -5
- package/.nuxt/ui/badge.ts +56 -35
- package/.nuxt/ui/breadcrumb.ts +28 -7
- package/.nuxt/ui/button-group.ts +23 -2
- package/.nuxt/ui/button.ts +66 -45
- package/.nuxt/ui/calendar.ts +39 -18
- package/.nuxt/ui/card.ts +28 -7
- package/.nuxt/ui/carousel.ts +29 -8
- package/.nuxt/ui/checkbox-group.ts +82 -0
- package/.nuxt/ui/checkbox.ts +163 -29
- package/.nuxt/ui/chip.ts +31 -10
- package/.nuxt/ui/collapsible.ts +23 -2
- package/.nuxt/ui/color-picker.ts +26 -5
- package/.nuxt/ui/command-palette.ts +37 -16
- package/.nuxt/ui/container.ts +24 -3
- package/.nuxt/ui/context-menu.ts +56 -35
- package/.nuxt/ui/drawer.ts +33 -12
- package/.nuxt/ui/dropdown-menu.ts +57 -36
- package/.nuxt/ui/form-field.ts +29 -8
- package/.nuxt/ui/form.ts +23 -2
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +65 -44
- package/.nuxt/ui/input-number.ts +43 -22
- package/.nuxt/ui/input.ts +46 -25
- package/.nuxt/ui/kbd.ts +27 -6
- package/.nuxt/ui/link.ts +26 -5
- package/.nuxt/ui/modal.ts +28 -7
- package/.nuxt/ui/navigation-menu.ts +103 -84
- package/.nuxt/ui/pagination.ts +23 -2
- package/.nuxt/ui/pin-input.ts +43 -22
- package/.nuxt/ui/popover.ts +25 -4
- package/.nuxt/ui/progress.ts +40 -19
- package/.nuxt/ui/radio-group.ts +273 -37
- package/.nuxt/ui/select-menu.ts +59 -35
- package/.nuxt/ui/select.ts +55 -34
- package/.nuxt/ui/separator.ts +31 -10
- package/.nuxt/ui/skeleton.ts +24 -3
- package/.nuxt/ui/slideover.ts +27 -6
- package/.nuxt/ui/slider.ts +39 -18
- package/.nuxt/ui/stepper.ts +41 -20
- package/.nuxt/ui/switch.ts +44 -23
- package/.nuxt/ui/table.ts +38 -17
- package/.nuxt/ui/tabs.ts +55 -34
- package/.nuxt/ui/textarea.ts +63 -37
- package/.nuxt/ui/toast.ts +47 -26
- package/.nuxt/ui/toaster.ts +23 -2
- package/.nuxt/ui/tooltip.ts +25 -4
- package/.nuxt/ui/tree.ts +41 -20
- package/.nuxt/ui.css +56 -12
- package/README.md +11 -0
- package/cli/templates.mjs +18 -17
- package/dist/module.d.mts +2 -1
- package/dist/module.json +5 -5
- package/dist/module.mjs +11 -7
- package/dist/runtime/components/Accordion.vue +36 -92
- package/dist/runtime/components/Accordion.vue.d.ts +91 -0
- package/dist/runtime/components/Alert.vue +37 -100
- package/dist/runtime/components/Alert.vue.d.ts +96 -0
- package/dist/runtime/components/App.vue +28 -34
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +47 -78
- package/dist/runtime/components/Avatar.vue.d.ts +60 -0
- package/dist/runtime/components/AvatarGroup.vue +40 -77
- package/dist/runtime/components/AvatarGroup.vue.d.ts +40 -0
- package/dist/runtime/components/Badge.vue +33 -62
- package/dist/runtime/components/Badge.vue.d.ts +62 -0
- package/dist/runtime/components/Breadcrumb.vue +36 -88
- package/dist/runtime/components/Breadcrumb.vue.d.ts +82 -0
- package/dist/runtime/components/Button.vue +96 -105
- package/dist/runtime/components/Button.vue.d.ts +73 -0
- package/dist/runtime/components/ButtonGroup.vue +20 -46
- package/dist/runtime/components/ButtonGroup.vue.d.ts +55 -0
- package/dist/runtime/components/Calendar.vue +73 -127
- package/dist/runtime/components/Calendar.vue.d.ts +107 -0
- package/dist/runtime/components/Card.vue +18 -40
- package/dist/runtime/components/Card.vue.d.ts +38 -0
- package/dist/runtime/components/Carousel.vue +112 -230
- package/dist/runtime/components/Carousel.vue.d.ts +120 -0
- package/dist/runtime/components/Checkbox.vue +52 -93
- package/dist/runtime/components/Checkbox.vue.d.ts +76 -0
- package/dist/runtime/components/CheckboxGroup.vue +121 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +75 -0
- package/dist/runtime/components/Chip.vue +26 -69
- package/dist/runtime/components/Chip.vue.d.ts +71 -0
- package/dist/runtime/components/Collapsible.vue +22 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +50 -0
- package/dist/runtime/components/ColorPicker.vue +111 -197
- package/dist/runtime/components/ColorPicker.vue.d.ts +63 -0
- package/dist/runtime/components/CommandPalette.vue +94 -234
- package/dist/runtime/components/CommandPalette.vue.d.ts +173 -0
- package/dist/runtime/components/Container.vue +15 -28
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/ContextMenu.vue +32 -119
- package/dist/runtime/components/ContextMenu.vue.d.ts +127 -0
- package/dist/runtime/components/ContextMenuContent.vue +71 -72
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +105 -0
- package/dist/runtime/components/Drawer.vue +49 -87
- package/dist/runtime/components/Drawer.vue.d.ts +88 -0
- package/dist/runtime/components/DropdownMenu.vue +37 -129
- package/dist/runtime/components/DropdownMenu.vue.d.ts +141 -0
- package/dist/runtime/components/DropdownMenuContent.vue +76 -79
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +55 -0
- package/dist/runtime/components/Form.vue +135 -219
- package/dist/runtime/components/Form.vue.d.ts +66 -0
- package/dist/runtime/components/FormField.vue +36 -77
- package/dist/runtime/components/FormField.vue.d.ts +70 -0
- package/dist/runtime/components/Icon.vue +12 -19
- package/dist/runtime/components/Icon.vue.d.ts +17 -0
- package/dist/runtime/components/Input.vue +82 -140
- package/dist/runtime/components/Input.vue.d.ts +91 -0
- package/dist/runtime/components/InputMenu.vue +193 -302
- package/dist/runtime/components/InputMenu.vue.d.ts +312 -0
- package/dist/runtime/components/InputNumber.vue +71 -133
- package/dist/runtime/components/InputNumber.vue.d.ts +193 -0
- package/dist/runtime/components/Kbd.vue +20 -46
- package/dist/runtime/components/Kbd.vue.d.ts +55 -0
- package/dist/runtime/components/Link.vue +98 -173
- package/dist/runtime/components/Link.vue.d.ts +124 -0
- package/dist/runtime/components/LinkBase.vue +33 -41
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +53 -116
- package/dist/runtime/components/Modal.vue.d.ts +109 -0
- package/dist/runtime/components/NavigationMenu.vue +78 -186
- package/dist/runtime/components/NavigationMenu.vue.d.ts +159 -0
- package/dist/runtime/components/OverlayProvider.vue +14 -18
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +46 -140
- package/dist/runtime/components/Pagination.vue.d.ts +143 -0
- package/dist/runtime/components/PinInput.vue +61 -78
- package/dist/runtime/components/PinInput.vue.d.ts +68 -0
- package/dist/runtime/components/Popover.vue +47 -84
- package/dist/runtime/components/Popover.vue.d.ts +80 -0
- package/dist/runtime/components/Progress.vue +70 -131
- package/dist/runtime/components/Progress.vue.d.ts +97 -0
- package/dist/runtime/components/RadioGroup.vue +75 -126
- package/dist/runtime/components/RadioGroup.vue.d.ts +88 -0
- package/dist/runtime/components/Select.vue +115 -202
- package/dist/runtime/components/Select.vue.d.ts +139 -0
- package/dist/runtime/components/SelectMenu.vue +167 -281
- package/dist/runtime/components/SelectMenu.vue.d.ts +184 -0
- package/dist/runtime/components/Separator.vue +29 -71
- package/dist/runtime/components/Separator.vue.d.ts +75 -0
- package/dist/runtime/components/Skeleton.vue +21 -23
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +53 -120
- package/dist/runtime/components/Slideover.vue.d.ts +111 -0
- package/dist/runtime/components/Slider.vue +46 -84
- package/dist/runtime/components/Slider.vue.d.ts +71 -0
- package/dist/runtime/components/Stepper.vue +44 -113
- package/dist/runtime/components/Stepper.vue.d.ts +89 -0
- package/dist/runtime/components/Switch.vue +45 -93
- package/dist/runtime/components/Switch.vue.d.ts +73 -0
- package/dist/runtime/components/Table.vue +165 -264
- package/dist/runtime/components/Table.vue.d.ts +183 -0
- package/dist/runtime/components/Tabs.vue +40 -105
- package/dist/runtime/components/Tabs.vue.d.ts +104 -0
- package/dist/runtime/components/Textarea.vue +113 -158
- package/dist/runtime/components/Textarea.vue.d.ts +95 -0
- package/dist/runtime/components/Toast.vue +49 -110
- package/dist/runtime/components/Toast.vue.d.ts +95 -0
- package/dist/runtime/components/Toaster.vue +70 -107
- package/dist/runtime/components/Toaster.vue.d.ts +63 -0
- package/dist/runtime/components/Tooltip.vue +38 -65
- package/dist/runtime/components/Tooltip.vue.d.ts +65 -0
- package/dist/runtime/components/Tree.vue +57 -150
- package/dist/runtime/components/Tree.vue.d.ts +128 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +0 -1
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useFormField.js +1 -1
- package/dist/runtime/composables/useOverlay.d.ts +16 -8
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +17 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.vue +146 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +92 -0
- package/dist/runtime/inertia/stubs.d.ts +43 -0
- package/dist/runtime/inertia/stubs.js +82 -0
- package/dist/runtime/locale/bg.d.ts +3 -0
- package/dist/runtime/locale/bg.js +54 -0
- package/dist/runtime/locale/hy.d.ts +3 -0
- package/dist/runtime/locale/hy.js +54 -0
- package/dist/runtime/locale/index.d.ts +6 -1
- package/dist/runtime/locale/index.js +6 -1
- package/dist/runtime/locale/kk.d.ts +3 -0
- package/dist/runtime/locale/kk.js +54 -0
- package/dist/runtime/locale/tj.d.ts +3 -0
- package/dist/runtime/locale/tj.js +54 -0
- package/dist/runtime/locale/ug_cn.d.ts +3 -0
- package/dist/runtime/locale/ug_cn.js +55 -0
- package/dist/runtime/types/form.d.ts +5 -1
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/utils.d.ts +70 -10
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +3 -0
- package/dist/runtime/utils/link.d.ts +4 -27
- package/dist/runtime/utils/link.js +32 -1
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Icon.vue +7 -8
- package/dist/runtime/vue/components/Icon.vue.d.ts +14 -0
- package/dist/runtime/vue/components/Link.vue +118 -199
- package/dist/runtime/vue/components/Link.vue.d.ts +124 -0
- package/dist/runtime/vue/stubs.d.ts +5 -0
- package/dist/runtime/vue/stubs.js +11 -2
- package/dist/shared/{ui.BCaWD5Ek.mjs → ui.D7lOOabO.mjs} +623 -364
- package/dist/types.d.mts +5 -1
- package/dist/unplugin.d.mts +6 -1
- package/dist/unplugin.mjs +25 -4
- package/dist/vite.mjs +1 -1
- package/package.json +122 -64
- package/dist/module.cjs +0 -62
- package/dist/module.d.cts +0 -44
- package/dist/module.d.ts +0 -44
- package/dist/shared/ui.C6uTSFTI.cjs +0 -3555
- package/dist/types.d.ts +0 -1
- package/dist/unplugin.cjs +0 -232
- package/dist/unplugin.d.cts +0 -61
- package/dist/unplugin.d.ts +0 -61
- package/dist/vite.cjs +0 -23
- package/dist/vite.d.cts +0 -15
- package/dist/vite.d.ts +0 -15
package/.nuxt/ui/switch.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import template from "/home/runner/work/ui/ui/src/theme/switch"
|
|
2
|
+
|
|
1
3
|
const color = [
|
|
2
4
|
"primary",
|
|
3
5
|
"secondary",
|
|
@@ -16,52 +18,69 @@ const size = [
|
|
|
16
18
|
"xl"
|
|
17
19
|
] as const
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
const result = typeof template === 'function' ? (template as Function)({
|
|
22
|
+
"prefix": "U",
|
|
23
|
+
"fonts": true,
|
|
24
|
+
"colorMode": true,
|
|
25
|
+
"theme": {
|
|
26
|
+
"colors": [
|
|
27
|
+
"primary",
|
|
28
|
+
"secondary",
|
|
29
|
+
"success",
|
|
30
|
+
"info",
|
|
31
|
+
"warning",
|
|
32
|
+
"error"
|
|
33
|
+
],
|
|
34
|
+
"transitions": true
|
|
35
|
+
}
|
|
36
|
+
}) : template
|
|
37
|
+
|
|
38
|
+
const theme = {
|
|
20
39
|
"slots": {
|
|
21
40
|
"root": "relative flex items-start",
|
|
22
41
|
"base": [
|
|
23
|
-
"inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 data-[state=unchecked]:bg-
|
|
24
|
-
"transition-
|
|
42
|
+
"inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 data-[state=unchecked]:bg-accented",
|
|
43
|
+
"transition-[background] duration-200"
|
|
25
44
|
],
|
|
26
45
|
"container": "flex items-center",
|
|
27
|
-
"thumb": "group pointer-events-none rounded-full bg-
|
|
46
|
+
"thumb": "group pointer-events-none rounded-full bg-default shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 data-[state=unchecked]:rtl:-translate-x-0 flex items-center justify-center",
|
|
28
47
|
"icon": [
|
|
29
|
-
"absolute shrink-0 group-data-[state=unchecked]:text-
|
|
48
|
+
"absolute shrink-0 group-data-[state=unchecked]:text-dimmed opacity-0 size-10/12",
|
|
30
49
|
"transition-[color,opacity] duration-200"
|
|
31
50
|
],
|
|
32
51
|
"wrapper": "ms-2",
|
|
33
|
-
"label": "block font-medium text-
|
|
34
|
-
"description": "text-
|
|
52
|
+
"label": "block font-medium text-default",
|
|
53
|
+
"description": "text-muted"
|
|
35
54
|
},
|
|
36
55
|
"variants": {
|
|
37
56
|
"color": {
|
|
38
57
|
"primary": {
|
|
39
|
-
"base": "data-[state=checked]:bg-
|
|
40
|
-
"icon": "group-data-[state=checked]:text-
|
|
58
|
+
"base": "data-[state=checked]:bg-primary focus-visible:outline-primary",
|
|
59
|
+
"icon": "group-data-[state=checked]:text-primary"
|
|
41
60
|
},
|
|
42
61
|
"secondary": {
|
|
43
|
-
"base": "data-[state=checked]:bg-
|
|
44
|
-
"icon": "group-data-[state=checked]:text-
|
|
62
|
+
"base": "data-[state=checked]:bg-secondary focus-visible:outline-secondary",
|
|
63
|
+
"icon": "group-data-[state=checked]:text-secondary"
|
|
45
64
|
},
|
|
46
65
|
"success": {
|
|
47
|
-
"base": "data-[state=checked]:bg-
|
|
48
|
-
"icon": "group-data-[state=checked]:text-
|
|
66
|
+
"base": "data-[state=checked]:bg-success focus-visible:outline-success",
|
|
67
|
+
"icon": "group-data-[state=checked]:text-success"
|
|
49
68
|
},
|
|
50
69
|
"info": {
|
|
51
|
-
"base": "data-[state=checked]:bg-
|
|
52
|
-
"icon": "group-data-[state=checked]:text-
|
|
70
|
+
"base": "data-[state=checked]:bg-info focus-visible:outline-info",
|
|
71
|
+
"icon": "group-data-[state=checked]:text-info"
|
|
53
72
|
},
|
|
54
73
|
"warning": {
|
|
55
|
-
"base": "data-[state=checked]:bg-
|
|
56
|
-
"icon": "group-data-[state=checked]:text-
|
|
74
|
+
"base": "data-[state=checked]:bg-warning focus-visible:outline-warning",
|
|
75
|
+
"icon": "group-data-[state=checked]:text-warning"
|
|
57
76
|
},
|
|
58
77
|
"error": {
|
|
59
|
-
"base": "data-[state=checked]:bg-
|
|
60
|
-
"icon": "group-data-[state=checked]:text-
|
|
78
|
+
"base": "data-[state=checked]:bg-error focus-visible:outline-error",
|
|
79
|
+
"icon": "group-data-[state=checked]:text-error"
|
|
61
80
|
},
|
|
62
81
|
"neutral": {
|
|
63
|
-
"base": "data-[state=checked]:bg-
|
|
64
|
-
"icon": "group-data-[state=checked]:text-
|
|
82
|
+
"base": "data-[state=checked]:bg-inverted focus-visible:outline-inverted",
|
|
83
|
+
"icon": "group-data-[state=checked]:text-highlighted"
|
|
65
84
|
}
|
|
66
85
|
},
|
|
67
86
|
"size": {
|
|
@@ -113,7 +132,7 @@ export default {
|
|
|
113
132
|
},
|
|
114
133
|
"required": {
|
|
115
134
|
"true": {
|
|
116
|
-
"label": "after:content-['*'] after:ms-0.5 after:text-
|
|
135
|
+
"label": "after:content-['*'] after:ms-0.5 after:text-error"
|
|
117
136
|
}
|
|
118
137
|
},
|
|
119
138
|
"disabled": {
|
|
@@ -128,4 +147,6 @@ export default {
|
|
|
128
147
|
"color": "primary" as typeof color[number],
|
|
129
148
|
"size": "md" as typeof size[number]
|
|
130
149
|
}
|
|
131
|
-
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export default result as typeof theme
|
package/.nuxt/ui/table.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import template from "/home/runner/work/ui/ui/src/theme/table"
|
|
2
|
+
|
|
1
3
|
const loadingAnimation = [
|
|
2
4
|
"carousel",
|
|
3
5
|
"carousel-inverse",
|
|
@@ -15,29 +17,46 @@ const loadingColor = [
|
|
|
15
17
|
"neutral"
|
|
16
18
|
] as const
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
const result = typeof template === 'function' ? (template as Function)({
|
|
21
|
+
"prefix": "U",
|
|
22
|
+
"fonts": true,
|
|
23
|
+
"colorMode": true,
|
|
24
|
+
"theme": {
|
|
25
|
+
"colors": [
|
|
26
|
+
"primary",
|
|
27
|
+
"secondary",
|
|
28
|
+
"success",
|
|
29
|
+
"info",
|
|
30
|
+
"warning",
|
|
31
|
+
"error"
|
|
32
|
+
],
|
|
33
|
+
"transitions": true
|
|
34
|
+
}
|
|
35
|
+
}) : template
|
|
36
|
+
|
|
37
|
+
const theme = {
|
|
19
38
|
"slots": {
|
|
20
39
|
"root": "relative overflow-auto",
|
|
21
40
|
"base": "min-w-full overflow-clip",
|
|
22
41
|
"caption": "sr-only",
|
|
23
42
|
"thead": "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
|
|
24
|
-
"tbody": "divide-y divide-
|
|
25
|
-
"tr": "data-[selected=true]:bg-
|
|
26
|
-
"th": "px-4 py-3.5 text-sm text-
|
|
27
|
-
"td": "p-4 text-sm text-
|
|
28
|
-
"empty": "py-6 text-center text-sm text-
|
|
43
|
+
"tbody": "divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
|
|
44
|
+
"tr": "data-[selected=true]:bg-elevated/50",
|
|
45
|
+
"th": "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
46
|
+
"td": "p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",
|
|
47
|
+
"empty": "py-6 text-center text-sm text-muted",
|
|
29
48
|
"loading": "py-6 text-center"
|
|
30
49
|
},
|
|
31
50
|
"variants": {
|
|
32
51
|
"pinned": {
|
|
33
52
|
"true": {
|
|
34
|
-
"th": "sticky bg-
|
|
35
|
-
"td": "sticky bg-
|
|
53
|
+
"th": "sticky bg-default/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
|
|
54
|
+
"td": "sticky bg-default/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
|
|
36
55
|
}
|
|
37
56
|
},
|
|
38
57
|
"sticky": {
|
|
39
58
|
"true": {
|
|
40
|
-
"thead": "sticky top-0 inset-x-0 bg-
|
|
59
|
+
"thead": "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
|
|
41
60
|
}
|
|
42
61
|
},
|
|
43
62
|
"loading": {
|
|
@@ -66,49 +85,49 @@ export default {
|
|
|
66
85
|
"loading": true,
|
|
67
86
|
"loadingColor": "primary" as typeof loadingColor[number],
|
|
68
87
|
"class": {
|
|
69
|
-
"thead": "after:bg-
|
|
88
|
+
"thead": "after:bg-primary"
|
|
70
89
|
}
|
|
71
90
|
},
|
|
72
91
|
{
|
|
73
92
|
"loading": true,
|
|
74
93
|
"loadingColor": "secondary" as typeof loadingColor[number],
|
|
75
94
|
"class": {
|
|
76
|
-
"thead": "after:bg-
|
|
95
|
+
"thead": "after:bg-secondary"
|
|
77
96
|
}
|
|
78
97
|
},
|
|
79
98
|
{
|
|
80
99
|
"loading": true,
|
|
81
100
|
"loadingColor": "success" as typeof loadingColor[number],
|
|
82
101
|
"class": {
|
|
83
|
-
"thead": "after:bg-
|
|
102
|
+
"thead": "after:bg-success"
|
|
84
103
|
}
|
|
85
104
|
},
|
|
86
105
|
{
|
|
87
106
|
"loading": true,
|
|
88
107
|
"loadingColor": "info" as typeof loadingColor[number],
|
|
89
108
|
"class": {
|
|
90
|
-
"thead": "after:bg-
|
|
109
|
+
"thead": "after:bg-info"
|
|
91
110
|
}
|
|
92
111
|
},
|
|
93
112
|
{
|
|
94
113
|
"loading": true,
|
|
95
114
|
"loadingColor": "warning" as typeof loadingColor[number],
|
|
96
115
|
"class": {
|
|
97
|
-
"thead": "after:bg-
|
|
116
|
+
"thead": "after:bg-warning"
|
|
98
117
|
}
|
|
99
118
|
},
|
|
100
119
|
{
|
|
101
120
|
"loading": true,
|
|
102
121
|
"loadingColor": "error" as typeof loadingColor[number],
|
|
103
122
|
"class": {
|
|
104
|
-
"thead": "after:bg-
|
|
123
|
+
"thead": "after:bg-error"
|
|
105
124
|
}
|
|
106
125
|
},
|
|
107
126
|
{
|
|
108
127
|
"loading": true,
|
|
109
128
|
"loadingColor": "neutral" as typeof loadingColor[number],
|
|
110
129
|
"class": {
|
|
111
|
-
"thead": "after:bg-
|
|
130
|
+
"thead": "after:bg-inverted"
|
|
112
131
|
}
|
|
113
132
|
},
|
|
114
133
|
{
|
|
@@ -144,4 +163,6 @@ export default {
|
|
|
144
163
|
"loadingColor": "primary" as typeof loadingColor[number],
|
|
145
164
|
"loadingAnimation": "carousel" as typeof loadingAnimation[number]
|
|
146
165
|
}
|
|
147
|
-
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default result as typeof theme
|
package/.nuxt/ui/tabs.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import template from "/home/runner/work/ui/ui/src/theme/tabs"
|
|
2
|
+
|
|
1
3
|
const color = [
|
|
2
4
|
"primary",
|
|
3
5
|
"secondary",
|
|
@@ -26,13 +28,30 @@ const size = [
|
|
|
26
28
|
"xl"
|
|
27
29
|
] as const
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
const result = typeof template === 'function' ? (template as Function)({
|
|
32
|
+
"prefix": "U",
|
|
33
|
+
"fonts": true,
|
|
34
|
+
"colorMode": true,
|
|
35
|
+
"theme": {
|
|
36
|
+
"colors": [
|
|
37
|
+
"primary",
|
|
38
|
+
"secondary",
|
|
39
|
+
"success",
|
|
40
|
+
"info",
|
|
41
|
+
"warning",
|
|
42
|
+
"error"
|
|
43
|
+
],
|
|
44
|
+
"transitions": true
|
|
45
|
+
}
|
|
46
|
+
}) : template
|
|
47
|
+
|
|
48
|
+
const theme = {
|
|
30
49
|
"slots": {
|
|
31
50
|
"root": "flex items-center gap-2",
|
|
32
51
|
"list": "relative flex p-1 group",
|
|
33
52
|
"indicator": "absolute transition-[translate,width] duration-200",
|
|
34
53
|
"trigger": [
|
|
35
|
-
"group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-
|
|
54
|
+
"group relative inline-flex items-center shrink-0 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
55
|
"transition-colors"
|
|
37
56
|
],
|
|
38
57
|
"content": "focus:outline-none w-full",
|
|
@@ -53,12 +72,12 @@ export default {
|
|
|
53
72
|
},
|
|
54
73
|
"variant": {
|
|
55
74
|
"pill": {
|
|
56
|
-
"list": "bg-
|
|
75
|
+
"list": "bg-elevated rounded-lg",
|
|
57
76
|
"trigger": "flex-1 w-full",
|
|
58
|
-
"indicator": "rounded-
|
|
77
|
+
"indicator": "rounded-md shadow-xs"
|
|
59
78
|
},
|
|
60
79
|
"link": {
|
|
61
|
-
"list": "border-
|
|
80
|
+
"list": "border-default",
|
|
62
81
|
"indicator": "rounded-full"
|
|
63
82
|
}
|
|
64
83
|
},
|
|
@@ -138,112 +157,112 @@ export default {
|
|
|
138
157
|
"color": "primary" as typeof color[number],
|
|
139
158
|
"variant": "pill" as typeof variant[number],
|
|
140
159
|
"class": {
|
|
141
|
-
"indicator": "bg-
|
|
142
|
-
"trigger": "data-[state=active]:text-
|
|
160
|
+
"indicator": "bg-primary",
|
|
161
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
|
|
143
162
|
}
|
|
144
163
|
},
|
|
145
164
|
{
|
|
146
165
|
"color": "secondary" as typeof color[number],
|
|
147
166
|
"variant": "pill" as typeof variant[number],
|
|
148
167
|
"class": {
|
|
149
|
-
"indicator": "bg-
|
|
150
|
-
"trigger": "data-[state=active]:text-
|
|
168
|
+
"indicator": "bg-secondary",
|
|
169
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"
|
|
151
170
|
}
|
|
152
171
|
},
|
|
153
172
|
{
|
|
154
173
|
"color": "success" as typeof color[number],
|
|
155
174
|
"variant": "pill" as typeof variant[number],
|
|
156
175
|
"class": {
|
|
157
|
-
"indicator": "bg-
|
|
158
|
-
"trigger": "data-[state=active]:text-
|
|
176
|
+
"indicator": "bg-success",
|
|
177
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"
|
|
159
178
|
}
|
|
160
179
|
},
|
|
161
180
|
{
|
|
162
181
|
"color": "info" as typeof color[number],
|
|
163
182
|
"variant": "pill" as typeof variant[number],
|
|
164
183
|
"class": {
|
|
165
|
-
"indicator": "bg-
|
|
166
|
-
"trigger": "data-[state=active]:text-
|
|
184
|
+
"indicator": "bg-info",
|
|
185
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"
|
|
167
186
|
}
|
|
168
187
|
},
|
|
169
188
|
{
|
|
170
189
|
"color": "warning" as typeof color[number],
|
|
171
190
|
"variant": "pill" as typeof variant[number],
|
|
172
191
|
"class": {
|
|
173
|
-
"indicator": "bg-
|
|
174
|
-
"trigger": "data-[state=active]:text-
|
|
192
|
+
"indicator": "bg-warning",
|
|
193
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"
|
|
175
194
|
}
|
|
176
195
|
},
|
|
177
196
|
{
|
|
178
197
|
"color": "error" as typeof color[number],
|
|
179
198
|
"variant": "pill" as typeof variant[number],
|
|
180
199
|
"class": {
|
|
181
|
-
"indicator": "bg-
|
|
182
|
-
"trigger": "data-[state=active]:text-
|
|
200
|
+
"indicator": "bg-error",
|
|
201
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"
|
|
183
202
|
}
|
|
184
203
|
},
|
|
185
204
|
{
|
|
186
205
|
"color": "neutral" as typeof color[number],
|
|
187
206
|
"variant": "pill" as typeof variant[number],
|
|
188
207
|
"class": {
|
|
189
|
-
"indicator": "bg-
|
|
190
|
-
"trigger": "data-[state=active]:text-
|
|
208
|
+
"indicator": "bg-inverted",
|
|
209
|
+
"trigger": "data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"
|
|
191
210
|
}
|
|
192
211
|
},
|
|
193
212
|
{
|
|
194
213
|
"color": "primary" as typeof color[number],
|
|
195
214
|
"variant": "link" as typeof variant[number],
|
|
196
215
|
"class": {
|
|
197
|
-
"indicator": "bg-
|
|
198
|
-
"trigger": "data-[state=active]:text-
|
|
216
|
+
"indicator": "bg-primary",
|
|
217
|
+
"trigger": "data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"
|
|
199
218
|
}
|
|
200
219
|
},
|
|
201
220
|
{
|
|
202
221
|
"color": "secondary" as typeof color[number],
|
|
203
222
|
"variant": "link" as typeof variant[number],
|
|
204
223
|
"class": {
|
|
205
|
-
"indicator": "bg-
|
|
206
|
-
"trigger": "data-[state=active]:text-
|
|
224
|
+
"indicator": "bg-secondary",
|
|
225
|
+
"trigger": "data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"
|
|
207
226
|
}
|
|
208
227
|
},
|
|
209
228
|
{
|
|
210
229
|
"color": "success" as typeof color[number],
|
|
211
230
|
"variant": "link" as typeof variant[number],
|
|
212
231
|
"class": {
|
|
213
|
-
"indicator": "bg-
|
|
214
|
-
"trigger": "data-[state=active]:text-
|
|
232
|
+
"indicator": "bg-success",
|
|
233
|
+
"trigger": "data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"
|
|
215
234
|
}
|
|
216
235
|
},
|
|
217
236
|
{
|
|
218
237
|
"color": "info" as typeof color[number],
|
|
219
238
|
"variant": "link" as typeof variant[number],
|
|
220
239
|
"class": {
|
|
221
|
-
"indicator": "bg-
|
|
222
|
-
"trigger": "data-[state=active]:text-
|
|
240
|
+
"indicator": "bg-info",
|
|
241
|
+
"trigger": "data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"
|
|
223
242
|
}
|
|
224
243
|
},
|
|
225
244
|
{
|
|
226
245
|
"color": "warning" as typeof color[number],
|
|
227
246
|
"variant": "link" as typeof variant[number],
|
|
228
247
|
"class": {
|
|
229
|
-
"indicator": "bg-
|
|
230
|
-
"trigger": "data-[state=active]:text-
|
|
248
|
+
"indicator": "bg-warning",
|
|
249
|
+
"trigger": "data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"
|
|
231
250
|
}
|
|
232
251
|
},
|
|
233
252
|
{
|
|
234
253
|
"color": "error" as typeof color[number],
|
|
235
254
|
"variant": "link" as typeof variant[number],
|
|
236
255
|
"class": {
|
|
237
|
-
"indicator": "bg-
|
|
238
|
-
"trigger": "data-[state=active]:text-
|
|
256
|
+
"indicator": "bg-error",
|
|
257
|
+
"trigger": "data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"
|
|
239
258
|
}
|
|
240
259
|
},
|
|
241
260
|
{
|
|
242
261
|
"color": "neutral" as typeof color[number],
|
|
243
262
|
"variant": "link" as typeof variant[number],
|
|
244
263
|
"class": {
|
|
245
|
-
"indicator": "bg-
|
|
246
|
-
"trigger": "data-[state=active]:text-
|
|
264
|
+
"indicator": "bg-inverted",
|
|
265
|
+
"trigger": "data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"
|
|
247
266
|
}
|
|
248
267
|
}
|
|
249
268
|
],
|
|
@@ -252,4 +271,6 @@ export default {
|
|
|
252
271
|
"variant": "pill" as typeof variant[number],
|
|
253
272
|
"size": "md" as typeof size[number]
|
|
254
273
|
}
|
|
255
|
-
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export default result as typeof theme
|