@bitrix24/b24ui-nuxt 0.5.11 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/.nuxt/b24ui/input-menu.ts +2 -2
  2. package/.nuxt/b24ui/select-menu.ts +4 -4
  3. package/.nuxt/b24ui/select.ts +2 -2
  4. package/dist/meta.d.mts +5208 -5061
  5. package/dist/meta.mjs +5208 -5061
  6. package/dist/module.json +3 -3
  7. package/dist/module.mjs +2 -2
  8. package/dist/runtime/components/Advice.vue +27 -54
  9. package/dist/runtime/components/Advice.vue.d.ts +170 -0
  10. package/dist/runtime/components/Alert.vue +35 -96
  11. package/dist/runtime/components/Alert.vue.d.ts +464 -0
  12. package/dist/runtime/components/App.vue +24 -34
  13. package/dist/runtime/components/App.vue.d.ts +23 -0
  14. package/dist/runtime/components/Avatar.vue +43 -81
  15. package/dist/runtime/components/Avatar.vue.d.ts +281 -0
  16. package/dist/runtime/components/AvatarGroup.vue +40 -76
  17. package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
  18. package/dist/runtime/components/Badge.vue +40 -83
  19. package/dist/runtime/components/Badge.vue.d.ts +517 -0
  20. package/dist/runtime/components/Button.vue +96 -155
  21. package/dist/runtime/components/Button.vue.d.ts +640 -0
  22. package/dist/runtime/components/ButtonGroup.vue +19 -51
  23. package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
  24. package/dist/runtime/components/Calendar.vue +73 -152
  25. package/dist/runtime/components/Calendar.vue.d.ts +437 -0
  26. package/dist/runtime/components/Checkbox.vue +42 -73
  27. package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
  28. package/dist/runtime/components/Chip.vue +26 -74
  29. package/dist/runtime/components/Chip.vue.d.ts +271 -0
  30. package/dist/runtime/components/Collapsible.vue +22 -41
  31. package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
  32. package/dist/runtime/components/Container.vue +13 -27
  33. package/dist/runtime/components/Container.vue.d.ts +27 -0
  34. package/dist/runtime/components/Countdown.vue +153 -378
  35. package/dist/runtime/components/Countdown.vue.d.ts +356 -0
  36. package/dist/runtime/components/DescriptionList.vue +78 -149
  37. package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
  38. package/dist/runtime/components/DropdownMenu.vue +38 -139
  39. package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
  40. package/dist/runtime/components/DropdownMenuContent.vue +68 -80
  41. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
  42. package/dist/runtime/components/Form.vue +130 -217
  43. package/dist/runtime/components/Form.vue.d.ts +55 -0
  44. package/dist/runtime/components/FormField.vue +36 -80
  45. package/dist/runtime/components/FormField.vue.d.ts +282 -0
  46. package/dist/runtime/components/Input.vue +79 -179
  47. package/dist/runtime/components/Input.vue.d.ts +755 -0
  48. package/dist/runtime/components/InputMenu.vue +185 -381
  49. package/dist/runtime/components/InputMenu.vue.d.ts +1523 -0
  50. package/dist/runtime/components/InputNumber.vue +77 -175
  51. package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
  52. package/dist/runtime/components/Kbd.vue +18 -45
  53. package/dist/runtime/components/Kbd.vue.d.ts +109 -0
  54. package/dist/runtime/components/Link.vue +92 -173
  55. package/dist/runtime/components/Link.vue.d.ts +129 -0
  56. package/dist/runtime/components/LinkBase.vue +33 -42
  57. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  58. package/dist/runtime/components/Modal.vue +48 -127
  59. package/dist/runtime/components/Modal.vue.d.ts +327 -0
  60. package/dist/runtime/components/ModalDialogClose.vue +5 -8
  61. package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
  62. package/dist/runtime/components/Navbar.vue +15 -33
  63. package/dist/runtime/components/Navbar.vue.d.ts +101 -0
  64. package/dist/runtime/components/NavbarDivider.vue +15 -33
  65. package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
  66. package/dist/runtime/components/NavbarSection.vue +15 -33
  67. package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
  68. package/dist/runtime/components/NavbarSpacer.vue +15 -33
  69. package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
  70. package/dist/runtime/components/NavigationMenu.vue +74 -208
  71. package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
  72. package/dist/runtime/components/OverlayProvider.vue +14 -18
  73. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  74. package/dist/runtime/components/Popover.vue +40 -81
  75. package/dist/runtime/components/Popover.vue.d.ts +147 -0
  76. package/dist/runtime/components/Progress.vue +70 -136
  77. package/dist/runtime/components/Progress.vue.d.ts +592 -0
  78. package/dist/runtime/components/RadioGroup.vue +59 -134
  79. package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
  80. package/dist/runtime/components/Range.vue +46 -85
  81. package/dist/runtime/components/Range.vue.d.ts +417 -0
  82. package/dist/runtime/components/Select.vue +110 -260
  83. package/dist/runtime/components/Select.vue.d.ts +1201 -0
  84. package/dist/runtime/components/SelectMenu.vue +161 -347
  85. package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
  86. package/dist/runtime/components/Separator.vue +28 -71
  87. package/dist/runtime/components/Separator.vue.d.ts +400 -0
  88. package/dist/runtime/components/Sidebar.vue +15 -33
  89. package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
  90. package/dist/runtime/components/SidebarBody.vue +17 -38
  91. package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
  92. package/dist/runtime/components/SidebarFooter.vue +15 -33
  93. package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
  94. package/dist/runtime/components/SidebarHeader.vue +15 -33
  95. package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
  96. package/dist/runtime/components/SidebarHeading.vue +15 -33
  97. package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
  98. package/dist/runtime/components/SidebarLayout.vue +34 -70
  99. package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
  100. package/dist/runtime/components/SidebarSection.vue +15 -33
  101. package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
  102. package/dist/runtime/components/SidebarSpacer.vue +15 -33
  103. package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
  104. package/dist/runtime/components/Skeleton.vue +12 -22
  105. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  106. package/dist/runtime/components/Slideover.vue +50 -131
  107. package/dist/runtime/components/Slideover.vue.d.ts +360 -0
  108. package/dist/runtime/components/StackedLayout.vue +34 -73
  109. package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
  110. package/dist/runtime/components/Switch.vue +46 -95
  111. package/dist/runtime/components/Switch.vue.d.ts +587 -0
  112. package/dist/runtime/components/Tabs.vue +37 -105
  113. package/dist/runtime/components/Tabs.vue.d.ts +453 -0
  114. package/dist/runtime/components/Textarea.vue +92 -201
  115. package/dist/runtime/components/Textarea.vue.d.ts +601 -0
  116. package/dist/runtime/components/Toast.vue +47 -105
  117. package/dist/runtime/components/Toast.vue.d.ts +438 -0
  118. package/dist/runtime/components/Toaster.vue +70 -115
  119. package/dist/runtime/components/Toaster.vue.d.ts +219 -0
  120. package/dist/runtime/components/Tooltip.vue +36 -64
  121. package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
  122. package/dist/runtime/components/content/TableWrapper.vue +24 -70
  123. package/dist/runtime/components/content/TableWrapper.vue.d.ts +237 -0
  124. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  125. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  126. package/dist/runtime/composables/useComponentIcons.d.ts +3 -3
  127. package/dist/runtime/composables/useFormField.d.ts +2 -2
  128. package/dist/runtime/composables/useOverlay.d.ts +14 -7
  129. package/dist/runtime/composables/useOverlay.js +14 -6
  130. package/dist/runtime/prose/A.vue +12 -23
  131. package/dist/runtime/prose/A.vue.d.ts +84 -0
  132. package/dist/runtime/prose/Blockquote.vue +12 -23
  133. package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
  134. package/dist/runtime/prose/Code.vue +14 -31
  135. package/dist/runtime/prose/Code.vue.d.ts +97 -0
  136. package/dist/runtime/prose/Em.vue +12 -23
  137. package/dist/runtime/prose/Em.vue.d.ts +84 -0
  138. package/dist/runtime/prose/H1.vue +12 -23
  139. package/dist/runtime/prose/H1.vue.d.ts +97 -0
  140. package/dist/runtime/prose/H2.vue +12 -23
  141. package/dist/runtime/prose/H2.vue.d.ts +123 -0
  142. package/dist/runtime/prose/H3.vue +12 -23
  143. package/dist/runtime/prose/H3.vue.d.ts +123 -0
  144. package/dist/runtime/prose/H4.vue +12 -23
  145. package/dist/runtime/prose/H4.vue.d.ts +123 -0
  146. package/dist/runtime/prose/H5.vue +12 -23
  147. package/dist/runtime/prose/H5.vue.d.ts +123 -0
  148. package/dist/runtime/prose/H6.vue +12 -23
  149. package/dist/runtime/prose/H6.vue.d.ts +123 -0
  150. package/dist/runtime/prose/Hr.vue +12 -19
  151. package/dist/runtime/prose/Hr.vue.d.ts +74 -0
  152. package/dist/runtime/prose/Img.vue +12 -23
  153. package/dist/runtime/prose/Img.vue.d.ts +77 -0
  154. package/dist/runtime/prose/Li.vue +12 -23
  155. package/dist/runtime/prose/Li.vue.d.ts +84 -0
  156. package/dist/runtime/prose/Ol.vue +12 -23
  157. package/dist/runtime/prose/Ol.vue.d.ts +84 -0
  158. package/dist/runtime/prose/P.vue +12 -23
  159. package/dist/runtime/prose/P.vue.d.ts +84 -0
  160. package/dist/runtime/prose/Pre.vue +16 -33
  161. package/dist/runtime/prose/Pre.vue.d.ts +117 -0
  162. package/dist/runtime/prose/Strong.vue +12 -23
  163. package/dist/runtime/prose/Strong.vue.d.ts +84 -0
  164. package/dist/runtime/prose/Table.vue +19 -54
  165. package/dist/runtime/prose/Table.vue.d.ts +144 -0
  166. package/dist/runtime/prose/Tbody.vue +12 -23
  167. package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
  168. package/dist/runtime/prose/Td.vue +12 -23
  169. package/dist/runtime/prose/Td.vue.d.ts +84 -0
  170. package/dist/runtime/prose/Th.vue +12 -23
  171. package/dist/runtime/prose/Th.vue.d.ts +84 -0
  172. package/dist/runtime/prose/Thead.vue +12 -23
  173. package/dist/runtime/prose/Thead.vue.d.ts +84 -0
  174. package/dist/runtime/prose/Tr.vue +12 -23
  175. package/dist/runtime/prose/Tr.vue.d.ts +84 -0
  176. package/dist/runtime/prose/Ul.vue +12 -23
  177. package/dist/runtime/prose/Ul.vue.d.ts +84 -0
  178. package/dist/runtime/utils/link.d.ts +3 -3
  179. package/dist/runtime/vue/components/Link.vue +115 -202
  180. package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
  181. package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
  182. package/dist/types.d.mts +3 -5
  183. package/dist/unplugin.mjs +1 -1
  184. package/dist/vite.mjs +1 -1
  185. package/package.json +14 -22
  186. package/dist/meta.cjs +0 -72112
  187. package/dist/meta.d.cts +0 -72110
  188. package/dist/meta.d.ts +0 -72110
  189. package/dist/module.cjs +0 -63
  190. package/dist/module.d.cts +0 -15
  191. package/dist/module.d.ts +0 -15
  192. package/dist/shared/b24ui-nuxt.DrKwIWoc.cjs +0 -7721
  193. package/dist/types.d.ts +0 -7
  194. package/dist/unplugin.cjs +0 -236
  195. package/dist/unplugin.d.cts +0 -33
  196. package/dist/unplugin.d.ts +0 -33
  197. package/dist/vite.cjs +0 -21
  198. package/dist/vite.d.cts +0 -14
  199. package/dist/vite.d.ts +0 -14
