@bitrix24/b24ui-nuxt 0.5.10 → 0.6.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 (101) hide show
  1. package/.nuxt/b24ui/input-menu.ts +2 -2
  2. package/.nuxt/b24ui/select-menu.ts +4 -4
  3. package/.nuxt/b24ui/select.ts +2 -2
  4. package/dist/meta.d.mts +148 -1
  5. package/dist/meta.mjs +148 -1
  6. package/dist/module.json +2 -2
  7. package/dist/module.mjs +2 -2
  8. package/dist/runtime/components/Advice.vue +10 -30
  9. package/dist/runtime/components/Alert.vue +17 -53
  10. package/dist/runtime/components/App.vue +9 -22
  11. package/dist/runtime/components/Avatar.vue +12 -38
  12. package/dist/runtime/components/AvatarGroup.vue +7 -20
  13. package/dist/runtime/components/Badge.vue +18 -61
  14. package/dist/runtime/components/Button.vue +55 -177
  15. package/dist/runtime/components/ButtonGroup.vue +6 -22
  16. package/dist/runtime/components/Calendar.vue +38 -151
  17. package/dist/runtime/components/Checkbox.vue +17 -59
  18. package/dist/runtime/components/Chip.vue +11 -44
  19. package/dist/runtime/components/Collapsible.vue +8 -30
  20. package/dist/runtime/components/Container.vue +3 -8
  21. package/dist/runtime/components/Countdown.vue +15 -60
  22. package/dist/runtime/components/DescriptionList.vue +10 -34
  23. package/dist/runtime/components/DropdownMenu.vue +16 -61
  24. package/dist/runtime/components/DropdownMenuContent.vue +41 -106
  25. package/dist/runtime/components/Form.vue +12 -45
  26. package/dist/runtime/components/FormField.vue +16 -56
  27. package/dist/runtime/components/Input.vue +29 -110
  28. package/dist/runtime/components/InputMenu.vue +76 -192
  29. package/dist/runtime/components/InputMenu.vue.d.ts +25 -6
  30. package/dist/runtime/components/InputNumber.vue +35 -136
  31. package/dist/runtime/components/Kbd.vue +6 -21
  32. package/dist/runtime/components/Link.vue +28 -115
  33. package/dist/runtime/components/LinkBase.vue +11 -42
  34. package/dist/runtime/components/Modal.vue +20 -77
  35. package/dist/runtime/components/ModalDialogClose.vue +1 -0
  36. package/dist/runtime/components/Navbar.vue +4 -13
  37. package/dist/runtime/components/NavbarDivider.vue +4 -13
  38. package/dist/runtime/components/NavbarSection.vue +4 -13
  39. package/dist/runtime/components/NavbarSpacer.vue +4 -13
  40. package/dist/runtime/components/NavigationMenu.vue +39 -107
  41. package/dist/runtime/components/OverlayProvider.vue +1 -1
  42. package/dist/runtime/components/Popover.vue +12 -53
  43. package/dist/runtime/components/Progress.vue +13 -52
  44. package/dist/runtime/components/RadioGroup.vue +20 -81
  45. package/dist/runtime/components/Range.vue +16 -64
  46. package/dist/runtime/components/Select.vue +39 -141
  47. package/dist/runtime/components/Select.vue.d.ts +1 -0
  48. package/dist/runtime/components/SelectMenu.vue +79 -172
  49. package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
  50. package/dist/runtime/components/Separator.vue +13 -46
  51. package/dist/runtime/components/Sidebar.vue +4 -13
  52. package/dist/runtime/components/SidebarBody.vue +5 -18
  53. package/dist/runtime/components/SidebarFooter.vue +4 -13
  54. package/dist/runtime/components/SidebarHeader.vue +4 -13
  55. package/dist/runtime/components/SidebarHeading.vue +4 -13
  56. package/dist/runtime/components/SidebarLayout.vue +12 -18
  57. package/dist/runtime/components/SidebarSection.vue +4 -13
  58. package/dist/runtime/components/SidebarSpacer.vue +4 -13
  59. package/dist/runtime/components/Skeleton.vue +3 -8
  60. package/dist/runtime/components/Slideover.vue +20 -78
  61. package/dist/runtime/components/StackedLayout.vue +12 -18
  62. package/dist/runtime/components/Switch.vue +21 -75
  63. package/dist/runtime/components/Tabs.vue +22 -64
  64. package/dist/runtime/components/Textarea.vue +30 -115
  65. package/dist/runtime/components/Toast.vue +20 -67
  66. package/dist/runtime/components/Toaster.vue +15 -38
  67. package/dist/runtime/components/Tooltip.vue +16 -58
  68. package/dist/runtime/components/content/TableWrapper.vue +12 -46
  69. package/dist/runtime/composables/useFormField.d.ts +1 -1
  70. package/dist/runtime/composables/useOverlay.d.ts +14 -7
  71. package/dist/runtime/composables/useOverlay.js +14 -6
  72. package/dist/runtime/prose/A.vue +2 -8
  73. package/dist/runtime/prose/Blockquote.vue +2 -8
  74. package/dist/runtime/prose/Code.vue +3 -12
  75. package/dist/runtime/prose/Em.vue +2 -8
  76. package/dist/runtime/prose/H1.vue +2 -8
  77. package/dist/runtime/prose/H2.vue +2 -8
  78. package/dist/runtime/prose/H3.vue +2 -8
  79. package/dist/runtime/prose/H4.vue +2 -8
  80. package/dist/runtime/prose/H5.vue +2 -8
  81. package/dist/runtime/prose/H6.vue +2 -8
  82. package/dist/runtime/prose/Hr.vue +2 -8
  83. package/dist/runtime/prose/Img.vue +2 -8
  84. package/dist/runtime/prose/Li.vue +2 -8
  85. package/dist/runtime/prose/Ol.vue +2 -8
  86. package/dist/runtime/prose/P.vue +2 -8
  87. package/dist/runtime/prose/Pre.vue +5 -17
  88. package/dist/runtime/prose/Strong.vue +2 -8
  89. package/dist/runtime/prose/Table.vue +8 -33
  90. package/dist/runtime/prose/Tbody.vue +2 -8
  91. package/dist/runtime/prose/Td.vue +2 -8
  92. package/dist/runtime/prose/Th.vue +2 -8
  93. package/dist/runtime/prose/Thead.vue +2 -8
  94. package/dist/runtime/prose/Tr.vue +2 -8
  95. package/dist/runtime/prose/Ul.vue +2 -8
  96. package/dist/runtime/utils/link.d.ts +3 -3
  97. package/dist/runtime/vue/components/Link.vue +29 -115
  98. package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
  99. package/dist/unplugin.mjs +1 -1
  100. package/dist/vite.mjs +1 -1
  101. package/package.json +11 -7
