@bitrix24/b24ui-nuxt 0.5.10 → 0.5.11

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 (190) hide show
  1. package/dist/meta.cjs +72112 -0
  2. package/dist/meta.d.cts +72110 -0
  3. package/dist/meta.d.mts +5060 -5060
  4. package/dist/meta.d.ts +72110 -0
  5. package/dist/meta.mjs +5060 -5060
  6. package/dist/module.cjs +63 -0
  7. package/dist/module.d.cts +15 -0
  8. package/dist/module.d.ts +15 -0
  9. package/dist/module.json +3 -3
  10. package/dist/module.mjs +1 -1
  11. package/dist/runtime/components/Advice.vue +54 -47
  12. package/dist/runtime/components/Alert.vue +96 -71
  13. package/dist/runtime/components/App.vue +34 -37
  14. package/dist/runtime/components/Avatar.vue +81 -69
  15. package/dist/runtime/components/AvatarGroup.vue +76 -53
  16. package/dist/runtime/components/Badge.vue +83 -83
  17. package/dist/runtime/components/Button.vue +157 -220
  18. package/dist/runtime/components/ButtonGroup.vue +51 -35
  19. package/dist/runtime/components/Calendar.vue +152 -186
  20. package/dist/runtime/components/Checkbox.vue +73 -84
  21. package/dist/runtime/components/Chip.vue +74 -59
  22. package/dist/runtime/components/Collapsible.vue +41 -44
  23. package/dist/runtime/components/Container.vue +27 -18
  24. package/dist/runtime/components/Countdown.vue +378 -198
  25. package/dist/runtime/components/DescriptionList.vue +149 -102
  26. package/dist/runtime/components/DropdownMenu.vue +139 -83
  27. package/dist/runtime/components/DropdownMenuContent.vue +84 -137
  28. package/dist/runtime/components/Form.vue +216 -162
  29. package/dist/runtime/components/FormField.vue +80 -76
  30. package/dist/runtime/components/Input.vue +179 -160
  31. package/dist/runtime/components/InputMenu.vue +380 -300
  32. package/dist/runtime/components/InputNumber.vue +175 -178
  33. package/dist/runtime/components/Kbd.vue +45 -33
  34. package/dist/runtime/components/Link.vue +173 -179
  35. package/dist/runtime/components/LinkBase.vue +42 -64
  36. package/dist/runtime/components/Modal.vue +127 -105
  37. package/dist/runtime/components/ModalDialogClose.vue +8 -4
  38. package/dist/runtime/components/Navbar.vue +33 -24
  39. package/dist/runtime/components/NavbarDivider.vue +33 -24
  40. package/dist/runtime/components/NavbarSection.vue +33 -24
  41. package/dist/runtime/components/NavbarSpacer.vue +33 -24
  42. package/dist/runtime/components/NavigationMenu.vue +210 -144
  43. package/dist/runtime/components/OverlayProvider.vue +17 -13
  44. package/dist/runtime/components/Popover.vue +81 -81
  45. package/dist/runtime/components/Progress.vue +136 -109
  46. package/dist/runtime/components/RadioGroup.vue +134 -120
  47. package/dist/runtime/components/Range.vue +85 -94
  48. package/dist/runtime/components/Select.vue +260 -212
  49. package/dist/runtime/components/SelectMenu.vue +365 -272
  50. package/dist/runtime/components/Separator.vue +71 -61
  51. package/dist/runtime/components/Sidebar.vue +33 -24
  52. package/dist/runtime/components/SidebarBody.vue +38 -30
  53. package/dist/runtime/components/SidebarFooter.vue +33 -24
  54. package/dist/runtime/components/SidebarHeader.vue +33 -24
  55. package/dist/runtime/components/SidebarHeading.vue +33 -24
  56. package/dist/runtime/components/SidebarLayout.vue +70 -40
  57. package/dist/runtime/components/SidebarSection.vue +33 -24
  58. package/dist/runtime/components/SidebarSpacer.vue +33 -24
  59. package/dist/runtime/components/Skeleton.vue +22 -17
  60. package/dist/runtime/components/Slideover.vue +131 -108
  61. package/dist/runtime/components/StackedLayout.vue +73 -40
  62. package/dist/runtime/components/Switch.vue +95 -100
  63. package/dist/runtime/components/Tabs.vue +107 -81
  64. package/dist/runtime/components/Textarea.vue +201 -177
  65. package/dist/runtime/components/Toast.vue +105 -94
  66. package/dist/runtime/components/Toaster.vue +116 -94
  67. package/dist/runtime/components/Tooltip.vue +64 -78
  68. package/dist/runtime/components/content/TableWrapper.vue +70 -58
  69. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  70. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  71. package/dist/runtime/composables/useComponentIcons.d.ts +3 -3
  72. package/dist/runtime/composables/useFormField.d.ts +1 -1
  73. package/dist/runtime/prose/A.vue +23 -18
  74. package/dist/runtime/prose/Blockquote.vue +23 -18
  75. package/dist/runtime/prose/Code.vue +31 -23
  76. package/dist/runtime/prose/Em.vue +23 -18
  77. package/dist/runtime/prose/H1.vue +23 -18
  78. package/dist/runtime/prose/H2.vue +23 -18
  79. package/dist/runtime/prose/H3.vue +23 -18
  80. package/dist/runtime/prose/H4.vue +23 -18
  81. package/dist/runtime/prose/H5.vue +23 -18
  82. package/dist/runtime/prose/H6.vue +23 -18
  83. package/dist/runtime/prose/Hr.vue +19 -18
  84. package/dist/runtime/prose/Img.vue +23 -18
  85. package/dist/runtime/prose/Li.vue +23 -18
  86. package/dist/runtime/prose/Ol.vue +23 -18
  87. package/dist/runtime/prose/P.vue +23 -18
  88. package/dist/runtime/prose/Pre.vue +33 -28
  89. package/dist/runtime/prose/Strong.vue +23 -18
  90. package/dist/runtime/prose/Table.vue +54 -44
  91. package/dist/runtime/prose/Tbody.vue +23 -18
  92. package/dist/runtime/prose/Td.vue +23 -18
  93. package/dist/runtime/prose/Th.vue +23 -18
  94. package/dist/runtime/prose/Thead.vue +23 -18
  95. package/dist/runtime/prose/Tr.vue +23 -18
  96. package/dist/runtime/prose/Ul.vue +23 -18
  97. package/dist/runtime/vue/components/Link.vue +202 -201
  98. package/dist/shared/b24ui-nuxt.DrKwIWoc.cjs +7721 -0
  99. package/dist/types.d.mts +5 -3
  100. package/dist/types.d.ts +7 -0
  101. package/dist/unplugin.cjs +236 -0
  102. package/dist/unplugin.d.cts +33 -0
  103. package/dist/unplugin.d.ts +33 -0
  104. package/dist/vite.cjs +21 -0
  105. package/dist/vite.d.cts +14 -0
  106. package/dist/vite.d.ts +14 -0
  107. package/package.json +25 -13
  108. package/dist/runtime/components/Advice.vue.d.ts +0 -170
  109. package/dist/runtime/components/Alert.vue.d.ts +0 -464
  110. package/dist/runtime/components/App.vue.d.ts +0 -23
  111. package/dist/runtime/components/Avatar.vue.d.ts +0 -281
  112. package/dist/runtime/components/AvatarGroup.vue.d.ts +0 -204
  113. package/dist/runtime/components/Badge.vue.d.ts +0 -517
  114. package/dist/runtime/components/Button.vue.d.ts +0 -640
  115. package/dist/runtime/components/ButtonGroup.vue.d.ts +0 -116
  116. package/dist/runtime/components/Calendar.vue.d.ts +0 -437
  117. package/dist/runtime/components/Checkbox.vue.d.ts +0 -354
  118. package/dist/runtime/components/Chip.vue.d.ts +0 -271
  119. package/dist/runtime/components/Collapsible.vue.d.ts +0 -118
  120. package/dist/runtime/components/Container.vue.d.ts +0 -27
  121. package/dist/runtime/components/Countdown.vue.d.ts +0 -356
  122. package/dist/runtime/components/DescriptionList.vue.d.ts +0 -379
  123. package/dist/runtime/components/DropdownMenu.vue.d.ts +0 -533
  124. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +0 -228
  125. package/dist/runtime/components/Form.vue.d.ts +0 -55
  126. package/dist/runtime/components/FormField.vue.d.ts +0 -282
  127. package/dist/runtime/components/Input.vue.d.ts +0 -755
  128. package/dist/runtime/components/InputMenu.vue.d.ts +0 -1504
  129. package/dist/runtime/components/InputNumber.vue.d.ts +0 -658
  130. package/dist/runtime/components/Kbd.vue.d.ts +0 -109
  131. package/dist/runtime/components/Link.vue.d.ts +0 -129
  132. package/dist/runtime/components/LinkBase.vue.d.ts +0 -48
  133. package/dist/runtime/components/Modal.vue.d.ts +0 -327
  134. package/dist/runtime/components/ModalDialogClose.vue.d.ts +0 -10
  135. package/dist/runtime/components/Navbar.vue.d.ts +0 -101
  136. package/dist/runtime/components/NavbarDivider.vue.d.ts +0 -101
  137. package/dist/runtime/components/NavbarSection.vue.d.ts +0 -101
  138. package/dist/runtime/components/NavbarSpacer.vue.d.ts +0 -101
  139. package/dist/runtime/components/NavigationMenu.vue.d.ts +0 -824
  140. package/dist/runtime/components/OverlayProvider.vue.d.ts +0 -2
  141. package/dist/runtime/components/Popover.vue.d.ts +0 -147
  142. package/dist/runtime/components/Progress.vue.d.ts +0 -592
  143. package/dist/runtime/components/RadioGroup.vue.d.ts +0 -723
  144. package/dist/runtime/components/Range.vue.d.ts +0 -417
  145. package/dist/runtime/components/Select.vue.d.ts +0 -1200
  146. package/dist/runtime/components/SelectMenu.vue.d.ts +0 -1298
  147. package/dist/runtime/components/Separator.vue.d.ts +0 -400
  148. package/dist/runtime/components/Sidebar.vue.d.ts +0 -101
  149. package/dist/runtime/components/SidebarBody.vue.d.ts +0 -90
  150. package/dist/runtime/components/SidebarFooter.vue.d.ts +0 -101
  151. package/dist/runtime/components/SidebarHeader.vue.d.ts +0 -101
  152. package/dist/runtime/components/SidebarHeading.vue.d.ts +0 -101
  153. package/dist/runtime/components/SidebarLayout.vue.d.ts +0 -222
  154. package/dist/runtime/components/SidebarSection.vue.d.ts +0 -101
  155. package/dist/runtime/components/SidebarSpacer.vue.d.ts +0 -101
  156. package/dist/runtime/components/Skeleton.vue.d.ts +0 -26
  157. package/dist/runtime/components/Slideover.vue.d.ts +0 -360
  158. package/dist/runtime/components/StackedLayout.vue.d.ts +0 -192
  159. package/dist/runtime/components/Switch.vue.d.ts +0 -587
  160. package/dist/runtime/components/Tabs.vue.d.ts +0 -453
  161. package/dist/runtime/components/Textarea.vue.d.ts +0 -601
  162. package/dist/runtime/components/Toast.vue.d.ts +0 -438
  163. package/dist/runtime/components/Toaster.vue.d.ts +0 -219
  164. package/dist/runtime/components/Tooltip.vue.d.ts +0 -186
  165. package/dist/runtime/components/content/TableWrapper.vue.d.ts +0 -237
  166. package/dist/runtime/prose/A.vue.d.ts +0 -84
  167. package/dist/runtime/prose/Blockquote.vue.d.ts +0 -84
  168. package/dist/runtime/prose/Code.vue.d.ts +0 -97
  169. package/dist/runtime/prose/Em.vue.d.ts +0 -84
  170. package/dist/runtime/prose/H1.vue.d.ts +0 -97
  171. package/dist/runtime/prose/H2.vue.d.ts +0 -123
  172. package/dist/runtime/prose/H3.vue.d.ts +0 -123
  173. package/dist/runtime/prose/H4.vue.d.ts +0 -123
  174. package/dist/runtime/prose/H5.vue.d.ts +0 -123
  175. package/dist/runtime/prose/H6.vue.d.ts +0 -123
  176. package/dist/runtime/prose/Hr.vue.d.ts +0 -74
  177. package/dist/runtime/prose/Img.vue.d.ts +0 -77
  178. package/dist/runtime/prose/Li.vue.d.ts +0 -84
  179. package/dist/runtime/prose/Ol.vue.d.ts +0 -84
  180. package/dist/runtime/prose/P.vue.d.ts +0 -84
  181. package/dist/runtime/prose/Pre.vue.d.ts +0 -117
  182. package/dist/runtime/prose/Strong.vue.d.ts +0 -84
  183. package/dist/runtime/prose/Table.vue.d.ts +0 -144
  184. package/dist/runtime/prose/Tbody.vue.d.ts +0 -84
  185. package/dist/runtime/prose/Td.vue.d.ts +0 -84
  186. package/dist/runtime/prose/Th.vue.d.ts +0 -84
  187. package/dist/runtime/prose/Thead.vue.d.ts +0 -84
  188. package/dist/runtime/prose/Tr.vue.d.ts +0 -84
  189. package/dist/runtime/prose/Ul.vue.d.ts +0 -84
  190. package/dist/runtime/vue/components/Link.vue.d.ts +0 -129
