@jonapin006/tiger 1.0.19 → 1.0.21
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/tiger.es.js +20 -10
- package/dist/tiger.umd.js +1 -1
- package/package.json +1 -1
package/dist/tiger.es.js
CHANGED
|
@@ -2544,11 +2544,18 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
2544
2544
|
mispuntos: O,
|
|
2545
2545
|
glassmorphism: A
|
|
2546
2546
|
}, M = t(void 0), N = ({ children: e }) => {
|
|
2547
|
-
let [t, n] = o("mandala"), [r, a] = o(
|
|
2547
|
+
let [t, n] = o(() => localStorage.getItem("tiger-theme-name") || "mandala"), [r, a] = o(() => {
|
|
2548
|
+
let e = localStorage.getItem("tiger-theme-mode");
|
|
2549
|
+
return e && Object.values(_).includes(e) ? e : j[t]?.defaultMode || _.Light;
|
|
2550
|
+
}), c = j[t] || j.mandala, l = c.modes[r];
|
|
2548
2551
|
return i(() => {
|
|
2549
2552
|
let e = window.document.documentElement;
|
|
2550
|
-
e.classList.remove(_.Light, _.Dark), e.classList.add(r), c.pageTitle && (document.title = c.pageTitle);
|
|
2551
|
-
}, [
|
|
2553
|
+
e.classList.remove(_.Light, _.Dark), e.classList.add(r), localStorage.setItem("tiger-theme-mode", r), localStorage.setItem("tiger-theme-name", t), c.pageTitle && (document.title = c.pageTitle);
|
|
2554
|
+
}, [
|
|
2555
|
+
r,
|
|
2556
|
+
c,
|
|
2557
|
+
t
|
|
2558
|
+
]), /* @__PURE__ */ s(M.Provider, {
|
|
2552
2559
|
value: {
|
|
2553
2560
|
theme: c,
|
|
2554
2561
|
mode: r,
|
|
@@ -2737,22 +2744,25 @@ var B = ({ value: e = 0, currentStep: t = 0, totalSteps: n = 5, variant: r = "ba
|
|
|
2737
2744
|
...t,
|
|
2738
2745
|
[e]: !t[e]
|
|
2739
2746
|
}));
|
|
2740
|
-
}, _ = (e) => e.id === t ? !0 : e.children ? e.children.some((e) => _(e)) : !1,
|
|
2747
|
+
}, _ = (e) => e.id === t ? !0 : e.children ? e.children.some((e) => _(e)) : !1, y = (e, r = 0) => {
|
|
2741
2748
|
let i = e.children && e.children.length > 0, a = t === e.id, o = d[e.id] || _(e);
|
|
2742
2749
|
return /* @__PURE__ */ c("div", {
|
|
2743
2750
|
className: "w-full flex flex-col",
|
|
2744
2751
|
children: [/* @__PURE__ */ c("button", {
|
|
2745
|
-
onClick: () => {
|
|
2746
|
-
i ? g(e.id) : n(e.id);
|
|
2752
|
+
onClick: (t) => {
|
|
2753
|
+
t.preventDefault(), t.stopPropagation(), i ? g(e.id) : n(e.id);
|
|
2747
2754
|
},
|
|
2748
|
-
className: F(h.item, r > 0 && "pl-10", a
|
|
2755
|
+
className: F(h.item, r > 0 && "pl-10", a ? u.sidebarActive : u.sidebarInactive),
|
|
2749
2756
|
children: [/* @__PURE__ */ c("div", {
|
|
2750
2757
|
className: "flex items-center gap-3 flex-1",
|
|
2751
|
-
children: [/* @__PURE__ */ s(e.icon, { size: h.iconSize }), /* @__PURE__ */ s(I, {
|
|
2758
|
+
children: [/* @__PURE__ */ s(e.icon, { size: h.iconSize }), /* @__PURE__ */ s(I, {
|
|
2759
|
+
size: r > 0 ? v.Small : v.Medium,
|
|
2760
|
+
children: e.label
|
|
2761
|
+
})]
|
|
2752
2762
|
}), i && s(o ? p : f, { size: 16 })]
|
|
2753
2763
|
}), i && o && /* @__PURE__ */ s("div", {
|
|
2754
2764
|
className: "flex flex-col w-full mt-1",
|
|
2755
|
-
children: e.children?.map((e) =>
|
|
2765
|
+
children: e.children?.map((e) => y(e, r + 1))
|
|
2756
2766
|
})]
|
|
2757
2767
|
}, e.id);
|
|
2758
2768
|
};
|
|
@@ -2772,7 +2782,7 @@ var B = ({ value: e = 0, currentStep: t = 0, totalSteps: n = 5, variant: r = "ba
|
|
|
2772
2782
|
r,
|
|
2773
2783
|
/* @__PURE__ */ s("nav", {
|
|
2774
2784
|
className: F(h.nav, "flex flex-col gap-1"),
|
|
2775
|
-
children: e.map((e) =>
|
|
2785
|
+
children: e.map((e) => y(e))
|
|
2776
2786
|
}),
|
|
2777
2787
|
i
|
|
2778
2788
|
]
|