@@ -7,20 +7,11 @@ const sidebarHeader = tv({ extend: tv(theme), ...appConfigSidebarHeader.b24ui?.s
7
7
  </script>
8
8
 
9
9
  <script setup>
10
+ import { Primitive } from "reka-ui";
10
11
  const props = defineProps({
11
- as: {
12
- type: null,
13
- required: false,
14
- default: "div"
15
- },
16
- class: {
17
- type: null,
18
- required: false
19
- },
20
- b24ui: {
21
- type: Object,
22
- required: false
23
- }
12
+ as: { type: null, required: false, default: "div" },
13
+ class: { type: null, required: false },
14
+ b24ui: { type: Object, required: false }
24
15
  });
25
16
  defineSlots();
26
17
  const b24ui = sidebarHeader();
@@ -7,20 +7,11 @@ const sidebarHeading = tv({ extend: tv(theme), ...appConfigSidebarHeading.b24ui?
7
7
  </script>
8
8
 
9
9
  <script setup>
10
+ import { Primitive } from "reka-ui";
10
11
  const props = defineProps({
11
- as: {
12
- type: null,
13
- required: false,
14
- default: "h6"
15
- },
16
- class: {
17
- type: null,
18
- required: false
19
- },
20
- b24ui: {
21
- type: Object,
22
- required: false
23
- }
12
+ as: { type: null, required: false, default: "h6" },
13
+ class: { type: null, required: false },
14
+ b24ui: { type: Object, required: false }
24
15
  });
25
16
  defineSlots();
26
17
  const b24ui = sidebarHeading();
@@ -2,31 +2,25 @@
2
2
  import _appConfig from "#build/app.config";
3
3
  import theme from "#build/b24ui/sidebar-layout";
4
4
  import { tv } from "../utils/tv";
5
+ import { useRoute } from "vue-router";
5
6
  const appConfigSidebarLayout = _appConfig;
6
7
  const sidebarLayout = tv({ extend: tv(theme), ...appConfigSidebarLayout.b24ui?.sidebarLayout || {} });
7
8
  </script>
8
9
 
9
10
  <script setup>
10
11
  import { ref, computed, watch, onUnmounted } from "vue";
12
+ import { Primitive } from "reka-ui";
13
+ import B24Slideover from "./Slideover.vue";
14
+ import B24Sidebar from "./Sidebar.vue";
15
+ import B24ModalDialogClose from "./ModalDialogClose.vue";
16
+ import B24Navbar from "./Navbar.vue";
17
+ import MenuIcon from "@bitrix24/b24icons-vue/main/MenuIcon";
18
+ import Cross50Icon from "@bitrix24/b24icons-vue/actions/Cross50Icon";
11
19
  const props = defineProps({
12
- as: {
13
- type: null,
14
- required: false,
15
- default: "div"
16
- },
17
- useLightContent: {
18
- type: Boolean,
19
- required: false,
20
- default: true
21
- },
22
- class: {
23
- type: null,
24
- required: false
25
- },
26
- b24ui: {
27
- type: Object,
28
- required: false
29
- }
20
+ as: { type: null, required: false, default: "div" },
21
+ useLightContent: { type: Boolean, required: false, default: true },
22
+ class: { type: null, required: false },
23
+ b24ui: { type: Object, required: false }
30
24
  });
31
25
  const slots = defineSlots();
32
26
  const route = useRoute();
@@ -7,20 +7,11 @@ const sidebarSection = tv({ extend: tv(theme), ...appConfigSidebarSection.b24ui?
7
7
  </script>
8
8
 
9
9
  <script setup>
10
+ import { Primitive } from "reka-ui";
10
11
  const props = defineProps({
11
- as: {
12
- type: null,
13
- required: false,
14
- default: "div"
15
- },
16
- class: {
17
- type: null,
18
- required: false
19
- },
20
- b24ui: {
21
- type: Object,
22
- required: false
23
- }
12
+ as: { type: null, required: false, default: "div" },
13
+ class: { type: null, required: false },
14
+ b24ui: { type: Object, required: false }
24
15
  });
25
16
  defineSlots();
26
17
  const b24ui = sidebarSection();
@@ -7,20 +7,11 @@ const sidebarSpacer = tv({ extend: tv(theme), ...appConfigSidebarSpacer.b24ui?.s
7
7
  </script>
8
8
 
9
9
  <script setup>
10
+ import { Primitive } from "reka-ui";
10
11
  const props = defineProps({
11
- as: {
12
- type: null,
13
- required: false,
14
- default: "div"
15
- },
16
- class: {
17
- type: null,
18
- required: false
19
- },
20
- b24ui: {
21
- type: Object,
22
- required: false
23
- }
12
+ as: { type: null, required: false, default: "div" },
13
+ class: { type: null, required: false },
14
+ b24ui: { type: Object, required: false }
24
15
  });
25
16
  defineSlots();
26
17
  const b24ui = sidebarSpacer();
@@ -7,15 +7,10 @@ const skeleton = tv({ extend: tv(theme), ...appConfigSkeleton.b24ui?.skeleton ||
7
7
  </script>
8
8
 
9
9
  <script setup>
10
+ import { Primitive } from "reka-ui";
10
11
  const props = defineProps({
11
- as: {
12
- type: null,
13
- required: false
14
- },
15
- class: {
16
- type: null,
17
- required: false
18
- }
12
+ as: { type: null, required: false },
13
+ class: { type: null, required: false }
19
14
  });
20
15
  </script>
21
16
 
@@ -8,87 +8,29 @@ const slideover = tv({ extend: tv(theme), ...appConfigSlideover.b24ui?.slideover
8
8
 
9
9
  <script setup>
10
10
  import { computed, toRef } from "vue";
11
- import { useForwardPropsEmits } from "reka-ui";
11
+ import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } from "reka-ui";
12
12
  import { reactivePick } from "@vueuse/core";
13
13
  import { useLocale } from "../composables/useLocale";
14
+ import icons from "../dictionary/icons";
15
+ import B24Button from "./Button.vue";
14
16
  const props = defineProps({
15
- title: {
16
- type: String,
17
- required: false
18
- },
19
- description: {
20
- type: String,
21
- required: false
22
- },
23
- content: {
24
- type: Object,
25
- required: false
26
- },
27
- overlay: {
28
- type: Boolean,
29
- required: false,
30
- default: true
31
- },
32
- overlayBlur: {
33
- type: null,
34
- required: false,
35
- default: "auto"
36
- },
37
- transition: {
38
- type: Boolean,
39
- required: false,
40
- default: true
41
- },
42
- side: {
43
- type: null,
44
- required: false,
45
- default: "right"
46
- },
47
- portal: {
48
- type: Boolean,
49
- required: false,
50
- default: true
51
- },
52
- close: {
53
- type: [Boolean, Object],
54
- required: false,
55
- default: true
56
- },
57
- closeIcon: {
58
- type: [Function, Object],
59
- required: false
60
- },
61
- dismissible: {
62
- type: Boolean,
63
- required: false,
64
- default: true
65
- },
66
- scrollbarThin: {
67
- type: Boolean,
68
- required: false,
69
- default: true
70
- },
71
- class: {
72
- type: null,
73
- required: false
74
- },
75
- b24ui: {
76
- type: Object,
77
- required: false
78
- },
79
- open: {
80
- type: Boolean,
81
- required: false
82
- },
83
- defaultOpen: {
84
- type: Boolean,
85
- required: false
86
- },
87
- modal: {
88
- type: Boolean,
89
- required: false,
90
- default: true
91
- }
17
+ title: { type: String, required: false },
18
+ description: { type: String, required: false },
19
+ content: { type: Object, required: false },
20
+ overlay: { type: Boolean, required: false, default: true },
21
+ overlayBlur: { type: null, required: false, default: "auto" },
22
+ transition: { type: Boolean, required: false, default: true },
23
+ side: { type: null, required: false, default: "right" },
24
+ portal: { type: Boolean, required: false, default: true },
25
+ close: { type: [Boolean, Object], required: false, default: true },
26
+ closeIcon: { type: [Function, Object], required: false },
27
+ dismissible: { type: Boolean, required: false, default: true },
28
+ scrollbarThin: { type: Boolean, required: false, default: true },
29
+ class: { type: null, required: false },
30
+ b24ui: { type: Object, required: false },
31
+ open: { type: Boolean, required: false },
32
+ defaultOpen: { type: Boolean, required: false },
33
+ modal: { type: Boolean, required: false, default: true }
92
34
  });
93
35
  const emits = defineEmits(["after:leave", "update:open"]);
94
36
  const slots = defineSlots();
@@ -2,31 +2,25 @@
2
2
  import _appConfig from "#build/app.config";
3
3
  import theme from "#build/b24ui/stacked-layout";
4
4
  import { tv } from "../utils/tv";
5
+ import { useRoute } from "vue-router";
5
6
  const appConfigStackedLayout = _appConfig;
6
7
  const stackedLayout = tv({ extend: tv(theme), ...appConfigStackedLayout.b24ui?.stackedLayout || {} });
7
8
  </script>
8
9
 
9
10
  <script setup>
10
11
  import { ref, computed, watch, onUnmounted } from "vue";
12
+ import { Primitive } from "reka-ui";
13
+ import B24Slideover from "./Slideover.vue";
14
+ import B24Sidebar from "./Sidebar.vue";
15
+ import B24ModalDialogClose from "./ModalDialogClose.vue";
16
+ import B24Navbar from "./Navbar.vue";
17
+ import MenuIcon from "@bitrix24/b24icons-vue/main/MenuIcon";
18
+ import Cross50Icon from "@bitrix24/b24icons-vue/actions/Cross50Icon";
11
19
  const props = defineProps({
12
- as: {
13
- type: null,
14
- required: false,
15
- default: "div"
16
- },
17
- useLightContent: {
18
- type: Boolean,
19
- required: false,
20
- default: true
21
- },
22
- class: {
23
- type: null,
24
- required: false
25
- },
26
- b24ui: {
27
- type: Object,
28
- required: false
29
- }
20
+ as: { type: null, required: false, default: "div" },
21
+ useLightContent: { type: Boolean, required: false, default: true },
22
+ class: { type: null, required: false },
23
+ b24ui: { type: Object, required: false }
30
24
  });
31
25
  const slots = defineSlots();
32
26
  const route = useRoute();
@@ -8,88 +8,34 @@ const switchTv = tv({ extend: tv(theme), ...appConfigSwitch.b24ui?.switch || {}
8
8
 
9
9
  <script setup>
10
10
  import { computed, useId } from "vue";
11
- import { useForwardProps } from "reka-ui";
11
+ import { Primitive, SwitchRoot, SwitchThumb, useForwardProps, Label } from "reka-ui";
12
12
  import { reactivePick } from "@vueuse/core";
13
13
  import { useFormField } from "../composables/useFormField";
14
+ import { omit } from "../utils";
15
+ import icons from "../dictionary/icons";
14
16
  defineOptions({ inheritAttrs: false });
15
17
  const props = defineProps({
16
- as: {
17
- type: null,
18
- required: false
19
- },
20
- color: {
21
- type: null,
22
- required: false
23
- },
24
- size: {
25
- type: null,
26
- required: false
27
- },
28
- loading: {
29
- type: Boolean,
30
- required: false
31
- },
32
- loadingIcon: {
33
- type: [Function, Object],
34
- required: false
35
- },
36
- checkedIcon: {
37
- type: [Function, Object],
38
- required: false
39
- },
40
- uncheckedIcon: {
41
- type: [Function, Object],
42
- required: false
43
- },
44
- label: {
45
- type: String,
46
- required: false
47
- },
48
- description: {
49
- type: String,
50
- required: false
51
- },
52
- class: {
53
- type: null,
54
- required: false
55
- },
56
- b24ui: {
57
- type: null,
58
- required: false
59
- },
60
- disabled: {
61
- type: Boolean,
62
- required: false
63
- },
64
- id: {
65
- type: String,
66
- required: false
67
- },
68
- name: {
69
- type: String,
70
- required: false
71
- },
72
- required: {
73
- type: Boolean,
74
- required: false
75
- },
76
- value: {
77
- type: String,
78
- required: false
79
- },
80
- defaultValue: {
81
- type: Boolean,
82
- required: false
83
- }
18
+ as: { type: null, required: false },
19
+ color: { type: null, required: false },
20
+ size: { type: null, required: false },
21
+ loading: { type: Boolean, required: false },
22
+ loadingIcon: { type: [Function, Object], required: false },
23
+ checkedIcon: { type: [Function, Object], required: false },
24
+ uncheckedIcon: { type: [Function, Object], required: false },
25
+ label: { type: String, required: false },
26
+ description: { type: String, required: false },
27
+ class: { type: null, required: false },
28
+ b24ui: { type: null, required: false },
29
+ disabled: { type: Boolean, required: false },
30
+ id: { type: String, required: false },
31
+ name: { type: String, required: false },
32
+ required: { type: Boolean, required: false },
33
+ value: { type: String, required: false },
34
+ defaultValue: { type: Boolean, required: false }
84
35
  });
85
36
  const slots = defineSlots();
86
37
  const emits = defineEmits(["change"]);
87
- const modelValue = defineModel({
88
- "type": Boolean,
89
- ...{
90
- default: void 0
91
- }
92
- });
38
+ const modelValue = defineModel({ type: Boolean, ...{ default: void 0 } });
93
39
  const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue"));
94
40
  const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
95
41
  const id = _id.value ?? useId();
@@ -8,74 +8,32 @@ const tabs = tv({ extend: tv(theme), ...appConfigTabs.b24ui?.tabs || {} });
8
8
 
9
9
  <script setup>
10
10
  import { computed } from "vue";
11
- import { useForwardPropsEmits } from "reka-ui";
11
+ import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent, useForwardPropsEmits } from "reka-ui";
12
12
  import { reactivePick } from "@vueuse/core";
13
+ import { get } from "../utils";
14
+ import B24Avatar from "./Avatar.vue";
13
15
  const props = defineProps({
14
- as: {
15
- type: null,
16
- required: false
17
- },
18
- items: {
19
- type: Array,
20
- required: false
21
- },
22
- color: {
23
- type: null,
24
- required: false
25
- },
26
- variant: {
27
- type: null,
28
- required: false
29
- },
30
- size: {
31
- type: null,
32
- required: false
33
- },
34
- orientation: {
35
- type: null,
36
- required: false,
37
- default: "horizontal"
38
- },
39
- content: {
40
- type: Boolean,
41
- required: false,
42
- default: true
43
- },
44
- labelKey: {
45
- type: String,
46
- required: false,
47
- default: "label"
48
- },
49
- class: {
50
- type: null,
51
- required: false
52
- },
53
- b24ui: {
54
- type: null,
55
- required: false
56
- },
57
- defaultValue: {
58
- type: null,
59
- required: false,
60
- default: "0"
61
- },
62
- modelValue: {
63
- type: null,
64
- required: false
65
- },
66
- activationMode: {
67
- type: String,
68
- required: false
69
- },
70
- unmountOnHide: {
71
- type: Boolean,
72
- required: false,
73
- default: true
74
- }
16
+ as: { type: null, required: false },
17
+ items: { type: Array, required: false },
18
+ color: { type: null, required: false },
19
+ variant: { type: null, required: false },
20
+ size: { type: null, required: false },
21
+ orientation: { type: null, required: false, default: "horizontal" },
22
+ content: { type: Boolean, required: false, default: true },
23
+ labelKey: { type: String, required: false, default: "label" },
24
+ class: { type: null, required: false },
25
+ b24ui: { type: null, required: false },
26
+ defaultValue: { type: null, required: false, default: "0" },
27
+ modelValue: { type: null, required: false },
28
+ activationMode: { type: String, required: false },
29
+ unmountOnHide: { type: Boolean, required: false, default: true }
75
30
  });
76
31
  const emits = defineEmits(["update:modelValue"]);
77
32
  const slots = defineSlots();
78
33
  const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "orientation", "activationMode", "unmountOnHide"), emits);
34
+ const getLabel = (item) => {
35
+ return get(item, props.labelKey);
36
+ };
79
37
  const b24ui = computed(() => tabs({
80
38
  color: props.color,
81
39
  variant: props.variant,
@@ -99,8 +57,8 @@ const b24ui = computed(() => tabs({
99
57
  <B24Avatar v-else-if="item.avatar" :size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()" v-bind="item.avatar" :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })" />
100
58
  </slot>
101
59
 
102
- <span v-if="get(item, props.labelKey) || !!slots.default" :class="b24ui.label({ class: props.b24ui?.label })">
103
- <slot :item="item" :index="index">{{ get(item, props.labelKey) }}</slot>
60
+ <span v-if="getLabel(item) || !!slots.default" :class="b24ui.label({ class: props.b24ui?.label })">
61
+ <slot :item="item" :index="index">{{ getLabel(item) }}</slot>
104
62
  </span>
105
63
 
106
64
  <slot name="trailing" :item="item" :index="index" />