@@ -0,0 +1,464 @@
1
+ import type { VariantProps } from 'tailwind-variants';
2
+ import type { AvatarProps, ButtonProps, IconComponent } from '../types';
3
+ declare const alert: import("tailwind-variants").TVReturnType<{
4
+ color: {
5
+ default: {
6
+ root: string[];
7
+ close: string;
8
+ };
9
+ danger: {
10
+ root: string[];
11
+ close: string;
12
+ };
13
+ success: {
14
+ root: string[];
15
+ close: string;
16
+ };
17
+ warning: {
18
+ root: string[];
19
+ close: string;
20
+ };
21
+ primary: {
22
+ root: string[];
23
+ close: string;
24
+ };
25
+ secondary: {
26
+ root: string[];
27
+ close: string;
28
+ };
29
+ collab: {
30
+ root: string[];
31
+ close: string;
32
+ };
33
+ ai: {
34
+ root: string[];
35
+ close: string;
36
+ };
37
+ };
38
+ size: {
39
+ sm: {
40
+ root: string;
41
+ title: string;
42
+ description: string;
43
+ avatarSize: string;
44
+ };
45
+ md: {
46
+ root: string;
47
+ title: string;
48
+ description: string;
49
+ avatarSize: string;
50
+ };
51
+ };
52
+ orientation: {
53
+ horizontal: {
54
+ root: string;
55
+ actions: string;
56
+ };
57
+ vertical: {
58
+ root: string;
59
+ actions: string;
60
+ };
61
+ };
62
+ title: {
63
+ true: {
64
+ description: string;
65
+ };
66
+ };
67
+ }, {
68
+ root: string;
69
+ wrapper: string;
70
+ title: string;
71
+ description: string;
72
+ icon: string;
73
+ avatar: string;
74
+ avatarSize: string;
75
+ actions: string;
76
+ close: string;
77
+ }, undefined, {
78
+ color: {
79
+ default: {
80
+ root: string[];
81
+ close: string;
82
+ };
83
+ danger: {
84
+ root: string[];
85
+ close: string;
86
+ };
87
+ success: {
88
+ root: string[];
89
+ close: string;
90
+ };
91
+ warning: {
92
+ root: string[];
93
+ close: string;
94
+ };
95
+ primary: {
96
+ root: string[];
97
+ close: string;
98
+ };
99
+ secondary: {
100
+ root: string[];
101
+ close: string;
102
+ };
103
+ collab: {
104
+ root: string[];
105
+ close: string;
106
+ };
107
+ ai: {
108
+ root: string[];
109
+ close: string;
110
+ };
111
+ };
112
+ size: {
113
+ sm: {
114
+ root: string;
115
+ title: string;
116
+ description: string;
117
+ avatarSize: string;
118
+ };
119
+ md: {
120
+ root: string;
121
+ title: string;
122
+ description: string;
123
+ avatarSize: string;
124
+ };
125
+ };
126
+ orientation: {
127
+ horizontal: {
128
+ root: string;
129
+ actions: string;
130
+ };
131
+ vertical: {
132
+ root: string;
133
+ actions: string;
134
+ };
135
+ };
136
+ title: {
137
+ true: {
138
+ description: string;
139
+ };
140
+ };
141
+ }, {
142
+ root: string;
143
+ wrapper: string;
144
+ title: string;
145
+ description: string;
146
+ icon: string;
147
+ avatar: string;
148
+ avatarSize: string;
149
+ actions: string;
150
+ close: string;
151
+ }, import("tailwind-variants").TVReturnType<{
152
+ color: {
153
+ default: {
154
+ root: string[];
155
+ close: string;
156
+ };
157
+ danger: {
158
+ root: string[];
159
+ close: string;
160
+ };
161
+ success: {
162
+ root: string[];
163
+ close: string;
164
+ };
165
+ warning: {
166
+ root: string[];
167
+ close: string;
168
+ };
169
+ primary: {
170
+ root: string[];
171
+ close: string;
172
+ };
173
+ secondary: {
174
+ root: string[];
175
+ close: string;
176
+ };
177
+ collab: {
178
+ root: string[];
179
+ close: string;
180
+ };
181
+ ai: {
182
+ root: string[];
183
+ close: string;
184
+ };
185
+ };
186
+ size: {
187
+ sm: {
188
+ root: string;
189
+ title: string;
190
+ description: string;
191
+ avatarSize: string;
192
+ };
193
+ md: {
194
+ root: string;
195
+ title: string;
196
+ description: string;
197
+ avatarSize: string;
198
+ };
199
+ };
200
+ orientation: {
201
+ horizontal: {
202
+ root: string;
203
+ actions: string;
204
+ };
205
+ vertical: {
206
+ root: string;
207
+ actions: string;
208
+ };
209
+ };
210
+ title: {
211
+ true: {
212
+ description: string;
213
+ };
214
+ };
215
+ }, {
216
+ root: string;
217
+ wrapper: string;
218
+ title: string;
219
+ description: string;
220
+ icon: string;
221
+ avatar: string;
222
+ avatarSize: string;
223
+ actions: string;
224
+ close: string;
225
+ }, undefined, {
226
+ color: {
227
+ default: {
228
+ root: string[];
229
+ close: string;
230
+ };
231
+ danger: {
232
+ root: string[];
233
+ close: string;
234
+ };
235
+ success: {
236
+ root: string[];
237
+ close: string;
238
+ };
239
+ warning: {
240
+ root: string[];
241
+ close: string;
242
+ };
243
+ primary: {
244
+ root: string[];
245
+ close: string;
246
+ };
247
+ secondary: {
248
+ root: string[];
249
+ close: string;
250
+ };
251
+ collab: {
252
+ root: string[];
253
+ close: string;
254
+ };
255
+ ai: {
256
+ root: string[];
257
+ close: string;
258
+ };
259
+ };
260
+ size: {
261
+ sm: {
262
+ root: string;
263
+ title: string;
264
+ description: string;
265
+ avatarSize: string;
266
+ };
267
+ md: {
268
+ root: string;
269
+ title: string;
270
+ description: string;
271
+ avatarSize: string;
272
+ };
273
+ };
274
+ orientation: {
275
+ horizontal: {
276
+ root: string;
277
+ actions: string;
278
+ };
279
+ vertical: {
280
+ root: string;
281
+ actions: string;
282
+ };
283
+ };
284
+ title: {
285
+ true: {
286
+ description: string;
287
+ };
288
+ };
289
+ }, {
290
+ root: string;
291
+ wrapper: string;
292
+ title: string;
293
+ description: string;
294
+ icon: string;
295
+ avatar: string;
296
+ avatarSize: string;
297
+ actions: string;
298
+ close: string;
299
+ }, import("tailwind-variants").TVReturnType<{
300
+ color: {
301
+ default: {
302
+ root: string[];
303
+ close: string;
304
+ };
305
+ danger: {
306
+ root: string[];
307
+ close: string;
308
+ };
309
+ success: {
310
+ root: string[];
311
+ close: string;
312
+ };
313
+ warning: {
314
+ root: string[];
315
+ close: string;
316
+ };
317
+ primary: {
318
+ root: string[];
319
+ close: string;
320
+ };
321
+ secondary: {
322
+ root: string[];
323
+ close: string;
324
+ };
325
+ collab: {
326
+ root: string[];
327
+ close: string;
328
+ };
329
+ ai: {
330
+ root: string[];
331
+ close: string;
332
+ };
333
+ };
334
+ size: {
335
+ sm: {
336
+ root: string;
337
+ title: string;
338
+ description: string;
339
+ avatarSize: string;
340
+ };
341
+ md: {
342
+ root: string;
343
+ title: string;
344
+ description: string;
345
+ avatarSize: string;
346
+ };
347
+ };
348
+ orientation: {
349
+ horizontal: {
350
+ root: string;
351
+ actions: string;
352
+ };
353
+ vertical: {
354
+ root: string;
355
+ actions: string;
356
+ };
357
+ };
358
+ title: {
359
+ true: {
360
+ description: string;
361
+ };
362
+ };
363
+ }, {
364
+ root: string;
365
+ wrapper: string;
366
+ title: string;
367
+ description: string;
368
+ icon: string;
369
+ avatar: string;
370
+ avatarSize: string;
371
+ actions: string;
372
+ close: string;
373
+ }, undefined, unknown, unknown, undefined>>>;
374
+ type AlertVariants = VariantProps<typeof alert>;
375
+ export interface AlertProps {
376
+ /**
377
+ * The element or component this component should render as.
378
+ * @defaultValue 'div'
379
+ */
380
+ as?: any;
381
+ title?: string;
382
+ description?: string;
383
+ /**
384
+ * Display an icon on the left side.
385
+ * @IconComponent
386
+ */
387
+ icon?: IconComponent;
388
+ avatar?: AvatarProps;
389
+ /**
390
+ * @defaultValue 'default'
391
+ */
392
+ color?: AlertVariants['color'];
393
+ /**
394
+ * The orientation between the content and the actions.
395
+ * @defaultValue 'vertical'
396
+ */
397
+ orientation?: AlertVariants['orientation'];
398
+ /**
399
+ * @defaultValue 'md'
400
+ */
401
+ size?: AlertVariants['size'];
402
+ /**
403
+ * Display a list of actions:
404
+ * - under the title and description when orientation is `vertical`
405
+ * - next to the close button when orientation is `horizontal`
406
+ * `{ size: 'xs' }`{lang="ts"}
407
+ */
408
+ actions?: ButtonProps[];
409
+ /**
410
+ * Display a close button to dismiss the alert.
411
+ * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts"}
412
+ * @emits 'update:open'
413
+ * @defaultValue false
414
+ */
415
+ close?: boolean | Partial<ButtonProps>;
416
+ /**
417
+ * The icon displayed in the close button.
418
+ * @defaultValue icons.close
419
+ * @IconComponent
420
+ */
421
+ closeIcon?: IconComponent;
422
+ class?: any;
423
+ b24ui?: Partial<typeof alert.slots>;
424
+ }
425
+ export interface AlertEmits {
426
+ (e: 'update:open', value: boolean): void;
427
+ }
428
+ export interface AlertSlots {
429
+ leading(props?: {}): any;
430
+ title(props?: {}): any;
431
+ description(props?: {}): any;
432
+ actions(props?: {}): any;
433
+ close(props: {
434
+ b24ui: ReturnType<typeof alert>;
435
+ }): any;
436
+ }
437
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, {
438
+ orientation: string;
439
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
440
+ orientation: "horizontal" | "vertical";
441
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AlertSlots> & AlertSlots>;
442
+ export default _default;
443
+ type __VLS_WithDefaults<P, D> = {
444
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
445
+ default: D[K];
446
+ }> : P[K];
447
+ };
448
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
449
+ type __VLS_TypePropsToOption<T> = {
450
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
451
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
452
+ } : {
453
+ type: import('vue').PropType<T[K]>;
454
+ required: true;
455
+ };
456
+ };
457
+ type __VLS_WithTemplateSlots<T, S> = T & {
458
+ new (): {
459
+ $slots: S;
460
+ };
461
+ };
462
+ type __VLS_PrettifyLocal<T> = {
463
+ [K in keyof T]: T[K];
464
+ } & {};
@@ -1,43 +1,33 @@
1
- <script lang="ts">
2
- import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui'
3
- import type { ToasterProps, Locale, Messages } from '../types'
4
-
5
- export interface AppProps<T extends Messages = Messages> extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
6
- tooltip?: TooltipProviderProps
7
- toaster?: ToasterProps | null
8
- locale?: Locale<T>
9
- }
10
-
11
- export interface AppSlots {
12
- default(props?: {}): any
13
- }
14
-
1
+ <script>
15
2
  export default {
16
- name: 'App'
17
- }
3
+ name: "App"
4
+ };
18
5
  </script>
