@bitrix24/b24ui-nuxt 0.5.8 → 0.5.10

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 (197) hide show
  1. package/.nuxt/b24ui/navigation-menu.ts +0 -2
  2. package/.nuxt/b24ui/popover.ts +1 -1
  3. package/.nuxt/b24ui/textarea.ts +43 -0
  4. package/dist/meta.d.mts +5090 -4900
  5. package/dist/meta.mjs +5090 -4900
  6. package/dist/module.json +5 -5
  7. package/dist/module.mjs +11 -7
  8. package/dist/runtime/components/Advice.vue +47 -54
  9. package/dist/runtime/components/Advice.vue.d.ts +170 -0
  10. package/dist/runtime/components/Alert.vue +71 -96
  11. package/dist/runtime/components/Alert.vue.d.ts +464 -0
  12. package/dist/runtime/components/App.vue +37 -34
  13. package/dist/runtime/components/App.vue.d.ts +23 -0
  14. package/dist/runtime/components/Avatar.vue +69 -81
  15. package/dist/runtime/components/Avatar.vue.d.ts +281 -0
  16. package/dist/runtime/components/AvatarGroup.vue +53 -76
  17. package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
  18. package/dist/runtime/components/Badge.vue +83 -83
  19. package/dist/runtime/components/Badge.vue.d.ts +517 -0
  20. package/dist/runtime/components/Button.vue +219 -149
  21. package/dist/runtime/components/Button.vue.d.ts +640 -0
  22. package/dist/runtime/components/ButtonGroup.vue +35 -51
  23. package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
  24. package/dist/runtime/components/Calendar.vue +186 -152
  25. package/dist/runtime/components/Calendar.vue.d.ts +437 -0
  26. package/dist/runtime/components/Checkbox.vue +84 -73
  27. package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
  28. package/dist/runtime/components/Chip.vue +59 -74
  29. package/dist/runtime/components/Chip.vue.d.ts +271 -0
  30. package/dist/runtime/components/Collapsible.vue +44 -41
  31. package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
  32. package/dist/runtime/components/Container.vue +18 -27
  33. package/dist/runtime/components/Container.vue.d.ts +27 -0
  34. package/dist/runtime/components/Countdown.vue +198 -378
  35. package/dist/runtime/components/Countdown.vue.d.ts +356 -0
  36. package/dist/runtime/components/DescriptionList.vue +102 -149
  37. package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
  38. package/dist/runtime/components/DropdownMenu.vue +83 -139
  39. package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
  40. package/dist/runtime/components/DropdownMenuContent.vue +137 -81
  41. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
  42. package/dist/runtime/components/Form.vue +162 -216
  43. package/dist/runtime/components/Form.vue.d.ts +55 -0
  44. package/dist/runtime/components/FormField.vue +76 -80
  45. package/dist/runtime/components/FormField.vue.d.ts +282 -0
  46. package/dist/runtime/components/Input.vue +166 -185
  47. package/dist/runtime/components/Input.vue.d.ts +755 -0
  48. package/dist/runtime/components/InputMenu.vue +300 -381
  49. package/dist/runtime/components/InputMenu.vue.d.ts +1504 -0
  50. package/dist/runtime/components/InputNumber.vue +180 -177
  51. package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
  52. package/dist/runtime/components/Kbd.vue +33 -45
  53. package/dist/runtime/components/Kbd.vue.d.ts +109 -0
  54. package/dist/runtime/components/Link.vue +179 -173
  55. package/dist/runtime/components/Link.vue.d.ts +129 -0
  56. package/dist/runtime/components/LinkBase.vue +64 -42
  57. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  58. package/dist/runtime/components/Modal.vue +105 -127
  59. package/dist/runtime/components/Modal.vue.d.ts +327 -0
  60. package/dist/runtime/components/ModalDialogClose.vue +4 -8
  61. package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
  62. package/dist/runtime/components/Navbar.vue +24 -33
  63. package/dist/runtime/components/Navbar.vue.d.ts +101 -0
  64. package/dist/runtime/components/NavbarDivider.vue +24 -33
  65. package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
  66. package/dist/runtime/components/NavbarSection.vue +24 -33
  67. package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
  68. package/dist/runtime/components/NavbarSpacer.vue +24 -33
  69. package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
  70. package/dist/runtime/components/NavigationMenu.vue +152 -216
  71. package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
  72. package/dist/runtime/components/OverlayProvider.vue +13 -17
  73. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  74. package/dist/runtime/components/Popover.vue +81 -81
  75. package/dist/runtime/components/Popover.vue.d.ts +147 -0
  76. package/dist/runtime/components/Progress.vue +109 -136
  77. package/dist/runtime/components/Progress.vue.d.ts +592 -0
  78. package/dist/runtime/components/RadioGroup.vue +120 -134
  79. package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
  80. package/dist/runtime/components/Range.vue +94 -85
  81. package/dist/runtime/components/Range.vue.d.ts +417 -0
  82. package/dist/runtime/components/Select.vue +212 -260
  83. package/dist/runtime/components/Select.vue.d.ts +1200 -0
  84. package/dist/runtime/components/SelectMenu.vue +272 -366
  85. package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
  86. package/dist/runtime/components/Separator.vue +61 -71
  87. package/dist/runtime/components/Separator.vue.d.ts +400 -0
  88. package/dist/runtime/components/Sidebar.vue +24 -33
  89. package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
  90. package/dist/runtime/components/SidebarBody.vue +30 -38
  91. package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
  92. package/dist/runtime/components/SidebarFooter.vue +24 -33
  93. package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
  94. package/dist/runtime/components/SidebarHeader.vue +24 -33
  95. package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
  96. package/dist/runtime/components/SidebarHeading.vue +24 -33
  97. package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
  98. package/dist/runtime/components/SidebarLayout.vue +40 -70
  99. package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
  100. package/dist/runtime/components/SidebarSection.vue +24 -33
  101. package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
  102. package/dist/runtime/components/SidebarSpacer.vue +24 -33
  103. package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
  104. package/dist/runtime/components/Skeleton.vue +17 -22
  105. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  106. package/dist/runtime/components/Slideover.vue +108 -131
  107. package/dist/runtime/components/Slideover.vue.d.ts +360 -0
  108. package/dist/runtime/components/StackedLayout.vue +40 -73
  109. package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
  110. package/dist/runtime/components/Switch.vue +100 -95
  111. package/dist/runtime/components/Switch.vue.d.ts +587 -0
  112. package/dist/runtime/components/Tabs.vue +83 -105
  113. package/dist/runtime/components/Tabs.vue.d.ts +453 -0
  114. package/dist/runtime/components/Textarea.vue +215 -203
  115. package/dist/runtime/components/Textarea.vue.d.ts +601 -0
  116. package/dist/runtime/components/Toast.vue +94 -105
  117. package/dist/runtime/components/Toast.vue.d.ts +438 -0
  118. package/dist/runtime/components/Toaster.vue +94 -111
  119. package/dist/runtime/components/Toaster.vue.d.ts +219 -0
  120. package/dist/runtime/components/Tooltip.vue +78 -64
  121. package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
  122. package/dist/runtime/components/content/TableWrapper.vue +58 -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 +1 -1
  128. package/dist/runtime/prose/A.vue +18 -23
  129. package/dist/runtime/prose/A.vue.d.ts +84 -0
  130. package/dist/runtime/prose/Blockquote.vue +18 -23
  131. package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
  132. package/dist/runtime/prose/Code.vue +23 -31
  133. package/dist/runtime/prose/Code.vue.d.ts +97 -0
  134. package/dist/runtime/prose/Em.vue +18 -23
  135. package/dist/runtime/prose/Em.vue.d.ts +84 -0
  136. package/dist/runtime/prose/H1.vue +18 -23
  137. package/dist/runtime/prose/H1.vue.d.ts +97 -0
  138. package/dist/runtime/prose/H2.vue +18 -23
  139. package/dist/runtime/prose/H2.vue.d.ts +123 -0
  140. package/dist/runtime/prose/H3.vue +18 -23
  141. package/dist/runtime/prose/H3.vue.d.ts +123 -0
  142. package/dist/runtime/prose/H4.vue +18 -23
  143. package/dist/runtime/prose/H4.vue.d.ts +123 -0
  144. package/dist/runtime/prose/H5.vue +18 -23
  145. package/dist/runtime/prose/H5.vue.d.ts +123 -0
  146. package/dist/runtime/prose/H6.vue +18 -23
  147. package/dist/runtime/prose/H6.vue.d.ts +123 -0
  148. package/dist/runtime/prose/Hr.vue +18 -19
  149. package/dist/runtime/prose/Hr.vue.d.ts +74 -0
  150. package/dist/runtime/prose/Img.vue +18 -23
  151. package/dist/runtime/prose/Img.vue.d.ts +77 -0
  152. package/dist/runtime/prose/Li.vue +18 -23
  153. package/dist/runtime/prose/Li.vue.d.ts +84 -0
  154. package/dist/runtime/prose/Ol.vue +18 -23
  155. package/dist/runtime/prose/Ol.vue.d.ts +84 -0
  156. package/dist/runtime/prose/P.vue +18 -23
  157. package/dist/runtime/prose/P.vue.d.ts +84 -0
  158. package/dist/runtime/prose/Pre.vue +28 -33
  159. package/dist/runtime/prose/Pre.vue.d.ts +117 -0
  160. package/dist/runtime/prose/Strong.vue +18 -23
  161. package/dist/runtime/prose/Strong.vue.d.ts +84 -0
  162. package/dist/runtime/prose/Table.vue +44 -54
  163. package/dist/runtime/prose/Table.vue.d.ts +144 -0
  164. package/dist/runtime/prose/Tbody.vue +18 -23
  165. package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
  166. package/dist/runtime/prose/Td.vue +18 -23
  167. package/dist/runtime/prose/Td.vue.d.ts +84 -0
  168. package/dist/runtime/prose/Th.vue +18 -23
  169. package/dist/runtime/prose/Th.vue.d.ts +84 -0
  170. package/dist/runtime/prose/Thead.vue +18 -23
  171. package/dist/runtime/prose/Thead.vue.d.ts +84 -0
  172. package/dist/runtime/prose/Tr.vue +18 -23
  173. package/dist/runtime/prose/Tr.vue.d.ts +84 -0
  174. package/dist/runtime/prose/Ul.vue +18 -23
  175. package/dist/runtime/prose/Ul.vue.d.ts +84 -0
  176. package/dist/runtime/vue/components/Link.vue +201 -202
  177. package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
  178. package/dist/runtime/vue/stubs.d.ts +2 -2
  179. package/dist/shared/{b24ui-nuxt.DBFS6LH7.mjs → b24ui-nuxt.CS9Lf0os.mjs} +54 -4
  180. package/dist/types.d.mts +3 -5
  181. package/dist/unplugin.mjs +1 -1
  182. package/dist/vite.mjs +1 -1
  183. package/package.json +62 -35
  184. package/dist/meta.cjs +0 -71922
  185. package/dist/meta.d.cts +0 -71920
  186. package/dist/meta.d.ts +0 -71920
  187. package/dist/module.cjs +0 -59
  188. package/dist/module.d.cts +0 -15
  189. package/dist/module.d.ts +0 -15
  190. package/dist/shared/b24ui-nuxt.B9fPD5yO.cjs +0 -7671
  191. package/dist/types.d.ts +0 -7
  192. package/dist/unplugin.cjs +0 -236
  193. package/dist/unplugin.d.cts +0 -33
  194. package/dist/unplugin.d.ts +0 -33
  195. package/dist/vite.cjs +0 -21
  196. package/dist/vite.d.cts +0 -14
  197. package/dist/vite.d.ts +0 -14
