@nexub/react 1.3.0 → 1.4.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-BYF223HT.js → chunk-2555JXCP.js} +1 -1
- package/dist/{chunk-6AZP6VBM.js → chunk-2FCSWBSM.js} +1 -1
- package/dist/{chunk-YJD66LTV.js → chunk-3AXIMXDU.js} +1 -1
- package/dist/{chunk-H4MXRAXP.js → chunk-3LP2CR7F.js} +1 -1
- package/dist/chunk-3TMIZQPR.js +49 -0
- package/dist/chunk-47UGX37F.js +21 -0
- package/dist/{chunk-PANDAMD2.js → chunk-4I5ULCYG.js} +1 -1
- package/dist/{chunk-3U54QLYB.js → chunk-4SSUM4CL.js} +1 -1
- package/dist/{chunk-KZW37FQZ.js → chunk-56FERRWW.js} +1 -1
- package/dist/{chunk-YUNWZAAD.js → chunk-5URGARPH.js} +8 -3
- package/dist/{chunk-QF7GUDOE.js → chunk-63DPMUMR.js} +1 -1
- package/dist/{chunk-BMVAZIAJ.js → chunk-6J3QTWKC.js} +1 -1
- package/dist/{chunk-2RLSIOGB.js → chunk-6QLLH6ID.js} +21 -11
- package/dist/{chunk-KWWV3CM3.js → chunk-6RBNM5RO.js} +1 -1
- package/dist/{chunk-WPPNDU2E.js → chunk-6SJPVQQW.js} +7 -6
- package/dist/{chunk-NAIZ7R2L.js → chunk-72I7EVOL.js} +1 -1
- package/dist/{chunk-UWWL5FPC.js → chunk-7Q7ZF6BY.js} +1 -1
- package/dist/chunk-7SXR4PGO.js +31 -0
- package/dist/{chunk-W4IEXUD4.js → chunk-7ZWBHHRK.js} +14 -11
- package/dist/{chunk-PER3O4FD.js → chunk-A4IMFAZX.js} +1 -1
- package/dist/{chunk-E3QPDCEV.js → chunk-AEBYQKLS.js} +34 -7
- package/dist/chunk-AHT35UWY.js +92 -0
- package/dist/chunk-B54WADL4.js +103 -0
- package/dist/{chunk-CMYEVLQT.js → chunk-BFRX6X4O.js} +9 -7
- package/dist/{chunk-KBB7M6WO.js → chunk-BTRTORKU.js} +1 -1
- package/dist/{chunk-TCTFQYLH.js → chunk-CHGPGRML.js} +1 -1
- package/dist/{chunk-U3AEA4BZ.js → chunk-CNNJFWFA.js} +1 -1
- package/dist/chunk-CWS37T3K.js +80 -0
- package/dist/chunk-DEIBF3P7.js +8 -0
- package/dist/{chunk-RIDDJUPA.js → chunk-DJZZ3FIP.js} +13 -4
- package/dist/{chunk-K7CUCLLI.js → chunk-DYWJ7BIK.js} +2 -2
- package/dist/{chunk-6Y734SXN.js → chunk-E4JM3HUM.js} +1 -1
- package/dist/{chunk-POFKKYHY.js → chunk-EQNETGTV.js} +1 -1
- package/dist/{chunk-BBVOB4EC.js → chunk-EZ23IA3H.js} +1 -1
- package/dist/{chunk-LOP63AVE.js → chunk-FD7YU53N.js} +1 -1
- package/dist/{chunk-CPV367VS.js → chunk-FHFVBOF3.js} +1 -1
- package/dist/chunk-GHCV6UXG.js +57 -0
- package/dist/{chunk-UALYS4XI.js → chunk-GIGOTRXX.js} +9 -4
- package/dist/{chunk-BTZW34TX.js → chunk-GRB6T2TT.js} +7 -6
- package/dist/chunk-GUB7YKG2.js +35 -0
- package/dist/{chunk-POBSY7EZ.js → chunk-H2W7IYVY.js} +1 -1
- package/dist/{chunk-I5Z3A7N3.js → chunk-HG6HTUWU.js} +2 -2
- package/dist/{chunk-DEH2Z27F.js → chunk-HJERFB7J.js} +1 -1
- package/dist/{chunk-FUJOSPNQ.js → chunk-I4URNMI7.js} +1 -1
- package/dist/{chunk-24CZFBTG.js → chunk-IIPYF6ZQ.js} +1 -1
- package/dist/{chunk-CVBAWKNG.js → chunk-IK23Q2OF.js} +32 -27
- package/dist/{chunk-4OCXGNP3.js → chunk-J2T4GFFS.js} +1 -1
- package/dist/{chunk-BJKW3G2L.js → chunk-J6TU45KP.js} +1 -1
- package/dist/{chunk-ELC2NBGH.js → chunk-JSD3H7WV.js} +1 -1
- package/dist/{chunk-46CFSBEO.js → chunk-KA2J5OBA.js} +3 -2
- package/dist/{chunk-OUBBOOZE.js → chunk-KM6Z3VTI.js} +1 -1
- package/dist/chunk-KQPLFVFR.js +27 -0
- package/dist/{chunk-MV7WMQI4.js → chunk-LDYD7WL3.js} +1 -1
- package/dist/{chunk-DOHXBNOP.js → chunk-LH3BSAIS.js} +1 -1
- package/dist/chunk-LMPGHWUA.js +114 -0
- package/dist/chunk-LZB3KTSH.js +61 -0
- package/dist/{chunk-BUBYXAJK.js → chunk-M7YB3MSW.js} +1 -1
- package/dist/{chunk-V3FZHIEB.js → chunk-NCRFKPA4.js} +1 -1
- package/dist/{chunk-QURKXXNS.js → chunk-NDCNVQ47.js} +1 -1
- package/dist/{chunk-JKTZMWWC.js → chunk-NIX4SEKM.js} +1 -1
- package/dist/{chunk-PBLEGOLM.js → chunk-NMH5WSZG.js} +6 -5
- package/dist/{chunk-ZFVBFCYV.js → chunk-NQVRF4RB.js} +1 -1
- package/dist/{chunk-IU76LV3W.js → chunk-OASFXI27.js} +6 -6
- package/dist/chunk-OJ2TLWYD.js +89 -0
- package/dist/{chunk-MY6XUJ5P.js → chunk-OJRSPDNJ.js} +21 -14
- package/dist/chunk-P26VJEIW.js +1 -0
- package/dist/{chunk-IBCYG6HR.js → chunk-P44EROBX.js} +1 -1
- package/dist/{chunk-52KTX5A7.js → chunk-PQ6GU7SG.js} +2 -2
- package/dist/{chunk-CZUNTABW.js → chunk-PVTACENM.js} +1 -1
- package/dist/{chunk-Y45JAJKW.js → chunk-PWBPHGM3.js} +2 -2
- package/dist/chunk-Q7G5WGYV.js +33 -0
- package/dist/{chunk-BYCTJHXY.js → chunk-QCNLE27O.js} +2 -2
- package/dist/{chunk-7W2YDJ5W.js → chunk-QD7H3WV3.js} +10 -7
- package/dist/{chunk-HW3I7I3R.js → chunk-RB4CVS22.js} +1 -1
- package/dist/{chunk-ZLSUVZM2.js → chunk-RHOYF7MO.js} +17 -11
- package/dist/{chunk-QHJ43Q2T.js → chunk-RLE5RN3T.js} +1 -1
- package/dist/{chunk-7B4FS7VQ.js → chunk-RTDUTWJ4.js} +31 -14
- package/dist/{chunk-DR2Y3PIT.js → chunk-S46W2QER.js} +1 -1
- package/dist/{chunk-LAWZQ6R6.js → chunk-SVQCINRE.js} +1 -1
- package/dist/{chunk-6MYVXJPJ.js → chunk-SY6V3HAK.js} +17 -23
- package/dist/{chunk-OZPPL76D.js → chunk-T5BS4OIV.js} +1 -1
- package/dist/{chunk-VT7RKY46.js → chunk-TEOLG3N2.js} +1 -1
- package/dist/{chunk-A7L75YXY.js → chunk-TJCHA3OI.js} +2 -2
- package/dist/chunk-TNBBQ7IP.js +43 -0
- package/dist/{chunk-IHW2L532.js → chunk-TYTW4F3B.js} +12 -9
- package/dist/{chunk-T4IVMVMQ.js → chunk-UMC64NCT.js} +1 -1
- package/dist/{chunk-UTBUIBEP.js → chunk-UVWCZHLD.js} +1 -1
- package/dist/chunk-V3TETH4J.js +146 -0
- package/dist/{chunk-SZKUSLHI.js → chunk-VTL3GJJG.js} +21 -11
- package/dist/{chunk-JQDLCN5D.js → chunk-W2NEXOTG.js} +1 -1
- package/dist/{chunk-XNDCVVNE.js → chunk-WESZPFBZ.js} +2 -2
- package/dist/{chunk-DD6XCW6R.js → chunk-XR4NBY54.js} +1 -1
- package/dist/{chunk-YGOR3KT7.js → chunk-YJ3JQYAN.js} +1 -1
- package/dist/chunk-YRDCY6BI.js +55 -0
- package/dist/{chunk-2VDP2ML4.js → chunk-Z3IG5WRA.js} +10 -9
- package/dist/{chunk-YUFCNHZF.js → chunk-ZV3AF5CL.js} +1 -1
- package/dist/components/Accordion/index.js +2 -2
- package/dist/components/Alert/index.js +2 -2
- package/dist/components/AlertDialog/index.js +6 -2
- package/dist/components/AppShell/index.js +2 -2
- package/dist/components/AspectRatio/index.js +2 -2
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/Avatar/index.js +2 -2
- package/dist/components/AvatarGroup/index.js +3 -3
- package/dist/components/Badge/index.js +2 -2
- package/dist/components/Banner/index.js +2 -2
- package/dist/components/Box/index.js +2 -2
- package/dist/components/Breadcrumb/index.js +2 -2
- package/dist/components/Button/index.js +5 -2
- package/dist/components/ButtonGroup/index.js +2 -2
- package/dist/components/Callout/index.js +2 -2
- package/dist/components/Card/index.js +3 -3
- package/dist/components/CheckList/index.js +2 -2
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Chip/index.js +2 -2
- package/dist/components/Code/index.js +2 -2
- package/dist/components/Collapsible/index.js +2 -2
- package/dist/components/Combobox/index.js +2 -2
- package/dist/components/CommandPalette/index.js +4 -2
- package/dist/components/Container/index.js +2 -2
- package/dist/components/ContextMenu/index.js +3 -2
- package/dist/components/CountryBadge/index.js +3 -3
- package/dist/components/DataTable/index.js +2 -2
- package/dist/components/DatePicker/index.js +2 -2
- package/dist/components/DateRangePicker/index.js +2 -2
- package/dist/components/Dialog/index.js +4 -3
- package/dist/components/Drawer/index.js +5 -3
- package/dist/components/DropdownMenu/index.js +3 -2
- package/dist/components/EmptyState/index.js +2 -2
- package/dist/components/ErrorState/index.js +2 -2
- package/dist/components/EyebrowChip/index.js +2 -2
- package/dist/components/FileUpload/index.js +2 -2
- package/dist/components/FilterChip/index.js +2 -2
- package/dist/components/Flag/index.js +2 -2
- package/dist/components/Flex/index.js +2 -2
- package/dist/components/FormError/index.js +2 -2
- package/dist/components/FormField/index.js +5 -5
- package/dist/components/GradientDivider/index.js +2 -2
- package/dist/components/Grid/index.js +2 -2
- package/dist/components/Heading/index.js +2 -2
- package/dist/components/HelperText/index.js +2 -2
- package/dist/components/HoverCard/index.js +3 -2
- package/dist/components/IconButton/index.js +3 -2
- package/dist/components/Input/index.js +3 -2
- package/dist/components/Kbd/index.js +2 -2
- package/dist/components/KeyboardShortcut/index.js +3 -3
- package/dist/components/Label/index.js +2 -2
- package/dist/components/Link/index.js +2 -2
- package/dist/components/Logo/index.js +2 -2
- package/dist/components/Menubar/index.js +3 -2
- package/dist/components/NavigationMenu/index.js +3 -2
- package/dist/components/NumberInput/index.js +4 -3
- package/dist/components/PageHeader/index.js +2 -2
- package/dist/components/Pagination/index.js +2 -2
- package/dist/components/PasswordInput/index.js +4 -3
- package/dist/components/Popover/index.js +4 -3
- package/dist/components/Progress/index.js +2 -2
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/Rating/index.js +2 -2
- package/dist/components/ScrollArea/index.js +2 -2
- package/dist/components/SearchInput/index.js +4 -3
- package/dist/components/Section/index.js +2 -2
- package/dist/components/SegmentedControl/index.js +4 -2
- package/dist/components/Select/index.js +4 -2
- package/dist/components/Separator/index.js +2 -2
- package/dist/components/Sidebar/index.js +2 -2
- package/dist/components/Skeleton/index.js +2 -2
- package/dist/components/Slider/index.js +2 -2
- package/dist/components/Spinner/index.js +2 -2
- package/dist/components/Stack/index.js +2 -2
- package/dist/components/StatusPill/index.js +2 -2
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/Table/index.js +2 -2
- package/dist/components/Tabs/index.js +4 -2
- package/dist/components/Tag/index.js +2 -2
- package/dist/components/Text/index.js +2 -2
- package/dist/components/TextGradient/index.js +2 -2
- package/dist/components/Textarea/index.js +3 -2
- package/dist/components/ThemeProvider/index.js +1 -1
- package/dist/components/Toast/index.js +2 -2
- package/dist/components/Toggle/index.js +2 -2
- package/dist/components/ToggleGroup/index.js +3 -3
- package/dist/components/Toolbar/index.js +2 -2
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TopNav/index.js +3 -3
- package/dist/index.d.ts +47 -19
- package/dist/index.js +130 -141
- package/package.json +8 -5
- package/dist/chunk-3CSKW56L.js +0 -44
- package/dist/chunk-AT6RPKU3.js +0 -12
- package/dist/chunk-BGY23Y5O.js +0 -104
- package/dist/chunk-DAXDAFNG.js +0 -92
- package/dist/chunk-EVCTOIRS.js +0 -66
- package/dist/chunk-GTQIA62H.js +0 -60
- package/dist/chunk-JCUVWDUC.js +0 -57
- package/dist/chunk-N2GIMMTF.js +0 -98
- package/dist/chunk-P6BZNFVU.js +0 -38
- package/dist/chunk-QRZV2FLW.js +0 -106
- package/dist/chunk-ROZVVWPV.js +0 -8
- package/dist/chunk-U3EGB3JL.js +0 -43
- package/dist/chunk-VPZCQFVY.js +0 -33
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
field,
|
|
4
|
+
fieldDisabledWithin,
|
|
5
|
+
fieldFocusWithin,
|
|
6
|
+
fieldInvalid
|
|
7
|
+
} from "./chunk-7SXR4PGO.js";
|
|
2
8
|
import {
|
|
3
9
|
cn
|
|
4
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
11
|
|
|
6
12
|
// src/components/Input/Input.tsx
|
|
7
13
|
import * as React from "react";
|
|
@@ -16,15 +22,16 @@ var inputVariants = cva(
|
|
|
16
22
|
"outline-none focus:outline-none focus-visible:outline-none",
|
|
17
23
|
"ring-0 focus:ring-0 focus-visible:ring-0",
|
|
18
24
|
"placeholder:text-[var(--color-text-placeholder)]",
|
|
19
|
-
"text-[var(--color-
|
|
20
|
-
"disabled:
|
|
25
|
+
"text-[var(--color-on-surface)]",
|
|
26
|
+
"disabled:cursor-not-allowed disabled:text-[var(--color-text-disabled)]"
|
|
21
27
|
],
|
|
22
28
|
{
|
|
23
29
|
variants: {
|
|
30
|
+
// 16px from md up: readable, and iOS doesn't zoom on focus.
|
|
24
31
|
size: {
|
|
25
|
-
sm: "text-sm",
|
|
26
|
-
md: "text-
|
|
27
|
-
lg: "text-
|
|
32
|
+
sm: "text-body-sm",
|
|
33
|
+
md: "text-body-md",
|
|
34
|
+
lg: "text-body-md"
|
|
28
35
|
}
|
|
29
36
|
},
|
|
30
37
|
defaultVariants: {
|
|
@@ -34,23 +41,21 @@ var inputVariants = cva(
|
|
|
34
41
|
);
|
|
35
42
|
var inputWrapperVariants = cva(
|
|
36
43
|
[
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"focus-within:outline-none focus-within:border-[var(--color-ring-default)] focus-within:ring-2 focus-within:ring-[color-mix(in_srgb,var(--color-ring-default)_25%,transparent)]",
|
|
43
|
-
"has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed"
|
|
44
|
+
// The wrapper is the field: one border that thickens to 2px primary on focus.
|
|
45
|
+
"flex items-center w-full",
|
|
46
|
+
field,
|
|
47
|
+
fieldFocusWithin,
|
|
48
|
+
fieldDisabledWithin
|
|
44
49
|
],
|
|
45
50
|
{
|
|
46
51
|
variants: {
|
|
47
52
|
size: {
|
|
48
|
-
sm: "h-
|
|
49
|
-
md: "h-
|
|
50
|
-
lg: "h-
|
|
53
|
+
sm: "h-control-sm px-3 gap-1.5",
|
|
54
|
+
md: "h-control-md px-3.5 gap-2",
|
|
55
|
+
lg: "h-control-lg px-4 gap-2"
|
|
51
56
|
},
|
|
52
57
|
invalid: {
|
|
53
|
-
true:
|
|
58
|
+
true: fieldInvalid
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
defaultVariants: {
|
|
@@ -60,14 +65,14 @@ var inputWrapperVariants = cva(
|
|
|
60
65
|
);
|
|
61
66
|
var addonVariants = cva(
|
|
62
67
|
[
|
|
63
|
-
"flex items-center self-stretch px-3 text-[var(--color-
|
|
64
|
-
"border-[var(--color-
|
|
68
|
+
"flex items-center self-stretch px-3 text-[var(--color-on-surface-variant)] bg-[var(--color-surface-container-high)]",
|
|
69
|
+
"border-[var(--color-outline-variant)] shrink-0"
|
|
65
70
|
],
|
|
66
71
|
{
|
|
67
72
|
variants: {
|
|
68
73
|
side: {
|
|
69
|
-
leading: "border-r
|
|
70
|
-
trailing: "border-l
|
|
74
|
+
leading: "border-r",
|
|
75
|
+
trailing: "border-l"
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
78
|
}
|
|
@@ -97,20 +102,20 @@ var Input = React.forwardRef(
|
|
|
97
102
|
}
|
|
98
103
|
);
|
|
99
104
|
if (hasAddon) {
|
|
100
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full
|
|
105
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full overflow-hidden", field, fieldFocusWithin, invalid && fieldInvalid), children: [
|
|
101
106
|
leadingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "leading" })), children: leadingAddon }),
|
|
102
|
-
/* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), "rounded-none border-0
|
|
103
|
-
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), "rounded-none border-0 shadow-none focus-within:shadow-none", wrapperClassName), children: [
|
|
108
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-on-surface-variant)]", children: leadingIcon }),
|
|
104
109
|
inputEl,
|
|
105
|
-
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-
|
|
110
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-on-surface-variant)]", children: trailingIcon })
|
|
106
111
|
] }),
|
|
107
112
|
trailingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "trailing" })), children: trailingAddon })
|
|
108
113
|
] });
|
|
109
114
|
}
|
|
110
115
|
return /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), wrapperClassName), children: [
|
|
111
|
-
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-
|
|
116
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-on-surface-variant)]", children: leadingIcon }),
|
|
112
117
|
inputEl,
|
|
113
|
-
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-
|
|
118
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-on-surface-variant)]", children: trailingIcon })
|
|
114
119
|
] });
|
|
115
120
|
}
|
|
116
121
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
cn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
5
|
|
|
6
6
|
// src/components/Tooltip/Tooltip.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -18,7 +18,8 @@ var Content2 = React.forwardRef(
|
|
|
18
18
|
ref,
|
|
19
19
|
sideOffset,
|
|
20
20
|
className: cn(
|
|
21
|
-
"z-[
|
|
21
|
+
"z-[var(--z-tooltip,1800)] rounded-shape-tooltip bg-[var(--color-inverse-surface)] px-2.5 py-1.5 text-label-md text-[var(--color-inverse-on-surface)] shadow-elevation-1",
|
|
22
|
+
"duration-effects-fast ease-effects-fast",
|
|
22
23
|
"data-[state=delayed-open]:animate-in data-[state=closed]:animate-out",
|
|
23
24
|
"data-[state=delayed-open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
24
25
|
"data-[state=delayed-open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/utils/surface.ts
|
|
4
|
+
var overlaySurface = "rounded-shape-overlay bg-[var(--color-surface-elevated)] text-[var(--color-on-surface)] shadow-elevation-3";
|
|
5
|
+
var floatingSurface = "rounded-shape-container bg-[var(--color-surface-elevated)] text-[var(--color-on-surface)] shadow-elevation-2";
|
|
6
|
+
var menuContent = "p-1.5";
|
|
7
|
+
var menuItem = [
|
|
8
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-[10px] px-2.5 py-2 text-body-sm text-[var(--color-on-surface)] outline-none",
|
|
9
|
+
// Highlight = the on-surface state layer at hover opacity.
|
|
10
|
+
"focus:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)] data-[highlighted]:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
11
|
+
"data-[disabled]:pointer-events-none data-[disabled]:text-[var(--color-text-disabled)]"
|
|
12
|
+
].join(" ");
|
|
13
|
+
var menuSeparator = "-mx-1.5 my-1.5 h-px bg-[var(--color-outline-variant)]";
|
|
14
|
+
var menuLabel = "px-2.5 py-1.5 text-label-sm text-[var(--color-on-surface-muted)]";
|
|
15
|
+
var enterExit = "duration-spatial-default ease-spatial-default data-[state=closed]:duration-effects-fast data-[state=closed]:ease-effects-fast";
|
|
16
|
+
var scrim = "bg-[color-mix(in_srgb,var(--color-scrim,#000)_40%,transparent)]";
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
overlaySurface,
|
|
20
|
+
floatingSurface,
|
|
21
|
+
menuContent,
|
|
22
|
+
menuItem,
|
|
23
|
+
menuSeparator,
|
|
24
|
+
menuLabel,
|
|
25
|
+
enterExit,
|
|
26
|
+
scrim
|
|
27
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
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 { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var toneClasses = {
|
|
21
|
+
neutral: "bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)]",
|
|
22
|
+
info: "bg-[var(--color-info)] text-[var(--color-on-info)]",
|
|
23
|
+
success: "bg-[var(--color-success)] text-[var(--color-on-success)]",
|
|
24
|
+
warning: "bg-[var(--color-warning)] text-[var(--color-on-warning)]",
|
|
25
|
+
danger: "bg-[var(--color-error)] text-[var(--color-on-error)]",
|
|
26
|
+
leap: "bg-[color:light-dark(var(--color-palette-leap-40),var(--color-palette-leap-80))] text-[color:light-dark(var(--color-palette-leap-100),var(--color-palette-leap-20))]",
|
|
27
|
+
bookub: "bg-[color:light-dark(var(--color-palette-bookub-40),var(--color-palette-bookub-80))] text-[color:light-dark(var(--color-palette-bookub-100),var(--color-palette-bookub-20))]",
|
|
28
|
+
payub: "bg-[color:light-dark(var(--color-palette-payub-40),var(--color-palette-payub-80))] text-[color:light-dark(var(--color-palette-payub-100),var(--color-palette-payub-20))]",
|
|
29
|
+
founderub: "bg-[color:light-dark(var(--color-palette-founderub-40),var(--color-palette-founderub-80))] text-[color:light-dark(var(--color-palette-founderub-100),var(--color-palette-founderub-20))]"
|
|
30
|
+
};
|
|
31
|
+
var filled = `bg-[var(--color-primary)] text-[var(--color-on-primary)] ${disabledContainer}`;
|
|
32
|
+
var tonal = `bg-[var(--color-secondary-container)] text-[var(--color-on-secondary-container)] ${disabledContainer}`;
|
|
33
|
+
var outlined = `bg-transparent border border-[var(--color-outline-variant)] text-[var(--color-on-surface)] ${disabledContainer}`;
|
|
34
|
+
var text = `bg-transparent text-[var(--color-on-surface)] ${disabledText}`;
|
|
35
|
+
var buttonVariants = cva(
|
|
36
|
+
[pressable, "relative inline-flex items-center justify-center gap-2 whitespace-nowrap"],
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
filled,
|
|
41
|
+
tonal,
|
|
42
|
+
outlined,
|
|
43
|
+
text,
|
|
44
|
+
// Thin glass: for buttons floating over content/media (toolbars, media controls).
|
|
45
|
+
glass: `border ${glassSurfaceClass} text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
46
|
+
// Legacy names (kept as aliases).
|
|
47
|
+
primary: filled,
|
|
48
|
+
secondary: tonal,
|
|
49
|
+
subtle: `bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
50
|
+
outline: outlined,
|
|
51
|
+
ghost: text,
|
|
52
|
+
destructive: `bg-[var(--color-error)] text-[var(--color-on-error)] ${disabledContainer}`,
|
|
53
|
+
accent: `bg-[var(--color-tertiary)] text-[var(--color-on-tertiary)] ${disabledContainer}`,
|
|
54
|
+
link: `bg-transparent text-[var(--color-primary)] underline underline-offset-[0.3em] ${disabledText}`
|
|
55
|
+
},
|
|
56
|
+
// The control ladder (density-aware: data-density="compact" shrinks it).
|
|
57
|
+
size: {
|
|
58
|
+
xs: "h-control-xs px-2.5 text-label-sm",
|
|
59
|
+
sm: "h-control-sm px-3.5 text-label-md",
|
|
60
|
+
md: "h-control-md px-5 text-label-lg",
|
|
61
|
+
lg: "h-control-lg px-6 text-title-md",
|
|
62
|
+
xl: "h-control-xl px-7 text-title-md"
|
|
63
|
+
},
|
|
64
|
+
fullWidth: {
|
|
65
|
+
true: "w-full"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
variant: "primary",
|
|
70
|
+
size: "md"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
var Button = React.forwardRef(
|
|
75
|
+
({
|
|
76
|
+
className,
|
|
77
|
+
variant,
|
|
78
|
+
size,
|
|
79
|
+
tone,
|
|
80
|
+
loading = false,
|
|
81
|
+
fullWidth,
|
|
82
|
+
leadingIcon,
|
|
83
|
+
trailingIcon,
|
|
84
|
+
asChild = false,
|
|
85
|
+
disabled,
|
|
86
|
+
children,
|
|
87
|
+
...props
|
|
88
|
+
}, ref) => {
|
|
89
|
+
const sharedProps = {
|
|
90
|
+
className: cn(
|
|
91
|
+
buttonVariants({ variant, size, fullWidth }),
|
|
92
|
+
tone ? toneClasses[tone] : "",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
"data-tone": tone,
|
|
96
|
+
...variant === "glass" && { "data-material": "glass", "data-glass-thickness": "thin" },
|
|
97
|
+
...props
|
|
98
|
+
};
|
|
99
|
+
if (asChild) {
|
|
100
|
+
return /* @__PURE__ */ jsx(Slot, { ref, ...sharedProps, children });
|
|
101
|
+
}
|
|
102
|
+
return /* @__PURE__ */ jsxs("button", { ref, disabled: disabled ?? loading, ...sharedProps, children: [
|
|
103
|
+
loading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : leadingIcon,
|
|
104
|
+
children,
|
|
105
|
+
!loading && trailingIcon
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
Button.displayName = "Button";
|
|
110
|
+
|
|
111
|
+
export {
|
|
112
|
+
buttonVariants,
|
|
113
|
+
Button
|
|
114
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
disabledContainer,
|
|
4
|
+
disabledText,
|
|
5
|
+
pressable
|
|
6
|
+
} from "./chunk-7SXR4PGO.js";
|
|
7
|
+
import {
|
|
8
|
+
cn
|
|
9
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
10
|
+
|
|
11
|
+
// src/components/IconButton/IconButton.tsx
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
var iconButtonVariants = cva(
|
|
17
|
+
[pressable, "relative inline-flex items-center justify-center flex-shrink-0"],
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
ghost: `bg-transparent text-[var(--color-on-surface-variant)] ${disabledText}`,
|
|
22
|
+
solid: `bg-[var(--color-primary)] text-[var(--color-on-primary)] ${disabledContainer}`,
|
|
23
|
+
outline: `bg-transparent border border-[var(--color-outline-variant)] text-[var(--color-on-surface-variant)] ${disabledContainer}`,
|
|
24
|
+
subtle: `bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)] ${disabledContainer}`
|
|
25
|
+
},
|
|
26
|
+
// Square on the control ladder; the capsule shape makes it a circle.
|
|
27
|
+
size: {
|
|
28
|
+
xs: "h-control-xs w-control-xs text-label-sm",
|
|
29
|
+
sm: "h-control-sm w-control-sm text-label-md",
|
|
30
|
+
md: "h-control-md w-control-md text-label-lg",
|
|
31
|
+
lg: "h-control-lg w-control-lg text-title-md",
|
|
32
|
+
xl: "h-control-xl w-control-xl text-title-md"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: "ghost",
|
|
37
|
+
size: "md"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
var IconButton = React.forwardRef(
|
|
42
|
+
({ className, variant, size, label, asChild = false, children, ...props }, ref) => {
|
|
43
|
+
const Comp = asChild ? Slot : "button";
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
Comp,
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
"aria-label": label,
|
|
49
|
+
className: cn(iconButtonVariants({ variant, size }), className),
|
|
50
|
+
...props,
|
|
51
|
+
children
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
IconButton.displayName = "IconButton";
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
iconButtonVariants,
|
|
60
|
+
IconButton
|
|
61
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
glassSurfaceClass
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DEIBF3P7.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
8
8
|
|
|
9
9
|
// src/components/Card/Card.tsx
|
|
10
10
|
import * as React from "react";
|
|
@@ -12,13 +12,14 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
12
12
|
import { cva } from "class-variance-authority";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
var cardVariants = cva(
|
|
15
|
-
|
|
15
|
+
// In-flow content: tone + a soft alpha hairline, no shadow (shadows are for floating layers).
|
|
16
|
+
"rounded-shape-container bg-[var(--color-surface-elevated)] border border-[color-mix(in_srgb,var(--color-outline-variant)_60%,transparent)] text-[var(--color-on-surface)]",
|
|
16
17
|
{
|
|
17
18
|
variants: {
|
|
18
19
|
variant: {
|
|
19
20
|
flat: "",
|
|
20
|
-
surface: "
|
|
21
|
-
interactive: "cursor-pointer
|
|
21
|
+
surface: "bg-[var(--color-surface-elevated)] shadow-elevation-1",
|
|
22
|
+
interactive: "nx-state-layer cursor-pointer bg-[var(--color-surface-elevated)] shadow-elevation-1 transition-[box-shadow,transform] duration-spatial-fast ease-spatial-fast hover:-translate-y-0.5 hover:shadow-elevation-2"
|
|
22
23
|
},
|
|
23
24
|
// Material. 'glass' needs data-material="glass" on the element (set in the
|
|
24
25
|
// component) for the --glass-* vars to resolve. Single box-shadow carries
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Label
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
FormError
|
|
7
|
-
} from "./chunk-OUBBOOZE.js";
|
|
4
|
+
} from "./chunk-NIX4SEKM.js";
|
|
8
5
|
import {
|
|
9
6
|
HelperText
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UMC64NCT.js";
|
|
8
|
+
import {
|
|
9
|
+
FormError
|
|
10
|
+
} from "./chunk-KM6Z3VTI.js";
|
|
11
11
|
import {
|
|
12
12
|
cn
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
14
14
|
|
|
15
15
|
// src/components/FormField/FormField.tsx
|
|
16
16
|
import * as React from "react";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useMergedRefs,
|
|
4
|
+
useSlidingIndicator
|
|
5
|
+
} from "./chunk-YRDCY6BI.js";
|
|
6
|
+
import {
|
|
7
|
+
cn
|
|
8
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
9
|
+
|
|
10
|
+
// src/components/Tabs/Tabs.tsx
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var Root2 = React.forwardRef(
|
|
15
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixTabs.Root, { ref, className: cn("flex flex-col gap-3", className), ...props })
|
|
16
|
+
);
|
|
17
|
+
Root2.displayName = "Tabs.Root";
|
|
18
|
+
var List2 = React.forwardRef(
|
|
19
|
+
({ className, children, ...props }, forwardedRef) => {
|
|
20
|
+
const ref = React.useRef(null);
|
|
21
|
+
useSlidingIndicator(ref, '[data-state="active"]');
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
RadixTabs.List,
|
|
24
|
+
{
|
|
25
|
+
ref: useMergedRefs(ref, forwardedRef),
|
|
26
|
+
className: cn(
|
|
27
|
+
"relative flex w-full items-stretch justify-start overflow-x-auto",
|
|
28
|
+
"border-b border-[var(--color-outline-variant)]",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
children,
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
"aria-hidden": "true",
|
|
38
|
+
className: cn(
|
|
39
|
+
"pointer-events-none absolute bottom-0 left-0 h-[3px] rounded-t-full bg-[var(--color-primary)]",
|
|
40
|
+
"w-[var(--nx-ind-w,0px)] translate-x-[var(--nx-ind-x,0px)] opacity-[var(--nx-ind-o,0)]",
|
|
41
|
+
"[[data-nx-indicator=ready]>&]:transition-[transform,width] [[data-nx-indicator=ready]>&]:duration-spatial-default [[data-nx-indicator=ready]>&]:ease-spatial-default"
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
List2.displayName = "Tabs.List";
|
|
51
|
+
var Trigger2 = React.forwardRef(
|
|
52
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53
|
+
RadixTabs.Trigger,
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: cn(
|
|
57
|
+
// 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-lg px-4 text-label-lg select-none",
|
|
59
|
+
"text-[var(--color-on-surface-variant)] transition-colors duration-effects-fast ease-effects-fast",
|
|
60
|
+
"data-[state=active]:text-[var(--color-primary)]",
|
|
61
|
+
"disabled:pointer-events-none disabled:text-[var(--color-text-disabled)]",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
Trigger2.displayName = "Tabs.Trigger";
|
|
69
|
+
var Content2 = React.forwardRef(
|
|
70
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71
|
+
RadixTabs.Content,
|
|
72
|
+
{
|
|
73
|
+
ref,
|
|
74
|
+
className: cn(
|
|
75
|
+
className,
|
|
76
|
+
// Radix hides inactive panels with the `hidden` attribute, which any
|
|
77
|
+
// display class (`flex`, `md:grid`…) overrides. !important always wins.
|
|
78
|
+
"data-[state=inactive]:!hidden"
|
|
79
|
+
),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
);
|
|
84
|
+
Content2.displayName = "Tabs.Content";
|
|
85
|
+
var Tabs = { Root: Root2, List: List2, Trigger: Trigger2, Content: Content2 };
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Tabs
|
|
89
|
+
};
|