@@ -1,92 +1,114 @@
1
- <script>
2
- import _appConfig from "#build/app.config";
3
- import theme from "#build/b24ui/toaster";
4
- import { tv } from "../utils/tv";
5
- const appConfigToaster = _appConfig;
6
- const toaster = tv({ extend: tv(theme), ...appConfigToaster.b24ui?.toaster || {} });
1
+ <script lang="ts">
2
+ import type { VariantProps } from 'tailwind-variants'
3
+ import type { ToastProviderProps } from 'reka-ui'
4
+ import type { AppConfig } from '@nuxt/schema'
5
+ import _appConfig from '#build/app.config'
6
+ import theme from '#build/b24ui/toaster'
7
+ import { tv } from '../utils/tv'
8
+
9
+ const appConfigToaster = _appConfig as AppConfig & { b24ui: { toaster: Partial<typeof theme> } }
10
+
11
+ const toaster = tv({ extend: tv(theme), ...(appConfigToaster.b24ui?.toaster || {}) })
12
+
13
+ type ToasterVariants = VariantProps<typeof toaster>
14
+
15
+ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'> {
16
+ /**
17
+ * The position on the screen to display the toasts.
18
+ * @defaultValue 'top-right'
19
+ */
20
+ position?: ToasterVariants['position']
21
+ /**
22
+ * Expand the toasts to show multiple toasts at once.
23
+ * @defaultValue true
24
+ */
25
+ expand?: boolean
26
+ /**
27
+ * Render the toaster in a portal.
28
+ * @defaultValue true
29
+ */
30
+ portal?: boolean
31
+ /**
32
+ * @defaultValue 5000
33
+ */
34
+ duration?: number
35
+ class?: any
36
+ b24ui?: Partial<typeof toaster.slots>
37
+ }
38
+
39
+ export interface ToasterSlots {
40
+ default(props?: {}): any
41
+ }
42
+
7
43
  export default {
8
- name: "Toaster"
9
- };
44
+ name: 'Toaster'
45
+ }
10
46
  </script>
