vlite3 1.3.7 → 1.3.8

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.
@@ -60,7 +60,10 @@ declare function __VLS_template(): {
60
60
  header?(_: {}): any;
61
61
  footer?(_: {}): any;
62
62
  };
63
- refs: {};
63
+ refs: {
64
+ dropdownWrapper: HTMLDivElement;
65
+ focusTrapAfter: HTMLSpanElement;
66
+ };
64
67
  rootEl: HTMLDivElement;
65
68
  };
66
69
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -116,7 +119,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
116
119
  showSelectedIcon: boolean;
117
120
  doubleConfirmation: boolean;
118
121
  isNested: boolean;
119
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
122
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
123
+ dropdownWrapper: HTMLDivElement;
124
+ focusTrapAfter: HTMLSpanElement;
125
+ }, HTMLDivElement>;
120
126
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
121
127
  export default _default;
122
128
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,13 +1,13 @@
1
- import { defineComponent as le, ref as i, computed as f, inject as ne, onMounted as oe, onUnmounted as ae, watch as M, provide as L, reactive as ie, toRefs as se, openBlock as V, createElementBlock as de, normalizeStyle as re, createVNode as P, unref as u, withCtx as m, createBlock as ue, normalizeClass as ce, createSlots as fe, renderSlot as v, normalizeProps as R, guardReactiveProps as W, createCommentVNode as me } from "vue";
2
- import ve from "v-tooltip-lite";
1
+ import { defineComponent as ae, ref as a, computed as f, inject as ie, onMounted as se, onUnmounted as re, watch as x, provide as L, reactive as de, toRefs as ue, openBlock as R, createElementBlock as ce, normalizeStyle as fe, createVNode as N, unref as u, withCtx as m, createBlock as me, normalizeClass as ve, createSlots as he, renderSlot as v, normalizeProps as z, guardReactiveProps as j, createCommentVNode as ye, createElementVNode as ge } from "vue";
2
+ import be from "v-tooltip-lite";
3
3
  import "v-tooltip-lite/style.css";
