@jonapin006/tiger 1.0.34 → 1.0.36
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/README.md +134 -0
- package/dist/index.d.ts +8 -2
- package/dist/tiger.css +1 -1
- package/dist/tiger.es.js +89 -40
- package/dist/tiger.umd.js +1 -1
- package/package.json +1 -1
package/dist/tiger.es.js
CHANGED
|
@@ -57,7 +57,11 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
57
57
|
xlarge: y.Large
|
|
58
58
|
},
|
|
59
59
|
baseTypography: "text-inherit leading-none font-black uppercase tracking-widest whitespace-nowrap",
|
|
60
|
-
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit"
|
|
60
|
+
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit",
|
|
61
|
+
layout: {
|
|
62
|
+
container: "inline-flex items-center justify-center gap-2",
|
|
63
|
+
icon: "w-[1.2em] h-[1.2em] shrink-0"
|
|
64
|
+
}
|
|
61
65
|
},
|
|
62
66
|
iconButtons: {
|
|
63
67
|
small: {
|
|
@@ -671,7 +675,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
671
675
|
dropdown: {
|
|
672
676
|
trigger: "flex items-center justify-between px-3 py-2 rounded-lg bg-white border border-zinc-200 hover:bg-zinc-50 active:scale-95 transition-all duration-300 cursor-pointer text-emerald-950",
|
|
673
677
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
674
|
-
content: "bg-white border border-zinc-200 rounded-lg shadow-2xl py-1",
|
|
678
|
+
content: "absolute pointer-events-auto z-[100] bg-white border border-zinc-200 rounded-lg shadow-2xl py-1 mt-1",
|
|
675
679
|
contentSize: "w-full",
|
|
676
680
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-emerald-950 hover:bg-emerald-50 transition-colors",
|
|
677
681
|
itemHover: "bg-zinc-50 text-emerald-600",
|
|
@@ -857,7 +861,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
857
861
|
dropdown: {
|
|
858
862
|
trigger: "inline-flex items-center justify-between px-3 py-2 rounded-lg bg-zinc-900 border border-white/10 hover:bg-zinc-800 active:scale-95 transition-all duration-300 cursor-pointer text-white",
|
|
859
863
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
860
|
-
content: "bg-zinc-900 border border-white/10 rounded-lg shadow-2xl py-1",
|
|
864
|
+
content: "absolute pointer-events-auto z-[100] bg-zinc-900 border border-white/10 rounded-lg shadow-2xl py-1 mt-1",
|
|
861
865
|
contentSize: "w-full",
|
|
862
866
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-white hover:bg-white/10 transition-colors",
|
|
863
867
|
itemHover: "bg-white/10 text-white",
|
|
@@ -903,7 +907,11 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
903
907
|
xlarge: y.Large
|
|
904
908
|
},
|
|
905
909
|
baseTypography: "text-inherit leading-none font-black uppercase tracking-widest whitespace-nowrap",
|
|
906
|
-
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit"
|
|
910
|
+
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit",
|
|
911
|
+
layout: {
|
|
912
|
+
container: "inline-flex items-center justify-center gap-2",
|
|
913
|
+
icon: "w-[1.2em] h-[1.2em] shrink-0"
|
|
914
|
+
}
|
|
907
915
|
},
|
|
908
916
|
iconButtons: {
|
|
909
917
|
small: {
|
|
@@ -1517,7 +1525,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
1517
1525
|
dropdown: {
|
|
1518
1526
|
trigger: "flex items-center justify-between px-3 py-2 rounded-lg bg-white border border-zinc-200 hover:bg-zinc-50 active:scale-95 transition-all duration-300 cursor-pointer text-zinc-950",
|
|
1519
1527
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
1520
|
-
content: "bg-white border border-zinc-200 rounded-lg shadow-2xl py-1",
|
|
1528
|
+
content: "absolute pointer-events-auto z-[100] bg-white border border-zinc-200 rounded-lg shadow-2xl py-1 mt-1",
|
|
1521
1529
|
contentSize: "w-full",
|
|
1522
1530
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-zinc-950 hover:bg-zinc-100 transition-colors",
|
|
1523
1531
|
itemHover: "bg-zinc-50 text-zinc-950",
|
|
@@ -1703,7 +1711,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
1703
1711
|
dropdown: {
|
|
1704
1712
|
trigger: "inline-flex items-center justify-between px-3 py-2 rounded-lg bg-zinc-900 border border-white/10 hover:bg-zinc-800 active:scale-95 transition-all duration-300 cursor-pointer text-white",
|
|
1705
1713
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
1706
|
-
content: "bg-zinc-900 border border-white/10 rounded-lg shadow-2xl py-1",
|
|
1714
|
+
content: "absolute pointer-events-auto z-[100] bg-zinc-900 border border-white/10 rounded-lg shadow-2xl py-1 mt-1",
|
|
1707
1715
|
contentSize: "w-full",
|
|
1708
1716
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-white hover:bg-white/10 transition-colors",
|
|
1709
1717
|
itemHover: "bg-white/10 text-white",
|
|
@@ -1749,7 +1757,11 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
1749
1757
|
xlarge: y.Large
|
|
1750
1758
|
},
|
|
1751
1759
|
baseTypography: "text-inherit leading-none font-bold tracking-tight whitespace-nowrap",
|
|
1752
|
-
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit"
|
|
1760
|
+
baseStyles: "transition-all duration-300 transform-gpu active:scale-95 disabled:opacity-50 inline-flex items-center justify-center shrink-0 w-fit",
|
|
1761
|
+
layout: {
|
|
1762
|
+
container: "inline-flex items-center justify-center gap-2",
|
|
1763
|
+
icon: "w-[1.2em] h-[1.2em] shrink-0"
|
|
1764
|
+
}
|
|
1753
1765
|
},
|
|
1754
1766
|
iconButtons: {
|
|
1755
1767
|
small: {
|
|
@@ -2372,7 +2384,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
2372
2384
|
dropdown: {
|
|
2373
2385
|
trigger: "flex items-center justify-between px-4 py-2 rounded-lg bg-white/60 backdrop-blur-3xl border border-white/80 hover:bg-white/70 active:scale-95 transition-all duration-300 cursor-pointer text-indigo-950",
|
|
2374
2386
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
2375
|
-
content: "bg-white/70 backdrop-blur-3xl border border-white/80 rounded-lg shadow-2xl py-1",
|
|
2387
|
+
content: "absolute pointer-events-auto z-[100] bg-white/70 backdrop-blur-3xl border border-white/80 rounded-lg shadow-2xl py-1 mt-1",
|
|
2376
2388
|
contentSize: "w-full",
|
|
2377
2389
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-slate-600 hover:bg-white/40 hover:text-indigo-950",
|
|
2378
2390
|
itemHover: "bg-white/60 text-indigo-950",
|
|
@@ -2564,7 +2576,7 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
2564
2576
|
dropdown: {
|
|
2565
2577
|
trigger: "inline-flex items-center justify-between px-4 py-2 rounded-lg bg-white/15 backdrop-blur-3xl border border-white/30 hover:bg-white/20 active:scale-95 transition-all duration-300 cursor-pointer text-slate-950",
|
|
2566
2578
|
triggerSize: "w-full h-11 px-4 rounded-xl font-bold text-xs",
|
|
2567
|
-
content: "bg-white/15 backdrop-blur-3xl border border-white/30 rounded-lg shadow-2xl py-1",
|
|
2579
|
+
content: "absolute pointer-events-auto z-[100] bg-white/15 backdrop-blur-3xl border border-white/30 rounded-lg shadow-2xl py-1 mt-1",
|
|
2568
2580
|
contentSize: "w-full",
|
|
2569
2581
|
item: "w-full text-left px-4 py-2.5 text-xs font-bold text-white/50 hover:bg-white/5 hover:text-white transition-all",
|
|
2570
2582
|
itemHover: "bg-white/5 text-white",
|
|
@@ -2639,16 +2651,20 @@ var I = ({ children: e, size: t = y.Medium, variant: n = "p", bold: r = !1, ital
|
|
|
2639
2651
|
children: e
|
|
2640
2652
|
})
|
|
2641
2653
|
});
|
|
2642
|
-
}, ne = ({ variant: e = T.Primary, size: t = y.Medium,
|
|
2643
|
-
let { theme:
|
|
2644
|
-
return /* @__PURE__ */
|
|
2645
|
-
className: F(
|
|
2646
|
-
...
|
|
2647
|
-
children:
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2654
|
+
}, ne = ({ variant: e = T.Primary, size: t = y.Medium, iconLeft: n, iconRight: r, className: i, children: a, ...o }) => {
|
|
2655
|
+
let { theme: s, themeConfig: u } = P(), d = u.buttons[e], f = t, p = s.geometry.buttons[f], m = s.geometry.buttons.typographyMappings[f];
|
|
2656
|
+
return /* @__PURE__ */ l("button", {
|
|
2657
|
+
className: F(s.geometry.buttons.baseStyles, d, p.size, s.geometry.buttons.layout.container, i),
|
|
2658
|
+
...o,
|
|
2659
|
+
children: [
|
|
2660
|
+
n && /* @__PURE__ */ c(n, { className: s.geometry.buttons.layout.icon }),
|
|
2661
|
+
/* @__PURE__ */ c(I, {
|
|
2662
|
+
size: m,
|
|
2663
|
+
className: s.geometry.buttons.baseTypography,
|
|
2664
|
+
children: a
|
|
2665
|
+
}),
|
|
2666
|
+
r && /* @__PURE__ */ c(r, { className: s.geometry.buttons.layout.icon })
|
|
2667
|
+
]
|
|
2652
2668
|
});
|
|
2653
2669
|
}, L = ({ checked: e = !1, onChange: t, size: n = y.Medium, className: r, disabled: i = !1 }) => {
|
|
2654
2670
|
let { theme: a, themeConfig: o } = P(), s = a.geometry.checkbox[n], l = () => {
|
|
@@ -2991,15 +3007,46 @@ var re = ({ value: e = 0, currentStep: t = 0, totalSteps: n = 5, variant: r = "b
|
|
|
2991
3007
|
className: F("transition-transform duration-300", a && "rotate-180")
|
|
2992
3008
|
})]
|
|
2993
3009
|
});
|
|
2994
|
-
}, Y = ({ children: e, size: t = y.Medium, className: n,
|
|
2995
|
-
let { isOpen:
|
|
2996
|
-
|
|
2997
|
-
|
|
3010
|
+
}, Y = ({ children: e, size: t = y.Medium, className: n, style: r, ...a }) => {
|
|
3011
|
+
let { isOpen: s, contentRef: l, triggerRef: u } = K(), { theme: d, themeConfig: f } = P(), [p, m] = o({
|
|
3012
|
+
top: 0,
|
|
3013
|
+
left: 0,
|
|
3014
|
+
width: 0,
|
|
3015
|
+
align: "left"
|
|
3016
|
+
}), h = t;
|
|
3017
|
+
return i(() => {
|
|
3018
|
+
if (s && u.current) {
|
|
3019
|
+
let e = () => {
|
|
3020
|
+
let e = u.current?.getBoundingClientRect();
|
|
3021
|
+
if (e) {
|
|
3022
|
+
let t = window.innerWidth, n = e.left + 200 > t;
|
|
3023
|
+
m({
|
|
3024
|
+
top: e.bottom + window.scrollY,
|
|
3025
|
+
left: n ? e.right - 200 + window.scrollX : e.left + window.scrollX,
|
|
3026
|
+
width: e.width,
|
|
3027
|
+
align: n ? "right" : "left"
|
|
3028
|
+
});
|
|
3029
|
+
}
|
|
3030
|
+
};
|
|
3031
|
+
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
3032
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
3033
|
+
};
|
|
3034
|
+
}
|
|
3035
|
+
}, [s, u]), s ? g(/* @__PURE__ */ c("div", {
|
|
3036
|
+
ref: l,
|
|
2998
3037
|
role: "listbox",
|
|
2999
|
-
className: F(
|
|
3000
|
-
|
|
3038
|
+
className: F(f.dropdown?.content || "", d.geometry.dropdown?.[h]?.size || "", d.geometry.dropdown?.contentPositioning || "", n),
|
|
3039
|
+
style: {
|
|
3040
|
+
position: "absolute",
|
|
3041
|
+
top: p.top,
|
|
3042
|
+
left: p.align === "left" ? p.left : void 0,
|
|
3043
|
+
right: p.align === "right" ? window.innerWidth - (p.left + 200) : void 0,
|
|
3044
|
+
minWidth: p.width,
|
|
3045
|
+
...r
|
|
3046
|
+
},
|
|
3047
|
+
...a,
|
|
3001
3048
|
children: e
|
|
3002
|
-
}) : null;
|
|
3049
|
+
}), document.body) : null;
|
|
3003
3050
|
}, X = ({ children: e, className: t, onClick: n, ...r }) => {
|
|
3004
3051
|
let [i, a] = o(!1), { setIsOpen: s } = K(), { themeConfig: l } = P();
|
|
3005
3052
|
return /* @__PURE__ */ c("button", {
|
|
@@ -3284,30 +3331,32 @@ var le = ({ children: t, className: n, size: r = y.Medium, divided: i = !0 }) =>
|
|
|
3284
3331
|
isHeader: r
|
|
3285
3332
|
}) : t)
|
|
3286
3333
|
});
|
|
3287
|
-
}, _e = ({ children: e, size: t = y.Medium, className: n }) => {
|
|
3288
|
-
let { theme:
|
|
3334
|
+
}, _e = ({ children: e, size: t = y.Medium, className: n, ...r }) => {
|
|
3335
|
+
let { theme: i, themeConfig: a } = P(), o = i.geometry.table, s = t, l = o.typographyMappings.header;
|
|
3289
3336
|
return /* @__PURE__ */ c("th", {
|
|
3290
|
-
className: F(
|
|
3337
|
+
className: F(o.headerCell, o[s].headerCellSize, n),
|
|
3291
3338
|
style: {
|
|
3292
|
-
backgroundColor:
|
|
3293
|
-
borderBottom: `${
|
|
3294
|
-
color:
|
|
3339
|
+
backgroundColor: a.table.headerBg,
|
|
3340
|
+
borderBottom: `${o.headerBorder} ${a.borders.header}`,
|
|
3341
|
+
color: a.table.headerText
|
|
3295
3342
|
},
|
|
3343
|
+
...r,
|
|
3296
3344
|
children: /* @__PURE__ */ c(I, {
|
|
3297
|
-
size:
|
|
3345
|
+
size: l,
|
|
3298
3346
|
bold: !0,
|
|
3299
|
-
className: F(
|
|
3347
|
+
className: F(o.headerTypography),
|
|
3300
3348
|
children: e
|
|
3301
3349
|
})
|
|
3302
3350
|
});
|
|
3303
|
-
}, ve = ({ children: e, size: t = y.Medium, className: n }) => {
|
|
3304
|
-
let { theme:
|
|
3351
|
+
}, ve = ({ children: e, size: t = y.Medium, className: n, ...r }) => {
|
|
3352
|
+
let { theme: i, themeConfig: a } = P(), o = i.geometry.table, s = t, l = o.typographyMappings.data;
|
|
3305
3353
|
return /* @__PURE__ */ c("td", {
|
|
3306
|
-
className: F(
|
|
3307
|
-
style: { borderBottom: `${
|
|
3354
|
+
className: F(o[s].dataCellSize, n),
|
|
3355
|
+
style: { borderBottom: `${o.dataBorder} ${a.borders.row}` },
|
|
3356
|
+
...r,
|
|
3308
3357
|
children: /* @__PURE__ */ c(I, {
|
|
3309
|
-
size:
|
|
3310
|
-
className:
|
|
3358
|
+
size: l,
|
|
3359
|
+
className: o.dataTypography,
|
|
3311
3360
|
children: e
|
|
3312
3361
|
})
|
|
3313
3362
|
});
|