@bitrix24/b24ui-nuxt 0.6.7 → 0.7.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 (198) hide show
  1. package/.nuxt/b24ui/accordion.ts +20 -0
  2. package/.nuxt/b24ui/advice.ts +2 -10
  3. package/.nuxt/b24ui/alert.ts +2 -15
  4. package/.nuxt/b24ui/avatar-group.ts +2 -10
  5. package/.nuxt/b24ui/avatar.ts +3 -11
  6. package/.nuxt/b24ui/badge.ts +48 -13
  7. package/.nuxt/b24ui/button-group.ts +2 -22
  8. package/.nuxt/b24ui/button.ts +4 -17
  9. package/.nuxt/b24ui/calendar.ts +3 -11
  10. package/.nuxt/b24ui/checkbox.ts +75 -11
  11. package/.nuxt/b24ui/chip.ts +2 -10
  12. package/.nuxt/b24ui/collapsible.ts +2 -10
  13. package/.nuxt/b24ui/container.ts +2 -10
  14. package/.nuxt/b24ui/countdown.ts +2 -10
  15. package/.nuxt/b24ui/description-list.ts +2 -15
  16. package/.nuxt/b24ui/dropdown-menu.ts +4 -11
  17. package/.nuxt/b24ui/form-field.ts +3 -10
  18. package/.nuxt/b24ui/form.ts +2 -10
  19. package/.nuxt/b24ui/index.ts +1 -0
  20. package/.nuxt/b24ui/input-menu.ts +6 -30
  21. package/.nuxt/b24ui/input-number.ts +15 -10
  22. package/.nuxt/b24ui/input.ts +4 -17
  23. package/.nuxt/b24ui/kbd.ts +2 -10
  24. package/.nuxt/b24ui/link.ts +11 -17
  25. package/.nuxt/b24ui/modal.ts +3 -11
  26. package/.nuxt/b24ui/navbar-divider.ts +2 -10
  27. package/.nuxt/b24ui/navbar-section.ts +2 -10
  28. package/.nuxt/b24ui/navbar-spacer.ts +2 -10
  29. package/.nuxt/b24ui/navbar.ts +2 -10
  30. package/.nuxt/b24ui/navigation-menu.ts +69 -60
  31. package/.nuxt/b24ui/popover.ts +2 -10
  32. package/.nuxt/b24ui/progress.ts +2 -10
  33. package/.nuxt/b24ui/radio-group.ts +3 -11
  34. package/.nuxt/b24ui/range.ts +2 -10
  35. package/.nuxt/b24ui/select-menu.ts +10 -40
  36. package/.nuxt/b24ui/select.ts +10 -40
  37. package/.nuxt/b24ui/separator.ts +2 -10
  38. package/.nuxt/b24ui/sidebar-body.ts +2 -10
  39. package/.nuxt/b24ui/sidebar-footer.ts +2 -10
  40. package/.nuxt/b24ui/sidebar-header.ts +2 -10
  41. package/.nuxt/b24ui/sidebar-heading.ts +2 -10
  42. package/.nuxt/b24ui/sidebar-layout.ts +2 -10
  43. package/.nuxt/b24ui/sidebar-section.ts +2 -10
  44. package/.nuxt/b24ui/sidebar-spacer.ts +2 -10
  45. package/.nuxt/b24ui/sidebar.ts +2 -10
  46. package/.nuxt/b24ui/skeleton.ts +2 -10
  47. package/.nuxt/b24ui/slideover.ts +2 -10
  48. package/.nuxt/b24ui/stacked-layout.ts +2 -10
  49. package/.nuxt/b24ui/switch.ts +2 -10
  50. package/.nuxt/b24ui/tabs.ts +6 -13
  51. package/.nuxt/b24ui/textarea.ts +4 -17
  52. package/.nuxt/b24ui/toast.ts +2 -15
  53. package/.nuxt/b24ui/toaster.ts +3 -11
  54. package/.nuxt/b24ui/tooltip.ts +3 -11
  55. package/.nuxt/b24ui.css +1 -1
  56. package/cli/templates.mjs +2 -2
  57. package/dist/meta.d.mts +38368 -18666
  58. package/dist/meta.mjs +38368 -18666
  59. package/dist/module.json +1 -1
  60. package/dist/module.mjs +11 -3
  61. package/dist/runtime/components/Accordion.vue +96 -0
  62. package/dist/runtime/components/Accordion.vue.d.ts +78 -0
  63. package/dist/runtime/components/Advice.vue +1 -1
  64. package/dist/runtime/components/Alert.vue +1 -1
  65. package/dist/runtime/components/Avatar.vue +11 -3
  66. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  67. package/dist/runtime/components/AvatarGroup.vue +1 -1
  68. package/dist/runtime/components/Badge.vue +5 -3
  69. package/dist/runtime/components/Badge.vue.d.ts +2 -0
  70. package/dist/runtime/components/Button.vue +2 -3
  71. package/dist/runtime/components/Button.vue.d.ts +1 -1
  72. package/dist/runtime/components/Calendar.vue +6 -2
  73. package/dist/runtime/components/Checkbox.vue +14 -5
  74. package/dist/runtime/components/Checkbox.vue.d.ts +9 -0
  75. package/dist/runtime/components/Chip.vue +1 -1
  76. package/dist/runtime/components/Collapsible.vue +1 -1
  77. package/dist/runtime/components/Countdown.vue +1 -1
  78. package/dist/runtime/components/Countdown.vue.d.ts +2 -2
  79. package/dist/runtime/components/DescriptionList.vue +3 -2
  80. package/dist/runtime/components/DescriptionList.vue.d.ts +1 -1
  81. package/dist/runtime/components/DropdownMenu.vue +1 -1
  82. package/dist/runtime/components/DropdownMenu.vue.d.ts +2 -0
  83. package/dist/runtime/components/DropdownMenuContent.vue +74 -72
  84. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +4 -20
  85. package/dist/runtime/components/Form.vue +6 -6
  86. package/dist/runtime/components/Form.vue.d.ts +12 -11
  87. package/dist/runtime/components/FormField.vue +4 -4
  88. package/dist/runtime/components/Input.vue +12 -8
  89. package/dist/runtime/components/Input.vue.d.ts +31 -30
  90. package/dist/runtime/components/InputMenu.vue +23 -20
  91. package/dist/runtime/components/InputMenu.vue.d.ts +214 -4
  92. package/dist/runtime/components/InputNumber.vue +17 -10
  93. package/dist/runtime/components/InputNumber.vue.d.ts +80 -3
  94. package/dist/runtime/components/Link.vue +5 -13
  95. package/dist/runtime/components/Modal.vue +22 -14
  96. package/dist/runtime/components/Modal.vue.d.ts +18 -5
  97. package/dist/runtime/components/Navbar.vue +1 -1
  98. package/dist/runtime/components/NavbarDivider.vue +1 -1
  99. package/dist/runtime/components/NavbarSection.vue +1 -1
  100. package/dist/runtime/components/NavbarSpacer.vue +1 -1
  101. package/dist/runtime/components/NavigationMenu.vue +186 -44
  102. package/dist/runtime/components/NavigationMenu.vue.d.ts +39 -8
  103. package/dist/runtime/components/OverlayProvider.vue +2 -2
  104. package/dist/runtime/components/Popover.vue +4 -0
  105. package/dist/runtime/components/Popover.vue.d.ts +2 -1
  106. package/dist/runtime/components/Progress.vue +3 -2
  107. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  108. package/dist/runtime/components/RadioGroup.vue +26 -10
  109. package/dist/runtime/components/RadioGroup.vue.d.ts +3 -1
  110. package/dist/runtime/components/Range.vue +2 -2
  111. package/dist/runtime/components/Range.vue.d.ts +19 -20
  112. package/dist/runtime/components/Select.vue +57 -31
  113. package/dist/runtime/components/Select.vue.d.ts +110 -2
  114. package/dist/runtime/components/SelectMenu.vue +77 -23
  115. package/dist/runtime/components/SelectMenu.vue.d.ts +111 -5
  116. package/dist/runtime/components/Separator.vue +3 -3
  117. package/dist/runtime/components/Sidebar.vue +1 -1
  118. package/dist/runtime/components/SidebarBody.vue +1 -1
  119. package/dist/runtime/components/SidebarFooter.vue +1 -1
  120. package/dist/runtime/components/SidebarHeader.vue +1 -1
  121. package/dist/runtime/components/SidebarHeading.vue +1 -1
  122. package/dist/runtime/components/SidebarLayout.vue +1 -1
  123. package/dist/runtime/components/SidebarSection.vue +1 -1
  124. package/dist/runtime/components/SidebarSpacer.vue +1 -1
  125. package/dist/runtime/components/Slideover.vue +23 -15
  126. package/dist/runtime/components/Slideover.vue.d.ts +18 -5
  127. package/dist/runtime/components/StackedLayout.vue +1 -1
  128. package/dist/runtime/components/Switch.vue +1 -1
  129. package/dist/runtime/components/Tabs.vue +28 -7
  130. package/dist/runtime/components/Tabs.vue.d.ts +6 -1
  131. package/dist/runtime/components/Textarea.vue +13 -9
  132. package/dist/runtime/components/Textarea.vue.d.ts +31 -30
  133. package/dist/runtime/components/Toast.vue +7 -6
  134. package/dist/runtime/components/Toast.vue.d.ts +6 -0
  135. package/dist/runtime/components/Toaster.vue +4 -4
  136. package/dist/runtime/components/Toaster.vue.d.ts +6 -0
  137. package/dist/runtime/components/Tooltip.vue +9 -2
  138. package/dist/runtime/components/Tooltip.vue.d.ts +2 -1
  139. package/dist/runtime/components/content/TableWrapper.vue +1 -1
  140. package/dist/runtime/composables/defineLocale.d.ts +2 -0
  141. package/dist/runtime/composables/defineLocale.js +4 -0
  142. package/dist/runtime/composables/defineShortcuts.js +8 -2
  143. package/dist/runtime/composables/useFormField.d.ts +1 -1
  144. package/dist/runtime/composables/useFormField.js +2 -1
  145. package/dist/runtime/composables/useKbd.d.ts +1 -0
  146. package/dist/runtime/composables/useKbd.js +4 -3
  147. package/dist/runtime/composables/useOverlay.d.ts +11 -11
  148. package/dist/runtime/composables/useOverlay.js +17 -11
  149. package/dist/runtime/inertia/components/Link.vue +45 -60
  150. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  151. package/dist/runtime/inertia/components/LinkBase.vue +68 -0
  152. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
  153. package/dist/runtime/inertia/stubs.d.ts +1 -1
  154. package/dist/runtime/inertia/stubs.js +1 -1
  155. package/dist/runtime/prose/A.vue +1 -1
  156. package/dist/runtime/prose/Blockquote.vue +1 -1
  157. package/dist/runtime/prose/Code.vue +1 -1
  158. package/dist/runtime/prose/Em.vue +1 -1
  159. package/dist/runtime/prose/H1.vue +1 -1
  160. package/dist/runtime/prose/H2.vue +1 -1
  161. package/dist/runtime/prose/H3.vue +1 -1
  162. package/dist/runtime/prose/H4.vue +1 -1
  163. package/dist/runtime/prose/H5.vue +1 -1
  164. package/dist/runtime/prose/H6.vue +1 -1
  165. package/dist/runtime/prose/Hr.vue +1 -1
  166. package/dist/runtime/prose/Img.vue +1 -1
  167. package/dist/runtime/prose/Li.vue +1 -1
  168. package/dist/runtime/prose/Ol.vue +1 -1
  169. package/dist/runtime/prose/P.vue +1 -1
  170. package/dist/runtime/prose/Pre.vue +1 -1
  171. package/dist/runtime/prose/Strong.vue +1 -1
  172. package/dist/runtime/prose/Table.vue +1 -1
  173. package/dist/runtime/prose/Tbody.vue +1 -1
  174. package/dist/runtime/prose/Td.vue +1 -1
  175. package/dist/runtime/prose/Th.vue +1 -1
  176. package/dist/runtime/prose/Thead.vue +1 -1
  177. package/dist/runtime/prose/Tr.vue +1 -1
  178. package/dist/runtime/prose/Ul.vue +1 -1
  179. package/dist/runtime/types/form.d.ts +11 -10
  180. package/dist/runtime/types/index.d.ts +1 -0
  181. package/dist/runtime/types/index.js +1 -0
  182. package/dist/runtime/types/locale.d.ts +1 -0
  183. package/dist/runtime/types/tv.d.ts +53 -0
  184. package/dist/runtime/types/tv.js +0 -0
  185. package/dist/runtime/types/utils.d.ts +4 -51
  186. package/dist/runtime/types/utils.js +1 -0
  187. package/dist/runtime/utils/link.d.ts +1 -0
  188. package/dist/runtime/utils/link.js +12 -0
  189. package/dist/runtime/vue/components/Link.vue +26 -40
  190. package/dist/runtime/vue/composables/useAppConfig.js +3 -1
  191. package/dist/runtime/vue/stubs.d.ts +1 -1
  192. package/dist/runtime/vue/stubs.js +1 -1
  193. package/dist/shared/{b24ui-nuxt.jU270f-Q.mjs → b24ui-nuxt.C-kZb5Ac.mjs} +267 -121
  194. package/dist/unplugin.d.mts +2 -2
  195. package/dist/unplugin.mjs +6 -3
  196. package/dist/vite.d.mts +1 -1
  197. package/dist/vite.mjs +2 -2
  198. package/package.json +41 -40
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitrix24/b24ui-nuxt",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
4
4
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
5
5
  "configKey": "b24ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.jU270f-Q.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.C-kZb5Ac.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
