@bitrix24/b24ui-nuxt 2.0.9 → 2.1.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 (143) hide show
  1. package/dist/meta.d.mts +79556 -44766
  2. package/dist/meta.mjs +79556 -44766
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +3 -3
  5. package/dist/runtime/components/App.d.vue.ts +1 -1
  6. package/dist/runtime/components/App.vue +2 -1
  7. package/dist/runtime/components/App.vue.d.ts +1 -1
  8. package/dist/runtime/components/Avatar.d.vue.ts +2 -1
  9. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  10. package/dist/runtime/components/Button.vue +1 -0
  11. package/dist/runtime/components/Calendar.vue +1 -3
  12. package/dist/runtime/components/ChatPrompt.d.vue.ts +2 -2
  13. package/dist/runtime/components/ChatPrompt.vue +5 -5
  14. package/dist/runtime/components/ChatPrompt.vue.d.ts +2 -2
  15. package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +5 -5
  16. package/dist/runtime/components/ChatPromptSubmit.vue +53 -4
  17. package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +5 -5
  18. package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
  19. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  20. package/dist/runtime/components/CommandPalette.vue +5 -4
  21. package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -6
  22. package/dist/runtime/components/DashboardSearch.vue +2 -3
  23. package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -6
  24. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -3
  25. package/dist/runtime/components/DashboardSearchButton.vue +44 -6
  26. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -3
  27. package/dist/runtime/components/Error.d.vue.ts +1 -1
  28. package/dist/runtime/components/Error.vue.d.ts +1 -1
  29. package/dist/runtime/components/FileUpload.d.vue.ts +3 -2
  30. package/dist/runtime/components/FileUpload.vue +9 -9
  31. package/dist/runtime/components/FileUpload.vue.d.ts +3 -2
  32. package/dist/runtime/components/Form.d.vue.ts +2 -1
  33. package/dist/runtime/components/Form.vue.d.ts +2 -1
  34. package/dist/runtime/components/Input.d.vue.ts +7 -7
  35. package/dist/runtime/components/Input.vue +2 -2
  36. package/dist/runtime/components/Input.vue.d.ts +7 -7
  37. package/dist/runtime/components/InputDate.d.vue.ts +110 -0
  38. package/dist/runtime/components/InputDate.vue +192 -0
  39. package/dist/runtime/components/InputDate.vue.d.ts +110 -0
  40. package/dist/runtime/components/InputMenu.d.vue.ts +7 -128
  41. package/dist/runtime/components/InputMenu.vue +3 -3
  42. package/dist/runtime/components/InputMenu.vue.d.ts +7 -128
  43. package/dist/runtime/components/InputNumber.d.vue.ts +25 -129
  44. package/dist/runtime/components/InputNumber.vue +4 -7
  45. package/dist/runtime/components/InputNumber.vue.d.ts +25 -129
  46. package/dist/runtime/components/InputTags.d.vue.ts +6 -109
  47. package/dist/runtime/components/InputTags.vue +8 -8
  48. package/dist/runtime/components/InputTags.vue.d.ts +6 -109
  49. package/dist/runtime/components/InputTime.d.vue.ts +94 -0
  50. package/dist/runtime/components/InputTime.vue +164 -0
  51. package/dist/runtime/components/InputTime.vue.d.ts +94 -0
  52. package/dist/runtime/components/Link.d.vue.ts +4 -49
  53. package/dist/runtime/components/Link.vue +1 -0
  54. package/dist/runtime/components/Link.vue.d.ts +4 -49
  55. package/dist/runtime/components/Modal.d.vue.ts +1 -1
  56. package/dist/runtime/components/Modal.vue.d.ts +1 -1
  57. package/dist/runtime/components/Pagination.d.vue.ts +2 -2
  58. package/dist/runtime/components/Pagination.vue.d.ts +2 -2
  59. package/dist/runtime/components/PinInput.d.vue.ts +3 -3
  60. package/dist/runtime/components/PinInput.vue.d.ts +3 -3
  61. package/dist/runtime/components/Progress.d.vue.ts +1 -1
  62. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  63. package/dist/runtime/components/Select.d.vue.ts +6 -107
  64. package/dist/runtime/components/Select.vue +3 -3
  65. package/dist/runtime/components/Select.vue.d.ts +6 -107
  66. package/dist/runtime/components/SelectMenu.d.vue.ts +7 -106
  67. package/dist/runtime/components/SelectMenu.vue +3 -3
  68. package/dist/runtime/components/SelectMenu.vue.d.ts +7 -106
  69. package/dist/runtime/components/Slideover.d.vue.ts +1 -1
  70. package/dist/runtime/components/Slideover.vue.d.ts +1 -1
  71. package/dist/runtime/components/Switch.d.vue.ts +2 -1
  72. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  73. package/dist/runtime/components/Table.d.vue.ts +5 -4
  74. package/dist/runtime/components/Table.vue +4 -3
  75. package/dist/runtime/components/Table.vue.d.ts +5 -4
  76. package/dist/runtime/components/Textarea.d.vue.ts +7 -6
  77. package/dist/runtime/components/Textarea.vue +2 -2
  78. package/dist/runtime/components/Textarea.vue.d.ts +7 -6
  79. package/dist/runtime/components/Toast.vue +5 -5
  80. package/dist/runtime/components/Toaster.d.vue.ts +1 -1
  81. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  82. package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +3 -3
  83. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -4
  84. package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +3 -3
  85. package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +3 -3
  86. package/dist/runtime/components/color-mode/ColorModeButton.vue +54 -6
  87. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -3
  88. package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +4 -3
  89. package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -0
  90. package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +4 -3
  91. package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
  92. package/dist/runtime/components/color-mode/ColorModeSelect.vue +47 -5
  93. package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
  94. package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +2 -2
  95. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +29 -5
  96. package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +2 -2
  97. package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -6
  98. package/dist/runtime/components/content/ContentSearch.vue +2 -3
  99. package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -6
  100. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -3
  101. package/dist/runtime/components/content/ContentSearchButton.vue +43 -5
  102. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -3
  103. package/dist/runtime/components/content/ContentSurround.vue +7 -1
  104. package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +11 -7
  105. package/dist/runtime/components/locale/LocaleSelect.vue +50 -6
  106. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +11 -7
  107. package/dist/runtime/components/prose/Callout.vue +4 -0
  108. package/dist/runtime/composables/index.d.ts +8 -0
  109. package/dist/runtime/composables/index.js +8 -0
  110. package/dist/runtime/composables/useFileUpload.d.ts +2 -1
  111. package/dist/runtime/composables/useFileUpload.js +13 -4
  112. package/dist/runtime/inertia/components/Link.d.vue.ts +17 -10
  113. package/dist/runtime/inertia/components/Link.vue +8 -6
  114. package/dist/runtime/inertia/components/Link.vue.d.ts +17 -10
  115. package/dist/runtime/inertia/stubs.d.ts +1 -1
  116. package/dist/runtime/types/html.d.ts +8 -0
  117. package/dist/runtime/types/html.js +0 -0
  118. package/dist/runtime/types/index.d.ts +2 -0
  119. package/dist/runtime/types/index.js +2 -0
  120. package/dist/runtime/types/input.d.ts +5 -5
  121. package/dist/runtime/types/utils.d.ts +2 -0
  122. package/dist/runtime/utils/content.d.ts +2 -2
  123. package/dist/runtime/utils/dashboard.d.ts +1 -1
  124. package/dist/runtime/utils/link.d.ts +1 -0
  125. package/dist/runtime/utils/link.js +40 -24
  126. package/dist/runtime/vue/components/Link.d.vue.ts +8 -37
  127. package/dist/runtime/vue/components/Link.vue +6 -11
  128. package/dist/runtime/vue/components/Link.vue.d.ts +8 -37
  129. package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +2 -2
  130. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +55 -5
  131. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +2 -2
  132. package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
  133. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +46 -3
  134. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
  135. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
  136. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +24 -3
  137. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
  138. package/dist/runtime/vue/stubs.d.ts +2 -2
  139. package/dist/runtime/vue/stubs.js +1 -1
  140. package/dist/shared/{b24ui-nuxt.4XNR9Ysu.mjs → b24ui-nuxt.B13KxxqP.mjs} +137 -3
  141. package/dist/unplugin.mjs +1 -1
  142. package/dist/vite.mjs +1 -1
  143. package/package.json +24 -14