@@ -1,78 +1,134 @@
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
-
60
- const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: DropdownMenuItem, active?: boolean, index: number }>()
61
-
62
- const childrenIcon = computed(() => dir.value === 'rtl' ? icons.chevronLeft : icons.chevronRight)
63
- const groups = computed<DropdownMenuItem[][]>(() =>
64
- props.items?.length
65
- ? isArrayOfArray(props.items)
66
- ? props.items
67
- : [props.items]
68
- : []
69
- )
7
+ <script setup>
8
+ import { computed } from "vue";
9
+ import { useForwardPropsEmits } from "reka-ui";
10
+ import { reactiveOmit, createReusableTemplate } from "@vueuse/core";
11
+ import { useLocale } from "../composables/useLocale";
12
+ import { omit, isArrayOfArray } from "../utils";
13
+ import icons from "../dictionary/icons";
14
+ const props = defineProps({
15
+ items: {
16
+ type: null,
17
+ required: false
18
+ },
19
+ portal: {
20
+ type: Boolean,
21
+ required: false
22
+ },
23
+ sub: {
24
+ type: Boolean,
25
+ required: false
26
+ },
27
+ labelKey: {
28
+ type: null,
29
+ required: true
30
+ },
31
+ checkedIcon: {
32
+ type: [Function, Object],
33
+ required: false
34
+ },
35
+ externalIcon: {
36
+ type: [Boolean, Function, Object],
37
+ required: false
38
+ },
39
+ class: {
40
+ type: null,
41
+ required: false
42
+ },
43
+ b24ui: {
44
+ type: null,
45
+ required: true
46
+ },
47
+ b24uiOverride: {
48
+ type: null,
49
+ required: false
50
+ },
51
+ loop: {
52
+ type: Boolean,
53
+ required: false
54
+ },
55
+ side: {
56
+ type: null,
57
+ required: false
58
+ },
59
+ sideOffset: {
60
+ type: Number,
61
+ required: false
62
+ },
63
+ align: {
64
+ type: null,
65
+ required: false
66
+ },
67
+ alignOffset: {
68
+ type: Number,
69
+ required: false
70
+ },
71
+ avoidCollisions: {
72
+ type: Boolean,
73
+ required: false
74
+ },
75
+ collisionBoundary: {
76
+ type: null,
77
+ required: false
78
+ },
79
+ collisionPadding: {
80
+ type: [Number, Object],
81
+ required: false
82
+ },
83
+ arrowPadding: {
84
+ type: Number,
85
+ required: false
86
+ },
87
+ sticky: {
88
+ type: String,
89
+ required: false
90
+ },
91
+ hideWhenDetached: {
92
+ type: Boolean,
93
+ required: false
94
+ },
95
+ positionStrategy: {
96
+ type: String,
97
+ required: false
98
+ },
99
+ updatePositionStrategy: {
100
+ type: String,
101
+ required: false
102
+ },
103
+ disableUpdateOnLayoutShift: {
104
+ type: Boolean,
105
+ required: false
106
+ },
107
+ prioritizePosition: {
108
+ type: Boolean,
109
+ required: false
110
+ },
111
+ reference: {
112
+ type: null,
113
+ required: false
114
+ }
115
+ });
116
+ const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "closeAutoFocus"]);
117
+ const slots = defineSlots();
118
+ const { dir } = useLocale();
119
+ const contentProps = useForwardPropsEmits(reactiveOmit(props, "sub", "items", "portal", "labelKey", "checkedIcon", "externalIcon", "class", "b24ui", "b24uiOverride"), emits);
120
+ const proxySlots = omit(slots, ["default"]);
121
+ const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate();
122
+ const childrenIcon = computed(() => dir.value === "rtl" ? icons.chevronLeft : icons.chevronRight);
123
+ const groups = computed(
124
+ () => props.items?.length ? isArrayOfArray(props.items) ? props.items : [props.items] : []
125
+ );
70
126
  </script>
