@nexub/react 1.0.0 → 1.2.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-24CZFBTG.js +83 -0
- package/dist/chunk-2RLSIOGB.js +173 -0
- package/dist/chunk-2VDP2ML4.js +105 -0
- package/dist/chunk-3CSKW56L.js +44 -0
- package/dist/chunk-3U54QLYB.js +87 -0
- package/dist/chunk-46CFSBEO.js +48 -0
- package/dist/chunk-4NGB7XIM.js +88 -0
- package/dist/chunk-4OCXGNP3.js +85 -0
- package/dist/chunk-52KTX5A7.js +119 -0
- package/dist/chunk-6AZP6VBM.js +62 -0
- package/dist/chunk-6Y734SXN.js +51 -0
- package/dist/chunk-7B4FS7VQ.js +150 -0
- package/dist/chunk-7W2YDJ5W.js +128 -0
- package/dist/chunk-A7L75YXY.js +61 -0
- package/dist/chunk-ADO2DB6Q.js +1 -0
- package/dist/chunk-AT6RPKU3.js +12 -0
- package/dist/chunk-BBVOB4EC.js +36 -0
- package/dist/chunk-BGY23Y5O.js +104 -0
- package/dist/chunk-BJKW3G2L.js +99 -0
- package/dist/chunk-BMVAZIAJ.js +187 -0
- package/dist/chunk-BTZW34TX.js +76 -0
- package/dist/chunk-BUBYXAJK.js +20 -0
- package/dist/chunk-BV3U3ATL.js +1 -0
- package/dist/chunk-BYCTJHXY.js +75 -0
- package/dist/chunk-BYF223HT.js +92 -0
- package/dist/chunk-CPV367VS.js +106 -0
- package/dist/chunk-CVBAWKNG.js +124 -0
- package/dist/chunk-CZUNTABW.js +25 -0
- package/dist/chunk-DAXDAFNG.js +92 -0
- package/dist/chunk-DD6XCW6R.js +53 -0
- package/dist/chunk-DEH2Z27F.js +50 -0
- package/dist/chunk-DGJE5MX5.js +102 -0
- package/dist/chunk-DOHXBNOP.js +119 -0
- package/dist/chunk-DR2Y3PIT.js +91 -0
- package/dist/chunk-ELC2NBGH.js +89 -0
- package/dist/chunk-EV43I5J6.js +1 -0
- package/dist/chunk-EVCTOIRS.js +66 -0
- package/dist/chunk-FS4XKWFA.js +308 -0
- package/dist/chunk-FUJOSPNQ.js +38 -0
- package/dist/chunk-GTQIA62H.js +60 -0
- package/dist/chunk-H4MXRAXP.js +37 -0
- package/dist/chunk-HW3I7I3R.js +29 -0
- package/dist/chunk-HY3JWSG4.js +1 -0
- package/dist/chunk-I5Z3A7N3.js +40 -0
- package/dist/chunk-IBCYG6HR.js +55 -0
- package/dist/chunk-IHW2L532.js +175 -0
- package/dist/chunk-IU76LV3W.js +101 -0
- package/dist/chunk-IZ6ZPEZ2.js +1 -0
- package/dist/chunk-JCUVWDUC.js +57 -0
- package/dist/chunk-JKTZMWWC.js +63 -0
- package/dist/chunk-JQDLCN5D.js +66 -0
- package/dist/chunk-K7CUCLLI.js +43 -0
- package/dist/chunk-KBB7M6WO.js +65 -0
- package/dist/chunk-KLTQJZOX.js +1 -0
- package/dist/chunk-KWWV3CM3.js +62 -0
- package/dist/chunk-KZW37FQZ.js +40 -0
- package/dist/chunk-LAWZQ6R6.js +76 -0
- package/dist/chunk-LOP63AVE.js +49 -0
- package/dist/chunk-MY6XUJ5P.js +216 -0
- package/dist/chunk-N2GIMMTF.js +98 -0
- package/dist/chunk-NAIZ7R2L.js +59 -0
- package/dist/chunk-NHUQLIHL.js +9 -0
- package/dist/chunk-NZ7UK3G6.js +1 -0
- package/dist/chunk-OUBBOOZE.js +34 -0
- package/dist/chunk-OZPPL76D.js +82 -0
- package/dist/chunk-P6BZNFVU.js +38 -0
- package/dist/chunk-PANDAMD2.js +54 -0
- package/dist/chunk-PBLEGOLM.js +71 -0
- package/dist/chunk-PER3O4FD.js +33 -0
- package/dist/chunk-PICMOOAZ.js +1 -0
- package/dist/chunk-POBSY7EZ.js +155 -0
- package/dist/chunk-POFKKYHY.js +37 -0
- package/dist/chunk-QF7GUDOE.js +67 -0
- package/dist/chunk-QHJ43Q2T.js +70 -0
- package/dist/chunk-QRZV2FLW.js +106 -0
- package/dist/chunk-QURKXXNS.js +46 -0
- package/dist/chunk-RIDDJUPA.js +122 -0
- package/dist/chunk-ROZVVWPV.js +8 -0
- package/dist/chunk-SZKUSLHI.js +176 -0
- package/dist/chunk-T4IVMVMQ.js +32 -0
- package/dist/chunk-TCTFQYLH.js +115 -0
- package/dist/chunk-U3AEA4BZ.js +56 -0
- package/dist/chunk-U3EGB3JL.js +43 -0
- package/dist/chunk-UALYS4XI.js +67 -0
- package/dist/chunk-UTBUIBEP.js +153 -0
- package/dist/chunk-UWWL5FPC.js +80 -0
- package/dist/chunk-V3FZHIEB.js +52 -0
- package/dist/chunk-VPZCQFVY.js +33 -0
- package/dist/chunk-VT7RKY46.js +49 -0
- package/dist/chunk-W4IEXUD4.js +127 -0
- package/dist/chunk-WCJNZ5ME.js +1593 -0
- package/dist/chunk-WPPNDU2E.js +36 -0
- package/dist/chunk-XNDCVVNE.js +45 -0
- package/dist/chunk-Y45JAJKW.js +44 -0
- package/dist/chunk-YAGVMERC.js +81 -0
- package/dist/chunk-YGOR3KT7.js +46 -0
- package/dist/chunk-YJD66LTV.js +54 -0
- package/dist/chunk-YJU4ZRQZ.js +1 -0
- package/dist/chunk-YUFCNHZF.js +27 -0
- package/dist/chunk-YUNWZAAD.js +57 -0
- package/dist/chunk-ZFVBFCYV.js +84 -0
- package/dist/chunk-ZLSUVZM2.js +145 -0
- package/dist/chunk-ZXLACKEB.js +8 -0
- package/dist/components/Accordion/index.js +8 -0
- package/dist/components/Alert/index.js +10 -0
- package/dist/components/AlertDialog/index.js +8 -0
- package/dist/components/AppShell/index.js +8 -0
- package/dist/components/AspectRatio/index.js +8 -0
- package/dist/components/Autocomplete/index.js +9 -0
- package/dist/components/Avatar/index.js +11 -0
- package/dist/components/AvatarGroup/index.js +11 -0
- package/dist/components/Badge/index.js +10 -0
- package/dist/components/Banner/index.js +10 -0
- package/dist/components/Box/index.js +8 -0
- package/dist/components/Breadcrumb/index.js +8 -0
- package/dist/components/Button/index.js +10 -0
- package/dist/components/ButtonGroup/index.js +8 -0
- package/dist/components/Callout/index.js +10 -0
- package/dist/components/Card/index.js +11 -0
- package/dist/components/CheckList/index.js +10 -0
- package/dist/components/Checkbox/index.js +8 -0
- package/dist/components/Chip/index.js +10 -0
- package/dist/components/Code/index.js +8 -0
- package/dist/components/Collapsible/index.js +8 -0
- package/dist/components/Combobox/index.js +9 -0
- package/dist/components/CommandPalette/index.js +8 -0
- package/dist/components/Container/index.js +10 -0
- package/dist/components/ContextMenu/index.js +8 -0
- package/dist/components/CountryBadge/index.js +9 -0
- package/dist/components/DataTable/index.js +8 -0
- package/dist/components/DatePicker/index.js +8 -0
- package/dist/components/DateRangePicker/index.js +8 -0
- package/dist/components/Dialog/index.js +9 -0
- package/dist/components/Drawer/index.js +11 -0
- package/dist/components/DropdownMenu/index.js +8 -0
- package/dist/components/EmptyState/index.js +8 -0
- package/dist/components/ErrorState/index.js +8 -0
- package/dist/components/EyebrowChip/index.js +8 -0
- package/dist/components/FileUpload/index.js +8 -0
- package/dist/components/FilterChip/index.js +8 -0
- package/dist/components/Flag/index.js +9 -0
- package/dist/components/Flex/index.js +8 -0
- package/dist/components/FormError/index.js +9 -0
- package/dist/components/FormField/index.js +11 -0
- package/dist/components/GradientDivider/index.js +8 -0
- package/dist/components/Grid/index.js +8 -0
- package/dist/components/Heading/index.js +10 -0
- package/dist/components/HelperText/index.js +9 -0
- package/dist/components/HoverCard/index.js +8 -0
- package/dist/components/IconButton/index.js +10 -0
- package/dist/components/Input/index.js +15 -0
- package/dist/components/Kbd/index.js +9 -0
- package/dist/components/KeyboardShortcut/index.js +9 -0
- package/dist/components/Label/index.js +11 -0
- package/dist/components/Link/index.js +10 -0
- package/dist/components/Logo/index.js +10 -0
- package/dist/components/Menubar/index.js +8 -0
- package/dist/components/Motion/index.js +13 -0
- package/dist/components/NavigationMenu/index.js +8 -0
- package/dist/components/NumberInput/index.js +9 -0
- package/dist/components/PageHeader/index.js +8 -0
- package/dist/components/Pagination/index.js +8 -0
- package/dist/components/PasswordInput/index.js +9 -0
- package/dist/components/Popover/index.js +9 -0
- package/dist/components/Progress/index.js +12 -0
- package/dist/components/RadioGroup/index.js +8 -0
- package/dist/components/Rating/index.js +11 -0
- package/dist/components/ScrollArea/index.js +8 -0
- package/dist/components/SearchInput/index.js +9 -0
- package/dist/components/Section/index.js +10 -0
- package/dist/components/SegmentedControl/index.js +8 -0
- package/dist/components/Select/index.js +8 -0
- package/dist/components/Separator/index.js +10 -0
- package/dist/components/Sidebar/index.js +8 -0
- package/dist/components/Skeleton/index.js +10 -0
- package/dist/components/Slider/index.js +8 -0
- package/dist/components/Spinner/index.js +10 -0
- package/dist/components/Stack/index.js +8 -0
- package/dist/components/StatusPill/index.js +10 -0
- package/dist/components/Switch/index.js +8 -0
- package/dist/components/Table/index.js +8 -0
- package/dist/components/Tabs/index.js +8 -0
- package/dist/components/Tag/index.js +10 -0
- package/dist/components/Text/index.js +10 -0
- package/dist/components/TextGradient/index.js +8 -0
- package/dist/components/Textarea/index.js +10 -0
- package/dist/components/ThemeProvider/index.js +10 -0
- package/dist/components/Toast/index.js +14 -0
- package/dist/components/Toggle/index.js +11 -0
- package/dist/components/ToggleGroup/index.js +9 -0
- package/dist/components/Toolbar/index.js +8 -0
- package/dist/components/Tooltip/index.js +16 -0
- package/dist/components/TopNav/index.js +9 -0
- package/dist/components/VisuallyHidden/index.js +7 -0
- package/dist/index.d.ts +36 -14
- package/dist/index.js +479 -5896
- package/package.json +13 -13
- package/dist/index.cjs +0 -6112
- package/dist/index.d.cts +0 -1245
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/GradientDivider/GradientDivider.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var BRAND_GRADIENT_H = "linear-gradient(90deg, #4099f1 0%, #1cce66 40%, #f59e0b 70%, #1b3b6f 100%)";
|
|
10
|
+
var BRAND_GRADIENT_V = "linear-gradient(180deg, #4099f1 0%, #1cce66 40%, #f59e0b 70%, #1b3b6f 100%)";
|
|
11
|
+
var GradientDivider = React.forwardRef(
|
|
12
|
+
({ className, height = 3, orientation = "horizontal", style, ...props }, ref) => {
|
|
13
|
+
const isHorizontal = orientation === "horizontal";
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
role: "separator",
|
|
19
|
+
"aria-orientation": orientation,
|
|
20
|
+
className: cn(
|
|
21
|
+
isHorizontal ? "w-full" : "h-full",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
style: {
|
|
25
|
+
background: isHorizontal ? BRAND_GRADIENT_H : BRAND_GRADIENT_V,
|
|
26
|
+
...isHorizontal ? { height: `${height}px` } : { width: `${height}px` },
|
|
27
|
+
...style
|
|
28
|
+
},
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
GradientDivider.displayName = "GradientDivider";
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
GradientDivider
|
|
38
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/IconButton/IconButton.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var iconButtonVariants = cva(
|
|
12
|
+
[
|
|
13
|
+
"inline-flex items-center justify-center rounded-md transition-colors flex-shrink-0",
|
|
14
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)] focus-visible:ring-offset-2 ring-offset-[var(--color-ring-offset)]",
|
|
15
|
+
"disabled:opacity-50 disabled:pointer-events-none",
|
|
16
|
+
"select-none"
|
|
17
|
+
],
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
ghost: "bg-transparent text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]",
|
|
22
|
+
solid: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)]",
|
|
23
|
+
outline: "bg-transparent border border-[var(--color-border-default)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]",
|
|
24
|
+
subtle: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-muted)]"
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
xs: "h-7 w-7 text-xs",
|
|
28
|
+
sm: "h-8 w-8 text-sm",
|
|
29
|
+
md: "h-9 w-9 text-sm",
|
|
30
|
+
lg: "h-10 w-10 text-base",
|
|
31
|
+
xl: "h-12 w-12 text-base"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "ghost",
|
|
36
|
+
size: "md"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
var IconButton = React.forwardRef(
|
|
41
|
+
({ className, variant, size, label, asChild = false, children, ...props }, ref) => {
|
|
42
|
+
const Comp = asChild ? Slot : "button";
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
Comp,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
"aria-label": label,
|
|
48
|
+
className: cn(iconButtonVariants({ variant, size }), className),
|
|
49
|
+
...props,
|
|
50
|
+
children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
IconButton.displayName = "IconButton";
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
iconButtonVariants,
|
|
59
|
+
IconButton
|
|
60
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Collapsible/Collapsible.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixCollapsible from "@radix-ui/react-collapsible";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Root2 = React.forwardRef(
|
|
11
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixCollapsible.Root, { ref, className: cn("", className), ...props })
|
|
12
|
+
);
|
|
13
|
+
Root2.displayName = "Collapsible.Root";
|
|
14
|
+
var Trigger2 = React.forwardRef(
|
|
15
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixCollapsible.Trigger, { ref, className: cn("", className), ...props })
|
|
16
|
+
);
|
|
17
|
+
Trigger2.displayName = "Collapsible.Trigger";
|
|
18
|
+
var Content2 = React.forwardRef(
|
|
19
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
20
|
+
RadixCollapsible.Content,
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn(
|
|
24
|
+
"overflow-hidden",
|
|
25
|
+
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
26
|
+
className
|
|
27
|
+
),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
Content2.displayName = "Collapsible.Content";
|
|
33
|
+
var Collapsible = { Root: Root2, Trigger: Trigger2, Content: Content2 };
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
Collapsible
|
|
37
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/TextGradient/TextGradient.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var TextGradient = React.forwardRef(
|
|
10
|
+
({ className, children, ...rest }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"bg-[var(--gradient-brand-horizontal)] bg-clip-text text-transparent",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...rest,
|
|
20
|
+
children
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
TextGradient.displayName = "TextGradient";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
TextGradient
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
Kbd
|
|
4
|
+
} from "./chunk-PER3O4FD.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-AT6RPKU3.js";
|
|
8
|
+
|
|
9
|
+
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var KeyboardShortcut = React.forwardRef(
|
|
13
|
+
({ keys, className, ...rest }, ref) => {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"span",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
19
|
+
"aria-label": keys.join("+"),
|
|
20
|
+
...rest,
|
|
21
|
+
children: keys.map((key, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
22
|
+
index > 0 && /* @__PURE__ */ jsx(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
className: "text-[var(--color-text-muted)] text-xs select-none",
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
children: "+"
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ jsx(Kbd, { children: key })
|
|
31
|
+
] }, `${key}-${index}`))
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
KeyboardShortcut
|
|
40
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Tag/Tag.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var tagVariants = cva(
|
|
11
|
+
"inline-flex items-center rounded font-medium select-none whitespace-nowrap",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
sm: "px-1.5 py-0.5 text-xs",
|
|
16
|
+
md: "px-2 py-0.5 text-xs",
|
|
17
|
+
lg: "px-2.5 py-1 text-sm"
|
|
18
|
+
},
|
|
19
|
+
tone: {
|
|
20
|
+
neutral: "bg-[var(--color-neutral-100)] text-[var(--color-neutral-700)]",
|
|
21
|
+
info: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-semantic-info-default)]",
|
|
22
|
+
success: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-semantic-success-default)]",
|
|
23
|
+
warning: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-semantic-warning-default)]",
|
|
24
|
+
danger: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-semantic-error-default)]",
|
|
25
|
+
leap: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)]",
|
|
26
|
+
bookub: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)]",
|
|
27
|
+
payub: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)]",
|
|
28
|
+
founderub: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)]"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
size: "md",
|
|
33
|
+
tone: "neutral"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
var Tag = React.forwardRef(
|
|
38
|
+
({ className, size, tone = "neutral", children, ...props }, ref) => {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn(tagVariants({ size, tone }), className),
|
|
44
|
+
...props,
|
|
45
|
+
children
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
Tag.displayName = "Tag";
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
tagVariants,
|
|
54
|
+
Tag
|
|
55
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Toast/Toast.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixToast from "@radix-ui/react-toast";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Provider2 = RadixToast.Provider;
|
|
11
|
+
var Viewport2 = React.forwardRef(
|
|
12
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
13
|
+
RadixToast.Viewport,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn(
|
|
17
|
+
"fixed top-0 right-0 z-[var(--z-toast,2000)] flex max-h-screen w-full flex-col-reverse p-4 sm:max-w-sm gap-2",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
Viewport2.displayName = "Toast.Viewport";
|
|
25
|
+
var Root2 = React.forwardRef(
|
|
26
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
+
RadixToast.Root,
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(
|
|
31
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-2 overflow-hidden rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] p-4 shadow-md transition-all",
|
|
32
|
+
"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
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
Root2.displayName = "Toast.Root";
|
|
40
|
+
var Title2 = React.forwardRef(
|
|
41
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Title, { ref, className: cn("text-sm font-semibold", className), ...props })
|
|
42
|
+
);
|
|
43
|
+
Title2.displayName = "Toast.Title";
|
|
44
|
+
var Description2 = React.forwardRef(
|
|
45
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
46
|
+
RadixToast.Description,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("text-sm text-[var(--color-text-muted)]", className),
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
Description2.displayName = "Toast.Description";
|
|
55
|
+
var Action2 = React.forwardRef(
|
|
56
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
57
|
+
RadixToast.Action,
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
className: cn(
|
|
61
|
+
"inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md border px-3 text-xs font-medium transition-colors hover:bg-[var(--color-bg-subtle)]",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
Action2.displayName = "Toast.Action";
|
|
69
|
+
var Close2 = React.forwardRef(
|
|
70
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToast.Close, { ref, className: cn("rounded p-1", className), ...props })
|
|
71
|
+
);
|
|
72
|
+
Close2.displayName = "Toast.Close";
|
|
73
|
+
var Toast = { Provider: Provider2, Viewport: Viewport2, Root: Root2, Title: Title2, Description: Description2, Action: Action2, Close: Close2 };
|
|
74
|
+
|
|
75
|
+
// src/components/Toast/Toaster.tsx
|
|
76
|
+
import "react";
|
|
77
|
+
import * as RadixToast2 from "@radix-ui/react-toast";
|
|
78
|
+
import { X } from "@nexub/icons";
|
|
79
|
+
|
|
80
|
+
// src/components/Toast/useToast.ts
|
|
81
|
+
import { useState, useEffect } from "react";
|
|
82
|
+
var g = typeof window !== "undefined" ? (() => {
|
|
83
|
+
const _g = globalThis;
|
|
84
|
+
_g.__nexub_toast_items ??= [];
|
|
85
|
+
_g.__nexub_toast_listeners ??= /* @__PURE__ */ new Set();
|
|
86
|
+
_g.__nexub_toast_counter ??= 0;
|
|
87
|
+
return _g;
|
|
88
|
+
})() : { __nexub_toast_items: [], __nexub_toast_listeners: /* @__PURE__ */ new Set(), __nexub_toast_counter: 0 };
|
|
89
|
+
function notify() {
|
|
90
|
+
g.__nexub_toast_listeners.forEach((l) => l([...g.__nexub_toast_items]));
|
|
91
|
+
}
|
|
92
|
+
function add(item) {
|
|
93
|
+
const id = String(++g.__nexub_toast_counter);
|
|
94
|
+
g.__nexub_toast_items = [...g.__nexub_toast_items, { ...item, id }];
|
|
95
|
+
notify();
|
|
96
|
+
return id;
|
|
97
|
+
}
|
|
98
|
+
function useToastStore() {
|
|
99
|
+
const [state, setState] = useState([...g.__nexub_toast_items]);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
g.__nexub_toast_listeners.add(setState);
|
|
102
|
+
return () => {
|
|
103
|
+
g.__nexub_toast_listeners.delete(setState);
|
|
104
|
+
};
|
|
105
|
+
}, []);
|
|
106
|
+
return state;
|
|
107
|
+
}
|
|
108
|
+
function dismiss(id) {
|
|
109
|
+
g.__nexub_toast_items = id ? g.__nexub_toast_items.filter((i) => i.id !== id) : [];
|
|
110
|
+
notify();
|
|
111
|
+
}
|
|
112
|
+
var toast = {
|
|
113
|
+
success: (title, opts) => add({ title, tone: "success", ...opts }),
|
|
114
|
+
error: (title, opts) => add({ title, tone: "error", ...opts }),
|
|
115
|
+
info: (title, opts) => add({ title, tone: "info", ...opts }),
|
|
116
|
+
warning: (title, opts) => add({ title, tone: "warning", ...opts }),
|
|
117
|
+
custom: (title, opts) => add({ title, tone: "neutral", ...opts }),
|
|
118
|
+
dismiss
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// src/components/Toast/Toaster.tsx
|
|
122
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
123
|
+
var toneMap = {
|
|
124
|
+
success: "border-l-4 border-[var(--color-semantic-success-default)]",
|
|
125
|
+
error: "border-l-4 border-[var(--color-semantic-error-default)]",
|
|
126
|
+
warning: "border-l-4 border-[var(--color-semantic-warning-default)]",
|
|
127
|
+
info: "border-l-4 border-[var(--color-semantic-info-default)]",
|
|
128
|
+
neutral: ""
|
|
129
|
+
};
|
|
130
|
+
function Toaster() {
|
|
131
|
+
const toasts = useToastStore();
|
|
132
|
+
return /* @__PURE__ */ jsxs(RadixToast2.Provider, { swipeDirection: "right", children: [
|
|
133
|
+
toasts.map((t) => /* @__PURE__ */ jsxs(
|
|
134
|
+
RadixToast2.Root,
|
|
135
|
+
{
|
|
136
|
+
className: cn(
|
|
137
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-2 overflow-hidden rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] p-4 shadow-md transition-all",
|
|
138
|
+
"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
|
+
"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
|
+
toneMap[t.tone ?? "neutral"]
|
|
141
|
+
),
|
|
142
|
+
duration: t.duration ?? 5e3,
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
145
|
+
/* @__PURE__ */ jsx2(RadixToast2.Title, { className: "text-sm font-semibold", children: t.title }),
|
|
146
|
+
t.description && /* @__PURE__ */ jsx2(RadixToast2.Description, { className: "text-sm text-[var(--color-text-muted)]", children: t.description })
|
|
147
|
+
] }),
|
|
148
|
+
t.action && /* @__PURE__ */ jsx2(
|
|
149
|
+
RadixToast2.Action,
|
|
150
|
+
{
|
|
151
|
+
altText: t.action.label,
|
|
152
|
+
onClick: t.action.onClick,
|
|
153
|
+
className: "shrink-0 rounded-md border border-[var(--color-border-default)] px-3 py-1.5 text-sm font-medium hover:bg-[var(--color-bg-subtle)] focus:outline-none focus:ring-2 focus:ring-[var(--color-ring-default)]",
|
|
154
|
+
children: t.action.label
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ jsxs(RadixToast2.Close, { className: "rounded-md p-1 transition-opacity [@media(hover:hover)]:opacity-0 group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--color-ring-default)]", children: [
|
|
158
|
+
/* @__PURE__ */ jsx2(X, { size: "sm", "aria-hidden": "true" }),
|
|
159
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
|
|
160
|
+
] })
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
t.id
|
|
164
|
+
)),
|
|
165
|
+
/* @__PURE__ */ jsx2(RadixToast2.Viewport, { className: "fixed top-0 right-0 z-[var(--z-toast,2000)] flex max-h-screen w-full flex-col-reverse p-4 sm:max-w-sm gap-2" })
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
Toaster.displayName = "Toaster";
|
|
169
|
+
|
|
170
|
+
export {
|
|
171
|
+
Toast,
|
|
172
|
+
useToastStore,
|
|
173
|
+
toast,
|
|
174
|
+
Toaster
|
|
175
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
Label
|
|
4
|
+
} from "./chunk-JKTZMWWC.js";
|
|
5
|
+
import {
|
|
6
|
+
FormError
|
|
7
|
+
} from "./chunk-OUBBOOZE.js";
|
|
8
|
+
import {
|
|
9
|
+
HelperText
|
|
10
|
+
} from "./chunk-T4IVMVMQ.js";
|
|
11
|
+
import {
|
|
12
|
+
cn
|
|
13
|
+
} from "./chunk-AT6RPKU3.js";
|
|
14
|
+
|
|
15
|
+
// src/components/FormField/FormField.tsx
|
|
16
|
+
import * as React from "react";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
var FormFieldContext = React.createContext(null);
|
|
19
|
+
function useFormField() {
|
|
20
|
+
const ctx = React.useContext(FormFieldContext);
|
|
21
|
+
if (!ctx) {
|
|
22
|
+
throw new Error("FormField parts must be used inside <FormField.Root>");
|
|
23
|
+
}
|
|
24
|
+
return ctx;
|
|
25
|
+
}
|
|
26
|
+
var Root = React.forwardRef(function Root2({ id: idProp, name, invalid, required, disabled, className, children, ...props }, ref) {
|
|
27
|
+
const generatedId = React.useId();
|
|
28
|
+
const id = idProp ?? generatedId;
|
|
29
|
+
const value = React.useMemo(
|
|
30
|
+
() => ({
|
|
31
|
+
id,
|
|
32
|
+
name,
|
|
33
|
+
invalid,
|
|
34
|
+
required,
|
|
35
|
+
disabled,
|
|
36
|
+
descriptionId: `${id}-description`,
|
|
37
|
+
errorId: `${id}-error`
|
|
38
|
+
}),
|
|
39
|
+
[id, name, invalid, required, disabled]
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5", className), ...props, children }) });
|
|
42
|
+
});
|
|
43
|
+
Root.displayName = "FormField.Root";
|
|
44
|
+
function FieldLabel({
|
|
45
|
+
className,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
const { id, required, disabled } = useFormField();
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
Label,
|
|
52
|
+
{
|
|
53
|
+
htmlFor: id,
|
|
54
|
+
required,
|
|
55
|
+
disabled,
|
|
56
|
+
className,
|
|
57
|
+
...props,
|
|
58
|
+
children
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
FieldLabel.displayName = "FormField.Label";
|
|
63
|
+
function Control({ children }) {
|
|
64
|
+
const { id, name, invalid, required, disabled, descriptionId, errorId } = useFormField();
|
|
65
|
+
const describedBy = [descriptionId, invalid ? errorId : null].filter(Boolean).join(" ") || void 0;
|
|
66
|
+
return React.cloneElement(children, {
|
|
67
|
+
id,
|
|
68
|
+
name: children.props["name"] ?? name,
|
|
69
|
+
invalid: children.props["invalid"] ?? invalid,
|
|
70
|
+
required: children.props["required"] ?? required,
|
|
71
|
+
disabled: children.props["disabled"] ?? disabled,
|
|
72
|
+
"aria-describedby": describedBy,
|
|
73
|
+
"aria-invalid": invalid ?? void 0,
|
|
74
|
+
"aria-required": required ?? void 0
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
Control.displayName = "FormField.Control";
|
|
78
|
+
function Description({
|
|
79
|
+
className,
|
|
80
|
+
children,
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
const { descriptionId } = useFormField();
|
|
84
|
+
return /* @__PURE__ */ jsx(HelperText, { id: descriptionId, className, ...props, children });
|
|
85
|
+
}
|
|
86
|
+
Description.displayName = "FormField.Description";
|
|
87
|
+
function FieldError({
|
|
88
|
+
className,
|
|
89
|
+
children,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
const { errorId, invalid } = useFormField();
|
|
93
|
+
if (!invalid) return null;
|
|
94
|
+
return /* @__PURE__ */ jsx(FormError, { id: errorId, className, ...props, children });
|
|
95
|
+
}
|
|
96
|
+
FieldError.displayName = "FormField.Error";
|
|
97
|
+
var FormField = { Root, Label: FieldLabel, Control, Description, Error: FieldError };
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
FormField
|
|
101
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixToggleGroup from "@radix-ui/react-toggle-group";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var sizeMap = {
|
|
11
|
+
sm: "h-7 px-2.5 text-xs",
|
|
12
|
+
md: "h-8 px-3 text-sm",
|
|
13
|
+
lg: "h-9 px-4 text-sm"
|
|
14
|
+
};
|
|
15
|
+
var SegmentedControlContext = React.createContext({ size: "md" });
|
|
16
|
+
var Root2 = React.forwardRef(
|
|
17
|
+
({ className, size = "md", children, ...props }, ref) => /* @__PURE__ */ jsx(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx(
|
|
18
|
+
RadixToggleGroup.Root,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
type: "single",
|
|
22
|
+
className: cn(
|
|
23
|
+
"inline-flex items-center rounded-lg bg-[var(--color-bg-subtle)] p-0.5 gap-0.5",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props,
|
|
27
|
+
children
|
|
28
|
+
}
|
|
29
|
+
) })
|
|
30
|
+
);
|
|
31
|
+
Root2.displayName = "SegmentedControl.Root";
|
|
32
|
+
var Item2 = React.forwardRef(
|
|
33
|
+
({ className, ...props }, ref) => {
|
|
34
|
+
const { size } = React.useContext(SegmentedControlContext);
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
RadixToggleGroup.Item,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cn(
|
|
40
|
+
"inline-flex items-center justify-center rounded-md font-medium transition-all",
|
|
41
|
+
"text-[var(--color-text-muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
42
|
+
"data-[state=on]:bg-[var(--color-bg-default)] data-[state=on]:text-[var(--color-text-primary)] data-[state=on]:shadow-sm",
|
|
43
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
44
|
+
sizeMap[size],
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
Item2.displayName = "SegmentedControl.Item";
|
|
53
|
+
var SegmentedControl = { Root: Root2, Item: Item2 };
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
SegmentedControl
|
|
57
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Label/Label.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var labelVariants = cva(
|
|
11
|
+
["inline-flex items-center gap-1 font-medium leading-none select-none"],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
sm: "text-xs",
|
|
16
|
+
md: "text-sm",
|
|
17
|
+
lg: "text-base"
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
true: "opacity-50 cursor-not-allowed"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: "md"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
var Label = React.forwardRef(
|
|
29
|
+
({ className, size, required, disabled, tone, style, children, ...props }, ref) => {
|
|
30
|
+
const toneStyle = tone ? { color: `var(--color-text-${tone})` } : {};
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
32
|
+
"label",
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
"data-tone": tone,
|
|
36
|
+
style: { ...toneStyle, ...style },
|
|
37
|
+
className: cn(
|
|
38
|
+
labelVariants({ size, disabled }),
|
|
39
|
+
"text-[var(--color-text-primary)]",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...props,
|
|
43
|
+
children: [
|
|
44
|
+
children,
|
|
45
|
+
required && /* @__PURE__ */ jsx(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
className: "text-[var(--color-danger-500)] leading-none",
|
|
50
|
+
children: "*"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
Label.displayName = "Label";
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
labelVariants,
|
|
62
|
+
Label
|
|
63
|
+
};
|