@nexub/react 1.5.1 → 1.6.0
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/{chunk-XR4NBY54.js → chunk-2DYKENBM.js} +10 -10
- package/dist/{chunk-SVQCINRE.js → chunk-2I7FIU6R.js} +5 -2
- package/dist/{chunk-FHFVBOF3.js → chunk-2Y4WLNEZ.js} +3 -3
- package/dist/{chunk-CWS37T3K.js → chunk-3E7X3YK3.js} +4 -2
- package/dist/{chunk-GRB6T2TT.js → chunk-3FPJIXG7.js} +19 -13
- package/dist/chunk-3MT23LNM.js +171 -0
- package/dist/chunk-3QD76BKT.js +80 -0
- package/dist/{chunk-B54WADL4.js → chunk-4P2JJ2FH.js} +12 -12
- package/dist/chunk-52ZVJPF7.js +1 -0
- package/dist/chunk-5KI4YHA3.js +144 -0
- package/dist/chunk-5QEARXY3.js +55 -0
- package/dist/chunk-5VW6RUKZ.js +134 -0
- package/dist/{chunk-CNNJFWFA.js → chunk-6BGUZQAX.js} +4 -4
- package/dist/{chunk-LDYD7WL3.js → chunk-6ECOCGZG.js} +4 -3
- package/dist/{chunk-3AXIMXDU.js → chunk-6JBQAJJD.js} +6 -12
- package/dist/{chunk-YRDCY6BI.js → chunk-6UKNUI46.js} +0 -19
- package/dist/chunk-743Y5MY3.js +95 -0
- package/dist/{chunk-BFRX6X4O.js → chunk-74RUJ5KZ.js} +23 -17
- package/dist/chunk-77LYWSJW.js +85 -0
- package/dist/{chunk-YPHNHQYQ.js → chunk-7B4VF2ZU.js} +6 -2
- package/dist/{chunk-NCRFKPA4.js → chunk-7MSIOYJZ.js} +6 -8
- package/dist/{chunk-AHT35UWY.js → chunk-7Q4T7CB6.js} +10 -6
- package/dist/{chunk-GIGOTRXX.js → chunk-7VJABRKB.js} +3 -10
- package/dist/{chunk-6QLLH6ID.js → chunk-7XWJCFWI.js} +8 -17
- package/dist/chunk-A3O23F2B.js +1 -0
- package/dist/chunk-AT2DSFP3.js +47 -0
- package/dist/{chunk-XI63BK3S.js → chunk-BNFGVFZ3.js} +5 -5
- package/dist/{chunk-GHCV6UXG.js → chunk-BTYDDKRQ.js} +5 -5
- package/dist/chunk-C6JRJ6JW.js +167 -0
- package/dist/chunk-CAOLGXA5.js +1 -0
- package/dist/{chunk-IIPYF6ZQ.js → chunk-CBDJRPMD.js} +16 -13
- package/dist/{chunk-OJ2TLWYD.js → chunk-CKFRMCZ7.js} +5 -3
- package/dist/{chunk-LZB3KTSH.js → chunk-CQWYZPPJ.js} +1 -1
- package/dist/{chunk-6RBNM5RO.js → chunk-CUOASXI7.js} +10 -10
- package/dist/{chunk-HG6HTUWU.js → chunk-CV5ZKED7.js} +2 -2
- package/dist/{chunk-HJERFB7J.js → chunk-DDRYT3SY.js} +2 -2
- package/dist/chunk-DGCAM2UJ.js +60 -0
- package/dist/{chunk-RLE5RN3T.js → chunk-DGQJRTO6.js} +15 -11
- package/dist/{chunk-FD7YU53N.js → chunk-DT3QGFXB.js} +4 -4
- package/dist/chunk-F73DTG2V.js +123 -0
- package/dist/{chunk-V3TETH4J.js → chunk-FIDUY6SS.js} +17 -16
- package/dist/{chunk-Z3IG5WRA.js → chunk-FJUVYRNT.js} +3 -3
- package/dist/{chunk-KQPLFVFR.js → chunk-FLZD7HQY.js} +0 -2
- package/dist/{chunk-64JDZWCV.js → chunk-GRKCUQG4.js} +6 -5
- package/dist/{chunk-EZ23IA3H.js → chunk-GSG2W6DP.js} +3 -3
- package/dist/{chunk-4I5ULCYG.js → chunk-HFTS5AN7.js} +3 -3
- package/dist/{chunk-S46W2QER.js → chunk-HSPGJSFJ.js} +17 -11
- package/dist/{chunk-NQVRF4RB.js → chunk-HXV5UA7K.js} +16 -13
- package/dist/{chunk-GUB7YKG2.js → chunk-I4U36P54.js} +6 -3
- package/dist/{chunk-BTRTORKU.js → chunk-I6CAF7C5.js} +6 -7
- package/dist/chunk-IGLOYOCH.js +134 -0
- package/dist/{chunk-IK23Q2OF.js → chunk-JHVYI5GK.js} +3 -3
- package/dist/chunk-K5FKEAAK.js +94 -0
- package/dist/{chunk-5URGARPH.js → chunk-KE4YVG5Q.js} +6 -10
- package/dist/{chunk-A4IMFAZX.js → chunk-LESI7J7B.js} +3 -3
- package/dist/chunk-MEUJBGY5.js +88 -0
- package/dist/chunk-MNEXMMLM.js +23 -0
- package/dist/{chunk-PVTACENM.js → chunk-MTK3GHDQ.js} +2 -2
- package/dist/chunk-NA5UMOE5.js +55 -0
- package/dist/{chunk-YJ3JQYAN.js → chunk-NGQKBDHA.js} +5 -13
- package/dist/{chunk-7Q7ZF6BY.js → chunk-NNIFOMIH.js} +18 -8
- package/dist/{chunk-7L3CGIRA.js → chunk-NQPGELMP.js} +8 -19
- package/dist/chunk-NSVXGOR3.js +54 -0
- package/dist/{chunk-6J3QTWKC.js → chunk-NZT4TTNV.js} +18 -9
- package/dist/{chunk-TJCHA3OI.js → chunk-O626NJEM.js} +7 -4
- package/dist/chunk-O74XEHLA.js +331 -0
- package/dist/{chunk-JSD3H7WV.js → chunk-OYCK6BRG.js} +6 -6
- package/dist/{chunk-2555JXCP.js → chunk-PBPUSRTJ.js} +19 -11
- package/dist/{chunk-QD7H3WV3.js → chunk-PGDXFBKT.js} +8 -8
- package/dist/{chunk-PQ6GU7SG.js → chunk-PMWYLYM3.js} +20 -14
- package/dist/{chunk-I4BHRVRL.js → chunk-PPCGUIAB.js} +9 -5
- package/dist/{chunk-NIX4SEKM.js → chunk-PREMZMLU.js} +7 -4
- package/dist/{chunk-4SSUM4CL.js → chunk-Q3ESHXKU.js} +9 -6
- package/dist/{chunk-KM6Z3VTI.js → chunk-QVTVDL6Y.js} +1 -1
- package/dist/{chunk-AXOKFS4K.js → chunk-RSU2UHN4.js} +20 -4
- package/dist/{chunk-DJZZ3FIP.js → chunk-RUR57JZQ.js} +5 -14
- package/dist/{chunk-ZV3AF5CL.js → chunk-S2CTBFLN.js} +13 -2
- package/dist/{chunk-WESZPFBZ.js → chunk-S7GH2BJP.js} +7 -4
- package/dist/chunk-SAUA52EJ.js +131 -0
- package/dist/{chunk-72I7EVOL.js → chunk-SYZADSLI.js} +10 -6
- package/dist/{chunk-TEOLG3N2.js → chunk-SZ2WPWXJ.js} +10 -6
- package/dist/{chunk-W2NEXOTG.js → chunk-T7RLPFGX.js} +2 -2
- package/dist/{chunk-J6TU45KP.js → chunk-TRA6A5C5.js} +26 -12
- package/dist/{chunk-H2W7IYVY.js → chunk-UTJJ5HFX.js} +18 -12
- package/dist/{chunk-5O34ZNC3.js → chunk-VAFBGFKY.js} +19 -13
- package/dist/{chunk-OJRSPDNJ.js → chunk-VD4RFTNV.js} +8 -14
- package/dist/chunk-VLQGQFW7.js +110 -0
- package/dist/{chunk-RTDUTWJ4.js → chunk-VMT7Y3AT.js} +5 -8
- package/dist/{chunk-LGQ737BP.js → chunk-WHTLXQB6.js} +1 -1
- package/dist/chunk-WLRRMT6W.js +1 -0
- package/dist/{chunk-2FCSWBSM.js → chunk-WMWX6DPB.js} +3 -3
- package/dist/{chunk-UMC64NCT.js → chunk-WVBGQCYC.js} +6 -3
- package/dist/{chunk-QCNLE27O.js → chunk-WXRQ42DR.js} +11 -7
- package/dist/{chunk-SY6V3HAK.js → chunk-XDU27NRX.js} +3 -3
- package/dist/{chunk-KA2J5OBA.js → chunk-XQDD76EF.js} +4 -7
- package/dist/chunk-XTATJMY6.js +64 -0
- package/dist/chunk-XYXMPHND.js +1 -0
- package/dist/{chunk-7ZWBHHRK.js → chunk-YNU6VRD5.js} +23 -32
- package/dist/{chunk-6SJPVQQW.js → chunk-Z3HF6XJ3.js} +1 -1
- package/dist/{chunk-I4URNMI7.js → chunk-ZC4MZAEX.js} +9 -7
- package/dist/{chunk-PWBPHGM3.js → chunk-ZCEUVK2R.js} +2 -2
- package/dist/chunk-ZT3NWE5U.js +1 -0
- package/dist/{chunk-RHOYF7MO.js → chunk-ZTLALVWA.js} +6 -15
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/Amount/index.js +3 -1
- package/dist/components/AspectRatio/index.js +1 -1
- package/dist/components/Autocomplete/index.js +3 -2
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/AvatarGroup/index.js +3 -2
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/index.js +2 -1
- package/dist/components/Breadcrumb/index.js +2 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Card/index.js +3 -1
- package/dist/components/CheckList/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxCard/index.js +9 -0
- package/dist/components/Chip/index.js +2 -1
- package/dist/components/Citation/index.js +17 -0
- package/dist/components/Code/index.js +1 -1
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/CommandPalette/index.js +3 -2
- package/dist/components/ContextMenu/index.js +2 -2
- package/dist/components/CountryBadge/index.js +1 -1
- package/dist/components/DataTable/index.js +2 -1
- package/dist/components/DatePicker/index.js +5 -1
- package/dist/components/DateRangePicker/index.js +5 -1
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/DropdownMenu/index.js +2 -2
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/index.js +2 -1
- package/dist/components/EyebrowChip/index.js +4 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterChip/index.js +3 -1
- package/dist/components/Flex/index.js +2 -1
- package/dist/components/FormError/index.js +1 -1
- package/dist/components/FormField/index.js +7 -4
- package/dist/components/GradientDivider/index.js +1 -1
- package/dist/components/Grid/index.js +2 -1
- package/dist/components/Heading/index.js +4 -1
- package/dist/components/HelperText/index.js +4 -1
- package/dist/components/HoverCard/index.js +3 -2
- package/dist/components/IconButton/index.js +2 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Kbd/index.js +1 -1
- package/dist/components/KeyboardShortcut/index.js +2 -2
- package/dist/components/Label/index.js +4 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/MediaCard/index.js +9 -0
- package/dist/components/Menubar/index.js +2 -2
- package/dist/components/MessageBubble/index.js +18 -0
- package/dist/components/MoneyInput/index.js +3 -2
- package/dist/components/NavigationMenu/index.js +2 -2
- package/dist/components/NavigationRail/index.js +2 -1
- package/dist/components/NexubProvider/index.js +14 -0
- package/dist/components/NumberInput/index.js +3 -2
- package/dist/components/NumberTicker/index.js +10 -0
- package/dist/components/PageHeader/index.js +1 -1
- package/dist/components/Pagination/index.js +3 -1
- package/dist/components/PasswordInput/index.js +3 -2
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/index.js +2 -1
- package/dist/components/PromptInput/index.js +15 -0
- package/dist/components/RadioCard/index.js +11 -0
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/Rating/index.js +2 -1
- package/dist/components/ScrollArea/index.js +1 -1
- package/dist/components/SearchInput/index.js +3 -2
- package/dist/components/Section/index.js +1 -1
- package/dist/components/SegmentedControl/index.js +3 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Separator/index.js +1 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Spinner/index.js +2 -1
- package/dist/components/SplitButton/index.js +5 -5
- package/dist/components/Stack/index.js +2 -1
- package/dist/components/StatusPill/index.js +1 -1
- package/dist/components/StreamingText/index.js +8 -0
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/index.js +3 -2
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/ThinkingIndicator/index.js +9 -0
- package/dist/components/Toast/index.js +3 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/TopNav/index.js +2 -1
- package/dist/index.d.ts +407 -22
- package/dist/index.js +235 -156
- package/package.json +52 -50
- package/dist/chunk-63DPMUMR.js +0 -67
- package/dist/chunk-CHGPGRML.js +0 -115
- package/dist/chunk-J2T4GFFS.js +0 -85
- package/dist/chunk-LH3BSAIS.js +0 -119
- package/dist/chunk-LMPGHWUA.js +0 -114
- package/dist/chunk-NMH5WSZG.js +0 -72
- package/dist/chunk-P44EROBX.js +0 -55
- package/dist/chunk-TYTW4F3B.js +0 -178
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
enterExit,
|
|
4
3
|
floatingSurface,
|
|
5
4
|
menuContent,
|
|
6
5
|
menuItem,
|
|
7
6
|
menuLabel,
|
|
8
7
|
menuSeparator
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FLZD7HQY.js";
|
|
10
9
|
import {
|
|
11
10
|
cn
|
|
12
11
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -32,10 +31,7 @@ var Content2 = React.forwardRef(
|
|
|
32
31
|
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
33
32
|
floatingSurface,
|
|
34
33
|
menuContent,
|
|
35
|
-
|
|
36
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
37
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
38
|
-
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
34
|
+
"nx-motion nx-pop origin-[var(--radix-context-menu-content-transform-origin)]",
|
|
39
35
|
className
|
|
40
36
|
),
|
|
41
37
|
...props
|
|
@@ -94,11 +90,11 @@ var CheckboxItem2 = React.forwardRef(function ContextMenuCheckboxItem({ classNam
|
|
|
94
90
|
RadixContextMenu.CheckboxItem,
|
|
95
91
|
{
|
|
96
92
|
ref,
|
|
97
|
-
className: cn(itemBaseClasses, "
|
|
93
|
+
className: cn(itemBaseClasses, "ps-8", className),
|
|
98
94
|
checked,
|
|
99
95
|
...props,
|
|
100
96
|
children: [
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "absolute
|
|
97
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixContextMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
102
98
|
children
|
|
103
99
|
]
|
|
104
100
|
}
|
|
@@ -110,10 +106,10 @@ var RadioItem2 = React.forwardRef(function ContextMenuRadioItem({ className, chi
|
|
|
110
106
|
RadixContextMenu.RadioItem,
|
|
111
107
|
{
|
|
112
108
|
ref,
|
|
113
|
-
className: cn(itemBaseClasses, "
|
|
109
|
+
className: cn(itemBaseClasses, "ps-8", className),
|
|
114
110
|
...props,
|
|
115
111
|
children: [
|
|
116
|
-
/* @__PURE__ */ jsx("span", { className: "absolute
|
|
112
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixContextMenu.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", { className: "h-2 w-2 fill-current", viewBox: "0 0 8 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("circle", { cx: "4", cy: "4", r: "4" }) }) }) }),
|
|
117
113
|
children
|
|
118
114
|
]
|
|
119
115
|
}
|
|
@@ -133,7 +129,7 @@ var SubTrigger2 = React.forwardRef(function ContextMenuSubTrigger({ className, c
|
|
|
133
129
|
...props,
|
|
134
130
|
children: [
|
|
135
131
|
children,
|
|
136
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
132
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ms-auto h-4 w-4 rtl:-scale-x-100" })
|
|
137
133
|
]
|
|
138
134
|
}
|
|
139
135
|
);
|
|
@@ -148,12 +144,7 @@ var SubContent2 = React.forwardRef(function ContextMenuSubContent({ className, .
|
|
|
148
144
|
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
149
145
|
floatingSurface,
|
|
150
146
|
menuContent,
|
|
151
|
-
|
|
152
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
153
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
154
|
-
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
155
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
156
|
-
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
147
|
+
"nx-motion nx-pop origin-[var(--radix-context-menu-content-transform-origin)]",
|
|
157
148
|
className
|
|
158
149
|
),
|
|
159
150
|
...props
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
SelectableCardContent,
|
|
4
|
+
selectableCardClass,
|
|
5
|
+
useCardIds
|
|
6
|
+
} from "./chunk-K5FKEAAK.js";
|
|
7
|
+
import {
|
|
8
|
+
cn
|
|
9
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
10
|
+
|
|
11
|
+
// src/components/CheckboxCard/CheckboxCard.tsx
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var CheckboxCard = React.forwardRef(
|
|
16
|
+
({ className, icon, title, description, children, onCheckedChange, ...props }, ref) => {
|
|
17
|
+
const ids = useCardIds(description != null);
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
RadixCheckbox.Root,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
"aria-labelledby": ids.titleId,
|
|
23
|
+
"aria-describedby": ids.describedBy,
|
|
24
|
+
className: cn(selectableCardClass, className),
|
|
25
|
+
onCheckedChange: onCheckedChange ? (c) => onCheckedChange(c === true) : void 0,
|
|
26
|
+
...props,
|
|
27
|
+
children: /* @__PURE__ */ jsx(
|
|
28
|
+
SelectableCardContent,
|
|
29
|
+
{
|
|
30
|
+
icon,
|
|
31
|
+
title,
|
|
32
|
+
description,
|
|
33
|
+
titleId: ids.titleId,
|
|
34
|
+
descriptionId: ids.descriptionId,
|
|
35
|
+
shape: "square",
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
CheckboxCard.displayName = "CheckboxCard";
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
CheckboxCard
|
|
47
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
HelperText
|
|
4
|
+
} from "./chunk-WVBGQCYC.js";
|
|
2
5
|
import {
|
|
3
6
|
Label
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PREMZMLU.js";
|
|
5
8
|
import {
|
|
6
9
|
FormError
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
HelperText
|
|
10
|
-
} from "./chunk-UMC64NCT.js";
|
|
10
|
+
} from "./chunk-QVTVDL6Y.js";
|
|
11
11
|
import {
|
|
12
12
|
cn
|
|
13
13
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -34,21 +34,21 @@ var thumbVariants = cva(
|
|
|
34
34
|
[
|
|
35
35
|
"pointer-events-none block rounded-full shadow-elevation-1",
|
|
36
36
|
"transition-[transform,background-color] duration-expressive-fast ease-expressive-fast",
|
|
37
|
-
"translate-x-0.5 data-[state=unchecked]:bg-[var(--color-outline)] data-[state=checked]:bg-[var(--color-on-primary)] data-[disabled]:data-[state=unchecked]:bg-[var(--color-outline-variant)]"
|
|
37
|
+
"translate-x-0.5 rtl:-translate-x-0.5 data-[state=unchecked]:bg-[var(--color-outline)] data-[state=checked]:bg-[var(--color-on-primary)] data-[disabled]:data-[state=unchecked]:bg-[var(--color-outline-variant)]"
|
|
38
38
|
],
|
|
39
39
|
{
|
|
40
40
|
variants: {
|
|
41
41
|
size: {
|
|
42
|
-
sm: "h-3 w-3 data-[state=checked]:translate-x-[18px]",
|
|
43
|
-
md: "h-5 w-5 data-[state=checked]:translate-x-[22px]",
|
|
44
|
-
lg: "h-6 w-6 data-[state=checked]:translate-x-[26px]"
|
|
42
|
+
sm: "h-3 w-3 data-[state=checked]:translate-x-[18px] rtl:data-[state=checked]:-translate-x-[18px]",
|
|
43
|
+
md: "h-5 w-5 data-[state=checked]:translate-x-[22px] rtl:data-[state=checked]:-translate-x-[22px]",
|
|
44
|
+
lg: "h-6 w-6 data-[state=checked]:translate-x-[26px] rtl:data-[state=checked]:-translate-x-[26px]"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
defaultVariants: { size: "md" }
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
var Switch = React.forwardRef(
|
|
51
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(RadixSwitch.Root, { ref, className: cn(switchVariants({ size }), className), ...props, children: /* @__PURE__ */ jsx(RadixSwitch.Thumb, { className: cn(thumbVariants({ size })) }) })
|
|
51
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(RadixSwitch.Root, { ref, className: cn(switchVariants({ size }), "nx-hit", className), ...props, children: /* @__PURE__ */ jsx(RadixSwitch.Thumb, { className: cn(thumbVariants({ size })) }) })
|
|
52
52
|
);
|
|
53
53
|
Switch.displayName = "Switch";
|
|
54
54
|
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
disabledContainer,
|
|
4
|
+
disabledText,
|
|
5
|
+
pressable
|
|
6
|
+
} from "./chunk-7SXR4PGO.js";
|
|
7
|
+
import {
|
|
8
|
+
glassSurfaceClass
|
|
9
|
+
} from "./chunk-DEIBF3P7.js";
|
|
10
|
+
import {
|
|
11
|
+
cn
|
|
12
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
13
|
+
|
|
14
|
+
// src/components/Button/Button.tsx
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
17
|
+
import { Loader2 } from "@nexub/icons";
|
|
18
|
+
import { cva } from "class-variance-authority";
|
|
19
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var toneTextClasses = {
|
|
21
|
+
neutral: "text-[var(--color-on-surface-variant)]",
|
|
22
|
+
info: "text-[var(--color-info)]",
|
|
23
|
+
success: "text-[var(--color-success)]",
|
|
24
|
+
warning: "text-[var(--color-warning)]",
|
|
25
|
+
danger: "text-[var(--color-error)]",
|
|
26
|
+
leap: "text-[var(--color-leap)]",
|
|
27
|
+
bookub: "text-[var(--color-bookub)]",
|
|
28
|
+
payub: "text-[var(--color-payub)]",
|
|
29
|
+
founderub: "text-[var(--color-founderub)]"
|
|
30
|
+
};
|
|
31
|
+
var toneClasses = {
|
|
32
|
+
neutral: "bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)]",
|
|
33
|
+
info: "bg-[var(--color-info)] text-[var(--color-on-info)]",
|
|
34
|
+
success: "bg-[var(--color-success)] text-[var(--color-on-success)]",
|
|
35
|
+
warning: "bg-[var(--color-warning)] text-[var(--color-on-warning)]",
|
|
36
|
+
danger: "bg-[var(--color-error)] text-[var(--color-on-error)]",
|
|
37
|
+
leap: "bg-[var(--color-leap)] text-[var(--color-on-leap)]",
|
|
38
|
+
bookub: "bg-[var(--color-bookub)] text-[var(--color-on-bookub)]",
|
|
39
|
+
payub: "bg-[var(--color-payub)] text-[var(--color-on-payub)]",
|
|
40
|
+
founderub: "bg-[var(--color-founderub)] text-[var(--color-on-founderub)]"
|
|
41
|
+
};
|
|
42
|
+
var filled = `bg-[var(--color-primary)] text-[var(--color-on-primary)] ${disabledContainer}`;
|
|
43
|
+
var tonal = `bg-[var(--color-secondary-container)] text-[var(--color-on-secondary-container)] ${disabledContainer}`;
|
|
44
|
+
var outlined = `bg-transparent border border-[var(--color-outline-variant)] text-[var(--color-on-surface)] ${disabledContainer}`;
|
|
45
|
+
var text = `bg-transparent text-[var(--color-on-surface)] ${disabledText}`;
|
|
46
|
+
var buttonVariants = cva(
|
|
47
|
+
[pressable, "nx-hit relative inline-flex items-center justify-center gap-2 whitespace-nowrap"],
|
|
48
|
+
{
|
|
49
|
+
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
filled,
|
|
52
|
+
tonal,
|
|
53
|
+
outlined,
|
|
54
|
+
text,
|
|
55
|
+
// Thin glass: for buttons floating over content/media (toolbars, media controls).
|
|
56
|
+
glass: `border ${glassSurfaceClass} text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
57
|
+
// Legacy names (kept as aliases).
|
|
58
|
+
primary: filled,
|
|
59
|
+
secondary: tonal,
|
|
60
|
+
subtle: `bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
61
|
+
outline: outlined,
|
|
62
|
+
ghost: text,
|
|
63
|
+
destructive: `bg-[var(--color-error)] text-[var(--color-on-error)] ${disabledContainer}`,
|
|
64
|
+
accent: `bg-[var(--color-tertiary)] text-[var(--color-on-tertiary)] ${disabledContainer}`,
|
|
65
|
+
link: `bg-transparent text-[var(--color-primary)] underline underline-offset-[0.3em] ${disabledText}`
|
|
66
|
+
},
|
|
67
|
+
// The control ladder (density-aware: data-density="compact" shrinks it).
|
|
68
|
+
size: {
|
|
69
|
+
xs: "h-control-xs px-2.5 text-label-sm",
|
|
70
|
+
sm: "h-control-sm px-3.5 text-label-md",
|
|
71
|
+
md: "h-control-md px-5 text-label-lg",
|
|
72
|
+
lg: "h-control-lg px-6 text-title-md",
|
|
73
|
+
xl: "h-control-xl px-7 text-title-md"
|
|
74
|
+
},
|
|
75
|
+
fullWidth: {
|
|
76
|
+
true: "w-full"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
variant: "primary",
|
|
81
|
+
size: "md"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
var CheckIcon = () => /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { className: "nx-check-draw", pathLength: 1, d: "M20 6 9 17l-5-5" }) });
|
|
86
|
+
var Button = React.forwardRef(
|
|
87
|
+
({
|
|
88
|
+
className,
|
|
89
|
+
variant,
|
|
90
|
+
size,
|
|
91
|
+
tone,
|
|
92
|
+
status: statusProp,
|
|
93
|
+
loading,
|
|
94
|
+
loadingLabel = "Loading",
|
|
95
|
+
successLabel,
|
|
96
|
+
errorLabel = "Something went wrong",
|
|
97
|
+
fullWidth,
|
|
98
|
+
leadingIcon,
|
|
99
|
+
trailingIcon,
|
|
100
|
+
asChild = false,
|
|
101
|
+
disabled,
|
|
102
|
+
onClick,
|
|
103
|
+
children,
|
|
104
|
+
...props
|
|
105
|
+
}, ref) => {
|
|
106
|
+
const status = statusProp ?? (loading ? "loading" : "idle");
|
|
107
|
+
const sharedProps = {
|
|
108
|
+
className: cn(
|
|
109
|
+
buttonVariants({ variant, size, fullWidth }),
|
|
110
|
+
tone ? toneClasses[tone] : "",
|
|
111
|
+
!asChild && status === "error" && "nx-shake",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
"data-tone": tone,
|
|
115
|
+
...variant === "glass" && { "data-material": "glass", "data-glass-thickness": "thin" },
|
|
116
|
+
...props
|
|
117
|
+
};
|
|
118
|
+
if (asChild) {
|
|
119
|
+
return /* @__PURE__ */ jsx(Slot, { ref, onClick, ...sharedProps, children });
|
|
120
|
+
}
|
|
121
|
+
const busy = status === "loading";
|
|
122
|
+
const swapLabel = status === "success" && successLabel !== void 0;
|
|
123
|
+
const overlay = busy ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : status === "success" && !swapLabel ? /* @__PURE__ */ jsx(CheckIcon, {}) : null;
|
|
124
|
+
const announcement = status === "loading" ? loadingLabel : status === "success" ? successLabel ?? "Done" : status === "error" ? errorLabel : "";
|
|
125
|
+
const button = /* @__PURE__ */ jsxs(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
ref,
|
|
129
|
+
disabled,
|
|
130
|
+
"aria-busy": busy || void 0,
|
|
131
|
+
"aria-disabled": busy || props["aria-disabled"] || void 0,
|
|
132
|
+
onClick: (e) => {
|
|
133
|
+
if (busy) {
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
onClick?.(e);
|
|
138
|
+
},
|
|
139
|
+
"data-status": status === "idle" ? void 0 : status,
|
|
140
|
+
...sharedProps,
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsx("span", { className: cn("contents", overlay && "text-transparent [&_img]:invisible [&_svg]:invisible"), children: swapLabel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
143
|
+
/* @__PURE__ */ jsx(CheckIcon, {}),
|
|
144
|
+
successLabel
|
|
145
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
+
leadingIcon,
|
|
147
|
+
children,
|
|
148
|
+
trailingIcon
|
|
149
|
+
] }) }),
|
|
150
|
+
overlay && /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center", "aria-hidden": "true", children: overlay })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
if (statusProp === void 0 && loading === void 0) return button;
|
|
155
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
156
|
+
button,
|
|
157
|
+
/* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: announcement })
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
Button.displayName = "Button";
|
|
162
|
+
|
|
163
|
+
export {
|
|
164
|
+
toneTextClasses,
|
|
165
|
+
buttonVariants,
|
|
166
|
+
Button
|
|
167
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useNexubMessages
|
|
4
|
+
} from "./chunk-743Y5MY3.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -9,21 +12,21 @@ import { cva } from "class-variance-authority";
|
|
|
9
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
13
|
var alertVariants = cva(
|
|
11
14
|
[
|
|
12
|
-
"relative flex gap-3 rounded-
|
|
15
|
+
"relative flex gap-3 rounded-shape-container border-s-4 p-4",
|
|
13
16
|
"w-full"
|
|
14
17
|
],
|
|
15
18
|
{
|
|
16
19
|
variants: {
|
|
17
20
|
tone: {
|
|
18
|
-
neutral: "bg-[var(--color-
|
|
19
|
-
info: "bg-[var(--color-
|
|
20
|
-
success: "bg-[var(--color-
|
|
21
|
-
warning: "bg-[var(--color-
|
|
22
|
-
danger: "bg-[var(--color-
|
|
23
|
-
leap: "bg-[var(--color-leap-
|
|
24
|
-
bookub: "bg-[var(--color-bookub-
|
|
25
|
-
payub: "bg-[var(--color-payub-
|
|
26
|
-
founderub: "bg-[var(--color-founderub-
|
|
21
|
+
neutral: "bg-[var(--color-surface-container-low)] border-s-[var(--color-outline)] text-[var(--color-on-surface)]",
|
|
22
|
+
info: "bg-[var(--color-info-container)] border-s-[var(--color-info)] text-[var(--color-on-info-container)]",
|
|
23
|
+
success: "bg-[var(--color-success-container)] border-s-[var(--color-success)] text-[var(--color-on-success-container)]",
|
|
24
|
+
warning: "bg-[var(--color-warning-container)] border-s-[var(--color-warning)] text-[var(--color-on-warning-container)]",
|
|
25
|
+
danger: "bg-[var(--color-error-container)] border-s-[var(--color-error)] text-[var(--color-on-error-container)]",
|
|
26
|
+
leap: "bg-[var(--color-leap-container)] border-s-[var(--color-leap)] text-[var(--color-on-leap-container)]",
|
|
27
|
+
bookub: "bg-[var(--color-bookub-container)] border-s-[var(--color-bookub)] text-[var(--color-on-bookub-container)]",
|
|
28
|
+
payub: "bg-[var(--color-payub-container)] border-s-[var(--color-payub)] text-[var(--color-on-payub-container)]",
|
|
29
|
+
founderub: "bg-[var(--color-founderub-container)] border-s-[var(--color-founderub)] text-[var(--color-on-founderub-container)]"
|
|
27
30
|
}
|
|
28
31
|
},
|
|
29
32
|
defaultVariants: {
|
|
@@ -42,6 +45,7 @@ var Alert = React.forwardRef(
|
|
|
42
45
|
children,
|
|
43
46
|
...props
|
|
44
47
|
}, ref) => {
|
|
48
|
+
const messages = useNexubMessages();
|
|
45
49
|
return /* @__PURE__ */ jsxs(
|
|
46
50
|
"div",
|
|
47
51
|
{
|
|
@@ -61,11 +65,10 @@ var Alert = React.forwardRef(
|
|
|
61
65
|
"button",
|
|
62
66
|
{
|
|
63
67
|
type: "button",
|
|
64
|
-
"aria-label":
|
|
68
|
+
"aria-label": messages.dismissAlert,
|
|
65
69
|
onClick: onClose,
|
|
66
70
|
className: cn(
|
|
67
|
-
"shrink-0 inline-flex items-center justify-center rounded-
|
|
68
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)] focus-visible:ring-offset-2 ring-offset-[var(--color-ring-offset)]"
|
|
71
|
+
"nx-state-layer shrink-0 inline-flex items-center justify-center rounded-full w-6 h-6"
|
|
69
72
|
),
|
|
70
73
|
children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 2L2 10M2 2l8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
71
74
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
useMergedRefs,
|
|
4
3
|
useSlidingIndicator
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6UKNUI46.js";
|
|
5
|
+
import {
|
|
6
|
+
useMergedRefs
|
|
7
|
+
} from "./chunk-MNEXMMLM.js";
|
|
6
8
|
import {
|
|
7
9
|
cn
|
|
8
10
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -55,7 +57,7 @@ var Trigger2 = React.forwardRef(
|
|
|
55
57
|
ref,
|
|
56
58
|
className: cn(
|
|
57
59
|
// State layer for hover/press; focus = the global ring.
|
|
58
|
-
"nx-state-layer relative inline-flex h-control-md items-center justify-center whitespace-nowrap rounded-t-
|
|
60
|
+
"nx-state-layer relative inline-flex h-control-md items-center justify-center whitespace-nowrap rounded-t-[var(--shape-field)] px-4 text-label-lg select-none",
|
|
59
61
|
"text-[var(--color-on-surface-variant)] transition-colors duration-effects-fast ease-effects-fast",
|
|
60
62
|
"data-[state=active]:text-[var(--color-primary)]",
|
|
61
63
|
"disabled:pointer-events-none disabled:text-[var(--color-text-disabled)]",
|
|
@@ -11,18 +11,18 @@ var separatorVariants = cva("", {
|
|
|
11
11
|
variants: {
|
|
12
12
|
orientation: {
|
|
13
13
|
horizontal: "w-full border-t",
|
|
14
|
-
vertical: "h-full border-
|
|
14
|
+
vertical: "h-full border-s self-stretch"
|
|
15
15
|
},
|
|
16
16
|
tone: {
|
|
17
|
-
neutral: "border-[var(--color-
|
|
18
|
-
info: "border-[var(--color-
|
|
19
|
-
success: "border-[var(--color-
|
|
20
|
-
warning: "border-[var(--color-
|
|
21
|
-
danger: "border-[var(--color-
|
|
22
|
-
leap: "border-[var(--color-leap
|
|
23
|
-
bookub: "border-[var(--color-bookub
|
|
24
|
-
payub: "border-[var(--color-payub
|
|
25
|
-
founderub: "border-[var(--color-founderub
|
|
17
|
+
neutral: "border-[var(--color-outline-variant)]",
|
|
18
|
+
info: "border-[color-mix(in_srgb,var(--color-info)_30%,transparent)]",
|
|
19
|
+
success: "border-[color-mix(in_srgb,var(--color-success)_30%,transparent)]",
|
|
20
|
+
warning: "border-[color-mix(in_srgb,var(--color-warning)_30%,transparent)]",
|
|
21
|
+
danger: "border-[color-mix(in_srgb,var(--color-error)_30%,transparent)]",
|
|
22
|
+
leap: "border-[color-mix(in_srgb,var(--color-leap)_30%,transparent)]",
|
|
23
|
+
bookub: "border-[color-mix(in_srgb,var(--color-bookub)_30%,transparent)]",
|
|
24
|
+
payub: "border-[color-mix(in_srgb,var(--color-payub)_30%,transparent)]",
|
|
25
|
+
founderub: "border-[color-mix(in_srgb,var(--color-founderub)_30%,transparent)]"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Kbd
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LESI7J7B.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -22,7 +22,7 @@ var KeyboardShortcut = React.forwardRef(
|
|
|
22
22
|
index > 0 && /* @__PURE__ */ jsx(
|
|
23
23
|
"span",
|
|
24
24
|
{
|
|
25
|
-
className: "text-[var(--color-
|
|
25
|
+
className: "text-[var(--color-on-surface-muted)] text-xs select-none",
|
|
26
26
|
"aria-hidden": "true",
|
|
27
27
|
children: "+"
|
|
28
28
|
}
|
|
@@ -14,7 +14,7 @@ var Code = React.forwardRef(
|
|
|
14
14
|
{
|
|
15
15
|
ref,
|
|
16
16
|
className: cn(
|
|
17
|
-
"font-mono text-sm bg-[var(--color-
|
|
17
|
+
"font-mono text-sm bg-[var(--color-surface-container-high)] px-1.5 py-0.5 rounded-shape-min",
|
|
18
18
|
className
|
|
19
19
|
),
|
|
20
20
|
...rest,
|
|
@@ -26,7 +26,7 @@ var Code = React.forwardRef(
|
|
|
26
26
|
"pre",
|
|
27
27
|
{
|
|
28
28
|
className: cn(
|
|
29
|
-
"overflow-x-auto rounded-
|
|
29
|
+
"overflow-x-auto rounded-shape-container bg-[var(--color-surface-container-high)] p-4",
|
|
30
30
|
className
|
|
31
31
|
),
|
|
32
32
|
children: /* @__PURE__ */ jsx(
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var skeletonVariants = cva(
|
|
11
|
+
"block bg-surface-container-highest",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
shape: {
|
|
15
|
+
line: "h-[1em] w-full rounded-shape-min",
|
|
16
|
+
rect: "w-full rounded-shape-container",
|
|
17
|
+
circle: "size-10 rounded-full"
|
|
18
|
+
},
|
|
19
|
+
animated: {
|
|
20
|
+
true: "animate-pulse motion-reduce:animate-none"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
shape: "line",
|
|
25
|
+
animated: true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
var px = (v) => typeof v === "number" ? `${v}px` : v;
|
|
30
|
+
var Skeleton = React.forwardRef(
|
|
31
|
+
({
|
|
32
|
+
className,
|
|
33
|
+
shape = "line",
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
animated = true,
|
|
37
|
+
style,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) => {
|
|
40
|
+
const w = width ?? (shape === "circle" ? height : void 0);
|
|
41
|
+
const h = height ?? (shape === "circle" ? width : void 0);
|
|
42
|
+
const sizeStyle = w !== void 0 || h !== void 0 ? { ...w !== void 0 && { width: px(w) }, ...h !== void 0 && { height: px(h) } } : void 0;
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
className: cn(skeletonVariants({ shape, animated }), className),
|
|
49
|
+
style: sizeStyle || style ? { ...sizeStyle, ...style } : void 0,
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
Skeleton.displayName = "Skeleton";
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
skeletonVariants,
|
|
59
|
+
Skeleton
|
|
60
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useNexubMessages
|
|
4
|
+
} from "./chunk-743Y5MY3.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -24,15 +27,15 @@ var spinnerVariants = cva(
|
|
|
24
27
|
xl: "h-10 w-10 border-4"
|
|
25
28
|
},
|
|
26
29
|
tone: {
|
|
27
|
-
neutral: "border-[var(--color-
|
|
28
|
-
info: "border-[var(--color-
|
|
29
|
-
success: "border-[var(--color-
|
|
30
|
-
warning: "border-[var(--color-
|
|
31
|
-
danger: "border-[var(--color-
|
|
32
|
-
leap: "border-[var(--color-leap
|
|
33
|
-
bookub: "border-[var(--color-bookub
|
|
34
|
-
payub: "border-[var(--color-payub
|
|
35
|
-
founderub: "border-[var(--color-founderub
|
|
30
|
+
neutral: "border-[var(--color-on-surface-variant)]",
|
|
31
|
+
info: "border-[var(--color-info)]",
|
|
32
|
+
success: "border-[var(--color-success)]",
|
|
33
|
+
warning: "border-[var(--color-warning)]",
|
|
34
|
+
danger: "border-[var(--color-error)]",
|
|
35
|
+
leap: "border-[var(--color-leap)]",
|
|
36
|
+
bookub: "border-[var(--color-bookub)]",
|
|
37
|
+
payub: "border-[var(--color-payub)]",
|
|
38
|
+
founderub: "border-[var(--color-founderub)]"
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
defaultVariants: {
|
|
@@ -42,13 +45,14 @@ var spinnerVariants = cva(
|
|
|
42
45
|
}
|
|
43
46
|
);
|
|
44
47
|
var Spinner = React.forwardRef(
|
|
45
|
-
({ className, size, tone = "neutral", label
|
|
48
|
+
({ className, size, tone = "neutral", label, ...props }, ref) => {
|
|
49
|
+
const messages = useNexubMessages();
|
|
46
50
|
return /* @__PURE__ */ jsx(
|
|
47
51
|
"span",
|
|
48
52
|
{
|
|
49
53
|
ref,
|
|
50
54
|
role: "status",
|
|
51
|
-
"aria-label": label,
|
|
55
|
+
"aria-label": label ?? messages.loading,
|
|
52
56
|
className: cn("inline-flex items-center justify-center", className),
|
|
53
57
|
...props,
|
|
54
58
|
children: /* @__PURE__ */ jsx(
|
|
@@ -16,10 +16,10 @@ var sectionVariants = cva("w-full", {
|
|
|
16
16
|
lg: "py-32"
|
|
17
17
|
},
|
|
18
18
|
tone: {
|
|
19
|
-
default: "bg-[var(--color-
|
|
20
|
-
subtle: "bg-[var(--color-
|
|
21
|
-
muted: "bg-[var(--color-
|
|
22
|
-
inverse: "bg-[var(--color-
|
|
19
|
+
default: "bg-[var(--color-surface)]",
|
|
20
|
+
subtle: "bg-[var(--color-surface-container-low)]",
|
|
21
|
+
muted: "bg-[var(--color-surface-container-high)]",
|
|
22
|
+
inverse: "bg-[var(--color-inverse-surface)] text-[var(--color-inverse-on-surface)]"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: {
|