@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.
- package/.nuxt/b24ui/input-menu.ts +2 -2
- package/.nuxt/b24ui/select-menu.ts +4 -4
- package/.nuxt/b24ui/select.ts +2 -2
- package/dist/meta.d.mts +148 -1
- package/dist/meta.mjs +148 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Advice.vue +10 -30
- package/dist/runtime/components/Alert.vue +17 -53
- package/dist/runtime/components/App.vue +9 -22
- package/dist/runtime/components/Avatar.vue +12 -38
- package/dist/runtime/components/AvatarGroup.vue +7 -20
- package/dist/runtime/components/Badge.vue +18 -61
- package/dist/runtime/components/Button.vue +55 -177
- package/dist/runtime/components/ButtonGroup.vue +6 -22
- package/dist/runtime/components/Calendar.vue +38 -151
- package/dist/runtime/components/Checkbox.vue +17 -59
- package/dist/runtime/components/Chip.vue +11 -44
- package/dist/runtime/components/Collapsible.vue +8 -30
- package/dist/runtime/components/Container.vue +3 -8
- package/dist/runtime/components/Countdown.vue +15 -60
- package/dist/runtime/components/DescriptionList.vue +10 -34
- package/dist/runtime/components/DropdownMenu.vue +16 -61
- package/dist/runtime/components/DropdownMenuContent.vue +41 -106
- package/dist/runtime/components/Form.vue +12 -45
- package/dist/runtime/components/FormField.vue +16 -56
- package/dist/runtime/components/Input.vue +29 -110
- package/dist/runtime/components/InputMenu.vue +76 -192
- package/dist/runtime/components/InputMenu.vue.d.ts +25 -6
- package/dist/runtime/components/InputNumber.vue +35 -136
- package/dist/runtime/components/Kbd.vue +6 -21
- package/dist/runtime/components/Link.vue +28 -115
- package/dist/runtime/components/LinkBase.vue +11 -42
- package/dist/runtime/components/Modal.vue +20 -77
- package/dist/runtime/components/ModalDialogClose.vue +1 -0
- package/dist/runtime/components/Navbar.vue +4 -13
- package/dist/runtime/components/NavbarDivider.vue +4 -13
- package/dist/runtime/components/NavbarSection.vue +4 -13
- package/dist/runtime/components/NavbarSpacer.vue +4 -13
- package/dist/runtime/components/NavigationMenu.vue +39 -107
- package/dist/runtime/components/OverlayProvider.vue +1 -1
- package/dist/runtime/components/Popover.vue +12 -53
- package/dist/runtime/components/Progress.vue +13 -52
- package/dist/runtime/components/RadioGroup.vue +20 -81
- package/dist/runtime/components/Range.vue +16 -64
- package/dist/runtime/components/Select.vue +39 -141
- package/dist/runtime/components/Select.vue.d.ts +1 -0
- package/dist/runtime/components/SelectMenu.vue +79 -172
- package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Separator.vue +13 -46
- package/dist/runtime/components/Sidebar.vue +4 -13
- package/dist/runtime/components/SidebarBody.vue +5 -18
- package/dist/runtime/components/SidebarFooter.vue +4 -13
- package/dist/runtime/components/SidebarHeader.vue +4 -13
- package/dist/runtime/components/SidebarHeading.vue +4 -13
- package/dist/runtime/components/SidebarLayout.vue +12 -18
- package/dist/runtime/components/SidebarSection.vue +4 -13
- package/dist/runtime/components/SidebarSpacer.vue +4 -13
- package/dist/runtime/components/Skeleton.vue +3 -8
- package/dist/runtime/components/Slideover.vue +20 -78
- package/dist/runtime/components/StackedLayout.vue +12 -18
- package/dist/runtime/components/Switch.vue +21 -75
- package/dist/runtime/components/Tabs.vue +22 -64
- package/dist/runtime/components/Textarea.vue +30 -115
- package/dist/runtime/components/Toast.vue +20 -67
- package/dist/runtime/components/Toaster.vue +15 -38
- package/dist/runtime/components/Tooltip.vue +16 -58
- package/dist/runtime/components/content/TableWrapper.vue +12 -46
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/composables/useOverlay.d.ts +14 -7
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/prose/A.vue +2 -8
- package/dist/runtime/prose/Blockquote.vue +2 -8
- package/dist/runtime/prose/Code.vue +3 -12
- package/dist/runtime/prose/Em.vue +2 -8
- package/dist/runtime/prose/H1.vue +2 -8
- package/dist/runtime/prose/H2.vue +2 -8
- package/dist/runtime/prose/H3.vue +2 -8
- package/dist/runtime/prose/H4.vue +2 -8
- package/dist/runtime/prose/H5.vue +2 -8
- package/dist/runtime/prose/H6.vue +2 -8
- package/dist/runtime/prose/Hr.vue +2 -8
- package/dist/runtime/prose/Img.vue +2 -8
- package/dist/runtime/prose/Li.vue +2 -8
- package/dist/runtime/prose/Ol.vue +2 -8
- package/dist/runtime/prose/P.vue +2 -8
- package/dist/runtime/prose/Pre.vue +5 -17
- package/dist/runtime/prose/Strong.vue +2 -8
- package/dist/runtime/prose/Table.vue +8 -33
- package/dist/runtime/prose/Tbody.vue +2 -8
- package/dist/runtime/prose/Td.vue +2 -8
- package/dist/runtime/prose/Th.vue +2 -8
- package/dist/runtime/prose/Thead.vue +2 -8
- package/dist/runtime/prose/Tr.vue +2 -8
- package/dist/runtime/prose/Ul.vue +2 -8
- package/dist/runtime/utils/link.d.ts +3 -3
- package/dist/runtime/vue/components/Link.vue +29 -115
- package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +11 -7
|
@@ -7,20 +7,11 @@ const navbarSpacer = tv({ extend: tv(theme), ...appConfigNavbarSpacer.b24ui?.nav
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
|
+
import { Primitive } from "reka-ui";
|
|
10
11
|
const props = defineProps({
|
|
11
|
-
as: {
|
|
12
|
-
|
|
13
|
-
|
|
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 = navbarSpacer();
|
|
@@ -8,112 +8,41 @@ const navigationMenu = tv({ extend: tv(theme), ...appConfigNavigationMenu.b24ui?
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed, toRef } from "vue";
|
|
11
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { NavigationMenuRoot, NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, useForwardPropsEmits } from "reka-ui";
|
|
12
12
|
import { createReusableTemplate } from "@vueuse/core";
|
|
13
|
-
import { isArrayOfArray } from "../utils";
|
|
13
|
+
import { get, isArrayOfArray } from "../utils";
|
|
14
|
+
import { pickLinkProps } from "../utils/link";
|
|
15
|
+
import icons from "../dictionary/icons";
|
|
16
|
+
import B24LinkBase from "./LinkBase.vue";
|
|
17
|
+
import B24Link from "./Link.vue";
|
|
18
|
+
import B24Avatar from "./Avatar.vue";
|
|
19
|
+
import B24Badge from "./Badge.vue";
|
|
20
|
+
import B24Collapsible from "./Collapsible.vue";
|
|
14
21
|
const props = defineProps({
|
|
15
|
-
as: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
orientation: {
|
|
41
|
-
type: null,
|
|
42
|
-
required: false,
|
|
43
|
-
default: "horizontal"
|
|
44
|
-
},
|
|
45
|
-
collapsed: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
highlight: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
highlightColor: {
|
|
54
|
-
type: null,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
content: {
|
|
58
|
-
type: Object,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
contentOrientation: {
|
|
62
|
-
type: null,
|
|
63
|
-
required: false,
|
|
64
|
-
default: "vertical"
|
|
65
|
-
},
|
|
66
|
-
arrow: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
required: false
|
|
69
|
-
},
|
|
70
|
-
labelKey: {
|
|
71
|
-
type: null,
|
|
72
|
-
required: false,
|
|
73
|
-
default: "label"
|
|
74
|
-
},
|
|
75
|
-
class: {
|
|
76
|
-
type: null,
|
|
77
|
-
required: false
|
|
78
|
-
},
|
|
79
|
-
b24ui: {
|
|
80
|
-
type: null,
|
|
81
|
-
required: false
|
|
82
|
-
},
|
|
83
|
-
modelValue: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: false
|
|
86
|
-
},
|
|
87
|
-
defaultValue: {
|
|
88
|
-
type: String,
|
|
89
|
-
required: false
|
|
90
|
-
},
|
|
91
|
-
delayDuration: {
|
|
92
|
-
type: Number,
|
|
93
|
-
required: false,
|
|
94
|
-
default: 0
|
|
95
|
-
},
|
|
96
|
-
disableClickTrigger: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
required: false
|
|
99
|
-
},
|
|
100
|
-
disableHoverTrigger: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
required: false
|
|
103
|
-
},
|
|
104
|
-
skipDelayDuration: {
|
|
105
|
-
type: Number,
|
|
106
|
-
required: false
|
|
107
|
-
},
|
|
108
|
-
disablePointerLeaveClose: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
required: false
|
|
111
|
-
},
|
|
112
|
-
unmountOnHide: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
required: false,
|
|
115
|
-
default: true
|
|
116
|
-
}
|
|
22
|
+
as: { type: null, required: false },
|
|
23
|
+
trailingIcon: { type: [Function, Object], required: false },
|
|
24
|
+
externalIcon: { type: [Boolean, Function, Object], required: false, default: true },
|
|
25
|
+
items: { type: null, required: false },
|
|
26
|
+
color: { type: null, required: false },
|
|
27
|
+
variant: { type: null, required: false },
|
|
28
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
29
|
+
collapsed: { type: Boolean, required: false },
|
|
30
|
+
highlight: { type: Boolean, required: false },
|
|
31
|
+
highlightColor: { type: null, required: false },
|
|
32
|
+
content: { type: Object, required: false },
|
|
33
|
+
contentOrientation: { type: null, required: false, default: "vertical" },
|
|
34
|
+
arrow: { type: Boolean, required: false },
|
|
35
|
+
labelKey: { type: null, required: false, default: "label" },
|
|
36
|
+
class: { type: null, required: false },
|
|
37
|
+
b24ui: { type: null, required: false },
|
|
38
|
+
modelValue: { type: String, required: false },
|
|
39
|
+
defaultValue: { type: String, required: false },
|
|
40
|
+
delayDuration: { type: Number, required: false, default: 0 },
|
|
41
|
+
disableClickTrigger: { type: Boolean, required: false },
|
|
42
|
+
disableHoverTrigger: { type: Boolean, required: false },
|
|
43
|
+
skipDelayDuration: { type: Number, required: false },
|
|
44
|
+
disablePointerLeaveClose: { type: Boolean, required: false },
|
|
45
|
+
unmountOnHide: { type: Boolean, required: false, default: true }
|
|
117
46
|
});
|
|
118
47
|
const emits = defineEmits(["update:modelValue"]);
|
|
119
48
|
const slots = defineSlots();
|
|
@@ -142,6 +71,9 @@ const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate({
|
|
|
142
71
|
}
|
|
143
72
|
}
|
|
144
73
|
});
|
|
74
|
+
const getLabel = (item) => {
|
|
75
|
+
return get(item, props.labelKey);
|
|
76
|
+
};
|
|
145
77
|
const b24ui = computed(() => navigationMenu({
|
|
146
78
|
orientation: props.orientation,
|
|
147
79
|
contentOrientation: props.contentOrientation,
|
|
@@ -170,11 +102,11 @@ const lists = computed(
|
|
|
170
102
|
</slot>
|
|
171
103
|
|
|
172
104
|
<span
|
|
173
|
-
v-if="(!collapsed || orientation !== 'vertical') && (
|
|
105
|
+
v-if="(!collapsed || orientation !== 'vertical') && (getLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
174
106
|
:class="b24ui.linkLabel({ class: props.b24ui?.linkLabel, active })"
|
|
175
107
|
>
|
|
176
108
|
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
|
|
177
|
-
{{
|
|
109
|
+
{{ getLabel(item) }}
|
|
178
110
|
</slot>
|
|
179
111
|
|
|
180
112
|
<Component
|
|
@@ -256,7 +188,7 @@ const lists = computed(
|
|
|
256
188
|
|
|
257
189
|
<div :class="b24ui.childLinkWrapper({ class: props.b24ui?.childLinkWrapper })">
|
|
258
190
|
<p :class="b24ui.childLinkLabel({ class: props.b24ui?.childLinkLabel, active: childActive })">
|
|
259
|
-
{{
|
|
191
|
+
{{ getLabel(childItem) }}
|
|
260
192
|
|
|
261
193
|
<Component
|
|
262
194
|
:is="typeof externalIcon === 'string' ? externalIcon : icons.external"
|
|
@@ -18,7 +18,7 @@ const onClose = (id, value) => {
|
|
|
18
18
|
v-for="overlay in mountedOverlays"
|
|
19
19
|
:key="overlay.id"
|
|
20
20
|
v-bind="overlay.props"
|
|
21
|
-
v-model:open="overlay.
|
|
21
|
+
v-model:open="overlay.isOpen"
|
|
22
22
|
@close="(value) => onClose(overlay.id, value)"
|
|
23
23
|
@after:leave="onAfterLeave(overlay.id)"
|
|
24
24
|
/>
|
|
@@ -13,59 +13,18 @@ import { useForwardPropsEmits } from "reka-ui";
|
|
|
13
13
|
import { Popover, HoverCard } from "reka-ui/namespaced";
|
|
14
14
|
import { reactivePick } from "@vueuse/core";
|
|
15
15
|
const props = defineProps({
|
|
16
|
-
mode: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
portal: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
required: false,
|
|
32
|
-
default: true
|
|
33
|
-
},
|
|
34
|
-
dismissible: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
required: false,
|
|
37
|
-
default: true
|
|
38
|
-
},
|
|
39
|
-
class: {
|
|
40
|
-
type: null,
|
|
41
|
-
required: false
|
|
42
|
-
},
|
|
43
|
-
b24ui: {
|
|
44
|
-
type: Object,
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
defaultOpen: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
required: false
|
|
50
|
-
},
|
|
51
|
-
open: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
required: false
|
|
54
|
-
},
|
|
55
|
-
modal: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
required: false
|
|
58
|
-
},
|
|
59
|
-
openDelay: {
|
|
60
|
-
type: Number,
|
|
61
|
-
required: false,
|
|
62
|
-
default: 0
|
|
63
|
-
},
|
|
64
|
-
closeDelay: {
|
|
65
|
-
type: Number,
|
|
66
|
-
required: false,
|
|
67
|
-
default: 0
|
|
68
|
-
}
|
|
16
|
+
mode: { type: String, required: false, default: "click" },
|
|
17
|
+
content: { type: Object, required: false },
|
|
18
|
+
arrow: { type: [Boolean, Object], required: false },
|
|
19
|
+
portal: { type: Boolean, required: false, default: true },
|
|
20
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
21
|
+
class: { type: null, required: false },
|
|
22
|
+
b24ui: { type: Object, required: false },
|
|
23
|
+
defaultOpen: { type: Boolean, required: false },
|
|
24
|
+
open: { type: Boolean, required: false },
|
|
25
|
+
modal: { type: Boolean, required: false },
|
|
26
|
+
openDelay: { type: Number, required: false, default: 0 },
|
|
27
|
+
closeDelay: { type: Number, required: false, default: 0 }
|
|
69
28
|
});
|
|
70
29
|
const emits = defineEmits(["update:open"]);
|
|
71
30
|
const slots = defineSlots();
|
|
@@ -8,61 +8,22 @@ const progress = tv({ extend: tv(theme), ...appConfigProgress.b24ui?.progress ||
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed } from "vue";
|
|
11
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { Primitive, ProgressRoot, ProgressIndicator, useForwardPropsEmits } from "reka-ui";
|
|
12
12
|
import { reactivePick } from "@vueuse/core";
|
|
13
13
|
import { useLocale } from "../composables/useLocale";
|
|
14
14
|
const props = defineProps({
|
|
15
|
-
as: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
inverted: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
required: false,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
type: null,
|
|
34
|
-
required: false
|
|
35
|
-
},
|
|
36
|
-
color: {
|
|
37
|
-
type: null,
|
|
38
|
-
required: false
|
|
39
|
-
},
|
|
40
|
-
orientation: {
|
|
41
|
-
type: null,
|
|
42
|
-
required: false,
|
|
43
|
-
default: "horizontal"
|
|
44
|
-
},
|
|
45
|
-
animation: {
|
|
46
|
-
type: null,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
class: {
|
|
50
|
-
type: null,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
b24ui: {
|
|
54
|
-
type: Object,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
getValueLabel: {
|
|
58
|
-
type: Function,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
modelValue: {
|
|
62
|
-
type: [Number, null],
|
|
63
|
-
required: false,
|
|
64
|
-
default: null
|
|
65
|
-
}
|
|
15
|
+
as: { type: null, required: false },
|
|
16
|
+
max: { type: [Number, Array], required: false },
|
|
17
|
+
status: { type: Boolean, required: false },
|
|
18
|
+
inverted: { type: Boolean, required: false, default: false },
|
|
19
|
+
size: { type: null, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
22
|
+
animation: { type: null, required: false },
|
|
23
|
+
class: { type: null, required: false },
|
|
24
|
+
b24ui: { type: Object, required: false },
|
|
25
|
+
getValueLabel: { type: Function, required: false },
|
|
26
|
+
modelValue: { type: [Number, null], required: false, default: null }
|
|
66
27
|
});
|
|
67
28
|
const emits = defineEmits(["update:modelValue", "update:max"]);
|
|
68
29
|
const slots = defineSlots();
|
|
@@ -8,91 +8,30 @@ const radioGroup = tv({ extend: tv(theme), ...appConfigRadioGroup.b24ui?.radioGr
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed, useId } from "vue";
|
|
11
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { RadioGroupRoot, RadioGroupItem, RadioGroupIndicator, Label, useForwardPropsEmits } from "reka-ui";
|
|
12
12
|
import { reactivePick } from "@vueuse/core";
|
|
13
13
|
import { useFormField } from "../composables/useFormField";
|
|
14
14
|
import { get } from "../utils";
|
|
15
15
|
const props = defineProps({
|
|
16
|
-
as: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
type: String,
|
|
36
|
-
required: false,
|
|
37
|
-
default: "description"
|
|
38
|
-
},
|
|
39
|
-
items: {
|
|
40
|
-
type: Array,
|
|
41
|
-
required: false
|
|
42
|
-
},
|
|
43
|
-
size: {
|
|
44
|
-
type: null,
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
variant: {
|
|
48
|
-
type: null,
|
|
49
|
-
required: false
|
|
50
|
-
},
|
|
51
|
-
color: {
|
|
52
|
-
type: null,
|
|
53
|
-
required: false
|
|
54
|
-
},
|
|
55
|
-
orientation: {
|
|
56
|
-
type: null,
|
|
57
|
-
required: false,
|
|
58
|
-
default: "vertical"
|
|
59
|
-
},
|
|
60
|
-
indicator: {
|
|
61
|
-
type: null,
|
|
62
|
-
required: false
|
|
63
|
-
},
|
|
64
|
-
class: {
|
|
65
|
-
type: null,
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
b24ui: {
|
|
69
|
-
type: Object,
|
|
70
|
-
required: false
|
|
71
|
-
},
|
|
72
|
-
defaultValue: {
|
|
73
|
-
type: [String, Number, Object, null],
|
|
74
|
-
required: false
|
|
75
|
-
},
|
|
76
|
-
disabled: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
required: false
|
|
79
|
-
},
|
|
80
|
-
loop: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
required: false
|
|
83
|
-
},
|
|
84
|
-
modelValue: {
|
|
85
|
-
type: [String, Number, Object, null],
|
|
86
|
-
required: false
|
|
87
|
-
},
|
|
88
|
-
name: {
|
|
89
|
-
type: String,
|
|
90
|
-
required: false
|
|
91
|
-
},
|
|
92
|
-
required: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
required: false
|
|
95
|
-
}
|
|
16
|
+
as: { type: null, required: false },
|
|
17
|
+
legend: { type: String, required: false },
|
|
18
|
+
valueKey: { type: String, required: false, default: "value" },
|
|
19
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
20
|
+
descriptionKey: { type: String, required: false, default: "description" },
|
|
21
|
+
items: { type: Array, required: false },
|
|
22
|
+
size: { type: null, required: false },
|
|
23
|
+
variant: { type: null, required: false },
|
|
24
|
+
color: { type: null, required: false },
|
|
25
|
+
orientation: { type: null, required: false, default: "vertical" },
|
|
26
|
+
indicator: { type: null, required: false },
|
|
27
|
+
class: { type: null, required: false },
|
|
28
|
+
b24ui: { type: Object, required: false },
|
|
29
|
+
defaultValue: { type: [String, Number, Object, null], required: false },
|
|
30
|
+
disabled: { type: Boolean, required: false },
|
|
31
|
+
loop: { type: Boolean, required: false },
|
|
32
|
+
modelValue: { type: [String, Number, Object, null], required: false },
|
|
33
|
+
name: { type: String, required: false },
|
|
34
|
+
required: { type: Boolean, required: false }
|
|
96
35
|
});
|
|
97
36
|
const emits = defineEmits(["update:modelValue", "change"]);
|
|
98
37
|
const slots = defineSlots();
|
|
@@ -8,75 +8,27 @@ const range = tv({ extend: tv(theme), ...appConfigRange.b24ui?.range || {} });
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed } from "vue";
|
|
11
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { SliderRoot, SliderRange, SliderTrack, SliderThumb, useForwardPropsEmits } from "reka-ui";
|
|
12
12
|
import { reactivePick } from "@vueuse/core";
|
|
13
13
|
import { useFormField } from "../composables/useFormField";
|
|
14
14
|
const props = defineProps({
|
|
15
|
-
as: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
required: false,
|
|
30
|
-
default: "horizontal"
|
|
31
|
-
},
|
|
32
|
-
defaultValue: {
|
|
33
|
-
type: [Number, Array],
|
|
34
|
-
required: false
|
|
35
|
-
},
|
|
36
|
-
class: {
|
|
37
|
-
type: null,
|
|
38
|
-
required: false
|
|
39
|
-
},
|
|
40
|
-
b24ui: {
|
|
41
|
-
type: Object,
|
|
42
|
-
required: false
|
|
43
|
-
},
|
|
44
|
-
name: {
|
|
45
|
-
type: String,
|
|
46
|
-
required: false
|
|
47
|
-
},
|
|
48
|
-
disabled: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
required: false
|
|
51
|
-
},
|
|
52
|
-
inverted: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
min: {
|
|
57
|
-
type: Number,
|
|
58
|
-
required: false,
|
|
59
|
-
default: 0
|
|
60
|
-
},
|
|
61
|
-
max: {
|
|
62
|
-
type: Number,
|
|
63
|
-
required: false,
|
|
64
|
-
default: 100
|
|
65
|
-
},
|
|
66
|
-
step: {
|
|
67
|
-
type: Number,
|
|
68
|
-
required: false,
|
|
69
|
-
default: 1
|
|
70
|
-
},
|
|
71
|
-
minStepsBetweenThumbs: {
|
|
72
|
-
type: Number,
|
|
73
|
-
required: false
|
|
74
|
-
}
|
|
15
|
+
as: { type: null, required: false },
|
|
16
|
+
size: { type: null, required: false },
|
|
17
|
+
color: { type: null, required: false },
|
|
18
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
19
|
+
defaultValue: { type: [Number, Array], required: false },
|
|
20
|
+
class: { type: null, required: false },
|
|
21
|
+
b24ui: { type: Object, required: false },
|
|
22
|
+
name: { type: String, required: false },
|
|
23
|
+
disabled: { type: Boolean, required: false },
|
|
24
|
+
inverted: { type: Boolean, required: false },
|
|
25
|
+
min: { type: Number, required: false, default: 0 },
|
|
26
|
+
max: { type: Number, required: false, default: 100 },
|
|
27
|
+
step: { type: Number, required: false, default: 1 },
|
|
28
|
+
minStepsBetweenThumbs: { type: Number, required: false }
|
|
75
29
|
});
|
|
76
30
|
const emits = defineEmits(["update:modelValue", "change"]);
|
|
77
|
-
const modelValue = defineModel({
|
|
78
|
-
"type": [Number, Array]
|
|
79
|
-
});
|
|
31
|
+
const modelValue = defineModel({ type: [Number, Array] });
|
|
80
32
|
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "orientation", "min", "max", "step", "minStepsBetweenThumbs", "inverted"), emits);
|
|
81
33
|
const { id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
82
34
|
const defaultRangeValue = computed(() => {
|