@robuust-digital/vue-components 2.0.0-rc.9 → 2.1.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 +29 -1
- package/dist/_shared/FormInput-B-SQTZTA.js +92 -0
- package/dist/_shared/Modal-Bw2sID1x.js +213 -0
- package/dist/core/button.css +1 -9
- package/dist/core/checkbox.css +6 -9
- package/dist/core/index.js +362 -318
- package/dist/core/input.css +8 -7
- package/dist/core/radio.css +6 -9
- package/dist/core/utilities.css +12 -0
- package/dist/dialogs/index.js +88 -77
- package/dist/dropdown/index.js +1 -4
- package/dist/lightswitch/index.js +5 -4
- package/dist/rich-text-editor/index.js +27 -29
- package/package.json +7 -10
- package/dist/_shared/FormInput-abFMz_J4.js +0 -82
- package/dist/_shared/Modal-DdpJnce6.js +0 -200
package/dist/core/input.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
&:has(
|
|
62
|
+
&:has(.rvc-input-suffix) input {
|
|
63
63
|
padding-right: calc(var(--rvc-input-padding-x) + var(--rvc-input-icon-size) + 0.25rem);
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
opacity: var(--rvc-input-disabled-opacity);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.rvc-input-prefix,
|
|
70
|
+
.rvc-input-prefix,
|
|
71
|
+
.rvc-input-suffix {
|
|
71
72
|
position: relative;
|
|
72
73
|
z-index: 1;
|
|
73
74
|
grid-column-start: 1;
|
|
@@ -82,14 +83,14 @@
|
|
|
82
83
|
justify-self: start;
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
.rvc-input-suffix {
|
|
87
|
+
margin-right: var(--rvc-input-padding-x);
|
|
88
|
+
justify-self: end;
|
|
89
|
+
}
|
|
90
|
+
|
|
85
91
|
svg {
|
|
86
92
|
width: var(--rvc-input-icon-size);
|
|
87
93
|
height: var(--rvc-input-icon-size);
|
|
88
|
-
justify-self: end;
|
|
89
|
-
|
|
90
|
-
&:last-child:not(:first-child) {
|
|
91
|
-
margin-right: var(--rvc-input-padding-x);
|
|
92
|
-
}
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
&.rvc-input-sm {
|
package/dist/core/radio.css
CHANGED
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
cursor: pointer;
|
|
25
25
|
gap: var(--rvc-radio-gap);
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
&:has(*:disabled) {
|
|
28
|
+
cursor: default;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.rvc-radio-label {
|
|
28
32
|
color: var(--rvc-radio-color);
|
|
29
33
|
font-size: var(--rvc-radio-font-size);
|
|
30
34
|
font-weight: var(--rvc-radio-font-weight);
|
|
@@ -54,14 +58,7 @@
|
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
input {
|
|
57
|
-
|
|
58
|
-
opacity: 0;
|
|
59
|
-
inset: 0;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
|
|
62
|
-
&:disabled {
|
|
63
|
-
cursor: default;
|
|
64
|
-
}
|
|
61
|
+
display: none;
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
input:checked + .rvc-radio-input {
|
package/dist/core/utilities.css
CHANGED
|
@@ -10,3 +10,15 @@
|
|
|
10
10
|
outline: var(--rvc-base-focus-outline-color) var(--rvc-base-focus-outline-style) var(--rvc-base-focus-outline-offset);
|
|
11
11
|
outline-offset: var(--rvc-base-focus-outline-width);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
@utility rvc-sr-only {
|
|
15
|
+
position: absolute;
|
|
16
|
+
width: 1px;
|
|
17
|
+
height: 1px;
|
|
18
|
+
margin: -1px;
|
|
19
|
+
padding: 0;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
clip-path: inset(0);
|
|
22
|
+
border-width: 0;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
package/dist/dialogs/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { createBlock as u, openBlock as
|
|
2
|
-
import { TransitionRoot as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { u as R } from "../_shared/Modal-
|
|
5
|
-
import { _ as
|
|
6
|
-
import { r as
|
|
1
|
+
import { createBlock as u, openBlock as c, unref as t, withCtx as d, createVNode as i, withModifiers as E, createElementVNode as a, normalizeClass as f, createElementBlock as b, renderSlot as s, createCommentVNode as y, createTextVNode as L, toDisplayString as T } from "vue";
|
|
2
|
+
import { TransitionRoot as F, Dialog as N, TransitionChild as p, DialogPanel as V, DialogTitle as g } from "@headlessui/vue";
|
|
3
|
+
import { _ as k } from "../_shared/ButtonBase-DfkwHIhN.js";
|
|
4
|
+
import { u as R } from "../_shared/Modal-Bw2sID1x.js";
|
|
5
|
+
import { _ as Y } from "../_shared/Modal-Bw2sID1x.js";
|
|
6
|
+
import { r as C } from "../_shared/XMarkIcon-90mcPzBs.js";
|
|
7
7
|
const q = {
|
|
8
8
|
class: "rvc-drawer-presentation",
|
|
9
9
|
role: "presentation"
|
|
10
|
-
}, A = { class: "rvc-drawer-container" },
|
|
10
|
+
}, A = { class: "rvc-drawer-container" }, H = { class: "rvc-drawer-inner" }, I = { class: "rvc-drawer-panel-inner" }, M = { class: "rvc-drawer-header-inner" }, z = { class: "rvc-drawer-close-wrapper" }, P = ["id"], j = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "rvc-drawer-footer"
|
|
13
|
+
}, U = {
|
|
11
14
|
__name: "Drawer",
|
|
12
15
|
props: {
|
|
13
16
|
as: {
|
|
@@ -45,33 +48,39 @@ const q = {
|
|
|
45
48
|
panelClass: {
|
|
46
49
|
type: String,
|
|
47
50
|
default: "rvc-drawer-panel-max-width"
|
|
51
|
+
},
|
|
52
|
+
resetHeader: {
|
|
53
|
+
type: Boolean
|
|
54
|
+
},
|
|
55
|
+
resetFooter: {
|
|
56
|
+
type: Boolean
|
|
48
57
|
}
|
|
49
58
|
},
|
|
50
59
|
emits: ["drawer:open", "drawer:opened", "drawer:close", "drawer:save", "drawer:closed"],
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
53
|
-
contentRef:
|
|
54
|
-
ready:
|
|
60
|
+
setup(e, { emit: $ }) {
|
|
61
|
+
const l = $, S = e, {
|
|
62
|
+
contentRef: B,
|
|
63
|
+
ready: v,
|
|
55
64
|
isForm: h,
|
|
56
|
-
titleId:
|
|
57
|
-
descriptionId:
|
|
65
|
+
titleId: w,
|
|
66
|
+
descriptionId: m,
|
|
58
67
|
initialFocusElement: D
|
|
59
|
-
} = R(
|
|
60
|
-
return (
|
|
61
|
-
default:
|
|
62
|
-
i(
|
|
63
|
-
as:
|
|
68
|
+
} = R(S);
|
|
69
|
+
return (o, r) => (c(), u(t(F), { as: "template" }, {
|
|
70
|
+
default: d(() => [
|
|
71
|
+
i(t(N), {
|
|
72
|
+
as: e.as,
|
|
64
73
|
class: "rvc-drawer",
|
|
65
74
|
static: "",
|
|
66
75
|
"aria-modal": "true",
|
|
67
76
|
role: "dialog",
|
|
68
|
-
"initial-focus":
|
|
69
|
-
"aria-labelledby":
|
|
70
|
-
onClose:
|
|
71
|
-
onSubmit:
|
|
77
|
+
"initial-focus": t(D),
|
|
78
|
+
"aria-labelledby": t(w),
|
|
79
|
+
onClose: r[6] || (r[6] = (n) => o.$emit("drawer:close")),
|
|
80
|
+
onSubmit: r[7] || (r[7] = E((n) => l("drawer:save", n), ["prevent"]))
|
|
72
81
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
i(
|
|
82
|
+
default: d(() => [
|
|
83
|
+
i(t(p), {
|
|
75
84
|
as: "template",
|
|
76
85
|
enter: "rvc-drawer-backdrop-transition-enter",
|
|
77
86
|
"enter-from": "rvc-drawer-backdrop-transition-enter-from",
|
|
@@ -79,21 +88,22 @@ const q = {
|
|
|
79
88
|
leave: "rvc-drawer-backdrop-transition-leave",
|
|
80
89
|
"leave-from": "rvc-drawer-backdrop-transition-leave-from",
|
|
81
90
|
"leave-to": "rvc-drawer-backdrop-transition-leave-to",
|
|
82
|
-
onBeforeEnter:
|
|
83
|
-
onAfterEnter:
|
|
91
|
+
onBeforeEnter: r[0] || (r[0] = (n) => l("drawer:open")),
|
|
92
|
+
onAfterEnter: r[1] || (r[1] = (n) => l("drawer:opened"))
|
|
84
93
|
}, {
|
|
85
|
-
default:
|
|
94
|
+
default: d(() => r[8] || (r[8] = [
|
|
86
95
|
a("div", {
|
|
87
96
|
class: "rvc-drawer-backdrop",
|
|
88
97
|
"aria-hidden": "true"
|
|
89
98
|
}, null, -1)
|
|
90
99
|
])),
|
|
91
|
-
_: 1
|
|
100
|
+
_: 1,
|
|
101
|
+
__: [8]
|
|
92
102
|
}),
|
|
93
103
|
a("div", q, [
|
|
94
104
|
a("div", A, [
|
|
95
|
-
a("div",
|
|
96
|
-
i(
|
|
105
|
+
a("div", H, [
|
|
106
|
+
i(t(p), {
|
|
97
107
|
as: "template",
|
|
98
108
|
enter: "rvc-drawer-transition-enter",
|
|
99
109
|
"enter-from": "rvc-drawer-transition-enter-from",
|
|
@@ -101,88 +111,89 @@ const q = {
|
|
|
101
111
|
leave: "rvc-drawer-transition-leave",
|
|
102
112
|
"leave-from": "rvc-drawer-transition-leave-from",
|
|
103
113
|
"leave-to": "rvc-drawer-transition-leave-to",
|
|
104
|
-
onBeforeEnter:
|
|
105
|
-
onAfterLeave:
|
|
114
|
+
onBeforeEnter: r[4] || (r[4] = (n) => v.value = !0),
|
|
115
|
+
onAfterLeave: r[5] || (r[5] = (n) => (v.value = !1, l("drawer:closed")))
|
|
106
116
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
i(
|
|
109
|
-
class:
|
|
110
|
-
"aria-busy":
|
|
111
|
-
"aria-describedby":
|
|
117
|
+
default: d(() => [
|
|
118
|
+
i(t(V), {
|
|
119
|
+
class: f(["rvc-drawer-panel", e.panelClass]),
|
|
120
|
+
"aria-busy": e.spinning,
|
|
121
|
+
"aria-describedby": t(m)
|
|
112
122
|
}, {
|
|
113
|
-
default:
|
|
123
|
+
default: d(() => [
|
|
114
124
|
a("div", I, [
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
e.resetHeader ? s(o.$slots, "header", { key: 1 }) : (c(), b("header", {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: f([{ "rvc-drawer-header-sticky": e.headerSticky }, "rvc-drawer-header"])
|
|
117
128
|
}, [
|
|
118
|
-
|
|
119
|
-
title:
|
|
120
|
-
showClose:
|
|
129
|
+
s(o.$slots, "header", {
|
|
130
|
+
title: e.title,
|
|
131
|
+
showClose: e.showClose
|
|
121
132
|
}, () => [
|
|
122
133
|
a("div", M, [
|
|
123
|
-
|
|
124
|
-
id:
|
|
125
|
-
dialogTitle:
|
|
126
|
-
title:
|
|
134
|
+
s(o.$slots, "title", {
|
|
135
|
+
id: t(w),
|
|
136
|
+
dialogTitle: t(g),
|
|
137
|
+
title: e.title
|
|
127
138
|
}, () => [
|
|
128
|
-
i(
|
|
129
|
-
id:
|
|
139
|
+
i(t(g), {
|
|
140
|
+
id: t(w),
|
|
130
141
|
class: "rvc-drawer-title"
|
|
131
142
|
}, {
|
|
132
|
-
default:
|
|
133
|
-
|
|
143
|
+
default: d(() => [
|
|
144
|
+
L(T(e.title), 1)
|
|
134
145
|
]),
|
|
135
146
|
_: 1
|
|
136
147
|
}, 8, ["id"])
|
|
137
148
|
]),
|
|
138
|
-
|
|
149
|
+
e.showClose ? s(o.$slots, "close", {
|
|
139
150
|
key: 0,
|
|
140
|
-
icon:
|
|
141
|
-
emitClose: () =>
|
|
151
|
+
icon: t(C),
|
|
152
|
+
emitClose: () => l("drawer:close")
|
|
142
153
|
}, () => [
|
|
143
|
-
a("div",
|
|
154
|
+
a("div", z, [
|
|
144
155
|
a("button", {
|
|
145
156
|
type: "button",
|
|
146
157
|
class: "rvc-drawer-close",
|
|
147
158
|
"aria-label": "Close panel",
|
|
148
|
-
onClick:
|
|
159
|
+
onClick: r[2] || (r[2] = (n) => l("drawer:close"))
|
|
149
160
|
}, [
|
|
150
|
-
i(
|
|
161
|
+
i(t(C), { "aria-hidden": "true" })
|
|
151
162
|
])
|
|
152
163
|
])
|
|
153
|
-
]) :
|
|
164
|
+
]) : y("", !0)
|
|
154
165
|
])
|
|
155
166
|
])
|
|
156
|
-
], 2),
|
|
167
|
+
], 2)),
|
|
157
168
|
a("div", {
|
|
158
|
-
class:
|
|
169
|
+
class: f([{ "rvc-drawer-scroll-reverse": e.scrolledDown }, "rvc-drawer-scroll"])
|
|
159
170
|
}, [
|
|
160
171
|
a("div", {
|
|
161
|
-
id:
|
|
172
|
+
id: t(m),
|
|
162
173
|
ref_key: "contentRef",
|
|
163
|
-
ref:
|
|
174
|
+
ref: B,
|
|
164
175
|
class: "rvc-drawer-content"
|
|
165
176
|
}, [
|
|
166
|
-
|
|
167
|
-
], 8,
|
|
177
|
+
s(o.$slots, "default", { ready: t(v) })
|
|
178
|
+
], 8, P)
|
|
168
179
|
], 2),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
i(
|
|
180
|
+
e.resetFooter ? s(o.$slots, "footer", { key: 3 }) : (c(), b("footer", j, [
|
|
181
|
+
s(o.$slots, "footer", { loading: e.spinning }, () => [
|
|
182
|
+
i(k, {
|
|
172
183
|
type: "button",
|
|
173
|
-
label:
|
|
184
|
+
label: e.cancelLabel,
|
|
174
185
|
color: "light",
|
|
175
|
-
onClick:
|
|
186
|
+
onClick: r[3] || (r[3] = (n) => l("drawer:close"))
|
|
176
187
|
}, null, 8, ["label"]),
|
|
177
|
-
|
|
188
|
+
t(h) ? (c(), u(k, {
|
|
178
189
|
key: 0,
|
|
179
190
|
type: "submit",
|
|
180
|
-
label:
|
|
181
|
-
spinning:
|
|
182
|
-
disabled:
|
|
183
|
-
}, null, 8, ["label", "spinning", "disabled"])) :
|
|
191
|
+
label: e.submitLabel,
|
|
192
|
+
spinning: e.spinning,
|
|
193
|
+
disabled: e.spinning
|
|
194
|
+
}, null, 8, ["label", "spinning", "disabled"])) : y("", !0)
|
|
184
195
|
])
|
|
185
|
-
])
|
|
196
|
+
]))
|
|
186
197
|
])
|
|
187
198
|
]),
|
|
188
199
|
_: 3
|
|
@@ -202,6 +213,6 @@ const q = {
|
|
|
202
213
|
}
|
|
203
214
|
};
|
|
204
215
|
export {
|
|
205
|
-
|
|
206
|
-
|
|
216
|
+
U as Drawer,
|
|
217
|
+
Y as Modal
|
|
207
218
|
};
|
package/dist/dropdown/index.js
CHANGED
|
@@ -98,10 +98,7 @@ const T = /* @__PURE__ */ Object.assign({
|
|
|
98
98
|
}, {
|
|
99
99
|
default: a(() => [
|
|
100
100
|
s(o.$slots, "item", { item: e }, () => [
|
|
101
|
-
(r(), l(m(e.as ? e.as : "button"), f({
|
|
102
|
-
class: "rvc-dropdown-item",
|
|
103
|
-
ref_for: !0
|
|
104
|
-
}, g(e), {
|
|
101
|
+
(r(), l(m(e.as ? e.as : "button"), f({ class: "rvc-dropdown-item" }, { ref_for: !0 }, g(e), {
|
|
105
102
|
as: e.bindAs ? e.bindAs : void 0,
|
|
106
103
|
onClick: (y) => (b("dropdown:click", e), e.event ? e.event() : null)
|
|
107
104
|
}), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as n, createBlock as o, openBlock as r, unref as a, withCtx as s, createVNode as p, createCommentVNode as h, mergeProps as f, createElementVNode as g, renderSlot as w } from "vue";
|
|
2
2
|
import { SwitchGroup as V, Switch as v, SwitchLabel as b } from "@headlessui/vue";
|
|
3
|
-
const
|
|
3
|
+
const k = /* @__PURE__ */ Object.assign({
|
|
4
4
|
inheritAttrs: !1
|
|
5
5
|
}, {
|
|
6
6
|
__name: "Lightswitch",
|
|
@@ -29,7 +29,8 @@ const B = /* @__PURE__ */ Object.assign({
|
|
|
29
29
|
default: s(() => t[1] || (t[1] = [
|
|
30
30
|
g("span", { class: "rvc-lightswitch-toggle" }, null, -1)
|
|
31
31
|
])),
|
|
32
|
-
_: 1
|
|
32
|
+
_: 1,
|
|
33
|
+
__: [1]
|
|
33
34
|
}, 16, ["modelValue", "class"]),
|
|
34
35
|
e.$slots.default ? (r(), o(a(b), { key: 0 }, {
|
|
35
36
|
default: s(() => [
|
|
@@ -43,6 +44,6 @@ const B = /* @__PURE__ */ Object.assign({
|
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
k as Lightswitch,
|
|
48
|
+
k as default
|
|
48
49
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createElementBlock as r, openBlock as s, createElementVNode as n, ref as p, useAttrs as H, computed as x, watch as L, Fragment as A, createVNode as v, renderSlot as C, withCtx as M, normalizeClass as _, createCommentVNode as $, unref as f, renderList as B, createBlock as E, resolveDynamicComponent as S } from "vue";
|
|
2
2
|
import { useEditor as O, EditorContent as T } from "@tiptap/vue-3";
|
|
3
|
-
import N from "@tiptap/
|
|
4
|
-
import U from "
|
|
5
|
-
import { _ as q } from "../_shared/
|
|
6
|
-
import { _ as z } from "../_shared/
|
|
7
|
-
|
|
8
|
-
function I(i, d) {
|
|
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) {
|
|
9
8
|
return s(), r("svg", {
|
|
10
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
10
|
viewBox: "0 0 16 16",
|
|
@@ -20,7 +19,7 @@ function I(i, d) {
|
|
|
20
19
|
})
|
|
21
20
|
]);
|
|
22
21
|
}
|
|
23
|
-
function
|
|
22
|
+
function I(i, d) {
|
|
24
23
|
return s(), r("svg", {
|
|
25
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
25
|
viewBox: "0 0 16 16",
|
|
@@ -35,7 +34,7 @@ function R(i, d) {
|
|
|
35
34
|
})
|
|
36
35
|
]);
|
|
37
36
|
}
|
|
38
|
-
function
|
|
37
|
+
function R(i, d) {
|
|
39
38
|
return s(), r("svg", {
|
|
40
39
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41
40
|
viewBox: "0 0 16 16",
|
|
@@ -55,7 +54,7 @@ function j(i, d) {
|
|
|
55
54
|
})
|
|
56
55
|
]);
|
|
57
56
|
}
|
|
58
|
-
function
|
|
57
|
+
function j(i, d) {
|
|
59
58
|
return s(), r("svg", {
|
|
60
59
|
xmlns: "http://www.w3.org/2000/svg",
|
|
61
60
|
viewBox: "0 0 16 16",
|
|
@@ -66,7 +65,7 @@ function F(i, d) {
|
|
|
66
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" })
|
|
67
66
|
]);
|
|
68
67
|
}
|
|
69
|
-
function
|
|
68
|
+
function F(i, d) {
|
|
70
69
|
return s(), r("svg", {
|
|
71
70
|
xmlns: "http://www.w3.org/2000/svg",
|
|
72
71
|
viewBox: "0 0 16 16",
|
|
@@ -77,7 +76,7 @@ function K(i, d) {
|
|
|
77
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" })
|
|
78
77
|
]);
|
|
79
78
|
}
|
|
80
|
-
const
|
|
79
|
+
const K = { class: "rvc-rich-text-toolbar" }, P = ["disabled", "aria-label", "onClick"], ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
81
80
|
__name: "RichTextEditor",
|
|
82
81
|
props: {
|
|
83
82
|
id: {
|
|
@@ -111,13 +110,12 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
111
110
|
},
|
|
112
111
|
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
113
112
|
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
|
-
|
|
116
|
-
N.configure({
|
|
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: {
|
|
117
115
|
openOnClick: !1
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
extensions: [
|
|
116
|
+
}
|
|
117
|
+
}), t = O({
|
|
118
|
+
extensions: [y, ...a.customExtensions],
|
|
121
119
|
content: a.modelValue,
|
|
122
120
|
editorProps: {
|
|
123
121
|
attributes: {
|
|
@@ -139,7 +137,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
139
137
|
}), V = x(() => [
|
|
140
138
|
{
|
|
141
139
|
name: "bold",
|
|
142
|
-
icon:
|
|
140
|
+
icon: D,
|
|
143
141
|
title: "Bold",
|
|
144
142
|
isVisible: !0,
|
|
145
143
|
isActive: () => t.value.isActive("bold"),
|
|
@@ -147,7 +145,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
147
145
|
},
|
|
148
146
|
{
|
|
149
147
|
name: "italic",
|
|
150
|
-
icon:
|
|
148
|
+
icon: I,
|
|
151
149
|
title: "Italic",
|
|
152
150
|
isVisible: !0,
|
|
153
151
|
isActive: () => t.value.isActive("italic"),
|
|
@@ -155,7 +153,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
155
153
|
},
|
|
156
154
|
{
|
|
157
155
|
name: "bulletList",
|
|
158
|
-
icon:
|
|
156
|
+
icon: j,
|
|
159
157
|
title: "Bullet List",
|
|
160
158
|
isVisible: a.config === "default",
|
|
161
159
|
isActive: () => t.value.isActive("bulletList"),
|
|
@@ -163,7 +161,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
163
161
|
},
|
|
164
162
|
{
|
|
165
163
|
name: "orderedList",
|
|
166
|
-
icon:
|
|
164
|
+
icon: F,
|
|
167
165
|
title: "Ordered List",
|
|
168
166
|
isVisible: a.config === "default",
|
|
169
167
|
isActive: () => t.value.isActive("orderedList"),
|
|
@@ -171,7 +169,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
171
169
|
},
|
|
172
170
|
{
|
|
173
171
|
name: "link",
|
|
174
|
-
icon:
|
|
172
|
+
icon: R,
|
|
175
173
|
title: "Hyperlink",
|
|
176
174
|
isVisible: a.config === "default",
|
|
177
175
|
disabled: !b.value && !t.value.isActive("link"),
|
|
@@ -200,7 +198,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
200
198
|
t.value.commands.setLink({ href: c.value }), u.value = !1, c.value = null;
|
|
201
199
|
};
|
|
202
200
|
return (l, o) => (s(), r(A, null, [
|
|
203
|
-
v(
|
|
201
|
+
v(z, {
|
|
204
202
|
id: `${a.id}-modal-add-hyperlink`,
|
|
205
203
|
title: "Add Hyperlink",
|
|
206
204
|
as: "form",
|
|
@@ -209,7 +207,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
209
207
|
"onModal:save": Z
|
|
210
208
|
}, {
|
|
211
209
|
default: M(() => [
|
|
212
|
-
v(
|
|
210
|
+
v(q, {
|
|
213
211
|
modelValue: c.value,
|
|
214
212
|
"onUpdate:modelValue": o[0] || (o[0] = (e) => c.value = e),
|
|
215
213
|
placeholder: "https://www.example.com",
|
|
@@ -228,11 +226,11 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
228
226
|
commands: g.value,
|
|
229
227
|
tiptap: f(t)
|
|
230
228
|
}, () => [
|
|
231
|
-
n("ul",
|
|
229
|
+
n("ul", K, [
|
|
232
230
|
(s(!0), r(A, null, B(g.value.filter((e) => e.isVisible), (e) => (s(), r("li", {
|
|
233
231
|
key: `toolbar-item-command-${e.name}`
|
|
234
232
|
}, [
|
|
235
|
-
v(
|
|
233
|
+
v(U, {
|
|
236
234
|
content: e.title,
|
|
237
235
|
placement: "bottom",
|
|
238
236
|
size: "sm",
|
|
@@ -247,7 +245,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
247
245
|
onClick: e.action
|
|
248
246
|
}, [
|
|
249
247
|
(s(), E(S(e.icon)))
|
|
250
|
-
], 10,
|
|
248
|
+
], 10, P)
|
|
251
249
|
]),
|
|
252
250
|
_: 2
|
|
253
251
|
}, 1032, ["content"])
|
|
@@ -260,6 +258,6 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
260
258
|
}
|
|
261
259
|
});
|
|
262
260
|
export {
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
ee as RichTextEditor,
|
|
262
|
+
ee as default
|
|
265
263
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robuust-digital/vue-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -55,12 +55,11 @@
|
|
|
55
55
|
"lint:style": "stylelint 'src/**/*.{vue,css}'"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@floating-ui/vue": "^1.1.
|
|
58
|
+
"@floating-ui/vue": "^1.1.7",
|
|
59
59
|
"@headlessui/vue": "^1.7.23",
|
|
60
60
|
"@heroicons/vue": "^2.2.0",
|
|
61
|
-
"@tiptap/
|
|
62
|
-
"@tiptap/
|
|
63
|
-
"@tiptap/vue-3": "^2.11.5",
|
|
61
|
+
"@tiptap/starter-kit": "^3.0.1",
|
|
62
|
+
"@tiptap/vue-3": "^3.0.1",
|
|
64
63
|
"@vueuse/core": "^13.0.0",
|
|
65
64
|
"vue": "^3.5.13"
|
|
66
65
|
},
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
"@rushstack/eslint-patch": "^1.10.5",
|
|
69
68
|
"@tailwindcss/postcss": "^4.0.6",
|
|
70
69
|
"@tailwindcss/vite": "^4.0.6",
|
|
71
|
-
"@vitejs/plugin-vue": "^
|
|
70
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
72
71
|
"@vitest/coverage-v8": "^3.0.5",
|
|
73
72
|
"@vue/eslint-config-airbnb": "^8.0.0",
|
|
74
73
|
"@vue/test-utils": "^2.4.6",
|
|
@@ -80,13 +79,11 @@
|
|
|
80
79
|
"postcss-scss": "^4.0.9",
|
|
81
80
|
"stylelint": "^16.14.1",
|
|
82
81
|
"stylelint-config-property-sort-order-smacss": "^10.0.0",
|
|
83
|
-
"stylelint-config-standard": "^
|
|
82
|
+
"stylelint-config-standard": "^39.0.0",
|
|
84
83
|
"tailwindcss": "^4.0.6",
|
|
85
84
|
"vite": "^6.1.0",
|
|
86
|
-
"vite-plugin-eslint": "^1.8.1",
|
|
87
85
|
"vite-plugin-static-copy": "^3.0.0",
|
|
88
|
-
"vite-plugin-
|
|
89
|
-
"vite-plugin-vue-devtools": "^7.7.2",
|
|
86
|
+
"vite-plugin-vue-devtools": "^8.0.0",
|
|
90
87
|
"vite-svg-loader": "^5.1.0",
|
|
91
88
|
"vitepress": "^2.0.0-alpha.2",
|
|
92
89
|
"vitest": "^3.0.5"
|