@robuust-digital/vue-components 2.6.8 → 2.7.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 2.7.1 (21-05-2026)
2
+
3
+ ### Added
4
+
5
+ * `Accordion`: Added per-item initial open state support with `open`, while keeping `defaultOpenIndex` as the fallback
6
+
7
+ ### Updated
8
+
9
+ * `Build`: Upgrade TypeScript to 6.0.3 while preserving top-level declaration output
10
+
11
+ ## 2.7.0 (19-05-2026)
12
+
13
+ ### Added
14
+
15
+ * `FileUpload`: Added a pure Vue file upload component with area and button variants, single and multiple file selection, drag/drop support, previews, existing file rendering, remove events, optional image thumbnails, slots, and CSS tokens
16
+
1
17
  ## 2.6.8 (18-05-2026)
2
18
 
3
19
  ### Added
@@ -1,4 +1,4 @@
1
- import { openBlock as s, createElementBlock as r, createElementVNode as o, defineComponent as $, ref as h, useAttrs as B, computed as x, watch as y, Fragment as C, createVNode as v, withCtx as A, renderSlot as _, normalizeClass as M, unref as f, renderList as E, createBlock as S, resolveDynamicComponent as O, createCommentVNode as U } from "vue";
1
+ import { openBlock as s, createElementBlock as r, createElementVNode as o, defineComponent as $, ref as p, useAttrs as B, computed as w, watch as y, Fragment as x, createVNode as v, withCtx as C, renderSlot as A, normalizeClass as _, unref as f, renderList as E, createBlock as S, resolveDynamicComponent as O, createCommentVNode as U } from "vue";
2
2
  import { useEditor as N, EditorContent as T } from "@tiptap/vue-3";
3
3
  import j from "@tiptap/starter-kit";
4
4
  import { _ as z } from "./Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js";
@@ -90,35 +90,35 @@ const G = { class: "rvc-rich-text-toolbar" }, J = ["disabled", "aria-label", "on
90
90
  },
91
91
  emits: ["update:modelValue", "tiptap:onCreate"],
