@nexub/react 1.3.0 → 1.5.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-OZPPL76D.js → chunk-2ZBJOUJ7.js} +17 -20
- 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-5O34ZNC3.js +70 -0
- package/dist/{chunk-YUNWZAAD.js → chunk-5URGARPH.js} +8 -3
- package/dist/{chunk-QF7GUDOE.js → chunk-63DPMUMR.js} +1 -1
- package/dist/chunk-64JDZWCV.js +47 -0
- 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-SZKUSLHI.js → chunk-7L3CGIRA.js} +21 -11
- 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-AXOKFS4K.js +48 -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-CIQHFMF6.js +44 -0
- 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-HI7GBSW2.js +1 -0
- package/dist/{chunk-DEH2Z27F.js → chunk-HJERFB7J.js} +1 -1
- package/dist/{chunk-UTBUIBEP.js → chunk-I4BHRVRL.js} +3 -30
- 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-JLUCMNVS.js +32 -0
- 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-QURKXXNS.js → chunk-LGQ737BP.js} +6 -12
- package/dist/{chunk-DOHXBNOP.js → chunk-LH3BSAIS.js} +1 -1
- package/dist/chunk-LMPGHWUA.js +114 -0
- package/dist/chunk-LVPU7455.js +1 -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-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-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-V3TETH4J.js +146 -0
- 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-YPHNHQYQ.js +61 -0
- 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/Amount/index.js +9 -0
- 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 +3 -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 +4 -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/MoneyInput/index.js +13 -0
- package/dist/components/NavigationMenu/index.js +3 -2
- package/dist/components/NavigationRail/index.js +8 -0
- 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 +3 -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/SplitButton/index.js +14 -0
- 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 +3 -2
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TopNav/index.js +3 -3
- package/dist/index.d.ts +128 -21
- package/dist/index.js +162 -152
- 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
|
@@ -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 @@
|
|
|
1
|
+
'use client';
|
|
@@ -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
|
+
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
enterExit,
|
|
4
|
+
floatingSurface,
|
|
5
|
+
menuContent,
|
|
6
|
+
menuItem,
|
|
7
|
+
menuLabel,
|
|
8
|
+
menuSeparator
|
|
9
|
+
} from "./chunk-KQPLFVFR.js";
|
|
2
10
|
import {
|
|
3
11
|
cn
|
|
4
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
13
|
|
|
6
14
|
// src/components/Menubar/Menubar.tsx
|
|
7
15
|
import * as React from "react";
|
|
@@ -20,8 +28,7 @@ var Root2 = React.forwardRef(
|
|
|
20
28
|
{
|
|
21
29
|
ref,
|
|
22
30
|
className: cn(
|
|
23
|
-
"flex h-
|
|
24
|
-
"bg-[var(--color-bg-default)] px-3",
|
|
31
|
+
"flex h-control-md items-center gap-0.5 rounded-shape-control bg-[var(--color-surface-container-low)] p-1",
|
|
25
32
|
className
|
|
26
33
|
),
|
|
27
34
|
...props
|
|
@@ -37,9 +44,9 @@ var Trigger2 = React.forwardRef(
|
|
|
37
44
|
{
|
|
38
45
|
ref,
|
|
39
46
|
className: cn(
|
|
40
|
-
"relative flex cursor-default select-none items-center rounded-
|
|
41
|
-
"outline-none
|
|
42
|
-
"data-[state=open]:bg-[var(--color-
|
|
47
|
+
"nx-state-layer relative flex h-full cursor-default select-none items-center rounded-shape-control px-3 text-label-lg text-[var(--color-on-surface)]",
|
|
48
|
+
"outline-none",
|
|
49
|
+
"data-[state=open]:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
43
50
|
className
|
|
44
51
|
),
|
|
45
52
|
...props
|
|
@@ -49,8 +56,10 @@ var Trigger2 = React.forwardRef(
|
|
|
49
56
|
);
|
|
50
57
|
Trigger2.displayName = "Menubar.Trigger";
|
|
51
58
|
var contentBaseClasses = cn(
|
|
52
|
-
"z-[var(--z-popover)] min-w-48
|
|
53
|
-
|
|
59
|
+
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
60
|
+
floatingSurface,
|
|
61
|
+
menuContent,
|
|
62
|
+
enterExit,
|
|
54
63
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
55
64
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
56
65
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -72,9 +81,7 @@ var Content2 = React.forwardRef(
|
|
|
72
81
|
);
|
|
73
82
|
Content2.displayName = "Menubar.Content";
|
|
74
83
|
var itemBaseClasses = cn(
|
|
75
|
-
|
|
76
|
-
"transition-colors hover:bg-[var(--color-bg-subtle)] focus:bg-[var(--color-bg-subtle)]",
|
|
77
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
84
|
+
menuItem
|
|
78
85
|
);
|
|
79
86
|
var Item2 = React.forwardRef(
|
|
80
87
|
function MenubarItem({ className, ...props }, ref) {
|
|
@@ -96,7 +103,7 @@ var Label2 = React.forwardRef(
|
|
|
96
103
|
{
|
|
97
104
|
ref,
|
|
98
105
|
className: cn(
|
|
99
|
-
|
|
106
|
+
menuLabel,
|
|
100
107
|
className
|
|
101
108
|
),
|
|
102
109
|
...props
|
|
@@ -111,7 +118,7 @@ var Separator2 = React.forwardRef(
|
|
|
111
118
|
RadixMenubar.Separator,
|
|
112
119
|
{
|
|
113
120
|
ref,
|
|
114
|
-
className: cn(
|
|
121
|
+
className: cn(menuSeparator, className),
|
|
115
122
|
...props
|
|
116
123
|
}
|
|
117
124
|
);
|
|
@@ -156,7 +163,7 @@ var SubTrigger2 = React.forwardRef(function MenubarSubTrigger({ className, child
|
|
|
156
163
|
ref,
|
|
157
164
|
className: cn(
|
|
158
165
|
itemBaseClasses,
|
|
159
|
-
"data-[state=open]:bg-[var(--color-
|
|
166
|
+
"data-[state=open]:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
160
167
|
className
|
|
161
168
|
),
|
|
162
169
|
...props,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
inputWrapperVariants
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IK23Q2OF.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
8
8
|
|
|
9
9
|
// src/components/NumberInput/NumberInput.tsx
|
|
10
10
|
import * as React from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Flag
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EQNETGTV.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
8
8
|
|
|
9
9
|
// src/components/CountryBadge/CountryBadge.tsx
|
|
10
10
|
import * as React from "react";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/utils/cn.ts
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
6
|
+
var sizes = ["xs", "sm", "md", "lg", "xl"];
|
|
7
|
+
var typeRoles = ["display", "headline", "title", "body", "label"].flatMap(
|
|
8
|
+
(r) => ["lg", "md", "sm"].map((s) => `${r}-${s}`)
|
|
9
|
+
);
|
|
10
|
+
var springs = ["spatial", "effects", "expressive"].flatMap(
|
|
11
|
+
(k) => ["fast", "default", "slow"].map((s) => `${k}-${s}`)
|
|
12
|
+
);
|
|
13
|
+
var twMerge = extendTailwindMerge({
|
|
14
|
+
extend: {
|
|
15
|
+
theme: {
|
|
16
|
+
spacing: sizes.map((s) => `control-${s}`),
|
|
17
|
+
borderRadius: ["control", "field", "container", "overlay", "tooltip", "min"].map((s) => `shape-${s}`)
|
|
18
|
+
},
|
|
19
|
+
classGroups: {
|
|
20
|
+
"font-size": [{ text: typeRoles }],
|
|
21
|
+
shadow: [{ shadow: ["elevation-0", "elevation-1", "elevation-2", "elevation-3"] }],
|
|
22
|
+
duration: [{ duration: springs }],
|
|
23
|
+
ease: [{ ease: springs }]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function cn(...inputs) {
|
|
28
|
+
return twMerge(clsx(inputs));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
cn
|
|
33
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
avatarVariants
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FHFVBOF3.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
8
8
|
|
|
9
9
|
// src/components/AvatarGroup/AvatarGroup.tsx
|
|
10
10
|
import * as React from "react";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
floatingSurface
|
|
4
|
+
} from "./chunk-KQPLFVFR.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
8
|
|
|
6
9
|
// src/components/NavigationMenu/NavigationMenu.tsx
|
|
7
10
|
import * as React from "react";
|
|
@@ -41,10 +44,9 @@ var Trigger2 = React.forwardRef(
|
|
|
41
44
|
{
|
|
42
45
|
ref,
|
|
43
46
|
className: cn(
|
|
44
|
-
"group inline-flex h-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
47
|
+
"nx-state-layer group relative inline-flex h-control-sm w-max items-center justify-center rounded-shape-control px-3.5 text-label-lg text-[var(--color-on-surface-variant)]",
|
|
48
|
+
"data-[active]:text-[var(--color-on-surface)] data-[state=open]:bg-[var(--color-secondary-container)] data-[state=open]:text-[var(--color-on-secondary-container)]",
|
|
49
|
+
"disabled:pointer-events-none disabled:text-[var(--color-text-disabled)]",
|
|
48
50
|
className
|
|
49
51
|
),
|
|
50
52
|
...props,
|
|
@@ -83,7 +85,7 @@ var Link2 = React.forwardRef(
|
|
|
83
85
|
{
|
|
84
86
|
ref,
|
|
85
87
|
className: cn(
|
|
86
|
-
"block select-none rounded-
|
|
88
|
+
"nx-state-layer relative block select-none rounded-[10px] p-3 leading-none text-[var(--color-on-surface)] no-underline outline-none",
|
|
87
89
|
className
|
|
88
90
|
),
|
|
89
91
|
...props
|
|
@@ -97,7 +99,8 @@ var Viewport2 = React.forwardRef(
|
|
|
97
99
|
{
|
|
98
100
|
ref,
|
|
99
101
|
className: cn(
|
|
100
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden
|
|
102
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden",
|
|
103
|
+
floatingSurface,
|
|
101
104
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
102
105
|
className
|
|
103
106
|
),
|