11
47
 
12
- <script setup>
13
- import { ref, computed } from "vue";
14
- import { useForwardProps } from "reka-ui";
15
- import { reactivePick } from "@vueuse/core";
16
- import { useToast } from "../composables/useToast";
17
- const props = defineProps({
18
- position: {
19
- type: null,
20
- required: false,
21
- default: "top-right"
22
- },
23
- expand: {
24
- type: Boolean,
25
- required: false,
26
- default: true
27
- },
28
- portal: {
29
- type: Boolean,
30
- required: false,
31
- default: true
32
- },
33
- duration: {
34
- type: Number,
35
- required: false,
36
- default: 5e3
37
- },
38
- class: {
39
- type: null,
40
- required: false
41
- },
42
- b24ui: {
43
- type: Object,
44
- required: false
45
- },
46
- label: {
47
- type: String,
48
- required: false
49
- },
50
- swipeThreshold: {
51
- type: Number,
52
- required: false
53
- }
54
- });
55
- defineSlots();
56
- const providerProps = useForwardProps(reactivePick(props, "duration", "label", "swipeThreshold"));
57
- const { toasts, remove } = useToast();
48
+ <script setup lang="ts">
49
+ import { ref, computed } from 'vue'
50
+ import { ToastProvider, ToastViewport, ToastPortal, useForwardProps } from 'reka-ui'
51
+ import { reactivePick } from '@vueuse/core'
52
+ import { useToast } from '../composables/useToast'
53
+ import type { Toast } from '../composables/useToast'
54
+ import { omit } from '../utils'
55
+ import B24Toast from './Toast.vue'
56
+
57
+ const props = withDefaults(defineProps<ToasterProps>(), {
58
+ position: 'top-right' as const,
59
+ expand: true,
60
+ duration: 5000,
61
+ portal: true
62
+ })
63
+ defineSlots<ToasterSlots>()
64
+
65
+ const providerProps = useForwardProps(reactivePick(props, 'duration', 'label', 'swipeThreshold'))
66
+
67
+ const proxyToastProps = (toast: Toast) => {
68
+ return omit(toast, ['id', 'close'])
69
+ }
70
+
71
+ const { toasts, remove } = useToast()
72
+
58
73
  const swipeDirection = computed(() => {
59
74
  switch (props.position) {
60
- case "top-center":
61
- return "up";
62
- case "top-right":
63
- case "bottom-right":
64
- return "right";
65
- case "bottom-center":
66
- return "down";
67
- case "top-left":
68
- case "bottom-left":
69
- return "left";
75
+ case 'top-center':
76
+ return 'up'
77
+ case 'top-right':
78
+ case 'bottom-right':
79
+ return 'right'
80
+ case 'bottom-center':
81
+ return 'down'
82
+ case 'top-left':
83
+ case 'bottom-left':
84
+ return 'left'
70
85
  }
71
- return "right";
72
- });
86
+ return 'right'
87
+ })
88
+
73
89
  const b24ui = computed(() => toaster({
74
90
  position: props.position,
75
91
  swipeDirection: swipeDirection.value
76
- }));
77
- function onUpdateOpen(value, id) {
92
+ }))
93
+
94
+ function onUpdateOpen(value: boolean, id: string | number) {
78
95
  if (value) {
79
- return;
96
+ return
80
97
  }
81
- remove(id);
98
+
99
+ remove(id)
82
100
  }
