vunor 0.3.2 → 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 +6 -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 +15 -4
- 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
|
@@ -5,11 +5,7 @@ const _hoisted_1 = ["width", "height"];
|
|
|
5
5
|
//#region src/components/Loading/LoadingIndicator.vue
|
|
6
6
|
var LoadingIndicator_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "LoadingIndicator",
|
|
8
|
-
props: { size: {
|
|
9
|
-
type: String,
|
|
10
|
-
required: false,
|
|
11
|
-
default: "1em"
|
|
12
|
-
} },
|
|
8
|
+
props: { size: { default: "1em" } },
|
|
13
9
|
setup(__props) {
|
|
14
10
|
return (_ctx, _cache) => {
|
|
15
11
|
return openBlock(), createElementBlock("svg", {
|
package/dist/Menu.mjs
CHANGED
|
@@ -14,16 +14,10 @@ const _hoisted_3 = { class: "text-caption fw-bold" };
|
|
|
14
14
|
var Menu_default = /* @__PURE__ */ defineComponent({
|
|
15
15
|
__name: "Menu",
|
|
16
16
|
props: /* @__PURE__ */ mergeModels({
|
|
17
|
-
items: {
|
|
18
|
-
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
emptyText: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: false
|
|
24
|
-
}
|
|
17
|
+
items: {},
|
|
18
|
+
emptyText: {}
|
|
25
19
|
}, {
|
|
26
|
-
"modelValue": {
|
|
20
|
+
"modelValue": {},
|
|
27
21
|
"modelModifiers": {}
|
|
28
22
|
}),
|
|
29
23
|
emits: ["update:modelValue"],
|
|
@@ -61,63 +55,48 @@ var Menu_default = /* @__PURE__ */ defineComponent({
|
|
|
61
55
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
62
56
|
class: "menu-root"
|
|
63
57
|
}, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
dismissable: false
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1, [
|
|
81
|
-
createCommentVNode(" empty "),
|
|
82
|
-
_ctx.$slots.empty || __props.emptyText ? (openBlock(), createBlock(unref(ComboboxEmpty), { key: 0 }, {
|
|
83
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "empty", {}, () => [!!__props.emptyText ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.emptyText), 1)) : createCommentVNode("v-if", true)])]),
|
|
84
|
-
_: 3
|
|
85
|
-
})) : createCommentVNode("v-if", true),
|
|
86
|
-
createCommentVNode(" group "),
|
|
87
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (grp) => {
|
|
88
|
-
return openBlock(), createBlock(unref(ComboboxGroup), { class: "" }, {
|
|
89
|
-
default: withCtx(() => [
|
|
90
|
-
grp.group ? (openBlock(), createBlock(unref(ComboboxLabel), {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "px-$m text-mt-$l text-mb-$m"
|
|
93
|
-
}, {
|
|
94
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_3, toDisplayString(grp.group), 1)]),
|
|
95
|
-
_: 2
|
|
96
|
-
}, 1024)) : createCommentVNode("v-if", true),
|
|
97
|
-
createCommentVNode(" command item "),
|
|
98
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(grp.items, (item) => {
|
|
99
|
-
return openBlock(), createBlock(unref(ComboboxItem), {
|
|
100
|
-
value: item.value,
|
|
101
|
-
icon: item.icon,
|
|
102
|
-
label: item.label,
|
|
103
|
-
selected: modelValue.value === item.value,
|
|
104
|
-
as: VuMenuItem
|
|
105
|
-
}, null, 8, [
|
|
106
|
-
"value",
|
|
107
|
-
"icon",
|
|
108
|
-
"label",
|
|
109
|
-
"selected"
|
|
110
|
-
]);
|
|
111
|
-
}), 256))
|
|
112
|
-
]),
|
|
113
|
-
_: 2
|
|
114
|
-
}, 1024);
|
|
115
|
-
}), 256)),
|
|
116
|
-
createCommentVNode(" ")
|
|
117
|
-
])]),
|
|
58
|
+
default: withCtx(() => [createVNode(unref(ComboboxInput), {
|
|
59
|
+
"auto-focus": "",
|
|
60
|
+
design: "flat",
|
|
61
|
+
"icon-prepend": "i--search",
|
|
62
|
+
class: "px-$m mb-$s",
|
|
63
|
+
placeholder: "Search",
|
|
64
|
+
as: VuInput,
|
|
65
|
+
onKeydown: withKeys(handleHomeEnd, ["home", "end"])
|
|
66
|
+
}), createVNode(unref(ComboboxContent), {
|
|
67
|
+
class: "overflow-y-auto overflow-x-hidden",
|
|
68
|
+
dismissable: false
|
|
69
|
+
}, {
|
|
70
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [_ctx.$slots.empty || __props.emptyText ? (openBlock(), createBlock(unref(ComboboxEmpty), { key: 0 }, {
|
|
71
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "empty", {}, () => [!!__props.emptyText ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.emptyText), 1)) : createCommentVNode("", true)])]),
|
|
118
72
|
_: 3
|
|
119
|
-
})
|
|
120
|
-
|
|
73
|
+
})) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (grp) => {
|
|
74
|
+
return openBlock(), createBlock(unref(ComboboxGroup), { class: "" }, {
|
|
75
|
+
default: withCtx(() => [grp.group ? (openBlock(), createBlock(unref(ComboboxLabel), {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "px-$m text-mt-$l text-mb-$m"
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_3, toDisplayString(grp.group), 1)]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1024)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(grp.items, (item) => {
|
|
82
|
+
return openBlock(), createBlock(unref(ComboboxItem), {
|
|
83
|
+
value: item.value,
|
|
84
|
+
icon: item.icon,
|
|
85
|
+
label: item.label,
|
|
86
|
+
selected: modelValue.value === item.value,
|
|
87
|
+
as: VuMenuItem
|
|
88
|
+
}, null, 8, [
|
|
89
|
+
"value",
|
|
90
|
+
"icon",
|
|
91
|
+
"label",
|
|
92
|
+
"selected"
|
|
93
|
+
]);
|
|
94
|
+
}), 256))]),
|
|
95
|
+
_: 2
|
|
96
|
+
}, 1024);
|
|
97
|
+
}), 256))])]),
|
|
98
|
+
_: 3
|
|
99
|
+
})]),
|
|
121
100
|
_: 3
|
|
122
101
|
});
|
|
123
102
|
};
|
package/dist/MenuItem.mjs
CHANGED
|
@@ -5,22 +5,10 @@ import VuButton from "vunor/Button";
|
|
|
5
5
|
var MenuItem_default = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "MenuItem",
|
|
7
7
|
props: {
|
|
8
|
-
icon: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
selected: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
required: false
|
|
15
|
-
},
|
|
16
|
-
label: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: false
|
|
19
|
-
},
|
|
20
|
-
ariaSelected: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
required: false
|
|
23
|
-
}
|
|
8
|
+
icon: {},
|
|
9
|
+
selected: { type: Boolean },
|
|
10
|
+
label: {},
|
|
11
|
+
ariaSelected: { type: Boolean }
|
|
24
12
|
},
|
|
25
13
|
setup(__props) {
|
|
26
14
|
return (_ctx, _cache) => {
|
|
@@ -7,14 +7,8 @@ const _hoisted_1 = { class: "whitespace-nowrap" };
|
|
|
7
7
|
var OverflowContainer_default = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "OverflowContainer",
|
|
9
9
|
props: {
|
|
10
|
-
items: {
|
|
11
|
-
|
|
12
|
-
required: true
|
|
13
|
-
},
|
|
14
|
-
maxVisible: {
|
|
15
|
-
type: Number,
|
|
16
|
-
required: false
|
|
17
|
-
}
|
|
10
|
+
items: {},
|
|
11
|
+
maxVisible: {}
|
|
18
12
|
},
|
|
19
13
|
setup(__props) {
|
|
20
14
|
const props = __props;
|
|
@@ -58,9 +52,13 @@ var OverflowContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
58
52
|
hiddenCount.value = typeof i === "number" ? i : Math.max(0, props.items.length - (props.maxVisible ?? 999));
|
|
59
53
|
await nextTick();
|
|
60
54
|
const rootWidth = root.value.$el.getBoundingClientRect().width;
|
|
55
|
+
if (rootWidth === 0) {
|
|
56
|
+
busy = false;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
61
59
|
let itFits = false;
|
|
62
60
|
let additional = 1;
|
|
63
|
-
while (!itFits) {
|
|
61
|
+
while (!itFits && hiddenCount.value < props.items.length) {
|
|
64
62
|
itFits = true;
|
|
65
63
|
const children = root.value.$el.children;
|
|
66
64
|
const firstLeft = children[0]?.getBoundingClientRect().left;
|
|
@@ -68,7 +66,7 @@ var OverflowContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
68
66
|
const { left, width } = children[j].getBoundingClientRect();
|
|
69
67
|
if (left + width - firstLeft >= rootWidth) {
|
|
70
68
|
itFits = false;
|
|
71
|
-
hiddenCount.value = props.items.length - (j + 1) + (hiddenCount.value > 0 ? additional : 1);
|
|
69
|
+
hiddenCount.value = Math.min(props.items.length, props.items.length - (j + 1) + (hiddenCount.value > 0 ? additional : 1));
|
|
72
70
|
if (additional === 1) additional = 2;
|
|
73
71
|
await nextTick();
|
|
74
72
|
break;
|
|
@@ -91,7 +89,7 @@ var OverflowContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
91
89
|
key: 0,
|
|
92
90
|
count: hiddenCount.value,
|
|
93
91
|
items: hiddenItems.value
|
|
94
|
-
}, () => [createElementVNode("span", _hoisted_1, toDisplayString(hiddenCount.value) + " more...", 1)]) : createCommentVNode("
|
|
92
|
+
}, () => [createElementVNode("span", _hoisted_1, toDisplayString(hiddenCount.value) + " more...", 1)]) : createCommentVNode("", true)]),
|
|
95
93
|
_: 3
|
|
96
94
|
}, 512);
|
|
97
95
|
};
|
package/dist/Pagination.mjs
CHANGED
|
@@ -6,32 +6,14 @@ import VuIcon from "vunor/Icon";
|
|
|
6
6
|
var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "Pagination",
|
|
8
8
|
props: /* @__PURE__ */ mergeModels({
|
|
9
|
-
total: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
required: false
|
|
16
|
-
},
|
|
17
|
-
showEdges: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
siblingCount: {
|
|
22
|
-
type: Number,
|
|
23
|
-
required: false
|
|
24
|
-
},
|
|
25
|
-
itemsPerPage: {
|
|
26
|
-
type: Number,
|
|
27
|
-
required: false
|
|
28
|
-
},
|
|
29
|
-
showArrows: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
required: false
|
|
32
|
-
}
|
|
9
|
+
total: {},
|
|
10
|
+
defaultPage: {},
|
|
11
|
+
showEdges: { type: Boolean },
|
|
12
|
+
siblingCount: {},
|
|
13
|
+
itemsPerPage: {},
|
|
14
|
+
showArrows: { type: Boolean }
|
|
33
15
|
}, {
|
|
34
|
-
"modelValue": {
|
|
16
|
+
"modelValue": {},
|
|
35
17
|
"modelModifiers": {}
|
|
36
18
|
}),
|
|
37
19
|
emits: /* @__PURE__ */ mergeModels(["update:page"], ["update:modelValue"]),
|
|
@@ -59,7 +41,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
59
41
|
class: "btn-icon btn-icon-left"
|
|
60
42
|
})]),
|
|
61
43
|
_: 1
|
|
62
|
-
})) : createCommentVNode("
|
|
44
|
+
})) : createCommentVNode("", true),
|
|
63
45
|
__props.showArrows ? (openBlock(), createBlock(unref(PaginationPrev), {
|
|
64
46
|
key: 1,
|
|
65
47
|
class: "btn btn-square c8-flat disabled-soft mr-4"
|
|
@@ -69,7 +51,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
69
51
|
class: "btn-icon btn-icon-left"
|
|
70
52
|
})]),
|
|
71
53
|
_: 1
|
|
72
|
-
})) : createCommentVNode("
|
|
54
|
+
})) : createCommentVNode("", true),
|
|
73
55
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (page, index) => {
|
|
74
56
|
return openBlock(), createElementBlock(Fragment, null, [page.type === "page" ? (openBlock(), createBlock(unref(PaginationListItem), {
|
|
75
57
|
key: index,
|
|
@@ -96,7 +78,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
96
78
|
class: "btn-icon btn-icon-left"
|
|
97
79
|
})]),
|
|
98
80
|
_: 1
|
|
99
|
-
})) : createCommentVNode("
|
|
81
|
+
})) : createCommentVNode("", true),
|
|
100
82
|
!__props.showEdges && __props.showArrows ? (openBlock(), createBlock(unref(PaginationLast), {
|
|
101
83
|
key: 3,
|
|
102
84
|
class: "btn btn-square c8-flat disabled-soft"
|
|
@@ -106,7 +88,7 @@ var Pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
106
88
|
class: "btn-icon btn-icon-left"
|
|
107
89
|
})]),
|
|
108
90
|
_: 1
|
|
109
|
-
})) : createCommentVNode("
|
|
91
|
+
})) : createCommentVNode("", true)
|
|
110
92
|
]),
|
|
111
93
|
_: 1
|
|
112
94
|
})]),
|
package/dist/Popover.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PopoverContentProps } from 'reka-ui';
|
|
2
|
-
type __VLS_Props = PopoverContentProps & {
|
|
1
|
+
import type { PopoverContentProps, PopoverRootProps } from 'reka-ui';
|
|
2
|
+
type __VLS_Props = PopoverContentProps & Pick<PopoverRootProps, 'defaultOpen' | 'modal'> & {
|
|
3
3
|
class?: string | Record<string, boolean>;
|
|
4
4
|
icon?: string;
|
|
5
5
|
label?: string;
|
|
@@ -9,27 +9,55 @@ declare function open(): void;
|
|
|
9
9
|
declare function close(): void;
|
|
10
10
|
type __VLS_ModelProps = {
|
|
11
11
|
modelValue?: boolean;
|
|
12
|
+
'open'?: boolean;
|
|
12
13
|
};
|
|
13
14
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
15
|
-
isOpen: boolean
|
|
15
|
+
declare var __VLS_16: {
|
|
16
|
+
isOpen: boolean;
|
|
16
17
|
close: typeof close;
|
|
17
18
|
open: typeof open;
|
|
18
|
-
},
|
|
19
|
-
isOpen: boolean
|
|
19
|
+
}, __VLS_35: {
|
|
20
|
+
isOpen: boolean;
|
|
20
21
|
close: typeof close;
|
|
21
22
|
open: typeof open;
|
|
22
23
|
};
|
|
23
24
|
type __VLS_Slots = {} & {
|
|
24
|
-
default?: (props: typeof
|
|
25
|
+
default?: (props: typeof __VLS_16) => any;
|
|
25
26
|
} & {
|
|
26
|
-
content?: (props: typeof
|
|
27
|
+
content?: (props: typeof __VLS_35) => any;
|
|
27
28
|
};
|
|
28
29
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
-
|
|
30
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
31
|
+
"update:open": (value: boolean) => any;
|
|
32
|
+
"update:modelValue": (value: boolean) => any;
|
|
33
|
+
pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
|
|
34
|
+
focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
|
|
35
|
+
interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
|
|
36
|
+
openAutoFocus: (event: Event) => any;
|
|
37
|
+
closeAutoFocus: (event: Event) => any;
|
|
30
38
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
40
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
41
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
|
|
43
|
+
onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
44
|
+
onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
45
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
46
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
asChild: boolean;
|
|
49
|
+
defaultOpen: boolean;
|
|
50
|
+
forceMount: boolean;
|
|
51
|
+
sideFlip: boolean;
|
|
52
|
+
alignFlip: boolean;
|
|
53
|
+
avoidCollisions: boolean;
|
|
54
|
+
hideShiftedArrow: boolean;
|
|
55
|
+
hideWhenDetached: boolean;
|
|
56
|
+
disableUpdateOnLayoutShift: boolean;
|
|
57
|
+
prioritizePosition: boolean;
|
|
58
|
+
disableOutsidePointerEvents: boolean;
|
|
59
|
+
modal: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
61
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
62
|
declare const _default: typeof __VLS_export;
|
|
35
63
|
export default _default;
|
package/dist/Popover.mjs
CHANGED
|
@@ -1,147 +1,128 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as useRootBinding, n as useForwardToRoot, r as useModelState } from "./forward-root-DPGTBptG.js";
|
|
2
|
+
import { computed, createBlock, createElementVNode, createVNode, defineComponent, getCurrentInstance, mergeModels, mergeProps, normalizeClass, openBlock, renderSlot, unref, useModel, withCtx } from "vue";
|
|
2
3
|
import { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from "reka-ui";
|
|
3
4
|
import VuButton from "vunor/Button";
|
|
4
5
|
//#endregion
|
|
5
6
|
//#region src/components/Popover/Popover.vue
|
|
6
7
|
var Popover_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
inheritAttrs: false,
|
|
7
9
|
__name: "Popover",
|
|
8
10
|
props: /* @__PURE__ */ mergeModels({
|
|
9
11
|
forceMount: {
|
|
10
12
|
type: Boolean,
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
side: {
|
|
14
|
-
type: null,
|
|
15
|
-
required: false
|
|
16
|
-
},
|
|
17
|
-
sideOffset: {
|
|
18
|
-
type: Number,
|
|
19
|
-
required: false
|
|
13
|
+
default: void 0
|
|
20
14
|
},
|
|
15
|
+
side: {},
|
|
16
|
+
sideOffset: {},
|
|
21
17
|
sideFlip: {
|
|
22
18
|
type: Boolean,
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
align: {
|
|
26
|
-
type: null,
|
|
27
|
-
required: false
|
|
28
|
-
},
|
|
29
|
-
alignOffset: {
|
|
30
|
-
type: Number,
|
|
31
|
-
required: false
|
|
19
|
+
default: false
|
|
32
20
|
},
|
|
21
|
+
align: {},
|
|
22
|
+
alignOffset: {},
|
|
33
23
|
alignFlip: {
|
|
34
24
|
type: Boolean,
|
|
35
|
-
|
|
25
|
+
default: false
|
|
36
26
|
},
|
|
37
27
|
avoidCollisions: {
|
|
38
28
|
type: Boolean,
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
collisionBoundary: {
|
|
42
|
-
type: null,
|
|
43
|
-
required: false
|
|
44
|
-
},
|
|
45
|
-
collisionPadding: {
|
|
46
|
-
type: [Number, Object],
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
arrowPadding: {
|
|
50
|
-
type: Number,
|
|
51
|
-
required: false
|
|
29
|
+
default: false
|
|
52
30
|
},
|
|
31
|
+
collisionBoundary: {},
|
|
32
|
+
collisionPadding: {},
|
|
33
|
+
arrowPadding: {},
|
|
53
34
|
hideShiftedArrow: {
|
|
54
35
|
type: Boolean,
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
sticky: {
|
|
58
|
-
type: String,
|
|
59
|
-
required: false
|
|
36
|
+
default: false
|
|
60
37
|
},
|
|
38
|
+
sticky: {},
|
|
61
39
|
hideWhenDetached: {
|
|
62
40
|
type: Boolean,
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
positionStrategy: {
|
|
66
|
-
type: String,
|
|
67
|
-
required: false
|
|
68
|
-
},
|
|
69
|
-
updatePositionStrategy: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: false
|
|
41
|
+
default: void 0
|
|
72
42
|
},
|
|
43
|
+
positionStrategy: {},
|
|
44
|
+
updatePositionStrategy: {},
|
|
73
45
|
disableUpdateOnLayoutShift: {
|
|
74
46
|
type: Boolean,
|
|
75
|
-
|
|
47
|
+
default: void 0
|
|
76
48
|
},
|
|
77
49
|
prioritizePosition: {
|
|
78
50
|
type: Boolean,
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
reference: {
|
|
82
|
-
type: null,
|
|
83
|
-
required: false
|
|
51
|
+
default: void 0
|
|
84
52
|
},
|
|
53
|
+
reference: {},
|
|
85
54
|
asChild: {
|
|
86
55
|
type: Boolean,
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
as: {
|
|
90
|
-
type: null,
|
|
91
|
-
required: false
|
|
56
|
+
default: void 0
|
|
92
57
|
},
|
|
58
|
+
as: {},
|
|
93
59
|
disableOutsidePointerEvents: {
|
|
94
60
|
type: Boolean,
|
|
95
|
-
|
|
61
|
+
default: void 0
|
|
96
62
|
},
|
|
97
|
-
|
|
98
|
-
type:
|
|
99
|
-
|
|
63
|
+
defaultOpen: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: void 0
|
|
100
66
|
},
|
|
101
|
-
|
|
102
|
-
type:
|
|
103
|
-
|
|
67
|
+
modal: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: void 0
|
|
104
70
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
71
|
+
class: {},
|
|
72
|
+
icon: {},
|
|
73
|
+
label: {},
|
|
74
|
+
asLink: { type: Boolean }
|
|
75
|
+
}, {
|
|
76
|
+
"modelValue": {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: void 0
|
|
108
79
|
},
|
|
109
|
-
|
|
80
|
+
"modelModifiers": {},
|
|
81
|
+
"open": {
|
|
110
82
|
type: Boolean,
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
"modelValue": { type: Boolean },
|
|
115
|
-
"modelModifiers": {}
|
|
83
|
+
default: void 0
|
|
84
|
+
},
|
|
85
|
+
"openModifiers": {}
|
|
116
86
|
}),
|
|
117
|
-
emits: [
|
|
118
|
-
|
|
87
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
88
|
+
"escapeKeyDown",
|
|
89
|
+
"pointerDownOutside",
|
|
90
|
+
"focusOutside",
|
|
91
|
+
"interactOutside",
|
|
92
|
+
"openAutoFocus",
|
|
93
|
+
"closeAutoFocus"
|
|
94
|
+
], ["update:modelValue", "update:open"]),
|
|
95
|
+
setup(__props, { emit: __emit }) {
|
|
119
96
|
const props = __props;
|
|
120
|
-
const
|
|
121
|
-
const obj = {};
|
|
122
|
-
for (const [key, value] of Object.entries(props)) if (![
|
|
123
|
-
"class",
|
|
124
|
-
"label",
|
|
125
|
-
"icon"
|
|
126
|
-
].includes(key)) obj[key] = value;
|
|
127
|
-
return obj;
|
|
128
|
-
});
|
|
97
|
+
const emit = __emit;
|
|
129
98
|
const modelValue = useModel(__props, "modelValue");
|
|
99
|
+
const openModel = useModel(__props, "open");
|
|
100
|
+
const vm = getCurrentInstance();
|
|
101
|
+
const rawOpen = computed({
|
|
102
|
+
get: () => "open" in (vm?.vnode.props ?? {}) ? openModel.value : modelValue.value,
|
|
103
|
+
set: (value) => {
|
|
104
|
+
modelValue.value = value;
|
|
105
|
+
openModel.value = value;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const isOpen = useModelState(rawOpen, PopoverRoot, "defaultOpen", props);
|
|
109
|
+
const rootOpen = useRootBinding(rawOpen, isOpen);
|
|
110
|
+
const rootProps = useForwardToRoot(PopoverRoot, props, void 0, ["open"]);
|
|
111
|
+
const contentProps = useForwardToRoot(PopoverContent, props, emit, ["asChild", "as"]);
|
|
130
112
|
function open() {
|
|
131
|
-
|
|
113
|
+
isOpen.value = true;
|
|
132
114
|
}
|
|
133
115
|
function close() {
|
|
134
|
-
|
|
116
|
+
isOpen.value = false;
|
|
135
117
|
}
|
|
136
118
|
return (_ctx, _cache) => {
|
|
137
|
-
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
138
|
-
|
|
139
|
-
open:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
default: withCtx(() => [createVNode(unref(PopoverTrigger), { "as-child": "" }, {
|
|
119
|
+
return openBlock(), createBlock(unref(PopoverRoot), mergeProps(unref(rootProps), {
|
|
120
|
+
open: unref(rootOpen),
|
|
121
|
+
"onUpdate:open": _cache[0] || (_cache[0] = (value) => rawOpen.value = value)
|
|
122
|
+
}), {
|
|
123
|
+
default: withCtx(() => [createVNode(unref(PopoverTrigger), mergeProps({ "as-child": "" }, _ctx.$attrs, { "data-vu-trigger": "" }), {
|
|
143
124
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
144
|
-
isOpen:
|
|
125
|
+
isOpen: unref(isOpen),
|
|
145
126
|
close,
|
|
146
127
|
open
|
|
147
128
|
}, () => [createVNode(VuButton, {
|
|
@@ -149,7 +130,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
149
130
|
icon: __props.icon || "i--more-vert",
|
|
150
131
|
class: normalizeClass(__props.class),
|
|
151
132
|
label: __props.label,
|
|
152
|
-
"data-active":
|
|
133
|
+
"data-active": _ctx.$attrs["data-active"] ?? (unref(isOpen) ? "" : void 0)
|
|
153
134
|
}, null, 8, [
|
|
154
135
|
"as-link",
|
|
155
136
|
"icon",
|
|
@@ -158,8 +139,8 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
158
139
|
"data-active"
|
|
159
140
|
])])]),
|
|
160
141
|
_: 3
|
|
161
|
-
}), createVNode(unref(PopoverPortal), null, {
|
|
162
|
-
default: withCtx(() => [createVNode(unref(PopoverContent), mergeProps(
|
|
142
|
+
}, 16), createVNode(unref(PopoverPortal), null, {
|
|
143
|
+
default: withCtx(() => [createVNode(unref(PopoverContent), mergeProps(unref(contentProps), {
|
|
163
144
|
style: {
|
|
164
145
|
"max-height": "var(--reka-popper-available-height)",
|
|
165
146
|
"overflow": "auto"
|
|
@@ -167,7 +148,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
167
148
|
"as-child": ""
|
|
168
149
|
}), {
|
|
169
150
|
default: withCtx(() => [renderSlot(_ctx.$slots, "content", {
|
|
170
|
-
isOpen:
|
|
151
|
+
isOpen: unref(isOpen),
|
|
171
152
|
close,
|
|
172
153
|
open
|
|
173
154
|
}, () => [_cache[1] || (_cache[1] = createElementVNode("div", null, null, -1))])]),
|
|
@@ -176,7 +157,7 @@ var Popover_default = /* @__PURE__ */ defineComponent({
|
|
|
176
157
|
_: 3
|
|
177
158
|
})]),
|
|
178
159
|
_: 3
|
|
179
|
-
},
|
|
160
|
+
}, 16, ["open"]);
|
|
180
161
|
};
|
|
181
162
|
}
|
|
182
163
|
});
|
package/dist/ProgressBar.d.mts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ProgressRootProps } from 'reka-ui';
|
|
2
2
|
type __VLS_Props = ProgressRootProps & {
|
|
3
3
|
loading?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: string[] | undefined) => any;
|
|
7
|
+
"update:max": (value: number) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: string[] | undefined) => any) | undefined;
|
|
10
|
+
"onUpdate:max"?: ((value: number) => any) | undefined;
|
|
11
|
+
}>, {
|
|
6
12
|
loading: boolean;
|
|
13
|
+
asChild: boolean;
|
|
7
14
|
max: number;
|
|
8
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
16
|
declare const _default: typeof __VLS_export;
|