@robuust-digital/vue-components 2.2.1 → 2.3.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/_shared/{ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js → ButtonBase.vue_vue_type_script_setup_true_lang-BLm8QzEC.js} +23 -23
  3. package/dist/_shared/{ChevronDownIcon-DaaXfD3C.js → ChevronDownIcon-CcE_K1lg.js} +12 -12
  4. package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CxRv55TC.js +256 -0
  5. package/dist/_shared/{Drawer.vue_vue_type_script_setup_true_lang-CD5914Fk.js → Drawer.vue_vue_type_script_setup_true_lang-XMND_Yzl.js} +62 -62
  6. package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-BtkiBqxy.js +115 -0
  7. package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-C_1WSzbH.js +74 -0
  8. package/dist/_shared/{Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js → Modal.vue_vue_type_script_setup_true_lang-2AljJgxw.js} +68 -71
  9. package/dist/_shared/{RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js → RichTextEditor.vue_vue_type_script_setup_true_lang-BLs_S_-D.js} +102 -133
  10. package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-DMUJ5Emt.js +670 -0
  11. package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-BfMkJm5T.js +78 -0
  12. package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CKp1wzE2.js +95 -0
  13. package/dist/combobox/index.js +1 -1
  14. package/dist/core/checkbox.css +10 -5
  15. package/dist/core/index.js +4 -4
  16. package/dist/core/radio.css +11 -6
  17. package/dist/core.d.ts +2 -2
  18. package/dist/dialogs/index.js +2 -2
  19. package/dist/dropdown/index.js +1 -1
  20. package/dist/index/index.js +11 -11
  21. package/dist/index.d.ts +2 -2
  22. package/dist/rich-text-editor/index.js +1 -1
  23. package/dist/toast/index.js +1 -1
  24. package/dist/tooltip/index.js +1 -1
  25. package/package.json +19 -19
  26. package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CP3x2DUA.js +0 -266
  27. package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-CmYj-7WQ.js +0 -115
  28. package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js +0 -75
  29. package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-DnzOq9GZ.js +0 -679
  30. package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js +0 -78
  31. package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +0 -96
@@ -1,11 +1,11 @@
1
- import { createElementBlock as n, openBlock as o, createElementVNode as s, defineComponent as L, ref as h, useAttrs as $, computed as x, watch as B, Fragment as C, createVNode as v, renderSlot as A, withCtx as _, normalizeClass as M, createCommentVNode as y, unref as f, renderList as E, createBlock as S, resolveDynamicComponent as U } from "vue";
1
+ import { createElementBlock as r, openBlock as o, createElementVNode as s, defineComponent as L, ref as p, useAttrs as $, computed as x, watch as B, Fragment as C, createVNode as v, renderSlot as A, withCtx as _, normalizeClass as M, createCommentVNode as y, unref as f, renderList as E, createBlock as S, resolveDynamicComponent as U } from "vue";
2
2
  import { useEditor as N, EditorContent as O } from "@tiptap/vue-3";
3
3
  import T from "@tiptap/starter-kit";