83
- const hovered = ref(false);
84
- const expanded = computed(() => props.expand || hovered.value);
85
- const refs = ref([]);
86
- const height = computed(() => refs.value.reduce((acc, { height: height2 }) => acc + height2 + 16, 0));
87
- const frontHeight = computed(() => refs.value[refs.value.length - 1]?.height || 0);
88
- function getOffset(index) {
89
- return refs.value.slice(index + 1).reduce((acc, { height: height2 }) => acc + height2 + 16, 0);
101
+
102
+ const hovered = ref(false)
103
+ const expanded = computed(() => props.expand || hovered.value)
104
+
105
+ const refs = ref<{ height: number }[]>([])
106
+
107
+ const height = computed(() => refs.value.reduce((acc, { height }) => acc + height + 16, 0))
108
+ const frontHeight = computed(() => refs.value[refs.value.length - 1]?.height || 0)
109
+
110
+ function getOffset(index: number) {
111
+ return refs.value.slice(index + 1).reduce((acc, { height }) => acc + height + 16, 0)
90
112
  }
91
113
  </script>
92
114
 
@@ -98,21 +120,21 @@ function getOffset(index) {
98
120
  v-for="(toast, index) in toasts"
99
121
  :key="toast.id"
100
122
  ref="refs"
101
- v-bind="omit(toast, ['id', 'close'])"
102
- :close="toast.close"
123
+ v-bind="proxyToastProps(toast)"
124
+ :close="(toast.close as boolean)"
103
125
  :data-expanded="expanded"
104
126
  :data-front="!expanded && index === toasts.length - 1"
105
127
  :style="{
106
- '--index': index - toasts.length + toasts.length,
107
- '--before': toasts.length - 1 - index,
108
- '--offset': getOffset(index),
109
- '--scale': expanded ? '1' : 'calc(1 - var(--before) * var(--scale-factor))',
110
- '--translate': expanded ? 'calc(var(--offset) * var(--translate-factor))' : 'calc(var(--before) * var(--gap))',
111
- '--transform': 'translateY(var(--translate)) scale(var(--scale))'
112
- }"
128
+ '--index': (index - toasts.length) + toasts.length,
129
+ '--before': toasts.length - 1 - index,
130
+ '--offset': getOffset(index),
131
+ '--scale': expanded ? '1' : 'calc(1 - var(--before) * var(--scale-factor))',
132
+ '--translate': expanded ? 'calc(var(--offset) * var(--translate-factor))' : 'calc(var(--before) * var(--gap))',
133
+ '--transform': 'translateY(var(--translate)) scale(var(--scale))'
134
+ }"
113
135
  :class="[b24ui.base(), {
