@bitrix24/b24ui-nuxt 0.7.1 → 1.0.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 (260) hide show
  1. package/.nuxt/b24ui/accordion.ts +3 -3
  2. package/.nuxt/b24ui/advice.ts +6 -5
  3. package/.nuxt/b24ui/alert.ts +102 -49
  4. package/.nuxt/b24ui/avatar-group.ts +10 -10
  5. package/.nuxt/b24ui/avatar.ts +18 -18
  6. package/.nuxt/b24ui/badge.ts +167 -176
  7. package/.nuxt/b24ui/button-group.ts +3 -1
  8. package/.nuxt/b24ui/button.ts +179 -170
  9. package/.nuxt/b24ui/calendar.ts +48 -28
  10. package/.nuxt/b24ui/checkbox.ts +82 -85
  11. package/.nuxt/b24ui/chip.ts +121 -32
  12. package/.nuxt/b24ui/container.ts +1 -1
  13. package/.nuxt/b24ui/content/table-wrapper.ts +11 -11
  14. package/.nuxt/b24ui/countdown.ts +11 -11
  15. package/.nuxt/b24ui/description-list.ts +6 -6
  16. package/.nuxt/b24ui/dropdown-menu.ts +111 -183
  17. package/.nuxt/b24ui/form-field.ts +19 -19
  18. package/.nuxt/b24ui/index.ts +0 -1
  19. package/.nuxt/b24ui/input-menu.ts +294 -357
  20. package/.nuxt/b24ui/input-number.ts +111 -259
  21. package/.nuxt/b24ui/input.ts +136 -259
  22. package/.nuxt/b24ui/kbd.ts +15 -13
  23. package/.nuxt/b24ui/link.ts +5 -5
  24. package/.nuxt/b24ui/modal.ts +14 -12
  25. package/.nuxt/b24ui/navbar-divider.ts +1 -1
  26. package/.nuxt/b24ui/navbar-section.ts +1 -1
  27. package/.nuxt/b24ui/navbar.ts +1 -1
  28. package/.nuxt/b24ui/navigation-menu.ts +70 -754
  29. package/.nuxt/b24ui/popover.ts +2 -2
  30. package/.nuxt/b24ui/progress.ts +58 -68
  31. package/.nuxt/b24ui/prose/a.ts +1 -1
  32. package/.nuxt/b24ui/prose/blockquote.ts +1 -1
  33. package/.nuxt/b24ui/prose/code.ts +45 -9
  34. package/.nuxt/b24ui/prose/h1.ts +21 -2
  35. package/.nuxt/b24ui/prose/h2.ts +21 -12
  36. package/.nuxt/b24ui/prose/h3.ts +21 -12
  37. package/.nuxt/b24ui/prose/h4.ts +21 -12
  38. package/.nuxt/b24ui/prose/h5.ts +21 -12
  39. package/.nuxt/b24ui/prose/h6.ts +21 -12
  40. package/.nuxt/b24ui/prose/hr.ts +1 -1
  41. package/.nuxt/b24ui/prose/ol.ts +1 -1
  42. package/.nuxt/b24ui/prose/p.ts +26 -1
  43. package/.nuxt/b24ui/prose/thead.ts +1 -1
  44. package/.nuxt/b24ui/prose/ul.ts +1 -1
  45. package/.nuxt/b24ui/radio-group.ts +115 -155
  46. package/.nuxt/b24ui/range.ts +38 -26
  47. package/.nuxt/b24ui/select-menu.ts +251 -306
  48. package/.nuxt/b24ui/select.ts +246 -301
  49. package/.nuxt/b24ui/separator.ts +40 -85
  50. package/.nuxt/b24ui/sidebar-header.ts +1 -1
  51. package/.nuxt/b24ui/sidebar-heading.ts +1 -1
  52. package/.nuxt/b24ui/sidebar-layout.ts +130 -19
  53. package/.nuxt/b24ui/sidebar-section.ts +1 -1
  54. package/.nuxt/b24ui/skeleton.ts +19 -1
  55. package/.nuxt/b24ui/slideover.ts +35 -34
  56. package/.nuxt/b24ui/switch.ts +59 -48
  57. package/.nuxt/b24ui/tabs.ts +26 -239
  58. package/.nuxt/b24ui/textarea.ts +50 -236
  59. package/.nuxt/b24ui/toast.ts +38 -30
  60. package/.nuxt/b24ui/toaster.ts +1 -1
  61. package/.nuxt/b24ui/tooltip.ts +5 -5
  62. package/cli/templates.mjs +2 -1
  63. package/dist/meta.d.mts +18759 -5002
  64. package/dist/meta.mjs +18759 -5002
  65. package/dist/module.d.mts +1 -0
  66. package/dist/module.json +2 -2
  67. package/dist/module.mjs +3 -5
  68. package/dist/runtime/air-design-tokens/001_b24_global.css +1 -0
  69. package/dist/runtime/air-design-tokens/002_b24_context_utility.css +0 -0
  70. package/dist/runtime/air-design-tokens/003_b24_context_light.css +1 -0
  71. package/dist/runtime/air-design-tokens/004_b24_context_dark.css +1 -0
  72. package/dist/runtime/air-design-tokens/005_b24_context_edge-light.css +1 -0
  73. package/dist/runtime/air-design-tokens/006_b24_context_edge-dark.css +1 -0
  74. package/dist/runtime/air-design-tokens/007_b24_global.css +1 -0
  75. package/dist/runtime/air-design-tokens/008_ui_global.css +1 -0
  76. package/dist/runtime/air-design-tokens/009_b24_tools.css +1 -0
  77. package/dist/runtime/air-design-tokens/components/badge-counter.css +1 -0
  78. package/dist/runtime/air-design-tokens/components/button.css +1 -0
  79. package/dist/runtime/air-design-tokens/components/navigation-menu.css +1 -0
  80. package/dist/runtime/air-design-tokens/components/popup.css +1 -0
  81. package/dist/runtime/air-design-tokens/components/scrollbar.css +2 -0
  82. package/dist/runtime/air-design-tokens/index.css +1 -0
  83. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  84. package/dist/runtime/components/Advice.vue +1 -13
  85. package/dist/runtime/components/Advice.vue.d.ts +1 -1
  86. package/dist/runtime/components/Alert.vue +6 -4
  87. package/dist/runtime/components/Alert.vue.d.ts +11 -4
  88. package/dist/runtime/components/App.vue.d.ts +1 -1
  89. package/dist/runtime/components/Avatar.vue.d.ts +1 -1
  90. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  91. package/dist/runtime/components/Badge.vue +7 -11
  92. package/dist/runtime/components/Badge.vue.d.ts +6 -8
  93. package/dist/runtime/components/Button.vue +18 -15
  94. package/dist/runtime/components/Button.vue.d.ts +5 -7
  95. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  96. package/dist/runtime/components/Calendar.vue +8 -8
  97. package/dist/runtime/components/Calendar.vue.d.ts +14 -8
  98. package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
  99. package/dist/runtime/components/Chip.vue +28 -7
  100. package/dist/runtime/components/Chip.vue.d.ts +22 -2
  101. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  102. package/dist/runtime/components/Container.vue.d.ts +1 -1
  103. package/dist/runtime/components/Countdown.vue.d.ts +5 -3
  104. package/dist/runtime/components/DescriptionList.vue.d.ts +1 -1
  105. package/dist/runtime/components/DropdownMenu.vue +20 -9
  106. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -5
  107. package/dist/runtime/components/DropdownMenuContent.vue +29 -7
  108. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +14 -6
  109. package/dist/runtime/components/Form.vue +3 -3
  110. package/dist/runtime/components/Form.vue.d.ts +6 -5
  111. package/dist/runtime/components/FormField.vue +2 -2
  112. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  113. package/dist/runtime/components/Input.vue +8 -4
  114. package/dist/runtime/components/Input.vue.d.ts +9 -8
  115. package/dist/runtime/components/InputMenu.vue +44 -18
  116. package/dist/runtime/components/InputMenu.vue.d.ts +17 -223
  117. package/dist/runtime/components/InputNumber.vue +14 -11
  118. package/dist/runtime/components/InputNumber.vue.d.ts +13 -87
  119. package/dist/runtime/components/Kbd.vue +6 -3
  120. package/dist/runtime/components/Kbd.vue.d.ts +7 -3
  121. package/dist/runtime/components/Link.vue +6 -5
  122. package/dist/runtime/components/Link.vue.d.ts +1 -3
  123. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  124. package/dist/runtime/components/Modal.vue +37 -33
  125. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  126. package/dist/runtime/components/ModalDialogClose.vue.d.ts +1 -1
  127. package/dist/runtime/components/Navbar.vue.d.ts +1 -1
  128. package/dist/runtime/components/NavbarDivider.vue.d.ts +1 -1
  129. package/dist/runtime/components/NavbarSection.vue.d.ts +1 -1
  130. package/dist/runtime/components/NavbarSpacer.vue.d.ts +1 -1
  131. package/dist/runtime/components/NavigationMenu.vue +95 -84
  132. package/dist/runtime/components/NavigationMenu.vue.d.ts +31 -33
  133. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  134. package/dist/runtime/components/Popover.vue +8 -2
  135. package/dist/runtime/components/Popover.vue.d.ts +9 -3
  136. package/dist/runtime/components/Progress.vue.d.ts +3 -3
  137. package/dist/runtime/components/RadioGroup.vue +1 -1
  138. package/dist/runtime/components/RadioGroup.vue.d.ts +6 -5
  139. package/dist/runtime/components/Range.vue.d.ts +6 -6
  140. package/dist/runtime/components/Select.vue +25 -11
  141. package/dist/runtime/components/Select.vue.d.ts +7 -7
  142. package/dist/runtime/components/SelectMenu.vue +38 -19
  143. package/dist/runtime/components/SelectMenu.vue.d.ts +11 -10
  144. package/dist/runtime/components/Separator.vue +4 -4
  145. package/dist/runtime/components/Separator.vue.d.ts +6 -3
  146. package/dist/runtime/components/Sidebar.vue.d.ts +4 -1
  147. package/dist/runtime/components/SidebarBody.vue.d.ts +4 -1
  148. package/dist/runtime/components/SidebarFooter.vue.d.ts +4 -1
  149. package/dist/runtime/components/SidebarHeader.vue.d.ts +4 -1
  150. package/dist/runtime/components/SidebarHeading.vue.d.ts +4 -1
  151. package/dist/runtime/components/SidebarLayout.vue +148 -63
  152. package/dist/runtime/components/SidebarLayout.vue.d.ts +61 -8
  153. package/dist/runtime/components/SidebarSection.vue.d.ts +4 -1
  154. package/dist/runtime/components/SidebarSpacer.vue.d.ts +4 -1
  155. package/dist/runtime/components/Skeleton.vue +7 -3
  156. package/dist/runtime/components/Skeleton.vue.d.ts +12 -1
  157. package/dist/runtime/components/Slideover.vue +120 -43
  158. package/dist/runtime/components/Slideover.vue.d.ts +22 -9
  159. package/dist/runtime/components/Switch.vue.d.ts +2 -2
  160. package/dist/runtime/components/Tabs.vue +11 -3
  161. package/dist/runtime/components/Tabs.vue.d.ts +8 -7
  162. package/dist/runtime/components/Textarea.vue +8 -4
  163. package/dist/runtime/components/Textarea.vue.d.ts +8 -7
  164. package/dist/runtime/components/Toast.vue +16 -8
  165. package/dist/runtime/components/Toast.vue.d.ts +16 -15
  166. package/dist/runtime/components/Toaster.vue.d.ts +2 -2
  167. package/dist/runtime/components/Tooltip.vue +9 -5
  168. package/dist/runtime/components/Tooltip.vue.d.ts +7 -1
  169. package/dist/runtime/components/content/TableWrapper.vue.d.ts +1 -1
  170. package/dist/runtime/composables/defineShortcuts.js +5 -3
  171. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  172. package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
  173. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  174. package/dist/runtime/composables/useFormField.d.ts +4 -7
  175. package/dist/runtime/composables/useFormField.js +6 -3
  176. package/dist/runtime/composables/useKbd.d.ts +1 -1
  177. package/dist/runtime/composables/useLocale.js +2 -2
  178. package/dist/runtime/composables/useOverlay.d.ts +29 -2
  179. package/dist/runtime/composables/useOverlay.js +8 -7
  180. package/dist/runtime/composables/usePortal.d.ts +1 -1
  181. package/dist/runtime/composables/useSidebarLayout.d.ts +20 -0
  182. package/dist/runtime/composables/useSidebarLayout.js +16 -0
  183. package/dist/runtime/dictionary/icons.js +7 -7
  184. package/dist/runtime/index.css +1 -1
  185. package/dist/runtime/inertia/components/Link.vue +3 -0
  186. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  187. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  188. package/dist/runtime/inertia/stubs.d.ts +1 -0
  189. package/dist/runtime/inertia/stubs.js +4 -2
  190. package/dist/runtime/locale/ar.js +6 -0
  191. package/dist/runtime/locale/br.js +6 -0
  192. package/dist/runtime/locale/de.js +6 -0
  193. package/dist/runtime/locale/en.js +6 -0
  194. package/dist/runtime/locale/fr.js +6 -0
  195. package/dist/runtime/locale/id.js +6 -0
  196. package/dist/runtime/locale/it.js +6 -0
  197. package/dist/runtime/locale/ja.js +6 -0
  198. package/dist/runtime/locale/kz.js +6 -0
  199. package/dist/runtime/locale/la.js +6 -0
  200. package/dist/runtime/locale/ms.js +6 -0
  201. package/dist/runtime/locale/pl.js +6 -0
  202. package/dist/runtime/locale/ru.js +6 -0
  203. package/dist/runtime/locale/sc.js +6 -0
  204. package/dist/runtime/locale/tc.js +6 -0
  205. package/dist/runtime/locale/th.js +6 -0
  206. package/dist/runtime/locale/tr.js +6 -0
  207. package/dist/runtime/locale/ua.js +6 -0
  208. package/dist/runtime/locale/vn.js +6 -0
  209. package/dist/runtime/plugins/ui-version.d.ts +5 -0
  210. package/dist/runtime/plugins/ui-version.js +8 -0
  211. package/dist/runtime/prose/A.vue.d.ts +4 -1
  212. package/dist/runtime/prose/Blockquote.vue.d.ts +4 -1
  213. package/dist/runtime/prose/Code.vue.d.ts +4 -1
  214. package/dist/runtime/prose/Em.vue.d.ts +4 -1
  215. package/dist/runtime/prose/H1.vue +4 -1
  216. package/dist/runtime/prose/H1.vue.d.ts +7 -1
  217. package/dist/runtime/prose/H2.vue +4 -1
  218. package/dist/runtime/prose/H2.vue.d.ts +7 -1
  219. package/dist/runtime/prose/H3.vue +4 -1
  220. package/dist/runtime/prose/H3.vue.d.ts +7 -1
  221. package/dist/runtime/prose/H4.vue +4 -1
  222. package/dist/runtime/prose/H4.vue.d.ts +7 -1
  223. package/dist/runtime/prose/H5.vue +4 -1
  224. package/dist/runtime/prose/H5.vue.d.ts +7 -1
  225. package/dist/runtime/prose/H6.vue +4 -1
  226. package/dist/runtime/prose/H6.vue.d.ts +7 -1
  227. package/dist/runtime/prose/Hr.vue.d.ts +1 -1
  228. package/dist/runtime/prose/Img.vue.d.ts +1 -1
  229. package/dist/runtime/prose/Li.vue.d.ts +4 -1
  230. package/dist/runtime/prose/Ol.vue.d.ts +4 -1
  231. package/dist/runtime/prose/P.vue +6 -1
  232. package/dist/runtime/prose/P.vue.d.ts +12 -1
  233. package/dist/runtime/prose/Pre.vue.d.ts +4 -1
  234. package/dist/runtime/prose/Strong.vue.d.ts +4 -1
  235. package/dist/runtime/prose/Table.vue.d.ts +5 -2
  236. package/dist/runtime/prose/Tbody.vue.d.ts +4 -1
  237. package/dist/runtime/prose/Td.vue.d.ts +4 -1
  238. package/dist/runtime/prose/Th.vue.d.ts +4 -1
  239. package/dist/runtime/prose/Thead.vue.d.ts +4 -1
  240. package/dist/runtime/prose/Tr.vue.d.ts +4 -1
  241. package/dist/runtime/prose/Ul.vue.d.ts +4 -1
  242. package/dist/runtime/types/index.d.ts +1 -2
  243. package/dist/runtime/types/index.js +1 -2
  244. package/dist/runtime/types/locale.d.ts +6 -0
  245. package/dist/runtime/utils/index.d.ts +6 -0
  246. package/dist/runtime/utils/index.js +27 -0
  247. package/dist/runtime/utils/tv.js +66 -1
  248. package/dist/runtime/vue/components/Link.vue +3 -0
  249. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  250. package/dist/runtime/vue/stubs.d.ts +1 -0
  251. package/dist/runtime/vue/stubs.js +3 -1
  252. package/dist/shared/b24ui-nuxt.dLc5H7ID.mjs +6100 -0
  253. package/dist/unplugin.mjs +1 -1
  254. package/dist/vite.mjs +1 -1
  255. package/package.json +40 -28
  256. package/.nuxt/b24ui/stacked-layout.ts +0 -34
  257. package/dist/runtime/air-design-tokens.css +0 -1
  258. package/dist/runtime/components/StackedLayout.vue +0 -117
  259. package/dist/runtime/components/StackedLayout.vue.d.ts +0 -44
  260. package/dist/shared/b24ui-nuxt.CxsFEY3M.mjs +0 -7895
