@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
@@ -4,17 +4,63 @@
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 "../Button.vue";
11
13
  defineOptions({ inheritAttrs: false });
12
- defineProps({
13
- color: { type: null, required: false, default: "air-tertiary-no-accent" }
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 }
14
59
  });
15
60
  defineSlots();
16
61
  const { t } = useLocale();
17
62
  const colorMode = useColorMode();
63
+ const buttonProps = useForwardProps(reactiveOmit(props, "icon"));
18
64
  const isDark = computed({
19
65
  get() {
20
66
  return colorMode.value === "dark";
@@ -28,10 +74,12 @@ const isDark = computed({
28
74
  <template>
29
75
  <ClientOnly v-if="!colorMode?.forced">
30
76
  <B24Button
31
- :icon="isDark ? icons.dark : icons.light"
32
- :color="color"
33
- :aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
34
- v-bind="$attrs"
77
+ v-bind="{
78
+ ...buttonProps,
79
+ 'icon': props.icon || (isDark ? icons.dark : icons.light),
80
+ 'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
81
+ ...$attrs
82
+ }"
35
83
  @click="isDark = !isDark"
36
84
  />
37
85
 
@@ -1,12 +1,12 @@
1
- import type { ButtonProps } from '@bitrix24/b24ui-nuxt';
2
- export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'b24ui'> {
1
+ import type { ButtonProps } from '../../types';
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: __VLS_WithSlots<import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
9
- color: ButtonProps["color"];
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
  fallback(props?: {}): any;
12
12
  }>;
@@ -1,7 +1,8 @@
1
- type __VLS_Props = {
1
+ import type { ImgHTMLAttributes } from '../../types/html';
2
+ export interface ColorModeImageProps extends /** @vue-ignore */ Omit<ImgHTMLAttributes, 'src'> {
2
3
  dark: string;
3
4
  light: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<ColorModeImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
7
  declare const _default: typeof __VLS_export;
7
8
  export default _default;
@@ -1,3 +1,7 @@
1
+ <script>
2
+
3
+ </script>
4
+
1
5
  <script setup>
2
6
  import ImageComponent from "#build/b24ui-image-component";
3
7
  defineOptions({ inheritAttrs: false });
@@ -1,7 +1,8 @@
1
- type __VLS_Props = {
1
+ import type { ImgHTMLAttributes } from '../../types/html';
2
+ export interface ColorModeImageProps extends /** @vue-ignore */ Omit<ImgHTMLAttributes, 'src'> {
2
3
  dark: string;
3
4
  light: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<ColorModeImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
7
  declare const _default: typeof __VLS_export;
7
8
  export default _default;
@@ -1,6 +1,8 @@
1
- import type { SelectMenuProps } from '@bitrix24/b24ui-nuxt';
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("../Input.vue").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 "../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,18 +75,16 @@ const preference = computed({
31
75
  <ClientOnly v-if="!colorMode?.forced">
32
76
  <B24SelectMenu
33
77
  v-model="preference"
34
- :search-input="false"
35
78
  :icon="preference?.icon"
36
- v-bind="$attrs"
79
+ v-bind="{ ...selectMenuProps, ...$attrs }"
37
80
  :items="items"
38
81
  />
39
82
 
40
83
  <template #fallback>
41
84
  <B24SelectMenu
42
- :search-input="false"
43
85
  :icon="items[0]?.icon"
44
- v-bind="$attrs"
45
86
  :model-value="items[0]"
87
+ v-bind="{ ...selectMenuProps, ...$attrs }"
46
88
  :items="items"
47
89
  disabled
48
90
  />
@@ -1,6 +1,8 @@
1
- import type { SelectMenuProps } from '@bitrix24/b24ui-nuxt';
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("../Input.vue").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
- import type { SwitchProps } from '@bitrix24/b24ui-nuxt';
2
- export interface ColorModeSwitchProps extends /** @vue-ignore */ Pick<SwitchProps, 'as' | 'color' | 'size' | 'disabled' | 'b24ui'> {
1
+ import type { SwitchProps } from '../../types';
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 "../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";
@@ -28,16 +46,22 @@ const isDark = computed({
28
46
  v-model="isDark"
29
47
  :checked-icon="icons.dark"
30
48
  :unchecked-icon="icons.light"
31
- :aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
32
- v-bind="$attrs"
49
+ v-bind="{
50
+ ...switchProps,
51
+ 'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
52
+ ...$attrs
53
+ }"
33
54
  />
34
55
 
35
56
  <template #fallback>
36
57
  <B24Switch
37
58
  :checked-icon="icons.dark"
38
59
  :unchecked-icon="icons.light"
39
- :aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
40
- v-bind="$attrs"
60
+ v-bind="{
61
+ ...switchProps,
62
+ 'aria-label': isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark'),
63
+ ...$attrs
64
+ }"
41
65
  disabled
42
66
  />
43
67
  </template>
@@ -1,5 +1,5 @@
1
- import type { SwitchProps } from '@bitrix24/b24ui-nuxt';
2
- export interface ColorModeSwitchProps extends /** @vue-ignore */ Pick<SwitchProps, 'as' | 'color' | 'size' | 'disabled' | 'b24ui'> {
1
+ import type { SwitchProps } from '../../types';
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;
@@ -28,6 +28,9 @@ export interface ContentSearchItem extends Omit<LinkProps, 'custom'>, CommandPal
28
28
  */
29
29
  icon?: IconComponent;
30
30
  }
31
+ /**
32
+ * @memo not use loadingIcon
33
+ */
31
34
  export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'> {
32
35
  /**
33
36
  * The icon displayed in the input.
@@ -47,12 +50,6 @@ export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchL
47
50
  autofocus?: boolean;
48
51
  /** When `true`, the loading icon will be displayed. */
49
52
  loading?: boolean;
50
- /**
51
- * The icon when the `loading` prop is `true`.
52
- * @defaultValue icons.loading
53
- * @IconComponent
54
- */
55
- loadingIcon?: IconComponent;
56
53
  /**
57
54
  * Display a close button in the input (useful when inside a Modal for example).
58
55
  * `{ size: 'sm', color: 'air-tertiary-no-accent' }`{lang="ts-type"}
@@ -20,7 +20,6 @@ const props = defineProps({
20
20
  placeholder: { type: String, required: false },
21
21
  autofocus: { type: Boolean, required: false },
22
22
  loading: { type: Boolean, required: false },
23
- loadingIcon: { type: [Function, Object], required: false },
24
23
  close: { type: [Boolean, Object], required: false, default: true },
25
24
  closeIcon: { type: [Function, Object], required: false },
26
25
  shortcut: { type: String, required: false, default: "meta_k" },
@@ -48,7 +47,7 @@ const { t } = useLocale();
48
47
  const { open } = useContentSearch();
49
48
  const colorMode = useColorMode();
50
49
  const appConfig = useAppConfig();
51
- const commandPaletteProps = useForwardProps(reactivePick(props, "icon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon"));
50
+ const commandPaletteProps = useForwardProps(reactivePick(props, "icon", "placeholder", "autofocus", "loading", "close", "closeIcon"));
52
51
  const modalProps = useForwardProps(reactivePick(props, "overlay", "transition", "content", "dismissible", "fullscreen", "modal", "portal"));
53
52
  const getProxySlots = () => omit(slots, ["content"]);
54
53
  const fuse = computed(() => defu({}, props.fuse, {
@@ -59,6 +58,7 @@ const fuse = computed(() => defu({}, props.fuse, {
59
58
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.contentSearch || {} })({
60
59
  fullscreen: props.fullscreen
61
60
  }));
61
+ const commandPaletteRef = useTemplateRef("commandPaletteRef");
62
62
  function mapLinksItems(links) {
63
63
  return links.flatMap((link) => [{
64
64
  ...link,
@@ -158,7 +158,6 @@ defineShortcuts({
158
158
  handler: () => open.value = !open.value
159
159
  }
160
160
  });
161
- const commandPaletteRef = useTemplateRef("commandPaletteRef");
162
161
  defineExpose({
163
162
  commandPaletteRef
164
163
  });
@@ -28,6 +28,9 @@ export interface ContentSearchItem extends Omit<LinkProps, 'custom'>, CommandPal
28
28
  */
29
29
  icon?: IconComponent;
30
30
  }
31
+ /**
32
+ * @memo not use loadingIcon
33
+ */
31
34
  export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchLink> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'> {
32
35
  /**
33
36
  * The icon displayed in the input.
@@ -47,12 +50,6 @@ export interface ContentSearchProps<T extends ContentSearchLink = ContentSearchL
47
50
  autofocus?: boolean;
48
51
  /** When `true`, the loading icon will be displayed. */
49
52
  loading?: boolean;
50
- /**
51
- * The icon when the `loading` prop is `true`.
52
- * @defaultValue icons.loading
53
- * @IconComponent
54
- */
55
- loadingIcon?: IconComponent;
56
53
  /**
57
54
  * Display a close button in the input (useful when inside a Modal for example).
58
55
  * `{ size: 'sm', color: 'air-tertiary-no-accent' }`{lang="ts-type"}
@@ -3,7 +3,7 @@ import theme from '#build/b24ui/content/content-search-button';
3
3
  import type { ButtonProps, ButtonSlots, IconComponent, KbdProps, TooltipProps } from '../../types';
4
4
  import type { ComponentConfig } from '../../types/tv';
5
5
  type ContentSearchButton = ComponentConfig<typeof theme, AppConfig, 'contentSearchButton'>;
6
- export interface ContentSearchButtonProps {
6
+ export interface ContentSearchButtonProps extends Omit<ButtonProps, 'icon' | 'label' | 'color'> {
7
7
  /**
8
8
  * The icon displayed in the button.
9
9
  * @defaultValue icons.search
@@ -20,7 +20,6 @@ export interface ContentSearchButtonProps {
20
20
  * @defaultValue 'air-tertiary-no-accent'
21
21
  */
22
22
  color?: ButtonProps['color'];
23
- size?: ButtonProps['size'];
24
23
  /**
25
24
  * Whether the button is collapsed.
26
25
  * @defaultValue true
@@ -41,7 +40,7 @@ export interface ContentSearchButtonProps {
41
40
  class?: any;
42
41
  }
43
42
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ContentSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContentSearchButtonProps> & Readonly<{}>, {
44
- 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";
43
+ 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";
45
44
  tooltip: boolean | TooltipProps;
46
45
  kbds: KbdProps["value"][] | KbdProps[];
47
46
  collapsed: boolean;
@@ -6,7 +6,7 @@ import theme from "#build/b24ui/content/content-search-button";
6
6
  import { computed, toRef } from "vue";
7
7
  import { useForwardProps } from "reka-ui";
8
8
  import { defu } from "defu";
9
- import { reactivePick, createReusableTemplate } from "@vueuse/core";
9
+ import { reactiveOmit, createReusableTemplate } from "@vueuse/core";
10
10
  import { useAppConfig } from "#imports";
11
11
  import { useContentSearch } from "../../composables/useContentSearch";
12
12
  import { useLocale } from "../../composables/useLocale";
@@ -21,17 +21,55 @@ const props = defineProps({
21
21
  icon: { type: [Function, Object], required: false },
22
22
  label: { type: String, required: false },
23
23
  color: { type: null, required: false, default: "air-tertiary-no-accent" },
24
- size: { type: null, required: false },
25
24
  collapsed: { type: Boolean, required: false, default: true },
26
25
  tooltip: { type: [Boolean, Object], required: false, default: false },
27
26
  kbds: { type: Array, required: false, default: () => ["meta", "k"] },
28
27
  b24ui: { type: void 0, required: false },
29
- class: { type: null, required: false }
28
+ class: { type: null, required: false },
29
+ activeColor: { type: null, required: false },
30
+ depth: { type: null, required: false },
31
+ activeDepth: { type: null, required: false },
32
+ size: { type: null, required: false },
33
+ rounded: { type: Boolean, required: false },
34
+ block: { type: Boolean, required: false },
35
+ loadingAuto: { type: Boolean, required: false },
36
+ normalCase: { type: Boolean, required: false },
37
+ useWait: { type: Boolean, required: false },
38
+ useClock: { type: Boolean, required: false },
39
+ useDropdown: { type: Boolean, required: false },
40
+ onClick: { type: [Function, Array], required: false },
41
+ activeClass: { type: String, required: false },
42
+ inactiveClass: { type: String, required: false },
43
+ avatar: { type: Object, required: false },
44
+ loading: { type: Boolean, required: false },
45
+ as: { type: null, required: false },
46
+ type: { type: null, required: false },
47
+ disabled: { type: Boolean, required: false },
48
+ active: { type: Boolean, required: false },
49
+ exact: { type: Boolean, required: false },
50
+ exactQuery: { type: [Boolean, String], required: false },
51
+ exactHash: { type: Boolean, required: false },
52
+ isAction: { type: Boolean, required: false },
53
+ to: { type: null, required: false },
54
+ href: { type: null, required: false },
55
+ external: { type: Boolean, required: false },
56
+ target: { type: [String, Object, null], required: false },
57
+ rel: { type: [String, Object, null], required: false },
58
+ noRel: { type: Boolean, required: false },
59
+ prefetchedClass: { type: String, required: false },
60
+ prefetch: { type: Boolean, required: false },
61
+ prefetchOn: { type: [String, Object], required: false },
62
+ noPrefetch: { type: Boolean, required: false },
63
+ trailingSlash: { type: String, required: false },
64
+ exactActiveClass: { type: String, required: false },
65
+ ariaCurrentValue: { type: String, required: false },
66
+ viewTransition: { type: Boolean, required: false },
67
+ replace: { type: Boolean, required: false }
30
68
  });
31
69
  const slots = defineSlots();
32
70
  const [DefineButtonTemplate, ReuseButtonTemplate] = createReusableTemplate();
33
71
  const getProxySlots = () => omit(slots, ["trailing"]);
34
- const rootProps = useForwardProps(reactivePick(props, "color", "size"));
72
+ const buttonProps = useForwardProps(reactiveOmit(props, "icon", "label", "collapsed", "tooltip", "kbds", "class", "b24ui"));
35
73
  const tooltipProps = toRef(() => defu(typeof props.tooltip === "boolean" ? {} : props.tooltip, { delayDuration: 0, content: { side: "right" } }));
36
74
  const { t } = useLocale();
37
75
  const { open } = useContentSearch();
@@ -45,7 +83,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.content
45
83
  :icon="icon || icons.search"
46
84
  :label="label || t('contentSearchButton.label')"
47
85
  v-bind="{
48
- ...rootProps,
86
+ ...buttonProps,
49
87
  ...collapsed ? {
50
88
  'label': void 0,
51
89
  'aria-label': label || t('contentSearchButton.label')
@@ -3,7 +3,7 @@ import theme from '#build/b24ui/content/content-search-button';
3
3
  import type { ButtonProps, ButtonSlots, IconComponent, KbdProps, TooltipProps } from '../../types';
4
4
  import type { ComponentConfig } from '../../types/tv';
5
5
  type ContentSearchButton = ComponentConfig<typeof theme, AppConfig, 'contentSearchButton'>;
6
- export interface ContentSearchButtonProps {
6
+ export interface ContentSearchButtonProps extends Omit<ButtonProps, 'icon' | 'label' | 'color'> {
7
7
  /**
8
8
  * The icon displayed in the button.
9
9
  * @defaultValue icons.search
@@ -20,7 +20,6 @@ export interface ContentSearchButtonProps {
20
20
  * @defaultValue 'air-tertiary-no-accent'
21
21
  */
22
22
  color?: ButtonProps['color'];
23
- size?: ButtonProps['size'];
24
23
  /**
25
24
  * Whether the button is collapsed.
26
25
  * @defaultValue true
@@ -41,7 +40,7 @@ export interface ContentSearchButtonProps {
41
40
  class?: any;
42
41
  }
43
42
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ContentSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContentSearchButtonProps> & Readonly<{}>, {
44
- 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";
43
+ 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";
45
44
  tooltip: boolean | TooltipProps;
46
45
  kbds: KbdProps["value"][] | KbdProps[];
47
46
  collapsed: boolean;
@@ -21,7 +21,13 @@ const props = defineProps({
21
21
  });
22
22
  defineSlots();
23
23
  const appConfig = useAppConfig();
24
- const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate();
24
+ const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate({
25
+ props: {
26
+ link: Object,
27
+ icon: [Object, Function],
28
+ direction: String
29
+ }
30
+ });
25
31
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.contentSurround || {} })());
26
32
  </script>
27
33
 
@@ -1,16 +1,20 @@
1
- import type { SelectMenuProps } from '@bitrix24/b24ui-nuxt';
1
+ import type { SelectMenuProps } from '../SelectMenu.vue';
2
2
  import type { Locale } from '../../types/locale';
3
- export interface LocaleSelectProps extends /** @vue-ignore */ Pick<SelectMenuProps<any>, 'color' | 'size' | 'trailingIcon' | 'selectedIcon' | 'content' | 'arrow' | 'portal' | 'disabled' | 'b24ui'> {
3
+ export interface LocaleSelectProps extends Omit<SelectMenuProps<Locale<any>[], 'code', false>, 'items' | 'modelValue'> {
4
4
  locales?: Locale<any>[];
5
5
  }
6
6
  declare const __VLS_export: import("vue").DefineComponent<LocaleSelectProps & {
7
- modelValue?: string;
7
+ modelValue: string;
8
8
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- "update:modelValue": (value: string | undefined) => any;
9
+ "update:modelValue": (value: string) => any;
10
10
  }, string, import("vue").PublicProps, Readonly<LocaleSelectProps & {
11
- modelValue?: string;
11
+ modelValue: string;
12
12
  }> & Readonly<{
13
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
14
+ }>, {
15
+ labelKey: string;
16
+ valueKey: "code";
17
+ searchInput: boolean | import("../Input.vue").InputProps;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
19
  declare const _default: typeof __VLS_export;
16
20
  export default _default;