@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.
Files changed (199) hide show
  1. package/.nuxt/b24ui/input-menu.ts +2 -2
  2. package/.nuxt/b24ui/select-menu.ts +4 -4
  3. package/.nuxt/b24ui/select.ts +2 -2
  4. package/dist/meta.d.mts +5208 -5061
  5. package/dist/meta.mjs +5208 -5061
  6. package/dist/module.json +3 -3
  7. package/dist/module.mjs +2 -2
  8. package/dist/runtime/components/Advice.vue +27 -54
  9. package/dist/runtime/components/Advice.vue.d.ts +170 -0
  10. package/dist/runtime/components/Alert.vue +35 -96
  11. package/dist/runtime/components/Alert.vue.d.ts +464 -0
  12. package/dist/runtime/components/App.vue +24 -34
  13. package/dist/runtime/components/App.vue.d.ts +23 -0
  14. package/dist/runtime/components/Avatar.vue +43 -81
  15. package/dist/runtime/components/Avatar.vue.d.ts +281 -0
  16. package/dist/runtime/components/AvatarGroup.vue +40 -76
  17. package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
  18. package/dist/runtime/components/Badge.vue +40 -83
  19. package/dist/runtime/components/Badge.vue.d.ts +517 -0
  20. package/dist/runtime/components/Button.vue +96 -155
  21. package/dist/runtime/components/Button.vue.d.ts +640 -0
  22. package/dist/runtime/components/ButtonGroup.vue +19 -51
  23. package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
  24. package/dist/runtime/components/Calendar.vue +73 -152
  25. package/dist/runtime/components/Calendar.vue.d.ts +437 -0
  26. package/dist/runtime/components/Checkbox.vue +42 -73
  27. package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
  28. package/dist/runtime/components/Chip.vue +26 -74
  29. package/dist/runtime/components/Chip.vue.d.ts +271 -0
  30. package/dist/runtime/components/Collapsible.vue +22 -41
  31. package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
  32. package/dist/runtime/components/Container.vue +13 -27
  33. package/dist/runtime/components/Container.vue.d.ts +27 -0
  34. package/dist/runtime/components/Countdown.vue +153 -378
  35. package/dist/runtime/components/Countdown.vue.d.ts +356 -0
  36. package/dist/runtime/components/DescriptionList.vue +78 -149
  37. package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
  38. package/dist/runtime/components/DropdownMenu.vue +38 -139
  39. package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
  40. package/dist/runtime/components/DropdownMenuContent.vue +68 -80
  41. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
  42. package/dist/runtime/components/Form.vue +130 -217
  43. package/dist/runtime/components/Form.vue.d.ts +55 -0
  44. package/dist/runtime/components/FormField.vue +36 -80
  45. package/dist/runtime/components/FormField.vue.d.ts +282 -0
  46. package/dist/runtime/components/Input.vue +79 -179
  47. package/dist/runtime/components/Input.vue.d.ts +755 -0
  48. package/dist/runtime/components/InputMenu.vue +185 -381
  49. package/dist/runtime/components/InputMenu.vue.d.ts +1523 -0
  50. package/dist/runtime/components/InputNumber.vue +77 -175
  51. package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
  52. package/dist/runtime/components/Kbd.vue +18 -45
  53. package/dist/runtime/components/Kbd.vue.d.ts +109 -0
  54. package/dist/runtime/components/Link.vue +92 -173
  55. package/dist/runtime/components/Link.vue.d.ts +129 -0
  56. package/dist/runtime/components/LinkBase.vue +33 -42
  57. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  58. package/dist/runtime/components/Modal.vue +48 -127
  59. package/dist/runtime/components/Modal.vue.d.ts +327 -0
  60. package/dist/runtime/components/ModalDialogClose.vue +5 -8
  61. package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
  62. package/dist/runtime/components/Navbar.vue +15 -33
  63. package/dist/runtime/components/Navbar.vue.d.ts +101 -0
  64. package/dist/runtime/components/NavbarDivider.vue +15 -33
  65. package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
  66. package/dist/runtime/components/NavbarSection.vue +15 -33
  67. package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
  68. package/dist/runtime/components/NavbarSpacer.vue +15 -33
  69. package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
  70. package/dist/runtime/components/NavigationMenu.vue +74 -208
  71. package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
  72. package/dist/runtime/components/OverlayProvider.vue +14 -18
  73. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  74. package/dist/runtime/components/Popover.vue +40 -81
  75. package/dist/runtime/components/Popover.vue.d.ts +147 -0
  76. package/dist/runtime/components/Progress.vue +70 -136
  77. package/dist/runtime/components/Progress.vue.d.ts +592 -0
  78. package/dist/runtime/components/RadioGroup.vue +59 -134
  79. package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
  80. package/dist/runtime/components/Range.vue +46 -85
  81. package/dist/runtime/components/Range.vue.d.ts +417 -0
  82. package/dist/runtime/components/Select.vue +110 -260
  83. package/dist/runtime/components/Select.vue.d.ts +1201 -0
  84. package/dist/runtime/components/SelectMenu.vue +161 -347
  85. package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
  86. package/dist/runtime/components/Separator.vue +28 -71
  87. package/dist/runtime/components/Separator.vue.d.ts +400 -0
  88. package/dist/runtime/components/Sidebar.vue +15 -33
  89. package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
  90. package/dist/runtime/components/SidebarBody.vue +17 -38
  91. package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
  92. package/dist/runtime/components/SidebarFooter.vue +15 -33
  93. package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
  94. package/dist/runtime/components/SidebarHeader.vue +15 -33
  95. package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
  96. package/dist/runtime/components/SidebarHeading.vue +15 -33
  97. package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
  98. package/dist/runtime/components/SidebarLayout.vue +34 -70
  99. package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
  100. package/dist/runtime/components/SidebarSection.vue +15 -33
  101. package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
  102. package/dist/runtime/components/SidebarSpacer.vue +15 -33
  103. package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
  104. package/dist/runtime/components/Skeleton.vue +12 -22
  105. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  106. package/dist/runtime/components/Slideover.vue +50 -131
  107. package/dist/runtime/components/Slideover.vue.d.ts +360 -0
  108. package/dist/runtime/components/StackedLayout.vue +34 -73
  109. package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
  110. package/dist/runtime/components/Switch.vue +46 -95
  111. package/dist/runtime/components/Switch.vue.d.ts +587 -0
  112. package/dist/runtime/components/Tabs.vue +37 -105
  113. package/dist/runtime/components/Tabs.vue.d.ts +453 -0
  114. package/dist/runtime/components/Textarea.vue +92 -201
  115. package/dist/runtime/components/Textarea.vue.d.ts +601 -0
  116. package/dist/runtime/components/Toast.vue +47 -105
  117. package/dist/runtime/components/Toast.vue.d.ts +438 -0
  118. package/dist/runtime/components/Toaster.vue +70 -115
  119. package/dist/runtime/components/Toaster.vue.d.ts +219 -0
  120. package/dist/runtime/components/Tooltip.vue +36 -64
  121. package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
  122. package/dist/runtime/components/content/TableWrapper.vue +24 -70
  123. package/dist/runtime/components/content/TableWrapper.vue.d.ts +237 -0
  124. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  125. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  126. package/dist/runtime/composables/useComponentIcons.d.ts +3 -3
  127. package/dist/runtime/composables/useFormField.d.ts +2 -2
  128. package/dist/runtime/composables/useOverlay.d.ts +14 -7
  129. package/dist/runtime/composables/useOverlay.js +14 -6
  130. package/dist/runtime/prose/A.vue +12 -23
  131. package/dist/runtime/prose/A.vue.d.ts +84 -0
  132. package/dist/runtime/prose/Blockquote.vue +12 -23
  133. package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
  134. package/dist/runtime/prose/Code.vue +14 -31
  135. package/dist/runtime/prose/Code.vue.d.ts +97 -0
  136. package/dist/runtime/prose/Em.vue +12 -23
  137. package/dist/runtime/prose/Em.vue.d.ts +84 -0
  138. package/dist/runtime/prose/H1.vue +12 -23
  139. package/dist/runtime/prose/H1.vue.d.ts +97 -0
  140. package/dist/runtime/prose/H2.vue +12 -23
  141. package/dist/runtime/prose/H2.vue.d.ts +123 -0
  142. package/dist/runtime/prose/H3.vue +12 -23
  143. package/dist/runtime/prose/H3.vue.d.ts +123 -0
  144. package/dist/runtime/prose/H4.vue +12 -23
  145. package/dist/runtime/prose/H4.vue.d.ts +123 -0
  146. package/dist/runtime/prose/H5.vue +12 -23
  147. package/dist/runtime/prose/H5.vue.d.ts +123 -0
  148. package/dist/runtime/prose/H6.vue +12 -23
  149. package/dist/runtime/prose/H6.vue.d.ts +123 -0
  150. package/dist/runtime/prose/Hr.vue +12 -19
  151. package/dist/runtime/prose/Hr.vue.d.ts +74 -0
  152. package/dist/runtime/prose/Img.vue +12 -23
  153. package/dist/runtime/prose/Img.vue.d.ts +77 -0
  154. package/dist/runtime/prose/Li.vue +12 -23
  155. package/dist/runtime/prose/Li.vue.d.ts +84 -0
  156. package/dist/runtime/prose/Ol.vue +12 -23
  157. package/dist/runtime/prose/Ol.vue.d.ts +84 -0
  158. package/dist/runtime/prose/P.vue +12 -23
  159. package/dist/runtime/prose/P.vue.d.ts +84 -0
  160. package/dist/runtime/prose/Pre.vue +16 -33
  161. package/dist/runtime/prose/Pre.vue.d.ts +117 -0
  162. package/dist/runtime/prose/Strong.vue +12 -23
  163. package/dist/runtime/prose/Strong.vue.d.ts +84 -0
  164. package/dist/runtime/prose/Table.vue +19 -54
  165. package/dist/runtime/prose/Table.vue.d.ts +144 -0
  166. package/dist/runtime/prose/Tbody.vue +12 -23
  167. package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
  168. package/dist/runtime/prose/Td.vue +12 -23
  169. package/dist/runtime/prose/Td.vue.d.ts +84 -0
  170. package/dist/runtime/prose/Th.vue +12 -23
  171. package/dist/runtime/prose/Th.vue.d.ts +84 -0
  172. package/dist/runtime/prose/Thead.vue +12 -23
  173. package/dist/runtime/prose/Thead.vue.d.ts +84 -0
  174. package/dist/runtime/prose/Tr.vue +12 -23
  175. package/dist/runtime/prose/Tr.vue.d.ts +84 -0
  176. package/dist/runtime/prose/Ul.vue +12 -23
  177. package/dist/runtime/prose/Ul.vue.d.ts +84 -0
  178. package/dist/runtime/utils/link.d.ts +3 -3
  179. package/dist/runtime/vue/components/Link.vue +115 -202
  180. package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
  181. package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
  182. package/dist/types.d.mts +3 -5
  183. package/dist/unplugin.mjs +1 -1
  184. package/dist/vite.mjs +1 -1
  185. package/package.json +14 -22
  186. package/dist/meta.cjs +0 -72112
  187. package/dist/meta.d.cts +0 -72110
  188. package/dist/meta.d.ts +0 -72110
  189. package/dist/module.cjs +0 -63
  190. package/dist/module.d.cts +0 -15
  191. package/dist/module.d.ts +0 -15
  192. package/dist/shared/b24ui-nuxt.DrKwIWoc.cjs +0 -7721
  193. package/dist/types.d.ts +0 -7
  194. package/dist/unplugin.cjs +0 -236
  195. package/dist/unplugin.d.cts +0 -33
  196. package/dist/unplugin.d.ts +0 -33
  197. package/dist/vite.cjs +0 -21
  198. package/dist/vite.d.cts +0 -14
  199. package/dist/vite.d.ts +0 -14