+ import 'knitwork';
6
7
 
7
8
  const name = "@bitrix24/b24ui-nuxt";
8
- const version = "0.6.7";
9
+ const version = "0.7.0";
9
10
 
10
11
  const module = defineNuxtModule({
11
12
  meta: {
@@ -39,7 +40,14 @@ const module = defineNuxtModule({
39
40
  }
40
41
  }
41
42
  if (options.colorMode) {
42
- await registerModule("@nuxtjs/color-mode", "colorMode", { classSuffix: "", disableTransition: true });
43
+ await registerModule(
44
+ "@nuxtjs/color-mode",
45
+ "colorMode",
46
+ {
47
+ classSuffix: "",
48
+ disableTransition: true
49
+ }
50
+ );
43
51
  }
44
52
  addPlugin({ src: resolve("./runtime/plugins/colors") });
45
53
  addComponentsDir({
@@ -0,0 +1,96 @@
1
+ <script>
2
+ import theme from "#build/b24ui/accordion";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { AccordionRoot, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent, useForwardPropsEmits } from "reka-ui";
8
+ import { reactivePick } from "@vueuse/core";
9
+ import { useAppConfig } from "#imports";
10
+ import { get } from "../utils";
11
+ import { tv } from "../utils/tv";
12
+ import icons from "../dictionary/icons";
13
+ const props = defineProps({
14
+ as: { type: null, required: false },
15
+ items: { type: Array, required: false },
16
+ trailingIcon: { type: [Function, Object], required: false },
17
+ labelKey: { type: String, required: false, default: "label" },
18
+ class: { type: null, required: false },
19
+ b24ui: { type: null, required: false },
20
+ collapsible: { type: Boolean, required: false, default: true },
21
+ defaultValue: { type: null, required: false },
22
+ modelValue: { type: null, required: false },
23
+ type: { type: String, required: false, default: "single" },
24
+ disabled: { type: Boolean, required: false },
25
+ unmountOnHide: { type: Boolean, required: false, default: true }
26
+ });
27
+ const emits = defineEmits(["update:modelValue"]);
28
+ const slots = defineSlots();
29
+ const appConfig = useAppConfig();
30
+ const rootProps = useForwardPropsEmits(reactivePick(props, "as", "collapsible", "defaultValue", "disabled", "modelValue", "type", "unmountOnHide"), emits);
31
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.accordion || {} })({
32
+ disabled: props.disabled
33
+ }));
34
+ </script>
35
+
36
+ <template>
37
+ <AccordionRoot v-bind="rootProps" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
38
+ <AccordionItem
39
+ v-for="(item, index) in props.items"
40
+ v-slot="{ open }"
41
+ :key="index"
42
+ :value="item.value || String(index)"
43
+ :disabled="item.disabled"
44
+ :class="b24ui.item({ class: [props.b24ui?.item, item.b24ui?.item, item.class] })"
45
+ >
46
+ <AccordionHeader as="div" :class="b24ui.header({ class: [props.b24ui?.header, item.b24ui?.header] })">
47
+ <AccordionTrigger :class="b24ui.trigger({ class: [props.b24ui?.trigger, item.b24ui?.trigger], disabled: item.disabled })">
48
+ <slot name="leading" :item="item" :index="index" :open="open">
49
+ <Component
50
+ :is="item.icon"
51
+ v-if="item.icon"
52
+ :class="b24ui.leadingIcon({ class: [props.b24ui?.leadingIcon, item?.b24ui?.leadingIcon] })"
53
+ />
54
+ </slot>
55
+
56
+ <span
57
+ v-if="get(item, props.labelKey) || !!slots.default"
58
+ :class="b24ui.label({ class: [props.b24ui?.label, item.b24ui?.label] })"
59
+ >
60
+ <slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey) }}</slot>
61
+ </span>
62
+
63
+ <slot name="trailing" :item="item" :index="index" :open="open">
64
+ <Component
65
+ :is="item.trailingIcon || trailingIcon || icons.chevronDown"
66
+ :class="b24ui.trailingIcon({ class: [props.b24ui?.trailingIcon, item.b24ui?.trailingIcon] })"
67
+ />
68
+ </slot>
69
+ </AccordionTrigger>
70
+ </AccordionHeader>
71
+
72
+ <AccordionContent
73
+ v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]"
74
+ :class="b24ui.content({ class: [props.b24ui?.content, item.b24ui?.content] })"
75
+ >
76
+ <slot
77
+ :name="item.slot || 'content'"
78
+ :item="item"
79
+ :index="index"
80
+ :open="open"
81
+ >
82
+ <div :class="b24ui.body({ class: [props.b24ui?.body, item.b24ui?.body] })">
83
+ <slot
84
+ :name="item.slot ? `${item.slot}-body` : 'body'"
85
+ :item="item"
86
+ :index="index"
87
+ :open="open"
88
+ >
89
+ {{ item.content }}
90
+ </slot>
91
+ </div>
92
+ </slot>
93
+ </AccordionContent>
94
+ </AccordionItem>
95
+ </AccordionRoot>
96
+ </template>
@@ -0,0 +1,78 @@
1
+ import type { AccordionRootProps, AccordionRootEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/b24ui/accordion';
4
+ import type { IconComponent } from '../types';
5
+ import type { DynamicSlots, ComponentConfig } from '../types/utils';
6
+ type Accordion = ComponentConfig<typeof theme, AppConfig, 'accordion'>;
7
+ export interface AccordionItem {
8
+ label?: string;
9
+ /**
10
+ * @IconComponent
11
+ */
12
+ icon?: IconComponent;
13
+ /**
14
+ * @IconComponent
15
+ */
16
+ trailingIcon?: IconComponent;
17
+ slot?: string;
18
+ content?: string;
19
+ /** A unique value for the accordion item. Defaults to the index. */
20
+ value?: string;
21
+ disabled?: boolean;
22
+ class?: any;
23
+ b24ui?: Pick<Accordion['slots'], 'item' | 'header' | 'trigger' | 'leadingIcon' | 'label' | 'trailingIcon' | 'content' | 'body'>;
24
+ [key: string]: any;
25
+ }
26
+ export interface AccordionProps<T extends AccordionItem = AccordionItem> extends Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled' | 'unmountOnHide'> {
27
+ /**
28
+ * The element or component this component should render as.
29
+ * @defaultValue 'div'
30
+ */
31
+ as?: any;
32
+ items?: T[];
33
+ /**
34
+ * The icon displayed on the right side of the trigger.
35
+ * @defaultValue icons.chevronDown
36
+ * @IconComponent
37
+ */
38
+ trailingIcon?: IconComponent;
39
+ /**
40
+ * The key used to get the label from the item.
41
+ * @defaultValue 'label'
42
+ */
43
+ labelKey?: string;
44
+ class?: any;
45
+ b24ui?: Accordion['slots'];
46
+ }
47
+ export interface AccordionEmits extends AccordionRootEmits {
48
+ }
49
+ type SlotProps<T extends AccordionItem> = (props: {
50
+ item: T;
51
+ index: number;
52
+ open: boolean;
53
+ }) => any;
54
+ export type AccordionSlots<T extends AccordionItem = AccordionItem> = {
55
+ leading: SlotProps<T>;
56
+ default: SlotProps<T>;
57
+ trailing: SlotProps<T>;
58
+ content: SlotProps<T>;
59
+ body: SlotProps<T>;
60
+ } & DynamicSlots<T, 'body', {
61
+ index: number;
62
+ open: boolean;
63
+ }>;
64
+ declare const _default: <T extends AccordionItem>(__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<{
65
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
66
+ readonly "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
67
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & AccordionProps<T> & Partial<{}>> & import("vue").PublicProps;
68
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
69
+ attrs: any;
70
+ slots: AccordionSlots<T>;
71
+ emit: (evt: "update:modelValue", value: string | string[] | undefined) => void;
72
+ }>) => import("vue").VNode & {
73
+ __ctx?: Awaited<typeof __VLS_setup>;
74
+ };
75
+ export default _default;
76
+ type __VLS_PrettifyLocal<T> = {
77
+ [K in keyof T]: T[K];
78
+ } & {};
@@ -31,7 +31,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.advice
31
31
  </script>
