@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
|
@@ -1,154 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { VariantProps } from 'tailwind-variants'
|
|
4
|
-
import type { TreeRootProps, TreeRootEmits } from 'reka-ui'
|
|
5
|
-
import type { AppConfig } from '@nuxt/schema'
|
|
6
|
-
import _appConfig from '#build/app.config'
|
|
7
|
-
import theme from '#build/ui/tree'
|
|
8
|
-
import { tv } from '../utils/tv'
|
|
9
|
-
import type { PartialString, DynamicSlots, MaybeMultipleModelValue, SelectItemKey } from '../types/utils'
|
|
10
|
-
|
|
11
|
-
const appConfig = _appConfig as AppConfig & { ui: { tree: Partial<typeof theme> } }
|
|
12
|
-
|
|
13
|
-
const tree = tv({ extend: tv(theme), ...(appConfig.ui?.tree || {}) })
|
|
14
|
-
|
|
15
|
-
type TreeVariants = VariantProps<typeof tree>
|
|
16
|
-
|
|
17
|
-
export type TreeItem = {
|
|
18
|
-
/**
|
|
19
|
-
* @IconifyIcon
|
|
20
|
-
*/
|
|
21
|
-
icon?: string
|
|
22
|
-
label?: string
|
|
23
|
-
/**
|
|
24
|
-
* @IconifyIcon
|
|
25
|
-
*/
|
|
26
|
-
trailingIcon?: string
|
|
27
|
-
defaultExpanded?: boolean
|
|
28
|
-
disabled?: boolean
|
|
29
|
-
value?: string
|
|
30
|
-
slot?: string
|
|
31
|
-
children?: TreeItem[]
|
|
32
|
-
onToggle?(e: Event): void
|
|
33
|
-
onSelect?(e?: Event): void
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface TreeProps<T extends TreeItem, M extends boolean = false, K extends SelectItemKey<T> | undefined = undefined> extends Pick<TreeRootProps<T>, 'expanded' | 'defaultExpanded' | 'selectionBehavior' | 'propagateSelect' | 'disabled'> {
|
|
37
|
-
/**
|
|
38
|
-
* The element or component this component should render as.
|
|
39
|
-
* @defaultValue 'ul'
|
|
40
|
-
*/
|
|
41
|
-
as?: any
|
|
42
|
-
/**
|
|
43
|
-
* @defaultValue 'primary'
|
|
44
|
-
*/
|
|
45
|
-
color?: TreeVariants['color']
|
|
46
|
-
/**
|
|
47
|
-
* @defaultValue 'md'
|
|
48
|
-
*/
|
|
49
|
-
size?: TreeVariants['size']
|
|
50
|
-
/**
|
|
51
|
-
* The key used to get the value from the item.
|
|
52
|
-
* @defaultValue 'value'
|
|
53
|
-
*/
|
|
54
|
-
valueKey?: K
|
|
55
|
-
/**
|
|
56
|
-
* The key used to get the label from the item.
|
|
57
|
-
* @defaultValue 'label'
|
|
58
|
-
*/
|
|
59
|
-
labelKey?: K
|
|
60
|
-
/**
|
|
61
|
-
* The icon displayed on the right side of a parent node.
|
|
62
|
-
* @defaultValue appConfig.ui.icons.chevronDown
|
|
63
|
-
* @IconifyIcon
|
|
64
|
-
*/
|
|
65
|
-
trailingIcon?: string
|
|
66
|
-
/**
|
|
67
|
-
* The icon displayed when a parent node is expanded.
|
|
68
|
-
* @defaultValue appConfig.ui.icons.folderOpen
|
|
69
|
-
* @IconifyIcon
|
|
70
|
-
*/
|
|
71
|
-
expandedIcon?: string
|
|
72
|
-
/**
|
|
73
|
-
* The icon displayed when a parent node is collapsed.
|
|
74
|
-
* @defaultValue appConfig.ui.icons.folder
|
|
75
|
-
* @IconifyIcon
|
|
76
|
-
*/
|
|
77
|
-
collapsedIcon?: string
|
|
78
|
-
items?: T[]
|
|
79
|
-
/** The controlled value of the Tree. Can be bind as `v-model`. */
|
|
80
|
-
modelValue?: MaybeMultipleModelValue<T, M>
|
|
81
|
-
/** The value of the Tree when initially rendered. Use when you do not need to control the state of the Tree. */
|
|
82
|
-
defaultValue?: MaybeMultipleModelValue<T, M>
|
|
83
|
-
/** Whether multiple options can be selected or not. */
|
|
84
|
-
multiple?: M & boolean
|
|
85
|
-
class?: any
|
|
86
|
-
ui?: PartialString<typeof tree.slots>
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export type TreeEmits<T, M extends boolean = false> = Omit<TreeRootEmits, 'update:modelValue'> & {
|
|
90
|
-
'update:modelValue': [payload: MaybeMultipleModelValue<T, M>]
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
type SlotProps<T> = (props: { item: T, index: number, level: number, expanded: boolean, selected: boolean }) => any
|
|
94
|
-
|
|
95
|
-
export type TreeSlots<T extends { slot?: string }> = {
|
|
96
|
-
'item': SlotProps<T>
|
|
97
|
-
'item-leading': SlotProps<T>
|
|
98
|
-
'item-label': SlotProps<T>
|
|
99
|
-
'item-trailing': SlotProps<T>
|
|
100
|
-
} & DynamicSlots<T, SlotProps<T>>
|
|
101
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/tree";
|
|
102
3
|
</script>
|
|
103
4
|
|
|
104
|
-
<script setup
|
|
105
|
-
import { computed } from
|
|
106
|
-
import
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import { get } from
|
|
110
|
-
import
|
|
111
|
-
|
|
112
|
-
const props =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { TreeRoot, TreeItem, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { get } from "../utils";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UIcon from "./Icon.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
color: { type: null, required: false },
|
|
16
|
+
size: { type: null, required: false },
|
|
17
|
+
valueKey: { type: null, required: false, default: "value" },
|
|
18
|
+
labelKey: { type: null, required: false, default: "label" },
|
|
19
|
+
trailingIcon: { type: String, required: false },
|
|
20
|
+
expandedIcon: { type: String, required: false },
|
|
21
|
+
collapsedIcon: { type: String, required: false },
|
|
22
|
+
items: { type: null, required: false },
|
|
23
|
+
modelValue: { type: null, required: false },
|
|
24
|
+
defaultValue: { type: null, required: false },
|
|
25
|
+
multiple: { type: Boolean, required: false },
|
|
26
|
+
class: { type: null, required: false },
|
|
27
|
+
ui: { type: null, required: false },
|
|
28
|
+
expanded: { type: Array, required: false },
|
|
29
|
+
defaultExpanded: { type: Array, required: false },
|
|
30
|
+
selectionBehavior: { type: String, required: false },
|
|
31
|
+
propagateSelect: { type: Boolean, required: false },
|
|
32
|
+
disabled: { type: Boolean, required: false }
|
|
33
|
+
});
|
|
34
|
+
const emits = defineEmits(["update:expanded", "update:modelValue"]);
|
|
35
|
+
const slots = defineSlots();
|
|
36
|
+
const appConfig = useAppConfig();
|
|
37
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "items", "multiple", "expanded", "disabled", "propagateSelect"), emits);
|
|
38
|
+
const [DefineTreeTemplate, ReuseTreeTemplate] = createReusableTemplate();
|
|
39
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tree || {} })({
|
|
129
40
|
color: props.color,
|
|
130
41
|
size: props.size
|
|
131
|
-
}))
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return get(item, props.labelKey as string)
|
|
42
|
+
}));
|
|
43
|
+
function getItemLabel(item) {
|
|
44
|
+
return get(item, props.labelKey);
|
|
135
45
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return get(item, props.valueKey as string) ?? get(item, props.labelKey as string)
|
|
46
|
+
function getItemValue(item) {
|
|
47
|
+
return get(item, props.valueKey) ?? get(item, props.labelKey);
|
|
139
48
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return [currentItem, ...childItems].filter(Boolean) as string[]
|
|
49
|
+
function getDefaultOpenedItems(item) {
|
|
50
|
+
const currentItem = item.defaultExpanded ? getItemValue(item) : null;
|
|
51
|
+
const childItems = item.children?.flatMap((child) => getDefaultOpenedItems(child)) ?? [];
|
|
52
|
+
return [currentItem, ...childItems].filter(Boolean);
|
|
146
53
|
}
|
|
147
|
-
|
|
148
|
-
|
|
54
|
+
const defaultExpanded = computed(
|
|
55
|
+
() => props.defaultExpanded ?? props.items?.flatMap((item) => getDefaultOpenedItems(item))
|
|
56
|
+
);
|
|
149
57
|
</script>
|
|
150
58
|
|
|
151
|
-
<!-- eslint-disable vue/no-template-shadow -->
|
|
152
59
|
<template>
|
|
153
60
|
<DefineTreeTemplate v-slot="{ items, level }">
|
|
154
61
|
<li
|
|
@@ -165,8 +72,8 @@ const defaultExpanded = computed(() => props.defaultExpanded ?? props.items?.fla
|
|
|
165
72
|
@select="item.onSelect"
|
|
166
73
|
>
|
|
167
74
|
<button :disabled="item.disabled || disabled" :class="ui.link({ class: props.ui?.link, selected: isSelected, disabled: item.disabled || disabled })">
|
|
168
|
-
<slot :name="item.slot || 'item'" v-bind="{
|
|
169
|
-
<slot :name="item.slot ? `${item.slot}-leading
|
|
75
|
+
<slot :name="item.slot || 'item'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
76
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
170
77
|
<UIcon
|
|
171
78
|
v-if="item.icon"
|
|
172
79
|
:name="item.icon"
|
|
@@ -174,19 +81,19 @@ const defaultExpanded = computed(() => props.defaultExpanded ?? props.items?.fla
|
|
|
174
81
|
/>
|
|
175
82
|
<UIcon
|
|
176
83
|
v-else-if="item.children?.length"
|
|
177
|
-
:name="isExpanded ?
|
|
84
|
+
:name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
|
|
178
85
|
:class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon })"
|
|
179
86
|
/>
|
|
180
87
|
</slot>
|
|
181
88
|
|
|
182
|
-
<span v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label
|
|
183
|
-
<slot :name="item.slot ? `${item.slot}-label
|
|
89
|
+
<span v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
|
|
90
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
184
91
|
{{ getItemLabel(item) }}
|
|
185
92
|
</slot>
|
|
186
93
|
</span>
|
|
187
94
|
|
|
188
|
-
<span v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing
|
|
189
|
-
<slot :name="item.slot ? `${item.slot}-trailing
|
|
95
|
+
<span v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']" :class="ui.linkTrailing({ class: props.ui?.linkTrailing })">
|
|
96
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
190
97
|
<UIcon v-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: props.ui?.linkTrailingIcon })" />
|
|
191
98
|
<UIcon v-else-if="item.children?.length" :name="trailingIcon ?? appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: props.ui?.linkTrailingIcon })" />
|
|
192
99
|
</slot>
|
|
@@ -195,7 +102,7 @@ const defaultExpanded = computed(() => props.defaultExpanded ?? props.items?.fla
|
|
|
195
102
|
</button>
|
|
196
103
|
|
|
197
104
|
<ul v-if="item.children?.length && isExpanded" :class="ui.listWithChildren({ class: props.ui?.listWithChildren })">
|
|
198
|
-
<ReuseTreeTemplate :items="
|
|
105
|
+
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
199
106
|
</ul>
|
|
200
107
|
</TreeItem>
|
|
201
108
|
</li>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { TreeRootProps, TreeRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/tree';
|
|
4
|
+
import type { DynamicSlots, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, ComponentConfig } from '../types/utils';
|
|
5
|
+
type Tree = ComponentConfig<typeof theme, AppConfig, 'tree'>;
|
|
6
|
+
export type TreeItem = {
|
|
7
|
+
/**
|
|
8
|
+
* @IconifyIcon
|
|
9
|
+
*/
|
|
10
|
+
icon?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @IconifyIcon
|
|
14
|
+
*/
|
|
15
|
+
trailingIcon?: string;
|
|
16
|
+
defaultExpanded?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
value?: string;
|
|
19
|
+
slot?: string;
|
|
20
|
+
children?: TreeItem[];
|
|
21
|
+
onToggle?(e: Event): void;
|
|
22
|
+
onSelect?(e?: Event): void;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
export interface TreeProps<T extends TreeItem[] = TreeItem[], VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Pick<TreeRootProps<T>, 'expanded' | 'defaultExpanded' | 'selectionBehavior' | 'propagateSelect' | 'disabled'> {
|
|
26
|
+
/**
|
|
27
|
+
* The element or component this component should render as.
|
|
28
|
+
* @defaultValue 'ul'
|
|
29
|
+
*/
|
|
30
|
+
as?: any;
|
|
31
|
+
/**
|
|
32
|
+
* @defaultValue 'primary'
|
|
33
|
+
*/
|
|
34
|
+
color?: Tree['variants']['color'];
|
|
35
|
+
/**
|
|
36
|
+
* @defaultValue 'md'
|
|
37
|
+
*/
|
|
38
|
+
size?: Tree['variants']['size'];
|
|
39
|
+
/**
|
|
40
|
+
* The key used to get the value from the item.
|
|
41
|
+
* @defaultValue 'value'
|
|
42
|
+
*/
|
|
43
|
+
valueKey?: VK;
|
|
44
|
+
/**
|
|
45
|
+
* The key used to get the label from the item.
|
|
46
|
+
* @defaultValue 'label'
|
|
47
|
+
*/
|
|
48
|
+
labelKey?: keyof NestedItem<T>;
|
|
49
|
+
/**
|
|
50
|
+
* The icon displayed on the right side of a parent node.
|
|
51
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
52
|
+
* @IconifyIcon
|
|
53
|
+
*/
|
|
54
|
+
trailingIcon?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The icon displayed when a parent node is expanded.
|
|
57
|
+
* @defaultValue appConfig.ui.icons.folderOpen
|
|
58
|
+
* @IconifyIcon
|
|
59
|
+
*/
|
|
60
|
+
expandedIcon?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The icon displayed when a parent node is collapsed.
|
|
63
|
+
* @defaultValue appConfig.ui.icons.folder
|
|
64
|
+
* @IconifyIcon
|
|
65
|
+
*/
|
|
66
|
+
collapsedIcon?: string;
|
|
67
|
+
items?: T;
|
|
68
|
+
/** The controlled value of the Tree. Can be bind as `v-model`. */
|
|
69
|
+
modelValue?: GetModelValue<T, VK, M>;
|
|
70
|
+
/** The value of the Tree when initially rendered. Use when you do not need to control the state of the Tree. */
|
|
71
|
+
defaultValue?: GetModelValue<T, VK, M>;
|
|
72
|
+
/** Whether multiple options can be selected or not. */
|
|
73
|
+
multiple?: M & boolean;
|
|
74
|
+
class?: any;
|
|
75
|
+
ui?: Tree['slots'];
|
|
76
|
+
}
|
|
77
|
+
export type TreeEmits<A extends TreeItem[], VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<TreeRootEmits, 'update:modelValue'> & GetModelValueEmits<A, VK, M>;
|
|
78
|
+
type SlotProps<T extends TreeItem> = (props: {
|
|
79
|
+
item: T;
|
|
80
|
+
index: number;
|
|
81
|
+
level: number;
|
|
82
|
+
expanded: boolean;
|
|
83
|
+
selected: boolean;
|
|
84
|
+
}) => any;
|
|
85
|
+
export type TreeSlots<A extends TreeItem[] = TreeItem[], T extends NestedItem<A> = NestedItem<A>> = {
|
|
86
|
+
'item': SlotProps<T>;
|
|
87
|
+
'item-leading': SlotProps<T>;
|
|
88
|
+
'item-label': SlotProps<T>;
|
|
89
|
+
'item-trailing': SlotProps<T>;
|
|
90
|
+
} & DynamicSlots<T, undefined, {
|
|
91
|
+
index: number;
|
|
92
|
+
level: number;
|
|
93
|
+
expanded: boolean;
|
|
94
|
+
selected: boolean;
|
|
95
|
+
}>;
|
|
96
|
+
declare const _default: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
97
|
+
props: __VLS_PrettifyLocal<any & TreeProps<T, VK, M> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
|
|
98
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
99
|
+
attrs: any;
|
|
100
|
+
slots: Readonly<{
|
|
101
|
+
item: SlotProps<NestedItem<T>>;
|
|
102
|
+
'item-leading': SlotProps<NestedItem<T>>;
|
|
103
|
+
'item-label': SlotProps<NestedItem<T>>;
|
|
104
|
+
'item-trailing': SlotProps<NestedItem<T>>;
|
|
105
|
+
} & DynamicSlots<NestedItem<T>, undefined, {
|
|
106
|
+
index: number;
|
|
107
|
+
level: number;
|
|
108
|
+
expanded: boolean;
|
|
109
|
+
selected: boolean;
|
|
110
|
+
}>> & {
|
|
111
|
+
item: SlotProps<NestedItem<T>>;
|
|
112
|
+
'item-leading': SlotProps<NestedItem<T>>;
|
|
113
|
+
'item-label': SlotProps<NestedItem<T>>;
|
|
114
|
+
'item-trailing': SlotProps<NestedItem<T>>;
|
|
115
|
+
} & DynamicSlots<NestedItem<T>, undefined, {
|
|
116
|
+
index: number;
|
|
117
|
+
level: number;
|
|
118
|
+
expanded: boolean;
|
|
119
|
+
selected: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
emit: ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void) & ((evt: "update:expanded", val: string[]) => void);
|
|
122
|
+
}>) => import("vue").VNode & {
|
|
123
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
124
|
+
};
|
|
125
|
+
export default _default;
|
|
126
|
+
type __VLS_PrettifyLocal<T> = {
|
|
127
|
+
[K in keyof T]: T[K];
|
|
128
|
+
} & {};
|
|
@@ -11,5 +11,5 @@ export interface ShortcutsOptions {
|
|
|
11
11
|
chainDelay?: number;
|
|
12
12
|
}
|
|
13
13
|
export declare function extractShortcuts(items: any[] | any[][]): Record<string, Handler>;
|
|
14
|
-
export declare function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options?: ShortcutsOptions): import("@vueuse/
|
|
14
|
+
export declare function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options?: ShortcutsOptions): import("@vueuse/shared").Fn;
|
|
15
15
|
export {};
|
|
@@ -6,5 +6,5 @@ export declare const avatarGroupInjectionKey: InjectionKey<ComputedRef<{
|
|
|
6
6
|
export declare function useAvatarGroup(props: {
|
|
7
7
|
size: AvatarGroupProps['size'];
|
|
8
8
|
}): {
|
|
9
|
-
size: ComputedRef<
|
|
9
|
+
size: ComputedRef<"md" | "3xs" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | undefined>;
|
|
10
10
|
};
|
|
@@ -9,7 +9,7 @@ type Props<T> = {
|
|
|
9
9
|
size?: GetObjectField<T, 'size'>;
|
|
10
10
|
};
|
|
11
11
|
export declare function useButtonGroup<T>(props: Props<T>): {
|
|
12
|
-
orientation: ComputedRef<
|
|
13
|
-
size: ComputedRef<
|
|
12
|
+
orientation: ComputedRef<"horizontal" | "vertical" | undefined>;
|
|
13
|
+
size: ComputedRef<"md" | "xs" | "sm" | "lg" | "xl" | NonNullable<GetObjectField<T, "size">> | undefined>;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -26,12 +26,12 @@ export declare function useFormField<T>(props?: Props<T>, opts?: {
|
|
|
26
26
|
}): {
|
|
27
27
|
id: ComputedRef<string | undefined>;
|
|
28
28
|
name: ComputedRef<string | undefined>;
|
|
29
|
-
size: ComputedRef<
|
|
29
|
+
size: ComputedRef<"md" | "xs" | "sm" | "lg" | "xl" | NonNullable<GetObjectField<T, "size">> | undefined>;
|
|
30
30
|
color: ComputedRef<"error" | GetObjectField<T, "color"> | undefined>;
|
|
31
31
|
highlight: ComputedRef<boolean | undefined>;
|
|
32
32
|
disabled: ComputedRef<boolean | undefined>;
|
|
33
33
|
emitFormBlur: () => void;
|
|
34
|
-
emitFormInput: import("@vueuse/
|
|
34
|
+
emitFormInput: import("@vueuse/shared").UseDebounceFnReturn<() => void>;
|
|
35
35
|
emitFormChange: () => void;
|
|
36
36
|
emitFormFocus: () => void;
|
|
37
37
|
ariaAttrs: ComputedRef<{
|
|
@@ -55,7 +55,7 @@ export function useFormField(props, opts) {
|
|
|
55
55
|
emitFormFocus,
|
|
56
56
|
ariaAttrs: computed(() => {
|
|
57
57
|
if (!formField?.value) return;
|
|
58
|
-
const descriptiveAttrs = ["error", "hint", "description"].filter((type) => formField?.value?.[type]).map((type) => `${formField?.value.ariaId}-${type}`) || [];
|
|
58
|
+
const descriptiveAttrs = ["error", "hint", "description", "help"].filter((type) => formField?.value?.[type]).map((type) => `${formField?.value.ariaId}-${type}`) || [];
|
|
59
59
|
return {
|
|
60
60
|
"aria-describedby": descriptiveAttrs.join(" "),
|
|
61
61
|
"aria-invalid": !!formField?.value.error
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
|
-
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
2
|
+
import type { ComponentProps, ComponentEmit } from 'vue-component-type-helpers';
|
|
3
|
+
type CloseEventArgType<T> = T extends (event: 'close', args_0: infer R) => void ? R : never;
|
|
3
4
|
export type OverlayOptions<OverlayAttrs = Record<string, any>> = {
|
|
4
5
|
defaultOpen?: boolean;
|
|
5
6
|
props?: OverlayAttrs;
|
|
6
7
|
destroyOnClose?: boolean;
|
|
7
8
|
};
|
|
8
|
-
|
|
9
|
+
interface ManagedOverlayOptionsPrivate<T extends Component> {
|
|
9
10
|
component?: T;
|
|
10
11
|
id: symbol;
|
|
11
12
|
isMounted: boolean;
|
|
12
|
-
|
|
13
|
-
resolvePromise?: (value:
|
|
14
|
-
}
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
resolvePromise?: (value: any) => void;
|
|
15
|
+
}
|
|
15
16
|
export type Overlay = OverlayOptions<Component> & ManagedOverlayOptionsPrivate<Component>;
|
|
16
|
-
interface OverlayInstance<T> {
|
|
17
|
-
|
|
17
|
+
interface OverlayInstance<T extends Component> extends Omit<ManagedOverlayOptionsPrivate<T>, 'component'> {
|
|
18
|
+
id: symbol;
|
|
19
|
+
result: Promise<CloseEventArgType<ComponentEmit<T>>>;
|
|
20
|
+
open: (props?: ComponentProps<T>) => Omit<OverlayInstance<T>, 'open' | 'close' | 'patch' | 'modelValue' | 'resolvePromise'>;
|
|
18
21
|
close: (value?: any) => void;
|
|
19
22
|
patch: (props: Partial<ComponentProps<T>>) => void;
|
|
20
23
|
}
|
|
21
24
|
declare function _useOverlay(): {
|
|
22
25
|
overlays: import("vue").ShallowReactive<Overlay[]>;
|
|
23
|
-
open: <T extends Component>(id: symbol, props?: ComponentProps<T>) =>
|
|
26
|
+
open: <T extends Component>(id: symbol, props?: ComponentProps<T>) => {
|
|
27
|
+
id: symbol;
|
|
28
|
+
isMounted: boolean;
|
|
29
|
+
isOpen: boolean;
|
|
30
|
+
result: Promise<any>;
|
|
31
|
+
};
|
|
24
32
|
close: (id: symbol, value?: any) => void;
|
|
25
33
|
create: <T extends Component>(component: T, _options?: OverlayOptions<ComponentProps<T>>) => OverlayInstance<T>;
|
|
26
34
|
patch: <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>) => void;
|
|
@@ -6,7 +6,7 @@ function _useOverlay() {
|
|
|
6
6
|
const { props, defaultOpen, destroyOnClose } = _options || {};
|
|
7
7
|
const options = reactive({
|
|
8
8
|
id: Symbol(import.meta.dev ? "useOverlay" : ""),
|
|
9
|
-
|
|
9
|
+
isOpen: !!defaultOpen,
|
|
10
10
|
component: markRaw(component),
|
|
11
11
|
isMounted: !!defaultOpen,
|
|
12
12
|
destroyOnClose: !!destroyOnClose,
|
|
@@ -14,6 +14,9 @@ function _useOverlay() {
|
|
|
14
14
|
});
|
|
15
15
|
overlays.push(options);
|
|
16
16
|
return {
|
|
17
|
+
...options,
|
|
18
|
+
result: new Promise(() => {
|
|
19
|
+
}),
|
|
17
20
|
open: (props2) => open(options.id, props2),
|
|
18
21
|
close: (value) => close(options.id, value),
|
|
19
22
|
patch: (props2) => patch(options.id, props2)
|
|
@@ -24,15 +27,20 @@ function _useOverlay() {
|
|
|
24
27
|
if (props) {
|
|
25
28
|
patch(overlay.id, props);
|
|
26
29
|
}
|
|
27
|
-
overlay.
|
|
30
|
+
overlay.isOpen = true;
|
|
28
31
|
overlay.isMounted = true;
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
isMounted: overlay.isMounted,
|
|
35
|
+
isOpen: overlay.isOpen,
|
|
36
|
+
result: new Promise((resolve) => {
|
|
37
|
+
overlay.resolvePromise = resolve;
|
|
38
|
+
})
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
const close = (id, value) => {
|
|
34
42
|
const overlay = getOverlay(id);
|
|
35
|
-
overlay.
|
|
43
|
+
overlay.isOpen = false;
|
|
36
44
|
if (overlay.resolvePromise) {
|
|
37
45
|
overlay.resolvePromise(value);
|
|
38
46
|
overlay.resolvePromise = void 0;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Ref, type InjectionKey } from 'vue';
|
|
2
|
+
export declare const portalTargetInjectionKey: InjectionKey<Ref<string | HTMLElement>>;
|
|
3
|
+
export declare function usePortal(portal: Ref<string | HTMLElement | boolean | undefined>): import("vue").ComputedRef<{
|
|
4
|
+
to: string | HTMLElement;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { inject, provide, computed } from "vue";
|
|
2
|
+
export const portalTargetInjectionKey = Symbol("nuxt-ui.portal-target");
|
|
3
|
+
export function usePortal(portal) {
|
|
4
|
+
const portalTarget = inject(portalTargetInjectionKey, void 0);
|
|
5
|
+
const to = computed(() => {
|
|
6
|
+
if (typeof portal.value === "boolean" || portal.value === void 0) {
|
|
7
|
+
return portalTarget?.value ?? "body";
|
|
8
|
+
}
|
|
9
|
+
return portal.value;
|
|
10
|
+
});
|
|
11
|
+
const disabled = computed(() => typeof portal.value === "boolean" ? !portal.value : false);
|
|
12
|
+
provide(portalTargetInjectionKey, computed(() => to.value));
|
|
13
|
+
return computed(() => ({
|
|
14
|
+
to: to.value,
|
|
15
|
+
disabled: disabled.value
|
|
16
|
+
}));
|
|
17
|
+
}
|
package/dist/runtime/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "#build/ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-
|
|
1
|
+
@import "#build/ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-default bg-default scheme-light dark:scheme-dark}.light,:root{--ui-text-dimmed:var(--ui-color-neutral-400);--ui-text-muted:var(--ui-color-neutral-500);--ui-text-toned:var(--ui-color-neutral-600);--ui-text:var(--ui-color-neutral-700);--ui-text-highlighted:var(--ui-color-neutral-900);--ui-text-inverted:var(--color-white);--ui-bg:var(--color-white);--ui-bg-muted:var(--ui-color-neutral-50);--ui-bg-elevated:var(--ui-color-neutral-100);--ui-bg-accented:var(--ui-color-neutral-200);--ui-bg-inverted:var(--ui-color-neutral-900);--ui-border:var(--ui-color-neutral-200);--ui-border-muted:var(--ui-color-neutral-200);--ui-border-accented:var(--ui-color-neutral-300);--ui-border-inverted:var(--ui-color-neutral-900);--ui-radius:0.25rem;--ui-container:var(--container-7xl)}.dark{--ui-text-dimmed:var(--ui-color-neutral-500);--ui-text-muted:var(--ui-color-neutral-400);--ui-text-toned:var(--ui-color-neutral-300);--ui-text:var(--ui-color-neutral-200);--ui-text-highlighted:var(--color-white);--ui-text-inverted:var(--ui-color-neutral-900);--ui-bg:var(--ui-color-neutral-900);--ui-bg-muted:var(--ui-color-neutral-800);--ui-bg-elevated:var(--ui-color-neutral-800);--ui-bg-accented:var(--ui-color-neutral-700);--ui-bg-inverted:var(--color-white);--ui-border:var(--ui-color-neutral-800);--ui-border-muted:var(--ui-color-neutral-700);--ui-border-accented:var(--ui-color-neutral-700);--ui-border-inverted:var(--color-white)}}
|