19
6
 
20
- <script setup lang="ts" generic="T extends Messages">
21
- import { toRef, useId, provide } from 'vue'
22
- import { ConfigProvider, TooltipProvider, useForwardProps } from 'reka-ui'
23
- import { reactivePick } from '@vueuse/core'
24
- import { localeContextInjectionKey } from '../composables/useLocale'
25
- import B24Toaster from './Toaster.vue'
26
- import B24OverlayProvider from './OverlayProvider.vue'
27
-
28
- const props = defineProps<AppProps<T>>()
29
- defineSlots<AppSlots>()
30
-
31
- const configProviderProps = useForwardProps(reactivePick(props, 'scrollBody'))
32
- const tooltipProps = toRef(() => props.tooltip)
33
- const toasterProps = toRef(() => props.toaster)
34
-
35
- const locale = toRef(() => props.locale)
36
- provide(localeContextInjectionKey, locale)
7
+ <script setup>
8
+ import { toRef, useId, provide } from "vue";
9
+ import { ConfigProvider, TooltipProvider, useForwardProps } from "reka-ui";
10
+ import { reactivePick } from "@vueuse/core";
11
+ import { localeContextInjectionKey } from "../composables/useLocale";
12
+ import B24Toaster from "./Toaster.vue";
13
+ import B24OverlayProvider from "./OverlayProvider.vue";
14
+ const props = defineProps({
15
+ tooltip: { type: Object, required: false },
16
+ toaster: { type: [Object, null], required: false },
17
+ locale: { type: null, required: false },
18
+ scrollBody: { type: [Boolean, Object], required: false },
19
+ nonce: { type: String, required: false }
20
+ });
21
+ defineSlots();
22
+ const configProviderProps = useForwardProps(reactivePick(props, "scrollBody"));
23
+ const tooltipProps = toRef(() => props.tooltip);
24
+ const toasterProps = toRef(() => props.toaster);
25
+ const locale = toRef(() => props.locale);
26
+ provide(localeContextInjectionKey, locale);
37
27
  </script>