114
- 'cursor-pointer': !!toast.onClick
115
- }]"
136
+ 'cursor-pointer': !!toast.onClick
137
+ }]"
116
138
  @update:open="onUpdateOpen($event, toast.id)"
117
139
  @click="toast.onClick && toast.onClick(toast)"
118
140
  />
@@ -122,12 +144,12 @@ function getOffset(index) {
122
144
  :data-expanded="expanded"
123
145
  :class="b24ui.viewport({ class: [props.class, props.b24ui?.viewport] })"
124
146
  :style="{
125
- '--scale-factor': '0.05',
126
- '--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
127
- '--gap': position?.startsWith('top') ? '16px' : '-16px',
128
- '--front-height': `${frontHeight}px`,
129
- '--height': `${height}px`
130
- }"
147
+ '--scale-factor': '0.05',
148
+ '--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
149
+ '--gap': position?.startsWith('top') ? '16px' : '-16px',
150
+ '--front-height': `${frontHeight}px`,
151
+ '--height': `${height}px`
152
+ }"
131
153
  @mouseenter="hovered = true"
132
154
  @mouseleave="hovered = false"
133
155
  />
@@ -1,83 +1,69 @@
1
- <script>
2
- import _appConfig from "#build/app.config";
3
- import theme from "#build/b24ui/tooltip";
4
- import { tv } from "../utils/tv";
5
- const appConfigTooltip = _appConfig;
6
- const tooltip = tv({ extend: tv(theme), ...appConfigTooltip.b24ui?.tooltip || {} });
1
+ <script lang="ts">
2
+ import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipContentEmits, TooltipArrowProps } from 'reka-ui'
3
+ import type { AppConfig } from '@nuxt/schema'
4
+ import _appConfig from '#build/app.config'
5
+ import theme from '#build/b24ui/tooltip'
6
+ import { tv } from '../utils/tv'
7
+ import type { KbdProps } from '../types'
8
+ import type { EmitsToProps } from '../types/utils'
9
+
10
+ const appConfigTooltip = _appConfig as AppConfig & { b24ui: { tooltip: Partial<typeof theme> } }
11
+
12
+ const tooltip = tv({ extend: tv(theme), ...(appConfigTooltip.b24ui?.tooltip || {}) })
13
+
14
+ export interface TooltipProps extends TooltipRootProps {
15
+ /** The text content of the tooltip. */
16
+ text?: string
17
+ /** The keyboard keys to display in the tooltip. */
18
+ kbds?: KbdProps['value'][] | KbdProps[]
19
+ /**
20
+ * The content of the tooltip.
21
+ * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
22
+ */
23
+ content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>
24
+ /**
25
+ * Display an arrow alongside the tooltip.
26
+ * @defaultValue false
27
+ */
28
+ arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>
29
+ /**
30
+ * Render the tooltip in a portal.
31
+ * @defaultValue true
32
+ */
33
+ portal?: boolean
34
+ class?: any
35
+ b24ui?: Partial<typeof tooltip.slots>
36
+ }
37
+
38
+ export interface TooltipEmits extends TooltipRootEmits {}
39
+
40
+ export interface TooltipSlots {
41
+ default(props: { open: boolean }): any
42
+ content(props?: {}): any
43
+ }
7
44
  </script>
