@nexub/react 1.2.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-YAGVMERC.js → chunk-AEBYQKLS.js} +47 -4
- package/dist/chunk-AHT35UWY.js +92 -0
- package/dist/chunk-B54WADL4.js +103 -0
- package/dist/{chunk-4NGB7XIM.js → chunk-BFRX6X4O.js} +29 -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-DGJE5MX5.js → chunk-LDYD7WL3.js} +5 -4
- 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-WCJNZ5ME.js → chunk-SY6V3HAK.js} +60 -20
- 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 +3 -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 +147 -42
- package/dist/index.js +144 -153
- package/package.json +10 -6
- 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,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/Toast/Toast.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -28,7 +28,9 @@ var Root2 = React.forwardRef(
|
|
|
28
28
|
{
|
|
29
29
|
ref,
|
|
30
30
|
className: cn(
|
|
31
|
-
|
|
31
|
+
// Snackbar: the inverse surface stands out from any page, light or dark.
|
|
32
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-shape-container bg-[var(--color-inverse-surface)] py-3 pl-4 pr-2 text-[var(--color-inverse-on-surface)] shadow-elevation-2",
|
|
33
|
+
"duration-spatial-default ease-spatial-default data-[state=closed]:duration-effects-fast",
|
|
32
34
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=closed]:slide-out-to-right-full",
|
|
33
35
|
className
|
|
34
36
|
),
|
|
@@ -38,7 +40,7 @@ var Root2 = React.forwardRef(
|
|
|
38
40
|
);
|
|
39
41
|
Root2.displayName = "Toast.Root";
|
|
40
42
|
var Title2 = React.forwardRef(
|
|
41
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Title, { ref, className: cn("text-sm
|
|
43
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Title, { ref, className: cn("text-title-sm", className), ...props })
|
|
42
44
|
);
|
|
43
45
|
Title2.displayName = "Toast.Title";
|
|
44
46
|
var Description2 = React.forwardRef(
|
|
@@ -46,7 +48,7 @@ var Description2 = React.forwardRef(
|
|
|
46
48
|
RadixToast.Description,
|
|
47
49
|
{
|
|
48
50
|
ref,
|
|
49
|
-
className: cn("text-sm text-[var(--color-
|
|
51
|
+
className: cn("text-body-sm text-[color-mix(in_srgb,var(--color-inverse-on-surface)_80%,transparent)]", className),
|
|
50
52
|
...props
|
|
51
53
|
}
|
|
52
54
|
)
|
|
@@ -58,7 +60,7 @@ var Action2 = React.forwardRef(
|
|
|
58
60
|
{
|
|
59
61
|
ref,
|
|
60
62
|
className: cn(
|
|
61
|
-
"inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-
|
|
63
|
+
"nx-state-layer relative inline-flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center rounded-shape-control px-3 text-label-lg text-[var(--color-inverse-primary)]",
|
|
62
64
|
className
|
|
63
65
|
),
|
|
64
66
|
...props
|
|
@@ -67,7 +69,7 @@ var Action2 = React.forwardRef(
|
|
|
67
69
|
);
|
|
68
70
|
Action2.displayName = "Toast.Action";
|
|
69
71
|
var Close2 = React.forwardRef(
|
|
70
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Close, { ref, className: cn("
|
|
72
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Close, { ref, className: cn("nx-state-layer relative grid h-8 w-8 place-items-center rounded-full", className), ...props })
|
|
71
73
|
);
|
|
72
74
|
Close2.displayName = "Toast.Close";
|
|
73
75
|
var Toast = { Provider: Provider2, Viewport: Viewport2, Root: Root2, Title: Title2, Description: Description2, Action: Action2, Close: Close2 };
|
|
@@ -134,7 +136,8 @@ function Toaster() {
|
|
|
134
136
|
RadixToast2.Root,
|
|
135
137
|
{
|
|
136
138
|
className: cn(
|
|
137
|
-
"group pointer-events-auto relative flex w-full items-center justify-between gap-
|
|
139
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-shape-container bg-[var(--color-inverse-surface)] py-3 pl-4 pr-2 text-[var(--color-inverse-on-surface)] shadow-elevation-2",
|
|
140
|
+
"duration-spatial-default ease-spatial-default data-[state=closed]:duration-effects-fast",
|
|
138
141
|
"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none",
|
|
139
142
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=closed]:slide-out-to-right-full",
|
|
140
143
|
toneMap[t.tone ?? "neutral"]
|
|
@@ -142,8 +145,8 @@ function Toaster() {
|
|
|
142
145
|
duration: t.duration ?? 5e3,
|
|
143
146
|
children: [
|
|
144
147
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
145
|
-
/* @__PURE__ */ jsx2(RadixToast2.Title, { className: "text-sm
|
|
146
|
-
t.description && /* @__PURE__ */ jsx2(RadixToast2.Description, { className: "text-sm text-[var(--color-
|
|
148
|
+
/* @__PURE__ */ jsx2(RadixToast2.Title, { className: "text-title-sm", children: t.title }),
|
|
149
|
+
t.description && /* @__PURE__ */ jsx2(RadixToast2.Description, { className: "text-body-sm text-[color-mix(in_srgb,var(--color-inverse-on-surface)_80%,transparent)]", children: t.description })
|
|
147
150
|
] }),
|
|
148
151
|
t.action && /* @__PURE__ */ jsx2(
|
|
149
152
|
RadixToast2.Action,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useClassScrollLock
|
|
4
|
+
} from "./chunk-47UGX37F.js";
|
|
5
|
+
import {
|
|
6
|
+
enterExit,
|
|
7
|
+
overlaySurface
|
|
8
|
+
} from "./chunk-KQPLFVFR.js";
|
|
9
|
+
import {
|
|
10
|
+
cn
|
|
11
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
12
|
+
|
|
13
|
+
// src/components/CommandPalette/CommandPalette.tsx
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
16
|
+
import { Command } from "cmdk";
|
|
17
|
+
import { Search } from "@nexub/icons";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var overlayClasses = "fixed inset-0 z-[var(--z-modal)] bg-[color-mix(in_srgb,#000_40%,transparent)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 duration-effects-default ease-effects-default";
|
|
20
|
+
function ClassLockOverlay() {
|
|
21
|
+
useClassScrollLock();
|
|
22
|
+
return /* @__PURE__ */ jsx("div", { "data-state": "open", className: overlayClasses });
|
|
23
|
+
}
|
|
24
|
+
var Root2 = React.forwardRef(
|
|
25
|
+
({ children, label = "Command palette", scrollLock = "style", shouldFilter, ...props }, ref) => {
|
|
26
|
+
const returnFocusRef = React.useRef(null);
|
|
27
|
+
return /* @__PURE__ */ jsx(RadixDialog.Root, { ...props, children: /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
|
|
28
|
+
scrollLock === "class" ? /* @__PURE__ */ jsx(ClassLockOverlay, {}) : /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: overlayClasses }),
|
|
29
|
+
/* @__PURE__ */ jsxs(
|
|
30
|
+
RadixDialog.Content,
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
"aria-describedby": void 0,
|
|
34
|
+
onOpenAutoFocus: () => {
|
|
35
|
+
returnFocusRef.current = document.activeElement;
|
|
36
|
+
},
|
|
37
|
+
onCloseAutoFocus: (e) => {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
returnFocusRef.current?.focus();
|
|
40
|
+
},
|
|
41
|
+
className: cn(
|
|
42
|
+
"fixed left-1/2 top-[20%] z-[var(--z-modal)] w-[calc(100%-2rem)] max-w-xl -translate-x-1/2",
|
|
43
|
+
"overflow-hidden",
|
|
44
|
+
overlaySurface,
|
|
45
|
+
enterExit,
|
|
46
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
47
|
+
"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
48
|
+
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
49
|
+
),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(RadixDialog.Title, { className: "sr-only", children: label }),
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Command,
|
|
54
|
+
{
|
|
55
|
+
label,
|
|
56
|
+
shouldFilter,
|
|
57
|
+
loop: true,
|
|
58
|
+
className: "flex h-full w-full flex-col overflow-hidden text-[var(--color-text-primary)]",
|
|
59
|
+
children
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }) });
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
Root2.displayName = "CommandPalette.Root";
|
|
69
|
+
var Input = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-[var(--color-border-default)] px-3", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Search, { size: "sm", className: "mr-2 shrink-0 opacity-50", "aria-hidden": "true" }),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
Command.Input,
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
className: cn(
|
|
76
|
+
"flex h-control-xl w-full bg-transparent text-body-lg outline-none placeholder:text-[var(--color-text-placeholder)] disabled:cursor-not-allowed disabled:text-[var(--color-text-disabled)]",
|
|
77
|
+
className
|
|
78
|
+
),
|
|
79
|
+
...props
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }));
|
|
83
|
+
Input.displayName = "CommandPalette.Input";
|
|
84
|
+
var List = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
85
|
+
Command.List,
|
|
86
|
+
{
|
|
87
|
+
ref,
|
|
88
|
+
className: cn("max-h-[400px] overflow-y-auto overflow-x-hidden p-2", className),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
List.displayName = "CommandPalette.List";
|
|
93
|
+
var Empty = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
94
|
+
Command.Empty,
|
|
95
|
+
{
|
|
96
|
+
ref,
|
|
97
|
+
className: cn(
|
|
98
|
+
"py-8 text-center text-body-sm text-[var(--color-on-surface-muted)]",
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
...props
|
|
102
|
+
}
|
|
103
|
+
));
|
|
104
|
+
Empty.displayName = "CommandPalette.Empty";
|
|
105
|
+
var Group = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
106
|
+
Command.Group,
|
|
107
|
+
{
|
|
108
|
+
ref,
|
|
109
|
+
className: cn(
|
|
110
|
+
"overflow-hidden p-2 text-[var(--color-on-surface)]",
|
|
111
|
+
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-label-sm [&_[cmdk-group-heading]]:text-[var(--color-on-surface-muted)]",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
...props
|
|
115
|
+
}
|
|
116
|
+
));
|
|
117
|
+
Group.displayName = "CommandPalette.Group";
|
|
118
|
+
var Item = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
119
|
+
Command.Item,
|
|
120
|
+
{
|
|
121
|
+
ref,
|
|
122
|
+
className: cn(
|
|
123
|
+
// Concentric: overlay 24px − 8px padding = 16px.
|
|
124
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-shape-container px-3 py-2.5 text-body-sm outline-none",
|
|
125
|
+
"aria-selected:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
126
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:text-[var(--color-text-disabled)]",
|
|
127
|
+
className
|
|
128
|
+
),
|
|
129
|
+
...props
|
|
130
|
+
}
|
|
131
|
+
));
|
|
132
|
+
Item.displayName = "CommandPalette.Item";
|
|
133
|
+
var Separator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
134
|
+
Command.Separator,
|
|
135
|
+
{
|
|
136
|
+
ref,
|
|
137
|
+
className: cn("-mx-1 my-1 h-px bg-[var(--color-border-default)]", className),
|
|
138
|
+
...props
|
|
139
|
+
}
|
|
140
|
+
));
|
|
141
|
+
Separator.displayName = "CommandPalette.Separator";
|
|
142
|
+
var CommandPalette = { Root: Root2, Input, List, Empty, Group, Item, Separator };
|
|
143
|
+
|
|
144
|
+
export {
|
|
145
|
+
CommandPalette
|
|
146
|
+
};
|
|
@@ -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/DropdownMenu/DropdownMenu.tsx
|
|
7
15
|
import * as React from "react";
|
|
@@ -22,8 +30,10 @@ var Content2 = React.forwardRef(
|
|
|
22
30
|
ref,
|
|
23
31
|
sideOffset,
|
|
24
32
|
className: cn(
|
|
25
|
-
"z-[var(--z-popover)] min-w-48
|
|
26
|
-
|
|
33
|
+
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
34
|
+
floatingSurface,
|
|
35
|
+
menuContent,
|
|
36
|
+
enterExit,
|
|
27
37
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
28
38
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
29
39
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -38,9 +48,7 @@ var Content2 = React.forwardRef(
|
|
|
38
48
|
);
|
|
39
49
|
Content2.displayName = "DropdownMenu.Content";
|
|
40
50
|
var itemBaseClasses = cn(
|
|
41
|
-
|
|
42
|
-
"transition-colors hover:bg-[var(--color-bg-subtle)] focus:bg-[var(--color-bg-subtle)]",
|
|
43
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
51
|
+
menuItem
|
|
44
52
|
);
|
|
45
53
|
var Item2 = React.forwardRef(
|
|
46
54
|
function DropdownMenuItem({ className, ...props }, ref) {
|
|
@@ -62,7 +70,7 @@ var Label2 = React.forwardRef(
|
|
|
62
70
|
{
|
|
63
71
|
ref,
|
|
64
72
|
className: cn(
|
|
65
|
-
|
|
73
|
+
menuLabel,
|
|
66
74
|
className
|
|
67
75
|
),
|
|
68
76
|
...props
|
|
@@ -77,7 +85,7 @@ var Separator2 = React.forwardRef(
|
|
|
77
85
|
RadixDropdownMenu.Separator,
|
|
78
86
|
{
|
|
79
87
|
ref,
|
|
80
|
-
className: cn(
|
|
88
|
+
className: cn(menuSeparator, className),
|
|
81
89
|
...props
|
|
82
90
|
}
|
|
83
91
|
);
|
|
@@ -122,7 +130,7 @@ var SubTrigger2 = React.forwardRef(function DropdownMenuSubTrigger({ className,
|
|
|
122
130
|
ref,
|
|
123
131
|
className: cn(
|
|
124
132
|
itemBaseClasses,
|
|
125
|
-
"data-[state=open]:bg-[var(--color-
|
|
133
|
+
"data-[state=open]:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
126
134
|
className
|
|
127
135
|
),
|
|
128
136
|
...props,
|
|
@@ -140,8 +148,10 @@ var SubContent2 = React.forwardRef(function DropdownMenuSubContent({ className,
|
|
|
140
148
|
{
|
|
141
149
|
ref,
|
|
142
150
|
className: cn(
|
|
143
|
-
"z-[var(--z-popover)] min-w-48
|
|
144
|
-
|
|
151
|
+
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
152
|
+
floatingSurface,
|
|
153
|
+
menuContent,
|
|
154
|
+
enterExit,
|
|
145
155
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
146
156
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
147
157
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Input
|
|
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/PasswordInput/PasswordInput.tsx
|
|
10
10
|
import * as React from "react";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useIsomorphicLayoutEffect
|
|
4
|
+
} from "./chunk-NHUQLIHL.js";
|
|
5
|
+
|
|
6
|
+
// src/hooks/useMergedRefs.ts
|
|
7
|
+
import { useCallback, useRef } from "react";
|
|
8
|
+
function setRef(ref, value) {
|
|
9
|
+
if (!ref) return;
|
|
10
|
+
if (typeof ref === "function") {
|
|
11
|
+
ref(value);
|
|
12
|
+
} else {
|
|
13
|
+
ref.current = value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function useMergedRefs(...refs) {
|
|
17
|
+
const refsRef = useRef(refs);
|
|
18
|
+
refsRef.current = refs;
|
|
19
|
+
return useCallback((node) => {
|
|
20
|
+
for (const ref of refsRef.current) setRef(ref, node);
|
|
21
|
+
}, []);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/hooks/useSlidingIndicator.ts
|
|
25
|
+
function useSlidingIndicator(ref, activeSelector) {
|
|
26
|
+
useIsomorphicLayoutEffect(() => {
|
|
27
|
+
const root = ref.current;
|
|
28
|
+
if (!root) return;
|
|
29
|
+
const update = () => {
|
|
30
|
+
const el = root.querySelector(activeSelector);
|
|
31
|
+
root.style.setProperty("--nx-ind-o", el ? "1" : "0");
|
|
32
|
+
if (!el) return;
|
|
33
|
+
root.style.setProperty("--nx-ind-x", `${el.offsetLeft}px`);
|
|
34
|
+
root.style.setProperty("--nx-ind-w", `${el.offsetWidth}px`);
|
|
35
|
+
};
|
|
36
|
+
update();
|
|
37
|
+
const frame = requestAnimationFrame(() => root.dataset.nxIndicator = "ready");
|
|
38
|
+
const mo = new MutationObserver(update);
|
|
39
|
+
mo.observe(root, { subtree: true, attributes: true, attributeFilter: ["data-state"] });
|
|
40
|
+
const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(update);
|
|
41
|
+
ro?.observe(root);
|
|
42
|
+
for (const child of Array.from(root.children)) ro?.observe(child);
|
|
43
|
+
void document.fonts?.ready.then(update);
|
|
44
|
+
return () => {
|
|
45
|
+
cancelAnimationFrame(frame);
|
|
46
|
+
mo.disconnect();
|
|
47
|
+
ro?.disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, [ref, activeSelector]);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
useMergedRefs,
|
|
54
|
+
useSlidingIndicator
|
|
55
|
+
};
|
|
@@ -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/Combobox/Combobox.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -13,7 +13,7 @@ var Root = React.forwardRef(
|
|
|
13
13
|
{
|
|
14
14
|
ref,
|
|
15
15
|
className: cn(
|
|
16
|
-
"flex h-full w-full flex-col overflow-hidden rounded-
|
|
16
|
+
"flex h-full w-full flex-col overflow-hidden rounded-shape-container bg-[var(--color-surface-container-lowest)] text-[var(--color-on-surface)]",
|
|
17
17
|
className
|
|
18
18
|
),
|
|
19
19
|
...props
|
|
@@ -22,12 +22,12 @@ var Root = React.forwardRef(
|
|
|
22
22
|
);
|
|
23
23
|
Root.displayName = "Combobox.Root";
|
|
24
24
|
var Input = React.forwardRef(
|
|
25
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "flex items-center border-b border-[var(--color-
|
|
25
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "flex items-center border-b border-[var(--color-outline-variant)] px-3.5", children: /* @__PURE__ */ jsx(
|
|
26
26
|
Command.Input,
|
|
27
27
|
{
|
|
28
28
|
ref,
|
|
29
29
|
className: cn(
|
|
30
|
-
"flex h-
|
|
30
|
+
"flex h-control-md w-full bg-transparent text-body-md outline-none placeholder:text-[var(--color-text-placeholder)] disabled:cursor-not-allowed disabled:text-[var(--color-text-disabled)]",
|
|
31
31
|
className
|
|
32
32
|
),
|
|
33
33
|
...props
|
|
@@ -51,7 +51,7 @@ var Empty = React.forwardRef(
|
|
|
51
51
|
Command.Empty,
|
|
52
52
|
{
|
|
53
53
|
ref,
|
|
54
|
-
className: cn("py-6 text-center text-sm text-[var(--color-
|
|
54
|
+
className: cn("py-6 text-center text-body-sm text-[var(--color-on-surface-muted)]", className),
|
|
55
55
|
...props
|
|
56
56
|
}
|
|
57
57
|
)
|
|
@@ -77,9 +77,10 @@ var Item = React.forwardRef(
|
|
|
77
77
|
{
|
|
78
78
|
ref,
|
|
79
79
|
className: cn(
|
|
80
|
-
"relative flex cursor-default select-none items-center rounded-
|
|
81
|
-
|
|
82
|
-
"
|
|
80
|
+
"relative flex cursor-default select-none items-center rounded-lg px-2.5 py-2 text-body-sm outline-none",
|
|
81
|
+
// Highlight = the on-surface state layer at hover opacity.
|
|
82
|
+
"aria-selected:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
83
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:text-[var(--color-text-disabled)]",
|
|
83
84
|
className
|
|
84
85
|
),
|
|
85
86
|
...props
|
|
@@ -92,7 +93,7 @@ var Separator = React.forwardRef(
|
|
|
92
93
|
Command.Separator,
|
|
93
94
|
{
|
|
94
95
|
ref,
|
|
95
|
-
className: cn("-mx-1 my-1 h-px bg-[var(--color-
|
|
96
|
+
className: cn("-mx-1 my-1 h-px bg-[var(--color-outline-variant)]", className),
|
|
96
97
|
...props
|
|
97
98
|
}
|
|
98
99
|
)
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
AlertDialog
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-RHOYF7MO.js";
|
|
5
|
+
import "../../chunk-KQPLFVFR.js";
|
|
6
|
+
import "../../chunk-LMPGHWUA.js";
|
|
7
|
+
import "../../chunk-7SXR4PGO.js";
|
|
8
|
+
import "../../chunk-DEIBF3P7.js";
|
|
9
|
+
import "../../chunk-Q7G5WGYV.js";
|
|
6
10
|
export {
|
|
7
11
|
AlertDialog
|
|
8
12
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Autocomplete
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-TEOLG3N2.js";
|
|
5
|
+
import "../../chunk-Z3IG5WRA.js";
|
|
6
|
+
import "../../chunk-Q7G5WGYV.js";
|
|
7
7
|
export {
|
|
8
8
|
Autocomplete
|
|
9
9
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AvatarGroup,
|
|
4
4
|
avatarGroupVariants
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-QCNLE27O.js";
|
|
6
|
+
import "../../chunk-FHFVBOF3.js";
|
|
7
|
+
import "../../chunk-Q7G5WGYV.js";
|
|
8
8
|
export {
|
|
9
9
|
AvatarGroup,
|
|
10
10
|
avatarGroupVariants
|