92
92
  setup(n, { emit: c }) {
93
- const a = n, b = c, g = h(!1), u = h(!1), d = h(""), m = B(), k = m.class ? `${m.class} ` : "", V = Object.fromEntries(
93
+ const a = n, h = c, b = p(!1), u = p(!1), d = p(""), m = B(), M = m.class ? `${m.class} ` : "", k = Object.fromEntries(
94
94
  Object.entries(m).filter(
95
95
  (l) => l[0] !== "class" && typeof l[1] == "string"
96
96
  )
97
- ), Z = j.configure({
97
+ ), V = j.configure({
98
98
  link: {
99
99
  openOnClick: !1
100
100
  }
101
101
  }), e = N({
102
- extensions: [Z, ...a.customExtensions],
102
+ extensions: [V, ...a.customExtensions],
103
103
  content: a.modelValue,
104
104
  editorProps: {
105
105
  attributes: {
106
- ...V,
106
+ ...k,
107
107
  id: a.id,
108
- class: `${k}rvc-textarea rvc-rich-text-textarea`
108
+ class: `${M}rvc-textarea rvc-rich-text-textarea`
109
109
  }
110
110
  },
111
111
  onCreate: ({ editor: l }) => {
112
- b("tiptap:onCreate", l);
112
+ h("tiptap:onCreate", l);
113
113
  },
114
114
  onUpdate: ({ editor: l }) => {
115
115
  const i = l.isEmpty ? "" : l.getHTML();
116
- b("update:modelValue", i);
116
+ h("update:modelValue", i);
117
117
  },
118
118
  onSelectionUpdate({ editor: l }) {
119
- g.value = !l.view.state.selection.empty;
119
+ b.value = !l.view.state.selection.empty;
120
120
  }
121
- }), H = x(() => [
121
+ }), Z = w(() => [
122
122
  {
123
123
  name: "bold",
124
124
  icon: q,
@@ -156,19 +156,19 @@ const G = { class: "rvc-rich-text-toolbar" }, J = ["disabled", "aria-label", "on
156
156
  icon: K,
157
157
  title: "Hyperlink",
158
158
  isVisible: a.config === "default",
159
- disabled: !g.value && !(e.value?.isActive("link") ?? !1),
159
+ disabled: !b.value && !(e.value?.isActive("link") ?? !1),
160
160
  isActive: () => e.value?.isActive("link") ?? !1,
161
161
  action: () => {
162
162
  d.value = e.value?.getAttributes("link").href || "", u.value = !0;
163
163
  }
164
164
  }
165
- ]), w = x(() => {
166
- const l = H.value.filter((t) => a.config === "default" || ["bold", "italic"].includes(t.name)), i = a.customCommands.map((t) => {
167
- let p = !1;
168
- return typeof t.disabled == "function" ? p = e.value ? t.disabled(e.value) : !1 : p = t.disabled ?? !1, {
165
+ ]), g = w(() => {
166
+ const l = Z.value.filter((t) => a.config === "default" || ["bold", "italic"].includes(t.name)), i = a.customCommands.map((t) => {
167
+ const L = typeof t.disabled == "function" ? e.value ? t.disabled(e.value) : !1 : t.disabled ?? !1;
168
+ return {
169
169
  ...t,
170
170
  isVisible: t.isVisible ?? !0,
171
- disabled: p,
171
+ disabled: L,
172
172
  isActive: () => t.isActive && e.value ? t.isActive(e.value) : !1,
173
173
  action: () => e.value && t.action(e.value)
174
174
  };
@@ -179,19 +179,19 @@ const G = { class: "rvc-rich-text-toolbar" }, J = ["disabled", "aria-label", "on
179
179
  if (!e.value) return;
180
180
  e.value.getHTML() === l || e.value.commands.setContent(l, { emitUpdate: !1 });
181
181
  });
182
- const L = () => {
182
+ const H = () => {
183
183
  e.value && (e.value.commands.setLink({ href: d.value }), u.value = !1, d.value = "");
184
184
  };
185
- return (l, i) => (s(), r(C, null, [
185
+ return (l, i) => (s(), r(x, null, [
186
186
  v(I, {
187
187
  id: `${a.id}-modal-add-hyperlink`,
188
188
  title: "Add Hyperlink",
189
189
  as: "form",
190
190
  show: u.value,
191
191
  "onModal:close": i[1] || (i[1] = (t) => u.value = !1),
192
- "onModal:save": L
192
+ "onModal:save": H
193
193
  }, {
194
- default: A(() => [
194
+ default: C(() => [
195
195
  v(D, {
196
196
  modelValue: d.value,
197
197
  "onUpdate:modelValue": i[0] || (i[0] = (t) => d.value = t),
@@ -202,17 +202,17 @@ const G = { class: "rvc-rich-text-toolbar" }, J = ["disabled", "aria-label", "on
202
202
  ]),
203
203
  _: 1
204
204
  }, 8, ["id", "show"]),
205
- _(l.$slots, "default"),
205
+ A(l.$slots, "default"),
206
206
  o("div", {
207
- class: M(["rvc-rich-text", n.rootClass, { "rvc-rich-text-disabled": n.disabled }])
207
+ class: _(["rvc-rich-text", n.rootClass, { "rvc-rich-text-disabled": n.disabled }])
208
208
  }, [
209
- f(e) ? _(l.$slots, "toolbar", {
209
+ f(e) ? A(l.$slots, "toolbar", {
210
210
  key: 0,
211
- commands: w.value,
211
+ commands: g.value,
212
212
  tiptap: f(e)
213
213
  }, () => [
214
214
  o("ul", G, [
215
- (s(!0), r(C, null, E(w.value.filter((t) => t.isVisible), (t) => (s(), r("li", {
215
+ (s(!0), r(x, null, E(g.value.filter((t) => t.isVisible), (t) => (s(), r("li", {
216
216
  key: `toolbar-item-command-${t.name}`
217
217
  }, [
218
218
  v(z, {
@@ -221,12 +221,12 @@ const G = { class: "rvc-rich-text-toolbar" }, J = ["disabled", "aria-label", "on
221
221
  size: "sm",
222
222
  class: "rvc-rich-text-tooltip"
223
223
  }, {
224
- default: A(() => [
224
+ default: C(() => [
225
225
  o("button", {
226
226
  disabled: t.disabled,
227
227
  type: "button",
228
228
  "aria-label": t.title,
229
- class: M([{ "rvc-rich-text-button-active": t.isActive() }, "rvc-rich-text-button"]),
229
+ class: _([{ "rvc-rich-text-button-active": t.isActive() }, "rvc-rich-text-button"]),
230
230
  onClick: t.action
231
231
  }, [
232
232
  (s(), S(O(t.icon)))