vunor 0.3.2 → 0.4.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.
- package/README.md +12 -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 +96 -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 +9 -1
- package/dist/theme.mjs +45 -17
- 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/ProgressBar.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useForwardToRoot } from "./forward-root-DPGTBptG.js";
|
|
1
2
|
import { createBlock, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, unref, withCtx } from "vue";
|
|
2
3
|
import { ProgressIndicator, ProgressRoot } from "reka-ui";
|
|
3
4
|
//#endregion
|
|
@@ -5,42 +6,25 @@ import { ProgressIndicator, ProgressRoot } from "reka-ui";
|
|
|
5
6
|
var ProgressBar_default = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "ProgressBar",
|
|
7
8
|
props: {
|
|
8
|
-
modelValue: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
max: {
|
|
13
|
-
type: Number,
|
|
14
|
-
required: false,
|
|
15
|
-
default: 100
|
|
16
|
-
},
|
|
17
|
-
getValueLabel: {
|
|
18
|
-
type: Function,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
getValueText: {
|
|
22
|
-
type: Function,
|
|
23
|
-
required: false
|
|
24
|
-
},
|
|
9
|
+
modelValue: {},
|
|
10
|
+
max: { default: 100 },
|
|
11
|
+
getValueLabel: {},
|
|
12
|
+
getValueText: {},
|
|
25
13
|
asChild: {
|
|
26
14
|
type: Boolean,
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
as: {
|
|
30
|
-
type: null,
|
|
31
|
-
required: false
|
|
15
|
+
default: void 0
|
|
32
16
|
},
|
|
17
|
+
as: {},
|
|
33
18
|
loading: {
|
|
34
19
|
type: Boolean,
|
|
35
|
-
required: false,
|
|
36
20
|
default: true
|
|
37
21
|
}
|
|
38
22
|
},
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
emits: ["update:modelValue", "update:max"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const rootProps = useForwardToRoot(ProgressRoot, __props, __emit);
|
|
41
26
|
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createBlock(unref(ProgressRoot), mergeProps(
|
|
43
|
-
loading: void 0,
|
|
27
|
+
return openBlock(), createBlock(unref(ProgressRoot), mergeProps(unref(rootProps), {
|
|
44
28
|
class: "progress-track",
|
|
45
29
|
style: { "transform": "translateZ(0)" },
|
|
46
30
|
"data-loading": __props.loading !== false && Number(__props.modelValue) < __props.max ? "" : void 0
|
package/dist/RadioGroup.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { RadioGroupRootProps } from 'reka-ui';
|
|
1
2
|
declare const __VLS_export: <T extends {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
}>(__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<{
|
|
6
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
7
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(Pick<RadioGroupRootProps, "required" | "name" | "orientation" | "dir" | "loop"> & {
|
|
7
8
|
items: Array<string | T>;
|
|
8
9
|
defaultValue?: string;
|
|
9
10
|
label?: string;
|
package/dist/RadioGroup.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useForwardToRoot } from "./forward-root-DPGTBptG.js";
|
|
1
2
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
3
|
import { RadioGroupIndicator, RadioGroupItem, RadioGroupRoot, useId } from "reka-ui";
|
|
3
4
|
//#region src/components/RadioGroup/RadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -11,57 +12,42 @@ const _hoisted_2 = ["for", "aria-disabled"];
|
|
|
11
12
|
var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
12
13
|
__name: "RadioGroup",
|
|
13
14
|
props: /* @__PURE__ */ mergeModels({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
defaultValue: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: false
|
|
21
|
-
},
|
|
22
|
-
label: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: false
|
|
25
|
-
},
|
|
26
|
-
labelVisible: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
row: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
required: false
|
|
33
|
-
},
|
|
34
|
-
disabledValues: {
|
|
35
|
-
type: Array,
|
|
36
|
-
required: false
|
|
37
|
-
},
|
|
38
|
-
disabled: {
|
|
15
|
+
orientation: {},
|
|
16
|
+
dir: {},
|
|
17
|
+
loop: {
|
|
39
18
|
type: Boolean,
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
class: {
|
|
43
|
-
type: [String, Object],
|
|
44
|
-
required: false
|
|
19
|
+
default: void 0
|
|
45
20
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
required: false
|
|
49
|
-
},
|
|
50
|
-
verticalMiddle: {
|
|
21
|
+
name: {},
|
|
22
|
+
required: {
|
|
51
23
|
type: Boolean,
|
|
52
|
-
|
|
24
|
+
default: void 0
|
|
53
25
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
26
|
+
items: {},
|
|
27
|
+
defaultValue: {},
|
|
28
|
+
label: {},
|
|
29
|
+
labelVisible: { type: Boolean },
|
|
30
|
+
row: { type: Boolean },
|
|
31
|
+
disabledValues: {},
|
|
32
|
+
disabled: { type: Boolean },
|
|
33
|
+
class: {},
|
|
34
|
+
error: { type: [String, Boolean] },
|
|
35
|
+
verticalMiddle: { type: Boolean },
|
|
36
|
+
reverse: { type: Boolean }
|
|
58
37
|
}, {
|
|
59
|
-
"modelValue": {
|
|
38
|
+
"modelValue": {},
|
|
60
39
|
"modelModifiers": {}
|
|
61
40
|
}),
|
|
62
41
|
emits: ["update:modelValue"],
|
|
63
42
|
setup(__props) {
|
|
64
43
|
const props = __props;
|
|
44
|
+
const rootProps = useForwardToRoot(RadioGroupRoot, props, void 0, [
|
|
45
|
+
"modelValue",
|
|
46
|
+
"defaultValue",
|
|
47
|
+
"disabled",
|
|
48
|
+
"asChild",
|
|
49
|
+
"as"
|
|
50
|
+
]);
|
|
65
51
|
const _items = computed(() => {
|
|
66
52
|
return props.items.map((item) => typeof item === "string" ? {
|
|
67
53
|
value: item,
|
|
@@ -75,17 +61,17 @@ var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
75
61
|
}
|
|
76
62
|
return (_ctx, _cache) => {
|
|
77
63
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["rb-container", __props.class]) }, [
|
|
78
|
-
!!__props.label && __props.labelVisible ? (openBlock(), createElementBlock("label", _hoisted_1, toDisplayString(__props.label), 1)) : createCommentVNode("
|
|
79
|
-
createVNode(unref(RadioGroupRoot), {
|
|
64
|
+
!!__props.label && __props.labelVisible ? (openBlock(), createElementBlock("label", _hoisted_1, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
65
|
+
createVNode(unref(RadioGroupRoot), mergeProps(unref(rootProps), {
|
|
80
66
|
modelValue: modelValue.value,
|
|
81
67
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
82
|
-
class:
|
|
68
|
+
class: ["rb-root", { "rb-row": __props.row }],
|
|
83
69
|
"default-value": __props.defaultValue,
|
|
84
70
|
"aria-label": __props.label,
|
|
85
71
|
disabled: __props.disabled,
|
|
86
72
|
"data-error": !!__props.error,
|
|
87
73
|
"aria-disabled": __props.disabled
|
|
88
|
-
}, {
|
|
74
|
+
}), {
|
|
89
75
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_items.value, (item) => {
|
|
90
76
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["rb-item-wrapper", {
|
|
91
77
|
"items-center": __props.verticalMiddle,
|
|
@@ -114,7 +100,7 @@ var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
114
100
|
}, [renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, item), () => [createTextVNode(toDisplayString(item.label), 1)])], 8, _hoisted_2)], 2);
|
|
115
101
|
}), 256))]),
|
|
116
102
|
_: 3
|
|
117
|
-
},
|
|
103
|
+
}, 16, [
|
|
118
104
|
"modelValue",
|
|
119
105
|
"class",
|
|
120
106
|
"default-value",
|
|
@@ -126,7 +112,7 @@ var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
126
112
|
!!__props.error && typeof __props.error === "string" ? (openBlock(), createElementBlock("div", {
|
|
127
113
|
key: 1,
|
|
128
114
|
class: normalizeClass(["text-caption text-error-500 text-mt-0", { "text-right": __props.reverse }])
|
|
129
|
-
}, toDisplayString(__props.error), 3)) : createCommentVNode("
|
|
115
|
+
}, toDisplayString(__props.error), 3)) : createCommentVNode("", true)
|
|
130
116
|
], 2);
|
|
131
117
|
};
|
|
132
118
|
}
|
package/dist/Select.d.mts
CHANGED
|
@@ -64,10 +64,25 @@ interface TSelectItem {
|
|
|
64
64
|
disabled?: boolean;
|
|
65
65
|
}
|
|
66
66
|
type TSelectItems<T extends TSelectItem = TSelectItem> = Array<T | string> | Record<string, Array<T | string>>;
|
|
67
|
-
|
|
67
|
+
/** Select model: a string, or an array of strings with `multiple` */
|
|
68
|
+
type TSelectModel<M extends boolean = false> = M extends true ? string[] : string;
|
|
69
|
+
interface TSelectBaseProps<T extends TSelectItem, M extends boolean = false> {
|
|
68
70
|
required?: boolean;
|
|
69
71
|
disabledValues?: Array<string | null | undefined>;
|
|
70
|
-
|
|
72
|
+
/** Initial value when uncontrolled (an array with `multiple`). */
|
|
73
|
+
defaultValue?: TSelectModel<M> | null | undefined;
|
|
74
|
+
/** Initial open state when `v-model:open` is not used. */
|
|
75
|
+
defaultOpen?: boolean;
|
|
76
|
+
/** Allow selecting several values; the model becomes an array. */
|
|
77
|
+
multiple?: M;
|
|
78
|
+
/** Compare values by a field or a function (forwarded to Reka `SelectRoot`). */
|
|
79
|
+
by?: string | ((a: unknown, b: unknown) => boolean);
|
|
80
|
+
/** Reading direction (forwarded to Reka `SelectRoot`). */
|
|
81
|
+
dir?: 'ltr' | 'rtl';
|
|
82
|
+
/** Native `autocomplete` of the hidden form select. */
|
|
83
|
+
autocomplete?: string;
|
|
84
|
+
/** Form field name: the value is submitted with the enclosing `<form>`. */
|
|
85
|
+
name?: string;
|
|
71
86
|
popupClass?: string | Record<string, boolean>;
|
|
72
87
|
popupRound?: boolean;
|
|
73
88
|
valueClass?: string | Record<string, boolean>;
|
|
@@ -84,9 +99,10 @@ interface TSelectBaseProps<T extends TSelectItem> {
|
|
|
84
99
|
}
|
|
85
100
|
|
|
86
101
|
|
|
87
|
-
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<{
|
|
88
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<(Omit<TInputProps & TInputBaseProps, "active"> & TSelectBaseProps<T> & {
|
|
89
|
-
modelValue?:
|
|
102
|
+
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<{
|
|
103
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(Omit<TInputProps & TInputBaseProps, "active"> & TSelectBaseProps<T, M> & {
|
|
104
|
+
modelValue?: TSelectModel<M>;
|
|
105
|
+
open?: boolean;
|
|
90
106
|
}) & {
|
|
91
107
|
onPrependClick?: ((event: MouseEvent) => any) | undefined;
|
|
92
108
|
onAppendClick?: ((event: MouseEvent) => any) | undefined;
|
|
@@ -95,14 +111,15 @@ declare const __VLS_export: <T extends TSelectItem>(__VLS_props: NonNullable<Awa
|
|
|
95
111
|
onBeforeClick?: ((event: MouseEvent) => any) | undefined;
|
|
96
112
|
onAfterClick?: ((event: MouseEvent) => any) | undefined;
|
|
97
113
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
98
|
-
"onUpdate:
|
|
114
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
115
|
+
"onUpdate:modelValue"?: ((value: TSelectModel<M> | undefined) => any) | undefined;
|
|
99
116
|
}> & (typeof globalThis extends {
|
|
100
117
|
__VLS_PROPS_FALLBACK: infer P;
|
|
101
118
|
} ? P : {});
|
|
102
119
|
expose: (exposed: {}) => void;
|
|
103
120
|
attrs: any;
|
|
104
121
|
slots: {};
|
|
105
|
-
emit: TInputEmits & ((event: "update:modelValue", value:
|
|
122
|
+
emit: TInputEmits & (((event: "update:open", value: boolean) => void) & ((event: "update:modelValue", value: TSelectModel<M> | undefined) => void));
|
|
106
123
|
}>) => import("vue").VNode & {
|
|
107
124
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
108
125
|
};
|
package/dist/Select.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useForwardToRoot } from "./forward-root-DPGTBptG.js";
|
|
2
|
+
import { computed, createBlock, createVNode, defineComponent, mergeModels, mergeProps, openBlock, unref, useModel, withCtx } from "vue";
|
|
3
|
+
import { SelectRoot, SelectTrigger, SelectValue } from "reka-ui";
|
|
3
4
|
import { useInputBaseProps, useInputProps } from "vunor";
|
|
4
5
|
import VuInput from "vunor/Input";
|
|
5
6
|
import VuInputBase from "vunor/InputBase";
|
|
@@ -7,180 +8,67 @@ import VuSelectBase from "vunor/SelectBase";
|
|
|
7
8
|
//#endregion
|
|
8
9
|
//#region src/components/Select/Select.vue
|
|
9
10
|
var Select_default = /* @__PURE__ */ defineComponent({
|
|
11
|
+
inheritAttrs: false,
|
|
10
12
|
__name: "Select",
|
|
11
13
|
props: /* @__PURE__ */ mergeModels({
|
|
12
|
-
iconBefore: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
14
|
+
iconBefore: {},
|
|
15
|
+
iconAfter: {},
|
|
16
|
+
error: { type: [String, Boolean] },
|
|
17
|
+
hint: {},
|
|
18
|
+
groupTemplate: {},
|
|
19
|
+
stackLabel: { type: Boolean },
|
|
20
|
+
onBeforeClick: {},
|
|
21
|
+
onAfterClick: {},
|
|
22
|
+
onClick: {},
|
|
23
|
+
onBlur: {},
|
|
24
|
+
onFocus: {},
|
|
25
|
+
label: {},
|
|
26
|
+
design: {},
|
|
27
|
+
iconPrepend: {},
|
|
28
|
+
iconAppend: {},
|
|
29
|
+
groupItem: { type: Boolean },
|
|
30
|
+
autoGrow: { type: Boolean },
|
|
31
|
+
loading: { type: Boolean },
|
|
32
|
+
noUnderline: { type: Boolean },
|
|
33
|
+
onAppendClick: {},
|
|
34
|
+
onPrependClick: {},
|
|
35
|
+
placeholder: {},
|
|
36
|
+
type: {},
|
|
37
|
+
rows: {},
|
|
38
|
+
required: { type: Boolean },
|
|
39
|
+
maxlength: {},
|
|
40
|
+
disabled: { type: Boolean },
|
|
41
|
+
readonly: { type: Boolean },
|
|
42
|
+
autocomplete: {},
|
|
43
|
+
disabledValues: {},
|
|
44
|
+
defaultValue: {},
|
|
45
|
+
defaultOpen: {
|
|
33
46
|
type: Boolean,
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
label: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: false
|
|
59
|
-
},
|
|
60
|
-
design: {
|
|
61
|
-
type: String,
|
|
62
|
-
required: false
|
|
63
|
-
},
|
|
64
|
-
iconPrepend: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
iconAppend: {
|
|
69
|
-
type: String,
|
|
70
|
-
required: false
|
|
71
|
-
},
|
|
72
|
-
groupItem: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
required: false
|
|
75
|
-
},
|
|
76
|
-
autoGrow: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
required: false
|
|
79
|
-
},
|
|
80
|
-
loading: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
required: false
|
|
83
|
-
},
|
|
84
|
-
noUnderline: {
|
|
85
|
-
type: Boolean,
|
|
86
|
-
required: false
|
|
87
|
-
},
|
|
88
|
-
onAppendClick: {
|
|
89
|
-
type: Function,
|
|
90
|
-
required: false
|
|
91
|
-
},
|
|
92
|
-
onPrependClick: {
|
|
93
|
-
type: Function,
|
|
94
|
-
required: false
|
|
95
|
-
},
|
|
96
|
-
placeholder: {
|
|
97
|
-
type: String,
|
|
98
|
-
required: false
|
|
99
|
-
},
|
|
100
|
-
type: {
|
|
101
|
-
type: String,
|
|
102
|
-
required: false
|
|
103
|
-
},
|
|
104
|
-
rows: {
|
|
105
|
-
type: Number,
|
|
106
|
-
required: false
|
|
107
|
-
},
|
|
108
|
-
required: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
required: false
|
|
111
|
-
},
|
|
112
|
-
maxlength: {
|
|
113
|
-
type: Number,
|
|
114
|
-
required: false
|
|
115
|
-
},
|
|
116
|
-
disabled: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
required: false
|
|
119
|
-
},
|
|
120
|
-
readonly: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
required: false
|
|
123
|
-
},
|
|
124
|
-
autocomplete: {
|
|
125
|
-
type: String,
|
|
126
|
-
required: false
|
|
127
|
-
},
|
|
128
|
-
disabledValues: {
|
|
129
|
-
type: Array,
|
|
130
|
-
required: false
|
|
131
|
-
},
|
|
132
|
-
defaultValue: {
|
|
133
|
-
type: null,
|
|
134
|
-
required: false
|
|
135
|
-
},
|
|
136
|
-
popupClass: {
|
|
137
|
-
type: [String, Object],
|
|
138
|
-
required: false
|
|
139
|
-
},
|
|
140
|
-
popupRound: {
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
multiple: { default: void 0 },
|
|
50
|
+
by: {},
|
|
51
|
+
dir: {},
|
|
52
|
+
name: {},
|
|
53
|
+
popupClass: {},
|
|
54
|
+
popupRound: { type: Boolean },
|
|
55
|
+
valueClass: {},
|
|
56
|
+
iconClass: {},
|
|
57
|
+
class: {},
|
|
58
|
+
items: {},
|
|
59
|
+
popupPosition: {},
|
|
60
|
+
side: {},
|
|
61
|
+
sideOffset: { default: 2 },
|
|
62
|
+
sticky: {},
|
|
63
|
+
updatePositionStrategy: {}
|
|
64
|
+
}, {
|
|
65
|
+
"modelValue": {},
|
|
66
|
+
"modelModifiers": {},
|
|
67
|
+
"open": {
|
|
141
68
|
type: Boolean,
|
|
142
|
-
|
|
69
|
+
default: void 0
|
|
143
70
|
},
|
|
144
|
-
|
|
145
|
-
type: [String, Object],
|
|
146
|
-
required: false
|
|
147
|
-
},
|
|
148
|
-
iconClass: {
|
|
149
|
-
type: [String, Object],
|
|
150
|
-
required: false
|
|
151
|
-
},
|
|
152
|
-
class: {
|
|
153
|
-
type: [String, Object],
|
|
154
|
-
required: false
|
|
155
|
-
},
|
|
156
|
-
items: {
|
|
157
|
-
type: [Array, Object],
|
|
158
|
-
required: true
|
|
159
|
-
},
|
|
160
|
-
popupPosition: {
|
|
161
|
-
type: String,
|
|
162
|
-
required: false
|
|
163
|
-
},
|
|
164
|
-
side: {
|
|
165
|
-
type: String,
|
|
166
|
-
required: false
|
|
167
|
-
},
|
|
168
|
-
sideOffset: {
|
|
169
|
-
type: Number,
|
|
170
|
-
required: false,
|
|
171
|
-
default: 2
|
|
172
|
-
},
|
|
173
|
-
sticky: {
|
|
174
|
-
type: String,
|
|
175
|
-
required: false
|
|
176
|
-
},
|
|
177
|
-
updatePositionStrategy: {
|
|
178
|
-
type: String,
|
|
179
|
-
required: false
|
|
180
|
-
}
|
|
181
|
-
}, {
|
|
182
|
-
"modelValue": { type: String },
|
|
183
|
-
"modelModifiers": {}
|
|
71
|
+
"openModifiers": {}
|
|
184
72
|
}),
|
|
185
73
|
emits: /* @__PURE__ */ mergeModels([
|
|
186
74
|
"beforeClick",
|
|
@@ -190,43 +78,57 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
190
78
|
"appendClick",
|
|
191
79
|
"blur",
|
|
192
80
|
"focus"
|
|
193
|
-
], ["update:modelValue"]),
|
|
81
|
+
], ["update:modelValue", "update:open"]),
|
|
194
82
|
setup(__props) {
|
|
195
83
|
const props = __props;
|
|
84
|
+
const inputProps = useInputProps();
|
|
85
|
+
const inputBaseProps = useInputBaseProps();
|
|
196
86
|
const forwardProps = computed(() => {
|
|
197
|
-
if (props.groupItem) return
|
|
198
|
-
|
|
87
|
+
if (props.groupItem) return {
|
|
88
|
+
...inputBaseProps?.value,
|
|
89
|
+
onClick: props.onClick
|
|
90
|
+
};
|
|
91
|
+
return inputProps?.value;
|
|
199
92
|
});
|
|
200
93
|
const modelValue = useModel(__props, "modelValue");
|
|
94
|
+
const open = useModel(__props, "open");
|
|
95
|
+
const rootProps = useForwardToRoot(SelectRoot, props, void 0, [
|
|
96
|
+
"modelValue",
|
|
97
|
+
"open",
|
|
98
|
+
"disabled",
|
|
99
|
+
"required"
|
|
100
|
+
]);
|
|
201
101
|
function onFocus(event) {
|
|
202
102
|
event.target?.querySelector?.("input")?.focus();
|
|
203
103
|
}
|
|
204
104
|
return (_ctx, _cache) => {
|
|
205
|
-
return openBlock(), createBlock(VuSelectBase, {
|
|
105
|
+
return openBlock(), createBlock(VuSelectBase, mergeProps(unref(rootProps), {
|
|
106
|
+
multiple: __props.multiple,
|
|
206
107
|
modelValue: modelValue.value,
|
|
207
108
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
109
|
+
open: open.value,
|
|
110
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => open.value = $event),
|
|
208
111
|
"disabled-values": __props.disabledValues,
|
|
209
112
|
"popup-class": __props.popupClass,
|
|
210
113
|
"popup-round": __props.popupRound,
|
|
211
114
|
"value-class": __props.valueClass,
|
|
212
115
|
"icon-class": __props.iconClass,
|
|
213
|
-
class:
|
|
116
|
+
class: __props.class,
|
|
214
117
|
items: __props.items,
|
|
215
118
|
required: __props.required,
|
|
216
119
|
disabled: __props.disabled,
|
|
217
120
|
placeholder: __props.placeholder,
|
|
218
|
-
defaultValue: __props.defaultValue,
|
|
219
121
|
popupPosition: __props.popupPosition,
|
|
220
122
|
side: __props.side,
|
|
221
123
|
sideOffset: __props.sideOffset,
|
|
222
124
|
sticky: __props.sticky,
|
|
223
125
|
updatePositionStrategy: __props.updatePositionStrategy
|
|
224
|
-
}, {
|
|
225
|
-
default: withCtx((s) => [__props.groupItem ? (openBlock(), createBlock(unref(SelectTrigger), {
|
|
126
|
+
}), {
|
|
127
|
+
default: withCtx((s) => [__props.groupItem ? (openBlock(), createBlock(unref(SelectTrigger), mergeProps({
|
|
226
128
|
key: 0,
|
|
227
129
|
"as-child": ""
|
|
228
|
-
}, {
|
|
229
|
-
default: withCtx(() => [
|
|
130
|
+
}, _ctx.$attrs, { class: __props.class }), {
|
|
131
|
+
default: withCtx(() => [createVNode(VuInputBase, mergeProps({ class: "cursor-pointer select-none" }, forwardProps.value, {
|
|
230
132
|
"icon-append": typeof __props.iconAppend === "string" ? __props.iconAppend : s.icon,
|
|
231
133
|
"model-value": s.displayItem?.label || s.displayItem?.value,
|
|
232
134
|
active: s.open,
|
|
@@ -244,7 +146,13 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
244
146
|
"onClick"
|
|
245
147
|
])]),
|
|
246
148
|
_: 2
|
|
247
|
-
},
|
|
149
|
+
}, 1040, ["class"])) : (openBlock(), createBlock(VuInput, mergeProps({
|
|
150
|
+
key: 1,
|
|
151
|
+
class: ["select-none", __props.class]
|
|
152
|
+
}, {
|
|
153
|
+
..._ctx.$attrs,
|
|
154
|
+
...forwardProps.value
|
|
155
|
+
}, {
|
|
248
156
|
"icon-append": typeof __props.iconAppend === "string" ? __props.iconAppend : s.icon,
|
|
249
157
|
"model-value": s.displayItem?.label || s.displayItem?.value,
|
|
250
158
|
active: s.open,
|
|
@@ -253,7 +161,7 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
253
161
|
onClick: s.openPopup
|
|
254
162
|
}), {
|
|
255
163
|
default: withCtx((shellProps) => [createVNode(unref(SelectTrigger), { "as-child": "" }, {
|
|
256
|
-
default: withCtx(() => [
|
|
164
|
+
default: withCtx(() => [createVNode(VuInputBase, mergeProps({ class: "cursor-pointer select-none" }, shellProps, {
|
|
257
165
|
"model-value": s.displayItem?.label || s.displayItem?.value,
|
|
258
166
|
readonly: "",
|
|
259
167
|
type: "text",
|
|
@@ -267,15 +175,18 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
267
175
|
}, 1024)]),
|
|
268
176
|
_: 2
|
|
269
177
|
}, 1040, [
|
|
178
|
+
"class",
|
|
270
179
|
"icon-append",
|
|
271
180
|
"model-value",
|
|
272
181
|
"active",
|
|
273
182
|
"stack-label",
|
|
274
183
|
"onClick"
|
|
275
|
-
])
|
|
184
|
+
]))]),
|
|
276
185
|
_: 1
|
|
277
|
-
},
|
|
186
|
+
}, 16, [
|
|
187
|
+
"multiple",
|
|
278
188
|
"modelValue",
|
|
189
|
+
"open",
|
|
279
190
|
"disabled-values",
|
|
280
191
|
"popup-class",
|
|
281
192
|
"popup-round",
|
|
@@ -286,7 +197,6 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
286
197
|
"required",
|
|
287
198
|
"disabled",
|
|
288
199
|
"placeholder",
|
|
289
|
-
"defaultValue",
|
|
290
200
|
"popupPosition",
|
|
291
201
|
"side",
|
|
292
202
|
"sideOffset",
|