38
28
 
39
29
  <template>
40
- <ConfigProvider :use-id="() => (useId() as string)" :dir="locale?.dir" :locale="locale?.code" v-bind="configProviderProps">
30
+ <ConfigProvider :use-id="() => useId()" :dir="locale?.dir" :locale="locale?.code" v-bind="configProviderProps">
41
31
  <TooltipProvider v-bind="tooltipProps">
42
32
  <B24Toaster v-if="toaster !== null" v-bind="toasterProps">
43
33
  <slot />
@@ -0,0 +1,23 @@
1
+ import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui';
2
+ import type { ToasterProps, Locale, Messages } from '../types';
3
+ export interface AppProps<T extends Messages = Messages> extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
4
+ tooltip?: TooltipProviderProps;
5
+ toaster?: ToasterProps | null;
6
+ locale?: Locale<T>;
7
+ }
8
+ export interface AppSlots {
9
+ default(props?: {}): any;
10
+ }
11
+ declare const _default: <T extends Messages>(__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<{
12
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & AppProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
13
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
14
+ attrs: any;
15
+ slots: Readonly<AppSlots> & AppSlots;
16
+ emit: {};
17
+ }>) => import("vue").VNode & {
18
+ __ctx?: Awaited<typeof __VLS_setup>;
19
+ };
20
+ export default _default;
21
+ type __VLS_PrettifyLocal<T> = {
22
+ [K in keyof T]: T[K];
23
+ } & {};
@@ -1,92 +1,54 @@
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/avatar'
6
- import { tv } from '../utils/tv'
7
- import type { IconComponent } from '../types'
8
-
9
- const appConfigAvatar = _appConfig as AppConfig & { b24ui: { avatar: Partial<typeof theme> } }
10
-
11
- const avatar = tv({ extend: tv(theme), ...(appConfigAvatar.b24ui?.avatar || {}) })
12
-
13
- type AvatarVariants = VariantProps<typeof avatar>
14
-
15
- export interface AvatarProps {
16
- /**
17
- * The element or component this component should render as.
18
- * @defaultValue 'span'
19
- */
20
- as?: any
21
- src?: string
22
- alt?: string
23
- /**
24
- * Display an icon on the left side.
25
- * @IconComponent
26
- */
27
- icon?: IconComponent
28
- text?: string
29
- /**
30
- * @defaultValue 'md'
31
- */
32
- size?: AvatarVariants['size']
33
- class?: any
34
- style?: any
35
- b24ui?: Partial<typeof avatar.slots>
36
- }
37
-
38
- export interface AvatarSlots {
39
- default(props?: {}): any
40
- }
1
+ <script>
2
+ import _appConfig from "#build/app.config";
3
+ import theme from "#build/b24ui/avatar";
4
+ import { tv } from "../utils/tv";
5
+ const appConfigAvatar = _appConfig;
6
+ const avatar = tv({ extend: tv(theme), ...appConfigAvatar.b24ui?.avatar || {} });
41
7
  </script>
