@byyuurin/ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +5 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Accordion.vue +41 -41
- package/dist/runtime/components/Accordion.vue.d.ts +11 -7
- package/dist/runtime/components/Alert.vue +63 -63
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/App.vue +11 -10
- package/dist/runtime/components/App.vue.d.ts +11 -7
- package/dist/runtime/components/Avatar.vue +29 -29
- package/dist/runtime/components/Avatar.vue.d.ts +4 -3
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue +32 -32
- package/dist/runtime/components/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/Breadcrumb.vue +49 -49
- package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
- package/dist/runtime/components/Button.vue +52 -51
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue +74 -74
- package/dist/runtime/components/Calendar.vue.d.ts +16 -12
- package/dist/runtime/components/Card.vue +41 -41
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +66 -66
- package/dist/runtime/components/Carousel.vue.d.ts +14 -10
- package/dist/runtime/components/Checkbox.vue +46 -46
- package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
- package/dist/runtime/components/CheckboxGroup.vue +29 -29
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +11 -7
- package/dist/runtime/components/Chip.vue +15 -15
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue +14 -14
- package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/Drawer.vue +76 -76
- package/dist/runtime/components/Drawer.vue.d.ts +6 -6
- package/dist/runtime/components/DropdownMenu.vue +28 -28
- package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
- package/dist/runtime/components/DropdownMenuContent.vue +152 -153
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
- package/dist/runtime/components/FieldGroup.vue +3 -3
- package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
- package/dist/runtime/components/Form.vue +9 -9
- package/dist/runtime/components/Form.vue.d.ts +13 -8
- package/dist/runtime/components/FormField.vue +39 -38
- package/dist/runtime/components/FormField.vue.d.ts +7 -2
- package/dist/runtime/components/Icon.vue +2 -2
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.vue +48 -48
- package/dist/runtime/components/Input.vue.d.ts +16 -12
- package/dist/runtime/components/InputNumber.vue +47 -47
- package/dist/runtime/components/InputNumber.vue.d.ts +128 -124
- package/dist/runtime/components/InputTags.vue +54 -53
- package/dist/runtime/components/InputTags.vue.d.ts +16 -11
- package/dist/runtime/components/Kbd.vue +3 -3
- package/dist/runtime/components/Kbd.vue.d.ts +2 -2
- package/dist/runtime/components/Link.vue +26 -25
- package/dist/runtime/components/Link.vue.d.ts +16 -6
- package/dist/runtime/components/LinkBase.vue +3 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
- package/dist/runtime/components/Marquee.vue +5 -5
- package/dist/runtime/components/Marquee.vue.d.ts +3 -3
- package/dist/runtime/components/Modal.vue +74 -74
- package/dist/runtime/components/Modal.vue.d.ts +6 -6
- package/dist/runtime/components/NavigationMenu.vue +228 -228
- package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -7
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/Pagination.vue.d.ts +4 -4
- package/dist/runtime/components/PinInput.vue +23 -23
- package/dist/runtime/components/PinInput.vue.d.ts +14 -10
- package/dist/runtime/components/Popover.vue +22 -22
- package/dist/runtime/components/Popover.vue.d.ts +11 -7
- package/dist/runtime/components/Progress.vue +25 -25
- package/dist/runtime/components/Progress.vue.d.ts +2 -2
- package/dist/runtime/components/RadioGroup.vue +50 -50
- package/dist/runtime/components/RadioGroup.vue.d.ts +11 -7
- package/dist/runtime/components/ScrollArea.vue +32 -32
- package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
- package/dist/runtime/components/Select.vue +299 -148
- package/dist/runtime/components/Select.vue.d.ts +103 -123
- package/dist/runtime/components/Separator.vue +30 -30
- package/dist/runtime/components/Separator.vue.d.ts +2 -2
- package/dist/runtime/components/Skeleton.vue +11 -11
- package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue +25 -25
- package/dist/runtime/components/Slider.vue.d.ts +11 -7
- package/dist/runtime/components/Stepper.vue +116 -0
- package/dist/runtime/components/Stepper.vue.d.ts +83 -0
- package/dist/runtime/components/Switch.vue +30 -30
- package/dist/runtime/components/Switch.vue.d.ts +4 -3
- package/dist/runtime/components/Table.vue +137 -137
- package/dist/runtime/components/Table.vue.d.ts +13 -8
- package/dist/runtime/components/Tabs.vue +74 -74
- package/dist/runtime/components/Tabs.vue.d.ts +12 -8
- package/dist/runtime/components/Textarea.vue +47 -47
- package/dist/runtime/components/Textarea.vue.d.ts +16 -11
- package/dist/runtime/components/Timeline.vue +47 -47
- package/dist/runtime/components/Timeline.vue.d.ts +11 -7
- package/dist/runtime/components/Toast.vue +93 -93
- package/dist/runtime/components/Toast.vue.d.ts +5 -5
- package/dist/runtime/components/ToastProvider.vue +29 -29
- package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
- package/dist/runtime/components/Tooltip.vue +24 -25
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/components/Tree.vue +241 -0
- package/dist/runtime/components/Tree.vue.d.ts +121 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
- package/dist/runtime/composables/defineShortcuts.js +44 -8
- package/dist/runtime/composables/useLocale.d.ts +12 -0
- package/dist/runtime/locale/en.d.ts +6 -0
- package/dist/runtime/locale/en.js +6 -0
- package/dist/runtime/locale/zh_tw.d.ts +6 -0
- package/dist/runtime/locale/zh_tw.js +6 -0
- package/dist/runtime/types/html.d.ts +8 -0
- package/dist/runtime/types/html.js +0 -0
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/input.d.ts +5 -5
- package/dist/runtime/types/locale.d.ts +6 -0
- package/dist/runtime/types/unocss.d.ts +4 -4
- package/dist/runtime/types/utils.d.ts +3 -3
- package/dist/runtime/utils/index.d.ts +3 -3
- package/dist/runtime/utils/link.d.ts +2 -1
- package/dist/runtime/utils/link.js +40 -29
- package/dist/runtime/vue/components/Icon.vue +2 -2
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/Link.vue +7 -12
- package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
- package/dist/setup.d.mts +1 -1
- package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
- package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
- package/dist/shared/{ui.DLOxhmP0.mjs → ui.DpkP12cX.mjs} +262 -17
- package/dist/unocss.mjs +1 -1
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.mjs +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +29 -29
- package/vue-plugin.d.ts +5 -5
|
@@ -58,80 +58,80 @@ const ui = computed(() => {
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
62
|
-
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
63
|
-
<slot :open="open"></slot>
|
|
64
|
-
</DialogTrigger>
|
|
65
|
-
|
|
66
|
-
<DialogPortal v-bind="portalProps">
|
|
67
|
-
<DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
|
|
68
|
-
|
|
69
|
-
<DialogContent
|
|
70
|
-
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
71
|
-
v-bind="contentProps"
|
|
72
|
-
:data-direction="props.direction"
|
|
73
|
-
data-part="content"
|
|
74
|
-
@after-enter="emit('after-enter')"
|
|
75
|
-
@after-leave="emit('after-leave')"
|
|
76
|
-
v-on="contentEvents"
|
|
77
|
-
>
|
|
78
|
-
<VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
|
|
79
|
-
<DialogTitle />
|
|
80
|
-
</VisuallyHidden>
|
|
81
|
-
|
|
82
|
-
<slot name="content" :close="close">
|
|
83
|
-
<div
|
|
84
|
-
v-if="slots.header || (props.title || !!slots.title) || (props.description || !!slots.description) || (props.close || !!slots.close)"
|
|
85
|
-
:class="ui.header({ class: props.ui?.header })"
|
|
86
|
-
data-part="header"
|
|
87
|
-
>
|
|
88
|
-
<slot name="header" :close="close">
|
|
89
|
-
<DialogTitle
|
|
90
|
-
v-if="props.title || slots.title"
|
|
91
|
-
:class="ui.title({ class: props.ui?.title })"
|
|
92
|
-
data-part="title"
|
|
93
|
-
>
|
|
94
|
-
<slot name="title">
|
|
95
|
-
{{ props.title }}
|
|
96
|
-
</slot>
|
|
97
|
-
</DialogTitle>
|
|
98
|
-
|
|
99
|
-
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
100
|
-
<slot name="close" :close="close" :ui="ui">
|
|
101
|
-
<Button
|
|
102
|
-
v-if="props.close"
|
|
103
|
-
color="neutral"
|
|
104
|
-
variant="ghost"
|
|
105
|
-
:icon="props.closeIcon || appConfig.ui.icons.close"
|
|
106
|
-
:aria-label="t('modal.close')"
|
|
107
|
-
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
108
|
-
:class="ui.close({ class: props.ui?.close })"
|
|
109
|
-
data-part="close"
|
|
110
|
-
/>
|
|
111
|
-
</slot>
|
|
112
|
-
</DialogClose>
|
|
113
|
-
|
|
114
|
-
<DialogDescription
|
|
115
|
-
v-if="props.description || !!slots.description"
|
|
116
|
-
:class="ui.description({ class: props.ui?.description })"
|
|
117
|
-
data-part="description"
|
|
118
|
-
>
|
|
119
|
-
<slot name="description">
|
|
120
|
-
{{ props.description }}
|
|
121
|
-
</slot>
|
|
122
|
-
</DialogDescription>
|
|
123
|
-
</slot>
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
<div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
|
|
127
|
-
<slot name="body" :close="close"></slot>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
|
|
131
|
-
<slot name="footer" :close="close"></slot>
|
|
132
|
-
</div>
|
|
133
|
-
</slot>
|
|
134
|
-
</DialogContent>
|
|
135
|
-
</DialogPortal>
|
|
136
|
-
</DialogRoot>
|
|
61
|
+
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
62
|
+
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
63
|
+
<slot :open="open"></slot>
|
|
64
|
+
</DialogTrigger>
|
|
65
|
+
|
|
66
|
+
<DialogPortal v-bind="portalProps">
|
|
67
|
+
<DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
|
|
68
|
+
|
|
69
|
+
<DialogContent
|
|
70
|
+
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
71
|
+
v-bind="contentProps"
|
|
72
|
+
:data-direction="props.direction"
|
|
73
|
+
data-part="content"
|
|
74
|
+
@after-enter="emit('after-enter')"
|
|
75
|
+
@after-leave="emit('after-leave')"
|
|
76
|
+
v-on="contentEvents"
|
|
77
|
+
>
|
|
78
|
+
<VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
|
|
79
|
+
<DialogTitle />
|
|
80
|
+
</VisuallyHidden>
|
|
81
|
+
|
|
82
|
+
<slot name="content" :close="close">
|
|
83
|
+
<div
|
|
84
|
+
v-if="slots.header || (props.title || !!slots.title) || (props.description || !!slots.description) || (props.close || !!slots.close)"
|
|
85
|
+
:class="ui.header({ class: props.ui?.header })"
|
|
86
|
+
data-part="header"
|
|
87
|
+
>
|
|
88
|
+
<slot name="header" :close="close">
|
|
89
|
+
<DialogTitle
|
|
90
|
+
v-if="props.title || slots.title"
|
|
91
|
+
:class="ui.title({ class: props.ui?.title })"
|
|
92
|
+
data-part="title"
|
|
93
|
+
>
|
|
94
|
+
<slot name="title">
|
|
95
|
+
{{ props.title }}
|
|
96
|
+
</slot>
|
|
97
|
+
</DialogTitle>
|
|
98
|
+
|
|
99
|
+
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
100
|
+
<slot name="close" :close="close" :ui="ui">
|
|
101
|
+
<Button
|
|
102
|
+
v-if="props.close"
|
|
103
|
+
color="neutral"
|
|
104
|
+
variant="ghost"
|
|
105
|
+
:icon="props.closeIcon || appConfig.ui.icons.close"
|
|
106
|
+
:aria-label="t('modal.close')"
|
|
107
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
108
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
109
|
+
data-part="close"
|
|
110
|
+
/>
|
|
111
|
+
</slot>
|
|
112
|
+
</DialogClose>
|
|
113
|
+
|
|
114
|
+
<DialogDescription
|
|
115
|
+
v-if="props.description || !!slots.description"
|
|
116
|
+
:class="ui.description({ class: props.ui?.description })"
|
|
117
|
+
data-part="description"
|
|
118
|
+
>
|
|
119
|
+
<slot name="description">
|
|
120
|
+
{{ props.description }}
|
|
121
|
+
</slot>
|
|
122
|
+
</DialogDescription>
|
|
123
|
+
</slot>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
|
|
127
|
+
<slot name="body" :close="close"></slot>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
|
|
131
|
+
<slot name="footer" :close="close"></slot>
|
|
132
|
+
</div>
|
|
133
|
+
</slot>
|
|
134
|
+
</DialogContent>
|
|
135
|
+
</DialogPortal>
|
|
136
|
+
</DialogRoot>
|
|
137
137
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VariantProps } from '@byyuurin/ui-kit';
|
|
2
2
|
import type { DialogContentEmits, DialogContentProps, DialogRootEmits, DialogRootProps } from 'reka-ui';
|
|
3
3
|
import theme from '#build/ui/drawer';
|
|
4
|
-
import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
|
|
4
|
+
import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, LinkPropsKeys } from '../types';
|
|
5
5
|
import type { EmitsToProps, StaticSlot } from '../types/utils';
|
|
6
6
|
type ThemeVariants = VariantProps<typeof theme>;
|
|
7
7
|
export interface DrawerProps extends ComponentBaseProps, DialogRootProps {
|
|
@@ -37,7 +37,7 @@ export interface DrawerProps extends ComponentBaseProps, DialogRootProps {
|
|
|
37
37
|
* Display a close button to dismiss the drawer.
|
|
38
38
|
* @default true
|
|
39
39
|
*/
|
|
40
|
-
close?: boolean |
|
|
40
|
+
close?: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
41
41
|
/** @default app.icons.close */
|
|
42
42
|
closeIcon?: IconProps['name'];
|
|
43
43
|
/**
|
|
@@ -75,6 +75,8 @@ export interface DrawerSlots {
|
|
|
75
75
|
close: () => void;
|
|
76
76
|
}>;
|
|
77
77
|
}
|
|
78
|
+
declare const _default: typeof __VLS_export;
|
|
79
|
+
export default _default;
|
|
78
80
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
79
81
|
"update:open": (value: boolean) => any;
|
|
80
82
|
"after-leave": () => any;
|
|
@@ -86,16 +88,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Drawer
|
|
|
86
88
|
"onAfter-enter"?: (() => any) | undefined;
|
|
87
89
|
"onClose-prevent"?: (() => any) | undefined;
|
|
88
90
|
}>, {
|
|
89
|
-
|
|
90
|
-
close: boolean | Partial<ButtonProps>;
|
|
91
|
+
close: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
91
92
|
transition: boolean;
|
|
93
|
+
overlay: boolean;
|
|
92
94
|
direction: "top" | "right" | "bottom" | "left";
|
|
93
95
|
modal: boolean;
|
|
94
96
|
portal: boolean | string | HTMLElement;
|
|
95
97
|
dismissible: boolean;
|
|
96
98
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DrawerSlots>;
|
|
97
|
-
declare const _default: typeof __VLS_export;
|
|
98
|
-
export default _default;
|
|
99
99
|
type __VLS_WithSlots<T, S> = T & {
|
|
100
100
|
new (): {
|
|
101
101
|
$slots: S;
|
|
@@ -26,7 +26,7 @@ const props = defineProps({
|
|
|
26
26
|
class: { type: [Object, String, Number, Boolean, null, Array], required: false, skipCheck: true },
|
|
27
27
|
defaultOpen: { type: Boolean, required: false },
|
|
28
28
|
open: { type: Boolean, required: false },
|
|
29
|
-
modal: { type: Boolean, required: false, default:
|
|
29
|
+
modal: { type: Boolean, required: false, default: false }
|
|
30
30
|
});
|
|
31
31
|
const emit = defineEmits(["update:open"]);
|
|
32
32
|
const slots = defineSlots();
|
|
@@ -42,31 +42,31 @@ const ui = computed(() => {
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<template>
|
|
45
|
-
<DropdownMenuRoot v-slot="{ open }" v-bind="rootProps">
|
|
46
|
-
<DropdownMenuTrigger v-if="!!slots.default" as-child :class="props.class" :disabled="props.disabled">
|
|
47
|
-
<slot :open="open"></slot>
|
|
48
|
-
</DropdownMenuTrigger>
|
|
49
|
-
|
|
50
|
-
<DropdownMenuContent
|
|
51
|
-
v-bind="contentProps"
|
|
52
|
-
:size="props.size"
|
|
53
|
-
:items="props.items"
|
|
54
|
-
:portal="props.portal"
|
|
55
|
-
:label-key="props.labelKey"
|
|
56
|
-
:description-key="props.descriptionKey"
|
|
57
|
-
:checked-icon="props.checkedIcon"
|
|
58
|
-
:loading-icon="props.loadingIcon"
|
|
59
|
-
:external-icon="props.externalIcon"
|
|
60
|
-
:ui="ui"
|
|
61
|
-
:ui-override="props.ui"
|
|
62
|
-
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
63
|
-
data-part="content"
|
|
64
|
-
>
|
|
65
|
-
<template v-for="(_, name) in getProxySlots()" #[name]="slotProps">
|
|
66
|
-
<slot :name="name" v-bind="slotProps"></slot>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<DropdownMenuArrow v-if="props.arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" data-part="arrow" />
|
|
70
|
-
</DropdownMenuContent>
|
|
71
|
-
</DropdownMenuRoot>
|
|
45
|
+
<DropdownMenuRoot v-slot="{ open }" v-bind="rootProps">
|
|
46
|
+
<DropdownMenuTrigger v-if="!!slots.default" as-child :class="props.class" :disabled="props.disabled">
|
|
47
|
+
<slot :open="open"></slot>
|
|
48
|
+
</DropdownMenuTrigger>
|
|
49
|
+
|
|
50
|
+
<DropdownMenuContent
|
|
51
|
+
v-bind="contentProps"
|
|
52
|
+
:size="props.size"
|
|
53
|
+
:items="props.items"
|
|
54
|
+
:portal="props.portal"
|
|
55
|
+
:label-key="props.labelKey"
|
|
56
|
+
:description-key="props.descriptionKey"
|
|
57
|
+
:checked-icon="props.checkedIcon"
|
|
58
|
+
:loading-icon="props.loadingIcon"
|
|
59
|
+
:external-icon="props.externalIcon"
|
|
60
|
+
:ui="ui"
|
|
61
|
+
:ui-override="props.ui"
|
|
62
|
+
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
63
|
+
data-part="content"
|
|
64
|
+
>
|
|
65
|
+
<template v-for="(_, name) in getProxySlots()" #[name]="slotProps">
|
|
66
|
+
<slot :name="name" v-bind="slotProps"></slot>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<DropdownMenuArrow v-if="props.arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" data-part="arrow" />
|
|
70
|
+
</DropdownMenuContent>
|
|
71
|
+
</DropdownMenuRoot>
|
|
72
72
|
</template>
|
|
@@ -112,8 +112,12 @@ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayO
|
|
|
112
112
|
index: number;
|
|
113
113
|
ui: ComponentStyler<typeof theme>;
|
|
114
114
|
}>;
|
|
115
|
-
'content-top': StaticSlot
|
|
116
|
-
|
|
115
|
+
'content-top': StaticSlot<{
|
|
116
|
+
sub: boolean;
|
|
117
|
+
}>;
|
|
118
|
+
'content-bottom': StaticSlot<{
|
|
119
|
+
sub: boolean;
|
|
120
|
+
}>;
|
|
117
121
|
} & DynamicSlots<MergeTypes<T>, 'label' | 'description', {
|
|
118
122
|
active?: boolean;
|
|
119
123
|
index: number;
|
|
@@ -122,10 +126,14 @@ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayO
|
|
|
122
126
|
index: number;
|
|
123
127
|
ui: ComponentStyler<typeof theme>;
|
|
124
128
|
}>;
|
|
125
|
-
declare const
|
|
126
|
-
|
|
129
|
+
declare const _default: typeof __VLS_export;
|
|
130
|
+
export default _default;
|
|
131
|
+
declare const __VLS_export: <T extends ArrayOrNested<DropdownMenuItem>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
132
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<DropdownMenuProps<T> & {
|
|
127
133
|
"onUpdate:open"?: ((payload: boolean) => any) | undefined;
|
|
128
|
-
}> &
|
|
134
|
+
}> & (typeof globalThis extends {
|
|
135
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
136
|
+
} ? P : {});
|
|
129
137
|
expose: (exposed: {}) => void;
|
|
130
138
|
attrs: any;
|
|
131
139
|
slots: DropdownMenuSlots<T, NestedItem<T>>;
|
|
@@ -133,8 +141,8 @@ declare const __VLS_export: <T extends ArrayOrNested<DropdownMenuItem>>(__VLS_pr
|
|
|
133
141
|
}>) => import("vue").VNode & {
|
|
134
142
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
135
143
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
144
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
145
|
+
[K in keyof T]: T[K];
|
|
146
|
+
} : {
|
|
139
147
|
[K in keyof T as K]: T[K];
|
|
140
|
-
} & {};
|
|
148
|
+
}) & {};
|
|
@@ -66,157 +66,156 @@ const groups = computed(
|
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
68
|
<template>
|
|
69
|
-
<DefineItemTemplate v-slot="{ item, active, index }">
|
|
70
|
-
<slot :name="item.slot || 'item'" :item="item" :index="index" :ui="ui">
|
|
71
|
-
<slot :name="`${item.slot || 'item'}-leading`" :item="item" :active="active" :index="index" :ui="ui">
|
|
72
|
-
<Icon
|
|
73
|
-
v-if="item.loading"
|
|
74
|
-
:name="loadingIcon || appConfig.ui.icons.loading"
|
|
75
|
-
:class="props.ui.itemLeadingIcon({ class: [props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item.color, loading: true })"
|
|
76
|
-
data-part="itemLeadingIcon"
|
|
77
|
-
/>
|
|
78
|
-
<Icon
|
|
79
|
-
v-else-if="item.icon"
|
|
80
|
-
:name="item.icon"
|
|
81
|
-
:class="props.ui.itemLeadingIcon({ class: [props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item.color, active })"
|
|
82
|
-
data-part="itemLeadingIcon"
|
|
83
|
-
/>
|
|
84
|
-
<Avatar
|
|
85
|
-
v-else-if="item.avatar"
|
|
86
|
-
v-bind="item.avatar"
|
|
87
|
-
:size="item.avatar.size || props.size"
|
|
88
|
-
:class="props.ui.itemLeadingAvatar({ class: [props.uiOverride?.itemLeadingAvatar, item.ui?.itemLeadingAvatar], active })"
|
|
89
|
-
data-part="itemLeadingAvatar"
|
|
90
|
-
/>
|
|
91
|
-
</slot>
|
|
92
|
-
|
|
93
|
-
<span
|
|
94
|
-
v-if="get(item, props.labelKey) || !!slots[`${item.slot || 'item'}-label`] || (get(item, props.descriptionKey) || !!slots[`${item.slot || 'item'}-description`])"
|
|
95
|
-
:class="props.ui.itemWrapper({ class: [props.uiOverride?.itemWrapper, item.ui?.itemWrapper] })"
|
|
96
|
-
data-part="itemWrapper"
|
|
97
|
-
>
|
|
98
|
-
<span
|
|
99
|
-
v-if="get(item, props.labelKey) || !!slots[`${item.slot || 'item'}-label`]"
|
|
100
|
-
:class="props.ui.itemLabel({ class: [props.uiOverride?.itemLabel, item.ui?.itemLabel], active })"
|
|
101
|
-
data-part="itemLabel"
|
|
102
|
-
>
|
|
103
|
-
<slot :name="`${item.slot || 'item'}-label`" :item="item" :active="active" :index="index">
|
|
104
|
-
{{ get(item, props.labelKey) }}
|
|
105
|
-
</slot>
|
|
106
|
-
|
|
107
|
-
<Icon
|
|
108
|
-
v-if="item.target === '_blank' && props.externalIcon !== false"
|
|
109
|
-
:name="typeof props.externalIcon === 'string' ? props.externalIcon : appConfig.ui.icons.external"
|
|
110
|
-
:class="props.ui.itemLabelExternalIcon({ class: [props.uiOverride?.itemLabelExternalIcon, item.ui?.itemLabelExternalIcon], color: item.color, active })"
|
|
111
|
-
data-part="itemLabelExternalIcon"
|
|
112
|
-
/>
|
|
113
|
-
</span>
|
|
114
|
-
|
|
115
|
-
<span v-if="get(item, props.descriptionKey)" :class="props.ui.itemDescription({ class: [props.uiOverride?.itemDescription, item.ui?.itemDescription] })" data-part="itemDescription">
|
|
116
|
-
<slot :name="`${item.slot || 'item'}-description`" :item="item" :active="active" :index="index">
|
|
117
|
-
{{ get(item, props.descriptionKey) }}
|
|
118
|
-
</slot>
|
|
119
|
-
</span>
|
|
120
|
-
</span>
|
|
121
|
-
|
|
122
|
-
<span :class="props.ui.itemTrailing({ class: [props.uiOverride?.itemTrailing, item.ui?.itemTrailing] })" data-part="itemTrailing">
|
|
123
|
-
<slot :name="`${item.slot || 'item'}-trailing`" :item="item" :active="active" :index="index" :ui="ui">
|
|
124
|
-
<Icon v-if="item.children?.length" :name="childrenIcon" :class="props.ui.itemTrailingIcon({ class: [props.uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item.color, active })" data-part="itemTrailingIcon" />
|
|
125
|
-
<span v-else-if="item.kbds?.length" :class="props.ui.itemTrailingKbds({ class: [props.uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] })" data-part="itemTrailingKbds">
|
|
126
|
-
<Kbd
|
|
127
|
-
v-for="(kbd, kbdIndex) in item.kbds"
|
|
128
|
-
:key="kbdIndex"
|
|
129
|
-
:size="item.ui?.itemTrailingKbdsSize || props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()"
|
|
130
|
-
v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
|
|
131
|
-
/>
|
|
132
|
-
</span>
|
|
133
|
-
</slot>
|
|
134
|
-
|
|
135
|
-
<DropdownMenu.ItemIndicator as-child>
|
|
136
|
-
<Icon :name="props.checkedIcon || appConfig.ui.icons.check" :class="props.ui.itemTrailingIcon({ class: [props.uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item.color })" data-part="itemTrailingIcon" />
|
|
137
|
-
</DropdownMenu.ItemIndicator>
|
|
138
|
-
</span>
|
|
139
|
-
</slot>
|
|
140
|
-
</DefineItemTemplate>
|
|
141
|
-
|
|
142
|
-
<DropdownMenu.Portal v-bind="portalProps">
|
|
143
|
-
<component :is="props.sub ? DropdownMenu.SubContent : DropdownMenu.Content" v-bind="{ ...contentProps, ...$attrs }" :class="props.class">
|
|
144
|
-
<slot name="content-top"></slot>
|
|
145
|
-
|
|
146
|
-
<div role="presentation" :class="props.ui.viewport({ class: props.uiOverride?.viewport })" data-part="viewport">
|
|
147
|
-
<DropdownMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="props.ui.group({ class: props.uiOverride?.group })" data-part="group">
|
|
148
|
-
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
149
|
-
<DropdownMenu.Label v-if="item.type === 'label'" :class="props.ui.label({ class: [props.uiOverride?.label, item.ui?.label, item.class] })" data-part="label">
|
|
150
|
-
<ReuseItemTemplate :item="item" :index="index" />
|
|
151
|
-
</DropdownMenu.Label>
|
|
152
|
-
<DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="props.ui.separator({ class: [props.uiOverride?.separator, item.ui?.separator, item.class] })" data-part="separator" />
|
|
153
|
-
<DropdownMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
|
|
154
|
-
<DropdownMenu.SubTrigger
|
|
155
|
-
as="button"
|
|
156
|
-
type="button"
|
|
157
|
-
:disabled="item.disabled"
|
|
158
|
-
:text-value="get(item, props.labelKey)"
|
|
159
|
-
:class="props.ui.item({ class: [props.uiOverride?.item, item.ui?.item, item.class], color: item.color })"
|
|
160
|
-
data-part="item"
|
|
161
|
-
>
|
|
162
|
-
<ReuseItemTemplate :item="item" :index="index" />
|
|
163
|
-
</DropdownMenu.SubTrigger>
|
|
164
|
-
|
|
165
|
-
<DropdownMenuContent
|
|
166
|
-
sub
|
|
167
|
-
:class="props.class"
|
|
168
|
-
:ui="props.ui"
|
|
169
|
-
:ui-override="props.uiOverride"
|
|
170
|
-
:portal="props.portal"
|
|
171
|
-
:items="item.children"
|
|
172
|
-
side="right"
|
|
173
|
-
align="start"
|
|
174
|
-
:align-offset="-4"
|
|
175
|
-
:side-offset="3"
|
|
176
|
-
:label-key="props.labelKey"
|
|
177
|
-
:description-key="props.descriptionKey"
|
|
178
|
-
:checked-icon="props.checkedIcon"
|
|
179
|
-
:loading-icon="props.loadingIcon"
|
|
180
|
-
:external-icon="props.externalIcon"
|
|
181
|
-
v-bind="item.content"
|
|
182
|
-
>
|
|
183
|
-
<template v-for="(_, name) in getProxySlots()" #[name]="slotProps">
|
|
184
|
-
<slot :name="name" v-bind="slotProps"></slot>
|
|
185
|
-
</template>
|
|
186
|
-
</DropdownMenuContent>
|
|
187
|
-
</DropdownMenu.Sub>
|
|
188
|
-
<DropdownMenu.CheckboxItem
|
|
189
|
-
v-else-if="item.type === 'checkbox'"
|
|
190
|
-
:model-value="item.checked"
|
|
191
|
-
:disabled="item.disabled"
|
|
192
|
-
:text-value="get(item, props.labelKey)"
|
|
193
|
-
:class="props.ui.item({ class: [props.uiOverride?.item, item.ui?.item, item.class], color: item.color })"
|
|
194
|
-
data-part="item"
|
|
195
|
-
@update:model-value="item.onUpdateChecked"
|
|
196
|
-
@select="item.onSelect"
|
|
197
|
-
>
|
|
198
|
-
<ReuseItemTemplate :item="item" :index="index" />
|
|
199
|
-
</DropdownMenu.CheckboxItem>
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
</DropdownMenu.Portal>
|
|
69
|
+
<DefineItemTemplate v-slot="{ item, active, index }">
|
|
70
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index" :ui="ui">
|
|
71
|
+
<slot :name="`${item.slot || 'item'}-leading`" :item="item" :active="active" :index="index" :ui="ui">
|
|
72
|
+
<Icon
|
|
73
|
+
v-if="item.loading"
|
|
74
|
+
:name="loadingIcon || appConfig.ui.icons.loading"
|
|
75
|
+
:class="props.ui.itemLeadingIcon({ class: [props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item.color, loading: true })"
|
|
76
|
+
data-part="itemLeadingIcon"
|
|
77
|
+
/>
|
|
78
|
+
<Icon
|
|
79
|
+
v-else-if="item.icon"
|
|
80
|
+
:name="item.icon"
|
|
81
|
+
:class="props.ui.itemLeadingIcon({ class: [props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item.color, active })"
|
|
82
|
+
data-part="itemLeadingIcon"
|
|
83
|
+
/>
|
|
84
|
+
<Avatar
|
|
85
|
+
v-else-if="item.avatar"
|
|
86
|
+
v-bind="item.avatar"
|
|
87
|
+
:size="item.avatar.size || props.size"
|
|
88
|
+
:class="props.ui.itemLeadingAvatar({ class: [props.uiOverride?.itemLeadingAvatar, item.ui?.itemLeadingAvatar], active })"
|
|
89
|
+
data-part="itemLeadingAvatar"
|
|
90
|
+
/>
|
|
91
|
+
</slot>
|
|
92
|
+
|
|
93
|
+
<span
|
|
94
|
+
v-if="get(item, props.labelKey) || !!slots[`${item.slot || 'item'}-label`] || (get(item, props.descriptionKey) || !!slots[`${item.slot || 'item'}-description`])"
|
|
95
|
+
:class="props.ui.itemWrapper({ class: [props.uiOverride?.itemWrapper, item.ui?.itemWrapper] })"
|
|
96
|
+
data-part="itemWrapper"
|
|
97
|
+
>
|
|
98
|
+
<span
|
|
99
|
+
v-if="get(item, props.labelKey) || !!slots[`${item.slot || 'item'}-label`]"
|
|
100
|
+
:class="props.ui.itemLabel({ class: [props.uiOverride?.itemLabel, item.ui?.itemLabel], active })"
|
|
101
|
+
data-part="itemLabel"
|
|
102
|
+
>
|
|
103
|
+
<slot :name="`${item.slot || 'item'}-label`" :item="item" :active="active" :index="index">
|
|
104
|
+
{{ get(item, props.labelKey) }}
|
|
105
|
+
</slot>
|
|
106
|
+
|
|
107
|
+
<Icon
|
|
108
|
+
v-if="item.target === '_blank' && props.externalIcon !== false"
|
|
109
|
+
:name="typeof props.externalIcon === 'string' ? props.externalIcon : appConfig.ui.icons.external"
|
|
110
|
+
:class="props.ui.itemLabelExternalIcon({ class: [props.uiOverride?.itemLabelExternalIcon, item.ui?.itemLabelExternalIcon], color: item.color, active })"
|
|
111
|
+
data-part="itemLabelExternalIcon"
|
|
112
|
+
/>
|
|
113
|
+
</span>
|
|
114
|
+
|
|
115
|
+
<span v-if="get(item, props.descriptionKey)" :class="props.ui.itemDescription({ class: [props.uiOverride?.itemDescription, item.ui?.itemDescription] })" data-part="itemDescription">
|
|
116
|
+
<slot :name="`${item.slot || 'item'}-description`" :item="item" :active="active" :index="index">
|
|
117
|
+
{{ get(item, props.descriptionKey) }}
|
|
118
|
+
</slot>
|
|
119
|
+
</span>
|
|
120
|
+
</span>
|
|
121
|
+
|
|
122
|
+
<span :class="props.ui.itemTrailing({ class: [props.uiOverride?.itemTrailing, item.ui?.itemTrailing] })" data-part="itemTrailing">
|
|
123
|
+
<slot :name="`${item.slot || 'item'}-trailing`" :item="item" :active="active" :index="index" :ui="ui">
|
|
124
|
+
<Icon v-if="item.children?.length" :name="childrenIcon" :class="props.ui.itemTrailingIcon({ class: [props.uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item.color, active })" data-part="itemTrailingIcon" />
|
|
125
|
+
<span v-else-if="item.kbds?.length" :class="props.ui.itemTrailingKbds({ class: [props.uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] })" data-part="itemTrailingKbds">
|
|
126
|
+
<Kbd
|
|
127
|
+
v-for="(kbd, kbdIndex) in item.kbds"
|
|
128
|
+
:key="kbdIndex"
|
|
129
|
+
:size="item.ui?.itemTrailingKbdsSize || props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()"
|
|
130
|
+
v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
|
|
131
|
+
/>
|
|
132
|
+
</span>
|
|
133
|
+
</slot>
|
|
134
|
+
|
|
135
|
+
<DropdownMenu.ItemIndicator as-child>
|
|
136
|
+
<Icon :name="props.checkedIcon || appConfig.ui.icons.check" :class="props.ui.itemTrailingIcon({ class: [props.uiOverride?.itemTrailingIcon, item.ui?.itemTrailingIcon], color: item.color })" data-part="itemTrailingIcon" />
|
|
137
|
+
</DropdownMenu.ItemIndicator>
|
|
138
|
+
</span>
|
|
139
|
+
</slot>
|
|
140
|
+
</DefineItemTemplate>
|
|
141
|
+
|
|
142
|
+
<DropdownMenu.Portal v-bind="portalProps">
|
|
143
|
+
<component :is="props.sub ? DropdownMenu.SubContent : DropdownMenu.Content" v-bind="{ ...contentProps, ...$attrs }" :class="props.class">
|
|
144
|
+
<slot name="content-top" :sub="props.sub ?? false"></slot>
|
|
145
|
+
|
|
146
|
+
<div role="presentation" :class="props.ui.viewport({ class: props.uiOverride?.viewport })" data-part="viewport">
|
|
147
|
+
<DropdownMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="props.ui.group({ class: props.uiOverride?.group })" data-part="group">
|
|
148
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
149
|
+
<DropdownMenu.Label v-if="item.type === 'label'" :class="props.ui.label({ class: [props.uiOverride?.label, item.ui?.label, item.class] })" data-part="label">
|
|
150
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
151
|
+
</DropdownMenu.Label>
|
|
152
|
+
<DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="props.ui.separator({ class: [props.uiOverride?.separator, item.ui?.separator, item.class] })" data-part="separator" />
|
|
153
|
+
<DropdownMenu.Sub v-else-if="item?.children?.length" :open="item.open" :default-open="item.defaultOpen">
|
|
154
|
+
<DropdownMenu.SubTrigger
|
|
155
|
+
as="button"
|
|
156
|
+
type="button"
|
|
157
|
+
:disabled="item.disabled"
|
|
158
|
+
:text-value="get(item, props.labelKey)"
|
|
159
|
+
:class="props.ui.item({ class: [props.uiOverride?.item, item.ui?.item, item.class], color: item.color })"
|
|
160
|
+
data-part="item"
|
|
161
|
+
>
|
|
162
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
163
|
+
</DropdownMenu.SubTrigger>
|
|
164
|
+
|
|
165
|
+
<DropdownMenuContent
|
|
166
|
+
sub
|
|
167
|
+
:class="props.class"
|
|
168
|
+
:ui="props.ui"
|
|
169
|
+
:ui-override="props.uiOverride"
|
|
170
|
+
:portal="props.portal"
|
|
171
|
+
:items="item.children"
|
|
172
|
+
side="right"
|
|
173
|
+
align="start"
|
|
174
|
+
:align-offset="-4"
|
|
175
|
+
:side-offset="3"
|
|
176
|
+
:label-key="props.labelKey"
|
|
177
|
+
:description-key="props.descriptionKey"
|
|
178
|
+
:checked-icon="props.checkedIcon"
|
|
179
|
+
:loading-icon="props.loadingIcon"
|
|
180
|
+
:external-icon="props.externalIcon"
|
|
181
|
+
v-bind="item.content"
|
|
182
|
+
>
|
|
183
|
+
<template v-for="(_, name) in getProxySlots()" #[name]="slotProps">
|
|
184
|
+
<slot :name="name" v-bind="slotProps"></slot>
|
|
185
|
+
</template>
|
|
186
|
+
</DropdownMenuContent>
|
|
187
|
+
</DropdownMenu.Sub>
|
|
188
|
+
<DropdownMenu.CheckboxItem
|
|
189
|
+
v-else-if="item.type === 'checkbox'"
|
|
190
|
+
:model-value="item.checked"
|
|
191
|
+
:disabled="item.disabled"
|
|
192
|
+
:text-value="get(item, props.labelKey)"
|
|
193
|
+
:class="props.ui.item({ class: [props.uiOverride?.item, item.ui?.item, item.class], color: item.color })"
|
|
194
|
+
data-part="item"
|
|
195
|
+
@update:model-value="item.onUpdateChecked"
|
|
196
|
+
@select="item.onSelect"
|
|
197
|
+
>
|
|
198
|
+
<ReuseItemTemplate :item="item" :index="index" />
|
|
199
|
+
</DropdownMenu.CheckboxItem>
|
|
200
|
+
<Link v-else v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
201
|
+
<DropdownMenu.Item
|
|
202
|
+
as-child
|
|
203
|
+
:disabled="item.disabled"
|
|
204
|
+
:text-value="get(item, props.labelKey)"
|
|
205
|
+
@select="item.onSelect"
|
|
206
|
+
>
|
|
207
|
+
<LinkBase v-bind="slotProps" :class="props.ui.item({ class: [props.uiOverride?.item, item.ui?.item, item.class], color: item.color, active })" data-part="item">
|
|
208
|
+
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
209
|
+
</LinkBase>
|
|
210
|
+
</DropdownMenu.Item>
|
|
211
|
+
</Link>
|
|
212
|
+
</template>
|
|
213
|
+
</DropdownMenu.Group>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<slot></slot>
|
|
217
|
+
|
|
218
|
+
<slot name="content-bottom" :sub="props.sub ?? false"></slot>
|
|
219
|
+
</component>
|
|
220
|
+
</DropdownMenu.Portal>
|
|
222
221
|
</template>
|