@@ -1,14 +1,15 @@
1
- import type { ButtonHTMLAttributes } from 'vue';
2
- import type { RouterLinkProps, RouteLocationRaw } from 'vue-router';
3
- interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
1
+ import type { RouterLinkProps } from 'vue-router';
2
+ import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../types/html';
3
+ export interface LinkProps extends Omit<RouterLinkProps, 'custom'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
4
4
  /**
5
- * Route Location the link should navigate to when clicked on.
5
+ * The element or component this component should render as when not a link.
6
+ * @defaultValue 'button'
6
7
  */
7
- to?: RouteLocationRaw;
8
+ as?: any;
8
9
  /**
9
10
  * An alias for `to`. If used with `to`, `href` will be ignored
10
11
  */
11
- href?: NuxtLinkProps['to'];
12
+ href?: LinkProps['to'];
12
13
  /**
13
14
  * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
14
15
  */
@@ -21,36 +22,6 @@ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
21
22
  * A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
22
23
  */
23
24
  rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null;
24
- /**
25
- * If set to true, no rel attribute will be added to the link
26
- */
27
- noRel?: boolean;
28
- /**
29
- * A class to apply to links that have been prefetched.
30
- */
31
- prefetchedClass?: string;
32
- /**
33
- * When enabled will prefetch middleware, layouts and payloads of links in the viewport.
34
- */
35
- prefetch?: boolean;
36
- /**
37
- * Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
38
- */
39
- prefetchOn?: 'visibility' | 'interaction' | Partial<{
40
- visibility: boolean;
41
- interaction: boolean;
42
- }>;
43
- /**
44
- * Escape hatch to disable `prefetch` attribute.
45
- */
46
- noPrefetch?: boolean;
47
- }
48
- export interface LinkProps extends NuxtLinkProps {
49
- /**
50
- * The element or component this component should render as when not a link.
51
- * @defaultValue 'button'
52
- */
53
- as?: any;
54
25
  /**
55
26
  * The type of the button when not a link.
56
27
  * @defaultValue 'button'
@@ -82,9 +53,9 @@ export interface LinkSlots {
82
53
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
83
54
  as: any;
84
55
  type: "reset" | "submit" | "button";
56
+ active: boolean;
85
57
  activeClass: string;
86
58
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
87
- active: boolean;
88
59
  inactiveClass: string;
89
60
  isAction: boolean;
90
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
@@ -1,12 +1,12 @@
1
1
  import type { ButtonProps } from '../../../types';
2
- export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'b24ui'> {
2
+ export interface ColorModeButtonProps extends Omit<ButtonProps, 'color'> {
3
3
  /**
4
4
  * @defaultValue 'air-tertiary-no-accent'
5
5
  */
6
6
  color?: ButtonProps['color'];
7
7
  }
