@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
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { t as e } from "./XMarkIcon-CBoWSM1l.js";
|
|
2
|
+
import { t } from "./ButtonBase-DyeIkb-l.js";
|
|
3
|
+
import { n } from "./Modal-D0x_VHiB.js";
|
|
4
|
+
import { 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, renderSlot as f, toDisplayString as p, unref as m, withCtx as h, withModifiers as g } from "vue";
|
|
5
|
+
import { Dialog as _, DialogPanel as v, DialogTitle as y, TransitionChild as b, TransitionRoot as x } from "@headlessui/vue";
|
|
6
|
+
//#region src/components/Drawer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var S = {
|
|
8
|
+
class: "rvc-drawer-presentation",
|
|
9
|
+
role: "presentation"
|
|
10
|
+
}, C = { class: "rvc-drawer-container" }, w = { class: "rvc-drawer-inner" }, T = { class: "rvc-drawer-panel-inner" }, E = { class: "rvc-drawer-header-inner" }, D = { class: "rvc-drawer-close-wrapper" }, O = ["id"], k = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "rvc-drawer-footer"
|
|
13
|
+
}, A = /* @__PURE__ */ l({
|
|
14
|
+
__name: "Drawer",
|
|
15
|
+
props: {
|
|
16
|
+
as: { default: "form" },
|
|
17
|
+
id: {},
|
|
18
|
+
title: {},
|
|
19
|
+
showClose: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
scrolledDown: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
headerSticky: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
spinning: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
submitLabel: { default: "Save" },
|
|
36
|
+
cancelLabel: { default: "Cancel" },
|
|
37
|
+
panelClass: { default: "rvc-drawer-panel-max-width" },
|
|
38
|
+
resetHeader: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
resetFooter: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
emits: [
|
|
48
|
+
"drawer:open",
|
|
49
|
+
"drawer:opened",
|
|
50
|
+
"drawer:close",
|
|
51
|
+
"drawer:save",
|
|
52
|
+
"drawer:closed"
|
|
53
|
+
],
|
|
54
|
+
setup(l, { emit: A }) {
|
|
55
|
+
let j = l, M = A, { contentRef: N, ready: P, isForm: F, titleId: I, descriptionId: L, initialFocusElement: R } = n(j);
|
|
56
|
+
return (n, A) => (d(), r(m(x), { as: "template" }, {
|
|
57
|
+
default: h(() => [c(m(_), {
|
|
58
|
+
as: l.as,
|
|
59
|
+
class: "rvc-drawer",
|
|
60
|
+
static: "",
|
|
61
|
+
"aria-modal": "true",
|
|
62
|
+
role: "dialog",
|
|
63
|
+
"initial-focus": m(R),
|
|
64
|
+
"aria-labelledby": m(I),
|
|
65
|
+
onClose: A[6] ||= (e) => M("drawer:close"),
|
|
66
|
+
onSubmit: A[7] ||= g((e) => M("drawer:save", e), ["prevent"])
|
|
67
|
+
}, {
|
|
68
|
+
default: h(() => [c(m(b), {
|
|
69
|
+
as: "template",
|
|
70
|
+
enter: "rvc-drawer-backdrop-transition-enter",
|
|
71
|
+
"enter-from": "rvc-drawer-backdrop-transition-enter-from",
|
|
72
|
+
"enter-to": "rvc-drawer-backdrop-transition-enter-to",
|
|
73
|
+
leave: "rvc-drawer-backdrop-transition-leave",
|
|
74
|
+
"leave-from": "rvc-drawer-backdrop-transition-leave-from",
|
|
75
|
+
"leave-to": "rvc-drawer-backdrop-transition-leave-to",
|
|
76
|
+
onBeforeEnter: A[0] ||= (e) => M("drawer:open"),
|
|
77
|
+
onAfterEnter: A[1] ||= (e) => M("drawer:opened")
|
|
78
|
+
}, {
|
|
79
|
+
default: h(() => [...A[8] ||= [o("div", {
|
|
80
|
+
class: "rvc-drawer-backdrop",
|
|
81
|
+
"aria-hidden": "true"
|
|
82
|
+
}, null, -1)]]),
|
|
83
|
+
_: 1
|
|
84
|
+
}), o("div", S, [o("div", C, [o("div", w, [c(m(b), {
|
|
85
|
+
as: "template",
|
|
86
|
+
enter: "rvc-drawer-transition-enter",
|
|
87
|
+
"enter-from": "rvc-drawer-transition-enter-from",
|
|
88
|
+
"enter-to": "rvc-drawer-transition-enter-to",
|
|
89
|
+
leave: "rvc-drawer-transition-leave",
|
|
90
|
+
"leave-from": "rvc-drawer-transition-leave-from",
|
|
91
|
+
"leave-to": "rvc-drawer-transition-leave-to",
|
|
92
|
+
onBeforeEnter: A[4] ||= (e) => P.value = !0,
|
|
93
|
+
onAfterLeave: A[5] ||= (e) => (P.value = !1, M("drawer:closed"))
|
|
94
|
+
}, {
|
|
95
|
+
default: h(() => [c(m(v), {
|
|
96
|
+
class: u(["rvc-drawer-panel", l.panelClass]),
|
|
97
|
+
"aria-busy": l.spinning,
|
|
98
|
+
"aria-describedby": m(L)
|
|
99
|
+
}, {
|
|
100
|
+
default: h(() => [f(n.$slots, "panel", {
|
|
101
|
+
title: l.title,
|
|
102
|
+
loading: l.spinning,
|
|
103
|
+
isForm: m(F),
|
|
104
|
+
titleId: m(I),
|
|
105
|
+
descriptionId: m(L),
|
|
106
|
+
contentRef: m(N),
|
|
107
|
+
dialogTitle: m(y),
|
|
108
|
+
emitClose: () => M("drawer:close"),
|
|
109
|
+
emitSave: (e = void 0) => M("drawer:save", e)
|
|
110
|
+
}, () => [o("div", T, [
|
|
111
|
+
l.resetHeader ? f(n.$slots, "header", { key: 1 }) : (d(), a("header", {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: u([{ "rvc-drawer-header-sticky": l.headerSticky }, "rvc-drawer-header"])
|
|
114
|
+
}, [f(n.$slots, "header", {
|
|
115
|
+
title: l.title,
|
|
116
|
+
showClose: l.showClose
|
|
117
|
+
}, () => [o("div", E, [f(n.$slots, "title", {
|
|
118
|
+
id: m(I),
|
|
119
|
+
dialogTitle: m(y),
|
|
120
|
+
title: l.title
|
|
121
|
+
}, () => [c(m(y), {
|
|
122
|
+
id: m(I),
|
|
123
|
+
class: "rvc-drawer-title"
|
|
124
|
+
}, {
|
|
125
|
+
default: h(() => [s(p(l.title), 1)]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["id"])]), l.showClose ? f(n.$slots, "close", {
|
|
128
|
+
key: 0,
|
|
129
|
+
icon: m(e),
|
|
130
|
+
emitClose: () => M("drawer:close")
|
|
131
|
+
}, () => [o("div", D, [o("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
class: "rvc-drawer-close",
|
|
134
|
+
"aria-label": "Close panel",
|
|
135
|
+
onClick: A[2] ||= (e) => M("drawer:close")
|
|
136
|
+
}, [c(m(e), { "aria-hidden": "true" })])])]) : i("", !0)])])], 2)),
|
|
137
|
+
o("div", { class: u([{ "rvc-drawer-scroll-reverse": l.scrolledDown }, "rvc-drawer-scroll"]) }, [o("div", {
|
|
138
|
+
id: m(L),
|
|
139
|
+
ref_key: "contentRef",
|
|
140
|
+
ref: N,
|
|
141
|
+
class: "rvc-drawer-content"
|
|
142
|
+
}, [f(n.$slots, "default", { ready: m(P) })], 8, O)], 2),
|
|
143
|
+
l.resetFooter ? f(n.$slots, "footer", { key: 3 }) : (d(), a("footer", k, [f(n.$slots, "footer", { loading: l.spinning }, () => [c(t, {
|
|
144
|
+
type: "button",
|
|
145
|
+
label: l.cancelLabel,
|
|
146
|
+
color: "light",
|
|
147
|
+
onClick: A[3] ||= (e) => M("drawer:close")
|
|
148
|
+
}, null, 8, ["label"]), m(F) ? (d(), r(t, {
|
|
149
|
+
key: 0,
|
|
150
|
+
type: "submit",
|
|
151
|
+
label: l.submitLabel,
|
|
152
|
+
spinning: l.spinning,
|
|
153
|
+
disabled: l.spinning
|
|
154
|
+
}, null, 8, [
|
|
155
|
+
"label",
|
|
156
|
+
"spinning",
|
|
157
|
+
"disabled"
|
|
158
|
+
])) : i("", !0)])]))
|
|
159
|
+
])])]),
|
|
160
|
+
_: 3
|
|
161
|
+
}, 8, [
|
|
162
|
+
"class",
|
|
163
|
+
"aria-busy",
|
|
164
|
+
"aria-describedby"
|
|
165
|
+
])]),
|
|
166
|
+
_: 3
|
|
167
|
+
})])])])]),
|
|
168
|
+
_: 3
|
|
169
|
+
}, 8, [
|
|
170
|
+
"as",
|
|
171
|
+
"initial-focus",
|
|
172
|
+
"aria-labelledby"
|
|
173
|
+
])]),
|
|
174
|
+
_: 3
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
//#endregion
|
|
179
|
+
export { A as t };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { t as e } from "./ButtonBase-DyeIkb-l.js";
|
|
2
|
+
import { Fragment as t, Transition as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, watch as v, withCtx as y } from "vue";
|
|
3
|
+
import { Menu as b, MenuButton as x, MenuItem as S, MenuItems as C } from "@headlessui/vue";
|
|
4
|
+
//#region node_modules/@heroicons/vue/20/solid/esm/EllipsisVerticalIcon.js
|
|
5
|
+
function w(e, t) {
|
|
6
|
+
return f(), a("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 20 20",
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
"data-slot": "icon"
|
|
12
|
+
}, [o("path", { d: "M10 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM10 8.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM11.5 15.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z" })]);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/Dropdown.vue
|
|
16
|
+
var T = /* @__PURE__ */ l({
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
__name: "Dropdown",
|
|
19
|
+
props: {
|
|
20
|
+
items: {},
|
|
21
|
+
alignLeft: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
fullWidth: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
label: { default: "Options" },
|
|
30
|
+
open: {
|
|
31
|
+
type: [Boolean, null],
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
rootClass: { default: "" }
|
|
35
|
+
},
|
|
36
|
+
emits: ["dropdown:click", "update:open"],
|
|
37
|
+
setup(o, { emit: T }) {
|
|
38
|
+
let E = T, D = l({
|
|
39
|
+
name: "DropdownMenuStateBridge",
|
|
40
|
+
props: {
|
|
41
|
+
close: {
|
|
42
|
+
type: Function,
|
|
43
|
+
required: !0
|
|
44
|
+
},
|
|
45
|
+
menuOpen: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: !0
|
|
48
|
+
},
|
|
49
|
+
open: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: null
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
emits: ["update:open"],
|
|
55
|
+
setup(e, { emit: t }) {
|
|
56
|
+
return v(() => e.menuOpen, (e) => t("update:open", e)), v(() => e.open, (t) => {
|
|
57
|
+
t === !1 && e.menuOpen && e.close();
|
|
58
|
+
}), () => null;
|
|
59
|
+
}
|
|
60
|
+
}), O = (e) => {
|
|
61
|
+
let { as: t, bindAs: n, event: r, icon: i, name: a, ...o } = e;
|
|
62
|
+
return o;
|
|
63
|
+
};
|
|
64
|
+
return (l, v) => (f(), r(_(b), {
|
|
65
|
+
as: "div",
|
|
66
|
+
class: d(["rvc-dropdown", o.rootClass])
|
|
67
|
+
}, {
|
|
68
|
+
default: y(({ open: b, close: T }) => [
|
|
69
|
+
c(_(D), {
|
|
70
|
+
open: o.open,
|
|
71
|
+
"menu-open": b,
|
|
72
|
+
close: T,
|
|
73
|
+
"onUpdate:open": v[0] ||= (e) => E("update:open", e)
|
|
74
|
+
}, null, 8, [
|
|
75
|
+
"open",
|
|
76
|
+
"menu-open",
|
|
77
|
+
"close"
|
|
78
|
+
]),
|
|
79
|
+
m(l.$slots, "button", {
|
|
80
|
+
label: o.label,
|
|
81
|
+
button: _(x)
|
|
82
|
+
}, () => [c(_(x), u({
|
|
83
|
+
as: e,
|
|
84
|
+
label: o.label,
|
|
85
|
+
color: "light",
|
|
86
|
+
icon: _(w),
|
|
87
|
+
"icon-left": o.alignLeft
|
|
88
|
+
}, l.$attrs), null, 16, [
|
|
89
|
+
"label",
|
|
90
|
+
"icon",
|
|
91
|
+
"icon-left"
|
|
92
|
+
])]),
|
|
93
|
+
c(n, {
|
|
94
|
+
"enter-active-class": "rvc-dropdown-transition-enter",
|
|
95
|
+
"enter-from-class": "rvc-dropdown-transition-enter-from",
|
|
96
|
+
"enter-to-class": "rvc-dropdown-transition-enter-to",
|
|
97
|
+
"leave-active-class": "rvc-dropdown-transition-leave",
|
|
98
|
+
"leave-from-class": "rvc-dropdown-transition-leave-from",
|
|
99
|
+
"leave-to-class": "rvc-dropdown-transition-leave-to"
|
|
100
|
+
}, {
|
|
101
|
+
default: y(() => [c(_(C), { class: d(["rvc-dropdown-items", {
|
|
102
|
+
"rvc-dropdown-items-left": o.alignLeft,
|
|
103
|
+
"rvc-dropdown-items-full": o.fullWidth
|
|
104
|
+
}]) }, {
|
|
105
|
+
default: y(() => [m(l.$slots, "items", {
|
|
106
|
+
items: o.items,
|
|
107
|
+
menuItem: _(S)
|
|
108
|
+
}, () => [(f(!0), a(t, null, p(o.items, (e, t) => (f(), r(_(S), {
|
|
109
|
+
key: `${t}-dropdown-item`,
|
|
110
|
+
as: "template"
|
|
111
|
+
}, {
|
|
112
|
+
default: y(() => [m(l.$slots, "item", { item: e }, () => [(f(), r(h(e.as ? e.as : "button"), u({ class: "rvc-dropdown-item" }, { ref_for: !0 }, O(e), {
|
|
113
|
+
as: e.bindAs ? e.bindAs : void 0,
|
|
114
|
+
onClick: (t) => (E("dropdown:click", e), e.event ? e.event() : null)
|
|
115
|
+
}), {
|
|
116
|
+
default: y(() => [e.icon ? (f(), r(h(e.icon), {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "rvc-dropdown-item-icon"
|
|
119
|
+
})) : i("", !0), s(" " + g(e.name), 1)]),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1040, ["as", "onClick"]))])]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1024))), 128))])]),
|
|
124
|
+
_: 3
|
|
125
|
+
}, 8, ["class"])]),
|
|
126
|
+
_: 3
|
|
127
|
+
})
|
|
128
|
+
]),
|
|
129
|
+
_: 3
|
|
130
|
+
}, 8, ["class"]));
|
|
131
|
+
}
|
|
132
|
+
}), E = T;
|
|
133
|
+
//#endregion
|
|
134
|
+
export { T as n, E as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
|
|
2
|
+
//#region src/assets/img/svg/icon-spinner.svg
|
|
3
|
+
var r = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
fill: "none",
|
|
6
|
+
viewBox: "0 0 24 24"
|
|
7
|
+
};
|
|
8
|
+
function i(i, a) {
|
|
9
|
+
return n(), e("svg", r, [...a[0] ||= [t("circle", {
|
|
10
|
+
cx: "12",
|
|
11
|
+
cy: "12",
|
|
12
|
+
r: "10",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"stroke-width": "4",
|
|
15
|
+
style: { opacity: ".25" }
|
|
16
|
+
}, null, -1), t("path", {
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
d: "M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"
|
|
19
|
+
}, null, -1)]]);
|
|
20
|
+
}
|
|
21
|
+
var a = { render: i };
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as t };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementVNode as r, createVNode as i, defineComponent as a, mergeProps as o, openBlock as s, renderSlot as c, unref as l, withCtx as u } from "vue";
|
|
2
|
+
import { Switch as d, SwitchGroup as f, SwitchLabel as p } from "@headlessui/vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/components/Lightswitch.vue
|
|
5
|
+
var m = /* @__PURE__ */ a({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "Lightswitch",
|
|
8
|
+
props: { modelValue: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !1
|
|
11
|
+
} },
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(a, { emit: m }) {
|
|
14
|
+
let h = a, g = m, _ = e({
|
|
15
|
+
get: () => h.modelValue,
|
|
16
|
+
set: (e) => g("update:modelValue", e)
|
|
17
|
+
});
|
|
18
|
+
return (e, a) => (s(), t(l(f), {
|
|
19
|
+
as: "div",
|
|
20
|
+
class: "rvc-lightswitch-group"
|
|
21
|
+
}, {
|
|
22
|
+
default: u(() => [i(l(d), o({
|
|
23
|
+
modelValue: _.value,
|
|
24
|
+
"onUpdate:modelValue": a[0] ||= (e) => _.value = e,
|
|
25
|
+
class: [{ "rvc-lightswitch-enabled": _.value }, "rvc-lightswitch"]
|
|
26
|
+
}, e.$attrs), {
|
|
27
|
+
default: u(() => [...a[1] ||= [r("span", { class: "rvc-lightswitch-toggle" }, null, -1)]]),
|
|
28
|
+
_: 1
|
|
29
|
+
}, 16, ["modelValue", "class"]), e.$slots.default ? (s(), t(l(p), { key: 0 }, {
|
|
30
|
+
default: u(() => [c(e.$slots, "default")]),
|
|
31
|
+
_: 3
|
|
32
|
+
})) : n("", !0)]),
|
|
33
|
+
_: 3
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}), h = m;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { m as n, h as t };
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { t as e } from "./FormInput-k0vAk3VU.js";
|
|
2
|
+
import { t } from "./Modal-D0x_VHiB.js";
|
|
3
|
+
import { t as n } from "./Tooltip-B5w_Ojie.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, unref as _, useAttrs as v, watch as y, withCtx as b } from "vue";
|
|
5
|
+
import { EditorContent as x, useEditor as S } from "@tiptap/vue-3";
|
|
6
|
+
import C from "@tiptap/starter-kit";
|
|
7
|
+
//#region node_modules/@heroicons/vue/16/solid/esm/BoldIcon.js
|
|
8
|
+
function w(e, t) {
|
|
9
|
+
return f(), s("svg", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
viewBox: "0 0 16 16",
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
"data-slot": "icon"
|
|
15
|
+
}, [c("path", {
|
|
16
|
+
"fill-rule": "evenodd",
|
|
17
|
+
d: "M3 3a1 1 0 0 1 1-1h5a3.5 3.5 0 0 1 2.843 5.541A3.75 3.75 0 0 1 9.25 14H4a1 1 0 0 1-1-1V3Zm2.5 3.5v-2H9a1 1 0 0 1 0 2H5.5Zm0 2.5v2.5h3.75a1.25 1.25 0 1 0 0-2.5H5.5Z",
|
|
18
|
+
"clip-rule": "evenodd"
|
|
19
|
+
})]);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region node_modules/@heroicons/vue/16/solid/esm/ItalicIcon.js
|
|
23
|
+
function T(e, t) {
|
|
24
|
+
return f(), s("svg", {
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
viewBox: "0 0 16 16",
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
"data-slot": "icon"
|
|
30
|
+
}, [c("path", {
|
|
31
|
+
"fill-rule": "evenodd",
|
|
32
|
+
d: "M6.25 2.75A.75.75 0 0 1 7 2h6a.75.75 0 0 1 0 1.5h-2.483l-3.429 9H9A.75.75 0 0 1 9 14H3a.75.75 0 0 1 0-1.5h2.483l3.429-9H7a.75.75 0 0 1-.75-.75Z",
|
|
33
|
+
"clip-rule": "evenodd"
|
|
34
|
+
})]);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region node_modules/@heroicons/vue/16/solid/esm/LinkIcon.js
|
|
38
|
+
function E(e, t) {
|
|
39
|
+
return f(), s("svg", {
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
viewBox: "0 0 16 16",
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
"data-slot": "icon"
|
|
45
|
+
}, [c("path", {
|
|
46
|
+
"fill-rule": "evenodd",
|
|
47
|
+
d: "M8.914 6.025a.75.75 0 0 1 1.06 0 3.5 3.5 0 0 1 0 4.95l-2 2a3.5 3.5 0 0 1-5.396-4.402.75.75 0 0 1 1.251.827 2 2 0 0 0 3.085 2.514l2-2a2 2 0 0 0 0-2.828.75.75 0 0 1 0-1.06Z",
|
|
48
|
+
"clip-rule": "evenodd"
|
|
49
|
+
}), c("path", {
|
|
50
|
+
"fill-rule": "evenodd",
|
|
51
|
+
d: "M7.086 9.975a.75.75 0 0 1-1.06 0 3.5 3.5 0 0 1 0-4.95l2-2a3.5 3.5 0 0 1 5.396 4.402.75.75 0 0 1-1.251-.827 2 2 0 0 0-3.085-2.514l-2 2a2 2 0 0 0 0 2.828.75.75 0 0 1 0 1.06Z",
|
|
52
|
+
"clip-rule": "evenodd"
|
|
53
|
+
})]);
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region node_modules/@heroicons/vue/16/solid/esm/ListBulletIcon.js
|
|
57
|
+
function D(e, t) {
|
|
58
|
+
return f(), s("svg", {
|
|
59
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
60
|
+
viewBox: "0 0 16 16",
|
|
61
|
+
fill: "currentColor",
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
"data-slot": "icon"
|
|
64
|
+
}, [c("path", { d: "M3 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.25 3a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 7.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 11.5a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM4 12.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" })]);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region node_modules/@heroicons/vue/16/solid/esm/NumberedListIcon.js
|
|
68
|
+
function O(e, t) {
|
|
69
|
+
return f(), s("svg", {
|
|
70
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
71
|
+
viewBox: "0 0 16 16",
|
|
72
|
+
fill: "currentColor",
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
"data-slot": "icon"
|
|
75
|
+
}, [c("path", { d: "M2.995 1a.625.625 0 1 0 0 1.25h.38v2.125a.625.625 0 1 0 1.25 0v-2.75A.625.625 0 0 0 4 1H2.995ZM3.208 7.385a2.37 2.37 0 0 1 1.027-.124L2.573 8.923a.625.625 0 0 0 .439 1.067l1.987.011a.625.625 0 0 0 .006-1.25l-.49-.003.777-.776c.215-.215.335-.506.335-.809 0-.465-.297-.957-.842-1.078a3.636 3.636 0 0 0-1.993.121.625.625 0 1 0 .416 1.179ZM2.625 11a.625.625 0 1 0 0 1.25H4.25a.125.125 0 0 1 0 .25H3.5a.625.625 0 1 0 0 1.25h.75a.125.125 0 0 1 0 .25H2.625a.625.625 0 1 0 0 1.25H4.25a1.375 1.375 0 0 0 1.153-2.125A1.375 1.375 0 0 0 4.25 11H2.625ZM7.25 2a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM7.25 7.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM6.5 13.25a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75Z" })]);
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/RichTextEditor.vue?vue&type=script&setup=true&lang.ts
|
|
79
|
+
var k = { class: "rvc-rich-text-toolbar" }, A = [
|
|
80
|
+
"disabled",
|
|
81
|
+
"aria-label",
|
|
82
|
+
"onClick"
|
|
83
|
+
], j = /* @__PURE__ */ u({
|
|
84
|
+
inheritAttrs: !1,
|
|
85
|
+
__name: "RichTextEditor",
|
|
86
|
+
props: {
|
|
87
|
+
id: {},
|
|
88
|
+
modelValue: { default: "" },
|
|
89
|
+
rootClass: { default: void 0 },
|
|
90
|
+
config: { default: "default" },
|
|
91
|
+
customExtensions: { default: () => [] },
|
|
92
|
+
customCommands: { default: () => [] },
|
|
93
|
+
disabled: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !1
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
99
|
+
setup(u, { emit: j }) {
|
|
100
|
+
let M = u, N = j, P = p(!1), F = p(!1), I = p(""), L = v(), R = L.class ? `${L.class} ` : "", z = Object.fromEntries(Object.entries(L).filter((e) => e[0] !== "class" && typeof e[1] == "string")), B = S({
|
|
101
|
+
extensions: [C.configure({ link: { openOnClick: !1 } }), ...M.customExtensions],
|
|
102
|
+
content: M.modelValue,
|
|
103
|
+
editorProps: { attributes: {
|
|
104
|
+
...z,
|
|
105
|
+
id: M.id,
|
|
106
|
+
class: `${R}rvc-textarea rvc-rich-text-textarea`
|
|
107
|
+
} },
|
|
108
|
+
onCreate: ({ editor: e }) => {
|
|
109
|
+
N("tiptap:onCreate", e);
|
|
110
|
+
},
|
|
111
|
+
onUpdate: ({ editor: e }) => {
|
|
112
|
+
N("update:modelValue", e.isEmpty ? "" : e.getHTML());
|
|
113
|
+
},
|
|
114
|
+
onSelectionUpdate({ editor: e }) {
|
|
115
|
+
P.value = !e.view.state.selection.empty;
|
|
116
|
+
}
|
|
117
|
+
}), V = i(() => [
|
|
118
|
+
{
|
|
119
|
+
name: "bold",
|
|
120
|
+
icon: w,
|
|
121
|
+
title: "Bold",
|
|
122
|
+
isVisible: !0,
|
|
123
|
+
isActive: () => B.value?.isActive("bold") ?? !1,
|
|
124
|
+
action: () => B.value?.commands.toggleBold()
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "italic",
|
|
128
|
+
icon: T,
|
|
129
|
+
title: "Italic",
|
|
130
|
+
isVisible: !0,
|
|
131
|
+
isActive: () => B.value?.isActive("italic") ?? !1,
|
|
132
|
+
action: () => B.value?.commands.toggleItalic()
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "bulletList",
|
|
136
|
+
icon: D,
|
|
137
|
+
title: "Bullet List",
|
|
138
|
+
isVisible: M.config === "default",
|
|
139
|
+
isActive: () => B.value?.isActive("bulletList") ?? !1,
|
|
140
|
+
action: () => B.value?.commands.toggleBulletList()
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "orderedList",
|
|
144
|
+
icon: O,
|
|
145
|
+
title: "Ordered List",
|
|
146
|
+
isVisible: M.config === "default",
|
|
147
|
+
isActive: () => B.value?.isActive("orderedList") ?? !1,
|
|
148
|
+
action: () => B.value?.commands.toggleOrderedList()
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "link",
|
|
152
|
+
icon: E,
|
|
153
|
+
title: "Hyperlink",
|
|
154
|
+
isVisible: M.config === "default",
|
|
155
|
+
disabled: !P.value && !(B.value?.isActive("link") ?? !1),
|
|
156
|
+
isActive: () => B.value?.isActive("link") ?? !1,
|
|
157
|
+
action: () => {
|
|
158
|
+
I.value = B.value?.getAttributes("link").href || "", F.value = !0;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]), H = i(() => {
|
|
162
|
+
let e = V.value.filter((e) => M.config === "default" || ["bold", "italic"].includes(e.name)), t = M.customCommands.map((e) => {
|
|
163
|
+
let t = typeof e.disabled == "function" ? B.value ? e.disabled(B.value) : !1 : e.disabled ?? !1;
|
|
164
|
+
return {
|
|
165
|
+
...e,
|
|
166
|
+
isVisible: e.isVisible ?? !0,
|
|
167
|
+
disabled: t,
|
|
168
|
+
isActive: () => e.isActive && B.value ? e.isActive(B.value) : !1,
|
|
169
|
+
action: () => B.value && e.action(B.value)
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
return [...e, ...t];
|
|
173
|
+
});
|
|
174
|
+
y(() => M.modelValue, (e) => {
|
|
175
|
+
B.value && B.value.getHTML() !== e && B.value.commands.setContent(e, { emitUpdate: !1 });
|
|
176
|
+
});
|
|
177
|
+
let U = () => {
|
|
178
|
+
B.value && (B.value.commands.setLink({ href: I.value }), F.value = !1, I.value = "");
|
|
179
|
+
};
|
|
180
|
+
return (i, p) => (f(), s(r, null, [
|
|
181
|
+
l(t, {
|
|
182
|
+
id: `${M.id}-modal-add-hyperlink`,
|
|
183
|
+
title: "Add Hyperlink",
|
|
184
|
+
as: "form",
|
|
185
|
+
show: F.value,
|
|
186
|
+
"onModal:close": p[1] ||= (e) => F.value = !1,
|
|
187
|
+
"onModal:save": U
|
|
188
|
+
}, {
|
|
189
|
+
default: b(() => [l(e, {
|
|
190
|
+
modelValue: I.value,
|
|
191
|
+
"onUpdate:modelValue": p[0] ||= (e) => I.value = e,
|
|
192
|
+
placeholder: "https://www.example.com",
|
|
193
|
+
type: "url",
|
|
194
|
+
required: ""
|
|
195
|
+
}, null, 8, ["modelValue"])]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["id", "show"]),
|
|
198
|
+
h(i.$slots, "default"),
|
|
199
|
+
c("div", { class: d([
|
|
200
|
+
"rvc-rich-text",
|
|
201
|
+
u.rootClass,
|
|
202
|
+
{ "rvc-rich-text-disabled": u.disabled }
|
|
203
|
+
]) }, [_(B) ? h(i.$slots, "toolbar", {
|
|
204
|
+
key: 0,
|
|
205
|
+
commands: H.value,
|
|
206
|
+
tiptap: _(B)
|
|
207
|
+
}, () => [c("ul", k, [(f(!0), s(r, null, m(H.value.filter((e) => e.isVisible), (e) => (f(), s("li", { key: `toolbar-item-command-${e.name}` }, [l(n, {
|
|
208
|
+
content: e.title,
|
|
209
|
+
placement: "bottom",
|
|
210
|
+
size: "sm",
|
|
211
|
+
class: "rvc-rich-text-tooltip"
|
|
212
|
+
}, {
|
|
213
|
+
default: b(() => [c("button", {
|
|
214
|
+
disabled: e.disabled,
|
|
215
|
+
type: "button",
|
|
216
|
+
"aria-label": e.title,
|
|
217
|
+
class: d([{ "rvc-rich-text-button-active": e.isActive() }, "rvc-rich-text-button"]),
|
|
218
|
+
onClick: e.action
|
|
219
|
+
}, [(f(), a(g(e.icon)))], 10, A)]),
|
|
220
|
+
_: 2
|
|
221
|
+
}, 1032, ["content"])]))), 128))])]) : o("", !0), l(_(x), { editor: _(B) }, null, 8, ["editor"])], 2)
|
|
222
|
+
], 64));
|
|
223
|
+
}
|
|
224
|
+
}), M = j;
|
|
225
|
+
//#endregion
|
|
226
|
+
export { j as n, M as t };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { t as e } from "./XMarkIcon-CBoWSM1l.js";
|
|
2
|
+
import { createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, onMounted as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f, unref as p, watch as m, withCtx as h } from "vue";
|
|
3
|
+
import { TransitionRoot as g } from "@headlessui/vue";
|
|
4
|
+
//#region src/components/Toast.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _ = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "rvc-toast-title"
|
|
8
|
+
}, v = /* @__PURE__ */ o({
|
|
9
|
+
__name: "Toast",
|
|
10
|
+
props: {
|
|
11
|
+
show: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
as: { default: "div" },
|
|
16
|
+
title: { default: "" },
|
|
17
|
+
icon: {
|
|
18
|
+
type: [
|
|
19
|
+
Function,
|
|
20
|
+
Object,
|
|
21
|
+
null
|
|
22
|
+
],
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
timeout: {
|
|
26
|
+
type: [Number, Boolean],
|
|
27
|
+
default: 5e3
|
|
28
|
+
},
|
|
29
|
+
position: { default: "bottom" },
|
|
30
|
+
type: { default: "info" },
|
|
31
|
+
showClose: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ["toast:close"],
|
|
37
|
+
setup(o, { emit: v }) {
|
|
38
|
+
let y = o, b = v, x = () => {
|
|
39
|
+
y.timeout && y.show && setTimeout(() => {
|
|
40
|
+
b("toast:close");
|
|
41
|
+
}, y.timeout);
|
|
42
|
+
};
|
|
43
|
+
return c(() => {
|
|
44
|
+
x();
|
|
45
|
+
}), m(() => y.show, (e) => {
|
|
46
|
+
e && x();
|
|
47
|
+
}), (c, m) => (l(), t(p(g), {
|
|
48
|
+
show: o.show,
|
|
49
|
+
as: "template",
|
|
50
|
+
enter: "rvc-toast-transition-enter",
|
|
51
|
+
"enter-from": "rvc-toast-transition-enter-from",
|
|
52
|
+
"enter-to": "rvc-toast-transition-enter-to",
|
|
53
|
+
leave: "rvc-toast-transition-leave",
|
|
54
|
+
"leave-from": "rvc-toast-transition-leave-from",
|
|
55
|
+
"leave-to": "rvc-toast-transition-leave-to"
|
|
56
|
+
}, {
|
|
57
|
+
default: h(() => [(l(), t(d(o.as), { class: s([
|
|
58
|
+
"rvc-toast",
|
|
59
|
+
`rvc-toast-${o.position}`,
|
|
60
|
+
`rvc-toast-${o.type}`,
|
|
61
|
+
{ "rvc-toast-open": o.show }
|
|
62
|
+
]) }, {
|
|
63
|
+
default: h(() => [
|
|
64
|
+
u(c.$slots, "icon", {}, () => [o.icon ? (l(), t(d(o.icon), {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "rvc-toast-icon"
|
|
67
|
+
})) : n("", !0)]),
|
|
68
|
+
i("div", null, [u(c.$slots, "title", {}, () => [o.title ? (l(), r("span", _, f(o.title), 1)) : n("", !0)]), u(c.$slots, "default")]),
|
|
69
|
+
u(c.$slots, "close", {}, () => [o.showClose ? (l(), r("button", {
|
|
70
|
+
key: 0,
|
|
71
|
+
type: "button",
|
|
72
|
+
class: "rvc-toast-close",
|
|
73
|
+
"aria-label": "Close",
|
|
74
|
+
onClick: m[0] ||= (e) => c.$emit("toast:close")
|
|
75
|
+
}, [a(p(e))])) : n("", !0)])
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["class"]))]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, ["show"]));
|
|
81
|
+
}
|
|
82
|
+
}), y = v;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { v as n, y as t };
|
package/dist/combobox/index.js
CHANGED