sprintify-ui 0.11.7 → 0.11.9
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/dist/{BaseCkeditor-Dcqohrsz.js → BaseCkeditor-zHRU6hVQ.js} +19 -20
- package/dist/sprintify-ui.es.js +24 -19
- package/dist/style.css +2 -2
- package/dist/types/components/BaseHeader.vue.d.ts +12 -17
- package/package.json +1 -1
- package/src/assets/base-rich-text.css +6 -1
- package/src/assets/main.css +16 -0
- package/src/components/BaseCkeditor.vue +4 -5
- package/src/components/BaseHeader.stories.js +19 -0
- package/src/components/BaseHeader.vue +19 -3
- package/src/components/BaseRichText.stories.js +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ClassicEditor as B, BalloonEditor as k, InlineEditor as y, Essentials as z, SourceEditing as
|
|
3
|
-
import { Ckeditor as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as f, computed as i, openBlock as c, createBlock as I, unref as n } from "vue";
|
|
2
|
+
import { ClassicEditor as B, BalloonEditor as k, InlineEditor as y, Essentials as z, SourceEditing as C, Paragraph as v, Bold as E, Italic as T, Underline as V, Code as h, CodeBlock as w, List as F, Indent as L, IndentBlock as R, Link as S, Autoformat as A, Heading as x, Image as D, AutoImage as P, ImageStyle as U, ImageResize as G, ImageToolbar as O, ImageInsert as H, Base64UploadAdapter as K, Table as M, TableToolbar as N, MediaEmbed as W, PasteFromOffice as j, BlockToolbar as q, Font as J, FindAndReplace as Q, RemoveFormat as X } from "ckeditor5";
|
|
3
|
+
import { Ckeditor as Y } from "@ckeditor/ckeditor5-vue";
|
|
4
|
+
const ee = /* @__PURE__ */ f({
|
|
5
5
|
__name: "BaseCkeditor",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {},
|
|
@@ -12,11 +12,11 @@ const $ = /* @__PURE__ */ c({
|
|
|
12
12
|
"undo",
|
|
13
13
|
"redo",
|
|
14
14
|
"|",
|
|
15
|
-
"sourceEditing",
|
|
16
15
|
"heading",
|
|
17
16
|
"bold",
|
|
18
17
|
"italic",
|
|
19
18
|
"underline",
|
|
19
|
+
"fontBackgroundColor",
|
|
20
20
|
"|",
|
|
21
21
|
"link",
|
|
22
22
|
"insertImage",
|
|
@@ -24,9 +24,6 @@ const $ = /* @__PURE__ */ c({
|
|
|
24
24
|
"numberedList",
|
|
25
25
|
"bulletedList",
|
|
26
26
|
"|",
|
|
27
|
-
"code",
|
|
28
|
-
"codeblock",
|
|
29
|
-
"|",
|
|
30
27
|
"insertTable"
|
|
31
28
|
];
|
|
32
29
|
} },
|
|
@@ -37,10 +34,10 @@ const $ = /* @__PURE__ */ c({
|
|
|
37
34
|
setup(d, { expose: u, emit: m }) {
|
|
38
35
|
const o = d, a = m;
|
|
39
36
|
let t = null;
|
|
40
|
-
function s(
|
|
41
|
-
t =
|
|
37
|
+
function s(r) {
|
|
38
|
+
t = r, a("ready", r);
|
|
42
39
|
}
|
|
43
|
-
const g =
|
|
40
|
+
const g = i(() => {
|
|
44
41
|
switch (o.editor) {
|
|
45
42
|
case "inline":
|
|
46
43
|
return y;
|
|
@@ -49,13 +46,13 @@ const $ = /* @__PURE__ */ c({
|
|
|
49
46
|
default:
|
|
50
47
|
return B;
|
|
51
48
|
}
|
|
52
|
-
}),
|
|
49
|
+
}), p = i(() => o.modelValue === null ? "" : o.modelValue), b = i(() => ({
|
|
53
50
|
licenseKey: "GPL",
|
|
54
51
|
plugins: [
|
|
55
52
|
z,
|
|
56
|
-
E,
|
|
57
|
-
v,
|
|
58
53
|
C,
|
|
54
|
+
v,
|
|
55
|
+
E,
|
|
59
56
|
T,
|
|
60
57
|
V,
|
|
61
58
|
h,
|
|
@@ -78,7 +75,9 @@ const $ = /* @__PURE__ */ c({
|
|
|
78
75
|
W,
|
|
79
76
|
j,
|
|
80
77
|
q,
|
|
81
|
-
J
|
|
78
|
+
J,
|
|
79
|
+
Q,
|
|
80
|
+
X
|
|
82
81
|
],
|
|
83
82
|
toolbar: {
|
|
84
83
|
items: o.toolbar,
|
|
@@ -123,10 +122,10 @@ const $ = /* @__PURE__ */ c({
|
|
|
123
122
|
getEditorData() {
|
|
124
123
|
return (t == null ? void 0 : t.getData()) || "";
|
|
125
124
|
}
|
|
126
|
-
}), (
|
|
127
|
-
"model-value":
|
|
128
|
-
editor:
|
|
129
|
-
config:
|
|
125
|
+
}), (r, e) => (c(), I(n(Y), {
|
|
126
|
+
"model-value": n(p),
|
|
127
|
+
editor: n(g),
|
|
128
|
+
config: n(b),
|
|
130
129
|
disabled: d.disabled,
|
|
131
130
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => a("update:modelValue", l)),
|
|
132
131
|
onFocus: e[1] || (e[1] = (l) => a("focus", l)),
|
|
@@ -137,5 +136,5 @@ const $ = /* @__PURE__ */ c({
|
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
export {
|
|
140
|
-
|
|
139
|
+
ee as default
|
|
141
140
|
};
|
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -24207,11 +24207,14 @@ const wI = ["onClick"], xI = ["onClick"], kI = { class: "px-1 py-1 h-full flex i
|
|
|
24207
24207
|
setup(n) {
|
|
24208
24208
|
const t = n, e = P(null), r = P(800);
|
|
24209
24209
|
il(e, () => {
|
|
24210
|
-
var
|
|
24211
|
-
r.value = ((
|
|
24210
|
+
var s;
|
|
24211
|
+
r.value = ((s = e.value) == null ? void 0 : s.clientWidth) ?? 800;
|
|
24212
24212
|
});
|
|
24213
24213
|
const o = S(() => t.layout === "compact" ? !0 : r.value < 500);
|
|
24214
|
-
|
|
24214
|
+
async function i(s) {
|
|
24215
|
+
await s();
|
|
24216
|
+
}
|
|
24217
|
+
return (s, l) => (x(), $("div", {
|
|
24215
24218
|
ref_key: "baseHeaderRef",
|
|
24216
24219
|
ref: e
|
|
24217
24220
|
}, [
|
|
@@ -24227,9 +24230,9 @@ const wI = ["onClick"], xI = ["onClick"], kI = { class: "px-1 py-1 h-full flex i
|
|
|
24227
24230
|
n.badge ? (x(), $("div", ZI, [
|
|
24228
24231
|
ee(Vf, _t(n.badge, { class: "relative xs:-bottom-[2px]" }), {
|
|
24229
24232
|
default: J(() => {
|
|
24230
|
-
var
|
|
24233
|
+
var a;
|
|
24231
24234
|
return [
|
|
24232
|
-
Gt(se((
|
|
24235
|
+
Gt(se((a = n.badge) == null ? void 0 : a.label), 1)
|
|
24233
24236
|
];
|
|
24234
24237
|
}),
|
|
24235
24238
|
_: 1
|
|
@@ -24246,32 +24249,34 @@ const wI = ["onClick"], xI = ["onClick"], kI = { class: "px-1 py-1 h-full flex i
|
|
|
24246
24249
|
g(o) ? "mt-2 flex-col" : "mt-2 flex-row flex-wrap space-x-4"
|
|
24247
24250
|
]])
|
|
24248
24251
|
}, [
|
|
24249
|
-
(x(!0), $(Re, null, Ge(n.attributes, (
|
|
24250
|
-
key:
|
|
24252
|
+
(x(!0), $(Re, null, Ge(n.attributes, (a) => (x(), oe(Ji, {
|
|
24253
|
+
key: a.label + a.icon,
|
|
24251
24254
|
class: "flex items-center gap-1.5",
|
|
24252
|
-
visible: !!
|
|
24253
|
-
text:
|
|
24255
|
+
visible: !!a.tooltip,
|
|
24256
|
+
text: a.tooltip,
|
|
24254
24257
|
dark: "",
|
|
24255
24258
|
delay: 400
|
|
24256
24259
|
}, {
|
|
24257
24260
|
default: J(() => [
|
|
24258
|
-
(x(), oe(Wn(
|
|
24259
|
-
to:
|
|
24260
|
-
href:
|
|
24261
|
-
|
|
24262
|
-
|
|
24261
|
+
(x(), oe(Wn(a.to ? "router-link" : a.href ? "a" : a.action ? "button" : "div"), {
|
|
24262
|
+
to: a.to,
|
|
24263
|
+
href: a.href,
|
|
24264
|
+
type: a.action && !a.to && !a.href ? "button" : void 0,
|
|
24265
|
+
target: a.target ?? void 0,
|
|
24266
|
+
class: "flex items-center gap-1.5",
|
|
24267
|
+
onClick: (u) => a.action && !a.to && !a.href ? i(a.action) : void 0
|
|
24263
24268
|
}, {
|
|
24264
24269
|
default: J(() => [
|
|
24265
|
-
|
|
24270
|
+
a.icon ? (x(), oe(g(Je), {
|
|
24266
24271
|
key: 0,
|
|
24267
|
-
icon:
|
|
24272
|
+
icon: a.icon,
|
|
24268
24273
|
class: "h-4 w-4 shrink-0 text-slate-600",
|
|
24269
24274
|
"aria-hidden": "true"
|
|
24270
24275
|
}, null, 8, ["icon"])) : Z("", !0),
|
|
24271
|
-
I("span", eO, se(
|
|
24276
|
+
I("span", eO, se(a.label), 1)
|
|
24272
24277
|
]),
|
|
24273
24278
|
_: 2
|
|
24274
|
-
}, 1032, ["to", "href", "target"]))
|
|
24279
|
+
}, 1032, ["to", "href", "type", "target", "onClick"]))
|
|
24275
24280
|
]),
|
|
24276
24281
|
_: 2
|
|
24277
24282
|
}, 1032, ["visible", "text"]))), 128))
|
|
@@ -43419,7 +43424,7 @@ const XL = { class: "divide-x px-1 py-1 border-b flex" }, QL = ["disabled", "onC
|
|
|
43419
43424
|
},
|
|
43420
43425
|
emits: ["update:modelValue", "focus", "blur", "input"],
|
|
43421
43426
|
setup(n, { emit: t }) {
|
|
43422
|
-
const e = Z1(() => import("./BaseCkeditor-
|
|
43427
|
+
const e = Z1(() => import("./BaseCkeditor-zHRU6hVQ.js")), r = n, o = t, { nameInternal: i, requiredInternal: s, hasErrorInternal: l, emitUpdate: a, sizeInternal: u, addBeforeSubmitListener: c } = On({
|
|
43423
43428
|
name: S(() => r.name),
|
|
43424
43429
|
required: S(() => r.required),
|
|
43425
43430
|
size: S(() => r.size),
|