vlite3 0.2.5 → 0.2.7

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.
@@ -1,15 +1,15 @@
1
- import { defineComponent as T, ref as v, watch as p, nextTick as _, computed as U, openBlock as a, createElementBlock as i, createElementVNode as c, renderSlot as m, createCommentVNode as u, Fragment as A, renderList as L, unref as P, createBlock as J, createVNode as x } from "vue";
2
- import { useDragAndDrop as O } from "@formkit/drag-and-drop/vue";
3
- import { animations as W } from "@formkit/drag-and-drop";
4
- import Y from "./Sheet.vue.js";
1
+ import { defineComponent as T, ref as g, watch as x, nextTick as U, computed as A, openBlock as d, createElementBlock as o, createElementVNode as c, renderSlot as m, createCommentVNode as u, Fragment as P, renderList as J, unref as O, createBlock as W, createVNode as p } from "vue";
2
+ import { useDragAndDrop as Y } from "@formkit/drag-and-drop/vue";
3
+ import { animations as z } from "@formkit/drag-and-drop";
4
+ import F from "./Sheet.vue.js";
5
5
  import b from "./WorkbookAddButton.vue.js";
6
- const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-end w-full border-b px-1 gap-2" }, M = {
6
+ const L = { class: "flex flex-col w-full font-sans" }, M = { class: "flex items-end w-full border-b px-1" }, j = {
7
7
  key: 0,
8
- class: "flex items-center mb-1 mr-2"
9
- }, j = {
8
+ class: "flex items-center"
9
+ }, q = {
10
10
  key: 0,
11
11
  class: "shrink-0 mb-1"
12
- }, q = { class: "flex items-center mb-0.5 z-20 sticky right-0 ml-auto box-decoration-clone" }, G = { key: 0 }, H = { key: 1 }, K = { class: "flex-1 relative bg-white w-full" }, te = /* @__PURE__ */ T({
12
+ }, G = { class: "flex items-center mb-0.5 z-20 sticky right-0 ml-auto box-decoration-clone" }, H = { key: 0 }, K = { key: 1 }, Q = { class: "flex-1 relative bg-white w-full" }, te = /* @__PURE__ */ T({
13
13
  __name: "Workbook",
14
14
  props: {
15
15
  modelValue: { default: "" },
@@ -21,20 +21,23 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
21
21
  maxSheets: { default: 50 },
22
22
  variant: { default: "chrome" },
23
23
  class: {},
24
+ itemClass: { default: "" },
25
+ activeItemClass: { default: "" },
26
+ inactiveItemClass: { default: "" },
24
27
  confirmDelete: { type: Boolean, default: !1 },
25
28
  confirmDeleteTexts: {},
26
29
  allowIconChange: { type: Boolean, default: !0 }
27
30
  },
28
31
  emits: ["update:modelValue", "update:sheets", "change", "add", "delete", "duplicate", "edit-start", "edit-end"],
29
- setup(d, { emit: k }) {
30
- const l = d, s = k, f = v(null), r = v(null), [w, h] = O(l.sheets, {
31
- plugins: [W()],
32
+ setup(i, { emit: k }) {
33
+ const l = i, a = k, f = g(null), r = g(null), [w, h] = Y(l.sheets, {
34
+ plugins: [z()],
32
35
  draggable: (e) => l.draggable && !r.value,
33
36
  onSort: (e) => {
34
- s("update:sheets", e.values);
37
+ a("update:sheets", e.values);
35
38
  }
36
39
  });
37
- p(
40
+ x(
38
41
  () => l.sheets,
39
42
  (e) => {
40
43
  JSON.stringify(e) !== JSON.stringify(h.value) && (h.value = [...e]);
@@ -42,44 +45,44 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
42
45
  { deep: !0 }
43
46
  );
44
47
  const y = (e) => {
45
- s("update:modelValue", e), s("change", e);
46
- }, g = () => {
47
- l.sheets.length >= l.maxSheets || s("add");
48
- }, S = (e, o) => {
49
- const t = l.sheets.findIndex((n) => n.id === e);
48
+ a("update:modelValue", e), a("change", e);
49
+ }, v = () => {
50
+ l.sheets.length >= l.maxSheets || a("add");
51
+ }, C = (e, n) => {
52
+ const t = l.sheets.findIndex((s) => s.id === e);
50
53
  if (t !== -1) {
51
- const n = [...l.sheets];
52
- n[t] = { ...n[t], title: o }, s("update:sheets", n);
54
+ const s = [...l.sheets];
55
+ s[t] = { ...s[t], title: n }, a("update:sheets", s);
53
56
  }
54
- }, D = (e, o) => {
55
- const t = l.sheets.findIndex((n) => n.id === e);
57
+ }, S = (e, n) => {
58
+ const t = l.sheets.findIndex((s) => s.id === e);
56
59
  if (t !== -1) {
57
- const n = [...l.sheets];
58
- n[t] = { ...n[t], icon: o }, s("update:sheets", n);
60
+ const s = [...l.sheets];
61
+ s[t] = { ...s[t], icon: n }, a("update:sheets", s);
59
62
  }
63
+ }, I = (e) => {
64
+ r.value = e, a("edit-start", e);
65
+ }, D = (e) => {
66
+ r.value = null, a("edit-end", e);
60
67
  }, B = (e) => {
61
- r.value = e, s("edit-start", e);
68
+ a("duplicate", e);
62
69
  }, V = (e) => {
63
- r.value = null, s("edit-end", e);
64
- }, I = (e) => {
65
- s("duplicate", e);
66
- }, C = (e) => {
67
- const o = l.sheets.findIndex((n) => n.id === e);
68
- if (o === -1) return;
70
+ const n = l.sheets.findIndex((s) => s.id === e);
71
+ if (n === -1) return;
69
72
  const t = [...l.sheets];
70
- if (t.splice(o, 1), s("update:sheets", t), s("delete", e), l.modelValue === e) {
71
- let n = "";
73
+ if (t.splice(n, 1), a("update:sheets", t), a("delete", e), l.modelValue === e) {
74
+ let s = "";
72
75
  if (t.length > 0) {
73
- const N = Math.min(o, t.length - 1);
74
- n = t[N].id;
76
+ const N = Math.min(n, t.length - 1);
77
+ s = t[N].id;
75
78
  }
76
- s("update:modelValue", n), s("change", n);
79
+ a("update:modelValue", s), a("change", s);
77
80
  }
78
81
  };
79
- p(
82
+ x(
80
83
  () => l.sheets.length,
81
- (e, o) => {
82
- e > o && l.addable && _(() => {
84
+ (e, n) => {
85
+ n !== void 0 && n > 0 && e === n + 1 && l.addable && U(() => {
83
86
  const t = l.sheets[l.sheets.length - 1];
84
87
  t.id === l.modelValue && (r.value = t.id);
85
88
  });
@@ -87,10 +90,10 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
87
90
  );
88
91
  const E = (e) => {
89
92
  f.value && e.deltaY !== 0 && (f.value.scrollLeft += e.deltaY, e.preventDefault());
90
- }, $ = U(() => l.sheets.length > 1);
91
- return (e, o) => (a(), i("div", z, [
92
- c("div", F, [
93
- e.$slots["left-addons"] ? (a(), i("div", M, [
93
+ }, $ = A(() => l.sheets.length > 1);
94
+ return (e, n) => (d(), o("div", L, [
95
+ c("div", M, [
96
+ e.$slots["left-addons"] ? (d(), o("div", j, [
94
97
  m(e.$slots, "left-addons", {}, void 0, !0)
95
98
  ])) : u("", !0),
96
99
  c("div", {
@@ -105,39 +108,42 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
105
108
  ref: w,
106
109
  class: "flex items-end"
107
110
  }, [
108
- (a(!0), i(A, null, L(P(h), (t) => (a(), J(Y, {
111
+ (d(!0), o(P, null, J(O(h), (t) => (d(), W(F, {
109
112
  key: t.id,
110
113
  sheet: t,
111
- "is-active": d.modelValue === t.id,
114
+ "is-active": i.modelValue === t.id,
112
115
  "is-editing": r.value === t.id,
113
116
  "can-delete": $.value,
114
- "confirm-delete": d.confirmDelete,
115
- "confirm-delete-texts": d.confirmDeleteTexts,
116
- "allow-icon-change": d.allowIconChange,
117
+ "confirm-delete": i.confirmDelete,
118
+ "confirm-delete-texts": i.confirmDeleteTexts,
119
+ "allow-icon-change": i.allowIconChange,
120
+ "item-class": i.itemClass,
121
+ "active-item-class": i.activeItemClass,
122
+ "inactive-item-class": i.inactiveItemClass,
117
123
  onSelect: y,
118
- "onUpdate:title": S,
119
- "onUpdate:icon": D,
120
- onEditStart: B,
121
- onEditEnd: V,
122
- onDuplicate: I,
123
- onDelete: C
124
- }, null, 8, ["sheet", "is-active", "is-editing", "can-delete", "confirm-delete", "confirm-delete-texts", "allow-icon-change"]))), 128))
124
+ "onUpdate:title": C,
125
+ "onUpdate:icon": S,
126
+ onEditStart: I,
127
+ onEditEnd: D,
128
+ onDuplicate: B,
129
+ onDelete: V
130
+ }, null, 8, ["sheet", "is-active", "is-editing", "can-delete", "confirm-delete", "confirm-delete-texts", "allow-icon-change", "item-class", "active-item-class", "inactive-item-class"]))), 128))
125
131
  ], 512),
126
- d.addable && d.addButtonPosition === "attached" ? (a(), i("div", j, [
127
- x(b, { onClick: g })
132
+ i.addable && i.addButtonPosition === "attached" ? (d(), o("div", q, [
133
+ p(b, { onClick: v })
128
134
  ])) : u("", !0),
129
- o[0] || (o[0] = c("div", { class: "w-1 shrink-0" }, null, -1))
135
+ n[0] || (n[0] = c("div", { class: "w-1 shrink-0" }, null, -1))
130
136
  ], 544),
131
- c("div", q, [
132
- d.addable && d.addButtonPosition === "fixed-right" ? (a(), i("div", G, [
133
- x(b, { onClick: g })
137
+ c("div", G, [
138
+ i.addable && i.addButtonPosition === "fixed-right" ? (d(), o("div", H, [
139
+ p(b, { onClick: v })
134
140
  ])) : u("", !0),
135
- e.$slots["right-addons"] ? (a(), i("div", H, [
141
+ e.$slots["right-addons"] ? (d(), o("div", K, [
136
142
  m(e.$slots, "right-addons", {}, void 0, !0)
137
143
  ])) : u("", !0)
138
144
  ])
139
145
  ]),
140
- c("div", K, [
146
+ c("div", Q, [
141
147
  m(e.$slots, "default", {}, void 0, !0)
142
148
  ])
143
149
  ]));
@@ -19,6 +19,9 @@ export interface WorkbookProps {
19
19
  maxSheets?: number;
20
20
  variant?: 'chrome' | 'folder' | 'simple' | 'card';
21
21
  class?: string;
22
+ itemClass?: string;
23
+ activeItemClass?: string;
24
+ inactiveItemClass?: string;
22
25
  confirmDelete?: boolean;
23
26
  confirmDeleteTexts?: {
24
27
  title?: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A Vue 3 UI component library built with Tailwind CSS.",
5
5
  "license": "MIT",
6
- "version": "0.2.5",
6
+ "version": "0.2.7",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",
@@ -42,7 +42,7 @@
42
42
  "tailwindcss": "^4.1.18",
43
43
  "v-datepicker-lite": "^0.1.6",
44
44
  "v-tooltip-lite": "^0.1.9",
45
- "vue-carousel-lite": "^0.2.3",
45
+ "vue-carousel-lite": "^0.2.6",
46
46
  "vue3-google-signin": "^2.1.1"
47
47
  },
48
48
  "peerDependencies": {
package/style.css CHANGED
@@ -315,6 +315,10 @@
315
315
  --color-success-dark: #00613f;
316
316
  }
317
317
 
318
+ @utility -text-fs-* {
319
+ font-size: calc(--value(--text--fs- *, [length], [number]));
320
+ }
321
+
318
322
 
319
323
  .dark .modal-body,
320
324
  .dark .sidepanel-body {