@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,9 +1,5 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/calendar";
4
- import { tv } from "../utils/tv";
5
- const appConfigCalendar = _appConfig;
6
- const calendar = tv({ extend: tv(theme), ...appConfigCalendar.b24ui?.calendar || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
@@ -11,7 +7,9 @@ import { computed } from "vue";
11
7
  import { useForwardPropsEmits } from "reka-ui";
12
8
  import { Calendar as SingleCalendar, RangeCalendar } from "reka-ui/namespaced";
13
9
  import { reactiveOmit } from "@vueuse/core";
10
+ import { useAppConfig } from "#imports";
14
11
  import { useLocale } from "../composables/useLocale";
12
+ import { tv } from "../utils/tv";
15
13
  import icons from "../dictionary/icons";
16
14
  import B24Button from "./Button.vue";
17
15
  const props = defineProps({
@@ -56,12 +54,13 @@ const props = defineProps({
56
54
  const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
57
55
  defineSlots();
58
56
  const { code: locale, dir, t } = useLocale();
57
+ const appConfig = useAppConfig();
59
58
  const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "size", "monthControls", "yearControls", "class", "b24ui"), emits);
60
59
  const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === "rtl" ? icons.chevronDoubleLeft : icons.chevronDoubleRight));
61
60
  const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === "rtl" ? icons.chevronLeft : icons.chevronRight));
62
61
  const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === "rtl" ? icons.chevronDoubleRight : icons.chevronDoubleLeft));
63
62
  const prevMonthIcon = computed(() => props.prevMonthIcon || (dir.value === "rtl" ? icons.chevronRight : icons.chevronLeft));
64
- const b24ui = computed(() => calendar({
63
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.calendar || {} })({
65
64
  color: props.color,
66
65
  size: props.size
67
66
  }));
@@ -1,340 +1,10 @@
1
- import type { VariantProps } from 'tailwind-variants';
2
1
  import type { CalendarRootProps, CalendarRootEmits, RangeCalendarRootProps, RangeCalendarRootEmits, DateRange, CalendarCellTriggerProps } from 'reka-ui';
3
2
  import type { DateValue } from '@internationalized/date';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import theme from '#build/b24ui/calendar';
4
5
  import type { IconComponent, ButtonProps } from '../types';