@@ -74,5 +74,5 @@ declare const _default: <T extends AccordionItem>(__VLS_props: NonNullable<Await
74
74
  };
75
75
  export default _default;
76
76
  type __VLS_PrettifyLocal<T> = {
77
- [K in keyof T]: T[K];
77
+ [K in keyof T as K]: T[K];
78
78
  } & {};
@@ -9,7 +9,6 @@ import { useAppConfig } from "#imports";
9
9
  import { useComponentIcons } from "../composables/useComponentIcons";
10
10
  import { tv } from "../utils/tv";
11
11
  import B24Avatar from "./Avatar.vue";
12
- import PersonIcon from "@bitrix24/b24icons-vue/main/PersonIcon";
13
12
  defineOptions({ inheritAttrs: false });
14
13
  const props = defineProps({
15
14
  as: { type: null, required: false, default: "div" },
@@ -44,21 +43,10 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.advice
44
43
  :size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
45
44
  v-bind="avatar"
46
45
  :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
46
+ :b24ui="{ icon: props.b24ui?.leadingAvatarIcon || b24ui.leadingAvatarIcon() }"
47
47
  />
48
48
  </slot>
49
49
  </div>
50
- <div
51
- v-else
52
- :class="b24ui.leading({ class: props.b24ui?.leading })"
53
- >
54
- <B24Avatar
55
- :size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
56
- :icon="PersonIcon"
57
- alt="Person"
58
- :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
59
- :b24ui="{ icon: 'text-white bg-base-800 dark:text-200' }"
60
- />
61
- </div>
62
50
  <div :class="b24ui.descriptionWrapper({ class: props.b24ui?.descriptionWrapper })">
63
51
  <div :class="b24ui.descriptionAngle({ class: props.b24ui?.descriptionAngle })">
64
52
  <svg
@@ -21,7 +21,7 @@ export interface AdviceSlots {
21
21
  leading(props?: {}): any;
22
22
  default(props?: {}): any;
23
23
  }
24
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AdviceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AdviceProps> & Readonly<{}>, {
24
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AdviceProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AdviceProps> & Readonly<{}>, {
25
25
  as: any;
26
26
  angle: Advice["variants"]["angle"];
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AdviceSlots>;
@@ -18,6 +18,7 @@ const props = defineProps({
18
18
  icon: { type: [Function, Object], required: false },
19
19
  avatar: { type: Object, required: false },
20
20
  color: { type: null, required: false },
21
+ inverted: { type: Boolean, required: false, default: false },
21
22
  orientation: { type: null, required: false, default: "vertical" },
22
23
  size: { type: null, required: false },
23
24
  actions: { type: Array, required: false },
@@ -32,6 +33,7 @@ const { t } = useLocale();
32
33
  const appConfig = useAppConfig();
33
34
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert || {} })({
34
35
  color: props.color,
36
+ inverted: Boolean(props.inverted),
35
37
  size: props.size,
36
38
  orientation: props.orientation,
37
39
  title: !!props.title || !!slots.title
@@ -63,7 +65,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
63
65
 
64
66
  <div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="b24ui.actions({ class: props.b24ui?.actions })">
65
67
  <slot name="actions">
66
- <B24Button v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
68
+ <B24Button v-for="(action, index) in actions" :key="index" size="sm" v-bind="action" />
67
69
  </slot>
68
70
  </div>
69
71
  </div>
@@ -71,7 +73,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
71
73
  <div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="b24ui.actions({ class: props.b24ui?.actions, orientation: 'horizontal' })">
72
74
  <template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
73
75
  <slot name="actions">
74
- <B24Button v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
76
+ <B24Button v-for="(action, index) in actions" :key="index" size="sm" v-bind="action" />
75
77
  </slot>
76
78
  </template>
77
79
 
@@ -79,8 +81,8 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
79
81
  <B24Button
80
82
  v-if="close"
81
83
  :icon="closeIcon || icons.close"
82
- size="xs"
83
- color="link"
84
+ size="sm"
85
+ color="air-tertiary"
84
86
  :aria-label="t('alert.close')"
85
87
  v-bind="typeof close === 'object' ? close : {}"
86
88
  :class="b24ui.close({ class: props.b24ui?.close })"
@@ -21,6 +21,12 @@ export interface AlertProps {
21
21
  * @defaultValue 'default'
22
22
  */
23
23
  color?: Alert['variants']['color'];
24
+ /**
25
+ * If set to `true` the color is inverted.
26
+ * Used for 'air-primary', 'air-primary-success', 'air-primary-alert', 'air-primary-copilot' and 'air-primary-warning' colors.
27
+ * @defaultValue false
28
+ */
29
+ inverted?: boolean;
24
30
  /**
25
31
  * The orientation between the content and the actions.
26
32
  * @defaultValue 'vertical'
@@ -34,12 +40,12 @@ export interface AlertProps {
34
40
  * Display a list of actions:
35
41
  * - under the title and description when orientation is `vertical`
36
42
  * - next to the close button when orientation is `horizontal`
37
- * `{ size: 'xs' }`{lang="ts"}
43
+ * `{ size: 'sm' }`{lang="ts"}
38
44
  */
39
45
  actions?: ButtonProps[];
40
46
  /**
41
47
  * Display a close button to dismiss the alert.
42
- * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts"}
48
+ * `{ size: 'sm', color: 'air-tertiary-no-accent' }`{lang="ts"}
43
49
  * @emits 'update:open'
44
50
  * @defaultValue false
45
51
  */
@@ -54,7 +60,7 @@ export interface AlertProps {
54
60
  b24ui?: Alert['slots'];
55
61
  }
56
62
  export interface AlertEmits {
57
- (e: 'update:open', value: boolean): void;
63
+ 'update:open': [value: boolean];
58
64
  }
59
65
  export interface AlertSlots {
60
66
  leading(props?: {}): any;
@@ -67,11 +73,12 @@ export interface AlertSlots {
67
73
  };
68
74
  }): any;
69
75
  }
70
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
76
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
71
77
  "update:open": (value: boolean) => any;
72
78
  }, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
73
79
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
74
80
  }>, {
81
+ inverted: boolean;
75
82
  orientation: Alert["variants"]["orientation"];
76
83
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AlertSlots>;
77
84
  export default _default;
@@ -20,5 +20,5 @@ declare const _default: <T extends Messages>(__VLS_props: NonNullable<Awaited<ty
20
20
  };
21
21
  export default _default;
22
22
  type __VLS_PrettifyLocal<T> = {
23
- [K in keyof T]: T[K];
23
+ [K in keyof T as K]: T[K];
24
24
  } & {};
@@ -29,7 +29,7 @@ export interface AvatarProps {
29
29
  export interface AvatarSlots {
30
30
  default(props?: {}): any;
31
31
  }
32
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
32
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
33
33
  as: any;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
35
35
  default?: (props: {}) => any;
@@ -22,7 +22,7 @@ export interface AvatarGroupProps {
22
22
  export interface AvatarGroupSlots {
23
23
  default(props?: {}): any;
24
24
  }
25
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
25
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
26
26
  export default _default;
27
27
  type __VLS_WithSlots<T, S> = T & {
28
28
  new (): {
@@ -15,13 +15,12 @@ const props = defineProps({
15
15
  as: { type: null, required: false, default: "span" },
16
16
  label: { type: [String, Number], required: false },
17
17
  color: { type: null, required: false },
18
- depth: { type: null, required: false },
18
+ inverted: { type: Boolean, required: false, default: false },
19
19
  size: { type: null, required: false },
20
20
  square: { type: Boolean, required: false },
21
21
  useLink: { type: Boolean, required: false },
22
22
  useClose: { type: Boolean, required: false },
23
23
  onCloseClick: { type: [Function, Array], required: false },
24
- useFill: { type: Boolean, required: false },
25
24
  class: { type: null, required: false },
26
25
  b24ui: { type: null, required: false },
27
26
  icon: { type: [Function, Object], required: false },
@@ -42,13 +41,12 @@ const { orientation, size: buttonGroupSize } = useButtonGroup(props);
42
41
  const { isLeading, leadingIconName } = useComponentIcons(props);
43
42
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge || {} })({
44
43
  color: props.color,
45
- depth: props.depth,
44
+ inverted: Boolean(props.inverted),
46
45
  size: buttonGroupSize.value || props.size,
47
46
  square: props.square || !slots.default && !props.label,
48
47
  buttonGroup: orientation.value,
49
48
  useLink: Boolean(props.useLink),
50
49
  useClose: Boolean(props.useClose),
51
- useFill: Boolean(props.useFill),
52
50
  leading: Boolean(isLeading.value)
53
51
  }));
54
52
  </script>
@@ -76,13 +74,11 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge |
76
74
  />
77
75
  </slot>
78
76
 
79
- <span :class="b24ui.label({ class: props.b24ui?.label })">
80
- <slot>
81
- <span v-if="label !== void 0 && label !== null">
82
- {{ label }}
83
- </span>
84
- </slot>
85
- </span>
77
+ <slot>
78
+ <span v-if="label !== void 0 && label !== null" :class="b24ui.label({ class: props.b24ui?.label })">
79
+ {{ label }}
80
+ </span>
81
+ </slot>
86
82
  </Primitive>
87
83
  <slot name="trailing">
88
84
  <Cross20Icon
@@ -15,9 +15,11 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
15
15
  */
16
16
  color?: Badge['variants']['color'];
17
17
  /**
18
- * @defaultValue 'normal'
18
+ * If set to `true` the color is inverted.
19
+ * Used for 'air-primary', 'air-primary-success', 'air-primary-alert', 'air-primary-copilot' and 'air-primary-warning' colors.
20
+ * @defaultValue false
19
21
  */
20
- depth?: Badge['variants']['depth'];
22
+ inverted?: boolean;
21
23
  /**
22
24
  * @defaultValue 'md'
23
25
  */
@@ -35,11 +37,6 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
35
37
  */
36
38
  useClose?: boolean;
37
39
  onCloseClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>;
38
- /**
39
- * Fills the background
40
- * @defaultValue false
41
- */
42
- useFill?: boolean;
43
40
  class?: any;
44
41
  b24ui?: Badge['slots'];
45
42
  }
@@ -48,7 +45,8 @@ export interface BadgeSlots {
48
45
  default(props?: {}): any;
49
46
  trailing(props?: {}): any;
50
47
  }
51
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
48
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
49
+ inverted: boolean;
52
50
  as: any;
53
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
54
52
  export default _default;
@@ -10,13 +10,13 @@ import { useAppConfig } from "#imports";
10
10
  import { useComponentIcons } from "../composables/useComponentIcons";
11
11
  import { useButtonGroup } from "../composables/useButtonGroup";
12
12
  import { formLoadingInjectionKey } from "../composables/useFormField";
13
- import { omit } from "../utils";
13
+ import { omit, mergeClasses } from "../utils";
14
14
  import { tv } from "../utils/tv";
15
15
  import { pickLinkProps } from "../utils/link";
16
16
  import B24Avatar from "./Avatar.vue";
17
17
  import B24Link from "./Link.vue";
18
18
  import B24LinkBase from "./LinkBase.vue";
19
- import ChevronDownIcon from "@bitrix24/b24icons-vue/actions/ChevronDownIcon";
19
+ import ChevronDownSIcon from "@bitrix24/b24icons-vue/outline/ChevronDownSIcon";
20
20
  import LoaderWaitIcon from "@bitrix24/b24icons-vue/animated/LoaderWaitIcon";
21
21
  import LoaderClockIcon from "@bitrix24/b24icons-vue/animated/LoaderClockIcon";
22
22
  import SpinnerIcon from "@bitrix24/b24icons-vue/specialized/SpinnerIcon";
@@ -30,14 +30,14 @@ const props = defineProps({
30
30
  rounded: { type: Boolean, required: false },
31
31
  block: { type: Boolean, required: false },
32
32
  loadingAuto: { type: Boolean, required: false },
33
- normalCase: { type: Boolean, required: false },
33
+ normalCase: { type: Boolean, required: false, default: true },
34
34
  useWait: { type: Boolean, required: false },
35
35
  useClock: { type: Boolean, required: false },
36
36
  useDropdown: { type: Boolean, required: false },
37
37
  onClick: { type: [Function, Array], required: false },
38
38
  class: { type: null, required: false },
39
- activeClass: { type: String, required: false, default: "" },
40
- inactiveClass: { type: String, required: false, default: "" },
39
+ activeClass: { type: String, required: false },
40
+ inactiveClass: { type: String, required: false },
41
41
  b24ui: { type: null, required: false },
42
42
  icon: { type: [Function, Object], required: false },
43
43
  avatar: { type: Object, required: false },
@@ -45,7 +45,7 @@ const props = defineProps({
45
45
  as: { type: null, required: false },
46
46
  type: { type: null, required: false, default: "button" },
47
47
  disabled: { type: Boolean, required: false },
48
- active: { type: Boolean, required: false, default: void 0 },
48
+ active: { type: Boolean, required: false },
49
49
  exact: { type: Boolean, required: false },
50
50
  exactQuery: { type: [Boolean, String], required: false },
51
51
  exactHash: { type: Boolean, required: false },
@@ -102,10 +102,10 @@ const b24ui = computed(() => tv({
102
102
  variants: {
103
103
  active: {
104
104
  true: {
105
- base: props.activeClass
105
+ base: mergeClasses(appConfig.b24ui?.button?.variants?.active?.true?.base, props.activeClass)
106
106
  },
107
107
  false: {
108
- base: props.inactiveClass
108
+ base: mergeClasses(appConfig.b24ui?.button?.variants?.active?.false?.base, props.inactiveClass)
109
109
  }
110
110
  }
111
111
  }
@@ -124,7 +124,8 @@ const b24ui = computed(() => tv({
124
124
  useWait: Boolean(props.useWait),
125
125
  useClock: Boolean(props.useClock),
126
126
  leading: Boolean(isLeading.value),
127
- buttonGroup: orientation.value
127
+ buttonGroup: orientation.value,
128
+ isAir: true
128
129
  }));
129
130
  </script>
130
131
 
@@ -148,11 +149,11 @@ const b24ui = computed(() => tv({
148
149
  >
149
150
  <div
150
151
  v-if="isLoading"
151
- class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
152
+ :class="b24ui.baseLoading({ class: props.b24ui?.baseLoading, active })"
152
153
  >
153
- <LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
154
- <LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
155
- <SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
154
+ <LoaderWaitIcon v-if="useWait" :class="b24ui.baseLoadingWaitIcon({ class: props.b24ui?.baseLoadingWaitIcon })" aria-hidden="true" />
155
+ <LoaderClockIcon v-else-if="useClock" :class="b24ui.baseLoadingClockIcon({ class: props.b24ui?.baseLoadingClockIcon })" aria-hidden="true" />
156
+ <SpinnerIcon v-else :class="b24ui.baseLoadingSpinnerIcon({ class: props.b24ui?.baseLoadingSpinnerIcon })" aria-hidden="true" />
156
157
  </div>
157
158
  <div
158
159
  :class="[
@@ -176,12 +177,14 @@ const b24ui = computed(() => tv({
176
177
 
177
178
  <slot>
178
179
  <span v-if="label !== void 0 && label !== null" :class="b24ui.label({ class: props.b24ui?.label, active })">
179
- {{ label }}
180
+ <span :class="b24ui.labelInner({ class: props.b24ui?.labelInner, active })">
181
+ {{ label }}
182
+ </span>
180
183
  </span>
181
184
  </slot>
182
185
 
183
186
  <slot name="trailing">
184
- <ChevronDownIcon
187
+ <ChevronDownSIcon
185
188
  v-if="useDropdown"
186
189
  :class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
187
190
  aria-hidden="true"
@@ -7,7 +7,7 @@ type Button = ComponentConfig<typeof theme, AppConfig, 'button'>;
7
7
  export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | 'trailingIcon'>, Omit<LinkProps, 'raw' | 'custom'> {
8
8
  label?: string;
9
9
  /**
10
- * @defaultValue 'default'
10
+ * @defaultValue 'air-secondary-no-accent'
11
11
  */
12
12
  color?: Button['variants']['color'];
13
13
  activeColor?: Button['variants']['color'];
@@ -37,7 +37,7 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
37
37
  loadingAuto?: boolean;
38
38
  /**
39
39
  * Disable uppercase label
40
- * @defaultValue false
40
+ * @defaultValue true
41
41
  */
42
42
  normalCase?: boolean;
43
43
  /**
@@ -51,7 +51,7 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
51
51
  */
52
52
  useClock?: boolean;
53
53
  /**
54
- * Shows icons.chevronDown on the right side
54
+ * Shows icons.ChevronDownSIcon on the right side
55
55
  * @defaultValue false
56
56
  */
57
57
  useDropdown?: boolean;
@@ -74,11 +74,9 @@ export interface ButtonSlots {
74
74
  default(props?: {}): any;
75
75
  trailing(props?: {}): any;
76
76
  }
77
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
77
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
78
78
  type: "reset" | "submit" | "button";
79
- activeClass: string;
80
- active: boolean;
81
- inactiveClass: string;
79
+ normalCase: boolean;
82
80
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
83
81
  export default _default;
84
82
  type __VLS_WithSlots<T, S> = T & {
@@ -28,7 +28,7 @@ export interface ButtonGroupProps {
28
28
  export interface ButtonGroupSlots {
29
29
  default(props?: {}): any;
30
30
  }
31
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
31
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
32
32
  orientation: ButtonGroup["variants"]["orientation"];
33
33
  noSplit: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
@@ -27,7 +27,7 @@ const props = defineProps({
27
27
  range: { type: Boolean, required: false },
28
28
  multiple: { type: Boolean, required: false },
29
29
  monthControls: { type: Boolean, required: false, default: true },
30
- yearControls: { type: Boolean, required: false, default: true },
30
+ yearControls: { type: Boolean, required: false, default: false },
31
31
  defaultValue: { type: null, required: false },
32
32
  modelValue: { type: null, required: false },
33
33
  class: { type: null, required: false },
@@ -77,10 +77,10 @@ function paginateYear(date, sign) {
77
77
  const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
78
78
  const btnSize = computed(() => {
79
79
  switch (props.size) {
80
- case "lg":
81
- return "sm";
82
- default:
80
+ case "xs":
83
81
  return "xs";
82
+ default:
83
+ return "sm";
84
84
  }
85
85
  });
86
86
  </script>
@@ -97,10 +97,10 @@ const btnSize = computed(() => {
97
97
  >
98
98
  <Calendar.Header :class="b24ui.header({ class: props.b24ui?.header })">
99
99
  <Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
100
- <B24Button :icon="prevYearIcon" :size="btnSize" color="link" v-bind="props.prevYear" />
100
+ <B24Button :icon="prevYearIcon" :size="btnSize" color="air-tertiary" v-bind="props.prevYear" />
101
101
  </Calendar.Prev>
102
102
  <Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
103
- <B24Button :icon="prevMonthIcon" :size="btnSize" color="link" v-bind="props.prevMonth" />
103
+ <B24Button :icon="prevMonthIcon" :size="btnSize" color="air-tertiary" v-bind="props.prevMonth" />
104
104
  </Calendar.Prev>
105
105
  <Calendar.Heading v-slot="{ headingValue }" :class="b24ui.heading({ class: props.b24ui?.heading })">
106
106
  <slot name="heading" :value="headingValue">
@@ -108,10 +108,10 @@ const btnSize = computed(() => {
108
108
  </slot>
109
109
  </Calendar.Heading>
110
110
  <Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
111
- <B24Button :icon="nextMonthIcon" :size="btnSize" color="link" v-bind="props.nextMonth" />
111
+ <B24Button :icon="nextMonthIcon" :size="btnSize" color="air-tertiary" v-bind="props.nextMonth" />
112
112
  </Calendar.Next>
113
113
  <Calendar.Next v-if="props.yearControls" :next-page="(date) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
114
- <B24Button :icon="nextYearIcon" :size="btnSize" color="link" v-bind="props.nextYear" />
114
+ <B24Button :icon="nextYearIcon" :size="btnSize" color="air-tertiary" v-bind="props.nextYear" />
115
115
  </Calendar.Next>
116
116
  </Calendar.Header>
117
117
  <div :class="b24ui.body({ class: props.b24ui?.body })">
@@ -23,7 +23,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
23
23
  nextYearIcon?: IconComponent;
24
24
  /**
25
25
  * Configure the next year button.
26
- * `{ color: 'link' }`{lang="ts"}
26
+ * `{ color: 'air-tertiary' }`{lang="ts"}
27
27
  */
28
28
  nextYear?: ButtonProps;
29
29
  /**
@@ -34,7 +34,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
34
34
  nextMonthIcon?: IconComponent;
35
35
  /**
36
36
  * Configure the next month button.
37
- * `{ color: 'link' }`{lang="ts"}
37
+ * `{ color: 'air-tertiary' }`{lang="ts"}
38
38
  */
39
39
  nextMonth?: ButtonProps;
40
40
  /**
@@ -45,7 +45,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
45
45
  prevYearIcon?: IconComponent;
46
46
  /**
47
47
  * Configure the prev year button.
48
- * `{ color: 'link' }`{lang="ts"}
48
+ * `{ color: 'air-tertiary' }`{lang="ts"}
49
49
  */
50
50
  prevYear?: ButtonProps;
51
51
  /**
@@ -56,11 +56,11 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
56
56
  prevMonthIcon?: IconComponent;
57
57
  /**
58
58
  * Configure the prev month button.
59
- * `{ color: 'link' }`{lang="ts"}
59
+ * `{ color: 'air-tertiary' }`{lang="ts"}
60
60
  */
61
61
  prevMonth?: ButtonProps;
62
62
  /**
63
- * @defaultValue 'primary'
63
+ * @defaultValue 'air-primary'
64
64
  */
65
65
  color?: Calendar['variants']['color'];
66
66
  /**
@@ -71,9 +71,15 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
71
71
  range?: R & boolean;
72
72
  /** Whether multiple dates can be selected */
73
73
  multiple?: M & boolean;
74
- /** Show month controls */
74
+ /**
75
+ * Show month controls
76
+ * @defaultValue 'true'
77
+ */
75
78
  monthControls?: boolean;
76
- /** Show year controls */
79
+ /**
80
+ * Show year controls
81
+ * @defaultValue 'false'
82
+ */
77
83
  yearControls?: boolean;
78
84
  defaultValue?: CalendarDefaultValue<R, M>;
79
85
  modelValue?: CalendarModelValue<R, M>;
@@ -107,5 +113,5 @@ declare const _default: <R extends boolean, M extends boolean>(__VLS_props: NonN
107
113
  };
108
114
  export default _default;
109
115
  type __VLS_PrettifyLocal<T> = {
110
- [K in keyof T]: T[K];
116
+ [K in keyof T as K]: T[K];
111
117
  } & {};
@@ -12,7 +12,7 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
12
12
  label?: string;
13
13
  description?: string;
14
14
  /**
15
- * @defaultValue 'primary'
15
+ * @defaultValue 'air-primary'
16
16
  */
17
17
  color?: Checkbox['variants']['color'];
18
18
  /**
@@ -44,7 +44,7 @@ export interface CheckboxSlots {
44
44
  }
45
45
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CheckboxProps & {
46
46
  modelValue?: boolean | "indeterminate";
47
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
47
+ }, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
48
  change: (payload: Event) => any;
49
49
  "update:modelValue": (value: boolean | "indeterminate") => any;
50
50
  }, string, import("vue").PublicProps, Readonly<CheckboxProps & {
@@ -6,42 +6,63 @@ import theme from "#build/b24ui/chip";
6
6
  import { computed } from "vue";
7
7
  import { Primitive, Slot } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
- import { useAvatarGroup } from "../composables/useAvatarGroup";
10
9
  import { tv } from "../utils/tv";
11
10
  defineOptions({ inheritAttrs: false });
12
11
  const props = defineProps({
13
12
  as: { type: null, required: false },
14
13
  text: { type: [String, Number], required: false },
14
+ trailingIcon: { type: [Function, Object], required: false },
15
15
  color: { type: null, required: false },
16
+ inverted: { type: Boolean, required: false, default: false },
16
17
  size: { type: null, required: false },
17
18
  position: { type: null, required: false },
18
19
  inset: { type: Boolean, required: false, default: false },
19
20
  standalone: { type: Boolean, required: false, default: false },
21
+ hideZero: { type: Boolean, required: false, default: false },
20
22
  class: { type: null, required: false },
21
23
  b24ui: { type: null, required: false }
22
24
  });
23
25
  defineSlots();
24
26
  const show = defineModel("show", { type: Boolean, ...{ default: true } });
25
- const { size } = useAvatarGroup(props);
26
27
  const appConfig = useAppConfig();
27
28
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.chip || {} })({
28
29
  color: props.color,
29
- size: size.value,
30
+ inverted: Boolean(props.inverted),
31
+ size: props.size,
32
+ // size.value
30
33
  position: props.position,
31
34
  inset: Boolean(props.inset),
32
- standalone: Boolean(props.standalone)
35
+ standalone: Boolean(props.standalone),
36
+ hideZero: Boolean(props.hideZero),
37
+ oneDigit: !props.trailingIcon && props.text?.toString().length === 1
33
38
  }));
39
+ const value = computed(() => {
40
+ return props.text;
41
+ });
34
42
  </script>
35
43
 
36
44
  <template>
37
- <Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
45
+ <Primitive
46
+ :as="as"
47
+ :class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
48
+ >
38
49
  <Slot v-bind="$attrs">
39
50
  <slot />
40
51
  </Slot>
41
52
 
42
- <span v-if="show" :class="b24ui.base({ class: props.b24ui?.base })">
53
+ <span
54
+ v-if="show"
55
+ :class="b24ui.base({ class: props.b24ui?.base })"
56
+ :data-value="value"
57
+ >
43
58
  <slot name="content">
44
- {{ text }}
59
+ <span>{{ text }}</span>
60
+ </slot>
61
+ <slot name="trailing">
62
+ <Component
63
+ :is="trailingIcon"
64
+ :class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
65
+ />
45
66
  </slot>
46
67
  </span>
47
68
  </Primitive>