@nexub/react 1.0.0 → 1.1.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-2MKB5FQI.js +122 -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-4BTP4464.js +92 -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-AHZQQ7OT.js +83 -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-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-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-L6GBZ2HB.js +145 -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-QURKXXNS.js +46 -0
- package/dist/chunk-ROZVVWPV.js +8 -0
- package/dist/chunk-S344IRK4.js +63 -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-V6GZZFTV.js +106 -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-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-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 +28 -11
- package/dist/index.js +479 -5896
- package/package.json +12 -12
- package/dist/index.cjs +0 -6112
- package/dist/index.d.cts +0 -1245
|
@@ -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,119 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixPopover from "@radix-ui/react-popover";
|
|
9
|
+
import { DayPicker } from "react-day-picker";
|
|
10
|
+
import { format } from "date-fns";
|
|
11
|
+
import { CalendarDays, ChevronLeft, ChevronRight } from "@nexub/icons";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var calendarClassNames = {
|
|
14
|
+
months: "flex flex-col sm:flex-row gap-4",
|
|
15
|
+
month: "flex flex-col gap-4",
|
|
16
|
+
month_caption: "flex justify-center pt-1 relative items-center",
|
|
17
|
+
caption_label: "text-sm font-medium",
|
|
18
|
+
nav: "flex items-center gap-1",
|
|
19
|
+
button_previous: "absolute left-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
20
|
+
button_next: "absolute right-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
21
|
+
month_grid: "w-full border-collapse",
|
|
22
|
+
weekdays: "flex",
|
|
23
|
+
weekday: "text-[var(--color-text-muted)] rounded-md w-8 font-normal text-[0.8rem] flex-1 text-center",
|
|
24
|
+
week: "flex w-full mt-2",
|
|
25
|
+
day: cn(
|
|
26
|
+
"relative p-0 text-center text-sm flex-1",
|
|
27
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
28
|
+
"[&:has([aria-selected].day-outside)]:bg-[var(--color-bg-subtle)]/50",
|
|
29
|
+
"[&:has([aria-selected])]:bg-[var(--color-bg-subtle)]",
|
|
30
|
+
"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md",
|
|
31
|
+
"focus-within:relative focus-within:z-20"
|
|
32
|
+
),
|
|
33
|
+
day_button: cn(
|
|
34
|
+
"inline-flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
|
|
35
|
+
"hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)]",
|
|
36
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
37
|
+
"aria-selected:opacity-100"
|
|
38
|
+
),
|
|
39
|
+
selected: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)] hover:text-white focus:bg-[var(--color-fill-primary)] focus:text-white",
|
|
40
|
+
today: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]",
|
|
41
|
+
outside: "text-[var(--color-text-muted)] opacity-50",
|
|
42
|
+
disabled: "text-[var(--color-text-muted)] opacity-50",
|
|
43
|
+
hidden: "invisible"
|
|
44
|
+
};
|
|
45
|
+
var DatePicker = React.forwardRef(
|
|
46
|
+
function DatePicker2({
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
placeholder = "Pick a date",
|
|
50
|
+
disabled = false,
|
|
51
|
+
minDate,
|
|
52
|
+
maxDate,
|
|
53
|
+
className,
|
|
54
|
+
id,
|
|
55
|
+
"aria-label": ariaLabel
|
|
56
|
+
}, ref) {
|
|
57
|
+
const [open, setOpen] = React.useState(false);
|
|
58
|
+
const display = value ? format(value, "PP") : placeholder;
|
|
59
|
+
return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
|
|
60
|
+
/* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
id,
|
|
65
|
+
disabled,
|
|
66
|
+
"aria-label": ariaLabel ? `${ariaLabel}: ${display}` : display,
|
|
67
|
+
className: cn(
|
|
68
|
+
"inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
|
|
69
|
+
"hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
70
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
71
|
+
!value && "text-[var(--color-text-muted)]",
|
|
72
|
+
className
|
|
73
|
+
),
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsx(CalendarDays, { size: "sm", "aria-hidden": "true" }),
|
|
76
|
+
value ? format(value, "PP") : placeholder
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
80
|
+
/* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
|
|
81
|
+
RadixPopover.Content,
|
|
82
|
+
{
|
|
83
|
+
align: "start",
|
|
84
|
+
className: cn(
|
|
85
|
+
"z-[var(--z-popover)] rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
|
|
86
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
87
|
+
"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
88
|
+
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
89
|
+
),
|
|
90
|
+
children: /* @__PURE__ */ jsx(
|
|
91
|
+
DayPicker,
|
|
92
|
+
{
|
|
93
|
+
mode: "single",
|
|
94
|
+
selected: value,
|
|
95
|
+
onSelect: (date) => {
|
|
96
|
+
onChange?.(date);
|
|
97
|
+
setOpen(false);
|
|
98
|
+
},
|
|
99
|
+
startMonth: minDate,
|
|
100
|
+
endMonth: maxDate,
|
|
101
|
+
initialFocus: true,
|
|
102
|
+
showOutsideDays: true,
|
|
103
|
+
className: "p-3",
|
|
104
|
+
classNames: calendarClassNames,
|
|
105
|
+
components: {
|
|
106
|
+
Chevron: ({ orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { size: "xs", "aria-hidden": "true" }) : orientation === "right" ? /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true", ...rest })
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
) })
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
DatePicker.displayName = "DatePicker";
|
|
116
|
+
|
|
117
|
+
export {
|
|
118
|
+
DatePicker
|
|
119
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/FilterChip/FilterChip.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var FilterChip = React.forwardRef(
|
|
10
|
+
({ className, selected = false, count, onRemove, children, ...props }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"inline-flex items-center gap-1 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors",
|
|
16
|
+
selected ? "bg-[var(--color-fill-accent)] text-white border-[var(--color-fill-accent)]" : "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)] border-[var(--color-border-default)] hover:bg-[var(--color-bg-muted)]"
|
|
17
|
+
),
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsxs(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
type: "button",
|
|
24
|
+
className: cn(
|
|
25
|
+
"inline-flex items-center gap-1 bg-transparent border-0 p-0 m-0 cursor-pointer",
|
|
26
|
+
"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)] rounded-sm",
|
|
27
|
+
selected ? "text-white" : "text-[var(--color-text-primary)]",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
"aria-pressed": selected,
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
children,
|
|
34
|
+
count !== void 0 && /* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
className: cn(
|
|
38
|
+
"inline-flex items-center justify-center rounded-full text-xs font-semibold px-1.5 min-w-[1.25rem] h-5",
|
|
39
|
+
selected ? "bg-white/20 text-white" : "bg-[var(--color-bg-muted)] text-[var(--color-text-muted)]"
|
|
40
|
+
),
|
|
41
|
+
children: count
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
type: "button",
|
|
51
|
+
"aria-label": "Remove filter",
|
|
52
|
+
onClick: (e) => {
|
|
53
|
+
e.stopPropagation();
|
|
54
|
+
onRemove();
|
|
55
|
+
},
|
|
56
|
+
className: cn(
|
|
57
|
+
"inline-flex items-center justify-center rounded-full w-4 h-4 text-xs transition-colors",
|
|
58
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)] focus-visible:ring-offset-1",
|
|
59
|
+
selected ? "text-white hover:bg-white/20" : "text-[var(--color-text-muted)] hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]"
|
|
60
|
+
),
|
|
61
|
+
children: /* @__PURE__ */ jsx(
|
|
62
|
+
"svg",
|
|
63
|
+
{
|
|
64
|
+
width: "10",
|
|
65
|
+
height: "10",
|
|
66
|
+
viewBox: "0 0 10 10",
|
|
67
|
+
fill: "none",
|
|
68
|
+
"aria-hidden": "true",
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M8 2L2 8M2 2l6 6",
|
|
73
|
+
stroke: "currentColor",
|
|
74
|
+
strokeWidth: "1.5",
|
|
75
|
+
strokeLinecap: "round"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
FilterChip.displayName = "FilterChip";
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
FilterChip
|
|
91
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Table/Table.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Root = React.forwardRef(
|
|
10
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
11
|
+
);
|
|
12
|
+
Root.displayName = "Table.Root";
|
|
13
|
+
var Header = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
14
|
+
Header.displayName = "Table.Header";
|
|
15
|
+
var Body = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
16
|
+
Body.displayName = "Table.Body";
|
|
17
|
+
var TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18
|
+
"tfoot",
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: cn(
|
|
22
|
+
"border-t bg-[var(--color-bg-subtle)] font-medium [&>tr]:last:border-b-0",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
TableFooter.displayName = "Table.Footer";
|
|
29
|
+
var Row = React.forwardRef(
|
|
30
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
31
|
+
"tr",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(
|
|
35
|
+
"border-b border-[var(--color-border-default)] transition-colors hover:bg-[var(--color-bg-subtle)]/50 data-[state=selected]:bg-[var(--color-bg-subtle)]",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
Row.displayName = "Table.Row";
|
|
43
|
+
var Head = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
44
|
+
"th",
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
className: cn(
|
|
48
|
+
"h-10 px-4 text-left align-middle font-medium text-[var(--color-text-muted)] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
));
|
|
54
|
+
Head.displayName = "Table.Head";
|
|
55
|
+
var Cell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56
|
+
"td",
|
|
57
|
+
{
|
|
58
|
+
ref,
|
|
59
|
+
className: cn(
|
|
60
|
+
"p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
));
|
|
66
|
+
Cell.displayName = "Table.Cell";
|
|
67
|
+
var Caption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
68
|
+
"caption",
|
|
69
|
+
{
|
|
70
|
+
ref,
|
|
71
|
+
className: cn("mt-4 text-sm text-[var(--color-text-muted)]", className),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
));
|
|
75
|
+
Caption.displayName = "Table.Caption";
|
|
76
|
+
var Table = {
|
|
77
|
+
Root,
|
|
78
|
+
Header,
|
|
79
|
+
Body,
|
|
80
|
+
Footer: TableFooter,
|
|
81
|
+
Row,
|
|
82
|
+
Head,
|
|
83
|
+
Cell,
|
|
84
|
+
Caption
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Table
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|