5
- import type { PartialString } from '../types/utils';
6
- declare const calendar: import("tailwind-variants").TVReturnType<{
7
- color: {
8
- default: {
9
- cellTrigger: string;
10
- };
11
- danger: {
12
- cellTrigger: string;
13
- };
14
- success: {
15
- cellTrigger: string;
16
- };
17
- warning: {
18
- cellTrigger: string;
19
- };
20
- primary: {
21
- cellTrigger: string;
22
- };
23
- secondary: {
24
- cellTrigger: string;
25
- };
26
- collab: {
27
- cellTrigger: string;
28
- };
29
- ai: {
30
- cellTrigger: string;
31
- };
32
- };
33
- size: {
34
- xs: {
35
- heading: string;
36
- cell: string;
37
- headCell: string;
38
- cellTrigger: string;
39
- body: string;
40
- };
41
- sm: {
42
- heading: string;
43
- headCell: string;
44
- cell: string;
45
- cellTrigger: string;
46
- };
47
- md: {
48
- heading: string;
49
- headCell: string;
50
- cell: string;
51
- cellTrigger: string;
52
- };
53
- lg: {
54
- heading: string;
55
- headCell: string;
56
- cell: string;
57
- cellTrigger: string;
58
- };
59
- };
60
- }, {
61
- root: string;
62
- header: string;
63
- body: string;
64
- heading: string;
65
- grid: string;
66
- gridRow: string;
67
- gridWeekDaysRow: string;
68
- gridBody: string;
69
- headCell: string;
70
- cell: string;
71
- cellTrigger: string;
72
- }, undefined, {
73
- color: {
74
- default: {
75
- cellTrigger: string;
76
- };
77
- danger: {
78
- cellTrigger: string;
79
- };
80
- success: {
81
- cellTrigger: string;
82
- };
83
- warning: {
84
- cellTrigger: string;
85
- };
86
- primary: {
87
- cellTrigger: string;
88
- };
89
- secondary: {
90
- cellTrigger: string;
91
- };
92
- collab: {
93
- cellTrigger: string;
94
- };
95
- ai: {
96
- cellTrigger: string;
97
- };
98
- };
99
- size: {
100
- xs: {
101
- heading: string;
102
- cell: string;
103
- headCell: string;
104
- cellTrigger: string;
105
- body: string;
106
- };
107
- sm: {
108
- heading: string;
109
- headCell: string;
110
- cell: string;
111
- cellTrigger: string;
112
- };
113
- md: {
114
- heading: string;
115
- headCell: string;
116
- cell: string;
117
- cellTrigger: string;
118
- };
119
- lg: {
120
- heading: string;
121
- headCell: string;
122
- cell: string;
123
- cellTrigger: string;
124
- };
125
- };
126
- }, {
127
- root: string;
128
- header: string;
129
- body: string;
130
- heading: string;
131
- grid: string;
132
- gridRow: string;
133
- gridWeekDaysRow: string;
134
- gridBody: string;
135
- headCell: string;
136
- cell: string;
137
- cellTrigger: string;
138
- }, import("tailwind-variants").TVReturnType<{
139
- color: {
140
- default: {
141
- cellTrigger: string;
142
- };
143
- danger: {
144
- cellTrigger: string;
145
- };
146
- success: {
147
- cellTrigger: string;
148
- };
149
- warning: {
150
- cellTrigger: string;
151
- };
152
- primary: {
153
- cellTrigger: string;
154
- };
155
- secondary: {
156
- cellTrigger: string;
157
- };
158
- collab: {
159
- cellTrigger: string;
160
- };
161
- ai: {
162
- cellTrigger: string;
163
- };
164
- };
165
- size: {
166
- xs: {
167
- heading: string;
168
- cell: string;
169
- headCell: string;
170
- cellTrigger: string;
171
- body: string;
172
- };
173
- sm: {
174
- heading: string;
175
- headCell: string;
176
- cell: string;
177
- cellTrigger: string;
178
- };
179
- md: {
180
- heading: string;
181
- headCell: string;
182
- cell: string;
183
- cellTrigger: string;
184
- };
185
- lg: {
186
- heading: string;
187
- headCell: string;
188
- cell: string;
189
- cellTrigger: string;
190
- };
191
- };
192
- }, {
193
- root: string;
194
- header: string;
195
- body: string;
196
- heading: string;
197
- grid: string;
198
- gridRow: string;
199
- gridWeekDaysRow: string;
200
- gridBody: string;
201
- headCell: string;
202
- cell: string;
203
- cellTrigger: string;
204
- }, undefined, {
205
- color: {
206
- default: {
207
- cellTrigger: string;
208
- };
209
- danger: {
210
- cellTrigger: string;
211
- };
212
- success: {
213
- cellTrigger: string;
214
- };
215
- warning: {
216
- cellTrigger: string;
217
- };
218
- primary: {
219
- cellTrigger: string;
220
- };
221
- secondary: {
222
- cellTrigger: string;
223
- };
224
- collab: {
225
- cellTrigger: string;
226
- };
227
- ai: {
228
- cellTrigger: string;
229
- };
230
- };
231
- size: {
232
- xs: {
233
- heading: string;
234
- cell: string;
235
- headCell: string;
236
- cellTrigger: string;
237
- body: string;
238
- };
239
- sm: {
240
- heading: string;
241
- headCell: string;
242
- cell: string;
243
- cellTrigger: string;
244
- };
245
- md: {
246
- heading: string;
247
- headCell: string;
248
- cell: string;
249
- cellTrigger: string;
250
- };
251
- lg: {
252
- heading: string;
253
- headCell: string;
254
- cell: string;
255
- cellTrigger: string;
256
- };
257
- };
258
- }, {
259
- root: string;
260
- header: string;
261
- body: string;
262
- heading: string;
263
- grid: string;
264
- gridRow: string;
265
- gridWeekDaysRow: string;
266
- gridBody: string;
267
- headCell: string;
268
- cell: string;
269
- cellTrigger: string;
270
- }, import("tailwind-variants").TVReturnType<{
271
- color: {
272
- default: {
273
- cellTrigger: string;
274
- };
275
- danger: {
276
- cellTrigger: string;
277
- };
278
- success: {
279
- cellTrigger: string;
280
- };
281
- warning: {
282
- cellTrigger: string;
283
- };
284
- primary: {
285
- cellTrigger: string;
286
- };
287
- secondary: {
288
- cellTrigger: string;
289
- };
290
- collab: {
291
- cellTrigger: string;
292
- };
293
- ai: {
294
- cellTrigger: string;
295
- };
296
- };
297
- size: {
298
- xs: {
299
- heading: string;
300
- cell: string;
301
- headCell: string;
302
- cellTrigger: string;
303
- body: string;
304
- };
305
- sm: {
306
- heading: string;
307
- headCell: string;
308
- cell: string;
309
- cellTrigger: string;
310
- };
311
- md: {
312
- heading: string;
313
- headCell: string;
314
- cell: string;
315
- cellTrigger: string;
316
- };
317
- lg: {
318
- heading: string;
319
- headCell: string;
320
- cell: string;
321
- cellTrigger: string;
322
- };
323
- };
324
- }, {
325
- root: string;
326
- header: string;
327
- body: string;
328
- heading: string;
329
- grid: string;
330
- gridRow: string;
331
- gridWeekDaysRow: string;
332
- gridBody: string;
333
- headCell: string;
334
- cell: string;
335
- cellTrigger: string;
336
- }, undefined, unknown, unknown, undefined>>>;
337
- type CalendarVariants = VariantProps<typeof calendar>;
6
+ import type { ComponentConfig } from '../types/utils';
7
+ type Calendar = ComponentConfig<typeof theme, AppConfig, 'calendar'>;
338
8
  type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true ? DateRange : M extends true ? DateValue[] : DateValue;
