@bitrix24/b24ui-nuxt 0.5.11 → 0.6.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/b24ui/input-menu.ts +2 -2
- package/.nuxt/b24ui/select-menu.ts +4 -4
- package/.nuxt/b24ui/select.ts +2 -2
- package/dist/meta.d.mts +5208 -5061
- package/dist/meta.mjs +5208 -5061
- package/dist/module.json +3 -3
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Advice.vue +27 -54
- package/dist/runtime/components/Advice.vue.d.ts +170 -0
- package/dist/runtime/components/Alert.vue +35 -96
- package/dist/runtime/components/Alert.vue.d.ts +464 -0
- package/dist/runtime/components/App.vue +24 -34
- package/dist/runtime/components/App.vue.d.ts +23 -0
- package/dist/runtime/components/Avatar.vue +43 -81
- package/dist/runtime/components/Avatar.vue.d.ts +281 -0
- package/dist/runtime/components/AvatarGroup.vue +40 -76
- package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
- package/dist/runtime/components/Badge.vue +40 -83
- package/dist/runtime/components/Badge.vue.d.ts +517 -0
- package/dist/runtime/components/Button.vue +96 -155
- package/dist/runtime/components/Button.vue.d.ts +640 -0
- package/dist/runtime/components/ButtonGroup.vue +19 -51
- package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
- package/dist/runtime/components/Calendar.vue +73 -152
- package/dist/runtime/components/Calendar.vue.d.ts +437 -0
- package/dist/runtime/components/Checkbox.vue +42 -73
- package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
- package/dist/runtime/components/Chip.vue +26 -74
- package/dist/runtime/components/Chip.vue.d.ts +271 -0
- package/dist/runtime/components/Collapsible.vue +22 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
- package/dist/runtime/components/Container.vue +13 -27
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/Countdown.vue +153 -378
- package/dist/runtime/components/Countdown.vue.d.ts +356 -0
- package/dist/runtime/components/DescriptionList.vue +78 -149
- package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
- package/dist/runtime/components/DropdownMenu.vue +38 -139
- package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
- package/dist/runtime/components/DropdownMenuContent.vue +68 -80
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
- package/dist/runtime/components/Form.vue +130 -217
- package/dist/runtime/components/Form.vue.d.ts +55 -0
- package/dist/runtime/components/FormField.vue +36 -80
- package/dist/runtime/components/FormField.vue.d.ts +282 -0
- package/dist/runtime/components/Input.vue +79 -179
- package/dist/runtime/components/Input.vue.d.ts +755 -0
- package/dist/runtime/components/InputMenu.vue +185 -381
- package/dist/runtime/components/InputMenu.vue.d.ts +1523 -0
- package/dist/runtime/components/InputNumber.vue +77 -175
- package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
- package/dist/runtime/components/Kbd.vue +18 -45
- package/dist/runtime/components/Kbd.vue.d.ts +109 -0
- package/dist/runtime/components/Link.vue +92 -173
- package/dist/runtime/components/Link.vue.d.ts +129 -0
- package/dist/runtime/components/LinkBase.vue +33 -42
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +48 -127
- package/dist/runtime/components/Modal.vue.d.ts +327 -0
- package/dist/runtime/components/ModalDialogClose.vue +5 -8
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
- package/dist/runtime/components/Navbar.vue +15 -33
- package/dist/runtime/components/Navbar.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarDivider.vue +15 -33
- package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSection.vue +15 -33
- package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSpacer.vue +15 -33
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/NavigationMenu.vue +74 -208
- package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
- package/dist/runtime/components/OverlayProvider.vue +14 -18
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +40 -81
- package/dist/runtime/components/Popover.vue.d.ts +147 -0
- package/dist/runtime/components/Progress.vue +70 -136
- package/dist/runtime/components/Progress.vue.d.ts +592 -0
- package/dist/runtime/components/RadioGroup.vue +59 -134
- package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
- package/dist/runtime/components/Range.vue +46 -85
- package/dist/runtime/components/Range.vue.d.ts +417 -0
- package/dist/runtime/components/Select.vue +110 -260
- package/dist/runtime/components/Select.vue.d.ts +1201 -0
- package/dist/runtime/components/SelectMenu.vue +161 -347
- package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
- package/dist/runtime/components/Separator.vue +28 -71
- package/dist/runtime/components/Separator.vue.d.ts +400 -0
- package/dist/runtime/components/Sidebar.vue +15 -33
- package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarBody.vue +17 -38
- package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
- package/dist/runtime/components/SidebarFooter.vue +15 -33
- package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeader.vue +15 -33
- package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeading.vue +15 -33
- package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarLayout.vue +34 -70
- package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
- package/dist/runtime/components/SidebarSection.vue +15 -33
- package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarSpacer.vue +15 -33
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/Skeleton.vue +12 -22
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +50 -131
- package/dist/runtime/components/Slideover.vue.d.ts +360 -0
- package/dist/runtime/components/StackedLayout.vue +34 -73
- package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
- package/dist/runtime/components/Switch.vue +46 -95
- package/dist/runtime/components/Switch.vue.d.ts +587 -0
- package/dist/runtime/components/Tabs.vue +37 -105
- package/dist/runtime/components/Tabs.vue.d.ts +453 -0
- package/dist/runtime/components/Textarea.vue +92 -201
- package/dist/runtime/components/Textarea.vue.d.ts +601 -0
- package/dist/runtime/components/Toast.vue +47 -105
- package/dist/runtime/components/Toast.vue.d.ts +438 -0
- package/dist/runtime/components/Toaster.vue +70 -115
- package/dist/runtime/components/Toaster.vue.d.ts +219 -0
- package/dist/runtime/components/Tooltip.vue +36 -64
- package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
- package/dist/runtime/components/content/TableWrapper.vue +24 -70
- package/dist/runtime/components/content/TableWrapper.vue.d.ts +237 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +3 -3
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +14 -7
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/prose/A.vue +12 -23
- package/dist/runtime/prose/A.vue.d.ts +84 -0
- package/dist/runtime/prose/Blockquote.vue +12 -23
- package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
- package/dist/runtime/prose/Code.vue +14 -31
- package/dist/runtime/prose/Code.vue.d.ts +97 -0
- package/dist/runtime/prose/Em.vue +12 -23
- package/dist/runtime/prose/Em.vue.d.ts +84 -0
- package/dist/runtime/prose/H1.vue +12 -23
- package/dist/runtime/prose/H1.vue.d.ts +97 -0
- package/dist/runtime/prose/H2.vue +12 -23
- package/dist/runtime/prose/H2.vue.d.ts +123 -0
- package/dist/runtime/prose/H3.vue +12 -23
- package/dist/runtime/prose/H3.vue.d.ts +123 -0
- package/dist/runtime/prose/H4.vue +12 -23
- package/dist/runtime/prose/H4.vue.d.ts +123 -0
- package/dist/runtime/prose/H5.vue +12 -23
- package/dist/runtime/prose/H5.vue.d.ts +123 -0
- package/dist/runtime/prose/H6.vue +12 -23
- package/dist/runtime/prose/H6.vue.d.ts +123 -0
- package/dist/runtime/prose/Hr.vue +12 -19
- package/dist/runtime/prose/Hr.vue.d.ts +74 -0
- package/dist/runtime/prose/Img.vue +12 -23
- package/dist/runtime/prose/Img.vue.d.ts +77 -0
- package/dist/runtime/prose/Li.vue +12 -23
- package/dist/runtime/prose/Li.vue.d.ts +84 -0
- package/dist/runtime/prose/Ol.vue +12 -23
- package/dist/runtime/prose/Ol.vue.d.ts +84 -0
- package/dist/runtime/prose/P.vue +12 -23
- package/dist/runtime/prose/P.vue.d.ts +84 -0
- package/dist/runtime/prose/Pre.vue +16 -33
- package/dist/runtime/prose/Pre.vue.d.ts +117 -0
- package/dist/runtime/prose/Strong.vue +12 -23
- package/dist/runtime/prose/Strong.vue.d.ts +84 -0
- package/dist/runtime/prose/Table.vue +19 -54
- package/dist/runtime/prose/Table.vue.d.ts +144 -0
- package/dist/runtime/prose/Tbody.vue +12 -23
- package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
- package/dist/runtime/prose/Td.vue +12 -23
- package/dist/runtime/prose/Td.vue.d.ts +84 -0
- package/dist/runtime/prose/Th.vue +12 -23
- package/dist/runtime/prose/Th.vue.d.ts +84 -0
- package/dist/runtime/prose/Thead.vue +12 -23
- package/dist/runtime/prose/Thead.vue.d.ts +84 -0
- package/dist/runtime/prose/Tr.vue +12 -23
- package/dist/runtime/prose/Tr.vue.d.ts +84 -0
- package/dist/runtime/prose/Ul.vue +12 -23
- package/dist/runtime/prose/Ul.vue.d.ts +84 -0
- package/dist/runtime/utils/link.d.ts +3 -3
- package/dist/runtime/vue/components/Link.vue +115 -202
- package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
- package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
- package/dist/types.d.mts +3 -5
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +14 -22
- package/dist/meta.cjs +0 -72112
- package/dist/meta.d.cts +0 -72110
- package/dist/meta.d.ts +0 -72110
- package/dist/module.cjs +0 -63
- package/dist/module.d.cts +0 -15
- package/dist/module.d.ts +0 -15
- package/dist/shared/b24ui-nuxt.DrKwIWoc.cjs +0 -7721
- package/dist/types.d.ts +0 -7
- package/dist/unplugin.cjs +0 -236
- package/dist/unplugin.d.cts +0 -33
- package/dist/unplugin.d.ts +0 -33
- package/dist/vite.cjs +0 -21
- package/dist/vite.d.cts +0 -14
- package/dist/vite.d.ts +0 -14
|
@@ -1,81 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { tv } from '../utils/tv'
|
|
6
|
-
import type { KbdProps, AvatarProps, DropdownMenuItem, DropdownMenuSlots, IconComponent } from '../types'
|
|
7
|
-
import type { ArrayOrNested, NestedItem } from '../types/utils'
|
|
8
|
-
|
|
9
|
-
const _dropdownMenu = tv(theme)()
|
|
10
|
-
|
|
11
|
-
interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> extends Omit<RekaDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
|
|
12
|
-
items?: T
|
|
13
|
-
portal?: boolean
|
|
14
|
-
sub?: boolean
|
|
15
|
-
labelKey: keyof NestedItem<T>
|
|
16
|
-
/**
|
|
17
|
-
* @IconComponent
|
|
18
|
-
*/
|
|
19
|
-
checkedIcon?: IconComponent
|
|
20
|
-
/**
|
|
21
|
-
* @IconComponent
|
|
22
|
-
*/
|
|
23
|
-
externalIcon?: boolean | IconComponent
|
|
24
|
-
class?: any
|
|
25
|
-
b24ui: typeof _dropdownMenu
|
|
26
|
-
b24uiOverride?: any
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface DropdownMenuContentEmits extends RekaDropdownMenuContentEmits {}
|
|
30
|
-
|
|
31
|
-
type DropdownMenuContentSlots<T extends ArrayOrNested<DropdownMenuItem>> = Omit<DropdownMenuSlots<T>, 'default'> & {
|
|
32
|
-
default(props?: {}): any
|
|
33
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/b24ui/dropdown-menu";
|
|
3
|
+
import { tv } from "../utils/tv";
|
|
4
|
+
const _dropdownMenu = tv(theme)();
|
|
34
5
|
</script>
|
|
35
6
|
|
|
36
|
-
<script setup
|
|
37
|
-
import { computed } from
|
|
38
|
-
import { DropdownMenu } from
|
|
39
|
-
import { useForwardPropsEmits } from
|
|
40
|
-
import { reactiveOmit, createReusableTemplate } from
|
|
41
|
-
import { useLocale } from
|
|
42
|
-
import { omit, get, isArrayOfArray } from
|
|
43
|
-
import { pickLinkProps } from
|
|
44
|
-
import icons from
|
|
45
|
-
import B24LinkBase from
|
|
46
|
-
import B24Link from
|
|
47
|
-
import B24Avatar from
|
|
48
|
-
import B24Kbd from
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { DropdownMenu } from "reka-ui/namespaced";
|
|
10
|
+
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { reactiveOmit, createReusableTemplate } from "@vueuse/core";
|
|
12
|
+
import { useLocale } from "../composables/useLocale";
|
|
13
|
+
import { omit, get, isArrayOfArray } from "../utils";
|
|
14
|
+
import { pickLinkProps } from "../utils/link";
|
|
15
|
+
import icons from "../dictionary/icons";
|
|
16
|
+
import B24LinkBase from "./LinkBase.vue";
|
|
17
|
+
import B24Link from "./Link.vue";
|
|
18
|
+
import B24Avatar from "./Avatar.vue";
|
|
19
|
+
import B24Kbd from "./Kbd.vue";
|
|
20
|
+
import B24DropdownMenuContent from "./DropdownMenuContent.vue";
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
items: { type: null, required: false },
|
|
23
|
+
portal: { type: Boolean, required: false },
|
|
24
|
+
sub: { type: Boolean, required: false },
|
|
25
|
+
labelKey: { type: null, required: true },
|
|
26
|
+
checkedIcon: { type: [Function, Object], required: false },
|
|
27
|
+
externalIcon: { type: [Boolean, Function, Object], required: false },
|
|
28
|
+
class: { type: null, required: false },
|
|
29
|
+
b24ui: { type: null, required: true },
|
|
30
|
+
b24uiOverride: { type: null, required: false },
|
|
31
|
+
loop: { type: Boolean, required: false },
|
|
32
|
+
side: { type: null, required: false },
|
|
33
|
+
sideOffset: { type: Number, required: false },
|
|
34
|
+
align: { type: null, required: false },
|
|
35
|
+
alignOffset: { type: Number, required: false },
|
|
36
|
+
avoidCollisions: { type: Boolean, required: false },
|
|
37
|
+
collisionBoundary: { type: null, required: false },
|
|
38
|
+
collisionPadding: { type: [Number, Object], required: false },
|
|
39
|
+
arrowPadding: { type: Number, required: false },
|
|
40
|
+
sticky: { type: String, required: false },
|
|
41
|
+
hideWhenDetached: { type: Boolean, required: false },
|
|
42
|
+
positionStrategy: { type: String, required: false },
|
|
43
|
+
updatePositionStrategy: { type: String, required: false },
|
|
44
|
+
disableUpdateOnLayoutShift: { type: Boolean, required: false },
|
|
45
|
+
prioritizePosition: { type: Boolean, required: false },
|
|
46
|
+
reference: { type: null, required: false }
|
|
47
|
+
});
|
|
48
|
+
const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "closeAutoFocus"]);
|
|
49
|
+
const slots = defineSlots();
|
|
50
|
+
const { dir } = useLocale();
|
|
51
|
+
const contentProps = useForwardPropsEmits(reactiveOmit(props, "sub", "items", "portal", "labelKey", "checkedIcon", "externalIcon", "class", "b24ui", "b24uiOverride"), emits);
|
|
52
|
+
const proxySlots = omit(slots, ["default"]);
|
|
53
|
+
const getLabel = (item) => {
|
|
54
|
+
return get(item, props.labelKey);
|
|
55
|
+
};
|
|
56
|
+
const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate();
|
|
57
|
+
const childrenIcon = computed(() => dir.value === "rtl" ? icons.chevronLeft : icons.chevronRight);
|
|
58
|
+
const groups = computed(
|
|
59
|
+
() => props.items?.length ? isArrayOfArray(props.items) ? props.items : [props.items] : []
|
|
60
|
+
);
|
|
73
61
|
</script>
|
|
74
62
|
|
|
75
63
|
<template>
|
|
76
64
|
<DefineItemTemplate v-slot="{ item, active, index }">
|
|
77
|
-
<slot :name="
|
|
78
|
-
<slot :name="
|
|
65
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
66
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
|
|
79
67
|
<Component
|
|
80
68
|
:is="icons.loading"
|
|
81
69
|
v-if="item.loading"
|
|
@@ -88,14 +76,14 @@ const groups = computed<DropdownMenuItem[][]>(() =>
|
|
|
88
76
|
/>
|
|
89
77
|
<B24Avatar
|
|
90
78
|
v-else-if="item.avatar"
|
|
91
|
-
:size="
|
|
79
|
+
:size="props.b24uiOverride?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()"
|
|
92
80
|
v-bind="item.avatar"
|
|
93
81
|
:class="b24ui.itemLeadingAvatar({ class: b24uiOverride?.itemLeadingAvatar, active })"
|
|
94
82
|
/>
|
|
95
83
|
</slot>
|
|
96
84
|
|
|
97
|
-
<span v-if="getLabel(item) || !!slots[
|
|
98
|
-
<slot :name="
|
|
85
|
+
<span v-if="getLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="b24ui.itemLabel({ class: b24uiOverride?.itemLabel, active })">
|
|
86
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
|
|
99
87
|
{{ getLabel(item) }}
|
|
100
88
|
</slot>
|
|
101
89
|
<Component
|
|
@@ -106,14 +94,14 @@ const groups = computed<DropdownMenuItem[][]>(() =>
|
|
|
106
94
|
</span>
|
|
107
95
|
|
|
108
96
|
<span :class="b24ui.itemTrailing({ class: b24uiOverride?.itemTrailing })">
|
|
109
|
-
<slot :name="
|
|
97
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
|
|
110
98
|
<Component
|
|
111
99
|
:is="childrenIcon"
|
|
112
100
|
v-if="item.children?.length"
|
|
113
101
|
:class="b24ui.itemTrailingIcon({ class: b24uiOverride?.itemTrailingIcon, color: item?.color, active })"
|
|
114
102
|
/>
|
|
115
103
|
<span v-else-if="item.kbds?.length" :class="b24ui.itemTrailingKbds({ class: b24uiOverride?.itemTrailingKbds })">
|
|
116
|
-
<B24Kbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="
|
|
104
|
+
<B24Kbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="props.b24uiOverride?.itemTrailingKbdsSize || b24ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
|
|
117
105
|
</span>
|
|
118
106
|
</slot>
|
|
119
107
|
|
|
@@ -152,7 +140,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
|
|
|
152
140
|
:b24ui="b24ui"
|
|
153
141
|
:b24ui-override="b24uiOverride"
|
|
154
142
|
:portal="portal"
|
|
155
|
-
:items="
|
|
143
|
+
:items="item.children"
|
|
156
144
|
align="start"
|
|
157
145
|
:align-offset="-4"
|
|
158
146
|
:side-offset="3"
|
|
@@ -162,7 +150,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
|
|
|
162
150
|
v-bind="item.content"
|
|
163
151
|
>
|
|
164
152
|
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
165
|
-
<slot :name="
|
|
153
|
+
<slot :name="name" v-bind="slotData" />
|
|
166
154
|
</template>
|
|
167
155
|
</B24DropdownMenuContent>
|
|
168
156
|
</DropdownMenu.Sub>
|
|
@@ -184,7 +172,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
|
|
|
184
172
|
:text-value="getLabel(item)"
|
|
185
173
|
@select="item.onSelect"
|
|
186
174
|
>
|
|
187
|
-
<B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item
|
|
175
|
+
<B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
188
176
|
<B24LinkBase
|
|
189
177
|
v-bind="slotProps"
|
|
190
178
|
:class="b24ui.item({ class: [b24uiOverride?.item, item.class], color: item?.color, active })"
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import type { DropdownMenuContentProps as RekaDropdownMenuContentProps } from 'reka-ui';
|
|
2
|
+
import type { DropdownMenuItem, DropdownMenuSlots, IconComponent } from '../types';
|
|
3
|
+
import type { ArrayOrNested, NestedItem } from '../types/utils';
|
|
4
|
+
declare const _dropdownMenu: {
|
|
5
|
+
content: (slotProps?: ({
|
|
6
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
7
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
8
|
+
active?: boolean | undefined;
|
|
9
|
+
loading?: boolean | undefined;
|
|
10
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
11
|
+
arrow: (slotProps?: ({
|
|
12
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
13
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
14
|
+
active?: boolean | undefined;
|
|
15
|
+
loading?: boolean | undefined;
|
|
16
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
17
|
+
group: (slotProps?: ({
|
|
18
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
19
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
20
|
+
active?: boolean | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
23
|
+
label: (slotProps?: ({
|
|
24
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
25
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
26
|
+
active?: boolean | undefined;
|
|
27
|
+
loading?: boolean | undefined;
|
|
28
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
29
|
+
separator: (slotProps?: ({
|
|
30
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
31
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
32
|
+
active?: boolean | undefined;
|
|
33
|
+
loading?: boolean | undefined;
|
|
34
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
35
|
+
item: (slotProps?: ({
|
|
36
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
37
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
38
|
+
active?: boolean | undefined;
|
|
39
|
+
loading?: boolean | undefined;
|
|
40
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
41
|
+
itemLeadingIcon: (slotProps?: ({
|
|
42
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
43
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
44
|
+
active?: boolean | undefined;
|
|
45
|
+
loading?: boolean | undefined;
|
|
46
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
47
|
+
itemLeadingAvatar: (slotProps?: ({
|
|
48
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
49
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
50
|
+
active?: boolean | undefined;
|
|
51
|
+
loading?: boolean | undefined;
|
|
52
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
53
|
+
itemLeadingAvatarSize: (slotProps?: ({
|
|
54
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
55
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
56
|
+
active?: boolean | undefined;
|
|
57
|
+
loading?: boolean | undefined;
|
|
58
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
59
|
+
itemTrailing: (slotProps?: ({
|
|
60
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
61
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
62
|
+
active?: boolean | undefined;
|
|
63
|
+
loading?: boolean | undefined;
|
|
64
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
65
|
+
itemTrailingIcon: (slotProps?: ({
|
|
66
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
67
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
68
|
+
active?: boolean | undefined;
|
|
69
|
+
loading?: boolean | undefined;
|
|
70
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
71
|
+
itemTrailingKbds: (slotProps?: ({
|
|
72
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
73
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
74
|
+
active?: boolean | undefined;
|
|
75
|
+
loading?: boolean | undefined;
|
|
76
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
77
|
+
itemTrailingKbdsSize: (slotProps?: ({
|
|
78
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
79
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
80
|
+
active?: boolean | undefined;
|
|
81
|
+
loading?: boolean | undefined;
|
|
82
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
83
|
+
itemLabel: (slotProps?: ({
|
|
84
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
85
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
86
|
+
active?: boolean | undefined;
|
|
87
|
+
loading?: boolean | undefined;
|
|
88
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
89
|
+
itemLabelExternalIcon: (slotProps?: ({
|
|
90
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
91
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
92
|
+
active?: boolean | undefined;
|
|
93
|
+
loading?: boolean | undefined;
|
|
94
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
95
|
+
} & {
|
|
96
|
+
content: (slotProps?: ({
|
|
97
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
98
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
99
|
+
active?: boolean | undefined;
|
|
100
|
+
loading?: boolean | undefined;
|
|
101
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
102
|
+
arrow: (slotProps?: ({
|
|
103
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
104
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
105
|
+
active?: boolean | undefined;
|
|
106
|
+
loading?: boolean | undefined;
|
|
107
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
108
|
+
group: (slotProps?: ({
|
|
109
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
110
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
111
|
+
active?: boolean | undefined;
|
|
112
|
+
loading?: boolean | undefined;
|
|
113
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
114
|
+
label: (slotProps?: ({
|
|
115
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
116
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
117
|
+
active?: boolean | undefined;
|
|
118
|
+
loading?: boolean | undefined;
|
|
119
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
120
|
+
separator: (slotProps?: ({
|
|
121
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
122
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
123
|
+
active?: boolean | undefined;
|
|
124
|
+
loading?: boolean | undefined;
|
|
125
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
126
|
+
item: (slotProps?: ({
|
|
127
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
128
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
129
|
+
active?: boolean | undefined;
|
|
130
|
+
loading?: boolean | undefined;
|
|
131
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
132
|
+
itemLeadingIcon: (slotProps?: ({
|
|
133
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
134
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
135
|
+
active?: boolean | undefined;
|
|
136
|
+
loading?: boolean | undefined;
|
|
137
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
138
|
+
itemLeadingAvatar: (slotProps?: ({
|
|
139
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
140
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
141
|
+
active?: boolean | undefined;
|
|
142
|
+
loading?: boolean | undefined;
|
|
143
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
144
|
+
itemLeadingAvatarSize: (slotProps?: ({
|
|
145
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
146
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
147
|
+
active?: boolean | undefined;
|
|
148
|
+
loading?: boolean | undefined;
|
|
149
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
150
|
+
itemTrailing: (slotProps?: ({
|
|
151
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
152
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
153
|
+
active?: boolean | undefined;
|
|
154
|
+
loading?: boolean | undefined;
|
|
155
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
156
|
+
itemTrailingIcon: (slotProps?: ({
|
|
157
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
158
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
159
|
+
active?: boolean | undefined;
|
|
160
|
+
loading?: boolean | undefined;
|
|
161
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
162
|
+
itemTrailingKbds: (slotProps?: ({
|
|
163
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
164
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
165
|
+
active?: boolean | undefined;
|
|
166
|
+
loading?: boolean | undefined;
|
|
167
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
168
|
+
itemTrailingKbdsSize: (slotProps?: ({
|
|
169
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
170
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
171
|
+
active?: boolean | undefined;
|
|
172
|
+
loading?: boolean | undefined;
|
|
173
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
174
|
+
itemLabel: (slotProps?: ({
|
|
175
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
176
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
177
|
+
active?: boolean | undefined;
|
|
178
|
+
loading?: boolean | undefined;
|
|
179
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
180
|
+
itemLabelExternalIcon: (slotProps?: ({
|
|
181
|
+
size?: "md" | "xs" | "sm" | "lg" | undefined;
|
|
182
|
+
color?: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | undefined;
|
|
183
|
+
active?: boolean | undefined;
|
|
184
|
+
loading?: boolean | undefined;
|
|
185
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
186
|
+
} & {};
|
|
187
|
+
interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> extends Omit<RekaDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
|
|
188
|
+
items?: T;
|
|
189
|
+
portal?: boolean;
|
|
190
|
+
sub?: boolean;
|
|
191
|
+
labelKey: keyof NestedItem<T>;
|
|
192
|
+
/**
|
|
193
|
+
* @IconComponent
|
|
194
|
+
*/
|
|
195
|
+
checkedIcon?: IconComponent;
|
|
196
|
+
/**
|
|
197
|
+
* @IconComponent
|
|
198
|
+
*/
|
|
199
|
+
externalIcon?: boolean | IconComponent;
|
|
200
|
+
class?: any;
|
|
201
|
+
b24ui: typeof _dropdownMenu;
|
|
202
|
+
b24uiOverride?: any;
|
|
203
|
+
}
|
|
204
|
+
declare const _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
205
|
+
props: __VLS_PrettifyLocal<any & DropdownMenuContentProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
|
|
206
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
207
|
+
attrs: any;
|
|
208
|
+
slots: Readonly<Omit<DropdownMenuSlots<T>, "default"> & {
|
|
209
|
+
default(props?: {}): any;
|
|
210
|
+
}> & Omit<DropdownMenuSlots<T>, "default"> & {
|
|
211
|
+
default(props?: {}): any;
|
|
212
|
+
};
|
|
213
|
+
emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: CustomEvent<{
|
|
214
|
+
originalEvent: PointerEvent;
|
|
215
|
+
}>) => void) & ((evt: "focusOutside", event: CustomEvent<{
|
|
216
|
+
originalEvent: FocusEvent;
|
|
217
|
+
}>) => void) & ((evt: "interactOutside", event: CustomEvent<{
|
|
218
|
+
originalEvent: PointerEvent;
|
|
219
|
+
}> | CustomEvent<{
|
|
220
|
+
originalEvent: FocusEvent;
|
|
221
|
+
}>) => void) & ((evt: "closeAutoFocus", event: Event) => void);
|
|
222
|
+
}>) => import("vue").VNode & {
|
|
223
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
224
|
+
};
|
|
225
|
+
export default _default;
|
|
226
|
+
type __VLS_PrettifyLocal<T> = {
|
|
227
|
+
[K in keyof T]: T[K];
|
|
228
|
+
} & {};
|