8
45
 
9
- <script setup>
10
- import { computed, toRef } from "vue";
11
- import { defu } from "defu";
12
- import { useForwardPropsEmits } from "reka-ui";
13
- import { reactivePick } from "@vueuse/core";
14
- const props = defineProps({
15
- text: {
16
- type: String,
17
- required: false
18
- },
19
- kbds: {
20
- type: Array,
21
- required: false
22
- },
23
- content: {
24
- type: Object,
25
- required: false
26
- },
27
- arrow: {
28
- type: [Boolean, Object],
29
- required: false
30
- },
31
- portal: {
32
- type: Boolean,
33
- required: false,
34
- default: true
35
- },
36
- class: {
37
- type: null,
38
- required: false
39
- },
40
- b24ui: {
41
- type: Object,
42
- required: false
43
- },
44
- defaultOpen: {
45
- type: Boolean,
46
- required: false
47
- },
48
- open: {
49
- type: Boolean,
50
- required: false
51
- },
52
- delayDuration: {
53
- type: Number,
54
- required: false
55
- },
56
- disableHoverableContent: {
57
- type: Boolean,
58
- required: false
59
- },
60
- disableClosingTrigger: {
61
- type: Boolean,
62
- required: false
63
- },
64
- disabled: {
65
- type: Boolean,
66
- required: false
67
- },
68
- ignoreNonKeyboardFocus: {
69
- type: Boolean,
70
- required: false
71
- }
72
- });
73
- const emits = defineEmits(["update:open"]);
74
- const slots = defineSlots();
75
- const rootProps = useForwardPropsEmits(reactivePick(props, "defaultOpen", "open", "delayDuration", "disableHoverableContent", "disableClosingTrigger", "disabled", "ignoreNonKeyboardFocus"), emits);
76
- const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
77
- const arrowProps = toRef(() => props.arrow);
46
+ <script setup lang="ts">
47
+ import { computed, toRef } from 'vue'
48
+ import { defu } from 'defu'
49
+ import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, useForwardPropsEmits } from 'reka-ui'
50
+ import { reactivePick } from '@vueuse/core'
51
+ import B24Kbd from './Kbd.vue'
52
+
53
+ const props = withDefaults(defineProps<TooltipProps>(), {
54
+ portal: true
55
+ })
56
+ const emits = defineEmits<TooltipEmits>()
57
+ const slots = defineSlots<TooltipSlots>()
58
+
59
+ const rootProps = useForwardPropsEmits(reactivePick(props, 'defaultOpen', 'open', 'delayDuration', 'disableHoverableContent', 'disableClosingTrigger', 'disabled', 'ignoreNonKeyboardFocus'), emits)
60
+ const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as TooltipContentProps)
61
+ const arrowProps = toRef(() => props.arrow as TooltipArrowProps)
62
+
63
+ // eslint-disable-next-line vue/no-dupe-keys
78
64
  const b24ui = computed(() => tooltip({
79
65
  side: contentProps.value.side
80
- }));
66
+ }))
81
67
  </script>
