@bitrix24/b24ui-nuxt 0.6.0 → 0.6.1

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 (217) hide show
  1. package/.nuxt/b24ui/advice.ts +10 -2
  2. package/.nuxt/b24ui/alert.ts +10 -2
  3. package/.nuxt/b24ui/avatar-group.ts +10 -2
  4. package/.nuxt/b24ui/avatar.ts +10 -2
  5. package/.nuxt/b24ui/badge.ts +10 -2
  6. package/.nuxt/b24ui/button-group.ts +10 -2
  7. package/.nuxt/b24ui/button.ts +16 -6
  8. package/.nuxt/b24ui/calendar.ts +10 -2
  9. package/.nuxt/b24ui/checkbox.ts +10 -2
  10. package/.nuxt/b24ui/chip.ts +10 -2
  11. package/.nuxt/b24ui/collapsible.ts +10 -2
  12. package/.nuxt/b24ui/container.ts +10 -2
  13. package/.nuxt/b24ui/countdown.ts +10 -2
  14. package/.nuxt/b24ui/description-list.ts +10 -2
  15. package/.nuxt/b24ui/dropdown-menu.ts +10 -2
  16. package/.nuxt/b24ui/form-field.ts +10 -2
  17. package/.nuxt/b24ui/form.ts +10 -2
  18. package/.nuxt/b24ui/input-menu.ts +10 -2
  19. package/.nuxt/b24ui/input-number.ts +10 -2
  20. package/.nuxt/b24ui/input.ts +10 -2
  21. package/.nuxt/b24ui/kbd.ts +10 -2
  22. package/.nuxt/b24ui/link.ts +10 -2
  23. package/.nuxt/b24ui/modal.ts +10 -2
  24. package/.nuxt/b24ui/navbar-divider.ts +10 -2
  25. package/.nuxt/b24ui/navbar-section.ts +10 -2
  26. package/.nuxt/b24ui/navbar-spacer.ts +10 -2
  27. package/.nuxt/b24ui/navbar.ts +10 -2
  28. package/.nuxt/b24ui/navigation-menu.ts +10 -2
  29. package/.nuxt/b24ui/popover.ts +10 -2
  30. package/.nuxt/b24ui/progress.ts +10 -2
  31. package/.nuxt/b24ui/radio-group.ts +10 -2
  32. package/.nuxt/b24ui/range.ts +10 -2
  33. package/.nuxt/b24ui/select-menu.ts +10 -2
  34. package/.nuxt/b24ui/select.ts +10 -2
  35. package/.nuxt/b24ui/separator.ts +10 -2
  36. package/.nuxt/b24ui/sidebar-body.ts +10 -2
  37. package/.nuxt/b24ui/sidebar-footer.ts +10 -2
  38. package/.nuxt/b24ui/sidebar-header.ts +10 -2
  39. package/.nuxt/b24ui/sidebar-heading.ts +10 -2
  40. package/.nuxt/b24ui/sidebar-layout.ts +10 -2
  41. package/.nuxt/b24ui/sidebar-section.ts +10 -2
  42. package/.nuxt/b24ui/sidebar-spacer.ts +10 -2
  43. package/.nuxt/b24ui/sidebar.ts +10 -2
  44. package/.nuxt/b24ui/skeleton.ts +10 -2
  45. package/.nuxt/b24ui/slideover.ts +10 -2
  46. package/.nuxt/b24ui/stacked-layout.ts +10 -2
  47. package/.nuxt/b24ui/switch.ts +10 -2
  48. package/.nuxt/b24ui/tabs.ts +10 -2
  49. package/.nuxt/b24ui/textarea.ts +10 -2
  50. package/.nuxt/b24ui/toast.ts +10 -2
  51. package/.nuxt/b24ui/toaster.ts +10 -2
  52. package/.nuxt/b24ui/tooltip.ts +10 -2
  53. package/cli/templates.mjs +19 -15
  54. package/dist/meta.d.mts +1388 -3373
  55. package/dist/meta.mjs +1388 -3373
  56. package/dist/module.json +1 -1
  57. package/dist/module.mjs +2 -2
  58. package/dist/runtime/components/Advice.vue +5 -6
  59. package/dist/runtime/components/Advice.vue.d.ts +7 -121
  60. package/dist/runtime/components/Alert.vue +5 -6
  61. package/dist/runtime/components/Alert.vue.d.ts +12 -379
  62. package/dist/runtime/components/Avatar.vue +5 -6
  63. package/dist/runtime/components/Avatar.vue.d.ts +6 -225
  64. package/dist/runtime/components/AvatarGroup.vue +5 -6
  65. package/dist/runtime/components/AvatarGroup.vue.d.ts +6 -170
  66. package/dist/runtime/components/Badge.vue +5 -6
  67. package/dist/runtime/components/Badge.vue.d.ts +8 -447
  68. package/dist/runtime/components/Button.vue +16 -14
  69. package/dist/runtime/components/Button.vue.d.ts +10 -535
  70. package/dist/runtime/components/ButtonGroup.vue +11 -6
  71. package/dist/runtime/components/ButtonGroup.vue.d.ts +8 -61
  72. package/dist/runtime/components/Calendar.vue +4 -5
  73. package/dist/runtime/components/Calendar.vue.d.ts +7 -337
  74. package/dist/runtime/components/Checkbox.vue +5 -6
  75. package/dist/runtime/components/Checkbox.vue.d.ts +7 -306
  76. package/dist/runtime/components/Chip.vue +5 -6
  77. package/dist/runtime/components/Chip.vue.d.ts +8 -202
  78. package/dist/runtime/components/Collapsible.vue +6 -6
  79. package/dist/runtime/components/Collapsible.vue.d.ts +5 -73
  80. package/dist/runtime/components/Container.vue +6 -5
  81. package/dist/runtime/components/Countdown.vue +6 -7
  82. package/dist/runtime/components/Countdown.vue.d.ts +7 -241
  83. package/dist/runtime/components/DescriptionList.vue +5 -6
  84. package/dist/runtime/components/DescriptionList.vue.d.ts +8 -278
  85. package/dist/runtime/components/DropdownMenu.vue +4 -5
  86. package/dist/runtime/components/DropdownMenu.vue.d.ts +9 -409
  87. package/dist/runtime/components/DropdownMenuContent.vue +1 -3
  88. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +9 -186
  89. package/dist/runtime/components/Form.vue +6 -5
  90. package/dist/runtime/components/FormField.vue +5 -6
  91. package/dist/runtime/components/FormField.vue.d.ts +6 -215
  92. package/dist/runtime/components/Input.vue +4 -5
  93. package/dist/runtime/components/Input.vue.d.ts +8 -628
  94. package/dist/runtime/components/InputMenu.vue +4 -5
  95. package/dist/runtime/components/InputMenu.vue.d.ts +19 -1185
  96. package/dist/runtime/components/InputNumber.vue +4 -5
  97. package/dist/runtime/components/InputNumber.vue.d.ts +10 -430
  98. package/dist/runtime/components/Kbd.vue +6 -5
  99. package/dist/runtime/components/Kbd.vue.d.ts +6 -60
  100. package/dist/runtime/components/Link.vue +12 -11
  101. package/dist/runtime/components/Modal.vue +5 -6
  102. package/dist/runtime/components/Modal.vue.d.ts +13 -216
  103. package/dist/runtime/components/Navbar.vue +6 -6
  104. package/dist/runtime/components/Navbar.vue.d.ts +5 -60
  105. package/dist/runtime/components/NavbarDivider.vue +6 -6
  106. package/dist/runtime/components/NavbarDivider.vue.d.ts +5 -60
  107. package/dist/runtime/components/NavbarSection.vue +6 -6
  108. package/dist/runtime/components/NavbarSection.vue.d.ts +5 -60
  109. package/dist/runtime/components/NavbarSpacer.vue +6 -6
  110. package/dist/runtime/components/NavbarSpacer.vue.d.ts +5 -60
  111. package/dist/runtime/components/NavigationMenu.vue +4 -5
  112. package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -676
  113. package/dist/runtime/components/Popover.vue +5 -6
  114. package/dist/runtime/components/Popover.vue.d.ts +7 -75
  115. package/dist/runtime/components/Progress.vue +5 -6
  116. package/dist/runtime/components/Progress.vue.d.ts +11 -500
  117. package/dist/runtime/components/RadioGroup.vue +5 -6
  118. package/dist/runtime/components/RadioGroup.vue.d.ts +9 -644
  119. package/dist/runtime/components/Range.vue +5 -6
  120. package/dist/runtime/components/Range.vue.d.ts +7 -351
  121. package/dist/runtime/components/Select.vue +4 -5
  122. package/dist/runtime/components/Select.vue.d.ts +15 -1046
  123. package/dist/runtime/components/SelectMenu.vue +4 -5
  124. package/dist/runtime/components/SelectMenu.vue.d.ts +17 -1098
  125. package/dist/runtime/components/Separator.vue +5 -6
  126. package/dist/runtime/components/Separator.vue.d.ts +9 -332
  127. package/dist/runtime/components/Sidebar.vue +6 -6
  128. package/dist/runtime/components/Sidebar.vue.d.ts +5 -60
  129. package/dist/runtime/components/SidebarBody.vue +5 -6
  130. package/dist/runtime/components/SidebarBody.vue.d.ts +5 -42
  131. package/dist/runtime/components/SidebarFooter.vue +6 -6
  132. package/dist/runtime/components/SidebarFooter.vue.d.ts +5 -60
  133. package/dist/runtime/components/SidebarHeader.vue +6 -6
  134. package/dist/runtime/components/SidebarHeader.vue.d.ts +5 -60
  135. package/dist/runtime/components/SidebarHeading.vue +6 -6
  136. package/dist/runtime/components/SidebarHeading.vue.d.ts +5 -60
  137. package/dist/runtime/components/SidebarLayout.vue +6 -7
  138. package/dist/runtime/components/SidebarLayout.vue.d.ts +5 -162
  139. package/dist/runtime/components/SidebarSection.vue +6 -6
  140. package/dist/runtime/components/SidebarSection.vue.d.ts +5 -60
  141. package/dist/runtime/components/SidebarSpacer.vue +6 -6
  142. package/dist/runtime/components/SidebarSpacer.vue.d.ts +5 -60
  143. package/dist/runtime/components/Skeleton.vue +6 -5
  144. package/dist/runtime/components/Slideover.vue +5 -6
  145. package/dist/runtime/components/Slideover.vue.d.ts +15 -248
  146. package/dist/runtime/components/StackedLayout.vue +6 -7
  147. package/dist/runtime/components/StackedLayout.vue.d.ts +5 -132
  148. package/dist/runtime/components/Switch.vue +4 -5
  149. package/dist/runtime/components/Switch.vue.d.ts +7 -517
  150. package/dist/runtime/components/Tabs.vue +8 -5
  151. package/dist/runtime/components/Tabs.vue.d.ts +18 -367
  152. package/dist/runtime/components/Textarea.vue +4 -5
  153. package/dist/runtime/components/Textarea.vue.d.ts +7 -467
  154. package/dist/runtime/components/Toast.vue +5 -6
  155. package/dist/runtime/components/Toast.vue.d.ts +11 -354
  156. package/dist/runtime/components/Toaster.vue +6 -7
  157. package/dist/runtime/components/Toaster.vue.d.ts +7 -156
  158. package/dist/runtime/components/Tooltip.vue +5 -6
  159. package/dist/runtime/components/Tooltip.vue.d.ts +5 -126
  160. package/dist/runtime/components/content/TableWrapper.vue +5 -6
  161. package/dist/runtime/components/content/TableWrapper.vue.d.ts +6 -160
  162. package/dist/runtime/prose/A.vue +10 -9
  163. package/dist/runtime/prose/A.vue.d.ts +8 -65
  164. package/dist/runtime/prose/Blockquote.vue +8 -9
  165. package/dist/runtime/prose/Blockquote.vue.d.ts +8 -65
  166. package/dist/runtime/prose/Code.vue +6 -6
  167. package/dist/runtime/prose/Code.vue.d.ts +9 -75
  168. package/dist/runtime/prose/Em.vue +10 -9
  169. package/dist/runtime/prose/Em.vue.d.ts +8 -65
  170. package/dist/runtime/prose/H1.vue +8 -9
  171. package/dist/runtime/prose/H1.vue.d.ts +8 -78
  172. package/dist/runtime/prose/H2.vue +8 -9
  173. package/dist/runtime/prose/H2.vue.d.ts +8 -104
  174. package/dist/runtime/prose/H3.vue +8 -9
  175. package/dist/runtime/prose/H3.vue.d.ts +8 -104
  176. package/dist/runtime/prose/H4.vue +8 -9
  177. package/dist/runtime/prose/H4.vue.d.ts +8 -104
  178. package/dist/runtime/prose/H5.vue +8 -9
  179. package/dist/runtime/prose/H5.vue.d.ts +8 -104
  180. package/dist/runtime/prose/H6.vue +8 -9
  181. package/dist/runtime/prose/H6.vue.d.ts +8 -104
  182. package/dist/runtime/prose/Hr.vue +7 -9
  183. package/dist/runtime/prose/Hr.vue.d.ts +7 -62
  184. package/dist/runtime/prose/Img.vue +7 -9
  185. package/dist/runtime/prose/Img.vue.d.ts +7 -65
  186. package/dist/runtime/prose/Li.vue +8 -9
  187. package/dist/runtime/prose/Li.vue.d.ts +8 -65
  188. package/dist/runtime/prose/Ol.vue +8 -9
  189. package/dist/runtime/prose/Ol.vue.d.ts +8 -65
  190. package/dist/runtime/prose/P.vue +8 -9
  191. package/dist/runtime/prose/P.vue.d.ts +8 -65
  192. package/dist/runtime/prose/Pre.vue +7 -6
  193. package/dist/runtime/prose/Pre.vue.d.ts +10 -80
  194. package/dist/runtime/prose/Strong.vue +8 -9
  195. package/dist/runtime/prose/Strong.vue.d.ts +8 -65
  196. package/dist/runtime/prose/Table.vue +8 -9
  197. package/dist/runtime/prose/Table.vue.d.ts +10 -80
  198. package/dist/runtime/prose/Tbody.vue +8 -9
  199. package/dist/runtime/prose/Tbody.vue.d.ts +8 -65
  200. package/dist/runtime/prose/Td.vue +8 -9
  201. package/dist/runtime/prose/Td.vue.d.ts +8 -65
  202. package/dist/runtime/prose/Th.vue +8 -9
  203. package/dist/runtime/prose/Th.vue.d.ts +8 -65
  204. package/dist/runtime/prose/Thead.vue +8 -9
  205. package/dist/runtime/prose/Thead.vue.d.ts +8 -65
  206. package/dist/runtime/prose/Tr.vue +8 -9
  207. package/dist/runtime/prose/Tr.vue.d.ts +8 -65
  208. package/dist/runtime/prose/Ul.vue +8 -9
  209. package/dist/runtime/prose/Ul.vue.d.ts +8 -65
  210. package/dist/runtime/types/form.d.ts +1 -0
  211. package/dist/runtime/types/utils.d.ts +42 -3
  212. package/dist/runtime/utils/tv.js +2 -2
  213. package/dist/runtime/vue/components/Link.vue +12 -11
  214. package/dist/shared/{b24ui-nuxt.BA6Y2FnC.mjs → b24ui-nuxt.wBs9vEU5.mjs} +27 -2
  215. package/dist/unplugin.mjs +1 -1
  216. package/dist/vite.mjs +1 -1
  217. package/package.json +6 -6
