@robuust-digital/vue-components 2.7.1 → 3.0.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/CHANGELOG.md +15 -0
- package/dist/_shared/ButtonBase-DyeIkb-l.js +76 -0
- package/dist/_shared/ChevronDownIcon-Y_yqpwON.js +39 -0
- package/dist/_shared/FormInput-k0vAk3VU.js +69 -0
- package/dist/_shared/Modal-D0x_VHiB.js +188 -0
- package/dist/_shared/Tooltip-B5w_Ojie.js +85 -0
- package/dist/_shared/XMarkIcon-CBoWSM1l.js +17 -0
- package/dist/_shared/combobox-yh0YQ8_d.js +265 -0
- package/dist/_shared/core-C0o6izrz.js +854 -0
- package/dist/_shared/dialogs-SvdPsILD.js +179 -0
- package/dist/_shared/dropdown-BPUpLokN.js +134 -0
- package/dist/_shared/icon-spinner-D3Dhustt.js +23 -0
- package/dist/_shared/lightswitch-CpyX1iA_.js +38 -0
- package/dist/_shared/rich-text-editor-DkHKNS2n.js +226 -0
- package/dist/_shared/toast-DNxJDQWN.js +84 -0
- package/dist/combobox/index.js +2 -5
- package/dist/core/file-upload.css +28 -1
- package/dist/core/index.js +5 -20
- package/dist/dialogs/index.js +3 -6
- package/dist/dropdown/index.js +2 -5
- package/dist/index/index.js +14 -36
- package/dist/lightswitch/index.js +2 -5
- package/dist/rich-text-editor/index.js +2 -5
- package/dist/toast/index.js +2 -5
- package/dist/tooltip/index.js +5 -5
- package/package.json +31 -31
- package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js +0 -60
- package/dist/_shared/ChevronDownIcon-BYWciGnh.js +0 -41
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js +0 -256
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js +0 -197
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-Cv3HwIyF.js +0 -150
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js +0 -74
- package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js +0 -43
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js +0 -203
- package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-t8nRuJ6k.js +0 -247
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-C4NAAuLp.js +0 -931
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js +0 -78
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js +0 -95
- package/dist/_shared/XMarkIcon-CPr_Rd8y.js +0 -19
- package/dist/_shared/icon-spinner-BYCMrTdL.js +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 3.0.0 (17-06-2026)
|
|
2
|
+
|
|
3
|
+
### Updated
|
|
4
|
+
|
|
5
|
+
* `Tooltip`: Upgrade `@floating-ui/vue` to `^2.0.0`
|
|
6
|
+
* `Build`: Upgrade minor and patch dependency versions while leaving major upgrades out of scope
|
|
7
|
+
* `Build`: Upgrade Vite, Vitest, `@vitest/coverage-v8`, and `vite-plugin-static-copy` to their latest major versions
|
|
8
|
+
* `Build`: Update `vite-plugin-static-copy` targets for v4 directory structure handling
|
|
9
|
+
* `Tests`: Add Vitest 4 coverage for stricter Vue SFC line remapping
|
|
10
|
+
* `Build`: Require Vue `>=3.3.0` for consumers, matching the `@floating-ui/vue` peer dependency
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
* `FileUpload`: Keep the native file input focusable so browser validation works with attributes such as `required`
|
|
15
|
+
|
|
1
16
|
## 2.7.1 (21-05-2026)
|
|
2
17
|
|
|
3
18
|
### Added
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as e } from "./icon-spinner-D3Dhustt.js";
|
|
2
|
+
import { createBlock as t, createCommentVNode as n, createElementBlock as r, createTextVNode as i, defineComponent as a, mergeProps as o, openBlock as s, renderSlot as c, resolveDynamicComponent as l, toDisplayString as u, unref as d, watchEffect as f, withCtx as p } from "vue";
|
|
3
|
+
//#region src/components/ButtonBase.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var m = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "rvc-button-label"
|
|
7
|
+
}, h = /* @__PURE__ */ a({
|
|
8
|
+
__name: "ButtonBase",
|
|
9
|
+
props: {
|
|
10
|
+
as: { default: "button" },
|
|
11
|
+
bindAs: { default: void 0 },
|
|
12
|
+
label: { default: "" },
|
|
13
|
+
icon: {
|
|
14
|
+
type: [
|
|
15
|
+
Function,
|
|
16
|
+
Object,
|
|
17
|
+
null
|
|
18
|
+
],
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
iconOnly: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
iconLeft: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
size: { default: "base" },
|
|
30
|
+
spinning: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
color: { default: "primary" }
|
|
35
|
+
},
|
|
36
|
+
setup(a) {
|
|
37
|
+
let h = a;
|
|
38
|
+
return f(() => {
|
|
39
|
+
h.iconOnly && !h.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
40
|
+
}), (f, h) => (s(), t(l(a.as), o(a.bindAs ? { as: a.bindAs } : {}, {
|
|
41
|
+
class: [
|
|
42
|
+
"rvc-button",
|
|
43
|
+
`rvc-button-${a.color}`,
|
|
44
|
+
`rvc-button-${a.size}`,
|
|
45
|
+
{ "rvc-button-reverse": a.iconLeft },
|
|
46
|
+
{ "rvc-button-icon-only": a.iconOnly }
|
|
47
|
+
],
|
|
48
|
+
"aria-label": a.iconOnly ? a.label : null,
|
|
49
|
+
"aria-busy": a.spinning
|
|
50
|
+
}), {
|
|
51
|
+
default: p(() => [
|
|
52
|
+
a.iconOnly && a.label ? (s(), r("span", m, [c(f.$slots, "default", { label: a.label }, () => [i(u(a.label), 1)])])) : a.label ? c(f.$slots, "default", {
|
|
53
|
+
key: 1,
|
|
54
|
+
label: a.label
|
|
55
|
+
}, () => [i(u(a.label), 1)]) : n("", !0),
|
|
56
|
+
c(f.$slots, "icon", { icon: a.icon }, () => [a.icon && !a.spinning ? (s(), t(l(a.icon), {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "rvc-button-icon",
|
|
59
|
+
"aria-hidden": !a.iconOnly
|
|
60
|
+
}, null, 8, ["aria-hidden"])) : n("", !0)]),
|
|
61
|
+
c(f.$slots, "spinner", { spinning: a.spinning }, () => [a.spinning ? (s(), t(d(e), {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "rvc-button-icon rvc-button-icon-loading",
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
})) : n("", !0)])
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
}, 16, [
|
|
69
|
+
"class",
|
|
70
|
+
"aria-label",
|
|
71
|
+
"aria-busy"
|
|
72
|
+
]));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { h as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createBlock as e, createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c, toDisplayString as l, withCtx as u } from "vue";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region src/components/Badge.vue
|
|
4
|
+
var d = /* @__PURE__ */ i({
|
|
5
|
+
__name: "Badge",
|
|
6
|
+
props: {
|
|
7
|
+
as: { default: "span" },
|
|
8
|
+
label: { default: "" },
|
|
9
|
+
size: { default: "base" },
|
|
10
|
+
color: { default: "default" }
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
return (n, i) => (o(), e(c(t.as), { class: a([
|
|
14
|
+
"rvc-badge",
|
|
15
|
+
`rvc-badge-${t.color}`,
|
|
16
|
+
`rvc-badge-${t.size}`
|
|
17
|
+
]) }, {
|
|
18
|
+
default: u(() => [s(n.$slots, "default", { label: t.label }, () => [r(l(t.label), 1)])]),
|
|
19
|
+
_: 3
|
|
20
|
+
}, 8, ["class"]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region node_modules/@heroicons/vue/20/solid/esm/ChevronDownIcon.js
|
|
25
|
+
function f(e, r) {
|
|
26
|
+
return o(), t("svg", {
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
viewBox: "0 0 20 20",
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
"data-slot": "icon"
|
|
32
|
+
}, [n("path", {
|
|
33
|
+
"fill-rule": "evenodd",
|
|
34
|
+
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
35
|
+
"clip-rule": "evenodd"
|
|
36
|
+
})]);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { d as n, f as t };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, getCurrentInstance as a, guardReactiveProps as o, mergeProps as s, normalizeClass as c, normalizeProps as l, openBlock as u, ref as d, renderSlot as f, resolveDynamicComponent as p, unref as m, useSlots as h, vModelDynamic as g, withDirectives as _ } from "vue";
|
|
2
|
+
//#region src/composables/useForm.ts
|
|
3
|
+
var v = () => ({ hasModelBinding: e(() => {
|
|
4
|
+
let e = a();
|
|
5
|
+
return !!(e?.vnode?.props && Object.prototype.hasOwnProperty.call(e.vnode.props, "onUpdate:modelValue"));
|
|
6
|
+
}) }), y = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "rvc-input-prefix"
|
|
9
|
+
}, b = ["type"], x = ["type"], S = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "rvc-input-suffix"
|
|
12
|
+
}, C = /* @__PURE__ */ i({
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
__name: "FormInput",
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: { default: void 0 },
|
|
17
|
+
rootClass: { default: "" },
|
|
18
|
+
prefixIcon: {
|
|
19
|
+
type: [
|
|
20
|
+
Function,
|
|
21
|
+
Object,
|
|
22
|
+
null
|
|
23
|
+
],
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: [
|
|
28
|
+
Function,
|
|
29
|
+
Object,
|
|
30
|
+
null
|
|
31
|
+
],
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
size: { default: "base" }
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:modelValue"],
|
|
37
|
+
setup(i, { emit: a }) {
|
|
38
|
+
let C = i, w = a, { hasModelBinding: T } = v(), E = h(), D = d(null), O = e({
|
|
39
|
+
get: () => C.modelValue,
|
|
40
|
+
set: (e) => w("update:modelValue", e)
|
|
41
|
+
});
|
|
42
|
+
return (e, a) => (u(), r("div", { class: c([
|
|
43
|
+
"rvc-input",
|
|
44
|
+
`rvc-input-${i.size}`,
|
|
45
|
+
i.rootClass
|
|
46
|
+
]) }, [
|
|
47
|
+
m(E).prefix || m(E).prefixIcon || i.prefixIcon ? (u(), r("span", y, [f(e.$slots, "prefix", {}, () => [f(e.$slots, "prefixIcon", { icon: i.prefixIcon }, () => [i.prefixIcon ? (u(), t(p(i.prefixIcon), {
|
|
48
|
+
key: 0,
|
|
49
|
+
"aria-hidden": "true"
|
|
50
|
+
})) : n("", !0)])])])) : n("", !0),
|
|
51
|
+
f(e.$slots, "input", l(o(e.$attrs)), () => [m(T) ? _((u(), r("input", s({ key: 0 }, e.$attrs, {
|
|
52
|
+
ref_key: "input",
|
|
53
|
+
ref: D,
|
|
54
|
+
"onUpdate:modelValue": a[0] ||= (e) => O.value = e,
|
|
55
|
+
type: e.$attrs.type || "text"
|
|
56
|
+
}), null, 16, b)), [[g, O.value]]) : (u(), r("input", s({ key: 1 }, e.$attrs, {
|
|
57
|
+
ref_key: "input",
|
|
58
|
+
ref: D,
|
|
59
|
+
type: e.$attrs.type || "text"
|
|
60
|
+
}), null, 16, x))]),
|
|
61
|
+
m(E).suffix || m(E).icon || i.icon ? (u(), r("span", S, [f(e.$slots, "suffix", {}, () => [f(e.$slots, "icon", { icon: i.icon }, () => [i.icon ? (u(), t(p(i.icon), {
|
|
62
|
+
key: 0,
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
})) : n("", !0)])])])) : n("", !0)
|
|
65
|
+
], 2));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
export { v as n, C as t };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { t as e } from "./XMarkIcon-CBoWSM1l.js";
|
|
2
|
+
import { t } from "./ButtonBase-DyeIkb-l.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
|
|
4
|
+
import { Dialog as v, DialogPanel as y, DialogTitle as b, TransitionChild as x, TransitionRoot as S } from "@headlessui/vue";
|
|
5
|
+
//#region src/composables/useDialogContext.ts
|
|
6
|
+
function C(e) {
|
|
7
|
+
let t = f(null);
|
|
8
|
+
return {
|
|
9
|
+
contentRef: t,
|
|
10
|
+
ready: f(!1),
|
|
11
|
+
isForm: n(() => {
|
|
12
|
+
if (typeof e.as == "string") return e.as.toLowerCase() === "form";
|
|
13
|
+
let t = e.as, n = t.name ?? t.__name;
|
|
14
|
+
return (typeof n == "string" ? n.toLowerCase() : "") === "form";
|
|
15
|
+
}),
|
|
16
|
+
titleId: n(() => `${e.id}-title`),
|
|
17
|
+
descriptionId: n(() => `${e.id}-content`),
|
|
18
|
+
initialFocusElement: n(() => t.value?.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"))
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/Modal.vue?vue&type=script&setup=true&lang.ts
|
|
23
|
+
var w = {
|
|
24
|
+
role: "presentation",
|
|
25
|
+
class: "rvc-modal-presentation"
|
|
26
|
+
}, T = { class: "rvc-modal-container" }, E = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "rvc-modal-header"
|
|
29
|
+
}, D = { class: "rvc-modal-header-inner" }, O = { class: "rvc-modal-close-wrapper" }, k = ["id"], A = {
|
|
30
|
+
key: 2,
|
|
31
|
+
class: "rvc-modal-footer"
|
|
32
|
+
}, j = /* @__PURE__ */ l({
|
|
33
|
+
__name: "Modal",
|
|
34
|
+
props: {
|
|
35
|
+
as: { default: "div" },
|
|
36
|
+
id: {},
|
|
37
|
+
title: {},
|
|
38
|
+
showClose: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
spinning: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
submitLabel: { default: "Confirm" },
|
|
47
|
+
cancelLabel: { default: "Cancel" },
|
|
48
|
+
panelClass: { default: "rvc-modal-panel-max-width" },
|
|
49
|
+
resetHeader: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
resetFooter: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: [
|
|
59
|
+
"modal:open",
|
|
60
|
+
"modal:opened",
|
|
61
|
+
"modal:close",
|
|
62
|
+
"modal:save",
|
|
63
|
+
"modal:closed"
|
|
64
|
+
],
|
|
65
|
+
setup(n, { emit: l }) {
|
|
66
|
+
let f = n, j = l, { contentRef: M, ready: N, isForm: P, titleId: F, descriptionId: I, initialFocusElement: L } = C(f);
|
|
67
|
+
return (l, f) => (d(), r(h(S), { as: "template" }, {
|
|
68
|
+
default: g(() => [c(h(v), {
|
|
69
|
+
as: n.as,
|
|
70
|
+
class: "rvc-modal",
|
|
71
|
+
static: "",
|
|
72
|
+
"aria-modal": "true",
|
|
73
|
+
role: "dialog",
|
|
74
|
+
"initial-focus": h(L),
|
|
75
|
+
"aria-labelledby": h(F),
|
|
76
|
+
onClose: f[7] ||= (e) => j("modal:close"),
|
|
77
|
+
onSubmit: f[8] ||= _((e) => j("modal:save", e), ["prevent"])
|
|
78
|
+
}, {
|
|
79
|
+
default: g(() => [c(h(x), {
|
|
80
|
+
as: "template",
|
|
81
|
+
enter: "rvc-modal-backdrop-transition-enter",
|
|
82
|
+
"enter-from": "rvc-modal-backdrop-transition-enter-from",
|
|
83
|
+
"enter-to": "rvc-modal-backdrop-transition-enter-to",
|
|
84
|
+
leave: "rvc-modal-backdrop-transition-leave",
|
|
85
|
+
"leave-from": "rvc-modal-backdrop-transition-leave-from",
|
|
86
|
+
"leave-to": "rvc-modal-backdrop-transition-leave-to",
|
|
87
|
+
onBeforeEnter: f[0] ||= (e) => j("modal:open"),
|
|
88
|
+
onAfterEnter: f[1] ||= (e) => j("modal:opened")
|
|
89
|
+
}, {
|
|
90
|
+
default: g(() => [...f[9] ||= [o("div", {
|
|
91
|
+
"aria-hidden": "true",
|
|
92
|
+
class: "rvc-modal-backdrop"
|
|
93
|
+
}, null, -1)]]),
|
|
94
|
+
_: 1
|
|
95
|
+
}), o("div", w, [o("div", T, [c(h(x), {
|
|
96
|
+
as: "template",
|
|
97
|
+
enter: "rvc-modal-transition-enter",
|
|
98
|
+
"enter-from": "rvc-modal-transition-enter-from",
|
|
99
|
+
"enter-to": "rvc-modal-transition-enter-to",
|
|
100
|
+
leave: "rvc-modal-transition-leave",
|
|
101
|
+
"leave-from": "rvc-modal-transition-leave-from",
|
|
102
|
+
"leave-to": "rvc-modal-transition-leave-to",
|
|
103
|
+
onBeforeEnter: f[5] ||= (e) => N.value = !0,
|
|
104
|
+
onAfterLeave: f[6] ||= (e) => (N.value = !1, j("modal:closed"))
|
|
105
|
+
}, {
|
|
106
|
+
default: g(() => [c(h(y), {
|
|
107
|
+
class: u(["rvc-modal-panel", n.panelClass]),
|
|
108
|
+
"aria-busy": n.spinning,
|
|
109
|
+
"aria-describedby": h(I)
|
|
110
|
+
}, {
|
|
111
|
+
default: g(() => [p(l.$slots, "panel", {
|
|
112
|
+
title: n.title,
|
|
113
|
+
loading: n.spinning,
|
|
114
|
+
isForm: h(P),
|
|
115
|
+
titleId: h(F),
|
|
116
|
+
descriptionId: h(I),
|
|
117
|
+
contentRef: h(M),
|
|
118
|
+
dialogTitle: h(b),
|
|
119
|
+
emitClose: () => j("modal:close"),
|
|
120
|
+
emitSave: (e = void 0) => j("modal:save", e)
|
|
121
|
+
}, () => [
|
|
122
|
+
n.resetHeader ? p(l.$slots, "header", { key: 1 }) : (d(), a("header", E, [p(l.$slots, "header", {
|
|
123
|
+
title: n.title,
|
|
124
|
+
showClose: n.showClose
|
|
125
|
+
}, () => [o("div", D, [p(l.$slots, "title", {
|
|
126
|
+
id: h(F),
|
|
127
|
+
dialogTitle: h(b),
|
|
128
|
+
title: n.title
|
|
129
|
+
}, () => [c(h(b), {
|
|
130
|
+
id: h(F),
|
|
131
|
+
class: "rvc-modal-title"
|
|
132
|
+
}, {
|
|
133
|
+
default: g(() => [s(m(n.title), 1)]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["id"])]), n.showClose ? p(l.$slots, "close", {
|
|
136
|
+
key: 0,
|
|
137
|
+
icon: h(e),
|
|
138
|
+
emitClose: () => j("modal:close")
|
|
139
|
+
}, () => [o("div", O, [o("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
class: "rvc-modal-close",
|
|
142
|
+
"aria-label": "Close panel",
|
|
143
|
+
onClick: f[2] ||= (e) => j("modal:close")
|
|
144
|
+
}, [c(h(e), { "aria-hidden": "true" })])])]) : i("", !0)])])])),
|
|
145
|
+
o("div", {
|
|
146
|
+
id: h(I),
|
|
147
|
+
ref_key: "contentRef",
|
|
148
|
+
ref: M,
|
|
149
|
+
class: "rvc-modal-content"
|
|
150
|
+
}, [p(l.$slots, "default", { ready: h(N) })], 8, k),
|
|
151
|
+
n.resetFooter ? p(l.$slots, "footer", { key: 3 }) : (d(), a("footer", A, [p(l.$slots, "footer", { loading: n.spinning }, () => [c(t, {
|
|
152
|
+
type: h(P) ? "submit" : "button",
|
|
153
|
+
label: n.submitLabel,
|
|
154
|
+
spinning: n.spinning,
|
|
155
|
+
disabled: n.spinning,
|
|
156
|
+
onClick: f[3] ||= (e) => !h(P) && j("modal:save")
|
|
157
|
+
}, null, 8, [
|
|
158
|
+
"type",
|
|
159
|
+
"label",
|
|
160
|
+
"spinning",
|
|
161
|
+
"disabled"
|
|
162
|
+
]), c(t, {
|
|
163
|
+
type: "button",
|
|
164
|
+
color: "light",
|
|
165
|
+
label: n.cancelLabel,
|
|
166
|
+
onClick: f[4] ||= (e) => j("modal:close")
|
|
167
|
+
}, null, 8, ["label"])])]))
|
|
168
|
+
])]),
|
|
169
|
+
_: 3
|
|
170
|
+
}, 8, [
|
|
171
|
+
"class",
|
|
172
|
+
"aria-busy",
|
|
173
|
+
"aria-describedby"
|
|
174
|
+
])]),
|
|
175
|
+
_: 3
|
|
176
|
+
})])])]),
|
|
177
|
+
_: 3
|
|
178
|
+
}, 8, [
|
|
179
|
+
"as",
|
|
180
|
+
"initial-focus",
|
|
181
|
+
"aria-labelledby"
|
|
182
|
+
])]),
|
|
183
|
+
_: 3
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
//#endregion
|
|
188
|
+
export { C as n, j as t };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, mergeProps as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderSlot as c, shallowRef as l, unref as u } from "vue";
|
|
2
|
+
import { arrow as d, autoPlacement as f, autoUpdate as p, offset as m, shift as h, size as g, useFloating as _ } from "@floating-ui/vue";
|
|
3
|
+
//#region src/components/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var v = ["innerHTML"], y = /* @__PURE__ */ r({
|
|
5
|
+
__name: "Tooltip",
|
|
6
|
+
props: {
|
|
7
|
+
content: {},
|
|
8
|
+
blur: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !0
|
|
11
|
+
},
|
|
12
|
+
maxWidth: { default: null },
|
|
13
|
+
tooltipClass: { default: "" },
|
|
14
|
+
placement: { default: void 0 },
|
|
15
|
+
size: { default: "base" }
|
|
16
|
+
},
|
|
17
|
+
setup(r) {
|
|
18
|
+
let y = r, b = l(), x = l(), S = l(), { floatingStyles: C, middlewareData: w, placement: T } = _(b, x, {
|
|
19
|
+
middleware: [
|
|
20
|
+
...y.placement ? [] : [f()],
|
|
21
|
+
m(y.size === "sm" ? 7 : 10),
|
|
22
|
+
h({
|
|
23
|
+
crossAxis: !0,
|
|
24
|
+
padding: 5
|
|
25
|
+
}),
|
|
26
|
+
d({ element: S }),
|
|
27
|
+
g({ apply({ availableWidth: e, availableHeight: t, elements: n }) {
|
|
28
|
+
Object.assign(n.floating.style, {
|
|
29
|
+
maxWidth: y.maxWidth ? `${Math.min(e, y.maxWidth) / 16}rem` : "",
|
|
30
|
+
maxHeight: `${t / 16}rem `
|
|
31
|
+
});
|
|
32
|
+
} })
|
|
33
|
+
],
|
|
34
|
+
whileElementsMounted: p,
|
|
35
|
+
placement: y.placement
|
|
36
|
+
}), E = (e) => {
|
|
37
|
+
let t = {
|
|
38
|
+
top: 0,
|
|
39
|
+
bottom: 180,
|
|
40
|
+
left: -90,
|
|
41
|
+
right: 90
|
|
42
|
+
}, n = e.split("-")[0];
|
|
43
|
+
return n && t[n] || 0;
|
|
44
|
+
}, D = (e) => {
|
|
45
|
+
let t = T.value.split("-")[0], n = t ? {
|
|
46
|
+
left: "right",
|
|
47
|
+
right: "left",
|
|
48
|
+
bottom: "top",
|
|
49
|
+
top: "bottom"
|
|
50
|
+
}[t] : "";
|
|
51
|
+
return { style: {
|
|
52
|
+
left: e.arrow?.x ? `${e.arrow.x}px` : "",
|
|
53
|
+
top: e.arrow?.y ? `${e.arrow.y}px` : "",
|
|
54
|
+
bottom: "",
|
|
55
|
+
right: "",
|
|
56
|
+
...n ? { [n]: S.value ? `${S.value.offsetWidth * -1}px` : "" } : {},
|
|
57
|
+
transform: `rotate(${E(T.value)}deg)`
|
|
58
|
+
} };
|
|
59
|
+
};
|
|
60
|
+
return (l, d) => (s(), t("div", {
|
|
61
|
+
ref_key: "wrapperRef",
|
|
62
|
+
ref: b,
|
|
63
|
+
class: "rvc-tooltip-wrapper"
|
|
64
|
+
}, [c(l.$slots, "default"), n("div", {
|
|
65
|
+
ref_key: "tooltipRef",
|
|
66
|
+
ref: x,
|
|
67
|
+
class: a([
|
|
68
|
+
"rvc-tooltip",
|
|
69
|
+
r.tooltipClass,
|
|
70
|
+
`rvc-tooltip-${r.size}`,
|
|
71
|
+
{ "rvc-tooltip-blur": r.blur }
|
|
72
|
+
]),
|
|
73
|
+
style: o(u(C))
|
|
74
|
+
}, [c(l.$slots, "content", { content: r.content }, () => [r.content ? (s(), t("div", {
|
|
75
|
+
key: 0,
|
|
76
|
+
innerHTML: r.content
|
|
77
|
+
}, null, 8, v)) : e("", !0)]), n("div", i({
|
|
78
|
+
ref_key: "arrowRef",
|
|
79
|
+
ref: S,
|
|
80
|
+
class: "rvc-tooltip-arrow"
|
|
81
|
+
}, D(u(w))), null, 16)], 6)], 512));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { y as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
|
|
2
|
+
//#region node_modules/@heroicons/vue/24/solid/esm/XMarkIcon.js
|
|
3
|
+
function r(r, i) {
|
|
4
|
+
return n(), e("svg", {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
"data-slot": "icon"
|
|
10
|
+
}, [t("path", {
|
|
11
|
+
"fill-rule": "evenodd",
|
|
12
|
+
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
13
|
+
"clip-rule": "evenodd"
|
|
14
|
+
})]);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as t };
|