32
32
 
33
33
  <template>
34
- <Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
34
+ <Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
35
35
  <div v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
36
36
  <slot name="leading">
37
37
  <Component
@@ -39,7 +39,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
39
39
  </script>
40
40
 
41
41
  <template>
42
- <Primitive :as="as" :data-orientation="orientation" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
42
+ <Primitive :as="as" :data-orientation="orientation" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
43
43
  <slot name="leading">
44
44
  <Component
45
45
  :is="icon"
@@ -9,6 +9,7 @@ import { useAppConfig } from "#imports";
9
9
  import ImageComponent from "#build/b24ui-image-component";
10
10
  import { useAvatarGroup } from "../composables/useAvatarGroup";
11
11
  import { tv } from "../utils/tv";
12
+ import B24Chip from "./Chip.vue";
12
13
  defineOptions({ inheritAttrs: false });
13
14
  const props = defineProps({
14
15
  as: { type: null, required: false, default: "span" },
@@ -17,6 +18,7 @@ const props = defineProps({
17
18
  icon: { type: [Function, Object], required: false },
18
19
  text: { type: String, required: false },
19
20
  size: { type: null, required: false },
21
+ chip: { type: [Boolean, Object], required: false },
20
22
  class: { type: null, required: false },
21
23
  style: { type: null, required: false },
22
24
  b24ui: { type: null, required: false }
@@ -52,7 +54,13 @@ function onError() {
52
54
  </script>
53
55
 
54
56
  <template>
55
- <Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })" :style="props.style">
57
+ <component
58
+ :is="props.chip ? B24Chip : Primitive"
59
+ :as="as"
60
+ v-bind="props.chip ? typeof props.chip === 'object' ? { inset: true, ...props.chip } : { inset: true } : {}"
61
+ :class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
62
+ :style="props.style"
63
+ >
56
64
  <component
57
65
  :is="ImageComponent"
58
66
  v-if="src && !error"
@@ -69,8 +77,8 @@ function onError() {
69
77
  <Slot v-else v-bind="$attrs">
70
78
  <slot>
71
79
  <Component :is="icon" v-if="icon" :class="b24ui.icon({ class: props.b24ui?.icon })" />
72
- <span v-else :class="b24ui.fallback({ class: props.b24ui?.fallback })">{{ fallback || '\xA0' }}</span>
80
+ <span v-else :class="b24ui.fallback({ class: props.b24ui?.fallback })">{{ fallback || "\xA0" }}</span>
73
81
  </slot>
74
82
  </Slot>
75
- </Primitive>
83
+ </component>
76
84
  </template>
@@ -1,7 +1,7 @@
1
1
  import type { AppConfig } from '@nuxt/schema';
2
2
  import theme from '#build/b24ui/avatar';
3
+ import type { IconComponent, ChipProps } from '../types';
3
4
  import type { ComponentConfig } from '../types/utils';
4
- import type { IconComponent } from '../types';
5
5
  type Avatar = ComponentConfig<typeof theme, AppConfig, 'avatar'>;
6
6
  export interface AvatarProps {
7
7
  /**
@@ -21,6 +21,7 @@ export interface AvatarProps {
21
21
  * @defaultValue 'md'
22
22
  */
23
23
  size?: Avatar['variants']['size'];
24
+ chip?: boolean | ChipProps;
24
25
  class?: any;
25
26
  style?: any;
26
27
  b24ui?: Avatar['slots'];
@@ -58,7 +58,7 @@ provide(avatarGroupInjectionKey, computed(() => ({
58
58
  </script>
59
59
 
60
60
  <template>
61
- <Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
61
+ <Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
62
62
  <component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" :class="b24ui.base({ class: props.b24ui?.base })" />
63
63
  <B24Avatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="b24ui.base({ class: props.b24ui?.base })" />
64
64
  </Primitive>
@@ -17,6 +17,7 @@ const props = defineProps({
17
17
  color: { type: null, required: false },
18
18
  depth: { type: null, required: false },
19
19
  size: { type: null, required: false },
20
+ square: { type: Boolean, required: false },
20
21
  useLink: { type: Boolean, required: false },
21
22
  useClose: { type: Boolean, required: false },
22
23
  onCloseClick: { type: [Function, Array], required: false },
@@ -28,7 +29,7 @@ const props = defineProps({
28
29
  trailing: { type: Boolean, required: false },
29
30
  trailingIcon: { type: [Function, Object], required: false }
30
31
  });
31
- defineSlots();
32
+ const slots = defineSlots();
32
33
  const appConfig = useAppConfig();
33
34
  async function onCloseClickWrapper(event) {
34
35
  const callbacks = Array.isArray(props.onCloseClick) ? props.onCloseClick : [props.onCloseClick];
@@ -43,6 +44,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge |
43
44
  color: props.color,
44
45
  depth: props.depth,
45
46
  size: buttonGroupSize.value || props.size,
47
+ square: props.square || !slots.default && !props.label,
46
48
  buttonGroup: orientation.value,
47
49
  useLink: Boolean(props.useLink),
48
50
  useClose: Boolean(props.useClose),
@@ -54,7 +56,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge |
54
56
  <template>
55
57
  <Primitive
56
58
  :as="as"
57
- :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
59
+ :class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
58
60
  >
59
61
  <Primitive
60
62
  :as="as"
@@ -76,7 +78,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge |
76
78
 
77
79
  <span :class="b24ui.label({ class: props.b24ui?.label })">
78
80
  <slot>
79
- <span v-if="label">
81
+ <span v-if="label !== void 0 && label !== null">
80
82
  {{ label }}
81
83
  </span>
82
84
  </slot>
@@ -22,6 +22,8 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
22
22
  * @defaultValue 'md'
23
23
  */
24
24
  size?: Badge['variants']['size'];
25
+ /** Render the badge with equal padding on all sides. */
26
+ square?: boolean;
25
27
  /**
26
28
  * Shows 'underline' on hover
27
29
  * @defaultValue false
@@ -133,14 +133,13 @@ const b24ui = computed(() => tv({
133
133
  v-slot="{ active, ...slotProps }"
134
134
  :type="type"
135
135
  :disabled="disabled || isLoading"
136
- :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
137
136
  v-bind="proxyLinkProps"
138
137
  custom
139
138
  >
140
139
  <B24LinkBase
141
140
  v-bind="slotProps"
142
141
  :class="b24ui.base({
143
- class: [props.class, props.b24ui?.base],
142
+ class: [props.b24ui?.base, props.class],
144
143
  active,
145
144
  ...active && activeDepth ? { depth: activeDepth } : {},
146
145
  ...active && activeColor ? { color: activeColor } : {}
@@ -176,7 +175,7 @@ const b24ui = computed(() => tv({
176
175
  </slot>
177
176
 
178
177
  <slot>
179
- <span v-if="label" :class="b24ui.label({ class: props.b24ui?.label, active })">
178
+ <span v-if="label !== void 0 && label !== null" :class="b24ui.label({ class: props.b24ui?.label, active })">
180
179
  {{ label }}
181
180
  </span>
182
181
  </slot>
@@ -1,7 +1,7 @@
1
1
  import type { AppConfig } from '@nuxt/schema';
2
2
  import theme from '#build/b24ui/button';
3
- import type { LinkProps } from './Link.vue';
4
3
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
4
+ import type { LinkProps } from '../types';
5
5
  import type { ComponentConfig } from '../types/utils';
6
6
  type Button = ComponentConfig<typeof theme, AppConfig, 'button'>;
7
7
  export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | 'trailingIcon'>, Omit<LinkProps, 'raw' | 'custom'> {
@@ -37,6 +37,7 @@ const props = defineProps({
37
37
  allowNonContiguousRanges: { type: Boolean, required: false },
38
38
  pagedNavigation: { type: Boolean, required: false },
39
39
  preventDeselect: { type: Boolean, required: false },
40
+ maximumDays: { type: Number, required: false },
40
41
  weekStartsOn: { type: Number, required: false },
41
42
  weekdayFormat: { type: String, required: false },
42
43
  fixedWeeks: { type: Boolean, required: false, default: true },
@@ -48,8 +49,11 @@ const props = defineProps({
48
49
  initialFocus: { type: Boolean, required: false },
49
50
  isDateDisabled: { type: Function, required: false },
50
51
  isDateUnavailable: { type: Function, required: false },
52
+ isDateHighlightable: { type: Function, required: false },
51
53
  nextPage: { type: Function, required: false },
52
- prevPage: { type: Function, required: false }
54
+ prevPage: { type: Function, required: false },
55
+ disableDaysOutsideCurrentView: { type: Boolean, required: false },
56
+ fixedDate: { type: String, required: false }
53
57
  });
54
58
  const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
55
59
  defineSlots();
@@ -89,7 +93,7 @@ const btnSize = computed(() => {
89
93
  :default-value="defaultValue"
90
94
  :locale="locale"
91
95
  :dir="dir"
92
- :class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
96
+ :class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
93
97
  >
94
98
  <Calendar.Header :class="b24ui.header({ class: props.b24ui?.header })">
95
99
  <Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
@@ -17,13 +17,15 @@ const props = defineProps({
17
17
  label: { type: String, required: false },
18
18
  description: { type: String, required: false },
19
19
  color: { type: null, required: false },
20
+ variant: { type: null, required: false },
20
21
  size: { type: null, required: false },
22
+ indicator: { type: null, required: false },
21
23
  class: { type: null, required: false },
22
24
  b24ui: { type: null, required: false },
23
25
  disabled: { type: Boolean, required: false },
24
26
  required: { type: Boolean, required: false },
25
27
  name: { type: String, required: false },
26
- value: { type: [String, Number, Object, null], required: false },
28
+ value: { type: null, required: false },
27
29
  id: { type: String, required: false },
28
30
  defaultValue: { type: [Boolean, String], required: false }
29
31
  });
@@ -37,6 +39,8 @@ const id = _id.value ?? useId();
37
39
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.checkbox || {} })({
38
40
  size: size.value,
39
41
  color: color.value,
42
+ variant: props.variant,
43
+ indicator: props.indicator,
40
44
  required: props.required,
41
45
  disabled: disabled.value,
42
46
  checked: Boolean(modelValue.value ?? props.defaultValue)
@@ -50,7 +54,7 @@ function onUpdate(value) {
50
54
  </script>
51
55
 
52
56
  <template>
53
- <Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
57
+ <Primitive :as="!variant || variant === 'list' ? as : Label" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
54
58
  <div :class="b24ui.container({ class: props.b24ui?.container })">
55
59
  <CheckboxRoot
56
60
  :id="id"
@@ -62,7 +66,7 @@ function onUpdate(value) {
62
66
  @update:model-value="onUpdate"
63
67
  >
64
68
  <template #default="{ modelValue }">
65
- <CheckboxIndicator as-child>
69
+ <CheckboxIndicator :class="b24ui.indicator({ class: props.b24ui?.indicator })">
66
70
  <Minus20Icon v-if="modelValue === 'indeterminate'" :class="b24ui.icon({ class: props.b24ui?.icon })" />
67
71
  <CheckIcon v-else :class="b24ui.icon({ class: props.b24ui?.icon })" />
68
72
  </CheckboxIndicator>
@@ -71,11 +75,16 @@ function onUpdate(value) {
71
75
  </div>
72
76
 
73
77
  <div v-if="label || !!slots.label || (description || !!slots.description)" :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
74
- <Label v-if="label || !!slots.label" :for="id" :class="b24ui.label({ class: props.b24ui?.label })">
78
+ <component
79
+ :is="!variant || variant === 'list' ? Label : 'p'"
80
+ v-if="label || !!slots.label"
81
+ :for="id"
82
+ :class="b24ui.label({ class: props.b24ui?.label })"
83
+ >
75
84
  <slot name="label" :label="label">
76
85
  {{ label }}
77
86
  </slot>
78
- </Label>
87
+ </component>
79
88
  <p v-if="description || !!slots.description" :class="b24ui.description({ class: props.b24ui?.description })">
80
89
  <slot name="description" :description="description">
81
90
  {{ description }}
@@ -15,10 +15,19 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
15
15
  * @defaultValue 'primary'
16
16
  */
17
17
  color?: Checkbox['variants']['color'];
18
+ /**
19
+ * @defaultValue 'list'
20
+ */
21
+ variant?: Checkbox['variants']['variant'];
18
22
  /**
19
23
  * @defaultValue 'md'
20
24
  */
21
25
  size?: Checkbox['variants']['size'];
26
+ /**
27
+ * Position of the indicator.
28
+ * @defaultValue 'start'
29
+ */
30
+ indicator?: Checkbox['variants']['indicator'];
22
31
  class?: any;
23
32
  b24ui?: Checkbox['slots'];
24
33
  }
@@ -34,7 +34,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.chip ||
34
34
  </script>
35
35
 
36
36
  <template>
37
- <Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
37
+ <Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
38
38
  <Slot v-bind="$attrs">
39
39
  <slot />
40
40
  </Slot>
@@ -25,7 +25,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.collaps
25
25
  </script>
26
26
 
27
27
  <template>
28
- <CollapsibleRoot v-slot="{ open }" v-bind="rootProps" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
28
+ <CollapsibleRoot v-slot="{ open }" v-bind="rootProps" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
29
29
  <CollapsibleTrigger v-if="!!slots.default" as-child>
30
30
  <slot :open="open" />
31
31
  </CollapsibleTrigger>
@@ -238,7 +238,7 @@ defineExpose({
238
238
  <Primitive
239
239
  :as="as"
240
240
  v-bind="$attrs"
241
- :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
241
+ :class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
242
242
  >
243
243
  <svg
244
244
  v-if="props.useCircle"
@@ -79,15 +79,15 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CountdownP
79
79
  stop: () => void;
80
80
  restart: () => void;
81
81
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
82
+ end: () => any;
82
83
  abort: () => any;
83
84
  progress: (payload: CountdownData) => any;
84
85
  start: () => any;
85
- end: () => any;
86
86
  }, string, import("vue").PublicProps, Readonly<CountdownProps> & Readonly<{
87
+ onEnd?: (() => any) | undefined;
87
88
  onAbort?: (() => any) | undefined;
88
89
  onProgress?: ((payload: CountdownData) => any) | undefined;
89
90
  onStart?: (() => any) | undefined;
90
- onEnd?: (() => any) | undefined;
91
91
  }>, {
92
92
  as: any;
93
93
  emitEvents: boolean;
@@ -51,7 +51,7 @@ const normalizedItems = computed(() => {
51
51
  </script>
52
52
 
53
53
  <template>
54
- <div :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
54
+ <div :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
55
55
  <h2 v-if="legend || !!slots.legend" :class="b24ui.legend({ class: props.b24ui?.legend })">
56
56
  <slot name="legend">
57
57
  {{ legend }}
@@ -129,7 +129,8 @@ const normalizedItems = computed(() => {
129
129
  :class="b24ui.descriptionWrapper({
130
130
  class: [
131
131
  props.b24ui?.descriptionWrapper,
132
- item?.b24ui?.descriptionWrapper
132
+ item?.b24ui?.descriptionWrapper,
133
+ item?.b24ui?.class
133
134
  ],
134
135
  orientation: item.orientation
135
136
  })"
@@ -26,7 +26,7 @@ export interface DescriptionListItem {
26
26
  */
27
27
  actions?: ButtonProps[];
28
28
  class?: any;
29
- b24ui?: DescriptionList['slots'];
29
+ b24ui?: Pick<DescriptionList['slots'], 'labelWrapper' | 'icon' | 'avatar' | 'label' | 'descriptionWrapper' | 'description' | 'actions'>;
30
30
  [key: string]: any;
31
31
  }
32
32
  export interface DescriptionListProps<T extends DescriptionListItem = DescriptionListItem> {
@@ -46,7 +46,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.dropdow
46
46
  </DropdownMenuTrigger>
47
47
 
48
48
  <B24DropdownMenuContent
49
- :class="b24ui.content({ class: [!slots.default && props.class, props.b24ui?.content] })"
49
+ :class="b24ui.content({ class: [!slots.default && props.b24ui?.content, props.class] })"
50
50
  :b24ui="b24ui"
51
51
  :b24ui-override="props.b24ui"
52
52
  v-bind="contentProps"
@@ -29,6 +29,8 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
29
29
  children?: ArrayOrNested<DropdownMenuItem>;
30
30
  onSelect?(e: Event): void;
31
31
  onUpdateChecked?(checked: boolean): void;
32
+ class?: any;
33
+ b24ui?: Pick<DropdownMenu['slots'], 'item' | 'label' | 'separator' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLabel' | 'itemLabelExternalIcon' | 'itemTrailing' | 'itemTrailingIcon' | 'itemTrailingKbds' | 'itemTrailingKbdsSize'>;
32
34
  [key: string]: any;
33
35
  }
34
36
  export interface DropdownMenuProps<T extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>> extends Omit<DropdownMenuRootProps, 'dir'> {