@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,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
Flag
|
|
4
|
+
} from "./chunk-POFKKYHY.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-AT6RPKU3.js";
|
|
8
|
+
|
|
9
|
+
// src/components/CountryBadge/CountryBadge.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var sizeClass = {
|
|
13
|
+
sm: "px-2 py-0.5 text-xs gap-1",
|
|
14
|
+
md: "px-2.5 py-1 text-sm gap-1.5",
|
|
15
|
+
lg: "px-3 py-1.5 text-base gap-2"
|
|
16
|
+
};
|
|
17
|
+
var CountryBadge = React.forwardRef(
|
|
18
|
+
({ code, label, size = "md", className, ...rest }, ref) => {
|
|
19
|
+
const displayLabel = label ?? code;
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
className: cn(
|
|
25
|
+
"inline-flex items-center rounded-full font-medium",
|
|
26
|
+
"bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]",
|
|
27
|
+
"border border-[var(--color-border-default)]",
|
|
28
|
+
sizeClass[size],
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...rest,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Flag, { code, size }),
|
|
34
|
+
/* @__PURE__ */ jsx("span", { children: displayLabel })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
CountryBadge.displayName = "CountryBadge";
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
CountryBadge
|
|
44
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useIsomorphicLayoutEffect
|
|
4
|
+
} from "./chunk-NHUQLIHL.js";
|
|
5
|
+
|
|
6
|
+
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var ThemeContext = React.createContext(void 0);
|
|
10
|
+
ThemeContext.displayName = "ThemeContext";
|
|
11
|
+
var DARK_QUERY = "(prefers-color-scheme: dark)";
|
|
12
|
+
function applyTheme(theme) {
|
|
13
|
+
if (typeof document === "undefined") return;
|
|
14
|
+
const root = document.documentElement;
|
|
15
|
+
if (theme === "system") root.removeAttribute("data-theme");
|
|
16
|
+
else root.setAttribute("data-theme", theme);
|
|
17
|
+
}
|
|
18
|
+
function readStorage(key, fallback) {
|
|
19
|
+
if (typeof window === "undefined") return fallback;
|
|
20
|
+
try {
|
|
21
|
+
const stored = window.localStorage.getItem(key);
|
|
22
|
+
if (stored === "light" || stored === "dark" || stored === "system") {
|
|
23
|
+
return stored;
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
return fallback;
|
|
28
|
+
}
|
|
29
|
+
function writeStorage(key, value) {
|
|
30
|
+
if (typeof window === "undefined") return;
|
|
31
|
+
try {
|
|
32
|
+
window.localStorage.setItem(key, value);
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function ThemeProvider({
|
|
37
|
+
children,
|
|
38
|
+
defaultTheme = "system",
|
|
39
|
+
storageKey = "nexub-theme"
|
|
40
|
+
}) {
|
|
41
|
+
const [theme, setThemeState] = React.useState(defaultTheme);
|
|
42
|
+
const [systemTheme, setSystemTheme] = React.useState("light");
|
|
43
|
+
useIsomorphicLayoutEffect(() => {
|
|
44
|
+
setThemeState(readStorage(storageKey, defaultTheme));
|
|
45
|
+
}, [storageKey, defaultTheme]);
|
|
46
|
+
useIsomorphicLayoutEffect(() => {
|
|
47
|
+
const mq = window.matchMedia(DARK_QUERY);
|
|
48
|
+
const sync = () => setSystemTheme(mq.matches ? "dark" : "light");
|
|
49
|
+
sync();
|
|
50
|
+
mq.addEventListener("change", sync);
|
|
51
|
+
return () => mq.removeEventListener("change", sync);
|
|
52
|
+
}, []);
|
|
53
|
+
useIsomorphicLayoutEffect(() => {
|
|
54
|
+
applyTheme(theme);
|
|
55
|
+
}, [theme]);
|
|
56
|
+
const resolvedTheme = theme === "system" ? systemTheme : theme;
|
|
57
|
+
const setTheme = React.useCallback(
|
|
58
|
+
(mode) => {
|
|
59
|
+
writeStorage(storageKey, mode);
|
|
60
|
+
setThemeState(mode);
|
|
61
|
+
},
|
|
62
|
+
[storageKey]
|
|
63
|
+
);
|
|
64
|
+
const value = React.useMemo(
|
|
65
|
+
() => ({ theme, resolvedTheme, setTheme }),
|
|
66
|
+
[theme, resolvedTheme, setTheme]
|
|
67
|
+
);
|
|
68
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
|
|
69
|
+
}
|
|
70
|
+
function useTheme() {
|
|
71
|
+
const ctx = React.useContext(ThemeContext);
|
|
72
|
+
if (!ctx) {
|
|
73
|
+
throw new Error("useTheme must be used inside a <ThemeProvider>.");
|
|
74
|
+
}
|
|
75
|
+
return ctx;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
ThemeProvider,
|
|
80
|
+
useTheme
|
|
81
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/EyebrowChip/EyebrowChip.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var toneTextMap = {
|
|
10
|
+
neutral: "text-[var(--color-neutral-700)]",
|
|
11
|
+
info: "text-[var(--color-semantic-info-default)]",
|
|
12
|
+
success: "text-[var(--color-semantic-success-default)]",
|
|
13
|
+
warning: "text-[var(--color-semantic-warning-default)]",
|
|
14
|
+
danger: "text-[var(--color-semantic-error-default)]",
|
|
15
|
+
leap: "text-[var(--color-leap-700)]",
|
|
16
|
+
bookub: "text-[var(--color-bookub-700)]",
|
|
17
|
+
payub: "text-[var(--color-payub-700)]",
|
|
18
|
+
founderub: "text-[var(--color-founderub-700)]"
|
|
19
|
+
};
|
|
20
|
+
var EyebrowChip = React.forwardRef(
|
|
21
|
+
({ className, tone = "neutral", leadingIcon, children, ...props }, ref) => {
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
className: cn(
|
|
27
|
+
"inline-flex items-center gap-1.5 rounded-full px-3 py-1",
|
|
28
|
+
"text-xs font-semibold uppercase tracking-wider select-none",
|
|
29
|
+
"bg-[var(--color-bg-subtle)]",
|
|
30
|
+
toneTextMap[tone],
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center", "aria-hidden": "true", children: leadingIcon }),
|
|
36
|
+
children
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
EyebrowChip.displayName = "EyebrowChip";
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
EyebrowChip
|
|
46
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Grid/Grid.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var flowClass = {
|
|
11
|
+
row: "grid-flow-row",
|
|
12
|
+
column: "grid-flow-col",
|
|
13
|
+
dense: "grid-flow-dense"
|
|
14
|
+
};
|
|
15
|
+
var Grid = React.forwardRef(
|
|
16
|
+
({
|
|
17
|
+
cols,
|
|
18
|
+
rows,
|
|
19
|
+
gap,
|
|
20
|
+
flow,
|
|
21
|
+
asChild = false,
|
|
22
|
+
className,
|
|
23
|
+
style,
|
|
24
|
+
children,
|
|
25
|
+
...rest
|
|
26
|
+
}, ref) => {
|
|
27
|
+
const Comp = asChild ? Slot : "div";
|
|
28
|
+
const inlineStyle = {
|
|
29
|
+
...cols !== void 0 ? {
|
|
30
|
+
gridTemplateColumns: typeof cols === "number" ? `repeat(${cols}, minmax(0, 1fr))` : cols
|
|
31
|
+
} : {},
|
|
32
|
+
...rows !== void 0 ? {
|
|
33
|
+
gridTemplateRows: typeof rows === "number" ? `repeat(${rows}, minmax(0, 1fr))` : rows
|
|
34
|
+
} : {},
|
|
35
|
+
...gap !== void 0 ? { gap: typeof gap === "number" ? `${gap * 0.25}rem` : gap } : {},
|
|
36
|
+
...style
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
Comp,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: cn("grid", flow && flowClass[flow], className),
|
|
43
|
+
style: inlineStyle,
|
|
44
|
+
...rest,
|
|
45
|
+
children
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
Grid.displayName = "Grid";
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
Grid
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/AspectRatio/AspectRatio.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var AspectRatio = React.forwardRef(
|
|
10
|
+
({ ratio = 16 / 9, className, children, style, ...rest }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn("relative w-full overflow-hidden", className),
|
|
16
|
+
style: { aspectRatio: String(ratio), ...style },
|
|
17
|
+
...rest,
|
|
18
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 h-full w-full", children })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
AspectRatio.displayName = "AspectRatio";
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
AspectRatio
|
|
27
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/HoverCard/HoverCard.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixHoverCard from "@radix-ui/react-hover-card";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Root2 = RadixHoverCard.Root;
|
|
11
|
+
var Trigger2 = RadixHoverCard.Trigger;
|
|
12
|
+
var Content2 = React.forwardRef(
|
|
13
|
+
function HoverCardContent({ className, sideOffset = 4, ...props }, ref) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
RadixHoverCard.Content,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
sideOffset,
|
|
19
|
+
className: cn(
|
|
20
|
+
"z-[var(--z-popover)] w-64 rounded-lg border border-[var(--color-border-default)]",
|
|
21
|
+
"bg-[var(--color-bg-default)] p-4 shadow-md outline-none",
|
|
22
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
23
|
+
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
24
|
+
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
25
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
26
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
Content2.displayName = "HoverCard.Content";
|
|
35
|
+
var Arrow2 = React.forwardRef(
|
|
36
|
+
function HoverCardArrow({ className, ...props }, ref) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
RadixHoverCard.Arrow,
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
className: cn("fill-[var(--color-border-default)]", className),
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
Arrow2.displayName = "HoverCard.Arrow";
|
|
48
|
+
var HoverCard = {
|
|
49
|
+
Root: Root2,
|
|
50
|
+
Trigger: Trigger2,
|
|
51
|
+
Content: Content2,
|
|
52
|
+
Arrow: Arrow2
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
HoverCard
|
|
57
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Banner/Banner.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var bannerVariants = cva(
|
|
11
|
+
[
|
|
12
|
+
"relative flex gap-3 border-l-4 px-4 py-3",
|
|
13
|
+
"w-full"
|
|
14
|
+
// No border-radius — full-width banner
|
|
15
|
+
],
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
tone: {
|
|
19
|
+
neutral: "bg-[var(--color-bg-subtle)] border-l-[var(--color-neutral-500)] text-[var(--color-text-primary)]",
|
|
20
|
+
info: "bg-[var(--color-semantic-info-default)]/10 border-l-[var(--color-semantic-info-default)] text-[var(--color-semantic-info-default)]",
|
|
21
|
+
success: "bg-[var(--color-semantic-success-default)]/10 border-l-[var(--color-semantic-success-default)] text-[var(--color-semantic-success-default)]",
|
|
22
|
+
warning: "bg-[var(--color-semantic-warning-default)]/10 border-l-[var(--color-semantic-warning-default)] text-[var(--color-semantic-warning-default)]",
|
|
23
|
+
danger: "bg-[var(--color-semantic-error-default)]/10 border-l-[var(--color-semantic-error-default)] text-[var(--color-semantic-error-default)]",
|
|
24
|
+
leap: "bg-[var(--color-leap-500)]/10 border-l-[var(--color-leap-500)] text-[var(--color-leap-700)]",
|
|
25
|
+
bookub: "bg-[var(--color-bookub-500)]/10 border-l-[var(--color-bookub-500)] text-[var(--color-bookub-700)]",
|
|
26
|
+
payub: "bg-[var(--color-payub-500)]/10 border-l-[var(--color-payub-500)] text-[var(--color-payub-700)]",
|
|
27
|
+
founderub: "bg-[var(--color-founderub-500)]/10 border-l-[var(--color-founderub-500)] text-[var(--color-founderub-700)]"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
tone: "neutral"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
var Banner = React.forwardRef(
|
|
36
|
+
({
|
|
37
|
+
className,
|
|
38
|
+
tone = "neutral",
|
|
39
|
+
title,
|
|
40
|
+
icon,
|
|
41
|
+
action,
|
|
42
|
+
onClose,
|
|
43
|
+
children,
|
|
44
|
+
...props
|
|
45
|
+
}, ref) => {
|
|
46
|
+
return /* @__PURE__ */ jsxs(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
role: "status",
|
|
51
|
+
className: cn(bannerVariants({ tone }), className),
|
|
52
|
+
"data-tone": tone,
|
|
53
|
+
...props,
|
|
54
|
+
children: [
|
|
55
|
+
icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 mt-0.5 inline-flex items-start", "aria-hidden": "true", children: icon }),
|
|
56
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
57
|
+
title && /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm mb-0.5", children: title }),
|
|
58
|
+
children && /* @__PURE__ */ jsx("div", { className: "text-sm opacity-90", children }),
|
|
59
|
+
action && /* @__PURE__ */ jsx("div", { className: "mt-2", children: action })
|
|
60
|
+
] }),
|
|
61
|
+
onClose && /* @__PURE__ */ jsx(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
type: "button",
|
|
65
|
+
"aria-label": "Dismiss banner",
|
|
66
|
+
onClick: onClose,
|
|
67
|
+
className: cn(
|
|
68
|
+
"shrink-0 inline-flex items-center justify-center rounded-md w-6 h-6 opacity-60 hover:opacity-100 transition-opacity",
|
|
69
|
+
"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)]"
|
|
70
|
+
),
|
|
71
|
+
children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 2L2 10M2 2l8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
Banner.displayName = "Banner";
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
bannerVariants,
|
|
83
|
+
Banner
|
|
84
|
+
};
|