@@ -1,307 +1,8 @@
1
- import type { VariantProps } from 'tailwind-variants';
2
1
  import type { CheckboxRootProps } from 'reka-ui';
3
- declare const checkbox: import("tailwind-variants").TVReturnType<{
4
- color: {
5
- default: string;
6
- danger: string;
7
- success: string;
8
- warning: string;
9
- primary: string;
10
- secondary: string;
11
- collab: string;
12
- ai: string;
13
- };
14
- size: {
15
- xs: {
16
- base: string;
17
- container: string;
18
- wrapper: string;
19
- label: string;
20
- };
21
- sm: {
22
- base: string;
23
- container: string;
24
- wrapper: string;
25
- label: string;
26
- };
27
- md: {
28
- base: string;
29
- container: string;
30
- wrapper: string;
31
- label: string;
32
- };
33
- lg: {
34
- base: string;
35
- container: string;
36
- wrapper: string;
37
- label: string;
38
- };
39
- };
40
- required: {
41
- true: {
42
- label: string;
43
- };
44
- };
45
- disabled: {
46
- true: {
47
- base: string;
48
- label: string;
49
- description: string;
50
- };
51
- };
52
- checked: {
53
- true: string;
54
- };
55
- }, {
56
- root: string;
57
- base: string;
58
- container: string;
59
- wrapper: string;
60
- icon: string;
61
- label: string;
62
- description: string;
63
- }, undefined, {
64
- color: {
65
- default: string;
66
- danger: string;
67
- success: string;
68
- warning: string;
69
- primary: string;
70
- secondary: string;
71
- collab: string;
72
- ai: string;
73
- };
74
- size: {
75
- xs: {
76
- base: string;
77
- container: string;
78
- wrapper: string;
79
- label: string;
80
- };
81
- sm: {
82
- base: string;
83
- container: string;
84
- wrapper: string;
85
- label: string;
86
- };
87
- md: {
88
- base: string;
89
- container: string;
90
- wrapper: string;
91
- label: string;
92
- };
93
- lg: {
94
- base: string;
95
- container: string;
96
- wrapper: string;
97
- label: string;
98
- };
99
- };
100
- required: {
101
- true: {
102
- label: string;
103
- };
104
- };
105
- disabled: {
106
- true: {
107
- base: string;
108
- label: string;
109
- description: string;
110
- };
111
- };
112
- checked: {
113
- true: string;
114
- };
115
- }, {
116
- root: string;
117
- base: string;
118
- container: string;
119
- wrapper: string;
120
- icon: string;
121
- label: string;
122
- description: string;
123
- }, import("tailwind-variants").TVReturnType<{
124
- color: {
125
- default: string;
126
- danger: string;
127
- success: string;
128
- warning: string;
129
- primary: string;
130
- secondary: string;
131
- collab: string;
132
- ai: string;
133
- };
134
- size: {
135
- xs: {
136
- base: string;
137
- container: string;
138
- wrapper: string;
139
- label: string;
140
- };
141
- sm: {
142
- base: string;
143
- container: string;
144
- wrapper: string;
145
- label: string;
146
- };
147
- md: {
148
- base: string;
149
- container: string;
150
- wrapper: string;
151
- label: string;
152
- };
153
- lg: {
154
- base: string;
155
- container: string;
156
- wrapper: string;
157
- label: string;
158
- };
159
- };
160
- required: {
161
- true: {
162
- label: string;
163
- };
164
- };
165
- disabled: {
166
- true: {
167
- base: string;
168
- label: string;
169
- description: string;
170
- };
171
- };
172
- checked: {
173
- true: string;
174
- };
175
- }, {
176
- root: string;
177
- base: string;
178
- container: string;
179
- wrapper: string;
180
- icon: string;
181
- label: string;
182
- description: string;
183
- }, undefined, {
184
- color: {
185
- default: string;
186
- danger: string;
187
- success: string;
188
- warning: string;
189
- primary: string;
190
- secondary: string;
191
- collab: string;
192
- ai: string;
193
- };
194
- size: {
195
- xs: {
196
- base: string;
197
- container: string;
198
- wrapper: string;
199
- label: string;
200
- };
201
- sm: {
202
- base: string;
203
- container: string;
204
- wrapper: string;
205
- label: string;
206
- };
207
- md: {
208
- base: string;
209
- container: string;
210
- wrapper: string;
211
- label: string;
212
- };
213
- lg: {
214
- base: string;
215
- container: string;
216
- wrapper: string;
217
- label: string;
218
- };
219
- };
220
- required: {
221
- true: {
222
- label: string;
223
- };
224
- };
225
- disabled: {
226
- true: {
227
- base: string;
228
- label: string;
229
- description: string;
230
- };
231
- };
232
- checked: {
233
- true: string;
234
- };
235
- }, {
236
- root: string;
237
- base: string;
238
- container: string;
239
- wrapper: string;
240
- icon: string;
241
- label: string;
242
- description: string;
243
- }, import("tailwind-variants").TVReturnType<{
244
- color: {
245
- default: string;
246
- danger: string;
247
- success: string;
248
- warning: string;
249
- primary: string;
250
- secondary: string;
251
- collab: string;
252
- ai: string;
253
- };
254
- size: {
255
- xs: {
256
- base: string;
257
- container: string;
258
- wrapper: string;
259
- label: string;
260
- };
261
- sm: {
262
- base: string;
263
- container: string;
264
- wrapper: string;
265
- label: string;
266
- };
267
- md: {
268
- base: string;
269
- container: string;
270
- wrapper: string;
271
- label: string;
272
- };
273
- lg: {
274
- base: string;
275
- container: string;
276
- wrapper: string;
277
- label: string;
278
- };
279
- };
280
- required: {
281
- true: {
282
- label: string;
283
- };
284
- };
285
- disabled: {
286
- true: {
287
- base: string;
288
- label: string;
289
- description: string;
290
- };
291
- };
292
- checked: {
293
- true: string;
294
- };
295
- }, {
296
- root: string;
297
- base: string;
298
- container: string;
299
- wrapper: string;
300
- icon: string;
301
- label: string;
302
- description: string;
303
- }, undefined, unknown, unknown, undefined>>>;
304
- type CheckboxVariants = VariantProps<typeof checkbox>;
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/b24ui/checkbox';
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Checkbox = ComponentConfig<typeof theme, AppConfig, 'checkbox'>;
305
6
  export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'required' | 'name' | 'value' | 'id' | 'defaultValue'> {
306
7
  /**
307
8
  * The element or component this component should render as.
@@ -313,13 +14,13 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
313
14
  /**
314
15
  * @defaultValue 'primary'
315
16
  */
316
- color?: CheckboxVariants['color'];
17
+ color?: Checkbox['variants']['color'];
317
18
  /**
318
19
  * @defaultValue 'md'
319
20
  */
320
- size?: CheckboxVariants['size'];
21
+ size?: Checkbox['variants']['size'];
321
22
  class?: any;
322
- b24ui?: Partial<typeof checkbox.slots>;
23
+ b24ui?: Checkbox['slots'];
323
24
  }