4
- import { _ as z } from "./Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js";
5
- import { _ as D } from "./FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js";
6
- import { _ as I } from "./Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js";
7
- function q(r, d) {
8
- return o(), n("svg", {
4
+ import { _ as z } from "./Tooltip.vue_vue_type_script_setup_true_lang-CKp1wzE2.js";
5
+ import { _ as D } from "./FormInput.vue_vue_type_script_setup_true_lang-C_1WSzbH.js";
6
+ import { _ as I } from "./Modal.vue_vue_type_script_setup_true_lang-2AljJgxw.js";
7
+ function q(n, c) {
8
+ return o(), r("svg", {
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  viewBox: "0 0 16 16",
11
11
  fill: "currentColor",
@@ -19,8 +19,8 @@ function q(r, d) {
19
19
  })
20
20
  ]);
21
21
  }
22
- function F(r, d) {
23
- return o(), n("svg", {
22
+ function F(n, c) {
23
+ return o(), r("svg", {
24
24
  xmlns: "http://www.w3.org/2000/svg",
25
25
  viewBox: "0 0 16 16",
26
26
  fill: "currentColor",
@@ -34,8 +34,8 @@ function F(r, d) {
34
34
  })
35
35
  ]);
36
36
  }
37
- function K(r, d) {
38
- return o(), n("svg", {
37
+ function K(n, c) {
38
+ return o(), r("svg", {
39
39
  xmlns: "http://www.w3.org/2000/svg",
40
40
  viewBox: "0 0 16 16",
41
41
  fill: "currentColor",
@@ -54,8 +54,8 @@ function K(r, d) {
54
54
  })
55
55
  ]);
56
56
  }
57
- function P(r, d) {
58
- return o(), n("svg", {
57
+ function P(n, c) {
58
+ return o(), r("svg", {
59
59
  xmlns: "http://www.w3.org/2000/svg",
60
60
  viewBox: "0 0 16 16",
61
61
  fill: "currentColor",
@@ -65,8 +65,8 @@ function P(r, d) {
65
65
  s("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
66
  ]);
67
67
  }
68
- function R(r, d) {
69
- return o(), n("svg", {
68
+ function R(n, c) {
69
+ return o(), r("svg", {
70
70
  xmlns: "http://www.w3.org/2000/svg",
71
71
  viewBox: "0 0 16 16",
72
72
  fill: "currentColor",
@@ -89,139 +89,108 @@ const j = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
89
89
  disabled: { type: Boolean, default: !1 }
90
90
  },
91
91
  emits: ["update:modelValue", "tiptap:onCreate"],
92
- setup(r, { emit: d }) {
93
- const i = r, b = d, w = h(!1), u = h(!1), c = h(""), m = $(), k = m.class ? `${m.class} ` : "", V = T.configure({
92
+ setup(n, { emit: c }) {
93
+ const a = n, b = c, w = p(!1), u = p(!1), d = p(""), m = $(), k = m.class ? `${m.class} ` : "", V = T.configure({
94
94
  link: {
95
95
  openOnClick: !1
96
96
  }
97
- }), t = N({
98
- extensions: [V, ...i.customExtensions],
99
- content: i.modelValue,
97
+ }), e = N({
98
+ extensions: [V, ...a.customExtensions],
99
+ content: a.modelValue,
100
100
  editorProps: {
101
101
  attributes: {
102
102
  ...m,
103
- id: i.id,
103
+ id: a.id,
104
104
  class: `${k}rvc-textarea rvc-rich-text-textarea`
105
105
  }
106
106
  },
107
- onCreate: ({ editor: a }) => {
108
- b("tiptap:onCreate", a);
107
+ onCreate: ({ editor: l }) => {
108
+ b("tiptap:onCreate", l);
109
109
  },
110
- onUpdate: ({ editor: a }) => {
111
- const e = a.isEmpty ? "" : a.getHTML();
112
- b("update:modelValue", e);
110
+ onUpdate: ({ editor: l }) => {
111
+ const i = l.isEmpty ? "" : l.getHTML();
112
+ b("update:modelValue", i);
113
113
  },
114
- onSelectionUpdate({ editor: a }) {
115
- w.value = !a.view.state.selection.empty;
114
+ onSelectionUpdate({ editor: l }) {
115
+ w.value = !l.view.state.selection.empty;
116
116
  }
117
- }), Z = x(() => {
118
- var a;
119
- return [
120
- {
121
- name: "bold",
122
- icon: q,
123
- title: "Bold",
124
- isVisible: !0,
125
- isActive: () => {
126
- var e;
127
- return ((e = t.value) == null ? void 0 : e.isActive("bold")) ?? !1;
128
- },
129
- action: () => {
130
- var e;
131
- return (e = t.value) == null ? void 0 : e.commands.toggleBold();
132
- }
133
- },
134
- {
135
- name: "italic",
136
- icon: F,
137
- title: "Italic",
138
- isVisible: !0,
139
- isActive: () => {
140
- var e;
141
- return ((e = t.value) == null ? void 0 : e.isActive("italic")) ?? !1;
142
- },
143
- action: () => {
144
- var e;
145
- return (e = t.value) == null ? void 0 : e.commands.toggleItalic();
146
- }
147
- },
148
- {
149
- name: "bulletList",
150
- icon: P,
151
- title: "Bullet List",
152
- isVisible: i.config === "default",
153
- isActive: () => {
154
- var e;
155
- return ((e = t.value) == null ? void 0 : e.isActive("bulletList")) ?? !1;
156
- },
157
- action: () => {
158
- var e;
159
- return (e = t.value) == null ? void 0 : e.commands.toggleBulletList();
160
- }
161
- },
162
- {
163
- name: "orderedList",
164
- icon: R,
165
- title: "Ordered List",
166
- isVisible: i.config === "default",
167
- isActive: () => {
168
- var e;
169
- return ((e = t.value) == null ? void 0 : e.isActive("orderedList")) ?? !1;
170
- },
171
- action: () => {
172
- var e;
173
- return (e = t.value) == null ? void 0 : e.commands.toggleOrderedList();
174
- }
175
- },
176
- {
177
- name: "link",
178
- icon: K,
179
- title: "Hyperlink",
180
- isVisible: i.config === "default",
181
- disabled: !w.value && !(((a = t.value) == null ? void 0 : a.isActive("link")) ?? !1),
182
- isActive: () => {
183
- var e;
184
- return ((e = t.value) == null ? void 0 : e.isActive("link")) ?? !1;
185
- },
186
- action: () => {
187
- var e;
188
- c.value = ((e = t.value) == null ? void 0 : e.getAttributes("link").href) || "", u.value = !0;
189
- }
117
+ }), Z = x(() => [
118
+ {
119
+ name: "bold",
120
+ icon: q,
121
+ title: "Bold",
122
+ isVisible: !0,
123
+ isActive: () => e.value?.isActive("bold") ?? !1,
124
+ action: () => e.value?.commands.toggleBold()
125
+ },
126
+ {
127
+ name: "italic",
128
+ icon: F,
129
+ title: "Italic",
130
+ isVisible: !0,
131
+ isActive: () => e.value?.isActive("italic") ?? !1,
132
+ action: () => e.value?.commands.toggleItalic()
133
+ },
134
+ {
135
+ name: "bulletList",
136
+ icon: P,
137
+ title: "Bullet List",
138
+ isVisible: a.config === "default",
139
+ isActive: () => e.value?.isActive("bulletList") ?? !1,
140
+ action: () => e.value?.commands.toggleBulletList()
141
+ },
142
+ {
143
+ name: "orderedList",
144
+ icon: R,
145
+ title: "Ordered List",
146
+ isVisible: a.config === "default",
147
+ isActive: () => e.value?.isActive("orderedList") ?? !1,
148
+ action: () => e.value?.commands.toggleOrderedList()
149
+ },
150
+ {
151
+ name: "link",
152
+ icon: K,
153
+ title: "Hyperlink",
154
+ isVisible: a.config === "default",
155
+ disabled: !w.value && !(e.value?.isActive("link") ?? !1),
156
+ isActive: () => e.value?.isActive("link") ?? !1,
157
+ action: () => {
158
+ d.value = e.value?.getAttributes("link").href || "", u.value = !0;
190
159
  }
191
- ];
192
- }), g = x(() => {
193
- const a = Z.value.filter((l) => i.config === "default" || ["bold", "italic"].includes(l.name)), e = i.customCommands.map((l) => {
194
- let p = !1;
195
- return typeof l.disabled == "function" ? p = t.value ? l.disabled(t.value) : !1 : p = l.disabled ?? !1, {
196
- ...l,
197
- isVisible: l.isVisible ?? !0,
198
- disabled: p,
199
- isActive: () => l.isActive && t.value ? l.isActive(t.value) : !1,
200
- action: () => t.value && l.action(t.value)
160
+ }
161
+ ]), g = x(() => {
162
+ const l = Z.value.filter((t) => a.config === "default" || ["bold", "italic"].includes(t.name)), i = a.customCommands.map((t) => {
163
+ let h = !1;
164
+ return typeof t.disabled == "function" ? h = e.value ? t.disabled(e.value) : !1 : h = t.disabled ?? !1, {
165
+ ...t,
166
+ isVisible: t.isVisible ?? !0,
167
+ disabled: h,
168
+ isActive: () => t.isActive && e.value ? t.isActive(e.value) : !1,
169
+ action: () => e.value && t.action(e.value)
201
170
  };
202
171
  });
203
- return [...a, ...e];
172
+ return [...l, ...i];
204
173
  });
205
- B(() => i.modelValue, (a) => {
206
- if (!t.value) return;
207
- t.value.getHTML() === a || t.value.commands.setContent(a, { emitUpdate: !1 });
174
+ B(() => a.modelValue, (l) => {
175
+ if (!e.value) return;
176
+ e.value.getHTML() === l || e.value.commands.setContent(l, { emitUpdate: !1 });
208
177
  });
209
178
  const H = () => {
210
- t.value && (t.value.commands.setLink({ href: c.value }), u.value = !1, c.value = "");
179
+ e.value && (e.value.commands.setLink({ href: d.value }), u.value = !1, d.value = "");
211
180
  };
212
- return (a, e) => (o(), n(C, null, [
181
+ return (l, i) => (o(), r(C, null, [
213
182
  v(I, {
214
- id: `${i.id}-modal-add-hyperlink`,
183
+ id: `${a.id}-modal-add-hyperlink`,
215
184
  title: "Add Hyperlink",
216
185
  as: "form",
217
186
  show: u.value,
218
- "onModal:close": e[1] || (e[1] = (l) => u.value = !1),
187
+ "onModal:close": i[1] || (i[1] = (t) => u.value = !1),
219
188
  "onModal:save": H
220
189
  }, {
221
190
  default: _(() => [
222
191
  v(D, {
223
- modelValue: c.value,
224
- "onUpdate:modelValue": e[0] || (e[0] = (l) => c.value = l),
192
+ modelValue: d.value,
193
+ "onUpdate:modelValue": i[0] || (i[0] = (t) => d.value = t),
225
194
  placeholder: "https://www.example.com",
226
195
  type: "url",
227
196
  required: ""
@@ -229,34 +198,34 @@ const j = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
229
198
  ]),
230
199
  _: 1
231
200
  }, 8, ["id", "show"]),
232
- A(a.$slots, "default"),
201
+ A(l.$slots, "default"),
233
202
  s("div", {
234
- class: M(["rvc-rich-text", a.rootClass, { "rvc-rich-text-disabled": a.disabled }])
203
+ class: M(["rvc-rich-text", n.rootClass, { "rvc-rich-text-disabled": n.disabled }])
235
204
  }, [
236
- f(t) ? A(a.$slots, "toolbar", {
205
+ f(e) ? A(l.$slots, "toolbar", {
237
206
  key: 0,
238
207
  commands: g.value,
239
- tiptap: f(t)
208
+ tiptap: f(e)
240
209
  }, () => [
241
210
  s("ul", j, [
242
- (o(!0), n(C, null, E(g.value.filter((l) => l.isVisible), (l) => (o(), n("li", {
243
- key: `toolbar-item-command-${l.name}`
211
+ (o(!0), r(C, null, E(g.value.filter((t) => t.isVisible), (t) => (o(), r("li", {
212
+ key: `toolbar-item-command-${t.name}`
244
213
  }, [
245
214
  v(z, {
246
- content: l.title,
215
+ content: t.title,
247
216
  placement: "bottom",
248
217
  size: "sm",
249
218
  class: "rvc-rich-text-tooltip"
250
219
  }, {
251
220
  default: _(() => [
252
221
  s("button", {
253
- disabled: l.disabled,
222
+ disabled: t.disabled,
254
223
  type: "button",
255
- "aria-label": l.title,
256
- class: M([{ "rvc-rich-text-button-active": l.isActive() }, "rvc-rich-text-button"]),
257
- onClick: l.action
224
+ "aria-label": t.title,
225
+ class: M([{ "rvc-rich-text-button-active": t.isActive() }, "rvc-rich-text-button"]),
226
+ onClick: t.action
258
227
  }, [
259
- (o(), S(U(l.icon)))
228
+ (o(), S(U(t.icon)))
260
229
  ], 10, G)
261
230
  ]),
262
231
  _: 2
@@ -264,7 +233,7 @@ const j = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
264
233
  ]))), 128))
265
234
  ])
266
235
  ]) : y("", !0),
267
- v(f(O), { editor: f(t) }, null, 8, ["editor"])
236
+ v(f(O), { editor: f(e) }, null, 8, ["editor"])
268
237
  ], 2)
269
238
  ], 64));
270
239
  }