71
127
 
72
128
  <template>
73
129
  <DefineItemTemplate v-slot="{ item, active, index }">
74
- <slot :name="((item.slot || 'item') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :index="index">
75
- <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">
130
+ <slot :name="item.slot || 'item'" :item="item" :index="index">
131
+ <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
76
132
  <Component
77
133
  :is="icons.loading"
78
134
  v-if="item.loading"
@@ -85,15 +141,15 @@ const groups = computed<DropdownMenuItem[][]>(() =>
85
141
  />
86
142
  <B24Avatar
87
143
  v-else-if="item.avatar"
88
- :size="((props.b24uiOverride?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])"
144
+ :size="props.b24uiOverride?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()"
89
145
  v-bind="item.avatar"
90
146
  :class="b24ui.itemLeadingAvatar({ class: b24uiOverride?.itemLeadingAvatar, active })"
91
147
  />
92
148
  </slot>
93
149
 
94
- <span v-if="get(item, props.labelKey as string) || !!slots[(item.slot ? `${item.slot}-label`: 'item-label') as keyof DropdownMenuContentSlots<T>]" :class="b24ui.itemLabel({ class: b24uiOverride?.itemLabel, active })">
95
- <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">
96
- {{ get(item, props.labelKey as string) }}
150
+ <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="b24ui.itemLabel({ class: b24uiOverride?.itemLabel, active })">
151
+ <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
152
+ {{ get(item, props.labelKey) }}
97
153
  </slot>
98
154
  <Component
99
155
  :is="typeof externalIcon !== 'boolean' ? externalIcon : icons.external"
@@ -103,14 +159,14 @@ const groups = computed<DropdownMenuItem[][]>(() =>
103
159
  </span>
104
160
 
105
161
  <span :class="b24ui.itemTrailing({ class: b24uiOverride?.itemTrailing })">
106
- <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">
162
+ <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
107
163
  <Component
108
164
  :is="childrenIcon"
109
165
  v-if="item.children?.length"
110
166
  :class="b24ui.itemTrailingIcon({ class: b24uiOverride?.itemTrailingIcon, color: item?.color, active })"
111
167
  />
112
168
  <span v-else-if="item.kbds?.length" :class="b24ui.itemTrailingKbds({ class: b24uiOverride?.itemTrailingKbds })">
113
- <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" />
169
+ <B24Kbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="props.b24uiOverride?.itemTrailingKbdsSize || b24ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
114
170
  </span>
115
171
  </slot>
116
172
 
@@ -137,7 +193,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
137
193
  as="button"
138
194
  type="button"
139
195
  :disabled="item.disabled"
140
- :text-value="get(item, props.labelKey as string)"
196
+ :text-value="get(item, props.labelKey)"
141
197
  :class="b24ui.item({ class: b24uiOverride?.item, color: item?.color })"
142
198
  >
143
199
  <ReuseItemTemplate :item="item" :index="index" />
@@ -149,7 +205,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
149
205
  :b24ui="b24ui"
150
206
  :b24ui-override="b24uiOverride"
151
207
  :portal="portal"
152
- :items="(item.children as T)"
208
+ :items="item.children"
153
209
  align="start"
154
210
  :align-offset="-4"
155
211
  :side-offset="3"
@@ -159,7 +215,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
159
215
  v-bind="item.content"
160
216
  >
161
217
  <template v-for="(_, name) in proxySlots" #[name]="slotData">
162
- <slot :name="(name as keyof DropdownMenuContentSlots<T>)" v-bind="slotData" />
218
+ <slot :name="name" v-bind="slotData" />
163
219
  </template>
164
220
  </B24DropdownMenuContent>
165
221
  </DropdownMenu.Sub>
@@ -167,7 +223,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
167
223
  v-else-if="item.type === 'checkbox'"
168
224
  :model-value="item.checked"
169
225
  :disabled="item.disabled"
170
- :text-value="get(item, props.labelKey as string)"
226
+ :text-value="get(item, props.labelKey)"
171
227
  :class="b24ui.item({ class: [b24uiOverride?.item, item.class], color: item?.color })"
172
228
  @update:model-value="item.onUpdateChecked"
173
229
  @select="item.onSelect"
@@ -178,10 +234,10 @@ const groups = computed<DropdownMenuItem[][]>(() =>
178
234
  v-else
179
235
  as-child
180
236
  :disabled="item.disabled"
181
- :text-value="get(item, props.labelKey as string)"
237
+ :text-value="get(item, props.labelKey)"
182
238
  @select="item.onSelect"
183
239
  >
184
- <B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item as Omit<DropdownMenuItem, 'type'>)" custom>
240
+ <B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
185
241
  <B24LinkBase
186
242
  v-bind="slotProps"
187
243
  :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
+ } & {};