82
68
 
83
69
  <template>
@@ -95,8 +81,8 @@ const b24ui = computed(() => tooltip({
95
81
  <B24Kbd
96
82
  v-for="(kbd, index) in kbds"
97
83
  :key="index"
98
- :size="props.b24ui?.kbdsSize || b24ui.kbdsSize()"
99
- :depth="props.b24ui?.kbdsDepth || b24ui.kbdsDepth()"
84
+ :size="((props.b24ui?.kbdsSize || b24ui.kbdsSize()) as KbdProps['size'])"
85
+ :depth="((props.b24ui?.kbdsDepth || b24ui.kbdsDepth()) as KbdProps['depth'])"
100
86
  v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
101
87
  />
102
88
  </span>
@@ -1,62 +1,74 @@
1
- <script>
2
- import _appConfig from "#build/app.config";
3
- import theme from "#build/b24ui/content/table-wrapper";
4
- import { tv } from "../../utils/tv";
5
- const appConfigTableWrapper = _appConfig;
6
- const tableWrapper = tv({ extend: tv(theme), ...appConfigTableWrapper.b24ui?.content?.tableWrapper || {} });
1
+ <script lang="ts">
2
+ import type { VariantProps } from 'tailwind-variants'
3
+ import type { AppConfig } from '@nuxt/schema'
4
+ import _appConfig from '#build/app.config'
5
+ import theme from '#build/b24ui/content/table-wrapper'
6
+ import { tv } from '../../utils/tv'
7
+
8
+ const appConfigTableWrapper = _appConfig as AppConfig & { b24ui: { content: { tableWrapper: Partial<typeof theme> } } }
9
+
10
+ const tableWrapper = tv({ extend: tv(theme), ...(appConfigTableWrapper.b24ui?.content?.tableWrapper || {}) })
11
+
12
+ type TableWrapperVariants = VariantProps<typeof tableWrapper>
13
+
14
+ export interface TableWrapperProps {
15
+ /**
16
+ * The element or component this component should render as.
17
+ * @defaultValue 'div'
18
+ */
19
+ as?: any
20
+ /**
21
+ * @defaultValue 'md'
22
+ */
23
+ size?: TableWrapperVariants['size']
24
+ /**
25
+ * @defaultValue false
26
+ */
27
+ rounded?: boolean
28
+ /**
29
+ * @defaultValue false
30
+ */
31
+ zebra?: boolean
32
+ /**
33
+ * @defaultValue false
34
+ */
35
+ pinRows?: boolean
36
+ /**
37
+ * @defaultValue false
38
+ */
39
+ pinCols?: boolean
40
+ /**
41
+ * @defaultValue false
42
+ */
43
+ rowHover?: boolean
44
+ /**
45
+ * @defaultValue false
46
+ */
47
+ bordered?: boolean
48
+ /**
49
+ * @defaultValue true
50
+ */
51
+ scrollbarThin?: boolean
52
+ class?: any
53
+ b24ui?: Partial<typeof tableWrapper.slots>
54
+ }
55
+
56
+ export interface TableWrapperSlots {
57
+ default(props?: {}): any
58
+ }
7
59
  </script>
8
60
 
9
- <script setup>
10
- import { computed } from "vue";
11
- defineOptions({ inheritAttrs: false });
12
- const props = defineProps({
13
- as: {
14
- type: null,
15
- required: false,
16
- default: "div"
17
- },
18
- size: {
19
- type: null,
20
- required: false
21
- },
22
- rounded: {
23
- type: Boolean,
24
- required: false
25
- },
26
- zebra: {
27
- type: Boolean,
28
- required: false
29
- },
30
- pinRows: {
31
- type: Boolean,
32
- required: false
33
- },
34
- pinCols: {
35
- type: Boolean,
36
- required: false
37
- },
38
- rowHover: {
39
- type: Boolean,
40
- required: false
41
- },
42
- bordered: {
43
- type: Boolean,
44
- required: false
45
- },
46
- scrollbarThin: {
47
- type: Boolean,
48
- required: false,
49
- default: true
50
- },
51
- class: {
52
- type: null,
53
- required: false
54
- },
55
- b24ui: {
56
- type: Object,
57
- required: false
58
- }
59
- });
61
+ <script setup lang="ts">
62
+ import { computed } from 'vue'
63
+ import { Primitive } from 'reka-ui'
64
+
65
+ defineOptions({ inheritAttrs: false })
66
+
67
+ const props = withDefaults(defineProps<TableWrapperProps>(), {
68
+ as: 'div',
69
+ scrollbarThin: true
70
+ })
71
+
60
72
  const b24ui = computed(() => tableWrapper({
61
73
  size: props.size,
62
74
  rounded: Boolean(props.rounded),
@@ -66,7 +78,7 @@ const b24ui = computed(() => tableWrapper({
66
78
  rowHover: Boolean(props.rowHover),
67
79
  bordered: Boolean(props.bordered),
68
80
  scrollbarThin: Boolean(props.scrollbarThin)
69
- }));
81
+ }))
70
82
  </script>
71
83
 
72
84
  <template>
@@ -6,5 +6,5 @@ export declare const avatarGroupInjectionKey: InjectionKey<ComputedRef<{
6
6
  export declare function useAvatarGroup(props: {
7
7
  size: AvatarGroupProps['size'];
8
8
  }): {
9
- size: ComputedRef<"md" | "3xs" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | undefined>;
9
+ size: ComputedRef<any>;
10
10
  };
@@ -10,8 +10,8 @@ type Props<T> = {
10
10
  size?: GetObjectField<T, 'size'>;
11
11
  };
12
12
  export declare function useButtonGroup<T>(props: Props<T>): {
13
- orientation: ComputedRef<"horizontal" | "vertical" | undefined>;
14
- size: ComputedRef<"md" | "xs" | "sm" | "lg" | NonNullable<GetObjectField<T, "size">> | undefined>;
13
+ orientation: ComputedRef<any>;
14
+ size: ComputedRef<any>;
15
15
  noSplit: ComputedRef<boolean>;
16
16
  };
17
17
  export {};
@@ -20,8 +20,8 @@ export interface UseComponentIconsProps {
20
20
  trailingIcon?: IconComponent;
21
21
  }
22
22
  export declare function useComponentIcons(componentProps: MaybeRefOrGetter<UseComponentIconsProps>): {
23
- isLeading: import("vue").ComputedRef<true | AvatarProps | undefined>;
23
+ isLeading: import("vue").ComputedRef<any>;
24
24
  isTrailing: import("vue").ComputedRef<boolean>;
25
- leadingIconName: import("vue").ComputedRef<import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}> | undefined>;
26
- trailingIconName: import("vue").ComputedRef<import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}> | undefined>;
25
+ leadingIconName: import("vue").ComputedRef<IconComponent | undefined>;
26
+ trailingIconName: import("vue").ComputedRef<IconComponent | undefined>;
27
27
  };
@@ -26,7 +26,7 @@ export declare function useFormField<T>(props?: Props<T>, opts?: {
26
26
  }): {
27
27
  id: ComputedRef<string | undefined>;
28
28
  name: ComputedRef<string | undefined>;
29
- size: ComputedRef<"md" | "xs" | "sm" | "lg" | NonNullable<GetObjectField<T, "size">> | undefined>;
29
+ size: ComputedRef<any>;
30
30
  color: ComputedRef<"danger" | GetObjectField<T, "color"> | undefined>;
31
31
  highlight: ComputedRef<boolean | undefined>;
32
32
  disabled: ComputedRef<boolean | undefined>;
@@ -1,23 +1,28 @@
1
- <script>
2
- import _appConfig from "#build/app.config";
3
- import theme from "#build/b24ui/prose/a";
4
- import { tv } from "../utils/tv";
5
- const appConfigProseA = _appConfig;
6
- const proseA = tv({ extend: tv(theme), ...appConfigProseA.b24ui?.prose?.a || {} });
1
+ <script lang="ts">
2
+ import type { AppConfig } from '@nuxt/schema'
3
+ import _appConfig from '#build/app.config'
4
+ import theme from '#build/b24ui/prose/a'
5
+ import { tv } from '../utils/tv'
6
+
7
+ const appConfigProseA = _appConfig as AppConfig & { b24ui: { prose: { a: Partial<typeof theme> } } }
8
+
9
+ const proseA = tv({ extend: tv(theme), ...(appConfigProseA.b24ui?.prose?.a || {}) })
10
+
11
+ export interface proseAProps {
12
+ class?: any
13
+ b24ui?: Partial<typeof proseA.slots>
14
+ }
15
+
16
+ export interface proseASlots {
17
+ default(props?: {}): any
18
+ }
7
19
  </script>
8
20
 
9
- <script setup>
10
- const props = defineProps({
11
- class: {
12
- type: null,
13
- required: false
14
- },
15
- b24ui: {
16
- type: Object,
17
- required: false
18
- }
19
- });
20
- const b24ui = proseA({});
21
+ <script setup lang="ts">
22
+ const props = defineProps<proseAProps>()
23
+
24
+ // eslint-disable-next-line vue/no-dupe-keys
25
+ const b24ui = proseA({})
21
26
  </script>
22
27
 
23
28
  <template>