4
- import he from "./DropdownMenu.vue.js";
5
- import ye from "./DropdownTrigger.vue.js";
6
- import ge from "../ConfirmationModal.vue.js";
7
- import { useDropdownIds as be } from "./composables/useDropdownIds.js";
8
- import { useDropdownSelection as Ce } from "./composables/useDropdownSelection.js";
9
- import { useDropdownHydration as pe } from "./composables/useDropdownHydration.js";
10
- const xe = /* @__PURE__ */ le({
4
+ import pe from "./DropdownMenu.vue.js";
5
+ import Ce from "./DropdownTrigger.vue.js";
6
+ import we from "../ConfirmationModal.vue.js";
7
+ import { useDropdownIds as Oe } from "./composables/useDropdownIds.js";
8
+ import { useDropdownSelection as Se } from "./composables/useDropdownSelection.js";
9
+ import { useDropdownHydration as $e } from "./composables/useDropdownHydration.js";
10
+ const He = /* @__PURE__ */ ae({
11
11
  __name: "Dropdown",
12
12
  props: {
13
13
  selected: {},
@@ -52,152 +52,158 @@ const xe = /* @__PURE__ */ le({
52
52
  variant: { default: "default" }
53
53
  },
54
54
  emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
55
- setup(t, { emit: z }) {
56
- const l = t, h = z, b = i(!1), y = i(null), d = i({
55
+ setup(t, { emit: U }) {
56
+ const l = t, h = U, b = a(!1), y = a(null), r = a({
57
57
  title: "Confirm Selection",
58
58
  description: "Are you sure you want to select this option?",
59
59
  confirmText: "Confirm",
60
60
  cancelText: "Cancel",
61
61
  variant: "primary"
62
- }), j = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), U = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), C = i(l.isOpen || !1), p = i(0), q = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => l.menuId || q), g = i([]), s = ne("dropdown-context", null), F = (e) => {
62
+ }), q = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), F = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), p = a(l.isOpen || !1), C = a(0), G = a(null), S = a(null), $ = () => {
63
+ S.value && setTimeout(() => {
64
+ S.value?.focus({ preventScroll: !0 });
65
+ }, 10);
66
+ }, J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, I = f(() => l.menuId || J), g = a([]), s = ie("dropdown-context", null), K = (e) => {
63
67
  g.value.includes(e) || g.value.push(e), s?.registerChildId?.(e);
64
- }, G = (e) => {
68
+ }, Q = (e) => {
65
69
  g.value = g.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
66
70
  };
67
- oe(() => {
68
- s?.registerChildId && s.registerChildId(`#${w.value}`);
69
- }), ae(() => {
70
- s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
71
- }), M(
71
+ se(() => {
72
+ s?.registerChildId && s.registerChildId(`#${I.value}`);
73
+ }), re(() => {
74
+ s?.unregisterChildId && s.unregisterChildId(`#${I.value}`);
75
+ }), x(
72
76
  () => l.isOpen,
73
77
  (e) => {
74
78
  if (e !== void 0) {
75
79
  if ((l.disabled || l.readonly) && e) return;
76
- C.value = e;
80
+ p.value = e;
77
81
  }
78
82
  }
79
83
  );
80
- const x = (e) => {
84
+ const A = (e) => {
81
85
  if (l.disabled || l.readonly) {
82
- C.value = !1, h("update:isOpen", !1);
86
+ p.value = !1, h("update:isOpen", !1);
83
87
  return;
84
88
  }
85
- C.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
86
- }, O = () => {
87
- x(!1);
88
- }, J = (e) => {
89
- e ? p.value++ : p.value = Math.max(0, p.value - 1);
89
+ p.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
90
+ }, w = () => {
91
+ A(!1);
92
+ }, X = (e) => {
93
+ e ? C.value++ : C.value = Math.max(0, C.value - 1);
90
94
  };
91
95
  L("dropdown-context", {
92
- close: O,
96
+ close: w,
93
97
  onChildToggle: (e) => {
94
- J(e), s?.onChildToggle?.(e);
98
+ X(e), s?.onChildToggle?.(e);
95
99
  },
96
- registerChildId: F,
97
- unregisterChildId: G
100
+ registerChildId: K,
101
+ unregisterChildId: Q
98
102
  }), L("modal-context", null);
99
- const $ = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), N = i(!1), I = i(!1);
100
- M(
101
- $,
103
+ const k = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), O = a([]), E = a(!1), T = a(!1);
104
+ x(
105
+ k,
102
106
  (e) => {
103
107
  if (e) {
104
108
  if (l.remote) {
105
- const o = [...S.value];
109
+ const o = [...O.value];
106
110
  e.forEach((n) => {
107
- o.some((a) => a.value !== void 0 && n.value !== void 0 ? typeof a.value == "object" && a.key && n.key ? a.key === n.key && a.value[a.key] === n.value[n.key] : a.value === n.value : a.label === n.label) || o.push(n);
108
- }), S.value = o;
111
+ o.some((i) => i.value !== void 0 && n.value !== void 0 ? typeof i.value == "object" && i.key && n.key ? i.key === n.key && i.value[i.key] === n.value[n.key] : i.value === n.value : i.label === n.label) || o.push(n);
112
+ }), O.value = o;
109
113
  } else
110
- S.value = e;
111
- !N.value && e.length > 0 && (N.value = !0, setTimeout(() => {
112
- I.value = !0, E(B.value);
114
+ O.value = e;
115
+ !E.value && e.length > 0 && (E.value = !0, setTimeout(() => {
116
+ T.value = !0, H(M.value);
113
117
  }, 10));
114
118
  }
115
119
  },
116
120
  { immediate: !0 }
117
121
  );
118
122
  const c = f(() => {
119
- const e = [...S.value], o = new Set(e.map((n) => n.value ?? n.label));
120
- return k.value.forEach((n, r) => {
121
- o.has(r) || (e.unshift(n), o.add(r));
123
+ const e = [...O.value], o = new Set(e.map((n) => n.value ?? n.label));
124
+ return B.value.forEach((n, d) => {
125
+ o.has(d) || (e.unshift(n), o.add(d));
122
126
  }), e;
123
- }), { selectedBuffer: k, isHydrating: K, hydrateSelected: E } = pe({
127
+ }), { selectedBuffer: B, isHydrating: Y, hydrateSelected: H } = $e({
124
128
  fetchSelected: l.fetchSelected,
125
129
  getAvailableOptions: () => c.value,
126
- isReady: () => I.value
127
- }), { getAllRecursiveIds: Q } = be(), X = ie({
128
- ...se(l),
130
+ isReady: () => T.value
131
+ }), { getAllRecursiveIds: Z } = Oe(), _ = de({
132
+ ...ue(l),
129
133
  options: c
130
- }), { currentValue: B, selectedLabel: A, selectedIcon: H, selectOption: Y } = Ce(
131
- X,
134
+ }), { currentValue: M, selectedLabel: V, selectedIcon: W, selectOption: ee } = Se(
135
+ _,
132
136
  h
133
- ), Z = f(() => {
134
- const e = l.ignoreClickOutside || [], o = Q(c.value);
137
+ ), te = f(() => {
138
+ const e = l.ignoreClickOutside || [], o = Z(c.value);
135
139
  return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
136
140
  });
137
- M(
138
- () => B.value,
141
+ x(
142
+ () => M.value,
139
143
  (e) => {
140
- I.value && E(e);
144
+ T.value && H(e);
141
145
  },
142
146
  { deep: !0 }
143
147
  );
144
- const _ = (e) => {
148
+ const le = (e) => {
145
149
  if (l.disabled || l.readonly || e.disabled) return;
146
- l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? d.value = {
150
+ l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? r.value = {
147
151
  title: e.confirmation.title || "Confirm Selection",
148
152
  description: e.confirmation.description || "Are you sure you want to select this option?",
149
153
  confirmText: e.confirmation.confirmText || "Confirm",
150
154
  cancelText: e.confirmation.cancelText || "Cancel",
151
155
  variant: e.confirmation.variant || "primary"
152
- } : d.value = {
156
+ } : r.value = {
153
157
  title: "Confirm Selection",
154
158
  description: `Are you sure you want to select "${e.label}"?`,
155
159
  confirmText: "Confirm",
156
160
  cancelText: "Cancel",
157
161
  variant: "primary"
158
- }, b.value = !0, O()) : (D(e), l.closeOnSelect && O());
162
+ }, b.value = !0, w()) : (D(e), l.closeOnSelect && (w(), $()));
159
163
  }, D = (e) => {
160
164
  if (l.disabled || l.readonly || e.disabled) return;
161
165
  const o = e.value ?? e.label;
162
- k.value.has(o) || k.value.set(o, e);
163
- const n = Y(e);
166
+ B.value.has(o) || B.value.set(o, e);
167
+ const n = ee(e);
164
168
  if (!l.isNested) {
165
- const r = e._originalOption || e, a = r.value ?? r.label;
166
- (e._path || [r]).forEach((T) => {
167
- typeof T.onSelect == "function" && T.onSelect({
168
- value: a,
169
- option: T,
169
+ const d = e._originalOption || e, i = d.value ?? d.label;
170
+ (e._path || [d]).forEach((P) => {
171
+ typeof P.onSelect == "function" && P.onSelect({
172
+ value: i,
173
+ option: P,
170
174
  data: c.value || [],
171
175
  values: n
172
176
  });
173
177
  });
174
178
  }
175
- }, ee = () => {
176
- y.value && (D(y.value), y.value = null, b.value = !1);
177
- }, te = () => {
178
- y.value = null, b.value = !1;
179
+ }, ne = () => {
180
+ y.value && (D(y.value), y.value = null, b.value = !1, $());
181
+ }, oe = () => {
182
+ y.value = null, b.value = !1, $();
179
183
  };
180
- return (e, o) => (V(), de("div", {
184
+ return (e, o) => (R(), ce("div", {
181
185
  class: "relative inline-block text-left",
182
- style: re({ direction: t.direction })
186
+ style: fe({ direction: t.direction }),
187
+ ref_key: "dropdownWrapper",
188
+ ref: G
183
189
  }, [
184
- P(u(ve), {
190
+ N(u(be), {
185
191
  content: "",
186
192
  trigger: "click",
187
193
  arrow: !1,
188
194
  disabled: t.disabled || t.readonly,
189
195
  teleport: t.teleport,
190
196
  offset: t.offset,
191
- placement: j.value,
192
- isOpen: C.value,
193
- keepAlive: p.value > 0,
194
- menuId: w.value,
195
- ignoreClickOutside: Z.value,
197
+ placement: q.value,
198
+ isOpen: p.value,
199
+ keepAlive: C.value > 0,
200
+ menuId: I.value,
201
+ ignoreClickOutside: te.value,
196
202
  class: "w-full",
197
203
  className: "dropdown " + (t.className || "") + (t.variant === "transparent" ? " unstyled-dropdown" : "") + (t.variant === "secondary" ? " dropdown-secondary" : ""),
198
204
  onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
199
205
  onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
200
- "onUpdate:isOpen": x,
206
+ "onUpdate:isOpen": A,
201
207
  triggerClass: "w-full",
202
208
  styles: {
203
209
  padding: "0",
@@ -207,14 +213,14 @@ const xe = /* @__PURE__ */ le({
207
213
  }
208
214
  }, {
209
215
  trigger: m(({ isOpen: n }) => [
210
- v(e.$slots, "trigger", R(W({
211
- selectedLabel: u(A),
212
- selectedIcon: t.showSelectedIcon ? u(H) : void 0,
216
+ v(e.$slots, "trigger", z(j({
217
+ selectedLabel: u(V),
218
+ selectedIcon: t.showSelectedIcon ? u(W) : void 0,
213
219
  isOpen: n
214
220
  })), () => [
215
- P(ye, {
216
- "selected-label": u(A),
217
- "selected-icon": t.showSelectedIcon ? u(H) : void 0,
221
+ N(Ce, {
222
+ "selected-label": u(V),
223
+ "selected-icon": t.showSelectedIcon ? u(W) : void 0,
218
224
  "is-open": n,
219
225
  direction: t.direction,
220
226
  disabled: t.disabled,
@@ -225,33 +231,33 @@ const xe = /* @__PURE__ */ le({
225
231
  ])
226
232
  ]),
227
233
  default: m(() => [
228
- !(t.disabled || t.readonly) && ($.value.length || c.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (V(), ue(he, {
234
+ !(t.disabled || t.readonly) && (k.value.length || c.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (R(), me(pe, {
229
235
  key: 0,
230
- options: $.value,
236
+ options: k.value,
231
237
  cachedOptions: c.value,
232
- class: ce(t.className),
238
+ class: ve(t.className),
233
239
  emptyMessage: t.emptyMessage,
234
240
  searchEmptyMessage: t.searchEmptyMessage,
235
- selected: u(B),
241
+ selected: u(M),
236
242
  selectedIndex: t.selectedIndex,
237
243
  maxHeight: t.maxHeight,
238
- nestedPosition: U.value,
244
+ nestedPosition: F.value,
239
245
  nestedOffset: t.nestedOffset,
240
246
  selectable: t.selectable,
241
247
  direction: t.direction,
242
248
  isCustomSlotMenu: !!e.$slots?.default || !!e.$slots?.menu,
243
249
  layout: t.layout,
244
250
  columns: t.columns,
245
- loading: t.loading || u(K),
251
+ loading: t.loading || u(Y),
246
252
  hasMore: t.hasMore,
247
253
  searchable: t.searchable,
248
254
  remote: t.remote,
249
255
  debounceTime: t.debounceTime,
250
- onSelect: _,
251
- onClose: O,
256
+ onSelect: le,
257
+ onClose: w,
252
258
  onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
253
259
  onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
254
- }, fe({ _: 2 }, [
260
+ }, he({ _: 2 }, [
255
261
  e.$slots.menu || e.$slots?.default ? {
256
262
  name: "menu",
257
263
  fn: m(() => [
@@ -263,7 +269,7 @@ const xe = /* @__PURE__ */ le({
263
269
  e.$slots.item ? {
264
270
  name: "item",
265
271
  fn: m((n) => [
266
- v(e.$slots, "item", R(W(n)))
272
+ v(e.$slots, "item", z(j(n)))
267
273
  ]),
268
274
  key: "1"
269
275
  } : void 0,
@@ -281,23 +287,30 @@ const xe = /* @__PURE__ */ le({
281
287
  ]),
282
288
  key: "3"
283
289
  } : void 0
284
- ]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : me("", !0)
290
+ ]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : ye("", !0)
285
291
  ]),
286
292
  _: 3
287
293
  }, 8, ["disabled", "teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
288
- P(ge, {
294
+ N(we, {
289
295
  show: b.value,
290
- title: d.value.title,
291
- description: d.value.description,
292
- "confirm-text": d.value.confirmText,
293
- "cancel-text": d.value.cancelText,
294
- variant: d.value.variant,
295
- onConfirm: ee,
296
- onCancel: te
297
- }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
296
+ title: r.value.title,
297
+ description: r.value.description,
298
+ "confirm-text": r.value.confirmText,
299
+ "cancel-text": r.value.cancelText,
300
+ variant: r.value.variant,
301
+ onConfirm: ne,
302
+ onCancel: oe
303
+ }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"]),
304
+ ge("span", {
305
+ ref_key: "focusTrapAfter",
306
+ ref: S,
307
+ tabindex: "-1",
308
+ class: "outline-none pointer-events-none absolute opacity-0 w-0 h-0",
309
+ "aria-hidden": "true"
310
+ }, null, 512)
298
311
  ], 4));
299
312
  }
300
313
  });
301
314
  export {
302
- xe as default
315
+ He as default
303
316
  };
@@ -10,7 +10,7 @@ declare function __VLS_template(): {
10
10
  slots: {
11
11
  default?(_: {
12
12
  toggleTheme: () => void;
13
- theme: "light-mode" | "dark";
13
+ theme: "light" | "dark";
14
14
  }): any;
15
15
  };
16
16
  refs: {};
@@ -12,7 +12,7 @@ const w = /* @__PURE__ */ m({
12
12
  },
13
13
  setup(t) {
14
14
  const { theme: i, toggleTheme: s } = f(), a = d(() => {
15
- const n = i.value === "light-mode", l = "vlite.themeToggle.switchToDark", r = "vlite.themeToggle.switchToLight";
15
+ const n = i.value === "light", l = "vlite.themeToggle.switchToDark", r = "vlite.themeToggle.switchToLight";
16
16
  if (n) {
17
17
  const e = c(l);
18
18
  return e !== l ? e : "Switch to dark mode";
@@ -26,7 +26,7 @@ const w = /* @__PURE__ */ m({
26
26
  theme: o(i)
27
27
  }, () => [
28
28
  h(T, {
29
- icon: o(i) === "light-mode" ? "lucide:sun" : "lucide:moon",
29
+ icon: o(i) === "light" ? "lucide:sun" : "lucide:moon",
30
30
  variant: t.variant || "secondary",
31
31
  rounded: t.rounded || "full",
32
32
  size: t.size,
@@ -1,4 +1,4 @@
1
- type Theme = 'light-mode' | 'dark';
1
+ type Theme = 'light' | 'dark';
2
2
  export declare function initializeTheme(): void;
3
3
  export declare function useTheme(): {
4
4
  theme: import('vue').Ref<Theme, Theme>;
@@ -1,33 +1,33 @@
1
- import { ref as i, watch as m, onMounted as a } from "vue";
2
- const t = i(d());
3
- function d() {
4
- if (typeof window > "u") return "light-mode";
1
+ import { ref as a, watch as d, onMounted as r } from "vue";
2
+ const t = a(o());
3
+ function o() {
4
+ if (typeof window > "u") return "light";
5
5
  const e = localStorage.getItem("builto-theme");
6
- return e === "light-mode" || e === "dark" ? e : window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light-mode";
6
+ return e === "light" || e === "dark" ? e : window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
7
7
  }
8
- function o(e) {
9
- document.documentElement.classList.remove("light-mode", "dark"), document.documentElement.classList.add(e);
8
+ function n(e) {
9
+ document.documentElement.classList.remove("light", "dark"), document.documentElement.classList.add(e);
10
10
  }
11
- function r() {
11
+ function l() {
12
12
  typeof window > "u" || !window.matchMedia || window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
13
- localStorage.getItem("builto-theme") || (t.value = e.matches ? "dark" : "light-mode", o(t.value));
13
+ localStorage.getItem("builto-theme") || (t.value = e.matches ? "dark" : "light", n(t.value));
14
14
  });
15
15
  }
16
16
  function u() {
17
- t.value = d(), o(t.value), r();
17
+ t.value = o(), n(t.value), l();
18
18
  }
19
19
  function c() {
20
- m(
20
+ d(
21
21
  t,
22
- (n) => {
23
- localStorage.setItem("builto-theme", n), o(n);
22
+ (i) => {
23
+ localStorage.setItem("builto-theme", i), n(i);
24
24
  },
25
25
  { immediate: !0 }
26
- ), a(() => {
26
+ ), r(() => {
27
27
  document.documentElement.classList.add("bg-body");
28
28
  });
29
29
  function e() {
30
- t.value = t.value === "light-mode" ? "dark" : "light-mode";
30
+ t.value = t.value === "light" ? "dark" : "light";
31
31
  }
32
32
  return {
33
33
  theme: t,
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": "1.3.7",
6
+ "version": "1.3.8",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",
package/style.css CHANGED
@@ -292,8 +292,9 @@
292
292
  .dark .sidepanel-body,
293
293
  .dark .tooltip-container,
294
294
  .bg-card,
295
+ .bg-card-light,
295
296
  .theme-section,
296
- .light-mode,
297
+ .light,
297
298
  :root {
298
299
 
299
300
  --color-white: #ffffff;
@@ -395,7 +396,7 @@
395
396
 
396
397
  }
397
398
 
398
- .light-mode {
399
+ .light {
399
400
  --color-white: #ffffff !important;
400
401
  --color-mixture-1: #ffffff !important;
401
402
  --color-mixture-2: #0c0c0c !important;
@@ -579,6 +580,16 @@
579
580
  background-color: var(--color-body) !important;
580
581
  }
581
582
 
583
+ .dark .modal-body .bg-card-light,
584
+ .dark .sidepanel-body .bg-card-light,
585
+ .dark .tooltip-container .bg-card-light {
586
+ --color-body: #1c1c1c !important;
587
+ --color-white: #1c1c1c !important;
588
+ --color-mixture-1: #202020 !important;
589
+ --color-mixture-2: #ffffff !important;
590
+ background-color: var(--color-body) !important;
591
+ }
592
+
582
593
  .dark .bg-card {
583
594
  --color-body: #141414 !important;
584
595
  --color-white: #141414 !important;
@@ -608,7 +619,8 @@
608
619
  }
609
620
 
610
621
 
611
- .bg-card {
622
+ .bg-card,
623
+ .bg-card-light {
612
624
  --color-body: #f7f7f7 !important;
613
625
  --color-white: #f7f7f7 !important;
614
626
  --color-mixture-1: #f7f7f7 !important;
@@ -617,7 +629,9 @@
617
629
  border-color: color-mix(in oklab, var(--color-mixture-1) 94%, var(--color-mixture-2));
618
630
  }
619
631
 
620
- .bg-card .bg-card {
632
+
633
+ .bg-card .bg-card,
634
+ .bg-card-light .bg-card-light {
621
635
  --color-body: #f1f1f1 !important;
622
636
  --color-white: #f1f1f1 !important;
623
637
  --color-mixture-1: #f1f1f1;
@@ -625,7 +639,8 @@
625
639
  background-color: #f1f1f1 !important;
626
640
  }
627
641
 
628
- .bg-card .bg-card .bg-card {
642
+ .bg-card .bg-card .bg-card,
643
+ .bg-card-light .bg-card-light .bg-card-light {
629
644
  --color-body: #e8e8e8 !important;
630
645
  --color-white: #e8e8e8 !important;
631
646
  --color-mixture-1: #e8e8e8;
@@ -633,15 +648,15 @@
633
648
  background-color: #e8e8e8 !important;
634
649
  }
635
650
 
636
- .dark .bg-card.light {
651
+ .dark .bg-card-light {
637
652
  --color-body: #121212 !important;
638
653
  --color-white: #121212 !important;
639
654
  background-color: #121212 !important;
640
655
  }
641
656
 
642
- .dark .bg-card .bg-card.light {
643
- --color-body: ##1a1a1a !important;
644
- --color-white: ##1a1a1a !important;
657
+ .dark .bg-card .bg-card-light {
658
+ --color-body: #1a1a1a !important;
659
+ --color-white: #1a1a1a !important;
645
660
  background-color: #1a1a1a !important;
646
661
  }
647
662