8
8
  declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
9
- color: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-accent" | "air-secondary-accent-1" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-alert" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
9
+ color: "default" | "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-accent" | "air-secondary-accent-1" | "air-tertiary" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-alert" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -4,15 +4,62 @@
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
+ import { useForwardProps } from "reka-ui";
8
+ import { reactiveOmit } from "@vueuse/core";
7
9
  import { useColorMode } from "#imports";
8
10
  import { useLocale } from "../../../composables/useLocale";
9
11
  import icons from "../../../dictionary/icons";
10
12
  import B24Button from "../../../components/Button.vue";
11
- defineProps({
12
- color: { type: null, required: false, default: "air-tertiary-no-accent" }
13
+ defineOptions({ inheritAttrs: false });
14
+ const props = defineProps({
15
+ color: { type: null, required: false, default: "air-tertiary-no-accent" },
16
+ label: { type: String, required: false },
17
+ activeColor: { type: null, required: false },
18
+ depth: { type: null, required: false },
19
+ activeDepth: { type: null, required: false },
20
+ size: { type: null, required: false },
21
+ rounded: { type: Boolean, required: false },
22
+ block: { type: Boolean, required: false },
23
+ loadingAuto: { type: Boolean, required: false },
24
+ normalCase: { type: Boolean, required: false },
25
+ useWait: { type: Boolean, required: false },
26
+ useClock: { type: Boolean, required: false },
27
+ useDropdown: { type: Boolean, required: false },
28
+ onClick: { type: [Function, Array], required: false },
29
+ class: { type: null, required: false },
30
+ activeClass: { type: String, required: false },
31
+ inactiveClass: { type: String, required: false },
32
+ b24ui: { type: null, required: false },
33
+ icon: { type: [Function, Object], required: false },
34
+ avatar: { type: Object, required: false },
35
+ loading: { type: Boolean, required: false },
36
+ as: { type: null, required: false },
37
+ type: { type: null, required: false },
38
+ disabled: { type: Boolean, required: false },
39
+ active: { type: Boolean, required: false },
40
+ exact: { type: Boolean, required: false },
41
+ exactQuery: { type: [Boolean, String], required: false },
42
+ exactHash: { type: Boolean, required: false },
43
+ isAction: { type: Boolean, required: false },
44
+ to: { type: null, required: false },
45
+ href: { type: null, required: false },
46
+ external: { type: Boolean, required: false },
47
+ target: { type: [String, Object, null], required: false },
48
+ rel: { type: [String, Object, null], required: false },
49
+ noRel: { type: Boolean, required: false },
50
+ prefetchedClass: { type: String, required: false },
51
+ prefetch: { type: Boolean, required: false },
52
+ prefetchOn: { type: [String, Object], required: false },
53
+ noPrefetch: { type: Boolean, required: false },
54
+ trailingSlash: { type: String, required: false },
55
+ exactActiveClass: { type: String, required: false },
56
+ ariaCurrentValue: { type: String, required: false },
57
+ viewTransition: { type: Boolean, required: false },
58
+ replace: { type: Boolean, required: false }
13
59
  });
14
60
  const { t } = useLocale();
15
61
  const colorMode = useColorMode();
62
+ const buttonProps = useForwardProps(reactiveOmit(props, "icon"));
16
63
  const isDark = computed({
17
64
  get() {
18
65
  return colorMode.value === "dark";
@@ -25,9 +72,12 @@ const isDark = computed({
25
72
 
26
73
  <template>
27
74
  <B24Button
28
- :icon="isDark ? icons.dark : icons.light"
29
- :color="color"
30
- :aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
75
+ v-bind="{
76
+ ...buttonProps,
77
+ 'icon': props.icon || (isDark ? icons.dark : icons.light),
78
+ 'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
79
+ ...$attrs
80
+ }"
31
81
  @click="isDark = !isDark"
32
82
  />
33
83
  </template>
@@ -1,12 +1,12 @@
1
1
  import type { ButtonProps } from '../../../types';
2
- export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'b24ui'> {
2
+ export interface ColorModeButtonProps extends Omit<ButtonProps, 'color'> {
3
3
  /**
4
4
  * @defaultValue 'air-tertiary-no-accent'
5
5
  */
6
6
  color?: ButtonProps['color'];
7
7
  }
8
8
  declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
9
- color: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-accent" | "air-secondary-accent-1" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-alert" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
9
+ color: "default" | "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-accent" | "air-secondary-accent-1" | "air-tertiary" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-alert" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -1,6 +1,8 @@
1
- import type { SelectMenuProps } from '../../../types';
2
- export interface ColorModeSelectProps extends /** @vue-ignore */ Pick<SelectMenuProps<any>, 'color' | 'size' | 'trailingIcon' | 'selectedIcon' | 'content' | 'arrow' | 'portal' | 'disabled' | 'b24ui'> {
1
+ import type { SelectMenuProps, SelectMenuItem } from '../../../types';
2
+ export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuItem[]>, 'icon' | 'items' | 'modelValue'> {
3
3
  }
4
- declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
5
+ searchInput: boolean | import("../../../types").InputProps;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
7
  declare const _default: typeof __VLS_export;
6
8
  export default _default;
@@ -4,14 +4,58 @@
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
+ import { useForwardProps } from "reka-ui";
7
8
  import { useColorMode } from "#imports";
8
9
  import { useLocale } from "../../../composables/useLocale";
9
10
  import icons from "../../../dictionary/icons";
10
11
  import B24SelectMenu from "../../../components/SelectMenu.vue";
11
12
  defineOptions({ inheritAttrs: false });
12
- defineProps({});
13
+ const props = defineProps({
14
+ id: { type: String, required: false },
15
+ placeholder: { type: String, required: false },
16
+ searchInput: { type: [Boolean, Object], required: false, default: false },
17
+ color: { type: null, required: false },
18
+ size: { type: null, required: false },
19
+ noPadding: { type: Boolean, required: false },
20
+ noBorder: { type: Boolean, required: false },
21
+ underline: { type: Boolean, required: false },
22
+ rounded: { type: Boolean, required: false },
23
+ tag: { type: String, required: false },
24
+ tagColor: { type: null, required: false },
25
+ required: { type: Boolean, required: false },
26
+ trailingIcon: { type: [Function, Object], required: false },
27
+ selectedIcon: { type: [Function, Object], required: false },
28
+ content: { type: Object, required: false },
29
+ arrow: { type: [Boolean, Object], required: false },
30
+ portal: { type: [Boolean, String], required: false, skipCheck: true },
31
+ virtualize: { type: [Boolean, Object], required: false },
32
+ valueKey: { type: null, required: false },
33
+ labelKey: { type: null, required: false },
34
+ descriptionKey: { type: null, required: false },
35
+ defaultValue: { type: null, required: false },
36
+ multiple: { type: Boolean, required: false },
37
+ highlight: { type: Boolean, required: false },
38
+ createItem: { type: [Boolean, String, Object], required: false },
39
+ filterFields: { type: Array, required: false },
40
+ ignoreFilter: { type: Boolean, required: false },
41
+ autofocus: { type: Boolean, required: false },
42
+ autofocusDelay: { type: Number, required: false },
43
+ class: { type: null, required: false },
44
+ b24ui: { type: null, required: false },
45
+ open: { type: Boolean, required: false },
46
+ defaultOpen: { type: Boolean, required: false },
47
+ disabled: { type: Boolean, required: false },
48
+ name: { type: String, required: false },
49
+ resetSearchTermOnBlur: { type: Boolean, required: false },
50
+ resetSearchTermOnSelect: { type: Boolean, required: false },
51
+ highlightOnHover: { type: Boolean, required: false },
52
+ avatar: { type: Object, required: false },
53
+ loading: { type: Boolean, required: false },
54
+ trailing: { type: Boolean, required: false }
55
+ });
13
56
  const { t } = useLocale();
14
57
  const colorMode = useColorMode();
58
+ const selectMenuProps = useForwardProps(props);
15
59
  const items = computed(() => [
16
60
  { label: t("colorMode.system"), value: "system", icon: icons.system },
17
61
  { label: t("colorMode.light"), value: "light", icon: icons.light },
@@ -31,8 +75,7 @@ const preference = computed({
31
75
  <B24SelectMenu
32
76
  v-model="preference"
33
77
  :icon="preference?.icon"
34
- :search-input="false"
35
- v-bind="$attrs"
78
+ v-bind="{ ...selectMenuProps, ...$attrs }"
36
79
  :items="items"
37
80
  />
38
81
  </template>
@@ -1,6 +1,8 @@
1
- import type { SelectMenuProps } from '../../../types';
2
- export interface ColorModeSelectProps extends /** @vue-ignore */ Pick<SelectMenuProps<any>, 'color' | 'size' | 'trailingIcon' | 'selectedIcon' | 'content' | 'arrow' | 'portal' | 'disabled' | 'b24ui'> {
1
+ import type { SelectMenuProps, SelectMenuItem } from '../../../types';
2
+ export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuItem[]>, 'icon' | 'items' | 'modelValue'> {
3
3
  }
4
- declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
5
+ searchInput: boolean | import("../../../types").InputProps;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
7
  declare const _default: typeof __VLS_export;
6
8
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { SwitchProps } from '../../../types';
2
- export interface ColorModeSwitchProps extends /** @vue-ignore */ Pick<SwitchProps, 'as' | 'color' | 'size' | 'disabled' | 'b24ui'> {
2
+ export interface ColorModeSwitchProps extends Omit<SwitchProps, 'checkedIcon' | 'uncheckedIcon' | 'modelValue'> {
3
3
  }
4
4
  declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
5
  declare const _default: typeof __VLS_export;
@@ -4,14 +4,32 @@
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
+ import { useForwardProps } from "reka-ui";
7
8
  import { useColorMode } from "#imports";
8
9
  import { useLocale } from "../../../composables/useLocale";
9
10
  import icons from "../../../dictionary/icons";
10
11
  import B24Switch from "../../../components/Switch.vue";
11
12
  defineOptions({ inheritAttrs: false });
12
- defineProps({});
13
+ const props = defineProps({
14
+ as: { type: null, required: false },
15
+ color: { type: null, required: false },
16
+ size: { type: null, required: false },
17
+ loading: { type: Boolean, required: false },
18
+ loadingIcon: { type: [Function, Object], required: false },
19
+ label: { type: String, required: false },
20
+ description: { type: String, required: false },
21
+ class: { type: null, required: false },
22
+ b24ui: { type: null, required: false },
23
+ disabled: { type: Boolean, required: false },
24
+ id: { type: String, required: false },
25
+ name: { type: String, required: false },
26
+ required: { type: Boolean, required: false },
27
+ value: { type: String, required: false },
28
+ defaultValue: { type: Boolean, required: false }
29
+ });
13
30
  const { t } = useLocale();
14
31
  const colorMode = useColorMode();
32
+ const switchProps = useForwardProps(props);
15
33
  const isDark = computed({
16
34
  get() {
17
35
  return colorMode.value === "dark";
@@ -27,7 +45,10 @@ const isDark = computed({
27
45
  v-model="isDark"
28
46
  :checked-icon="icons.dark"
29
47
  :unchecked-icon="icons.light"
30
- :aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
31
- v-bind="$attrs"
48
+ v-bind="{
49
+ ...switchProps,
50
+ 'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
51
+ ...$attrs
52
+ }"
32
53
  />
33
54
  </template>
@@ -1,5 +1,5 @@
1
1
  import type { SwitchProps } from '../../../types';
2
- export interface ColorModeSwitchProps extends /** @vue-ignore */ Pick<SwitchProps, 'as' | 'color' | 'size' | 'disabled' | 'b24ui'> {
2
+ export interface ColorModeSwitchProps extends Omit<SwitchProps, 'checkedIcon' | 'uncheckedIcon' | 'modelValue'> {
3
3
  }
4
4
  declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
5
  declare const _default: typeof __VLS_export;
@@ -20,7 +20,7 @@ export declare const useColorMode: () => {
20
20
  preference?: undefined;
21
21
  readonly value?: undefined;
22
22
  } | {
23
- preference: "system" | import("@vueuse/core").BasicColorMode;
23
+ preference: import("@vueuse/core").BasicColorMode | "system";
24
24
  readonly value: import("@vueuse/core").BasicColorMode;
25
25
  forced: boolean;
26
26
  };
@@ -36,7 +36,7 @@ export declare const useState: <T>(key: string, init: () => T) => Ref<T>;
36
36
  export declare function useNuxtApp(): {
37
37
  isHydrating: boolean;
38
38
  payload: {
39
- serverRendered: boolean;
39
+ serverRendered: any;
40
40
  };
41
41
  hooks: import("hookable").Hookable<Record<string, any>, string>;
42
42
  hook: <NameT extends string>(name: NameT, function_: any, options?: {
@@ -71,7 +71,7 @@ const hooks = createHooks();
71
71
  export function useNuxtApp() {
72
72
  return {
73
73
  isHydrating: true,
74
- payload: { serverRendered: false },
74
+ payload: { serverRendered: import.meta.env.SSR || false },
75
75
  hooks,
76
76
  hook: hooks.hook
77
77
  };
@@ -8,7 +8,7 @@ import { globSync } from 'tinyglobby';
8
8
  import { defuFn } from 'defu';
9
9
 
10
10
  const name = "@bitrix24/b24ui-nuxt";
11
- const version = "2.0.9";
11
+ const version = "2.1.1";
12
12
 
13
13
  function getDefaultConfig(theme) {
14
14
  return {
@@ -1650,7 +1650,7 @@ const chatMessage = {
1650
1650
  root: "group/message relative w-full",
1651
1651
  container: "relative flex items-start",
1652
1652
  leading: "inline-flex items-center justify-center min-h-6",
1653
- leadingIcon: "shrink-0",
1653
+ leadingIcon: "shrink-0 text-(--ui-color-design-plain-content-icon-secondary)",
1654
1654
  leadingAvatar: "shrink-0",
1655
1655
  leadingAvatarSize: "",
1656
1656
  content: "relative text-pretty min-w-0 *:first:mt-0 *:last:mb-0",
@@ -3768,6 +3768,72 @@ const input = {
3768
3768
  }
3769
3769
  };
3770
3770
 
3771
+ const inputDate = () => {
3772
+ return defuFn({
3773
+ slots: {
3774
+ root: () => void 0,
3775
+ base: () => [
3776
+ "group",
3777
+ "relative",
3778
+ "inline-flex items-center",
3779
+ "select-none",
3780
+ "transition-colors",
3781
+ "style-blurred-bg-input"
3782
+ ].join(" "),
3783
+ segment: [
3784
+ "rounded",
3785
+ "text-center",
3786
+ "outline-hidden",
3787
+ "text-(--ui-color-base-1)",
3788
+ "data-placeholder:text-(--ui-color-design-plain-na-content-secondary)",
3789
+ "hover:text-(--ui-color-base-1)",
3790
+ "focus:text-(--ui-color-base-1)",
3791
+ "active:text-(--ui-color-base-1)",
3792
+ "font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-regular)",
3793
+ "align-middle",
3794
+ "data-[segment=literal]:text-(--ui-color-base-6)",
3795
+ "data-invalid:text-(--ui-color-accent-main-alert)",
3796
+ "data-disabled:cursor-not-allowed",
3797
+ "data-disabled:pointer-events-none",
3798
+ "data-disabled:select-none",
3799
+ "data-disabled:opacity-30",
3800
+ "transition-colors",
3801
+ "focus:bg-(--ui-color-bg-content-secondary)"
3802
+ ].join(" "),
3803
+ separatorIcon: "shrink-0 size-4 text-(--ui-color-base-6)"
3804
+ },
3805
+ variants: {
3806
+ size: {
3807
+ xss: {
3808
+ base: (prev) => [prev, "gap-0.20", "px-1"].join(" "),
3809
+ segment: "data-[segment=day]:w-6 data-[segment=month]:w-6 data-[segment=year]:w-9"
3810
+ },
3811
+ xs: {
3812
+ base: (prev) => [prev, "gap-0.25", "px-2"].join(" "),
3813
+ segment: "data-[segment=day]:w-6 data-[segment=month]:w-6 data-[segment=year]:w-9"
3814
+ },
3815
+ sm: {
3816
+ base: (prev) => [prev, "gap-0.5", "px-2"].join(" "),
3817
+ segment: "data-[segment=day]:w-6 data-[segment=month]:w-6 data-[segment=year]:w-9"
3818
+ },
3819
+ md: {
3820
+ base: (prev) => [prev, "gap-0.5", "px-3"].join(" "),
3821
+ segment: "data-[segment=day]:w-7 data-[segment=month]:w-7 data-[segment=year]:w-11"
3822
+ },
3823
+ lg: {
3824
+ base: (prev) => [prev, "gap-0.75", "px-3"].join(" "),
3825
+ segment: "data-[segment=day]:w-7 data-[segment=month]:w-7 data-[segment=year]:w-11"
3826
+ },
3827
+ xl: {
3828
+ base: (prev) => [prev, "gap-0.75", "px-3"].join(" "),
3829
+ segment: "data-[segment=day]:w-8 data-[segment=month]:w-8 data-[segment=year]:w-13"
3830
+ }
3831
+ }
3832
+ },
3833
+ compoundVariants: []
3834
+ }, input);
3835
+ };
3836
+
3771
3837
  const inputMenu = () => {
3772
3838
  return defuFn({
3773
3839
  slots: {
@@ -4756,6 +4822,72 @@ function replaceFocus$2(str) {
4756
4822
  return str.replace(/focus:/g, "has-focus:").replace(/focus-visible:/g, "has-focus-visible:");
4757
4823
  }
4758
4824
 
4825
+ const inputTime = () => {
4826
+ return defuFn({
4827
+ slots: {
4828
+ root: () => void 0,
4829
+ base: () => [
4830
+ "group",
4831
+ "relative",
4832
+ "inline-flex items-center",
4833
+ "select-none",
4834
+ "transition-colors",
4835
+ "style-blurred-bg-input"
4836
+ ].join(" "),
4837
+ segment: [
4838
+ "rounded",
4839
+ "text-center",
4840
+ "outline-hidden",
4841
+ "text-(--ui-color-base-1)",
4842
+ "data-placeholder:text-(--ui-color-design-plain-na-content-secondary)",
4843
+ "hover:text-(--ui-color-base-1)",
4844
+ "focus:text-(--ui-color-base-1)",
4845
+ "active:text-(--ui-color-base-1)",
4846
+ "font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-regular)",
4847
+ "align-middle",
4848
+ "data-[segment=literal]:text-(--ui-color-base-6)",
4849
+ "data-invalid:text-(--ui-color-accent-main-alert)",
4850
+ "data-disabled:cursor-not-allowed",
4851
+ "data-disabled:pointer-events-none",
4852
+ "data-disabled:select-none",
4853
+ "data-disabled:opacity-30",
4854
+ "data-disabled:resize-none",
4855
+ "transition-colors",
4856
+ "focus:bg-(--ui-color-bg-content-secondary)"
4857
+ ].join(" ")
4858
+ },
4859
+ variants: {
4860
+ size: {
4861
+ xss: {
4862
+ base: (prev) => [prev, "gap-0.20", "px-1"].join(" "),
4863
+ segment: "not-data-[segment=literal]:w-6"
4864
+ },
4865
+ xs: {
4866
+ base: (prev) => [prev, "gap-0.25", "px-2"].join(" "),
4867
+ segment: "not-data-[segment=literal]:w-6"
4868
+ },
4869
+ sm: {
4870
+ base: (prev) => [prev, "gap-0.5", "px-2"].join(" "),
4871
+ segment: "not-data-[segment=literal]:w-6"
4872
+ },
4873
+ md: {
4874
+ base: (prev) => [prev, "gap-0.5", "px-3"].join(" "),
4875
+ segment: "not-data-[segment=literal]:w-7"
4876
+ },
4877
+ lg: {
4878
+ base: (prev) => [prev, "gap-0.75", "px-3"].join(" "),
4879
+ segment: "not-data-[segment=literal]:w-7"
4880
+ },
4881
+ xl: {
4882
+ base: (prev) => [prev, "gap-0.75", "px-3"].join(" "),
4883
+ segment: "not-data-[segment=literal]:w-8"
4884
+ }
4885
+ }
4886
+ },
4887
+ compoundVariants: []
4888
+ }, input);
4889
+ };
4890
+
4759
4891
  const kbd$1 = {
4760
4892
  slots: {
4761
4893
  base: [
@@ -9021,9 +9153,11 @@ const theme = {
9021
9153
  form: form,
9022
9154
  formField: formField,
9023
9155
  input: input,
9156
+ inputDate: inputDate,
9024
9157
  inputMenu: inputMenu,
9025
9158
  inputNumber: inputNumber,
9026
9159
  inputTags: inputTags,
9160
+ inputTime: inputTime,
9027
9161
  kbd: kbd$1,
9028
9162
  link: link,
9029
9163
  modal: modal,
@@ -9903,7 +10037,7 @@ const pre = {
9903
10037
  "text-(length:--ui-font-size-md)/(--ui-font-line-height-md)",
9904
10038
  "font-[family-name:var(--ui-font-family-system-mono)]",
9905
10039
  "border border-(--ui-color-design-tinted-na-stroke)",
9906
- "bg-(--ui-color-gray-90) dark:bg-(--ui-color-gray-90)/20",
10040
+ "bg-(--ui-color-gray-90) dark:bg-(--ui-color-gray-90)/20 light:bg-(--ui-color-gray-90)",
9907
10041
  "rounded-(--ui-border-radius-md)",
9908
10042
  "px-4 py-3",
9909
10043
  "whitespace-pre-wrap",
package/dist/unplugin.mjs CHANGED
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { g as getTemplates, d as defaultOptions, a as getDefaultConfig } from './shared/b24ui-nuxt.4XNR9Ysu.mjs';
6
+ import { g as getTemplates, d as defaultOptions, a as getDefaultConfig } from './shared/b24ui-nuxt.B13KxxqP.mjs';
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
9
  import MagicString from 'magic-string';
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/b24ui-nuxt.4XNR9Ysu.mjs';
7
+ import './shared/b24ui-nuxt.B13KxxqP.mjs';
8
8
  import 'scule';
9
9
  import 'knitwork';
10
10
  import '@nuxt/kit';