vunor 0.3.1 → 0.4.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/README.md +8 -1
- package/dist/AppLayout.mjs +17 -68
- package/dist/AppToasts.d.mts +3 -0
- package/dist/AppToasts.mjs +59 -76
- package/dist/Button.d.mts +26 -10
- package/dist/Button.mjs +95 -60
- package/dist/ButtonBase.mjs +26 -40
- package/dist/Calendar.d.mts +14 -2
- package/dist/Calendar.mjs +37 -85
- package/dist/Card.mjs +6 -25
- package/dist/CardHeader.mjs +3 -12
- package/dist/Checkbox.d.mts +7 -2
- package/dist/Checkbox.mjs +37 -45
- package/dist/Combobox.d.mts +24 -8
- package/dist/Combobox.mjs +274 -350
- package/dist/DatePicker.d.mts +18 -4
- package/dist/DatePicker.mjs +93 -216
- package/dist/DatePickerBase.d.mts +21 -8
- package/dist/DatePickerBase.mjs +108 -257
- package/dist/DatePickerPopup.d.mts +27 -2
- package/dist/DatePickerPopup.mjs +62 -13
- package/dist/DelayedSwitch.mjs +3 -14
- package/dist/DevTools.mjs +377 -388
- package/dist/Dialog.d.mts +8 -3
- package/dist/Dialog.mjs +77 -107
- package/dist/Icon.mjs +1 -4
- package/dist/InnerLoading.mjs +1 -4
- package/dist/Input.mjs +35 -126
- package/dist/InputBase.mjs +28 -93
- package/dist/LoadingIndicator.mjs +1 -5
- package/dist/Menu.mjs +44 -65
- package/dist/MenuItem.mjs +4 -16
- package/dist/OverflowContainer.mjs +9 -11
- package/dist/Pagination.mjs +11 -29
- package/dist/Popover.d.mts +39 -11
- package/dist/Popover.mjs +80 -99
- package/dist/ProgressBar.d.mts +9 -2
- package/dist/ProgressBar.mjs +11 -27
- package/dist/RadioGroup.d.mts +2 -1
- package/dist/RadioGroup.mjs +33 -47
- package/dist/Select.d.mts +24 -7
- package/dist/Select.mjs +94 -186
- package/dist/SelectBase.d.mts +26 -11
- package/dist/SelectBase.mjs +59 -83
- package/dist/Slider.d.mts +6 -1
- package/dist/Slider.mjs +34 -103
- package/dist/Tabs.mjs +13 -49
- package/dist/forward-root-DPGTBptG.js +125 -0
- package/dist/nuxt.mjs +36 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +22 -5
- package/dist/{utils-6bTTIoaw.js → utils-BCBGEM10.js} +30 -1
- package/dist/utils.mjs +1 -1
- package/dist/vite.d.mts +13 -4
- package/dist/vite.mjs +5 -0
- package/package.json +24 -9
- package/dist/utils-Z0nPSAzb.js +0 -42
package/dist/SelectBase.d.mts
CHANGED
|
@@ -6,10 +6,25 @@ interface TSelectItem {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
8
|
type TSelectItems<T extends TSelectItem = TSelectItem> = Array<T | string> | Record<string, Array<T | string>>;
|
|
9
|
-
|
|
9
|
+
/** Select model: a string, or an array of strings with `multiple` */
|
|
10
|
+
type TSelectModel<M extends boolean = false> = M extends true ? string[] : string;
|
|
11
|
+
interface TSelectBaseProps<T extends TSelectItem, M extends boolean = false> {
|
|
10
12
|
required?: boolean;
|
|
11
13
|
disabledValues?: Array<string | null | undefined>;
|
|
12
|
-
|
|
14
|
+
/** Initial value when uncontrolled (an array with `multiple`). */
|
|
15
|
+
defaultValue?: TSelectModel<M> | null | undefined;
|
|
16
|
+
/** Initial open state when `v-model:open` is not used. */
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/** Allow selecting several values; the model becomes an array. */
|
|
19
|
+
multiple?: M;
|
|
20
|
+
/** Compare values by a field or a function (forwarded to Reka `SelectRoot`). */
|
|
21
|
+
by?: string | ((a: unknown, b: unknown) => boolean);
|
|
22
|
+
/** Reading direction (forwarded to Reka `SelectRoot`). */
|
|
23
|
+
dir?: 'ltr' | 'rtl';
|
|
24
|
+
/** Native `autocomplete` of the hidden form select. */
|
|
25
|
+
autocomplete?: string;
|
|
26
|
+
/** Form field name: the value is submitted with the enclosing `<form>`. */
|
|
27
|
+
name?: string;
|
|
13
28
|
popupClass?: string | Record<string, boolean>;
|
|
14
29
|
popupRound?: boolean;
|
|
15
30
|
valueClass?: string | Record<string, boolean>;
|
|
@@ -25,13 +40,13 @@ interface TSelectBaseProps<T extends TSelectItem> {
|
|
|
25
40
|
updatePositionStrategy?: 'always' | 'optimized';
|
|
26
41
|
}
|
|
27
42
|
|
|
28
|
-
declare const __VLS_export: <T extends TSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
29
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<(TSelectBaseProps<T> & {
|
|
43
|
+
declare const __VLS_export: <T extends TSelectItem, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
44
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(TSelectBaseProps<T, M> & {
|
|
30
45
|
open?: boolean;
|
|
31
|
-
modelValue?:
|
|
46
|
+
modelValue?: TSelectModel<M>;
|
|
32
47
|
}) & {
|
|
33
|
-
"onUpdate:open"?: ((value: boolean
|
|
34
|
-
"onUpdate:modelValue"?: ((value:
|
|
48
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
49
|
+
"onUpdate:modelValue"?: ((value: TSelectModel<M> | undefined) => any) | undefined;
|
|
35
50
|
}> & (typeof globalThis extends {
|
|
36
51
|
__VLS_PROPS_FALLBACK: infer P;
|
|
37
52
|
} ? P : {});
|
|
@@ -40,9 +55,9 @@ declare const __VLS_export: <T extends TSelectItem>(__VLS_props: NonNullable<Awa
|
|
|
40
55
|
slots: {
|
|
41
56
|
default?: (props: {
|
|
42
57
|
displayItem: T | undefined;
|
|
43
|
-
value:
|
|
44
|
-
openPopup: () => void;
|
|
45
|
-
open: boolean
|
|
58
|
+
value: TSelectModel<M>;
|
|
59
|
+
openPopup: (event?: Event) => void;
|
|
60
|
+
open: boolean;
|
|
46
61
|
icon: string;
|
|
47
62
|
}) => any;
|
|
48
63
|
} & {
|
|
@@ -53,7 +68,7 @@ declare const __VLS_export: <T extends TSelectItem>(__VLS_props: NonNullable<Awa
|
|
|
53
68
|
} & {
|
|
54
69
|
item?: (props: T) => any;
|
|
55
70
|
};
|
|
56
|
-
emit: ((event: "update:open", value: boolean
|
|
71
|
+
emit: ((event: "update:open", value: boolean) => void) & ((event: "update:modelValue", value: TSelectModel<M> | undefined) => void);
|
|
57
72
|
}>) => import("vue").VNode & {
|
|
58
73
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
59
74
|
};
|
package/dist/SelectBase.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i as useRootBinding, n as useForwardToRoot, r as useModelState, t as claimToggle } from "./forward-root-DPGTBptG.js";
|
|
1
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
3
|
import { SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectViewport } from "reka-ui";
|
|
3
4
|
import VuIcon from "vunor/Icon";
|
|
@@ -6,76 +7,47 @@ const _hoisted_1 = { class: "hidden" };
|
|
|
6
7
|
//#endregion
|
|
7
8
|
//#region src/components/Select/SelectBase.vue
|
|
8
9
|
var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
10
|
+
inheritAttrs: false,
|
|
9
11
|
__name: "SelectBase",
|
|
10
12
|
props: /* @__PURE__ */ mergeModels({
|
|
11
13
|
required: {
|
|
12
14
|
type: Boolean,
|
|
13
|
-
|
|
15
|
+
default: void 0
|
|
14
16
|
},
|
|
15
|
-
disabledValues: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
defaultValue: {
|
|
20
|
-
type: null,
|
|
21
|
-
required: false
|
|
22
|
-
},
|
|
23
|
-
popupClass: {
|
|
24
|
-
type: [String, Object],
|
|
25
|
-
required: false
|
|
26
|
-
},
|
|
27
|
-
popupRound: {
|
|
17
|
+
disabledValues: {},
|
|
18
|
+
defaultValue: {},
|
|
19
|
+
defaultOpen: {
|
|
28
20
|
type: Boolean,
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
valueClass: {
|
|
32
|
-
type: [String, Object],
|
|
33
|
-
required: false
|
|
34
|
-
},
|
|
35
|
-
iconClass: {
|
|
36
|
-
type: [String, Object],
|
|
37
|
-
required: false
|
|
38
|
-
},
|
|
39
|
-
class: {
|
|
40
|
-
type: [String, Object],
|
|
41
|
-
required: false
|
|
42
|
-
},
|
|
43
|
-
items: {
|
|
44
|
-
type: [Array, Object],
|
|
45
|
-
required: true
|
|
21
|
+
default: void 0
|
|
46
22
|
},
|
|
23
|
+
multiple: { default: void 0 },
|
|
24
|
+
by: {},
|
|
25
|
+
dir: {},
|
|
26
|
+
autocomplete: {},
|
|
27
|
+
name: {},
|
|
28
|
+
popupClass: {},
|
|
29
|
+
popupRound: { type: Boolean },
|
|
30
|
+
valueClass: {},
|
|
31
|
+
iconClass: {},
|
|
32
|
+
class: {},
|
|
33
|
+
items: {},
|
|
47
34
|
disabled: {
|
|
48
35
|
type: Boolean,
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
placeholder: {
|
|
52
|
-
type: String,
|
|
53
|
-
required: false
|
|
36
|
+
default: void 0
|
|
54
37
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
required: false
|
|
62
|
-
},
|
|
63
|
-
sideOffset: {
|
|
64
|
-
type: Number,
|
|
65
|
-
required: false
|
|
66
|
-
},
|
|
67
|
-
sticky: {
|
|
68
|
-
type: String,
|
|
69
|
-
required: false
|
|
70
|
-
},
|
|
71
|
-
updatePositionStrategy: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: false
|
|
74
|
-
}
|
|
38
|
+
placeholder: {},
|
|
39
|
+
popupPosition: {},
|
|
40
|
+
side: {},
|
|
41
|
+
sideOffset: {},
|
|
42
|
+
sticky: {},
|
|
43
|
+
updatePositionStrategy: {}
|
|
75
44
|
}, {
|
|
76
|
-
"open": {
|
|
45
|
+
"open": {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
77
49
|
"openModifiers": {},
|
|
78
|
-
"modelValue": {
|
|
50
|
+
"modelValue": {},
|
|
79
51
|
"modelModifiers": {}
|
|
80
52
|
}),
|
|
81
53
|
emits: ["update:open", "update:modelValue"],
|
|
@@ -83,6 +55,10 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
83
55
|
const props = __props;
|
|
84
56
|
const open = useModel(__props, "open");
|
|
85
57
|
const modelValue = useModel(__props, "modelValue");
|
|
58
|
+
const rootProps = useForwardToRoot(SelectRoot, props, void 0, ["modelValue", "open"]);
|
|
59
|
+
const isOpen = useModelState(open, SelectRoot, "defaultOpen", props);
|
|
60
|
+
const value = useModelState(modelValue, SelectRoot, "defaultValue", props);
|
|
61
|
+
const rootOpen = useRootBinding(open, isOpen);
|
|
86
62
|
const groups = computed(() => {
|
|
87
63
|
if (Array.isArray(props.items)) return [{
|
|
88
64
|
grp: "",
|
|
@@ -111,37 +87,43 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
111
87
|
function isItemDisabled(val) {
|
|
112
88
|
return props.disabledValues?.includes(val);
|
|
113
89
|
}
|
|
114
|
-
function openPopup() {
|
|
115
|
-
if (!props.disabled)
|
|
90
|
+
function openPopup(event) {
|
|
91
|
+
if (claimToggle(event) && !props.disabled) isOpen.value = !isOpen.value;
|
|
116
92
|
}
|
|
117
|
-
const displayItem = computed(() =>
|
|
93
|
+
const displayItem = computed(() => {
|
|
94
|
+
const current = value.value;
|
|
95
|
+
if (!Array.isArray(current)) return flatItems.value.get(current);
|
|
96
|
+
if (current.length === 0) return;
|
|
97
|
+
const label = current.map((v) => flatItems.value.get(v)?.label ?? v).join(", ");
|
|
98
|
+
return {
|
|
99
|
+
value: current.join(", "),
|
|
100
|
+
label
|
|
101
|
+
};
|
|
102
|
+
});
|
|
118
103
|
function getSearchValue(item) {
|
|
119
104
|
return item.search || item.label?.replace(/[^\p{L}\p{N}\p{P}\p{M}\p{Zs}]/gu, "").trim();
|
|
120
105
|
}
|
|
121
106
|
return (_ctx, _cache) => {
|
|
122
|
-
return openBlock(),
|
|
107
|
+
return openBlock(), createBlock(unref(SelectRoot), mergeProps(unref(rootProps), {
|
|
123
108
|
modelValue: modelValue.value,
|
|
124
109
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
125
|
-
open:
|
|
126
|
-
"onUpdate:open": _cache[1] || (_cache[1] = (
|
|
127
|
-
|
|
128
|
-
required: __props.required,
|
|
129
|
-
"default-value": __props.defaultValue
|
|
130
|
-
}, {
|
|
110
|
+
open: unref(rootOpen),
|
|
111
|
+
"onUpdate:open": _cache[1] || (_cache[1] = (value) => open.value = value)
|
|
112
|
+
}), {
|
|
131
113
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
132
114
|
displayItem: displayItem.value,
|
|
133
|
-
value:
|
|
115
|
+
value: unref(value),
|
|
134
116
|
openPopup,
|
|
135
|
-
open:
|
|
117
|
+
open: unref(isOpen),
|
|
136
118
|
icon: "i--chevron-down"
|
|
137
|
-
}, () => [createVNode(unref(SelectTrigger), { class:
|
|
119
|
+
}, () => [createVNode(unref(SelectTrigger), mergeProps(_ctx.$attrs, { class: __props.class }), {
|
|
138
120
|
default: withCtx(() => [
|
|
139
121
|
!!displayItem.value?.icon ? (openBlock(), createBlock(VuIcon, {
|
|
140
122
|
key: 0,
|
|
141
123
|
name: displayItem.value.icon,
|
|
142
124
|
class: "inline-block vertical-middle mr-$xs",
|
|
143
125
|
style: { "color": "currentColor" }
|
|
144
|
-
}, null, 8, ["name"])) : createCommentVNode("
|
|
126
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
145
127
|
createVNode(unref(SelectValue), {
|
|
146
128
|
placeholder: __props.placeholder,
|
|
147
129
|
class: normalizeClass(__props.valueClass)
|
|
@@ -155,7 +137,7 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
155
137
|
}, null, 8, ["class"])
|
|
156
138
|
]),
|
|
157
139
|
_: 1
|
|
158
|
-
},
|
|
140
|
+
}, 16, ["class"])]), createVNode(unref(SelectPortal), null, {
|
|
159
141
|
default: withCtx(() => [createVNode(unref(SelectContent), {
|
|
160
142
|
class: normalizeClass(["select-content group", __props.popupClass]),
|
|
161
143
|
style: normalizeStyle({
|
|
@@ -184,14 +166,14 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
184
166
|
grpIndex > 0 ? (openBlock(), createBlock(unref(SelectSeparator), {
|
|
185
167
|
key: 0,
|
|
186
168
|
class: "select-separator"
|
|
187
|
-
})) : createCommentVNode("
|
|
169
|
+
})) : createCommentVNode("", true),
|
|
188
170
|
!!g.grp ? (openBlock(), createBlock(unref(SelectLabel), {
|
|
189
171
|
key: 1,
|
|
190
172
|
class: "select-grp-label"
|
|
191
173
|
}, {
|
|
192
174
|
default: withCtx(() => [renderSlot(_ctx.$slots, "group", mergeProps({ ref_for: true }, g), () => [createElementVNode("span", null, toDisplayString(g.grp), 1)])]),
|
|
193
175
|
_: 2
|
|
194
|
-
}, 1024)) : createCommentVNode("
|
|
176
|
+
}, 1024)) : createCommentVNode("", true),
|
|
195
177
|
createVNode(unref(SelectGroup), null, {
|
|
196
178
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(g.items, (item, index) => {
|
|
197
179
|
return openBlock(), createBlock(unref(SelectItem), {
|
|
@@ -209,7 +191,7 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
209
191
|
name: item.icon,
|
|
210
192
|
class: "inline-block vertical-middle mr-$xs",
|
|
211
193
|
style: { "color": "currentColor" }
|
|
212
|
-
}, null, 8, ["name"])) : createCommentVNode("
|
|
194
|
+
}, null, 8, ["name"])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)])])]),
|
|
213
195
|
_: 2
|
|
214
196
|
}, 1032, [
|
|
215
197
|
"value",
|
|
@@ -245,13 +227,7 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
245
227
|
_: 3
|
|
246
228
|
})]),
|
|
247
229
|
_: 3
|
|
248
|
-
},
|
|
249
|
-
"modelValue",
|
|
250
|
-
"open",
|
|
251
|
-
"disabled",
|
|
252
|
-
"required",
|
|
253
|
-
"default-value"
|
|
254
|
-
])], 2112);
|
|
230
|
+
}, 16, ["modelValue", "open"]);
|
|
255
231
|
};
|
|
256
232
|
}
|
|
257
233
|
});
|
package/dist/Slider.d.mts
CHANGED
|
@@ -26,7 +26,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
26
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
27
|
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
28
28
|
onValueCommit?: ((payload: number[]) => any) | undefined;
|
|
29
|
-
}>, {
|
|
29
|
+
}>, {
|
|
30
|
+
required: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
asChild: boolean;
|
|
33
|
+
inverted: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
36
|
declare const _default: typeof __VLS_export;
|
|
32
37
|
export default _default;
|
package/dist/Slider.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useForwardToRoot, r as useModelState } from "./forward-root-DPGTBptG.js";
|
|
2
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
3
|
+
import { SliderRange, SliderRoot, SliderThumb, SliderTrack } from "reka-ui";
|
|
3
4
|
import VuLabel from "vunor/Label";
|
|
4
5
|
//#region src/components/Slider/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
const _hoisted_1 = {
|
|
@@ -12,123 +13,53 @@ const _hoisted_2 = { class: "text-label text-grey-400" };
|
|
|
12
13
|
var Slider_default = /* @__PURE__ */ defineComponent({
|
|
13
14
|
__name: "Slider",
|
|
14
15
|
props: /* @__PURE__ */ mergeModels({
|
|
15
|
-
defaultValue: {
|
|
16
|
-
|
|
17
|
-
required: false
|
|
18
|
-
},
|
|
19
|
-
modelValue: {
|
|
20
|
-
type: [Array, null],
|
|
21
|
-
required: false
|
|
22
|
-
},
|
|
16
|
+
defaultValue: {},
|
|
17
|
+
modelValue: {},
|
|
23
18
|
disabled: {
|
|
24
19
|
type: Boolean,
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
orientation: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
dir: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
20
|
+
default: void 0
|
|
34
21
|
},
|
|
22
|
+
orientation: {},
|
|
23
|
+
dir: {},
|
|
35
24
|
inverted: {
|
|
36
25
|
type: Boolean,
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
min: {
|
|
40
|
-
type: Number,
|
|
41
|
-
required: false
|
|
42
|
-
},
|
|
43
|
-
max: {
|
|
44
|
-
type: Number,
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
step: {
|
|
48
|
-
type: Number,
|
|
49
|
-
required: false
|
|
50
|
-
},
|
|
51
|
-
minStepsBetweenThumbs: {
|
|
52
|
-
type: Number,
|
|
53
|
-
required: false
|
|
54
|
-
},
|
|
55
|
-
thumbAlignment: {
|
|
56
|
-
type: String,
|
|
57
|
-
required: false
|
|
26
|
+
default: void 0
|
|
58
27
|
},
|
|
28
|
+
min: {},
|
|
29
|
+
max: {},
|
|
30
|
+
step: {},
|
|
31
|
+
minStepsBetweenThumbs: {},
|
|
32
|
+
thumbAlignment: {},
|
|
59
33
|
asChild: {
|
|
60
34
|
type: Boolean,
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
as: {
|
|
64
|
-
type: null,
|
|
65
|
-
required: false
|
|
66
|
-
},
|
|
67
|
-
name: {
|
|
68
|
-
type: String,
|
|
69
|
-
required: false
|
|
35
|
+
default: void 0
|
|
70
36
|
},
|
|
37
|
+
as: {},
|
|
38
|
+
name: {},
|
|
71
39
|
required: {
|
|
72
40
|
type: Boolean,
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
class: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
required: false
|
|
86
|
-
},
|
|
87
|
-
rangeClass: {
|
|
88
|
-
type: [String, Object],
|
|
89
|
-
required: false
|
|
90
|
-
},
|
|
91
|
-
hideRange: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
required: false
|
|
94
|
-
},
|
|
95
|
-
thumbs: {
|
|
96
|
-
type: Number,
|
|
97
|
-
required: false
|
|
98
|
-
},
|
|
99
|
-
labels: {
|
|
100
|
-
type: Array,
|
|
101
|
-
required: false
|
|
102
|
-
},
|
|
103
|
-
sliderClass: {
|
|
104
|
-
type: [
|
|
105
|
-
String,
|
|
106
|
-
Object,
|
|
107
|
-
Array
|
|
108
|
-
],
|
|
109
|
-
required: false
|
|
110
|
-
},
|
|
111
|
-
label: {
|
|
112
|
-
type: String,
|
|
113
|
-
required: false
|
|
114
|
-
},
|
|
115
|
-
displayValue: {
|
|
116
|
-
type: Boolean,
|
|
117
|
-
required: false
|
|
118
|
-
}
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
class: {},
|
|
44
|
+
rootClass: {},
|
|
45
|
+
trackClass: {},
|
|
46
|
+
rangeClass: {},
|
|
47
|
+
hideRange: { type: Boolean },
|
|
48
|
+
thumbs: {},
|
|
49
|
+
labels: {},
|
|
50
|
+
sliderClass: {},
|
|
51
|
+
label: {},
|
|
52
|
+
displayValue: { type: Boolean }
|
|
119
53
|
}, {
|
|
120
|
-
"modelValue": {
|
|
54
|
+
"modelValue": {},
|
|
121
55
|
"modelModifiers": {}
|
|
122
56
|
}),
|
|
123
57
|
emits: /* @__PURE__ */ mergeModels(["update:modelValue", "valueCommit"], ["update:modelValue"]),
|
|
124
58
|
setup(__props, { emit: __emit }) {
|
|
125
59
|
const props = __props;
|
|
126
|
-
const
|
|
127
|
-
const forwarded = useForwardPropsEmits(computed(() => {
|
|
128
|
-
const { class: _, rootClass, hideRange, trackClass, rangeClass, thumbs, labels, sliderClass, label, displayValue, ...delegated } = props;
|
|
129
|
-
return delegated;
|
|
130
|
-
}), emits);
|
|
60
|
+
const forwarded = useForwardToRoot(SliderRoot, props, __emit, ["modelValue", "update:modelValue"]);
|
|
131
61
|
const modelValue = useModel(__props, "modelValue");
|
|
62
|
+
const value = useModelState(modelValue, SliderRoot, "defaultValue", props);
|
|
132
63
|
function getSliderClass(n) {
|
|
133
64
|
if (Array.isArray(props.sliderClass)) return props.sliderClass[n];
|
|
134
65
|
else if (props.sliderClass !== void 0) return props.sliderClass;
|
|
@@ -137,7 +68,7 @@ var Slider_default = /* @__PURE__ */ defineComponent({
|
|
|
137
68
|
return openBlock(), createElementBlock("div", { class: normalizeClass(__props.class) }, [!!__props.label || __props.displayValue ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(VuLabel, null, {
|
|
138
69
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.label || ""), 1)]),
|
|
139
70
|
_: 1
|
|
140
|
-
}), createElementVNode("span", _hoisted_2, toDisplayString(
|
|
71
|
+
}), createElementVNode("span", _hoisted_2, toDisplayString(unref(value)?.join(" | ")), 1)])) : createCommentVNode("", true), createVNode(unref(SliderRoot), mergeProps(unref(forwarded), {
|
|
141
72
|
modelValue: modelValue.value,
|
|
142
73
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
143
74
|
class: ["slider", __props.rootClass]
|
|
@@ -146,7 +77,7 @@ var Slider_default = /* @__PURE__ */ defineComponent({
|
|
|
146
77
|
default: withCtx(() => [!__props.hideRange ? (openBlock(), createBlock(unref(SliderRange), {
|
|
147
78
|
key: 0,
|
|
148
79
|
class: normalizeClass(__props.rangeClass || "slider-range")
|
|
149
|
-
}, null, 8, ["class"])) : createCommentVNode("
|
|
80
|
+
}, null, 8, ["class"])) : createCommentVNode("", true)]),
|
|
150
81
|
_: 1
|
|
151
82
|
}, 8, ["class"]), renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.thumbs || 1, (n) => {
|
|
152
83
|
return openBlock(), createBlock(unref(SliderThumb), {
|
package/dist/Tabs.mjs
CHANGED
|
@@ -5,54 +5,18 @@ import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "rek
|
|
|
5
5
|
var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "Tabs",
|
|
7
7
|
props: /* @__PURE__ */ mergeModels({
|
|
8
|
-
tabs: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
required: false
|
|
19
|
-
},
|
|
20
|
-
dir: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: false
|
|
23
|
-
},
|
|
24
|
-
indicator: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
required: false
|
|
27
|
-
},
|
|
28
|
-
noContent: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
required: false
|
|
31
|
-
},
|
|
32
|
-
orientation: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: false
|
|
35
|
-
},
|
|
36
|
-
tabsListClass: {
|
|
37
|
-
type: [
|
|
38
|
-
String,
|
|
39
|
-
Object,
|
|
40
|
-
Array
|
|
41
|
-
],
|
|
42
|
-
required: false,
|
|
43
|
-
default: "flex relative"
|
|
44
|
-
},
|
|
45
|
-
tabGrow: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
tabClass: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: false,
|
|
52
|
-
default: "c8-flat"
|
|
53
|
-
}
|
|
8
|
+
tabs: {},
|
|
9
|
+
defaultValue: {},
|
|
10
|
+
activationMode: {},
|
|
11
|
+
dir: {},
|
|
12
|
+
indicator: { type: Boolean },
|
|
13
|
+
noContent: { type: Boolean },
|
|
14
|
+
orientation: {},
|
|
15
|
+
tabsListClass: { default: "flex relative" },
|
|
16
|
+
tabGrow: { type: Boolean },
|
|
17
|
+
tabClass: { default: "c8-flat" }
|
|
54
18
|
}, {
|
|
55
|
-
"modelValue": {
|
|
19
|
+
"modelValue": {},
|
|
56
20
|
"modelModifiers": {}
|
|
57
21
|
}),
|
|
58
22
|
emits: ["update:modelValue"],
|
|
@@ -71,7 +35,7 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
71
35
|
default: withCtx(() => [__props.indicator ? (openBlock(), createBlock(unref(TabsIndicator), {
|
|
72
36
|
key: 0,
|
|
73
37
|
class: "tabs-indicator"
|
|
74
|
-
})) : createCommentVNode("
|
|
38
|
+
})) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
|
|
75
39
|
return openBlock(), createBlock(unref(TabsTrigger), {
|
|
76
40
|
"as-child": "",
|
|
77
41
|
value: tab.value
|
|
@@ -92,7 +56,7 @@ var Tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
92
56
|
default: withCtx(() => [renderSlot(_ctx.$slots, tab.value)]),
|
|
93
57
|
_: 2
|
|
94
58
|
}, 1032, ["value"]);
|
|
95
|
-
}), 256)) : createCommentVNode("
|
|
59
|
+
}), 256)) : createCommentVNode("", true)]),
|
|
96
60
|
_: 3
|
|
97
61
|
}, 8, [
|
|
98
62
|
"modelValue",
|