@robuust-digital/vue-components 2.6.5 → 2.6.7
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 +16 -0
- package/dist/_shared/{Drawer.vue_vue_type_script_setup_true_lang-DjP68vua.js → Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js} +1 -1
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js +203 -0
- package/dist/_shared/{RichTextEditor.vue_vue_type_script_setup_true_lang-t14vKtCW.js → RichTextEditor.vue_vue_type_script_setup_true_lang-Miebq2nL.js} +1 -1
- package/dist/dialogs/drawer.css +2 -0
- package/dist/dialogs/index.js +2 -2
- package/dist/dialogs.d.ts +5 -4
- package/dist/index/index.js +3 -3
- package/dist/index.d.ts +5 -4
- package/dist/rich-text-editor/index.js +1 -1
- package/package.json +1 -1
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-MN3D46CX.js +0 -198
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 2.6.7 (13-05-2026)
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
* `Drawer`: Added `--rvc-drawer-panel-bg-color` variable on `.rvc-drawer-panel-inner` so the panel background covers the scroll container, preventing transparent gaps during elastic/overflow scrolling. Defaults to `var(--rvc-drawer-content-bg-color)` for backwards compatibility.
|
|
6
|
+
|
|
7
|
+
### Updated
|
|
8
|
+
|
|
9
|
+
* `Drawer` docs: Documented the new `--rvc-drawer-panel-bg-color` variable
|
|
10
|
+
|
|
11
|
+
## 2.6.6 (06-05-2026)
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
* `Dialogs`: Detect Inertia `Form` components in dialog `isForm` handling so submit actions behave like native forms
|
|
16
|
+
|
|
1
17
|
## 2.6.5 (05-05-2026)
|
|
2
18
|
|
|
3
19
|
### Added
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as E, openBlock as v, createBlock as k, unref as e, withCtx as d, createVNode as s, withModifiers as T, createElementVNode as o, normalizeClass as m, renderSlot as i, createElementBlock as p, createTextVNode as F, toDisplayString as L, createCommentVNode as g } from "vue";
|
|
2
2
|
import { TransitionRoot as I, Dialog as N, TransitionChild as C, DialogPanel as R, DialogTitle as u } from "@headlessui/vue";
|
|
3
3
|
import { _ as $ } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
|
-
import { u as V } from "./Modal.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as V } from "./Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js";
|
|
5
5
|
import { r as B } from "./XMarkIcon-CPr_Rd8y.js";
|
|
6
6
|
const A = {
|
|
7
7
|
class: "rvc-drawer-presentation",
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { ref as $, computed as y, defineComponent as L, openBlock as p, createBlock as I, unref as t, withCtx as c, createVNode as i, withModifiers as N, createElementVNode as d, normalizeClass as T, renderSlot as s, createElementBlock as w, createTextVNode as h, toDisplayString as D, createCommentVNode as R } from "vue";
|
|
2
|
+
import { TransitionRoot as S, Dialog as V, TransitionChild as B, DialogPanel as M, DialogTitle as g } from "@headlessui/vue";
|
|
3
|
+
import { _ as E } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
|
+
import { r as F } from "./XMarkIcon-CPr_Rd8y.js";
|
|
5
|
+
function A(e) {
|
|
6
|
+
const u = $(null), C = $(!1), a = y(() => {
|
|
7
|
+
if (typeof e.as == "string")
|
|
8
|
+
return e.as.toLowerCase() === "form";
|
|
9
|
+
const r = e.as, m = r.name ?? r.__name;
|
|
10
|
+
return (typeof m == "string" ? m.toLowerCase() : "") === "form";
|
|
11
|
+
}), b = y(() => `${e.id}-title`), f = y(() => `${e.id}-content`), v = y(() => u.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
|
|
12
|
+
return {
|
|
13
|
+
contentRef: u,
|
|
14
|
+
ready: C,
|
|
15
|
+
isForm: a,
|
|
16
|
+
titleId: b,
|
|
17
|
+
descriptionId: f,
|
|
18
|
+
initialFocusElement: v
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const H = {
|
|
22
|
+
role: "presentation",
|
|
23
|
+
class: "rvc-modal-presentation"
|
|
24
|
+
}, q = { class: "rvc-modal-container" }, x = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "rvc-modal-header"
|
|
27
|
+
}, z = { class: "rvc-modal-header-inner" }, P = { class: "rvc-modal-close-wrapper" }, j = ["id"], G = {
|
|
28
|
+
key: 2,
|
|
29
|
+
class: "rvc-modal-footer"
|
|
30
|
+
}, U = /* @__PURE__ */ L({
|
|
31
|
+
__name: "Modal",
|
|
32
|
+
props: {
|
|
33
|
+
as: { default: "div" },
|
|
34
|
+
id: {},
|
|
35
|
+
title: {},
|
|
36
|
+
showClose: { type: Boolean, default: !1 },
|
|
37
|
+
spinning: { type: Boolean, default: !1 },
|
|
38
|
+
submitLabel: { default: "Confirm" },
|
|
39
|
+
cancelLabel: { default: "Cancel" },
|
|
40
|
+
panelClass: { default: "rvc-modal-panel-max-width" },
|
|
41
|
+
resetHeader: { type: Boolean, default: !1 },
|
|
42
|
+
resetFooter: { type: Boolean, default: !1 }
|
|
43
|
+
},
|
|
44
|
+
emits: ["modal:open", "modal:opened", "modal:close", "modal:save", "modal:closed"],
|
|
45
|
+
setup(e, { emit: u }) {
|
|
46
|
+
const C = e, a = u, {
|
|
47
|
+
contentRef: b,
|
|
48
|
+
ready: f,
|
|
49
|
+
isForm: v,
|
|
50
|
+
titleId: r,
|
|
51
|
+
descriptionId: m,
|
|
52
|
+
initialFocusElement: k
|
|
53
|
+
} = A(C);
|
|
54
|
+
return (n, o) => (p(), I(t(S), { as: "template" }, {
|
|
55
|
+
default: c(() => [
|
|
56
|
+
i(t(V), {
|
|
57
|
+
as: e.as,
|
|
58
|
+
class: "rvc-modal",
|
|
59
|
+
static: "",
|
|
60
|
+
"aria-modal": "true",
|
|
61
|
+
role: "dialog",
|
|
62
|
+
"initial-focus": t(k),
|
|
63
|
+
"aria-labelledby": t(r),
|
|
64
|
+
onClose: o[7] || (o[7] = (l) => a("modal:close")),
|
|
65
|
+
onSubmit: o[8] || (o[8] = N((l) => a("modal:save", l), ["prevent"]))
|
|
66
|
+
}, {
|
|
67
|
+
default: c(() => [
|
|
68
|
+
i(t(B), {
|
|
69
|
+
as: "template",
|
|
70
|
+
enter: "rvc-modal-backdrop-transition-enter",
|
|
71
|
+
"enter-from": "rvc-modal-backdrop-transition-enter-from",
|
|
72
|
+
"enter-to": "rvc-modal-backdrop-transition-enter-to",
|
|
73
|
+
leave: "rvc-modal-backdrop-transition-leave",
|
|
74
|
+
"leave-from": "rvc-modal-backdrop-transition-leave-from",
|
|
75
|
+
"leave-to": "rvc-modal-backdrop-transition-leave-to",
|
|
76
|
+
onBeforeEnter: o[0] || (o[0] = (l) => a("modal:open")),
|
|
77
|
+
onAfterEnter: o[1] || (o[1] = (l) => a("modal:opened"))
|
|
78
|
+
}, {
|
|
79
|
+
default: c(() => [...o[9] || (o[9] = [
|
|
80
|
+
d("div", {
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
class: "rvc-modal-backdrop"
|
|
83
|
+
}, null, -1)
|
|
84
|
+
])]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
d("div", H, [
|
|
88
|
+
d("div", q, [
|
|
89
|
+
i(t(B), {
|
|
90
|
+
as: "template",
|
|
91
|
+
enter: "rvc-modal-transition-enter",
|
|
92
|
+
"enter-from": "rvc-modal-transition-enter-from",
|
|
93
|
+
"enter-to": "rvc-modal-transition-enter-to",
|
|
94
|
+
leave: "rvc-modal-transition-leave",
|
|
95
|
+
"leave-from": "rvc-modal-transition-leave-from",
|
|
96
|
+
"leave-to": "rvc-modal-transition-leave-to",
|
|
97
|
+
onBeforeEnter: o[5] || (o[5] = (l) => f.value = !0),
|
|
98
|
+
onAfterLeave: o[6] || (o[6] = (l) => (f.value = !1, a("modal:closed")))
|
|
99
|
+
}, {
|
|
100
|
+
default: c(() => [
|
|
101
|
+
i(t(M), {
|
|
102
|
+
class: T(["rvc-modal-panel", e.panelClass]),
|
|
103
|
+
"aria-busy": e.spinning,
|
|
104
|
+
"aria-describedby": t(m)
|
|
105
|
+
}, {
|
|
106
|
+
default: c(() => [
|
|
107
|
+
s(n.$slots, "panel", {
|
|
108
|
+
title: e.title,
|
|
109
|
+
loading: e.spinning,
|
|
110
|
+
isForm: t(v),
|
|
111
|
+
titleId: t(r),
|
|
112
|
+
descriptionId: t(m),
|
|
113
|
+
contentRef: t(b),
|
|
114
|
+
dialogTitle: t(g),
|
|
115
|
+
emitClose: () => a("modal:close"),
|
|
116
|
+
emitSave: (l = void 0) => a("modal:save", l)
|
|
117
|
+
}, () => [
|
|
118
|
+
e.resetHeader ? s(n.$slots, "header", { key: 1 }) : (p(), w("header", x, [
|
|
119
|
+
s(n.$slots, "header", {
|
|
120
|
+
title: e.title,
|
|
121
|
+
showClose: e.showClose
|
|
122
|
+
}, () => [
|
|
123
|
+
d("div", z, [
|
|
124
|
+
s(n.$slots, "title", {
|
|
125
|
+
id: t(r),
|
|
126
|
+
dialogTitle: t(g),
|
|
127
|
+
title: e.title
|
|
128
|
+
}, () => [
|
|
129
|
+
i(t(g), {
|
|
130
|
+
id: t(r),
|
|
131
|
+
class: "rvc-modal-title"
|
|
132
|
+
}, {
|
|
133
|
+
default: c(() => [
|
|
134
|
+
h(D(e.title), 1)
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
}, 8, ["id"])
|
|
138
|
+
]),
|
|
139
|
+
e.showClose ? s(n.$slots, "close", {
|
|
140
|
+
key: 0,
|
|
141
|
+
icon: t(F),
|
|
142
|
+
emitClose: () => a("modal:close")
|
|
143
|
+
}, () => [
|
|
144
|
+
d("div", P, [
|
|
145
|
+
d("button", {
|
|
146
|
+
type: "button",
|
|
147
|
+
class: "rvc-modal-close",
|
|
148
|
+
"aria-label": "Close panel",
|
|
149
|
+
onClick: o[2] || (o[2] = (l) => a("modal:close"))
|
|
150
|
+
}, [
|
|
151
|
+
i(t(F), { "aria-hidden": "true" })
|
|
152
|
+
])
|
|
153
|
+
])
|
|
154
|
+
]) : R("", !0)
|
|
155
|
+
])
|
|
156
|
+
])
|
|
157
|
+
])),
|
|
158
|
+
d("div", {
|
|
159
|
+
id: t(m),
|
|
160
|
+
ref_key: "contentRef",
|
|
161
|
+
ref: b,
|
|
162
|
+
class: "rvc-modal-content"
|
|
163
|
+
}, [
|
|
164
|
+
s(n.$slots, "default", { ready: t(f) })
|
|
165
|
+
], 8, j),
|
|
166
|
+
e.resetFooter ? s(n.$slots, "footer", { key: 3 }) : (p(), w("footer", G, [
|
|
167
|
+
s(n.$slots, "footer", { loading: e.spinning }, () => [
|
|
168
|
+
i(E, {
|
|
169
|
+
type: t(v) ? "submit" : "button",
|
|
170
|
+
label: e.submitLabel,
|
|
171
|
+
spinning: e.spinning,
|
|
172
|
+
disabled: e.spinning,
|
|
173
|
+
onClick: o[3] || (o[3] = (l) => !t(v) && a("modal:save"))
|
|
174
|
+
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
175
|
+
i(E, {
|
|
176
|
+
type: "button",
|
|
177
|
+
color: "light",
|
|
178
|
+
label: e.cancelLabel,
|
|
179
|
+
onClick: o[4] || (o[4] = (l) => a("modal:close"))
|
|
180
|
+
}, null, 8, ["label"])
|
|
181
|
+
])
|
|
182
|
+
]))
|
|
183
|
+
])
|
|
184
|
+
]),
|
|
185
|
+
_: 3
|
|
186
|
+
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
187
|
+
]),
|
|
188
|
+
_: 3
|
|
189
|
+
})
|
|
190
|
+
])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
_: 3
|
|
194
|
+
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
195
|
+
]),
|
|
196
|
+
_: 3
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
export {
|
|
201
|
+
U as _,
|
|
202
|
+
A as u
|
|
203
|
+
};
|
|
@@ -3,7 +3,7 @@ import { useEditor as N, EditorContent as T } from "@tiptap/vue-3";
|
|
|
3
3
|
import j from "@tiptap/starter-kit";
|
|
4
4
|
import { _ as z } from "./Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js";
|
|
5
5
|
import { _ as D } from "./FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
|
|
6
|
-
import { _ as I } from "./Modal.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as I } from "./Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js";
|
|
7
7
|
function q(n, c) {
|
|
8
8
|
return s(), r("svg", {
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/dialogs/drawer.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--rvc-drawer-close-color: var(--rvc-dialog-close-color);
|
|
15
15
|
--rvc-drawer-close-color-hover: var(--rvc-dialog-close-color-hover);
|
|
16
16
|
--rvc-drawer-content-bg-color: var(--rvc-dialog-content-bg-color);
|
|
17
|
+
--rvc-drawer-panel-bg-color: var(--rvc-drawer-content-bg-color);
|
|
17
18
|
--rvc-drawer-footer-bg-color: var(--rvc-dialog-footer-bg-color);
|
|
18
19
|
--rvc-drawer-footer-gap: var(--rvc-dialog-footer-gap);
|
|
19
20
|
--rvc-drawer-footer-justify-content: space-between;
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
display: flex;
|
|
72
73
|
flex-direction: column;
|
|
73
74
|
height: 100%;
|
|
75
|
+
background-color: var(--rvc-drawer-panel-bg-color);
|
|
74
76
|
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
|
|
75
77
|
}
|
|
76
78
|
|
package/dist/dialogs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as a } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { _ as f } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as a } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js";
|
|
2
|
+
import { _ as f } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Drawer,
|
|
5
5
|
f as Modal
|
package/dist/dialogs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { Component } from 'vue';
|
|
2
3
|
import { ComponentCustomProps } from 'vue';
|
|
3
4
|
import { ComponentOptionsMixin } from 'vue';
|
|
4
5
|
import { ComponentProvideOptions } from 'vue';
|
|
@@ -25,7 +26,7 @@ declare const __VLS_component: DefineComponent<DrawerProps, {}, {}, {}, {}, Comp
|
|
|
25
26
|
"onDrawer:save"?: ((event?: Event | undefined) => any) | undefined;
|
|
26
27
|
"onDrawer:closed"?: (() => any) | undefined;
|
|
27
28
|
}>, {
|
|
28
|
-
as: string;
|
|
29
|
+
as: string | Component;
|
|
29
30
|
spinning: boolean;
|
|
30
31
|
showClose: boolean;
|
|
31
32
|
scrolledDown: boolean;
|
|
@@ -52,7 +53,7 @@ declare const __VLS_component_2: DefineComponent<ModalProps, {}, {}, {}, {}, Com
|
|
|
52
53
|
"onModal:save"?: ((event?: Event | undefined) => any) | undefined;
|
|
53
54
|
"onModal:closed"?: (() => any) | undefined;
|
|
54
55
|
}>, {
|
|
55
|
-
as: string;
|
|
56
|
+
as: string | Component;
|
|
56
57
|
spinning: boolean;
|
|
57
58
|
showClose: boolean;
|
|
58
59
|
submitLabel: string;
|
|
@@ -267,7 +268,7 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
267
268
|
export declare const Drawer: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
268
269
|
|
|
269
270
|
declare interface DrawerProps {
|
|
270
|
-
as?: string;
|
|
271
|
+
as?: string | Component;
|
|
271
272
|
id: string;
|
|
272
273
|
title: string;
|
|
273
274
|
showClose?: boolean;
|
|
@@ -284,7 +285,7 @@ declare interface DrawerProps {
|
|
|
284
285
|
export declare const Modal: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
285
286
|
|
|
286
287
|
declare interface ModalProps {
|
|
287
|
-
as?: string;
|
|
288
|
+
as?: string | Component;
|
|
288
289
|
id: string;
|
|
289
290
|
title: string;
|
|
290
291
|
showClose?: boolean;
|
package/dist/index/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { _ as d } from "../_shared/ChevronDownIcon-BYWciGnh.js";
|
|
|
3
3
|
import { _ as n } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
4
|
import { _ as h } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
|
|
5
5
|
import { _ as g } from "../_shared/Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js";
|
|
6
|
-
import { _ as B } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as F } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as B } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js";
|
|
7
|
+
import { _ as F } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js";
|
|
8
8
|
import { _ as A } from "../_shared/Dropdown.vue_vue_type_script_setup_true_lang-Cv3HwIyF.js";
|
|
9
9
|
import { _ as E } from "../_shared/Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js";
|
|
10
|
-
import { _ as S } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as S } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-Miebq2nL.js";
|
|
11
11
|
import { _ as y } from "../_shared/Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js";
|
|
12
12
|
import { _ as L } from "../_shared/Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js";
|
|
13
13
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AlignedPlacement } from '@floating-ui/vue';
|
|
2
2
|
import { AllowedComponentProps } from 'vue';
|
|
3
|
+
import { Component } from 'vue';
|
|
3
4
|
import { ComponentCustomProps } from 'vue';
|
|
4
5
|
import { ComponentOptionsMixin } from 'vue';
|
|
5
6
|
import { ComponentProvideOptions } from 'vue';
|
|
@@ -98,7 +99,7 @@ declare const __VLS_component_13: DefineComponent<DrawerProps, {}, {}, {}, {}, C
|
|
|
98
99
|
"onDrawer:save"?: ((event?: Event | undefined) => any) | undefined;
|
|
99
100
|
"onDrawer:closed"?: (() => any) | undefined;
|
|
100
101
|
}>, {
|
|
101
|
-
as: string;
|
|
102
|
+
as: string | Component;
|
|
102
103
|
spinning: boolean;
|
|
103
104
|
showClose: boolean;
|
|
104
105
|
scrolledDown: boolean;
|
|
@@ -125,7 +126,7 @@ declare const __VLS_component_14: DefineComponent<ModalProps, {}, {}, {}, {}, Co
|
|
|
125
126
|
"onModal:save"?: ((event?: Event | undefined) => any) | undefined;
|
|
126
127
|
"onModal:closed"?: (() => any) | undefined;
|
|
127
128
|
}>, {
|
|
128
|
-
as: string;
|
|
129
|
+
as: string | Component;
|
|
129
130
|
spinning: boolean;
|
|
130
131
|
showClose: boolean;
|
|
131
132
|
submitLabel: string;
|
|
@@ -1218,7 +1219,7 @@ declare interface DataTableSortBy {
|
|
|
1218
1219
|
export declare const Drawer: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
|
|
1219
1220
|
|
|
1220
1221
|
declare interface DrawerProps {
|
|
1221
|
-
as?: string;
|
|
1222
|
+
as?: string | Component;
|
|
1222
1223
|
id: string;
|
|
1223
1224
|
title: string;
|
|
1224
1225
|
showClose?: boolean;
|
|
@@ -1324,7 +1325,7 @@ declare interface LightswitchProps {
|
|
|
1324
1325
|
export declare const Modal: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
|
|
1325
1326
|
|
|
1326
1327
|
declare interface ModalProps {
|
|
1327
|
-
as?: string;
|
|
1328
|
+
as?: string | Component;
|
|
1328
1329
|
id: string;
|
|
1329
1330
|
title: string;
|
|
1330
1331
|
showClose?: boolean;
|
package/package.json
CHANGED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { ref as k, computed as b, defineComponent as I, openBlock as C, createBlock as T, unref as e, withCtx as d, createVNode as i, withModifiers as h, createElementVNode as r, normalizeClass as D, renderSlot as s, createElementBlock as $, createTextVNode as L, toDisplayString as R, createCommentVNode as S } from "vue";
|
|
2
|
-
import { TransitionRoot as N, Dialog as V, TransitionChild as B, DialogPanel as A, DialogTitle as g } from "@headlessui/vue";
|
|
3
|
-
import { _ as w } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
|
-
import { r as E } from "./XMarkIcon-CPr_Rd8y.js";
|
|
5
|
-
function H(t) {
|
|
6
|
-
const v = k(null), y = k(!1), l = b(() => t.as === "form"), f = b(() => `${t.id}-title`), m = b(() => `${t.id}-content`), c = b(() => v.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
|
|
7
|
-
return {
|
|
8
|
-
contentRef: v,
|
|
9
|
-
ready: y,
|
|
10
|
-
isForm: l,
|
|
11
|
-
titleId: f,
|
|
12
|
-
descriptionId: m,
|
|
13
|
-
initialFocusElement: c
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const M = {
|
|
17
|
-
role: "presentation",
|
|
18
|
-
class: "rvc-modal-presentation"
|
|
19
|
-
}, q = { class: "rvc-modal-container" }, x = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "rvc-modal-header"
|
|
22
|
-
}, z = { class: "rvc-modal-header-inner" }, P = { class: "rvc-modal-close-wrapper" }, j = ["id"], G = {
|
|
23
|
-
key: 2,
|
|
24
|
-
class: "rvc-modal-footer"
|
|
25
|
-
}, U = /* @__PURE__ */ I({
|
|
26
|
-
__name: "Modal",
|
|
27
|
-
props: {
|
|
28
|
-
as: { default: "div" },
|
|
29
|
-
id: {},
|
|
30
|
-
title: {},
|
|
31
|
-
showClose: { type: Boolean, default: !1 },
|
|
32
|
-
spinning: { type: Boolean, default: !1 },
|
|
33
|
-
submitLabel: { default: "Confirm" },
|
|
34
|
-
cancelLabel: { default: "Cancel" },
|
|
35
|
-
panelClass: { default: "rvc-modal-panel-max-width" },
|
|
36
|
-
resetHeader: { type: Boolean, default: !1 },
|
|
37
|
-
resetFooter: { type: Boolean, default: !1 }
|
|
38
|
-
},
|
|
39
|
-
emits: ["modal:open", "modal:opened", "modal:close", "modal:save", "modal:closed"],
|
|
40
|
-
setup(t, { emit: v }) {
|
|
41
|
-
const y = t, l = v, {
|
|
42
|
-
contentRef: f,
|
|
43
|
-
ready: m,
|
|
44
|
-
isForm: c,
|
|
45
|
-
titleId: u,
|
|
46
|
-
descriptionId: p,
|
|
47
|
-
initialFocusElement: F
|
|
48
|
-
} = H(y);
|
|
49
|
-
return (n, o) => (C(), T(e(N), { as: "template" }, {
|
|
50
|
-
default: d(() => [
|
|
51
|
-
i(e(V), {
|
|
52
|
-
as: t.as,
|
|
53
|
-
class: "rvc-modal",
|
|
54
|
-
static: "",
|
|
55
|
-
"aria-modal": "true",
|
|
56
|
-
role: "dialog",
|
|
57
|
-
"initial-focus": e(F),
|
|
58
|
-
"aria-labelledby": e(u),
|
|
59
|
-
onClose: o[7] || (o[7] = (a) => l("modal:close")),
|
|
60
|
-
onSubmit: o[8] || (o[8] = h((a) => l("modal:save", a), ["prevent"]))
|
|
61
|
-
}, {
|
|
62
|
-
default: d(() => [
|
|
63
|
-
i(e(B), {
|
|
64
|
-
as: "template",
|
|
65
|
-
enter: "rvc-modal-backdrop-transition-enter",
|
|
66
|
-
"enter-from": "rvc-modal-backdrop-transition-enter-from",
|
|
67
|
-
"enter-to": "rvc-modal-backdrop-transition-enter-to",
|
|
68
|
-
leave: "rvc-modal-backdrop-transition-leave",
|
|
69
|
-
"leave-from": "rvc-modal-backdrop-transition-leave-from",
|
|
70
|
-
"leave-to": "rvc-modal-backdrop-transition-leave-to",
|
|
71
|
-
onBeforeEnter: o[0] || (o[0] = (a) => l("modal:open")),
|
|
72
|
-
onAfterEnter: o[1] || (o[1] = (a) => l("modal:opened"))
|
|
73
|
-
}, {
|
|
74
|
-
default: d(() => [...o[9] || (o[9] = [
|
|
75
|
-
r("div", {
|
|
76
|
-
"aria-hidden": "true",
|
|
77
|
-
class: "rvc-modal-backdrop"
|
|
78
|
-
}, null, -1)
|
|
79
|
-
])]),
|
|
80
|
-
_: 1
|
|
81
|
-
}),
|
|
82
|
-
r("div", M, [
|
|
83
|
-
r("div", q, [
|
|
84
|
-
i(e(B), {
|
|
85
|
-
as: "template",
|
|
86
|
-
enter: "rvc-modal-transition-enter",
|
|
87
|
-
"enter-from": "rvc-modal-transition-enter-from",
|
|
88
|
-
"enter-to": "rvc-modal-transition-enter-to",
|
|
89
|
-
leave: "rvc-modal-transition-leave",
|
|
90
|
-
"leave-from": "rvc-modal-transition-leave-from",
|
|
91
|
-
"leave-to": "rvc-modal-transition-leave-to",
|
|
92
|
-
onBeforeEnter: o[5] || (o[5] = (a) => m.value = !0),
|
|
93
|
-
onAfterLeave: o[6] || (o[6] = (a) => (m.value = !1, l("modal:closed")))
|
|
94
|
-
}, {
|
|
95
|
-
default: d(() => [
|
|
96
|
-
i(e(A), {
|
|
97
|
-
class: D(["rvc-modal-panel", t.panelClass]),
|
|
98
|
-
"aria-busy": t.spinning,
|
|
99
|
-
"aria-describedby": e(p)
|
|
100
|
-
}, {
|
|
101
|
-
default: d(() => [
|
|
102
|
-
s(n.$slots, "panel", {
|
|
103
|
-
title: t.title,
|
|
104
|
-
loading: t.spinning,
|
|
105
|
-
isForm: e(c),
|
|
106
|
-
titleId: e(u),
|
|
107
|
-
descriptionId: e(p),
|
|
108
|
-
contentRef: e(f),
|
|
109
|
-
dialogTitle: e(g),
|
|
110
|
-
emitClose: () => l("modal:close"),
|
|
111
|
-
emitSave: (a = void 0) => l("modal:save", a)
|
|
112
|
-
}, () => [
|
|
113
|
-
t.resetHeader ? s(n.$slots, "header", { key: 1 }) : (C(), $("header", x, [
|
|
114
|
-
s(n.$slots, "header", {
|
|
115
|
-
title: t.title,
|
|
116
|
-
showClose: t.showClose
|
|
117
|
-
}, () => [
|
|
118
|
-
r("div", z, [
|
|
119
|
-
s(n.$slots, "title", {
|
|
120
|
-
id: e(u),
|
|
121
|
-
dialogTitle: e(g),
|
|
122
|
-
title: t.title
|
|
123
|
-
}, () => [
|
|
124
|
-
i(e(g), {
|
|
125
|
-
id: e(u),
|
|
126
|
-
class: "rvc-modal-title"
|
|
127
|
-
}, {
|
|
128
|
-
default: d(() => [
|
|
129
|
-
L(R(t.title), 1)
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["id"])
|
|
133
|
-
]),
|
|
134
|
-
t.showClose ? s(n.$slots, "close", {
|
|
135
|
-
key: 0,
|
|
136
|
-
icon: e(E),
|
|
137
|
-
emitClose: () => l("modal:close")
|
|
138
|
-
}, () => [
|
|
139
|
-
r("div", P, [
|
|
140
|
-
r("button", {
|
|
141
|
-
type: "button",
|
|
142
|
-
class: "rvc-modal-close",
|
|
143
|
-
"aria-label": "Close panel",
|
|
144
|
-
onClick: o[2] || (o[2] = (a) => l("modal:close"))
|
|
145
|
-
}, [
|
|
146
|
-
i(e(E), { "aria-hidden": "true" })
|
|
147
|
-
])
|
|
148
|
-
])
|
|
149
|
-
]) : S("", !0)
|
|
150
|
-
])
|
|
151
|
-
])
|
|
152
|
-
])),
|
|
153
|
-
r("div", {
|
|
154
|
-
id: e(p),
|
|
155
|
-
ref_key: "contentRef",
|
|
156
|
-
ref: f,
|
|
157
|
-
class: "rvc-modal-content"
|
|
158
|
-
}, [
|
|
159
|
-
s(n.$slots, "default", { ready: e(m) })
|
|
160
|
-
], 8, j),
|
|
161
|
-
t.resetFooter ? s(n.$slots, "footer", { key: 3 }) : (C(), $("footer", G, [
|
|
162
|
-
s(n.$slots, "footer", { loading: t.spinning }, () => [
|
|
163
|
-
i(w, {
|
|
164
|
-
type: e(c) ? "submit" : "button",
|
|
165
|
-
label: t.submitLabel,
|
|
166
|
-
spinning: t.spinning,
|
|
167
|
-
disabled: t.spinning,
|
|
168
|
-
onClick: o[3] || (o[3] = (a) => !e(c) && l("modal:save"))
|
|
169
|
-
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
170
|
-
i(w, {
|
|
171
|
-
type: "button",
|
|
172
|
-
color: "light",
|
|
173
|
-
label: t.cancelLabel,
|
|
174
|
-
onClick: o[4] || (o[4] = (a) => l("modal:close"))
|
|
175
|
-
}, null, 8, ["label"])
|
|
176
|
-
])
|
|
177
|
-
]))
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
_: 3
|
|
181
|
-
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
182
|
-
]),
|
|
183
|
-
_: 3
|
|
184
|
-
})
|
|
185
|
-
])
|
|
186
|
-
])
|
|
187
|
-
]),
|
|
188
|
-
_: 3
|
|
189
|
-
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
190
|
-
]),
|
|
191
|
-
_: 3
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
export {
|
|
196
|
-
U as _,
|
|
197
|
-
H as u
|
|
198
|
-
};
|