reend-components 1.2.0 → 1.2.2
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 +13 -18
- package/dist/bin/cli.cjs +2 -2
- package/dist/lib/index.cjs +2 -2
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.mjs +72 -66
- package/dist/lib/index.mjs.map +1 -1
- package/dist/tailwind/index.cjs +2 -0
- package/package.json +4 -16
package/dist/lib/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import * as F from "@radix-ui/react-toast";
|
|
|
8
8
|
import { cva as O } from "class-variance-authority";
|
|
9
9
|
import { X as dt, Moon as ct, Sun as ut, Crosshair as pt, Terminal as ft, AlertTriangle as mt } from "lucide-react";
|
|
10
10
|
import { Toaster as bt, toast as J } from "sonner";
|
|
11
|
-
import { toast as
|
|
11
|
+
import { toast as Dn } from "sonner";
|
|
12
12
|
import { Slot as xt } from "@radix-ui/react-slot";
|
|
13
13
|
import * as ge from "@radix-ui/react-checkbox";
|
|
14
14
|
import * as Ve from "@radix-ui/react-radio-group";
|
|
@@ -23,13 +23,12 @@ import * as H from "@radix-ui/react-dialog";
|
|
|
23
23
|
import * as gt from "@radix-ui/react-separator";
|
|
24
24
|
import * as xe from "react-dom";
|
|
25
25
|
import { Separator as ht } from "react-resizable-panels";
|
|
26
|
-
import { Panel as
|
|
27
|
-
import "recharts";
|
|
26
|
+
import { Panel as An, Group as Mn, Separator as Ln } from "react-resizable-panels";
|
|
28
27
|
import { AnimatePresence as yt, motion as ue, useInView as vt } from "framer-motion";
|
|
29
28
|
function l(...t) {
|
|
30
29
|
return lt(it(t));
|
|
31
30
|
}
|
|
32
|
-
const
|
|
31
|
+
const bn = q.Provider, xn = q.Root, gn = q.Trigger, Nt = s.forwardRef(({ className: t, sideOffset: r = 4, ...a }, o) => /* @__PURE__ */ e(
|
|
33
32
|
q.Content,
|
|
34
33
|
{
|
|
35
34
|
ref: o,
|
|
@@ -211,7 +210,7 @@ function Dt() {
|
|
|
211
210
|
dismiss: (a) => W({ type: "DISMISS_TOAST", toastId: a })
|
|
212
211
|
};
|
|
213
212
|
}
|
|
214
|
-
function
|
|
213
|
+
function hn() {
|
|
215
214
|
const { toasts: t } = Dt();
|
|
216
215
|
return /* @__PURE__ */ u(wt, { children: [
|
|
217
216
|
t.map(function({ id: r, title: a, description: o, action: n, ...i }) {
|
|
@@ -227,7 +226,7 @@ function yn() {
|
|
|
227
226
|
/* @__PURE__ */ e(Be, {})
|
|
228
227
|
] });
|
|
229
228
|
}
|
|
230
|
-
const
|
|
229
|
+
const yn = ({ theme: t = "dark", ...r }) => /* @__PURE__ */ e(
|
|
231
230
|
bt,
|
|
232
231
|
{
|
|
233
232
|
theme: t,
|
|
@@ -236,7 +235,6 @@ const vn = ({ theme: t = "dark", ...r }) => /* @__PURE__ */ e(
|
|
|
236
235
|
closeButton: !0,
|
|
237
236
|
duration: 4e3,
|
|
238
237
|
visibleToasts: 3,
|
|
239
|
-
pauseWhenPageIsHidden: !0,
|
|
240
238
|
toastOptions: {
|
|
241
239
|
classNames: {
|
|
242
240
|
toast: "group toast group-[.toaster]:bg-surface-2 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg group-[.toaster]:border-l-[3px]",
|
|
@@ -253,7 +251,7 @@ const vn = ({ theme: t = "dark", ...r }) => /* @__PURE__ */ e(
|
|
|
253
251
|
},
|
|
254
252
|
...r
|
|
255
253
|
}
|
|
256
|
-
),
|
|
254
|
+
), vn = {
|
|
257
255
|
info: (t, r) => J(t, { duration: 5e3, ...r }),
|
|
258
256
|
success: (t, r) => J.success(t, { duration: 4e3, ...r }),
|
|
259
257
|
warning: (t, r) => J.warning(t, { duration: 8e3, ...r }),
|
|
@@ -472,37 +470,43 @@ const Ft = s.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
472
470
|
));
|
|
473
471
|
Ft.displayName = "CardFooter";
|
|
474
472
|
const zt = s.forwardRef(
|
|
475
|
-
({ name: t, faction: r, rarity: a = 5, imageSrc: o, imageAlt: n, selected: i, className: c, ...d }, p) =>
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
{
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
/* @__PURE__ */ e("
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
473
|
+
({ name: t, faction: r, rarity: a = 5, imageSrc: o, imageAlt: n, selected: i, className: c, ...d }, p) => {
|
|
474
|
+
const [b, f] = s.useState(!1);
|
|
475
|
+
return /* @__PURE__ */ u(
|
|
476
|
+
"div",
|
|
477
|
+
{
|
|
478
|
+
ref: p,
|
|
479
|
+
className: l(
|
|
480
|
+
"relative bg-surface-1 border border-border transition-all duration-300 w-[120px] sm:w-[140px] shrink-0 cursor-pointer",
|
|
481
|
+
"hover:-translate-y-1 hover:shadow-[0_16px_48px_rgba(0,0,0,0.5)] hover:border-primary/20",
|
|
482
|
+
i && "border-2 border-primary/40 bg-primary/[0.06]",
|
|
483
|
+
c
|
|
484
|
+
),
|
|
485
|
+
...d,
|
|
486
|
+
children: [
|
|
487
|
+
/* @__PURE__ */ e("div", { className: "clip-corner-sm aspect-[3/4] bg-surface-2 overflow-hidden", children: o && !b ? /* @__PURE__ */ e(
|
|
488
|
+
"img",
|
|
489
|
+
{
|
|
490
|
+
src: o,
|
|
491
|
+
alt: n ?? t,
|
|
492
|
+
loading: "lazy",
|
|
493
|
+
decoding: "async",
|
|
494
|
+
onError: () => f(!0),
|
|
495
|
+
className: "w-full h-full object-cover"
|
|
496
|
+
}
|
|
497
|
+
) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-primary/20 text-4xl", children: "◆" }) }) }),
|
|
498
|
+
/* @__PURE__ */ e("div", { className: "px-2 pt-1.5 pb-0", children: /* @__PURE__ */ u("span", { className: "text-[10px] text-primary tracking-wider", children: [
|
|
499
|
+
"◆".repeat(a),
|
|
500
|
+
"◇".repeat(6 - a)
|
|
501
|
+
] }) }),
|
|
502
|
+
/* @__PURE__ */ u("div", { className: "px-2 pb-2", children: [
|
|
503
|
+
/* @__PURE__ */ e("p", { className: "font-display text-[13px] font-semibold uppercase text-foreground leading-tight truncate", children: t }),
|
|
504
|
+
r && /* @__PURE__ */ e("p", { className: "font-mono text-[10px] text-muted-foreground truncate", children: r })
|
|
505
|
+
] })
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
}
|
|
506
510
|
);
|
|
507
511
|
zt.displayName = "OperatorCard";
|
|
508
512
|
const Ht = s.forwardRef(
|
|
@@ -539,7 +543,7 @@ const Ht = s.forwardRef(
|
|
|
539
543
|
);
|
|
540
544
|
Ht.displayName = "LinkCard";
|
|
541
545
|
const Yt = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
542
|
-
function
|
|
546
|
+
function Nn(t, r = !0) {
|
|
543
547
|
me(() => {
|
|
544
548
|
if (!r || !t.current) return;
|
|
545
549
|
const a = t.current, o = () => Array.from(a.querySelectorAll(Yt)), n = (i) => {
|
|
@@ -552,7 +556,7 @@ function wn(t, r = !0) {
|
|
|
552
556
|
return a.addEventListener("keydown", n), () => a.removeEventListener("keydown", n);
|
|
553
557
|
}, [t, r]);
|
|
554
558
|
}
|
|
555
|
-
function
|
|
559
|
+
function wn(t, r, a = {}) {
|
|
556
560
|
me(() => {
|
|
557
561
|
const { meta: o = !1, ctrl: n = !1, shift: i = !1, preventDefault: c = !0 } = a, d = (p) => {
|
|
558
562
|
o && !p.metaKey || n && !(p.ctrlKey || p.metaKey) || i && !p.shiftKey || p.key.toLowerCase() === t.toLowerCase() && (c && p.preventDefault(), r());
|
|
@@ -560,7 +564,7 @@ function kn(t, r, a = {}) {
|
|
|
560
564
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
561
565
|
}, [t, r, a]);
|
|
562
566
|
}
|
|
563
|
-
function
|
|
567
|
+
function kn(t, r = {}) {
|
|
564
568
|
const { threshold: a = 0.1, once: o = !0 } = r, [n, i] = nt(() => typeof window < "u" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1), c = st(n);
|
|
565
569
|
return c.current = n, me(() => {
|
|
566
570
|
if (typeof window > "u" || c.current && o) return;
|
|
@@ -575,7 +579,7 @@ function Tn(t, r = {}) {
|
|
|
575
579
|
return p.observe(d), () => p.disconnect();
|
|
576
580
|
}, [t, a, o]), n;
|
|
577
581
|
}
|
|
578
|
-
function
|
|
582
|
+
function Tn(t, r = 100) {
|
|
579
583
|
return Array.from({ length: t }, (a, o) => `${o * r}ms`);
|
|
580
584
|
}
|
|
581
585
|
const Ut = O(
|
|
@@ -3572,7 +3576,7 @@ const Sa = ({ direction: t = "horizontal", className: r, ...a }) => /* @__PURE__
|
|
|
3572
3576
|
}
|
|
3573
3577
|
);
|
|
3574
3578
|
Sa.displayName = "ResizeHandle";
|
|
3575
|
-
const
|
|
3579
|
+
const Sn = [
|
|
3576
3580
|
"var(--chart-1)",
|
|
3577
3581
|
"var(--chart-2)",
|
|
3578
3582
|
"var(--chart-3)",
|
|
@@ -3581,7 +3585,7 @@ const Rn = [
|
|
|
3581
3585
|
"var(--chart-6)",
|
|
3582
3586
|
"var(--chart-7)",
|
|
3583
3587
|
"var(--chart-8)"
|
|
3584
|
-
],
|
|
3588
|
+
], Rn = {
|
|
3585
3589
|
backgroundColor: "transparent",
|
|
3586
3590
|
style: { fontFamily: "JetBrains Mono, monospace", fontSize: 11 },
|
|
3587
3591
|
tick: { fill: "hsl(var(--muted-foreground))" },
|
|
@@ -4489,7 +4493,7 @@ const ao = s.forwardRef(
|
|
|
4489
4493
|
ao.displayName = "SwipeableItem";
|
|
4490
4494
|
const oo = s.forwardRef(
|
|
4491
4495
|
({ text: t, resetDelay: r = 2e3, onCopy: a, className: o, ...n }, i) => {
|
|
4492
|
-
const [c, d] = s.useState(!1), p = s.useRef();
|
|
4496
|
+
const [c, d] = s.useState(!1), p = s.useRef(void 0);
|
|
4493
4497
|
return s.useEffect(() => () => clearTimeout(p.current), []), /* @__PURE__ */ e(
|
|
4494
4498
|
"button",
|
|
4495
4499
|
{
|
|
@@ -4635,7 +4639,7 @@ const io = s.forwardRef(
|
|
|
4635
4639
|
)
|
|
4636
4640
|
);
|
|
4637
4641
|
io.displayName = "CookieConsent";
|
|
4638
|
-
function
|
|
4642
|
+
function En() {
|
|
4639
4643
|
const [t, r] = s.useState(!1);
|
|
4640
4644
|
return s.useEffect(() => {
|
|
4641
4645
|
const a = (o) => {
|
|
@@ -4967,7 +4971,7 @@ const mo = s.forwardRef(
|
|
|
4967
4971
|
mo.displayName = "SpoilerInline";
|
|
4968
4972
|
const bo = s.forwardRef(
|
|
4969
4973
|
({ storageKey: t = "ef-theme", className: r, ...a }, o) => {
|
|
4970
|
-
const [n, i] = s.useState(!1), [c, d] = s.useState(!1), p = s.useRef();
|
|
4974
|
+
const [n, i] = s.useState(!1), [c, d] = s.useState(!1), p = s.useRef(void 0);
|
|
4971
4975
|
return s.useEffect(() => {
|
|
4972
4976
|
const f = localStorage.getItem(t);
|
|
4973
4977
|
f === "light" ? (i(!0), document.documentElement.classList.add("light")) : f === "dark" ? (i(!1), document.documentElement.classList.remove("light")) : i(document.documentElement.classList.contains("light"));
|
|
@@ -5994,6 +5998,7 @@ function Ae({
|
|
|
5994
5998
|
initials: a,
|
|
5995
5999
|
sizeClass: o
|
|
5996
6000
|
}) {
|
|
6001
|
+
const [n, i] = s.useState(!1);
|
|
5997
6002
|
return /* @__PURE__ */ e(
|
|
5998
6003
|
"div",
|
|
5999
6004
|
{
|
|
@@ -6005,13 +6010,14 @@ function Ae({
|
|
|
6005
6010
|
style: {
|
|
6006
6011
|
clipPath: "polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%)"
|
|
6007
6012
|
},
|
|
6008
|
-
children: t ? /* @__PURE__ */ e(
|
|
6013
|
+
children: t && !n ? /* @__PURE__ */ e(
|
|
6009
6014
|
"img",
|
|
6010
6015
|
{
|
|
6011
6016
|
src: t,
|
|
6012
6017
|
alt: r,
|
|
6013
6018
|
loading: "lazy",
|
|
6014
6019
|
decoding: "async",
|
|
6020
|
+
onError: () => i(!0),
|
|
6015
6021
|
className: "w-full h-full object-cover"
|
|
6016
6022
|
}
|
|
6017
6023
|
) : /* @__PURE__ */ e("span", { children: a ?? r.slice(0, 2) })
|
|
@@ -6675,7 +6681,7 @@ export {
|
|
|
6675
6681
|
wa as BottomSheet,
|
|
6676
6682
|
ea as Breadcrumb,
|
|
6677
6683
|
pe as Button,
|
|
6678
|
-
|
|
6684
|
+
Sn as CHART_COLORS,
|
|
6679
6685
|
Ot as Card,
|
|
6680
6686
|
jt as CardBody,
|
|
6681
6687
|
Bt as CardDescription,
|
|
@@ -6737,9 +6743,9 @@ export {
|
|
|
6737
6743
|
sa as OTPInput,
|
|
6738
6744
|
zt as OperatorCard,
|
|
6739
6745
|
Qr as Pagination,
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6746
|
+
An as Panel,
|
|
6747
|
+
Mn as PanelGroup,
|
|
6748
|
+
Ln as PanelResizeHandle,
|
|
6743
6749
|
Er as Popover,
|
|
6744
6750
|
_r as PopoverAnchor,
|
|
6745
6751
|
Dr as PopoverContent,
|
|
@@ -6772,7 +6778,7 @@ export {
|
|
|
6772
6778
|
Y as SkeletonLine,
|
|
6773
6779
|
zr as SkeletonTableRow,
|
|
6774
6780
|
Qe as SkeletonText,
|
|
6775
|
-
|
|
6781
|
+
yn as SonnerToaster,
|
|
6776
6782
|
eo as SortControl,
|
|
6777
6783
|
fo as SpoilerBlock,
|
|
6778
6784
|
mo as SpoilerInline,
|
|
@@ -6809,11 +6815,11 @@ export {
|
|
|
6809
6815
|
wt as ToastProvider,
|
|
6810
6816
|
ze as ToastTitle,
|
|
6811
6817
|
Be as ToastViewport,
|
|
6812
|
-
|
|
6813
|
-
|
|
6818
|
+
hn as Toaster,
|
|
6819
|
+
xn as Tooltip,
|
|
6814
6820
|
Nt as TooltipContent,
|
|
6815
|
-
|
|
6816
|
-
|
|
6821
|
+
bn as TooltipProvider,
|
|
6822
|
+
gn as TooltipTrigger,
|
|
6817
6823
|
Kr as TopBanner,
|
|
6818
6824
|
aa as ViewToggle,
|
|
6819
6825
|
Ao as WarningBanner,
|
|
@@ -6825,11 +6831,11 @@ export {
|
|
|
6825
6831
|
l as cn,
|
|
6826
6832
|
Mr as dialogContentVariants,
|
|
6827
6833
|
Hr as emptyStateVariants,
|
|
6828
|
-
|
|
6834
|
+
Rn as endfieldChartTheme,
|
|
6829
6835
|
rn as frequencyBarsVariants,
|
|
6830
6836
|
Ut as inputWrapperVariants,
|
|
6831
6837
|
Po as missionCardVariants,
|
|
6832
|
-
|
|
6838
|
+
vn as notify,
|
|
6833
6839
|
ta as numberInputVariants,
|
|
6834
6840
|
Ce as operatorCardVariants,
|
|
6835
6841
|
ne as paginationItemVariants,
|
|
@@ -6844,13 +6850,13 @@ export {
|
|
|
6844
6850
|
_o as tacticalBadgeVariants,
|
|
6845
6851
|
qt as textareaVariants,
|
|
6846
6852
|
qr as timelineItemVariants,
|
|
6847
|
-
|
|
6853
|
+
Dn as toast,
|
|
6848
6854
|
_t as toastAction,
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6855
|
+
En as useCommandPalette,
|
|
6856
|
+
Nn as useFocusTrap,
|
|
6857
|
+
kn as useInView,
|
|
6858
|
+
wn as useShortcut,
|
|
6859
|
+
Tn as useStagger,
|
|
6854
6860
|
Dt as useToast
|
|
6855
6861
|
};
|
|
6856
6862
|
//# sourceMappingURL=index.mjs.map
|