339
9
  type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true ? (DateRange | null) : M extends true ? (DateValue[] | undefined) : (DateValue | undefined);
340
10
  type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
@@ -392,11 +62,11 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
392
62
  /**
393
63
  * @defaultValue 'primary'
394
64
  */
395
- color?: CalendarVariants['color'];
65
+ color?: Calendar['variants']['color'];
396
66
  /**
397
67
  * @defaultValue 'md'
398
68
  */
399
- size?: CalendarVariants['size'];
69
+ size?: Calendar['variants']['size'];
400
70
  /** Whether a range of dates can be selected */
401
71
  range?: R & boolean;
402
72
  /** Whether multiple dates can be selected */
@@ -408,7 +78,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
408
78
  defaultValue?: CalendarDefaultValue<R, M>;
409
79
  modelValue?: CalendarModelValue<R, M>;
410
80
  class?: any;
411
- b24ui?: PartialString<typeof calendar.slots>;
81
+ b24ui?: Calendar['slots'];
412
82
  }
413
83
  export interface CalendarEmits<R extends boolean, M extends boolean> extends Omit<CalendarRootEmits & RangeCalendarRootEmits, 'update:modelValue'> {
414
84
  'update:modelValue': [date: CalendarModelValue<R, M>];
@@ -1,16 +1,14 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/checkbox";
4
- import { tv } from "../utils/tv";
5
- const appConfigCheckbox = _appConfig;
6
- const checkbox = tv({ extend: tv(theme), ...appConfigCheckbox.b24ui?.checkbox || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
10
6
  import { computed, useId } from "vue";
11
7
  import { Primitive, CheckboxRoot, CheckboxIndicator, Label, useForwardProps } from "reka-ui";
12
8
  import { reactivePick } from "@vueuse/core";
9
+ import { useAppConfig } from "#imports";
13
10
  import { useFormField } from "../composables/useFormField";
11
+ import { tv } from "../utils/tv";
14
12
  import Minus20Icon from "@bitrix24/b24icons-vue/actions/Minus20Icon";
15
13
  import CheckIcon from "@bitrix24/b24icons-vue/main/CheckIcon";
16
14
  defineOptions({ inheritAttrs: false });
@@ -21,7 +19,7 @@ const props = defineProps({
21
19
  color: { type: null, required: false },
22
20
  size: { type: null, required: false },
23
21
  class: { type: null, required: false },
24
- b24ui: { type: Object, required: false },
22
+ b24ui: { type: null, required: false },
25
23
  disabled: { type: Boolean, required: false },
26
24
  required: { type: Boolean, required: false },
27
25
  name: { type: String, required: false },
@@ -32,10 +30,11 @@ const props = defineProps({
32
30
  const slots = defineSlots();
33
31
  const emits = defineEmits(["change"]);
34
32
  const modelValue = defineModel({ type: [Boolean, String], ...{ default: void 0 } });
33
+ const appConfig = useAppConfig();
35
34
  const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue"));
36
35
  const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
37
36
  const id = _id.value ?? useId();
38
- const b24ui = computed(() => checkbox({
37
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.checkbox || {} })({
39
38
  size: size.value,
40
39
  color: color.value,
41
40
  required: props.required,