@robuust-digital/vue-components 2.5.0-beta.3 → 2.5.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 +26 -1
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-DjP68vua.js +197 -0
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-MN3D46CX.js +198 -0
- package/dist/_shared/{RichTextEditor.vue_vue_type_script_setup_true_lang-DaCv0Gii.js → RichTextEditor.vue_vue_type_script_setup_true_lang-t14vKtCW.js} +44 -40
- package/dist/core/badge.css +4 -0
- package/dist/core/empty-state.css +4 -0
- package/dist/core/pagination.css +11 -4
- package/dist/core/table.css +8 -0
- package/dist/core/tabs.css +6 -0
- package/dist/dialogs/index.js +2 -2
- package/dist/dialogs.d.ts +75 -2
- package/dist/index/index.js +3 -3
- package/dist/index.d.ts +75 -2
- package/dist/rich-text-editor/index.js +1 -1
- package/package.json +1 -1
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-CZMVooMV.js +0 -185
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CB0Gez7v.js +0 -183
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as c, createBlock as m, unref as t, withCtx as d, createVNode as s, withModifiers as L, createElementVNode as a, normalizeClass as w, createElementBlock as b, renderSlot as i, createTextVNode as T, toDisplayString as F, createCommentVNode as y } from "vue";
|
|
2
|
-
import { TransitionRoot as N, Dialog as V, TransitionChild as k, DialogPanel as R, DialogTitle as p } from "@headlessui/vue";
|
|
3
|
-
import { _ as C } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
|
-
import { u as A } from "./Modal.vue_vue_type_script_setup_true_lang-CB0Gez7v.js";
|
|
5
|
-
import { r as g } from "./XMarkIcon-CPr_Rd8y.js";
|
|
6
|
-
const H = {
|
|
7
|
-
class: "rvc-drawer-presentation",
|
|
8
|
-
role: "presentation"
|
|
9
|
-
}, I = { class: "rvc-drawer-container" }, z = { class: "rvc-drawer-inner" }, M = { class: "rvc-drawer-panel-inner" }, P = { class: "rvc-drawer-header-inner" }, j = { class: "rvc-drawer-close-wrapper" }, q = ["id"], G = {
|
|
10
|
-
key: 2,
|
|
11
|
-
class: "rvc-drawer-footer"
|
|
12
|
-
}, W = /* @__PURE__ */ S({
|
|
13
|
-
__name: "Drawer",
|
|
14
|
-
props: {
|
|
15
|
-
as: { default: "form" },
|
|
16
|
-
id: {},
|
|
17
|
-
title: {},
|
|
18
|
-
showClose: { type: Boolean, default: !1 },
|
|
19
|
-
scrolledDown: { type: Boolean, default: !1 },
|
|
20
|
-
headerSticky: { type: Boolean, default: !1 },
|
|
21
|
-
spinning: { type: Boolean, default: !1 },
|
|
22
|
-
submitLabel: { default: "Save" },
|
|
23
|
-
cancelLabel: { default: "Cancel" },
|
|
24
|
-
panelClass: { default: "rvc-drawer-panel-max-width" },
|
|
25
|
-
resetHeader: { type: Boolean, default: !1 },
|
|
26
|
-
resetFooter: { type: Boolean, default: !1 }
|
|
27
|
-
},
|
|
28
|
-
emits: ["drawer:open", "drawer:opened", "drawer:close", "drawer:save", "drawer:closed"],
|
|
29
|
-
setup(e, { emit: $ }) {
|
|
30
|
-
const B = e, l = $, {
|
|
31
|
-
contentRef: h,
|
|
32
|
-
ready: v,
|
|
33
|
-
isForm: D,
|
|
34
|
-
titleId: f,
|
|
35
|
-
descriptionId: u,
|
|
36
|
-
initialFocusElement: E
|
|
37
|
-
} = A(B);
|
|
38
|
-
return (n, r) => (c(), m(t(N), { as: "template" }, {
|
|
39
|
-
default: d(() => [
|
|
40
|
-
s(t(V), {
|
|
41
|
-
as: e.as,
|
|
42
|
-
class: "rvc-drawer",
|
|
43
|
-
static: "",
|
|
44
|
-
"aria-modal": "true",
|
|
45
|
-
role: "dialog",
|
|
46
|
-
"initial-focus": t(E),
|
|
47
|
-
"aria-labelledby": t(f),
|
|
48
|
-
onClose: r[6] || (r[6] = (o) => l("drawer:close")),
|
|
49
|
-
onSubmit: r[7] || (r[7] = L((o) => l("drawer:save", o), ["prevent"]))
|
|
50
|
-
}, {
|
|
51
|
-
default: d(() => [
|
|
52
|
-
s(t(k), {
|
|
53
|
-
as: "template",
|
|
54
|
-
enter: "rvc-drawer-backdrop-transition-enter",
|
|
55
|
-
"enter-from": "rvc-drawer-backdrop-transition-enter-from",
|
|
56
|
-
"enter-to": "rvc-drawer-backdrop-transition-enter-to",
|
|
57
|
-
leave: "rvc-drawer-backdrop-transition-leave",
|
|
58
|
-
"leave-from": "rvc-drawer-backdrop-transition-leave-from",
|
|
59
|
-
"leave-to": "rvc-drawer-backdrop-transition-leave-to",
|
|
60
|
-
onBeforeEnter: r[0] || (r[0] = (o) => l("drawer:open")),
|
|
61
|
-
onAfterEnter: r[1] || (r[1] = (o) => l("drawer:opened"))
|
|
62
|
-
}, {
|
|
63
|
-
default: d(() => [...r[8] || (r[8] = [
|
|
64
|
-
a("div", {
|
|
65
|
-
class: "rvc-drawer-backdrop",
|
|
66
|
-
"aria-hidden": "true"
|
|
67
|
-
}, null, -1)
|
|
68
|
-
])]),
|
|
69
|
-
_: 1
|
|
70
|
-
}),
|
|
71
|
-
a("div", H, [
|
|
72
|
-
a("div", I, [
|
|
73
|
-
a("div", z, [
|
|
74
|
-
s(t(k), {
|
|
75
|
-
as: "template",
|
|
76
|
-
enter: "rvc-drawer-transition-enter",
|
|
77
|
-
"enter-from": "rvc-drawer-transition-enter-from",
|
|
78
|
-
"enter-to": "rvc-drawer-transition-enter-to",
|
|
79
|
-
leave: "rvc-drawer-transition-leave",
|
|
80
|
-
"leave-from": "rvc-drawer-transition-leave-from",
|
|
81
|
-
"leave-to": "rvc-drawer-transition-leave-to",
|
|
82
|
-
onBeforeEnter: r[4] || (r[4] = (o) => v.value = !0),
|
|
83
|
-
onAfterLeave: r[5] || (r[5] = (o) => (v.value = !1, l("drawer:closed")))
|
|
84
|
-
}, {
|
|
85
|
-
default: d(() => [
|
|
86
|
-
s(t(R), {
|
|
87
|
-
class: w(["rvc-drawer-panel", e.panelClass]),
|
|
88
|
-
"aria-busy": e.spinning,
|
|
89
|
-
"aria-describedby": t(u)
|
|
90
|
-
}, {
|
|
91
|
-
default: d(() => [
|
|
92
|
-
a("div", M, [
|
|
93
|
-
e.resetHeader ? i(n.$slots, "header", { key: 1 }) : (c(), b("header", {
|
|
94
|
-
key: 0,
|
|
95
|
-
class: w([{ "rvc-drawer-header-sticky": e.headerSticky }, "rvc-drawer-header"])
|
|
96
|
-
}, [
|
|
97
|
-
i(n.$slots, "header", {
|
|
98
|
-
title: e.title,
|
|
99
|
-
showClose: e.showClose
|
|
100
|
-
}, () => [
|
|
101
|
-
a("div", P, [
|
|
102
|
-
i(n.$slots, "title", {
|
|
103
|
-
id: t(f),
|
|
104
|
-
dialogTitle: t(p),
|
|
105
|
-
title: e.title
|
|
106
|
-
}, () => [
|
|
107
|
-
s(t(p), {
|
|
108
|
-
id: t(f),
|
|
109
|
-
class: "rvc-drawer-title"
|
|
110
|
-
}, {
|
|
111
|
-
default: d(() => [
|
|
112
|
-
T(F(e.title), 1)
|
|
113
|
-
]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["id"])
|
|
116
|
-
]),
|
|
117
|
-
e.showClose ? i(n.$slots, "close", {
|
|
118
|
-
key: 0,
|
|
119
|
-
icon: t(g),
|
|
120
|
-
emitClose: () => l("drawer:close")
|
|
121
|
-
}, () => [
|
|
122
|
-
a("div", j, [
|
|
123
|
-
a("button", {
|
|
124
|
-
type: "button",
|
|
125
|
-
class: "rvc-drawer-close",
|
|
126
|
-
"aria-label": "Close panel",
|
|
127
|
-
onClick: r[2] || (r[2] = (o) => l("drawer:close"))
|
|
128
|
-
}, [
|
|
129
|
-
s(t(g), { "aria-hidden": "true" })
|
|
130
|
-
])
|
|
131
|
-
])
|
|
132
|
-
]) : y("", !0)
|
|
133
|
-
])
|
|
134
|
-
])
|
|
135
|
-
], 2)),
|
|
136
|
-
a("div", {
|
|
137
|
-
class: w([{ "rvc-drawer-scroll-reverse": e.scrolledDown }, "rvc-drawer-scroll"])
|
|
138
|
-
}, [
|
|
139
|
-
a("div", {
|
|
140
|
-
id: t(u),
|
|
141
|
-
ref_key: "contentRef",
|
|
142
|
-
ref: h,
|
|
143
|
-
class: "rvc-drawer-content"
|
|
144
|
-
}, [
|
|
145
|
-
i(n.$slots, "default", { ready: t(v) })
|
|
146
|
-
], 8, q)
|
|
147
|
-
], 2),
|
|
148
|
-
e.resetFooter ? i(n.$slots, "footer", { key: 3 }) : (c(), b("footer", G, [
|
|
149
|
-
i(n.$slots, "footer", { loading: e.spinning }, () => [
|
|
150
|
-
s(C, {
|
|
151
|
-
type: "button",
|
|
152
|
-
label: e.cancelLabel,
|
|
153
|
-
color: "light",
|
|
154
|
-
onClick: r[3] || (r[3] = (o) => l("drawer:close"))
|
|
155
|
-
}, null, 8, ["label"]),
|
|
156
|
-
t(D) ? (c(), m(C, {
|
|
157
|
-
key: 0,
|
|
158
|
-
type: "submit",
|
|
159
|
-
label: e.submitLabel,
|
|
160
|
-
spinning: e.spinning,
|
|
161
|
-
disabled: e.spinning
|
|
162
|
-
}, null, 8, ["label", "spinning", "disabled"])) : y("", !0)
|
|
163
|
-
])
|
|
164
|
-
]))
|
|
165
|
-
])
|
|
166
|
-
]),
|
|
167
|
-
_: 3
|
|
168
|
-
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
169
|
-
]),
|
|
170
|
-
_: 3
|
|
171
|
-
})
|
|
172
|
-
])
|
|
173
|
-
])
|
|
174
|
-
])
|
|
175
|
-
]),
|
|
176
|
-
_: 3
|
|
177
|
-
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
178
|
-
]),
|
|
179
|
-
_: 3
|
|
180
|
-
}));
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
export {
|
|
184
|
-
W as _
|
|
185
|
-
};
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { ref as C, computed as f, defineComponent as D, openBlock as p, createBlock as L, unref as o, withCtx as d, createVNode as n, withModifiers as T, createElementVNode as r, normalizeClass as I, createElementBlock as $, renderSlot as s, createTextVNode as N, toDisplayString as R, createCommentVNode as S } from "vue";
|
|
2
|
-
import { TransitionRoot as V, Dialog as h, TransitionChild as g, DialogPanel as x, DialogTitle as B } from "@headlessui/vue";
|
|
3
|
-
import { _ as E } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
|
|
4
|
-
import { r as w } from "./XMarkIcon-CPr_Rd8y.js";
|
|
5
|
-
function A(t) {
|
|
6
|
-
const c = C(null), u = C(!1), l = f(() => t.as === "form"), b = f(() => `${t.id}-title`), m = f(() => `${t.id}-content`), v = f(() => c.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
|
|
7
|
-
return {
|
|
8
|
-
contentRef: c,
|
|
9
|
-
ready: u,
|
|
10
|
-
isForm: l,
|
|
11
|
-
titleId: b,
|
|
12
|
-
descriptionId: m,
|
|
13
|
-
initialFocusElement: v
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const H = {
|
|
17
|
-
role: "presentation",
|
|
18
|
-
class: "rvc-modal-presentation"
|
|
19
|
-
}, M = { class: "rvc-modal-container" }, q = {
|
|
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__ */ D({
|
|
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: c }) {
|
|
41
|
-
const u = t, l = c, {
|
|
42
|
-
contentRef: b,
|
|
43
|
-
ready: m,
|
|
44
|
-
isForm: v,
|
|
45
|
-
titleId: y,
|
|
46
|
-
descriptionId: k,
|
|
47
|
-
initialFocusElement: F
|
|
48
|
-
} = A(u);
|
|
49
|
-
return (i, e) => (p(), L(o(V), { as: "template" }, {
|
|
50
|
-
default: d(() => [
|
|
51
|
-
n(o(h), {
|
|
52
|
-
as: t.as,
|
|
53
|
-
class: "rvc-modal",
|
|
54
|
-
static: "",
|
|
55
|
-
"aria-modal": "true",
|
|
56
|
-
role: "dialog",
|
|
57
|
-
"initial-focus": o(F),
|
|
58
|
-
"aria-labelledby": o(y),
|
|
59
|
-
onClose: e[7] || (e[7] = (a) => l("modal:close")),
|
|
60
|
-
onSubmit: e[8] || (e[8] = T((a) => l("modal:save", a), ["prevent"]))
|
|
61
|
-
}, {
|
|
62
|
-
default: d(() => [
|
|
63
|
-
n(o(g), {
|
|
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: e[0] || (e[0] = (a) => l("modal:open")),
|
|
72
|
-
onAfterEnter: e[1] || (e[1] = (a) => l("modal:opened"))
|
|
73
|
-
}, {
|
|
74
|
-
default: d(() => [...e[9] || (e[9] = [
|
|
75
|
-
r("div", {
|
|
76
|
-
"aria-hidden": "true",
|
|
77
|
-
class: "rvc-modal-backdrop"
|
|
78
|
-
}, null, -1)
|
|
79
|
-
])]),
|
|
80
|
-
_: 1
|
|
81
|
-
}),
|
|
82
|
-
r("div", H, [
|
|
83
|
-
r("div", M, [
|
|
84
|
-
n(o(g), {
|
|
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: e[5] || (e[5] = (a) => m.value = !0),
|
|
93
|
-
onAfterLeave: e[6] || (e[6] = (a) => (m.value = !1, l("modal:closed")))
|
|
94
|
-
}, {
|
|
95
|
-
default: d(() => [
|
|
96
|
-
n(o(x), {
|
|
97
|
-
class: I(["rvc-modal-panel", t.panelClass]),
|
|
98
|
-
"aria-busy": t.spinning,
|
|
99
|
-
"aria-describedby": o(k)
|
|
100
|
-
}, {
|
|
101
|
-
default: d(() => [
|
|
102
|
-
t.resetHeader ? s(i.$slots, "header", { key: 1 }) : (p(), $("header", q, [
|
|
103
|
-
s(i.$slots, "header", { title: t.title }, () => [
|
|
104
|
-
r("div", z, [
|
|
105
|
-
s(i.$slots, "title", {
|
|
106
|
-
id: o(y),
|
|
107
|
-
dialogTitle: o(B),
|
|
108
|
-
title: t.title
|
|
109
|
-
}, () => [
|
|
110
|
-
n(o(B), {
|
|
111
|
-
id: o(y),
|
|
112
|
-
class: "rvc-modal-title"
|
|
113
|
-
}, {
|
|
114
|
-
default: d(() => [
|
|
115
|
-
N(R(t.title), 1)
|
|
116
|
-
]),
|
|
117
|
-
_: 1
|
|
118
|
-
}, 8, ["id"])
|
|
119
|
-
]),
|
|
120
|
-
t.showClose ? s(i.$slots, "close", {
|
|
121
|
-
key: 0,
|
|
122
|
-
icon: o(w),
|
|
123
|
-
emitClose: () => l("modal:close")
|
|
124
|
-
}, () => [
|
|
125
|
-
r("div", P, [
|
|
126
|
-
r("button", {
|
|
127
|
-
type: "button",
|
|
128
|
-
class: "rvc-modal-close",
|
|
129
|
-
"aria-label": "Close panel",
|
|
130
|
-
onClick: e[2] || (e[2] = (a) => l("modal:close"))
|
|
131
|
-
}, [
|
|
132
|
-
n(o(w), { "aria-hidden": "true" })
|
|
133
|
-
])
|
|
134
|
-
])
|
|
135
|
-
]) : S("", !0)
|
|
136
|
-
])
|
|
137
|
-
])
|
|
138
|
-
])),
|
|
139
|
-
r("div", {
|
|
140
|
-
id: o(k),
|
|
141
|
-
ref_key: "contentRef",
|
|
142
|
-
ref: b,
|
|
143
|
-
class: "rvc-modal-content"
|
|
144
|
-
}, [
|
|
145
|
-
s(i.$slots, "default", { ready: o(m) })
|
|
146
|
-
], 8, j),
|
|
147
|
-
t.resetFooter ? s(i.$slots, "footer", { key: 3 }) : (p(), $("footer", G, [
|
|
148
|
-
s(i.$slots, "footer", { loading: t.spinning }, () => [
|
|
149
|
-
n(E, {
|
|
150
|
-
type: o(v) ? "submit" : "button",
|
|
151
|
-
label: t.submitLabel,
|
|
152
|
-
spinning: t.spinning,
|
|
153
|
-
disabled: t.spinning,
|
|
154
|
-
onClick: e[3] || (e[3] = (a) => !o(v) && l("modal:save"))
|
|
155
|
-
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
156
|
-
n(E, {
|
|
157
|
-
type: "button",
|
|
158
|
-
color: "light",
|
|
159
|
-
label: t.cancelLabel,
|
|
160
|
-
onClick: e[4] || (e[4] = (a) => l("modal:close"))
|
|
161
|
-
}, null, 8, ["label"])
|
|
162
|
-
])
|
|
163
|
-
]))
|
|
164
|
-
]),
|
|
165
|
-
_: 3
|
|
166
|
-
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
167
|
-
]),
|
|
168
|
-
_: 3
|
|
169
|
-
})
|
|
170
|
-
])
|
|
171
|
-
])
|
|
172
|
-
]),
|
|
173
|
-
_: 3
|
|
174
|
-
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
175
|
-
]),
|
|
176
|
-
_: 3
|
|
177
|
-
}));
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
export {
|
|
181
|
-
U as _,
|
|
182
|
-
A as u
|
|
183
|
-
};
|