42
8
 
43
- <script setup lang="ts">
44
- import { ref, computed, watch } from 'vue'
45
- import { Primitive, Slot } from 'reka-ui'
46
- import ImageComponent from '#build/b24ui-image-component'
47
- import { useAvatarGroup } from '../composables/useAvatarGroup'
48
-
49
- defineOptions({ inheritAttrs: false })
50
-
51
- const props = withDefaults(defineProps<AvatarProps>(), { as: 'span' })
52
-
53
- const fallback = computed(() => props.text || (props.alt || '')
54
- .replace(/[+\-*)(}\][{]/g, '')
55
- .split(' ')
56
- .map(word => word.charAt(0))
57
- .join('')
58
- .substring(0, 2)
59
- )
60
-
61
- const { size } = useAvatarGroup(props)
62
-
63
- // eslint-disable-next-line vue/no-dupe-keys
9
+ <script setup>
10
+ import { ref, computed, watch } from "vue";
11
+ import { Primitive, Slot } from "reka-ui";
12
+ import ImageComponent from "#build/b24ui-image-component";
13
+ import { useAvatarGroup } from "../composables/useAvatarGroup";
14
+ defineOptions({ inheritAttrs: false });
15
+ const props = defineProps({
16
+ as: { type: null, required: false, default: "span" },
17
+ src: { type: String, required: false },
18
+ alt: { type: String, required: false },
19
+ icon: { type: [Function, Object], required: false },
20
+ text: { type: String, required: false },
21
+ size: { type: null, required: false },
22
+ class: { type: null, required: false },
23
+ style: { type: null, required: false },
24
+ b24ui: { type: Object, required: false }
25
+ });
26
+ const fallback = computed(
27
+ () => props.text || (props.alt || "").replace(/[+\-*)(}\][{]/g, "").split(" ").map((word) => word.charAt(0)).join("").substring(0, 2)
28
+ );
29
+ const { size } = useAvatarGroup(props);
64
30
  const b24ui = computed(() => avatar({
65
31
  size: size.value
66
- }))
67
-
32
+ }));
68
33
  const sizePx = computed(() => ({
69
- '3xs': 10,
70
- '2xs': 14,
71
- 'xs': 18,
72
- 'sm': 22,
73
- 'md': 32,
74
- 'lg': 42,
75
- 'xl': 48,
76
- '2xl': 60,
77
- '3xl': 94
78
- })[props.size || 'md'])
79
-
80
- const error = ref(false)
81
-
34
+ "3xs": 10,
35
+ "2xs": 14,
36
+ "xs": 18,
37
+ "sm": 22,
38
+ "md": 32,
39
+ "lg": 42,
40
+ "xl": 48,
41
+ "2xl": 60,
42
+ "3xl": 94
43
+ })[props.size || "md"]);
44
+ const error = ref(false);
82
45
  watch(() => props.src, () => {
83
46
  if (error.value) {
84
- error.value = false
47
+ error.value = false;
85
48
  }
86
- })
87
-
49
+ });
88
50
  function onError() {
89
- error.value = true
51
+ error.value = true;
90
52
  }
91
53
  </script>
92
54
 
@@ -108,7 +70,7 @@ function onError() {
108
70
  <Slot v-else v-bind="$attrs">
109
71
  <slot>
110
72
  <Component :is="icon" v-if="icon" :class="b24ui.icon({ class: props.b24ui?.icon })" />
111
- <span v-else :class="b24ui.fallback({ class: props.b24ui?.fallback })">{{ fallback || '&nbsp;' }}</span>
73
+ <span v-else :class="b24ui.fallback({ class: props.b24ui?.fallback })">{{ fallback || '\xA0' }}</span>
112
74
  </slot>
113
75
  </Slot>
114
76
  </Primitive>