@robuust-digital/vue-components 2.0.0 → 2.2.0-rc.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 +25 -0
- package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-B0YsKehI.js +60 -0
- package/dist/_shared/ChevronDownIcon-DaaXfD3C.js +41 -0
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-D1vKMJok.js +266 -0
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-DT6tBBZ7.js +186 -0
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-D5vTFLkq.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-CvN-2WJt.js +44 -0
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-DBEOIZnO.js +187 -0
- package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-Bs4WdJhA.js +274 -0
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-CsGx6wBK.js +676 -0
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-FEeRXoIx.js +75 -0
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +96 -0
- package/dist/combobox/index.js +3 -347
- package/dist/combobox.d.ts +4 -0
- package/dist/components/Accordion.vue.d.ts +37 -0
- package/dist/components/Alert.vue.d.ts +39 -0
- package/dist/components/Badge.vue.d.ts +32 -0
- package/dist/components/ButtonBase.vue.d.ts +50 -0
- package/dist/components/Checkbox.vue.d.ts +39 -0
- package/dist/components/Combobox.vue.d.ts +112 -0
- package/dist/components/DataTable.vue.d.ts +122 -0
- package/dist/components/Drawer.vue.d.ts +103 -0
- package/dist/components/Dropdown.vue.d.ts +120 -0
- package/dist/components/EmptyState.vue.d.ts +23 -0
- package/dist/components/FormInput.vue.d.ts +49 -0
- package/dist/components/FormSelect.vue.d.ts +58 -0
- package/dist/components/FormTextarea.vue.d.ts +16 -0
- package/dist/components/Lightswitch.vue.d.ts +26 -0
- package/dist/components/Modal.vue.d.ts +98 -0
- package/dist/components/Pagination.vue.d.ts +60 -0
- package/dist/components/Radio.vue.d.ts +34 -0
- package/dist/components/RichTextEditor.vue.d.ts +71 -0
- package/dist/components/Tabs.vue.d.ts +26 -0
- package/dist/components/Toast.vue.d.ts +46 -0
- package/dist/components/Tooltip.vue.d.ts +45 -0
- package/dist/composables/useDialogContext.d.ts +18 -0
- package/dist/composables/useForm.d.ts +6 -0
- package/dist/core/button.css +1 -9
- package/dist/core/checkbox.css +6 -9
- package/dist/core/index.js +17 -799
- package/dist/core/input.css +8 -7
- package/dist/core/radio.css +6 -9
- package/dist/core/utilities.css +12 -0
- package/dist/core.d.ts +27 -0
- package/dist/dialogs/index.js +4 -206
- package/dist/dialogs.d.ts +5 -0
- package/dist/dropdown/index.js +3 -131
- package/dist/dropdown.d.ts +4 -0
- package/dist/index/index.js +35 -0
- package/dist/index.d.ts +8 -0
- package/dist/lightswitch/index.js +3 -47
- package/dist/lightswitch.d.ts +4 -0
- package/dist/rich-text-editor/index.js +3 -263
- package/dist/rich-text-editor.d.ts +4 -0
- package/dist/toast/index.js +3 -99
- package/dist/toast.d.ts +4 -0
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip.d.ts +4 -0
- package/dist/types/shared.d.ts +3 -0
- package/package.json +55 -24
- package/dist/_shared/ButtonBase-DfkwHIhN.js +0 -87
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +0 -55
- package/dist/_shared/FormInput-C5LjZViC.js +0 -85
- package/dist/_shared/Modal-dqDGKVw5.js +0 -201
- package/dist/_shared/Tooltip-B93ZF7IF.js +0 -126
|
@@ -1,265 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useEditor as O, EditorContent as T } from "@tiptap/vue-3";
|
|
3
|
-
import N from "@tiptap/extension-link";
|
|
4
|
-
import U from "@tiptap/starter-kit";
|
|
5
|
-
import { _ as q } from "../_shared/Tooltip-B93ZF7IF.js";
|
|
6
|
-
import { _ as z } from "../_shared/FormInput-C5LjZViC.js";
|
|
7
|
-
import { _ as D } from "../_shared/Modal-dqDGKVw5.js";
|
|
8
|
-
function I(i, d) {
|
|
9
|
-
return s(), r("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
|
-
}, [
|
|
16
|
-
n("path", {
|
|
17
|
-
"fill-rule": "evenodd",
|
|
18
|
-
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",
|
|
19
|
-
"clip-rule": "evenodd"
|
|
20
|
-
})
|
|
21
|
-
]);
|
|
22
|
-
}
|
|
23
|
-
function R(i, d) {
|
|
24
|
-
return s(), r("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
|
-
}, [
|
|
31
|
-
n("path", {
|
|
32
|
-
"fill-rule": "evenodd",
|
|
33
|
-
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",
|
|
34
|
-
"clip-rule": "evenodd"
|
|
35
|
-
})
|
|
36
|
-
]);
|
|
37
|
-
}
|
|
38
|
-
function j(i, d) {
|
|
39
|
-
return s(), r("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
|
-
}, [
|
|
46
|
-
n("path", {
|
|
47
|
-
"fill-rule": "evenodd",
|
|
48
|
-
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",
|
|
49
|
-
"clip-rule": "evenodd"
|
|
50
|
-
}),
|
|
51
|
-
n("path", {
|
|
52
|
-
"fill-rule": "evenodd",
|
|
53
|
-
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",
|
|
54
|
-
"clip-rule": "evenodd"
|
|
55
|
-
})
|
|
56
|
-
]);
|
|
57
|
-
}
|
|
58
|
-
function F(i, d) {
|
|
59
|
-
return s(), r("svg", {
|
|
60
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
-
viewBox: "0 0 16 16",
|
|
62
|
-
fill: "currentColor",
|
|
63
|
-
"aria-hidden": "true",
|
|
64
|
-
"data-slot": "icon"
|
|
65
|
-
}, [
|
|
66
|
-
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" })
|
|
67
|
-
]);
|
|
68
|
-
}
|
|
69
|
-
function K(i, d) {
|
|
70
|
-
return s(), r("svg", {
|
|
71
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
72
|
-
viewBox: "0 0 16 16",
|
|
73
|
-
fill: "currentColor",
|
|
74
|
-
"aria-hidden": "true",
|
|
75
|
-
"data-slot": "icon"
|
|
76
|
-
}, [
|
|
77
|
-
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" })
|
|
78
|
-
]);
|
|
79
|
-
}
|
|
80
|
-
const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "onClick"], le = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
81
|
-
__name: "RichTextEditor",
|
|
82
|
-
props: {
|
|
83
|
-
id: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: !0
|
|
86
|
-
},
|
|
87
|
-
modelValue: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: ""
|
|
90
|
-
},
|
|
91
|
-
rootClass: {
|
|
92
|
-
type: String,
|
|
93
|
-
default: void 0
|
|
94
|
-
},
|
|
95
|
-
config: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: "default",
|
|
98
|
-
validator: (i) => ["default", "simple"].includes(i)
|
|
99
|
-
},
|
|
100
|
-
customExtensions: {
|
|
101
|
-
type: Array,
|
|
102
|
-
default: () => []
|
|
103
|
-
},
|
|
104
|
-
customCommands: {
|
|
105
|
-
type: Array,
|
|
106
|
-
default: () => []
|
|
107
|
-
},
|
|
108
|
-
disabled: {
|
|
109
|
-
type: Boolean
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
113
|
-
setup(i, { emit: d }) {
|
|
114
|
-
const a = i, h = d, b = p(!1), u = p(!1), c = p(""), m = H(), k = m.class ? `${m.class} ` : "", y = [
|
|
115
|
-
U,
|
|
116
|
-
N.configure({
|
|
117
|
-
openOnClick: !1
|
|
118
|
-
})
|
|
119
|
-
], t = O({
|
|
120
|
-
extensions: [...y, ...a.customExtensions],
|
|
121
|
-
content: a.modelValue,
|
|
122
|
-
editorProps: {
|
|
123
|
-
attributes: {
|
|
124
|
-
...m,
|
|
125
|
-
id: a.id,
|
|
126
|
-
class: `${k}rvc-textarea rvc-rich-text-textarea`
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
onCreate: ({ editor: l }) => {
|
|
130
|
-
h("tiptap:onCreate", l);
|
|
131
|
-
},
|
|
132
|
-
onUpdate: ({ editor: l }) => {
|
|
133
|
-
const o = l.isEmpty ? "" : l.getHTML();
|
|
134
|
-
h("update:modelValue", o);
|
|
135
|
-
},
|
|
136
|
-
onSelectionUpdate({ editor: l }) {
|
|
137
|
-
b.value = !l.view.state.selection.empty;
|
|
138
|
-
}
|
|
139
|
-
}), V = x(() => [
|
|
140
|
-
{
|
|
141
|
-
name: "bold",
|
|
142
|
-
icon: I,
|
|
143
|
-
title: "Bold",
|
|
144
|
-
isVisible: !0,
|
|
145
|
-
isActive: () => t.value.isActive("bold"),
|
|
146
|
-
action: () => t.value.commands.toggleBold()
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: "italic",
|
|
150
|
-
icon: R,
|
|
151
|
-
title: "Italic",
|
|
152
|
-
isVisible: !0,
|
|
153
|
-
isActive: () => t.value.isActive("italic"),
|
|
154
|
-
action: () => t.value.commands.toggleItalic()
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: "bulletList",
|
|
158
|
-
icon: F,
|
|
159
|
-
title: "Bullet List",
|
|
160
|
-
isVisible: a.config === "default",
|
|
161
|
-
isActive: () => t.value.isActive("bulletList"),
|
|
162
|
-
action: () => t.value.commands.toggleBulletList()
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
name: "orderedList",
|
|
166
|
-
icon: K,
|
|
167
|
-
title: "Ordered List",
|
|
168
|
-
isVisible: a.config === "default",
|
|
169
|
-
isActive: () => t.value.isActive("orderedList"),
|
|
170
|
-
action: () => t.value.commands.toggleOrderedList()
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: "link",
|
|
174
|
-
icon: j,
|
|
175
|
-
title: "Hyperlink",
|
|
176
|
-
isVisible: a.config === "default",
|
|
177
|
-
disabled: !b.value && !t.value.isActive("link"),
|
|
178
|
-
isActive: () => t.value.isActive("link"),
|
|
179
|
-
action: () => {
|
|
180
|
-
c.value = t.value.getAttributes("link").href, u.value = !0;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
]), g = x(() => {
|
|
184
|
-
const l = V.value.filter((e) => a.config === "default" || ["bold", "italic"].includes(e.name)), o = a.customCommands.map((e) => ({
|
|
185
|
-
...e,
|
|
186
|
-
isVisible: e.isVisible ?? !0,
|
|
187
|
-
disabled: typeof e.disabled == "function" ? e.disabled(t.value) : e.disabled ?? !1,
|
|
188
|
-
isActive: () => {
|
|
189
|
-
var w;
|
|
190
|
-
return ((w = e.isActive) == null ? void 0 : w.call(e, t.value)) ?? !1;
|
|
191
|
-
},
|
|
192
|
-
action: () => e.action(t.value)
|
|
193
|
-
}));
|
|
194
|
-
return [...l, ...o];
|
|
195
|
-
});
|
|
196
|
-
L(() => a.modelValue, (l) => {
|
|
197
|
-
t.value.getHTML() === l || t.value.commands.setContent(l, !1);
|
|
198
|
-
});
|
|
199
|
-
const Z = () => {
|
|
200
|
-
t.value.commands.setLink({ href: c.value }), u.value = !1, c.value = null;
|
|
201
|
-
};
|
|
202
|
-
return (l, o) => (s(), r(A, null, [
|
|
203
|
-
v(D, {
|
|
204
|
-
id: `${a.id}-modal-add-hyperlink`,
|
|
205
|
-
title: "Add Hyperlink",
|
|
206
|
-
as: "form",
|
|
207
|
-
show: u.value,
|
|
208
|
-
"onModal:close": o[1] || (o[1] = (e) => u.value = !1),
|
|
209
|
-
"onModal:save": Z
|
|
210
|
-
}, {
|
|
211
|
-
default: M(() => [
|
|
212
|
-
v(z, {
|
|
213
|
-
modelValue: c.value,
|
|
214
|
-
"onUpdate:modelValue": o[0] || (o[0] = (e) => c.value = e),
|
|
215
|
-
placeholder: "https://www.example.com",
|
|
216
|
-
type: "url",
|
|
217
|
-
required: ""
|
|
218
|
-
}, null, 8, ["modelValue"])
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
}, 8, ["id", "show"]),
|
|
222
|
-
C(l.$slots, "default"),
|
|
223
|
-
n("div", {
|
|
224
|
-
class: _(["rvc-rich-text", i.rootClass, { "rvc-rich-text-disabled": i.disabled }])
|
|
225
|
-
}, [
|
|
226
|
-
f(t) ? C(l.$slots, "toolbar", {
|
|
227
|
-
key: 0,
|
|
228
|
-
commands: g.value,
|
|
229
|
-
tiptap: f(t)
|
|
230
|
-
}, () => [
|
|
231
|
-
n("ul", P, [
|
|
232
|
-
(s(!0), r(A, null, B(g.value.filter((e) => e.isVisible), (e) => (s(), r("li", {
|
|
233
|
-
key: `toolbar-item-command-${e.name}`
|
|
234
|
-
}, [
|
|
235
|
-
v(q, {
|
|
236
|
-
content: e.title,
|
|
237
|
-
placement: "bottom",
|
|
238
|
-
size: "sm",
|
|
239
|
-
class: "rvc-rich-text-tooltip"
|
|
240
|
-
}, {
|
|
241
|
-
default: M(() => [
|
|
242
|
-
n("button", {
|
|
243
|
-
disabled: e.disabled,
|
|
244
|
-
type: "button",
|
|
245
|
-
"aria-label": e.title,
|
|
246
|
-
class: _([{ "rvc-rich-text-button-active": e.isActive() }, "rvc-rich-text-button"]),
|
|
247
|
-
onClick: e.action
|
|
248
|
-
}, [
|
|
249
|
-
(s(), E(S(e.icon)))
|
|
250
|
-
], 10, G)
|
|
251
|
-
]),
|
|
252
|
-
_: 2
|
|
253
|
-
}, 1032, ["content"])
|
|
254
|
-
]))), 128))
|
|
255
|
-
])
|
|
256
|
-
]) : $("", !0),
|
|
257
|
-
v(f(T), { editor: f(t) }, null, 8, ["editor"])
|
|
258
|
-
], 2)
|
|
259
|
-
], 64));
|
|
260
|
-
}
|
|
261
|
-
});
|
|
1
|
+
import { _ as t } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-Bs4WdJhA.js";
|
|
262
2
|
export {
|
|
263
|
-
|
|
264
|
-
|
|
3
|
+
t as RichTextEditor,
|
|
4
|
+
t as default
|
|
265
5
|
};
|
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-FEeRXoIx.js";
|
|
98
2
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
3
|
+
s as Toast,
|
|
4
|
+
s as default
|
|
101
5
|
};
|
package/dist/toast.d.ts
ADDED
package/dist/tooltip/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robuust-digital/vue-components",
|
|
3
|
-
"version": "2.0.0",
|
|
3
|
+
"version": "2.2.0-rc.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,26 +22,54 @@
|
|
|
22
22
|
"README.md",
|
|
23
23
|
"CHANGELOG.md"
|
|
24
24
|
],
|
|
25
|
-
"main": "./dist/
|
|
26
|
-
"module": "./dist/
|
|
25
|
+
"main": "./dist/index/index.js",
|
|
26
|
+
"module": "./dist/index/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
27
28
|
"exports": {
|
|
28
|
-
".":
|
|
29
|
-
|
|
29
|
+
".": {
|
|
30
|
+
"import": "./dist/index/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./core": {
|
|
34
|
+
"import": "./dist/core/index.js",
|
|
35
|
+
"types": "./dist/core.d.ts"
|
|
36
|
+
},
|
|
30
37
|
"./core/css": "./dist/core/styles.css",
|
|
31
38
|
"./core/theme": "./dist/core/theme.css",
|
|
32
|
-
"./combobox":
|
|
39
|
+
"./combobox": {
|
|
40
|
+
"import": "./dist/combobox/index.js",
|
|
41
|
+
"types": "./dist/combobox.d.ts"
|
|
42
|
+
},
|
|
33
43
|
"./combobox/css": "./dist/combobox/styles.css",
|
|
34
|
-
"./dialogs":
|
|
44
|
+
"./dialogs": {
|
|
45
|
+
"import": "./dist/dialogs/index.js",
|
|
46
|
+
"types": "./dist/dialogs.d.ts"
|
|
47
|
+
},
|
|
35
48
|
"./dialogs/css": "./dist/dialogs/styles.css",
|
|
36
|
-
"./dropdown":
|
|
49
|
+
"./dropdown": {
|
|
50
|
+
"import": "./dist/dropdown/index.js",
|
|
51
|
+
"types": "./dist/dropdown.d.ts"
|
|
52
|
+
},
|
|
37
53
|
"./dropdown/css": "./dist/dropdown/styles.css",
|
|
38
|
-
"./lightswitch":
|
|
54
|
+
"./lightswitch": {
|
|
55
|
+
"import": "./dist/lightswitch/index.js",
|
|
56
|
+
"types": "./dist/lightswitch.d.ts"
|
|
57
|
+
},
|
|
39
58
|
"./lightswitch/css": "./dist/lightswitch/styles.css",
|
|
40
|
-
"./rich-text-editor":
|
|
59
|
+
"./rich-text-editor": {
|
|
60
|
+
"import": "./dist/rich-text-editor/index.js",
|
|
61
|
+
"types": "./dist/rich-text-editor.d.ts"
|
|
62
|
+
},
|
|
41
63
|
"./rich-text-editor/css": "./dist/rich-text-editor/styles.css",
|
|
42
|
-
"./toast":
|
|
64
|
+
"./toast": {
|
|
65
|
+
"import": "./dist/toast/index.js",
|
|
66
|
+
"types": "./dist/toast.d.ts"
|
|
67
|
+
},
|
|
43
68
|
"./toast/css": "./dist/toast/styles.css",
|
|
44
|
-
"./tooltip":
|
|
69
|
+
"./tooltip": {
|
|
70
|
+
"import": "./dist/tooltip/index.js",
|
|
71
|
+
"types": "./dist/tooltip.d.ts"
|
|
72
|
+
},
|
|
45
73
|
"./tooltip/css": "./dist/tooltip/styles.css"
|
|
46
74
|
},
|
|
47
75
|
"scripts": {
|
|
@@ -52,15 +80,15 @@
|
|
|
52
80
|
"docs:preview": "vitepress preview docs",
|
|
53
81
|
"test:unit": "vitest run",
|
|
54
82
|
"lint": "eslint .",
|
|
55
|
-
"lint:style": "stylelint 'src/**/*.{vue,css}'"
|
|
83
|
+
"lint:style": "stylelint 'src/**/*.{vue,css}'",
|
|
84
|
+
"type-check": "npx vue-tsc --noEmit"
|
|
56
85
|
},
|
|
57
86
|
"dependencies": {
|
|
58
|
-
"@floating-ui/vue": "^1.1.
|
|
87
|
+
"@floating-ui/vue": "^1.1.7",
|
|
59
88
|
"@headlessui/vue": "^1.7.23",
|
|
60
89
|
"@heroicons/vue": "^2.2.0",
|
|
61
|
-
"@tiptap/
|
|
62
|
-
"@tiptap/
|
|
63
|
-
"@tiptap/vue-3": "^2.11.5",
|
|
90
|
+
"@tiptap/starter-kit": "^3.0.1",
|
|
91
|
+
"@tiptap/vue-3": "^3.0.1",
|
|
64
92
|
"@vueuse/core": "^13.0.0",
|
|
65
93
|
"vue": "^3.5.13"
|
|
66
94
|
},
|
|
@@ -68,9 +96,12 @@
|
|
|
68
96
|
"@rushstack/eslint-patch": "^1.10.5",
|
|
69
97
|
"@tailwindcss/postcss": "^4.0.6",
|
|
70
98
|
"@tailwindcss/vite": "^4.0.6",
|
|
71
|
-
"@
|
|
99
|
+
"@types/node": "^24.2.0",
|
|
100
|
+
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
101
|
+
"@typescript-eslint/parser": "^8.39.0",
|
|
102
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
72
103
|
"@vitest/coverage-v8": "^3.0.5",
|
|
73
|
-
"@vue/eslint-config-airbnb": "^8.0.0",
|
|
104
|
+
"@vue/eslint-config-airbnb-with-typescript": "^8.0.0",
|
|
74
105
|
"@vue/test-utils": "^2.4.6",
|
|
75
106
|
"eslint": "^8.57.1",
|
|
76
107
|
"eslint-plugin-vue": "^9.32.0",
|
|
@@ -80,13 +111,13 @@
|
|
|
80
111
|
"postcss-scss": "^4.0.9",
|
|
81
112
|
"stylelint": "^16.14.1",
|
|
82
113
|
"stylelint-config-property-sort-order-smacss": "^10.0.0",
|
|
83
|
-
"stylelint-config-standard": "^
|
|
114
|
+
"stylelint-config-standard": "^39.0.0",
|
|
84
115
|
"tailwindcss": "^4.0.6",
|
|
116
|
+
"typescript": "^5.9.2",
|
|
85
117
|
"vite": "^6.1.0",
|
|
86
|
-
"vite-plugin-
|
|
118
|
+
"vite-plugin-dts": "^4.5.4",
|
|
87
119
|
"vite-plugin-static-copy": "^3.0.0",
|
|
88
|
-
"vite-plugin-
|
|
89
|
-
"vite-plugin-vue-devtools": "^7.7.2",
|
|
120
|
+
"vite-plugin-vue-devtools": "^8.0.0",
|
|
90
121
|
"vite-svg-loader": "^5.1.0",
|
|
91
122
|
"vitepress": "^2.0.0-alpha.2",
|
|
92
123
|
"vitest": "^3.0.5"
|
|
@@ -94,5 +125,5 @@
|
|
|
94
125
|
"resolutions": {
|
|
95
126
|
"@vueuse/core": "^13.0.0"
|
|
96
127
|
},
|
|
97
|
-
"packageManager": "yarn@4.9.
|
|
128
|
+
"packageManager": "yarn@4.9.2"
|
|
98
129
|
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { watchEffect as u, createBlock as i, openBlock as t, resolveDynamicComponent as c, mergeProps as b, withCtx as d, createElementBlock as y, renderSlot as l, createCommentVNode as a, createTextVNode as r, toDisplayString as s, unref as f } from "vue";
|
|
2
|
-
import { S as g } from "./icon-spinner-CmxIOqaK.js";
|
|
3
|
-
const m = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "rvc-button-label"
|
|
6
|
-
}, O = {
|
|
7
|
-
__name: "ButtonBase",
|
|
8
|
-
props: {
|
|
9
|
-
as: {
|
|
10
|
-
type: [String, Object, Function],
|
|
11
|
-
default: "button"
|
|
12
|
-
},
|
|
13
|
-
bindAs: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: void 0
|
|
16
|
-
},
|
|
17
|
-
label: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
icon: {
|
|
22
|
-
type: [Object, Function],
|
|
23
|
-
default: null
|
|
24
|
-
},
|
|
25
|
-
iconOnly: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !1
|
|
28
|
-
},
|
|
29
|
-
iconLeft: {
|
|
30
|
-
type: Boolean
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "base",
|
|
35
|
-
validator: (n) => ["sm", "base"].includes(n)
|
|
36
|
-
},
|
|
37
|
-
spinning: {
|
|
38
|
-
type: Boolean
|
|
39
|
-
},
|
|
40
|
-
color: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "primary",
|
|
43
|
-
validator: (n) => typeof n != "string" ? !1 : /^(primary|secondary|tertiary|light|dark|green|red|yellow|blue|green-soft|red-soft|yellow-soft|blue-soft)?$/.test(n) || n.startsWith("custom-") || n === "clear"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
setup(n) {
|
|
47
|
-
const o = n;
|
|
48
|
-
return u(() => {
|
|
49
|
-
o.iconOnly && !o.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
50
|
-
}), (e, v) => (t(), i(c(n.as), b(n.bindAs ? { as: n.bindAs } : {}, {
|
|
51
|
-
class: ["rvc-button", `rvc-button-${n.color}`, `rvc-button-${n.size}`, { "rvc-button-reverse": n.iconLeft }, { "rvc-button-icon-only": n.iconOnly }],
|
|
52
|
-
"aria-label": n.iconOnly ? n.label : null,
|
|
53
|
-
"aria-busy": n.spinning
|
|
54
|
-
}), {
|
|
55
|
-
default: d(() => [
|
|
56
|
-
n.iconOnly && n.label ? (t(), y("span", m, [
|
|
57
|
-
l(e.$slots, "default", { label: n.label }, () => [
|
|
58
|
-
r(s(n.label), 1)
|
|
59
|
-
])
|
|
60
|
-
])) : n.label ? l(e.$slots, "default", {
|
|
61
|
-
key: 1,
|
|
62
|
-
label: n.label
|
|
63
|
-
}, () => [
|
|
64
|
-
r(s(n.label), 1)
|
|
65
|
-
]) : a("", !0),
|
|
66
|
-
l(e.$slots, "icon", { icon: n.icon }, () => [
|
|
67
|
-
n.icon && !n.spinning ? (t(), i(c(n.icon), {
|
|
68
|
-
key: 0,
|
|
69
|
-
class: "rvc-button-icon",
|
|
70
|
-
"aria-hidden": !n.iconOnly
|
|
71
|
-
}, null, 8, ["aria-hidden"])) : a("", !0)
|
|
72
|
-
]),
|
|
73
|
-
l(e.$slots, "spinner", { spinning: n.spinning }, () => [
|
|
74
|
-
n.spinning ? (t(), i(f(g), {
|
|
75
|
-
key: 0,
|
|
76
|
-
class: "rvc-button-icon rvc-button-icon-loading",
|
|
77
|
-
"aria-hidden": "true"
|
|
78
|
-
})) : a("", !0)
|
|
79
|
-
])
|
|
80
|
-
]),
|
|
81
|
-
_: 3
|
|
82
|
-
}, 16, ["class", "aria-label", "aria-busy"]));
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
O as _
|
|
87
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { createBlock as l, openBlock as a, resolveDynamicComponent as r, normalizeClass as n, withCtx as o, renderSlot as s, createTextVNode as i, toDisplayString as c, createElementBlock as d, createElementVNode as u } from "vue";
|
|
2
|
-
const m = {
|
|
3
|
-
__name: "Badge",
|
|
4
|
-
props: {
|
|
5
|
-
as: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: "span"
|
|
8
|
-
},
|
|
9
|
-
label: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: ""
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: "base",
|
|
16
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
17
|
-
},
|
|
18
|
-
color: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "default",
|
|
21
|
-
validator: (e) => typeof e != "string" ? !1 : /^(default|gray|red|yellow|green|blue|violet|purple|pink)?$/.test(e) || e.startsWith("custom-")
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
setup(e) {
|
|
25
|
-
return (t, f) => (a(), l(r(e.as), {
|
|
26
|
-
class: n(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
27
|
-
}, {
|
|
28
|
-
default: o(() => [
|
|
29
|
-
s(t.$slots, "default", { label: e.label }, () => [
|
|
30
|
-
i(c(e.label), 1)
|
|
31
|
-
])
|
|
32
|
-
]),
|
|
33
|
-
_: 3
|
|
34
|
-
}, 8, ["class"]));
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
function p(e, t) {
|
|
38
|
-
return a(), d("svg", {
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
viewBox: "0 0 20 20",
|
|
41
|
-
fill: "currentColor",
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
"data-slot": "icon"
|
|
44
|
-
}, [
|
|
45
|
-
u("path", {
|
|
46
|
-
"fill-rule": "evenodd",
|
|
47
|
-
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
48
|
-
"clip-rule": "evenodd"
|
|
49
|
-
})
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
m as _,
|
|
54
|
-
p as r
|
|
55
|
-
};
|