324
25
  export type CheckboxEmits = {
325
26
  change: [payload: Event];
@@ -1,15 +1,13 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/chip";
4
- import { tv } from "../utils/tv";
5
- const appConfigChip = _appConfig;
6
- const chip = tv({ extend: tv(theme), ...appConfigChip.b24ui?.chip || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
10
6
  import { computed } from "vue";
11
7
  import { Primitive, Slot } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
12
9
  import { useAvatarGroup } from "../composables/useAvatarGroup";
10
+ import { tv } from "../utils/tv";
13
11
  defineOptions({ inheritAttrs: false });
14
12
  const props = defineProps({
15
13
  as: { type: null, required: false },
@@ -20,12 +18,13 @@ const props = defineProps({
20
18
  inset: { type: Boolean, required: false, default: false },
21
19
  standalone: { type: Boolean, required: false, default: false },
22
20
  class: { type: null, required: false },
23
- b24ui: { type: Object, required: false }
21
+ b24ui: { type: null, required: false }
24
22
  });
25
23
  defineSlots();
26
24
  const show = defineModel("show", { type: Boolean, ...{ default: true } });
27
25
  const { size } = useAvatarGroup(props);
28
- const b24ui = computed(() => chip({
26
+ const appConfig = useAppConfig();
27
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.chip || {} })({
29
28
  color: props.color,
30
29
  size: size.value,
31
30
  position: props.position,
@@ -1,201 +1,7 @@
1
- import type { VariantProps } from 'tailwind-variants';
2
- declare const chip: import("tailwind-variants").TVReturnType<{
3
- color: {
4
- default: string;
5
- danger: string;
6
- success: string;
7
- warning: string;
8
- primary: string;
9
- secondary: string;
10
- collab: string;
11
- ai: string;
12
- link: string;
13
- };
14
- size: {
15
- "3xs": string;
16
- "2xs": string;
17
- xs: string;
18
- sm: string;
19
- md: string;
20
- lg: string;
21
- xl: string;
22
- "2xl": string;
23
- "3xl": string;
24
- };
25
- position: {
26
- "top-right": string;
27
- "bottom-right": string;
28
- "top-left": string;
29
- "bottom-left": string;
30
- };
31
- inset: {
32
- false: string;
33
- };
34
- standalone: {
35
- true: string;
36
- false: string;
37
- };
38
- }, {
39
- root: string;
40
- base: string;
41
- }, undefined, {
42
- color: {
43
- default: string;
44
- danger: string;
45
- success: string;
46
- warning: string;
47
- primary: string;
48
- secondary: string;
49
- collab: string;
50
- ai: string;
51
- link: string;
52
- };
53
- size: {
54
- "3xs": string;
55
- "2xs": string;
56
- xs: string;
57
- sm: string;
58
- md: string;
59
- lg: string;
60
- xl: string;
61
- "2xl": string;
62
- "3xl": string;
63
- };
64
- position: {
65
- "top-right": string;
66
- "bottom-right": string;
67
- "top-left": string;
68
- "bottom-left": string;
69
- };
70
- inset: {
71
- false: string;
72
- };
73
- standalone: {
74
- true: string;
75
- false: string;
76
- };
77
- }, {
78
- root: string;
79
- base: string;
80
- }, import("tailwind-variants").TVReturnType<{
81
- color: {
82
- default: string;
83
- danger: string;
84
- success: string;
85
- warning: string;
86
- primary: string;
87
- secondary: string;
88
- collab: string;
89
- ai: string;
90
- link: string;
91
- };
92
- size: {
93
- "3xs": string;
94
- "2xs": string;
95
- xs: string;
96
- sm: string;
97
- md: string;
98
- lg: string;
99
- xl: string;
100
- "2xl": string;
101
- "3xl": string;
102
- };
103
- position: {
104
- "top-right": string;
105
- "bottom-right": string;
106
- "top-left": string;
107
- "bottom-left": string;
108
- };
109
- inset: {
110
- false: string;
111
- };
112
- standalone: {
113
- true: string;
114
- false: string;
115
- };
116
- }, {
117
- root: string;
118
- base: string;
119
- }, undefined, {
120
- color: {
121
- default: string;
122
- danger: string;
123
- success: string;
124
- warning: string;
125
- primary: string;
126
- secondary: string;
127
- collab: string;
128
- ai: string;
129
- link: string;
130
- };
131
- size: {
132
- "3xs": string;
133
- "2xs": string;
134
- xs: string;
135
- sm: string;
136
- md: string;
137
- lg: string;
138
- xl: string;
139
- "2xl": string;
140
- "3xl": string;
141
- };
142
- position: {
143
- "top-right": string;
144
- "bottom-right": string;
145
- "top-left": string;
146
- "bottom-left": string;
147
- };
148
- inset: {
149
- false: string;
150
- };
151
- standalone: {
152
- true: string;
153
- false: string;
154
- };
155
- }, {
156
- root: string;
157
- base: string;
158
- }, import("tailwind-variants").TVReturnType<{
159
- color: {
160
- default: string;
161
- danger: string;
162
- success: string;
163
- warning: string;
164
- primary: string;
165
- secondary: string;
166
- collab: string;
167
- ai: string;
168
- link: string;
169
- };
170
- size: {
171
- "3xs": string;
172
- "2xs": string;
173
- xs: string;
174
- sm: string;
175
- md: string;
176
- lg: string;
177
- xl: string;
178
- "2xl": string;
179
- "3xl": string;
180
- };
181
- position: {
182
- "top-right": string;
183
- "bottom-right": string;
184
- "top-left": string;
185
- "bottom-left": string;
186
- };
187
- inset: {
188
- false: string;
189
- };
190
- standalone: {
191
- true: string;
192
- false: string;
193
- };
194
- }, {
195
- root: string;
196
- base: string;
197
- }, undefined, unknown, unknown, undefined>>>;
198
- type ChipVariants = VariantProps<typeof chip>;
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/b24ui/chip';
3
+ import type { ComponentConfig } from '../types/utils';
4
+ type Chip = ComponentConfig<typeof theme, AppConfig, 'chip'>;
199
5
  export interface ChipProps {
200
6
  /**
201
7
  * The element or component this component should render as.
@@ -207,16 +13,16 @@ export interface ChipProps {
207
13
  /**
208
14
  * @defaultValue 'danger'
209
15
  */
210
- color?: ChipVariants['color'];
16
+ color?: Chip['variants']['color'];
211
17
  /**
212
18
  * @defaultValue 'sm'
213
19
  */
214
- size?: ChipVariants['size'];
20
+ size?: Chip['variants']['size'];
215
21
  /**
216
22
  * The position of the chip.
217
23
  * @defaultValue 'top-right'
218
24
  */
219
- position?: ChipVariants['position'];
25
+ position?: Chip['variants']['position'];
220
26
  /**
221
27
  * When `true`, keep the chip inside the component for rounded elements
222
28
  * @defaultValue false
@@ -228,7 +34,7 @@ export interface ChipProps {
228
34
  */
229
35
  standalone?: boolean;
230
36
  class?: any;
231
- b24ui?: Partial<typeof chip.slots>;
37
+ b24ui?: Chip['slots'];
232
38
  }
233
39
  export interface ChipEmits {
234
40
  (e: 'update:show', payload: boolean): void;
@@ -1,18 +1,17 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/collapsible";
4
- import { tv } from "../utils/tv";
5
- const appConfigCollapsible = _appConfig;
6
- const collapsible = tv({ extend: tv(theme), ...appConfigCollapsible.b24ui?.collapsible || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
6
+ import { computed } from "vue";
10
7
  import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent, useForwardPropsEmits } from "reka-ui";
11
8
  import { reactivePick } from "@vueuse/core";
9
+ import { useAppConfig } from "#imports";
10
+ import { tv } from "../utils/tv";
12
11
  const props = defineProps({
13
12
  as: { type: null, required: false },
14
13
  class: { type: null, required: false },
15
- b24ui: { type: Object, required: false },
14
+ b24ui: { type: null, required: false },
16
15
  defaultOpen: { type: Boolean, required: false },
17
16
  open: { type: Boolean, required: false },
18
17
  disabled: { type: Boolean, required: false },
@@ -20,8 +19,9 @@ const props = defineProps({
20
19
  });
21
20
  const emits = defineEmits(["update:open"]);
22
21
  const slots = defineSlots();
22
+ const appConfig = useAppConfig();
23
23
  const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultOpen", "open", "disabled", "unmountOnHide"), emits);
24
- const b24ui = collapsible();
24
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.collapsible || {} })());
25
25
  </script>
26
26
 
27
27
  <template>
@@ -1,76 +1,8 @@
1
1
  import type { CollapsibleRootProps, CollapsibleRootEmits } from 'reka-ui';
2
- declare const collapsible: import("tailwind-variants").TVReturnType<{
3
- [key: string]: {
4
- [key: string]: import("tailwind-variants").ClassValue | {
5
- root?: import("tailwind-variants").ClassValue;
6
- content?: import("tailwind-variants").ClassValue;
7
- };
8
- };
9
- } | {
10
- [x: string]: {
11
- [x: string]: import("tailwind-variants").ClassValue | {
12
- root?: import("tailwind-variants").ClassValue;
13
- content?: import("tailwind-variants").ClassValue;
14
- };
15
- };
16
- } | {
17
- [x: string]: {
18
- [x: string]: import("tailwind-variants").ClassValue | {
19
- root?: import("tailwind-variants").ClassValue;
20
- content?: import("tailwind-variants").ClassValue;
21
- };
22
- };
23
- } | {}, {
24
- root: string;
25
- content: string;
26
- }, undefined, {
27
- [key: string]: {
28
- [key: string]: import("tailwind-variants").ClassValue | {
29
- root?: import("tailwind-variants").ClassValue;
30
- content?: import("tailwind-variants").ClassValue;
31
- };
32
- };
33
- } | {
34
- [x: string]: {
35
- [x: string]: import("tailwind-variants").ClassValue | {
36
- root?: import("tailwind-variants").ClassValue;
37
- content?: import("tailwind-variants").ClassValue;
38
- };
39
- };
40
- } | {}, {
41
- root: string;
42
- content: string;
43
- }, import("tailwind-variants").TVReturnType<{
44
- [key: string]: {
45
- [key: string]: import("tailwind-variants").ClassValue | {
46
- root?: import("tailwind-variants").ClassValue;
47
- content?: import("tailwind-variants").ClassValue;
48
- };
49
- };
50
- } | {
51
- [x: string]: {
52
- [x: string]: import("tailwind-variants").ClassValue | {
53
- root?: import("tailwind-variants").ClassValue;
54
- content?: import("tailwind-variants").ClassValue;
55
- };
56
- };
57
- } | {}, {
58
- root: string;
59
- content: string;
60
- }, undefined, {
61
- [key: string]: {
62
- [key: string]: import("tailwind-variants").ClassValue | {
63
- root?: import("tailwind-variants").ClassValue;
64
- content?: import("tailwind-variants").ClassValue;
65
- };
66
- };
67
- } | {}, {
68
- root: string;
69
- content: string;
70
- }, import("tailwind-variants").TVReturnType<unknown, {
71
- root: string;
72
- content: string;
73
- }, undefined, unknown, unknown, undefined>>>;
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/b24ui/collapsible';
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Collapsible = ComponentConfig<typeof theme, AppConfig, 'collapsible'>;
74
6
  export interface CollapsibleProps extends Pick<CollapsibleRootProps, 'defaultOpen' | 'open' | 'disabled' | 'unmountOnHide'> {
75
7
  /**
76
8
  * The element or component this component should render as.
@@ -78,7 +10,7 @@ export interface CollapsibleProps extends Pick<CollapsibleRootProps, 'defaultOpe
78
10
  */
79
11
  as?: any;
80
12
  class?: any;
81
- b24ui?: Partial<typeof collapsible.slots>;
13
+ b24ui?: Collapsible['slots'];
82
14
  }
83
15
  export interface CollapsibleEmits extends CollapsibleRootEmits {
84
16
  }