@robuust-digital/vue-components 2.1.0 → 2.2.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 +6 -0
- package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js +60 -0
- package/dist/_shared/ChevronDownIcon-DaaXfD3C.js +41 -0
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CP3x2DUA.js +266 -0
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-CD5914Fk.js +185 -0
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-CmYj-7WQ.js +115 -0
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js +75 -0
- package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-DX23lEFd.js +43 -0
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js +186 -0
- package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js +274 -0
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-BgOTdYXd.js +676 -0
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js +78 -0
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +96 -0
- package/dist/_shared/{icon-spinner-CmxIOqaK.js → icon-spinner-CP0VP_YM.js} +2 -2
- package/dist/combobox/index.js +3 -347
- package/dist/combobox.d.ts +132 -0
- package/dist/core/index.js +17 -826
- package/dist/core.d.ts +669 -0
- package/dist/dialogs/index.js +4 -216
- package/dist/dialogs.d.ts +226 -0
- package/dist/dropdown/index.js +3 -131
- package/dist/dropdown.d.ts +145 -0
- package/dist/index/index.js +35 -0
- package/dist/index.d.ts +1343 -0
- package/dist/lightswitch/index.js +3 -47
- package/dist/lightswitch.d.ts +39 -0
- package/dist/rich-text-editor/index.js +3 -261
- package/dist/rich-text-editor.d.ts +89 -0
- package/dist/toast/index.js +3 -99
- package/dist/toast.d.ts +66 -0
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip.d.ts +61 -0
- package/package.json +69 -38
- package/dist/_shared/ButtonBase-DfkwHIhN.js +0 -87
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +0 -55
- package/dist/_shared/FormInput-B-SQTZTA.js +0 -92
- package/dist/_shared/Modal-Bw2sID1x.js +0 -213
- package/dist/_shared/Tooltip-B93ZF7IF.js +0 -126
|
@@ -1,49 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SwitchGroup as V, Switch as v, SwitchLabel as b } from "@headlessui/vue";
|
|
3
|
-
const k = /* @__PURE__ */ Object.assign({
|
|
4
|
-
inheritAttrs: !1
|
|
5
|
-
}, {
|
|
6
|
-
__name: "Lightswitch",
|
|
7
|
-
props: {
|
|
8
|
-
modelValue: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: !1
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
-
setup(u, { emit: i }) {
|
|
15
|
-
const d = u, c = i, l = n({
|
|
16
|
-
get: () => d.modelValue,
|
|
17
|
-
set: (e) => c("update:modelValue", e)
|
|
18
|
-
});
|
|
19
|
-
return (e, t) => (r(), o(a(V), {
|
|
20
|
-
as: "div",
|
|
21
|
-
class: "rvc-lightswitch-group"
|
|
22
|
-
}, {
|
|
23
|
-
default: s(() => [
|
|
24
|
-
p(a(v), f({
|
|
25
|
-
modelValue: l.value,
|
|
26
|
-
"onUpdate:modelValue": t[0] || (t[0] = (m) => l.value = m),
|
|
27
|
-
class: [{ "rvc-lightswitch-enabled": l.value }, "rvc-lightswitch"]
|
|
28
|
-
}, e.$attrs), {
|
|
29
|
-
default: s(() => t[1] || (t[1] = [
|
|
30
|
-
g("span", { class: "rvc-lightswitch-toggle" }, null, -1)
|
|
31
|
-
])),
|
|
32
|
-
_: 1,
|
|
33
|
-
__: [1]
|
|
34
|
-
}, 16, ["modelValue", "class"]),
|
|
35
|
-
e.$slots.default ? (r(), o(a(b), { key: 0 }, {
|
|
36
|
-
default: s(() => [
|
|
37
|
-
w(e.$slots, "default")
|
|
38
|
-
]),
|
|
39
|
-
_: 3
|
|
40
|
-
})) : h("", !0)
|
|
41
|
-
]),
|
|
42
|
-
_: 3
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
});
|
|
1
|
+
import { _ as s } from "../_shared/Lightswitch.vue_vue_type_script_setup_true_lang-DX23lEFd.js";
|
|
46
2
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
3
|
+
s as Lightswitch,
|
|
4
|
+
s as default
|
|
49
5
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { PublicProps } from 'vue';
|
|
5
|
+
|
|
6
|
+
declare const __VLS_component: DefineComponent<LightswitchProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (value: boolean) => any;
|
|
8
|
+
}, string, PublicProps, Readonly<LightswitchProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
modelValue: boolean;
|
|
12
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: any;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
|
|
25
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export { _default as Lightswitch }
|
|
33
|
+
export default _default;
|
|
34
|
+
|
|
35
|
+
declare interface LightswitchProps {
|
|
36
|
+
modelValue?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { }
|
|
@@ -1,263 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useEditor as O, EditorContent as T } from "@tiptap/vue-3";
|
|
3
|
-
import N from "@tiptap/starter-kit";
|
|
4
|
-
import { _ as U } from "../_shared/Tooltip-B93ZF7IF.js";
|
|
5
|
-
import { _ as q } from "../_shared/FormInput-B-SQTZTA.js";
|
|
6
|
-
import { _ as z } from "../_shared/Modal-Bw2sID1x.js";
|
|
7
|
-
function D(i, d) {
|
|
8
|
-
return s(), r("svg", {
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
viewBox: "0 0 16 16",
|
|
11
|
-
fill: "currentColor",
|
|
12
|
-
"aria-hidden": "true",
|
|
13
|
-
"data-slot": "icon"
|
|
14
|
-
}, [
|
|
15
|
-
n("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
|
-
}
|
|
22
|
-
function I(i, d) {
|
|
23
|
-
return s(), r("svg", {
|
|
24
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
-
viewBox: "0 0 16 16",
|
|
26
|
-
fill: "currentColor",
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
"data-slot": "icon"
|
|
29
|
-
}, [
|
|
30
|
-
n("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
|
-
}
|
|
37
|
-
function R(i, d) {
|
|
38
|
-
return s(), r("svg", {
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
viewBox: "0 0 16 16",
|
|
41
|
-
fill: "currentColor",
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
"data-slot": "icon"
|
|
44
|
-
}, [
|
|
45
|
-
n("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
|
-
}),
|
|
50
|
-
n("path", {
|
|
51
|
-
"fill-rule": "evenodd",
|
|
52
|
-
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",
|
|
53
|
-
"clip-rule": "evenodd"
|
|
54
|
-
})
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
function j(i, d) {
|
|
58
|
-
return s(), r("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
|
-
}, [
|
|
65
|
-
n("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" })
|
|
66
|
-
]);
|
|
67
|
-
}
|
|
68
|
-
function F(i, d) {
|
|
69
|
-
return s(), r("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
|
-
}, [
|
|
76
|
-
n("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" })
|
|
77
|
-
]);
|
|
78
|
-
}
|
|
79
|
-
const K = { class: "rvc-rich-text-toolbar" }, P = ["disabled", "aria-label", "onClick"], ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
80
|
-
__name: "RichTextEditor",
|
|
81
|
-
props: {
|
|
82
|
-
id: {
|
|
83
|
-
type: String,
|
|
84
|
-
required: !0
|
|
85
|
-
},
|
|
86
|
-
modelValue: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: ""
|
|
89
|
-
},
|
|
90
|
-
rootClass: {
|
|
91
|
-
type: String,
|
|
92
|
-
default: void 0
|
|
93
|
-
},
|
|
94
|
-
config: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: "default",
|
|
97
|
-
validator: (i) => ["default", "simple"].includes(i)
|
|
98
|
-
},
|
|
99
|
-
customExtensions: {
|
|
100
|
-
type: Array,
|
|
101
|
-
default: () => []
|
|
102
|
-
},
|
|
103
|
-
customCommands: {
|
|
104
|
-
type: Array,
|
|
105
|
-
default: () => []
|
|
106
|
-
},
|
|
107
|
-
disabled: {
|
|
108
|
-
type: Boolean
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
112
|
-
setup(i, { emit: d }) {
|
|
113
|
-
const a = i, h = d, b = p(!1), u = p(!1), c = p(""), m = H(), k = m.class ? `${m.class} ` : "", y = N.configure({
|
|
114
|
-
link: {
|
|
115
|
-
openOnClick: !1
|
|
116
|
-
}
|
|
117
|
-
}), t = O({
|
|
118
|
-
extensions: [y, ...a.customExtensions],
|
|
119
|
-
content: a.modelValue,
|
|
120
|
-
editorProps: {
|
|
121
|
-
attributes: {
|
|
122
|
-
...m,
|
|
123
|
-
id: a.id,
|
|
124
|
-
class: `${k}rvc-textarea rvc-rich-text-textarea`
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
onCreate: ({ editor: l }) => {
|
|
128
|
-
h("tiptap:onCreate", l);
|
|
129
|
-
},
|
|
130
|
-
onUpdate: ({ editor: l }) => {
|
|
131
|
-
const o = l.isEmpty ? "" : l.getHTML();
|
|
132
|
-
h("update:modelValue", o);
|
|
133
|
-
},
|
|
134
|
-
onSelectionUpdate({ editor: l }) {
|
|
135
|
-
b.value = !l.view.state.selection.empty;
|
|
136
|
-
}
|
|
137
|
-
}), V = x(() => [
|
|
138
|
-
{
|
|
139
|
-
name: "bold",
|
|
140
|
-
icon: D,
|
|
141
|
-
title: "Bold",
|
|
142
|
-
isVisible: !0,
|
|
143
|
-
isActive: () => t.value.isActive("bold"),
|
|
144
|
-
action: () => t.value.commands.toggleBold()
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: "italic",
|
|
148
|
-
icon: I,
|
|
149
|
-
title: "Italic",
|
|
150
|
-
isVisible: !0,
|
|
151
|
-
isActive: () => t.value.isActive("italic"),
|
|
152
|
-
action: () => t.value.commands.toggleItalic()
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "bulletList",
|
|
156
|
-
icon: j,
|
|
157
|
-
title: "Bullet List",
|
|
158
|
-
isVisible: a.config === "default",
|
|
159
|
-
isActive: () => t.value.isActive("bulletList"),
|
|
160
|
-
action: () => t.value.commands.toggleBulletList()
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: "orderedList",
|
|
164
|
-
icon: F,
|
|
165
|
-
title: "Ordered List",
|
|
166
|
-
isVisible: a.config === "default",
|
|
167
|
-
isActive: () => t.value.isActive("orderedList"),
|
|
168
|
-
action: () => t.value.commands.toggleOrderedList()
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
name: "link",
|
|
172
|
-
icon: R,
|
|
173
|
-
title: "Hyperlink",
|
|
174
|
-
isVisible: a.config === "default",
|
|
175
|
-
disabled: !b.value && !t.value.isActive("link"),
|
|
176
|
-
isActive: () => t.value.isActive("link"),
|
|
177
|
-
action: () => {
|
|
178
|
-
c.value = t.value.getAttributes("link").href, u.value = !0;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
]), g = x(() => {
|
|
182
|
-
const l = V.value.filter((e) => a.config === "default" || ["bold", "italic"].includes(e.name)), o = a.customCommands.map((e) => ({
|
|
183
|
-
...e,
|
|
184
|
-
isVisible: e.isVisible ?? !0,
|
|
185
|
-
disabled: typeof e.disabled == "function" ? e.disabled(t.value) : e.disabled ?? !1,
|
|
186
|
-
isActive: () => {
|
|
187
|
-
var w;
|
|
188
|
-
return ((w = e.isActive) == null ? void 0 : w.call(e, t.value)) ?? !1;
|
|
189
|
-
},
|
|
190
|
-
action: () => e.action(t.value)
|
|
191
|
-
}));
|
|
192
|
-
return [...l, ...o];
|
|
193
|
-
});
|
|
194
|
-
L(() => a.modelValue, (l) => {
|
|
195
|
-
t.value.getHTML() === l || t.value.commands.setContent(l, !1);
|
|
196
|
-
});
|
|
197
|
-
const Z = () => {
|
|
198
|
-
t.value.commands.setLink({ href: c.value }), u.value = !1, c.value = null;
|
|
199
|
-
};
|
|
200
|
-
return (l, o) => (s(), r(A, null, [
|
|
201
|
-
v(z, {
|
|
202
|
-
id: `${a.id}-modal-add-hyperlink`,
|
|
203
|
-
title: "Add Hyperlink",
|
|
204
|
-
as: "form",
|
|
205
|
-
show: u.value,
|
|
206
|
-
"onModal:close": o[1] || (o[1] = (e) => u.value = !1),
|
|
207
|
-
"onModal:save": Z
|
|
208
|
-
}, {
|
|
209
|
-
default: M(() => [
|
|
210
|
-
v(q, {
|
|
211
|
-
modelValue: c.value,
|
|
212
|
-
"onUpdate:modelValue": o[0] || (o[0] = (e) => c.value = e),
|
|
213
|
-
placeholder: "https://www.example.com",
|
|
214
|
-
type: "url",
|
|
215
|
-
required: ""
|
|
216
|
-
}, null, 8, ["modelValue"])
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
}, 8, ["id", "show"]),
|
|
220
|
-
C(l.$slots, "default"),
|
|
221
|
-
n("div", {
|
|
222
|
-
class: _(["rvc-rich-text", i.rootClass, { "rvc-rich-text-disabled": i.disabled }])
|
|
223
|
-
}, [
|
|
224
|
-
f(t) ? C(l.$slots, "toolbar", {
|
|
225
|
-
key: 0,
|
|
226
|
-
commands: g.value,
|
|
227
|
-
tiptap: f(t)
|
|
228
|
-
}, () => [
|
|
229
|
-
n("ul", K, [
|
|
230
|
-
(s(!0), r(A, null, B(g.value.filter((e) => e.isVisible), (e) => (s(), r("li", {
|
|
231
|
-
key: `toolbar-item-command-${e.name}`
|
|
232
|
-
}, [
|
|
233
|
-
v(U, {
|
|
234
|
-
content: e.title,
|
|
235
|
-
placement: "bottom",
|
|
236
|
-
size: "sm",
|
|
237
|
-
class: "rvc-rich-text-tooltip"
|
|
238
|
-
}, {
|
|
239
|
-
default: M(() => [
|
|
240
|
-
n("button", {
|
|
241
|
-
disabled: e.disabled,
|
|
242
|
-
type: "button",
|
|
243
|
-
"aria-label": e.title,
|
|
244
|
-
class: _([{ "rvc-rich-text-button-active": e.isActive() }, "rvc-rich-text-button"]),
|
|
245
|
-
onClick: e.action
|
|
246
|
-
}, [
|
|
247
|
-
(s(), E(S(e.icon)))
|
|
248
|
-
], 10, P)
|
|
249
|
-
]),
|
|
250
|
-
_: 2
|
|
251
|
-
}, 1032, ["content"])
|
|
252
|
-
]))), 128))
|
|
253
|
-
])
|
|
254
|
-
]) : $("", !0),
|
|
255
|
-
v(f(T), { editor: f(t) }, null, 8, ["editor"])
|
|
256
|
-
], 2)
|
|
257
|
-
], 64));
|
|
258
|
-
}
|
|
259
|
-
});
|
|
1
|
+
import { _ as t } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js";
|
|
260
2
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
3
|
+
t as RichTextEditor,
|
|
4
|
+
t as default
|
|
263
5
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { Editor } from '@tiptap/vue-3';
|
|
5
|
+
import { Extension } from '@tiptap/core';
|
|
6
|
+
import { FunctionalComponent } from 'vue';
|
|
7
|
+
import { HTMLAttributes } from 'vue';
|
|
8
|
+
import { PublicProps } from 'vue';
|
|
9
|
+
import { VNodeProps } from 'vue';
|
|
10
|
+
|
|
11
|
+
declare const __VLS_component: DefineComponent<RichTextEditorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
"tiptap:onCreate": (editor: any) => any;
|
|
14
|
+
}, string, PublicProps, Readonly<RichTextEditorProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
"onTiptap:onCreate"?: ((editor: any) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
modelValue: string;
|
|
19
|
+
rootClass: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
config: RichTextConfig;
|
|
22
|
+
customExtensions: Extension[];
|
|
23
|
+
customCommands: CustomCommand[];
|
|
24
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
|
|
26
|
+
declare function __VLS_template(): {
|
|
27
|
+
attrs: Partial<{}>;
|
|
28
|
+
slots: {
|
|
29
|
+
default?(_: {}): any;
|
|
30
|
+
toolbar?(_: {
|
|
31
|
+
commands: ({
|
|
32
|
+
name: string;
|
|
33
|
+
icon: FunctionalComponent<HTMLAttributes & VNodeProps, {}, any, {}>;
|
|
34
|
+
title: string;
|
|
35
|
+
isVisible: boolean;
|
|
36
|
+
isActive: () => boolean;
|
|
37
|
+
action: () => boolean | undefined;
|
|
38
|
+
disabled?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
isVisible: boolean | ((editor: Editor) => boolean);
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
isActive: () => boolean;
|
|
43
|
+
action: () => void | undefined;
|
|
44
|
+
name: string;
|
|
45
|
+
icon?: any;
|
|
46
|
+
title: string;
|
|
47
|
+
})[];
|
|
48
|
+
tiptap: Editor;
|
|
49
|
+
}): any;
|
|
50
|
+
};
|
|
51
|
+
refs: {};
|
|
52
|
+
rootEl: any;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
56
|
+
|
|
57
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare interface CustomCommand {
|
|
64
|
+
name: string;
|
|
65
|
+
icon?: any;
|
|
66
|
+
title: string;
|
|
67
|
+
isVisible?: boolean | ((editor: Editor) => boolean);
|
|
68
|
+
disabled?: boolean | ((editor: Editor) => boolean);
|
|
69
|
+
isActive?: (editor: Editor) => boolean;
|
|
70
|
+
action: (editor: Editor) => void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
74
|
+
export { _default as RichTextEditor }
|
|
75
|
+
export default _default;
|
|
76
|
+
|
|
77
|
+
declare type RichTextConfig = 'default' | 'simple';
|
|
78
|
+
|
|
79
|
+
declare interface RichTextEditorProps {
|
|
80
|
+
id: string;
|
|
81
|
+
modelValue?: string;
|
|
82
|
+
rootClass?: string;
|
|
83
|
+
config?: RichTextConfig;
|
|
84
|
+
customExtensions?: Extension[];
|
|
85
|
+
customCommands?: CustomCommand[];
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { }
|
package/dist/toast/index.js
CHANGED
|
@@ -1,101 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TransitionRoot as b } from "@headlessui/vue";
|
|
3
|
-
import { r as g } from "../_shared/XMarkIcon-90mcPzBs.js";
|
|
4
|
-
const k = { class: "rvc-toast-title" }, V = {
|
|
5
|
-
__name: "Toast",
|
|
6
|
-
props: {
|
|
7
|
-
show: {
|
|
8
|
-
type: Boolean
|
|
9
|
-
},
|
|
10
|
-
as: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: "div"
|
|
13
|
-
},
|
|
14
|
-
title: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
icon: {
|
|
19
|
-
type: [Object, Function],
|
|
20
|
-
default: null
|
|
21
|
-
},
|
|
22
|
-
timeout: {
|
|
23
|
-
type: [Number, Boolean],
|
|
24
|
-
default: 5e3
|
|
25
|
-
},
|
|
26
|
-
position: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: "bottom",
|
|
29
|
-
validator: (t) => ["top", "bottom"].includes(t)
|
|
30
|
-
},
|
|
31
|
-
type: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "info",
|
|
34
|
-
validator: (t) => ["success", "warning", "danger", "info"].includes(t)
|
|
35
|
-
},
|
|
36
|
-
showClose: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: !1
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
emits: ["toast:close"],
|
|
42
|
-
setup(t, { emit: d }) {
|
|
43
|
-
const o = t, v = d, l = () => {
|
|
44
|
-
o.timeout && o.show && setTimeout(() => {
|
|
45
|
-
v("toast:close");
|
|
46
|
-
}, o.timeout);
|
|
47
|
-
};
|
|
48
|
-
return y(() => {
|
|
49
|
-
l();
|
|
50
|
-
}), w(() => o.show, (e) => {
|
|
51
|
-
e && l();
|
|
52
|
-
}), (e, i) => (s(), n(r(b), {
|
|
53
|
-
show: t.show,
|
|
54
|
-
as: "template",
|
|
55
|
-
enter: "rvc-toast-transition-enter",
|
|
56
|
-
"enter-from": "rvc-toast-transition-enter-from",
|
|
57
|
-
"enter-to": "rvc-toast-transition-enter-to",
|
|
58
|
-
leave: "rvc-toast-transition-leave",
|
|
59
|
-
"leave-from": "rvc-toast-transition-leave-from",
|
|
60
|
-
"leave-to": "rvc-toast-transition-leave-to"
|
|
61
|
-
}, {
|
|
62
|
-
default: c(() => [
|
|
63
|
-
(s(), n(m(t.as), {
|
|
64
|
-
class: h(["rvc-toast", `rvc-toast-${t.position}`, `rvc-toast-${t.type}`, { "rvc-toast-open": t.show }])
|
|
65
|
-
}, {
|
|
66
|
-
default: c(() => [
|
|
67
|
-
a(e.$slots, "icon", {}, () => [
|
|
68
|
-
t.icon ? (s(), n(m(t.icon), {
|
|
69
|
-
key: 0,
|
|
70
|
-
class: "rvc-toast-icon"
|
|
71
|
-
})) : f("", !0)
|
|
72
|
-
]),
|
|
73
|
-
u("div", null, [
|
|
74
|
-
a(e.$slots, "title", {}, () => [
|
|
75
|
-
u("span", k, p(t.title), 1)
|
|
76
|
-
]),
|
|
77
|
-
a(e.$slots, "default")
|
|
78
|
-
]),
|
|
79
|
-
a(e.$slots, "close", {}, () => [
|
|
80
|
-
t.showClose ? (s(), C("button", {
|
|
81
|
-
key: 0,
|
|
82
|
-
type: "button",
|
|
83
|
-
class: "rvc-toast-close",
|
|
84
|
-
"aria-label": "Close",
|
|
85
|
-
onClick: i[0] || (i[0] = (B) => e.$emit("toast:close"))
|
|
86
|
-
}, [
|
|
87
|
-
$(r(g))
|
|
88
|
-
])) : f("", !0)
|
|
89
|
-
])
|
|
90
|
-
]),
|
|
91
|
-
_: 3
|
|
92
|
-
}, 8, ["class"]))
|
|
93
|
-
]),
|
|
94
|
-
_: 3
|
|
95
|
-
}, 8, ["show"]));
|
|
96
|
-
}
|
|
97
|
-
};
|
|
1
|
+
import { _ as s } from "../_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js";
|
|
98
2
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
3
|
+
s as Toast,
|
|
4
|
+
s as default
|
|
101
5
|
};
|
package/dist/toast.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { FunctionalComponent } from 'vue';
|
|
5
|
+
import { HTMLAttributes } from 'vue';
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
7
|
+
import { SVGAttributes } from 'vue';
|
|
8
|
+
import { VNodeProps } from 'vue';
|
|
9
|
+
|
|
10
|
+
declare const __VLS_component: DefineComponent<ToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
11
|
+
"toast:close": () => any;
|
|
12
|
+
}, string, PublicProps, Readonly<ToastProps> & Readonly<{
|
|
13
|
+
"onToast:close"?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
title: string | null;
|
|
16
|
+
as: string;
|
|
17
|
+
icon: Icon | null;
|
|
18
|
+
type: ToastType | null;
|
|
19
|
+
showClose: boolean;
|
|
20
|
+
show: boolean;
|
|
21
|
+
position: ToastPosition;
|
|
22
|
+
timeout: number | boolean;
|
|
23
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
|
|
25
|
+
declare function __VLS_template(): {
|
|
26
|
+
attrs: Partial<{}>;
|
|
27
|
+
slots: {
|
|
28
|
+
icon?(_: {}): any;
|
|
29
|
+
title?(_: {}): any;
|
|
30
|
+
default?(_: {}): any;
|
|
31
|
+
close?(_: {}): any;
|
|
32
|
+
};
|
|
33
|
+
refs: {};
|
|
34
|
+
rootEl: any;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
38
|
+
|
|
39
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export { _default as Toast }
|
|
47
|
+
export default _default;
|
|
48
|
+
|
|
49
|
+
declare type Icon = FunctionalComponent<SVGAttributes & HTMLAttributes & VNodeProps>;
|
|
50
|
+
|
|
51
|
+
declare type ToastPosition = 'top' | 'bottom';
|
|
52
|
+
|
|
53
|
+
declare interface ToastProps {
|
|
54
|
+
show?: boolean;
|
|
55
|
+
as?: string;
|
|
56
|
+
title?: string | undefined | null;
|
|
57
|
+
icon?: Icon | null;
|
|
58
|
+
timeout?: number | boolean;
|
|
59
|
+
position?: ToastPosition;
|
|
60
|
+
type?: ToastType | undefined | null;
|
|
61
|
+
showClose?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare type ToastType = 'success' | 'warning' | 'danger' | 'info';
|
|
65
|
+
|
|
66
|
+
export { }
|
package/dist/tooltip/index.js
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AlignedPlacement } from '@floating-ui/vue';
|
|
2
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
3
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { DefineComponent } from 'vue';
|
|
5
|
+
import { PublicProps } from 'vue';
|
|
6
|
+
import { Side } from '@floating-ui/vue';
|
|
7
|
+
|
|
8
|
+
declare const __VLS_component: DefineComponent<TooltipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
|
|
9
|
+
blur: boolean;
|
|
10
|
+
size: TooltipSize;
|
|
11
|
+
maxWidth: number | null;
|
|
12
|
+
tooltipClass: string;
|
|
13
|
+
placement: TooltipPlacement;
|
|
14
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
15
|
+
wrapperRef: HTMLDivElement;
|
|
16
|
+
tooltipRef: HTMLDivElement;
|
|
17
|
+
arrowRef: HTMLDivElement;
|
|
18
|
+
}, HTMLDivElement>;
|
|
19
|
+
|
|
20
|
+
declare function __VLS_template(): {
|
|
21
|
+
attrs: Partial<{}>;
|
|
22
|
+
slots: {
|
|
23
|
+
default?(_: {}): any;
|
|
24
|
+
content?(_: {
|
|
25
|
+
content: string;
|
|
26
|
+
}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
wrapperRef: HTMLDivElement;
|
|
30
|
+
tooltipRef: HTMLDivElement;
|
|
31
|
+
arrowRef: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
rootEl: HTMLDivElement;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
37
|
+
|
|
38
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
+
export { _default as Tooltip }
|
|
46
|
+
export default _default;
|
|
47
|
+
|
|
48
|
+
declare type TooltipPlacement = AlignedPlacement | Side;
|
|
49
|
+
|
|
50
|
+
declare interface TooltipProps {
|
|
51
|
+
content: string;
|
|
52
|
+
blur?: boolean;
|
|
53
|
+
maxWidth?: number | null;
|
|
54
|
+
tooltipClass?: string;
|
|
55
|
+
placement?: TooltipPlacement;
|
|
56
|
+
size?: TooltipSize;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare type TooltipSize = 'sm' | 'base';
|
|
60
|
+
|
|
61
|
+
export { }
|