@@ -1,81 +1,69 @@
1
- <!-- eslint-disable vue/block-tag-newline -->
2
- <script lang="ts">
3
- import type { DropdownMenuContentProps as RekaDropdownMenuContentProps, DropdownMenuContentEmits as RekaDropdownMenuContentEmits } from 'reka-ui'
4
- import theme from '#build/b24ui/dropdown-menu'
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 lang="ts" generic="T extends ArrayOrNested<DropdownMenuItem>">
37
- import { computed } from 'vue'
38
- import { DropdownMenu } from 'reka-ui/namespaced'
39
- import { useForwardPropsEmits } from 'reka-ui'
40
- import { reactiveOmit, createReusableTemplate } from '@vueuse/core'
41
- import { useLocale } from '../composables/useLocale'
42
- import { omit, get, isArrayOfArray } from '../utils'
43
- import { pickLinkProps } from '../utils/link'
44
- import icons from '../dictionary/icons'
45
- import B24LinkBase from './LinkBase.vue'
46
- import B24Link from './Link.vue'
47
- import B24Avatar from './Avatar.vue'
48
- import B24Kbd from './Kbd.vue'
49
- // eslint-disable-next-line import/no-self-import
50
- import B24DropdownMenuContent from './DropdownMenuContent.vue'
51
-
52
- const props = defineProps<DropdownMenuContentProps<T>>()
53
- const emits = defineEmits<DropdownMenuContentEmits>()
54
- const slots = defineSlots<DropdownMenuContentSlots<T>>()
55
-
56
- const { dir } = useLocale()
57
- const contentProps = useForwardPropsEmits(reactiveOmit(props, 'sub', 'items', 'portal', 'labelKey', 'checkedIcon', 'externalIcon', 'class', 'b24ui', 'b24uiOverride'), emits)
58
- const proxySlots = omit(slots, ['default'])
59
- const getLabel = (item: DropdownMenuItem) => {
60
- return get(item, props.labelKey as string)
61
- }
62
-
63
- const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: DropdownMenuItem, active?: boolean, index: number }>()
64
-
65
- const childrenIcon = computed(() => dir.value === 'rtl' ? icons.chevronLeft : icons.chevronRight)
66
- const groups = computed<DropdownMenuItem[][]>(() =>
67
- props.items?.length
68
- ? isArrayOfArray(props.items)
69
- ? props.items
70
- : [props.items]
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="((item.slot || 'item') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :index="index">
78
- <slot :name="((item.slot ? `${item.slot}-leading`: 'item-leading') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
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="((props.b24uiOverride?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['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[(item.slot ? `${item.slot}-label`: 'item-label') as keyof DropdownMenuContentSlots<T>]" :class="b24ui.itemLabel({ class: b24uiOverride?.itemLabel, active })">
98
- <slot :name="((item.slot ? `${item.slot}-label`: 'item-label') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
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="((item.slot ? `${item.slot}-trailing`: 'item-trailing') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
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="((props.b24uiOverride?.itemTrailingKbdsSize || b24ui.itemTrailingKbdsSize()) as KbdProps['size'])" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
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="(item.children as T)"
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="(name as keyof DropdownMenuContentSlots<T>)" v-bind="slotData" />
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 as Omit<DropdownMenuItem, 'type'>)" custom>
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
+ } & {};