@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,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Progress/Progress.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var progressTrackVariants = cva(
|
|
11
|
+
"relative w-full overflow-hidden rounded-full bg-[var(--color-bg-muted)]",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
sm: "h-1",
|
|
16
|
+
md: "h-2",
|
|
17
|
+
lg: "h-3"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: "md"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
var progressFillVariants = cva(
|
|
26
|
+
"h-full rounded-full transition-all duration-300 ease-in-out",
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
tone: {
|
|
30
|
+
neutral: "bg-[var(--color-neutral-500)]",
|
|
31
|
+
info: "bg-[var(--color-semantic-info-default)]",
|
|
32
|
+
success: "bg-[var(--color-semantic-success-default)]",
|
|
33
|
+
warning: "bg-[var(--color-semantic-warning-default)]",
|
|
34
|
+
danger: "bg-[var(--color-semantic-error-default)]",
|
|
35
|
+
leap: "bg-[var(--color-leap-500)]",
|
|
36
|
+
bookub: "bg-[var(--color-bookub-500)]",
|
|
37
|
+
payub: "bg-[var(--color-payub-500)]",
|
|
38
|
+
founderub: "bg-[var(--color-founderub-500)]"
|
|
39
|
+
},
|
|
40
|
+
animated: {
|
|
41
|
+
true: "bg-[length:200%_100%] animate-[progress-stripes_1s_linear_infinite]"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
tone: "neutral"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
var Progress = React.forwardRef(
|
|
50
|
+
({
|
|
51
|
+
className,
|
|
52
|
+
size,
|
|
53
|
+
tone = "neutral",
|
|
54
|
+
value = 0,
|
|
55
|
+
max = 100,
|
|
56
|
+
animated = false,
|
|
57
|
+
...props
|
|
58
|
+
}, ref) => {
|
|
59
|
+
const clampedValue = Math.min(Math.max(value, 0), max);
|
|
60
|
+
const percentage = clampedValue / max * 100;
|
|
61
|
+
const isIndeterminate = value === void 0 || value === null;
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
role: "progressbar",
|
|
67
|
+
"aria-valuenow": isIndeterminate ? void 0 : clampedValue,
|
|
68
|
+
"aria-valuemin": 0,
|
|
69
|
+
"aria-valuemax": max,
|
|
70
|
+
className: cn(progressTrackVariants({ size }), className),
|
|
71
|
+
...props,
|
|
72
|
+
children: /* @__PURE__ */ jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: cn(
|
|
76
|
+
progressFillVariants({ tone }),
|
|
77
|
+
animated && "animate-pulse"
|
|
78
|
+
),
|
|
79
|
+
style: { width: `${percentage}%` }
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
Progress.displayName = "Progress";
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
progressTrackVariants,
|
|
90
|
+
progressFillVariants,
|
|
91
|
+
Progress
|
|
92
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Avatar/Avatar.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var avatarVariants = cva(
|
|
11
|
+
"relative inline-flex items-center justify-center shrink-0 rounded-full overflow-hidden bg-[var(--color-bg-muted)] text-[var(--color-text-muted)] font-medium select-none",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xs: "h-6 w-6 text-[10px]",
|
|
16
|
+
sm: "h-8 w-8 text-xs",
|
|
17
|
+
md: "h-10 w-10 text-sm",
|
|
18
|
+
lg: "h-12 w-12 text-base",
|
|
19
|
+
xl: "h-16 w-16 text-xl"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "md"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
var badgeSizeMap = {
|
|
28
|
+
xs: "h-1.5 w-1.5",
|
|
29
|
+
sm: "h-2 w-2",
|
|
30
|
+
md: "h-2.5 w-2.5",
|
|
31
|
+
lg: "h-3 w-3",
|
|
32
|
+
xl: "h-3.5 w-3.5"
|
|
33
|
+
};
|
|
34
|
+
function getInitials(name) {
|
|
35
|
+
const parts = name.trim().split(/\s+/);
|
|
36
|
+
const first = parts[0] ?? "";
|
|
37
|
+
if (parts.length === 1) return first.charAt(0).toUpperCase();
|
|
38
|
+
const last = parts[parts.length - 1] ?? "";
|
|
39
|
+
return (first.charAt(0) + last.charAt(0)).toUpperCase();
|
|
40
|
+
}
|
|
41
|
+
var Avatar = React.forwardRef(
|
|
42
|
+
({
|
|
43
|
+
className,
|
|
44
|
+
size = "md",
|
|
45
|
+
src,
|
|
46
|
+
name,
|
|
47
|
+
fallback,
|
|
48
|
+
badge,
|
|
49
|
+
badgeColor,
|
|
50
|
+
...props
|
|
51
|
+
}, ref) => {
|
|
52
|
+
const [imgError, setImgError] = React.useState(false);
|
|
53
|
+
const showImage = Boolean(src) && !imgError;
|
|
54
|
+
const initials = name ? getInitials(name) : null;
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
ref,
|
|
59
|
+
className: cn(avatarVariants({ size }), className),
|
|
60
|
+
"aria-label": name ?? void 0,
|
|
61
|
+
role: "img",
|
|
62
|
+
...props,
|
|
63
|
+
children: [
|
|
64
|
+
showImage ? /* @__PURE__ */ jsx(
|
|
65
|
+
"img",
|
|
66
|
+
{
|
|
67
|
+
src,
|
|
68
|
+
alt: name ?? "",
|
|
69
|
+
className: "h-full w-full object-cover",
|
|
70
|
+
onError: () => setImgError(true)
|
|
71
|
+
}
|
|
72
|
+
) : initials ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: initials }) : fallback ? fallback : (
|
|
73
|
+
/* Generic user icon */
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"svg",
|
|
76
|
+
{
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
fill: "currentColor",
|
|
80
|
+
className: "h-[55%] w-[55%]",
|
|
81
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z" })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
),
|
|
85
|
+
badge && /* @__PURE__ */ jsx(
|
|
86
|
+
"span",
|
|
87
|
+
{
|
|
88
|
+
className: cn(
|
|
89
|
+
"absolute bottom-0 right-0 rounded-full ring-2 ring-[var(--color-bg-default)]",
|
|
90
|
+
badgeSizeMap[size ?? "md"],
|
|
91
|
+
badgeColor ?? "bg-[var(--color-semantic-success-default)]"
|
|
92
|
+
),
|
|
93
|
+
"aria-hidden": "true"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
Avatar.displayName = "Avatar";
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
avatarVariants,
|
|
105
|
+
Avatar
|
|
106
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Input/Input.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var inputVariants = cva(
|
|
11
|
+
[
|
|
12
|
+
// The wrapper owns ALL focus styling (border + ring). Strip every possible
|
|
13
|
+
// focus indicator from the inner <input> so we never get a double ring.
|
|
14
|
+
"flex-1 min-w-0 bg-transparent",
|
|
15
|
+
"border-0 shadow-none",
|
|
16
|
+
"outline-none focus:outline-none focus-visible:outline-none",
|
|
17
|
+
"ring-0 focus:ring-0 focus-visible:ring-0",
|
|
18
|
+
"placeholder:text-[var(--color-text-placeholder)]",
|
|
19
|
+
"text-[var(--color-text-primary)]",
|
|
20
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
21
|
+
],
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
size: {
|
|
25
|
+
sm: "text-sm",
|
|
26
|
+
md: "text-sm",
|
|
27
|
+
lg: "text-base"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "md"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
var inputWrapperVariants = cva(
|
|
36
|
+
[
|
|
37
|
+
"flex items-center w-full rounded-md border bg-[var(--color-bg-default)] transition-colors",
|
|
38
|
+
"border-[var(--color-border-input)]",
|
|
39
|
+
// On focus: the border shifts to the ring color and the ring is a
|
|
40
|
+
// semi-transparent halo. One hard 1 px border + one soft 2 px glow =
|
|
41
|
+
// a single clean focus indicator. No double ring.
|
|
42
|
+
"focus-within:outline-none focus-within:border-[var(--color-ring-default)] focus-within:ring-2 focus-within:ring-[color-mix(in_srgb,var(--color-ring-default)_25%,transparent)]",
|
|
43
|
+
"has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed"
|
|
44
|
+
],
|
|
45
|
+
{
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
sm: "h-8 px-3 gap-1.5",
|
|
49
|
+
md: "h-9 px-3 gap-2",
|
|
50
|
+
lg: "h-10 px-4 gap-2"
|
|
51
|
+
},
|
|
52
|
+
invalid: {
|
|
53
|
+
true: "border-[var(--color-danger-500)] focus-within:border-[var(--color-danger-500)] focus-within:ring-[color-mix(in_srgb,var(--color-danger-500)_25%,transparent)]"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: "md"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
var addonVariants = cva(
|
|
62
|
+
[
|
|
63
|
+
"flex items-center self-stretch px-3 text-[var(--color-text-muted)] bg-[var(--color-bg-subtle)]",
|
|
64
|
+
"border-[var(--color-border-default)] shrink-0"
|
|
65
|
+
],
|
|
66
|
+
{
|
|
67
|
+
variants: {
|
|
68
|
+
side: {
|
|
69
|
+
leading: "border-r rounded-l-md",
|
|
70
|
+
trailing: "border-l rounded-r-md"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
var Input = React.forwardRef(
|
|
76
|
+
({
|
|
77
|
+
className,
|
|
78
|
+
size,
|
|
79
|
+
invalid,
|
|
80
|
+
leadingAddon,
|
|
81
|
+
trailingAddon,
|
|
82
|
+
leadingIcon,
|
|
83
|
+
trailingIcon,
|
|
84
|
+
wrapperClassName,
|
|
85
|
+
disabled,
|
|
86
|
+
...props
|
|
87
|
+
}, ref) => {
|
|
88
|
+
const hasAddon = Boolean(leadingAddon ?? trailingAddon);
|
|
89
|
+
const inputEl = /* @__PURE__ */ jsx(
|
|
90
|
+
"input",
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: cn(inputVariants({ size }), className),
|
|
94
|
+
"aria-invalid": invalid ?? void 0,
|
|
95
|
+
disabled,
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
if (hasAddon) {
|
|
100
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full rounded-md overflow-hidden border border-[var(--color-border-input)]", invalid && "border-[var(--color-danger-500)]"), children: [
|
|
101
|
+
leadingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "leading" })), children: leadingAddon }),
|
|
102
|
+
/* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), "rounded-none border-0 ring-offset-0", wrapperClassName), children: [
|
|
103
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: leadingIcon }),
|
|
104
|
+
inputEl,
|
|
105
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: trailingIcon })
|
|
106
|
+
] }),
|
|
107
|
+
trailingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "trailing" })), children: trailingAddon })
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), wrapperClassName), children: [
|
|
111
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: leadingIcon }),
|
|
112
|
+
inputEl,
|
|
113
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: trailingIcon })
|
|
114
|
+
] });
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
Input.displayName = "Input";
|
|
118
|
+
|
|
119
|
+
export {
|
|
120
|
+
inputVariants,
|
|
121
|
+
inputWrapperVariants,
|
|
122
|
+
addonVariants,
|
|
123
|
+
Input
|
|
124
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/PageHeader/PageHeader.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var PageHeader = React.forwardRef(
|
|
10
|
+
({ className, title, description, actions, breadcrumb, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-4", className), ...props, children: [
|
|
11
|
+
breadcrumb && /* @__PURE__ */ jsx("div", { children: breadcrumb }),
|
|
12
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold tracking-tight text-[var(--color-text-primary)] truncate", children: title }),
|
|
15
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-[var(--color-text-muted)]", children: description })
|
|
16
|
+
] }),
|
|
17
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
18
|
+
] })
|
|
19
|
+
] })
|
|
20
|
+
);
|
|
21
|
+
PageHeader.displayName = "PageHeader";
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
PageHeader
|
|
25
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Chip/Chip.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var chipVariants = cva(
|
|
11
|
+
"inline-flex items-center gap-1 rounded-full font-medium select-none transition-colors",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
sm: "px-2 py-0.5 text-xs",
|
|
16
|
+
md: "px-2.5 py-1 text-sm"
|
|
17
|
+
},
|
|
18
|
+
tone: {
|
|
19
|
+
neutral: "bg-[var(--color-neutral-100)] text-[var(--color-neutral-700)] border border-[var(--color-neutral-200)]",
|
|
20
|
+
info: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-semantic-info-default)] border border-[var(--color-semantic-info-default)]/20",
|
|
21
|
+
success: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-semantic-success-default)] border border-[var(--color-semantic-success-default)]/20",
|
|
22
|
+
warning: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-semantic-warning-default)] border border-[var(--color-semantic-warning-default)]/20",
|
|
23
|
+
danger: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-semantic-error-default)] border border-[var(--color-semantic-error-default)]/20",
|
|
24
|
+
leap: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)] border border-[var(--color-leap-500)]/20",
|
|
25
|
+
bookub: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)] border border-[var(--color-bookub-500)]/20",
|
|
26
|
+
payub: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)] border border-[var(--color-payub-500)]/20",
|
|
27
|
+
founderub: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)] border border-[var(--color-founderub-500)]/20"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "md",
|
|
32
|
+
tone: "neutral"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
var Chip = React.forwardRef(
|
|
37
|
+
({ className, size, tone = "neutral", onRemove, children, ...props }, ref) => {
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: cn(chipVariants({ size, tone }), className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
children,
|
|
46
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
47
|
+
"button",
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
"aria-label": "Remove",
|
|
51
|
+
onClick: (e) => {
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
onRemove();
|
|
54
|
+
},
|
|
55
|
+
className: cn(
|
|
56
|
+
"inline-flex items-center justify-center rounded-full transition-colors",
|
|
57
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)] focus-visible:ring-offset-1",
|
|
58
|
+
"hover:bg-black/10 text-current opacity-60 hover:opacity-100",
|
|
59
|
+
size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"
|
|
60
|
+
),
|
|
61
|
+
children: /* @__PURE__ */ jsx(
|
|
62
|
+
"svg",
|
|
63
|
+
{
|
|
64
|
+
width: "8",
|
|
65
|
+
height: "8",
|
|
66
|
+
viewBox: "0 0 8 8",
|
|
67
|
+
fill: "none",
|
|
68
|
+
"aria-hidden": "true",
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M7 1L1 7M1 1l6 6",
|
|
73
|
+
stroke: "currentColor",
|
|
74
|
+
strokeWidth: "1.5",
|
|
75
|
+
strokeLinecap: "round"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
Chip.displayName = "Chip";
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
chipVariants,
|
|
91
|
+
Chip
|
|
92
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Callout/Callout.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var calloutVariants = cva(
|
|
11
|
+
"flex gap-2.5 rounded-md px-3 py-2.5 text-sm",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
tone: {
|
|
15
|
+
neutral: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]",
|
|
16
|
+
info: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-semantic-info-default)]",
|
|
17
|
+
success: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-semantic-success-default)]",
|
|
18
|
+
warning: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-semantic-warning-default)]",
|
|
19
|
+
danger: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-semantic-error-default)]",
|
|
20
|
+
leap: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)]",
|
|
21
|
+
bookub: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)]",
|
|
22
|
+
payub: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)]",
|
|
23
|
+
founderub: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)]"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
tone: "neutral"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
var Callout = React.forwardRef(
|
|
32
|
+
({ className, tone = "neutral", icon, children, ...props }, ref) => {
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn(calloutVariants({ tone }), className),
|
|
38
|
+
"data-tone": tone,
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 mt-0.5 inline-flex", "aria-hidden": "true", children: icon }),
|
|
42
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
Callout.displayName = "Callout";
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
calloutVariants,
|
|
52
|
+
Callout
|
|
53
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Code/Code.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Code = React.forwardRef(
|
|
10
|
+
({ inline = true, language, className, children, ...rest }, ref) => {
|
|
11
|
+
if (inline) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"code",
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn(
|
|
17
|
+
"font-mono text-sm bg-[var(--color-bg-muted)] px-1.5 py-0.5 rounded",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...rest,
|
|
21
|
+
children
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"pre",
|
|
27
|
+
{
|
|
28
|
+
className: cn(
|
|
29
|
+
"overflow-x-auto rounded-md bg-[var(--color-bg-muted)] p-4",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
children: /* @__PURE__ */ jsx(
|
|
33
|
+
"code",
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
className: "font-mono text-sm",
|
|
37
|
+
"data-language": language,
|
|
38
|
+
...rest,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
Code.displayName = "Code";
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
Code
|
|
50
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Logo/Logo.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { NexubMark } from "@nexub/icons";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var logoVariants = cva("inline-flex items-center gap-2", {
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
sm: "h-6",
|
|
15
|
+
md: "h-8",
|
|
16
|
+
lg: "h-10"
|
|
17
|
+
},
|
|
18
|
+
tone: {
|
|
19
|
+
default: "text-[var(--color-text-primary)]",
|
|
20
|
+
inverse: "text-white"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: "md",
|
|
25
|
+
tone: "default"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
var iconSizeMap = {
|
|
29
|
+
sm: "h-5 w-auto aspect-[78/56]",
|
|
30
|
+
md: "h-7 w-auto aspect-[78/56]",
|
|
31
|
+
lg: "h-9 w-auto aspect-[78/56]"
|
|
32
|
+
};
|
|
33
|
+
var wordmarkSizeMap = {
|
|
34
|
+
sm: "text-base",
|
|
35
|
+
md: "text-xl",
|
|
36
|
+
lg: "text-2xl"
|
|
37
|
+
};
|
|
38
|
+
var Logo = React.forwardRef(
|
|
39
|
+
({
|
|
40
|
+
variant = "full",
|
|
41
|
+
mark = "color",
|
|
42
|
+
product,
|
|
43
|
+
size = "md",
|
|
44
|
+
tone = "default",
|
|
45
|
+
className,
|
|
46
|
+
...rest
|
|
47
|
+
}, ref) => {
|
|
48
|
+
const resolvedSize = size ?? "md";
|
|
49
|
+
const resolvedTone = tone ?? "default";
|
|
50
|
+
const full = variant === "full";
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
role: "img",
|
|
56
|
+
"aria-label": product ? `Nexub ${product}` : "Nexub",
|
|
57
|
+
className: cn(logoVariants({ size: resolvedSize, tone: resolvedTone }), className),
|
|
58
|
+
...rest,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
NexubMark,
|
|
62
|
+
{
|
|
63
|
+
variant: mark,
|
|
64
|
+
className: cn(iconSizeMap[resolvedSize], "shrink-0"),
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
full && /* @__PURE__ */ jsx(
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
className: cn(
|
|
72
|
+
wordmarkSizeMap[resolvedSize],
|
|
73
|
+
"font-semibold tracking-tight leading-none"
|
|
74
|
+
),
|
|
75
|
+
children: "nexub"
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
full && product && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-1/2 w-px shrink-0 bg-current opacity-25" }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
className: cn(
|
|
84
|
+
wordmarkSizeMap[resolvedSize],
|
|
85
|
+
"font-medium tracking-tight leading-none whitespace-nowrap",
|
|
86
|
+
resolvedTone === "inverse" ? "opacity-70" : "text-[var(--color-text-muted)]"
|
|
87
|
+
),
|
|
88
|
+
children: product
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
Logo.displayName = "Logo";
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
logoVariants,
|
|
101
|
+
Logo
|
|
102
|
+
};
|