@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,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Button/Button.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
import { Loader2 } from "@nexub/icons";
|
|
10
|
+
import { cva } from "class-variance-authority";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var toneClasses = {
|
|
13
|
+
neutral: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-muted)]",
|
|
14
|
+
info: "bg-[var(--color-fill-info)] text-white hover:bg-[var(--color-fill-info-hover)]",
|
|
15
|
+
success: "bg-[var(--color-fill-success)] text-white hover:bg-[var(--color-fill-success-hover)]",
|
|
16
|
+
warning: "bg-[var(--color-fill-warning)] text-white hover:bg-[var(--color-fill-warning-hover)]",
|
|
17
|
+
danger: "bg-[var(--color-fill-danger)] text-white hover:bg-[var(--color-fill-danger-hover)]",
|
|
18
|
+
leap: "bg-[var(--color-fill-leap)] text-white hover:bg-[var(--color-fill-leap-hover)]",
|
|
19
|
+
bookub: "bg-[var(--color-fill-bookub)] text-white hover:bg-[var(--color-fill-bookub-hover)]",
|
|
20
|
+
payub: "bg-[var(--color-fill-payub)] text-white hover:bg-[var(--color-fill-payub-hover)]",
|
|
21
|
+
founderub: "bg-[var(--color-fill-founderub)] text-white hover:bg-[var(--color-fill-founderub-hover)]"
|
|
22
|
+
};
|
|
23
|
+
var buttonVariants = cva(
|
|
24
|
+
[
|
|
25
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-colors",
|
|
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)]",
|
|
27
|
+
"disabled:opacity-50 disabled:pointer-events-none",
|
|
28
|
+
"select-none"
|
|
29
|
+
],
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
primary: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)]",
|
|
34
|
+
secondary: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)] border border-[var(--color-border-default)] hover:bg-[var(--color-bg-muted)]",
|
|
35
|
+
subtle: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-muted)]",
|
|
36
|
+
ghost: "bg-transparent text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]",
|
|
37
|
+
outline: "bg-transparent border border-[var(--color-border-default)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]",
|
|
38
|
+
destructive: "bg-[var(--color-fill-danger)] text-white hover:bg-[var(--color-fill-danger-hover)]",
|
|
39
|
+
accent: "bg-[var(--color-fill-accent)] text-white hover:bg-[var(--color-fill-accent-hover)]",
|
|
40
|
+
link: "bg-transparent text-[var(--color-text-primary)] underline-offset-4 hover:underline"
|
|
41
|
+
},
|
|
42
|
+
size: {
|
|
43
|
+
xs: "h-7 px-2.5 text-xs",
|
|
44
|
+
sm: "h-8 px-3 text-sm",
|
|
45
|
+
md: "h-9 px-4 text-sm",
|
|
46
|
+
lg: "h-10 px-5 text-base",
|
|
47
|
+
xl: "h-12 px-6 text-base"
|
|
48
|
+
},
|
|
49
|
+
fullWidth: {
|
|
50
|
+
true: "w-full"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "primary",
|
|
55
|
+
size: "md"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
var Button = React.forwardRef(
|
|
60
|
+
({
|
|
61
|
+
className,
|
|
62
|
+
variant,
|
|
63
|
+
size,
|
|
64
|
+
tone,
|
|
65
|
+
loading = false,
|
|
66
|
+
fullWidth,
|
|
67
|
+
leadingIcon,
|
|
68
|
+
trailingIcon,
|
|
69
|
+
asChild = false,
|
|
70
|
+
disabled,
|
|
71
|
+
children,
|
|
72
|
+
...props
|
|
73
|
+
}, ref) => {
|
|
74
|
+
const sharedProps = {
|
|
75
|
+
className: cn(
|
|
76
|
+
buttonVariants({ variant, size, fullWidth }),
|
|
77
|
+
tone ? toneClasses[tone] : "",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
"data-tone": tone,
|
|
81
|
+
...props
|
|
82
|
+
};
|
|
83
|
+
if (asChild) {
|
|
84
|
+
return /* @__PURE__ */ jsx(Slot, { ref, ...sharedProps, children });
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ jsxs("button", { ref, disabled: disabled ?? loading, ...sharedProps, children: [
|
|
87
|
+
loading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : leadingIcon,
|
|
88
|
+
children,
|
|
89
|
+
!loading && trailingIcon
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
Button.displayName = "Button";
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
buttonVariants,
|
|
97
|
+
Button
|
|
98
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/ErrorState/ErrorState.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { AlertTriangle, AlertCircle, Info } from "@nexub/icons";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var toneConfig = {
|
|
11
|
+
error: {
|
|
12
|
+
icon: /* @__PURE__ */ jsx(AlertCircle, { size: "xl", "aria-hidden": "true" }),
|
|
13
|
+
color: "text-[var(--color-semantic-error-default)]"
|
|
14
|
+
},
|
|
15
|
+
warning: {
|
|
16
|
+
icon: /* @__PURE__ */ jsx(AlertTriangle, { size: "xl", "aria-hidden": "true" }),
|
|
17
|
+
color: "text-[var(--color-semantic-warning-default)]"
|
|
18
|
+
},
|
|
19
|
+
info: {
|
|
20
|
+
icon: /* @__PURE__ */ jsx(Info, { size: "xl", "aria-hidden": "true" }),
|
|
21
|
+
color: "text-[var(--color-semantic-info-default)]"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var ErrorState = React.forwardRef(
|
|
25
|
+
({ className, title, description, tone = "error", onRetry, ...props }, ref) => {
|
|
26
|
+
const { icon, color } = toneConfig[tone];
|
|
27
|
+
return /* @__PURE__ */ jsxs(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
31
|
+
className: cn(
|
|
32
|
+
"flex flex-col items-center justify-center gap-4 py-16 text-center",
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...props,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: color, children: icon }),
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
39
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-[var(--color-text-primary)]", children: title }),
|
|
40
|
+
description && /* @__PURE__ */ jsx("p", { className: "max-w-sm text-sm text-[var(--color-text-muted)]", children: description })
|
|
41
|
+
] }),
|
|
42
|
+
onRetry && /* @__PURE__ */ jsx(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
onClick: onRetry,
|
|
46
|
+
className: "inline-flex h-9 items-center justify-center rounded-md bg-[var(--color-fill-primary)] px-4 text-sm font-medium text-white hover:bg-[var(--color-fill-primary-hover)] transition-colors",
|
|
47
|
+
children: "Try again"
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
ErrorState.displayName = "ErrorState";
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
ErrorState
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/FormError/FormError.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { AlertCircle } from "@nexub/icons";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var FormError = React.forwardRef(
|
|
11
|
+
({ className, children, ...props }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
"p",
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
role: "alert",
|
|
17
|
+
className: cn(
|
|
18
|
+
"flex items-center gap-1.5 text-sm text-[var(--color-danger-600)] leading-snug",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
|
|
24
|
+
children
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
FormError.displayName = "FormError";
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
FormError
|
|
34
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Toolbar/Toolbar.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixToolbar from "@radix-ui/react-toolbar";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Root2 = React.forwardRef(
|
|
11
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
RadixToolbar.Root,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"flex items-center gap-1 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] p-1",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
Root2.displayName = "Toolbar.Root";
|
|
24
|
+
var ToolbarButton = React.forwardRef(
|
|
25
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
+
RadixToolbar.Button,
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
className: cn(
|
|
30
|
+
"inline-flex h-8 items-center justify-center rounded-md px-3 text-sm font-medium transition-colors",
|
|
31
|
+
"hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
32
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
ToolbarButton.displayName = "Toolbar.Button";
|
|
40
|
+
var Separator2 = React.forwardRef(
|
|
41
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
42
|
+
RadixToolbar.Separator,
|
|
43
|
+
{
|
|
44
|
+
ref,
|
|
45
|
+
className: cn("mx-1 w-px self-stretch bg-[var(--color-border-default)]", className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
Separator2.displayName = "Toolbar.Separator";
|
|
51
|
+
var ToggleGroup2 = React.forwardRef(
|
|
52
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53
|
+
RadixToolbar.ToggleGroup,
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: cn("flex items-center gap-0.5", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
ToggleGroup2.displayName = "Toolbar.ToggleGroup";
|
|
62
|
+
var ToggleItem2 = React.forwardRef(
|
|
63
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
RadixToolbar.ToggleItem,
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: cn(
|
|
68
|
+
"inline-flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
|
|
69
|
+
"hover:bg-[var(--color-bg-subtle)] data-[state=on]:bg-[var(--color-bg-subtle)]",
|
|
70
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
ToggleItem2.displayName = "Toolbar.ToggleItem";
|
|
78
|
+
var Toolbar = { Root: Root2, Button: ToolbarButton, Separator: Separator2, ToggleGroup: ToggleGroup2, ToggleItem: ToggleItem2 };
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
Toolbar
|
|
82
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Slider/Slider.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixSlider from "@radix-ui/react-slider";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var Slider = React.forwardRef(
|
|
11
|
+
({ className, thumbLabels, "aria-label": ariaLabel, ...props }, ref) => {
|
|
12
|
+
const count = (props.value ?? props.defaultValue ?? [0]).length;
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
RadixSlider.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(RadixSlider.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-[var(--color-bg-muted)]", children: /* @__PURE__ */ jsx(RadixSlider.Range, { className: "absolute h-full bg-[var(--color-fill-primary)]" }) }),
|
|
21
|
+
Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx(
|
|
22
|
+
RadixSlider.Thumb,
|
|
23
|
+
{
|
|
24
|
+
"aria-label": thumbLabels?.[i] ?? ariaLabel,
|
|
25
|
+
className: "block h-5 w-5 rounded-full border-2 border-[var(--color-fill-primary)] bg-[var(--color-bg-default)] transition-colors 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)] disabled:pointer-events-none disabled:opacity-50"
|
|
26
|
+
},
|
|
27
|
+
i
|
|
28
|
+
))
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
Slider.displayName = "Slider";
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
Slider
|
|
38
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/CheckList/CheckList.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Check } from "@nexub/icons";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var CheckList = React.forwardRef(
|
|
11
|
+
({ className, items, children, ...props }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
"ul",
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn("flex flex-col gap-2 list-none m-0 p-0", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
items?.map((item, index) => /* @__PURE__ */ jsx(CheckListItem, { children: item }, index)),
|
|
20
|
+
children
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
CheckList.displayName = "CheckList";
|
|
27
|
+
var CheckListItem = React.forwardRef(
|
|
28
|
+
({ className, children, ...props }, ref) => {
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"li",
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
className: cn("flex items-start gap-2 text-[var(--color-text-primary)]", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center justify-center mt-0.5 h-4 w-4 rounded-full bg-[var(--color-semantic-success-default)]/10", children: /* @__PURE__ */ jsx(
|
|
37
|
+
Check,
|
|
38
|
+
{
|
|
39
|
+
className: "h-3 w-3 text-[var(--color-semantic-success-default)]",
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
CheckListItem.displayName = "CheckListItem";
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
CheckList,
|
|
53
|
+
CheckListItem
|
|
54
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
glassSurfaceClass
|
|
4
|
+
} from "./chunk-ROZVVWPV.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-AT6RPKU3.js";
|
|
8
|
+
|
|
9
|
+
// src/components/Card/Card.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
12
|
+
import { cva } from "class-variance-authority";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var cardVariants = cva(
|
|
15
|
+
"rounded-lg bg-[var(--color-bg-default)] border border-[var(--color-border-default)] text-[var(--color-text-primary)]",
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
flat: "",
|
|
20
|
+
surface: "shadow-[var(--shadow-card,0_1px_3px_0_rgb(0_0_0/0.1),0_1px_2px_-1px_rgb(0_0_0/0.1))]",
|
|
21
|
+
interactive: "cursor-pointer shadow-[var(--shadow-sm)] transition-all duration-200 hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5 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)]"
|
|
22
|
+
},
|
|
23
|
+
// Material. 'glass' needs data-material="glass" on the element (set in the
|
|
24
|
+
// component) for the --glass-* vars to resolve. Single box-shadow carries
|
|
25
|
+
// both the inset specular highlight and the drop shadow so neither clobbers
|
|
26
|
+
// the other. Listed after `variant` so tailwind-merge lets it win on bg/border.
|
|
27
|
+
surface: {
|
|
28
|
+
solid: "",
|
|
29
|
+
glass: glassSurfaceClass
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "flat",
|
|
34
|
+
surface: "solid"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
var toneBorderMap = {
|
|
39
|
+
neutral: "",
|
|
40
|
+
info: "border-l-4 border-l-[var(--color-semantic-info-default)]",
|
|
41
|
+
success: "border-l-4 border-l-[var(--color-semantic-success-default)]",
|
|
42
|
+
warning: "border-l-4 border-l-[var(--color-semantic-warning-default)]",
|
|
43
|
+
danger: "border-l-4 border-l-[var(--color-semantic-error-default)]",
|
|
44
|
+
leap: "border-l-4 border-l-[var(--color-leap-500)]",
|
|
45
|
+
bookub: "border-l-4 border-l-[var(--color-bookub-500)]",
|
|
46
|
+
payub: "border-l-4 border-l-[var(--color-payub-500)]",
|
|
47
|
+
founderub: "border-l-4 border-l-[var(--color-founderub-500)]"
|
|
48
|
+
};
|
|
49
|
+
var Card = React.forwardRef(
|
|
50
|
+
({ className, variant = "flat", surface = "solid", tone, asChild = false, children, ...props }, ref) => {
|
|
51
|
+
const Comp = asChild ? Slot : "div";
|
|
52
|
+
const toneStyle = tone ? toneBorderMap[tone] : "";
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
Comp,
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: cn(cardVariants({ variant, surface }), toneStyle, className),
|
|
58
|
+
"data-tone": tone,
|
|
59
|
+
"data-material": surface === "glass" ? "glass" : void 0,
|
|
60
|
+
...props,
|
|
61
|
+
children
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
Card.displayName = "Card";
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
cardVariants,
|
|
70
|
+
Card
|
|
71
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Kbd/Kbd.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Kbd = React.forwardRef(
|
|
10
|
+
({ className, children, ...rest }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"kbd",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"inline-flex items-center justify-center font-mono text-xs",
|
|
17
|
+
"px-1.5 py-0.5 min-w-[1.5rem]",
|
|
18
|
+
"rounded border border-[var(--color-border-default)]",
|
|
19
|
+
"bg-[var(--color-bg-subtle)] text-[var(--color-text-secondary)]",
|
|
20
|
+
"shadow-[0_1px_0_var(--color-border-default)]",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...rest,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Kbd.displayName = "Kbd";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
Kbd
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/FileUpload/FileUpload.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Upload, X } from "@nexub/icons";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var FileUploadContext = React.createContext(null);
|
|
11
|
+
function useFileUpload() {
|
|
12
|
+
const ctx = React.useContext(FileUploadContext);
|
|
13
|
+
if (!ctx) throw new Error("FileUpload parts must be used inside FileUpload.Root");
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
var Root = React.forwardRef(
|
|
17
|
+
({ className, accept, maxFiles, onFilesChange, children, ...props }, ref) => {
|
|
18
|
+
const [files, setFiles] = React.useState([]);
|
|
19
|
+
const [isDragging, setIsDragging] = React.useState(false);
|
|
20
|
+
const addFiles = React.useCallback(
|
|
21
|
+
(newFiles) => {
|
|
22
|
+
setFiles((prev) => {
|
|
23
|
+
const next = [...prev, ...newFiles].slice(0, maxFiles);
|
|
24
|
+
onFilesChange?.(next);
|
|
25
|
+
return next;
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
[maxFiles, onFilesChange]
|
|
29
|
+
);
|
|
30
|
+
const removeFile = React.useCallback(
|
|
31
|
+
(index) => {
|
|
32
|
+
setFiles((prev) => {
|
|
33
|
+
const next = prev.filter((_, i) => i !== index);
|
|
34
|
+
onFilesChange?.(next);
|
|
35
|
+
return next;
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
[onFilesChange]
|
|
39
|
+
);
|
|
40
|
+
const contextValue = React.useMemo(
|
|
41
|
+
() => ({ accept, maxFiles, onFilesChange, files, addFiles, removeFile, isDragging, setIsDragging }),
|
|
42
|
+
[accept, maxFiles, onFilesChange, files, addFiles, removeFile, isDragging, setIsDragging]
|
|
43
|
+
);
|
|
44
|
+
return /* @__PURE__ */ jsx(FileUploadContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-4", className), ...props, children }) });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
Root.displayName = "FileUpload.Root";
|
|
48
|
+
var Dropzone = React.forwardRef(
|
|
49
|
+
({ className, children, ...props }, ref) => {
|
|
50
|
+
const { accept, addFiles, isDragging, setIsDragging } = useFileUpload();
|
|
51
|
+
const inputRef = React.useRef(null);
|
|
52
|
+
function handleDrop(e) {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
setIsDragging(false);
|
|
55
|
+
const dropped = Array.from(e.dataTransfer.files);
|
|
56
|
+
addFiles(dropped);
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
role: "button",
|
|
63
|
+
tabIndex: 0,
|
|
64
|
+
"aria-label": "Upload files",
|
|
65
|
+
onClick: () => inputRef.current?.click(),
|
|
66
|
+
onKeyDown: (e) => {
|
|
67
|
+
if (e.key === "Enter" || e.key === " ") inputRef.current?.click();
|
|
68
|
+
},
|
|
69
|
+
onDragOver: (e) => {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
setIsDragging(true);
|
|
72
|
+
},
|
|
73
|
+
onDragLeave: () => setIsDragging(false),
|
|
74
|
+
onDrop: handleDrop,
|
|
75
|
+
className: cn(
|
|
76
|
+
"flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed p-8 text-center transition-colors",
|
|
77
|
+
isDragging ? "border-[var(--color-brand-primary-500)] bg-[var(--color-brand-primary-500)]/5" : "border-[var(--color-border-input)] hover:border-[var(--color-brand-primary-500)] hover:bg-[var(--color-bg-subtle)]",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Upload, { size: "lg", className: "text-[var(--color-text-muted)]", "aria-hidden": "true" }),
|
|
83
|
+
children ?? /* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--color-text-muted)]", children: [
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[var(--color-brand-primary-500)]", children: "Click to upload" }),
|
|
85
|
+
" ",
|
|
86
|
+
"or drag and drop"
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
"input",
|
|
90
|
+
{
|
|
91
|
+
ref: inputRef,
|
|
92
|
+
type: "file",
|
|
93
|
+
className: "sr-only",
|
|
94
|
+
multiple: true,
|
|
95
|
+
accept: accept?.join(","),
|
|
96
|
+
onChange: (e) => {
|
|
97
|
+
if (e.target.files) addFiles(Array.from(e.target.files));
|
|
98
|
+
e.target.value = "";
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
Dropzone.displayName = "FileUpload.Dropzone";
|
|
108
|
+
var List = React.forwardRef(
|
|
109
|
+
({ className, ...props }, ref) => {
|
|
110
|
+
const { files } = useFileUpload();
|
|
111
|
+
if (files.length === 0) return null;
|
|
112
|
+
return /* @__PURE__ */ jsx("ul", { ref, className: cn("flex flex-col gap-2", className), ...props });
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
List.displayName = "FileUpload.List";
|
|
116
|
+
var Item = React.forwardRef(({ className, index, ...props }, ref) => {
|
|
117
|
+
const { files, removeFile } = useFileUpload();
|
|
118
|
+
const file = files[index];
|
|
119
|
+
if (!file) return null;
|
|
120
|
+
return /* @__PURE__ */ jsxs(
|
|
121
|
+
"li",
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
className: cn(
|
|
125
|
+
"flex items-center justify-between gap-3 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] p-3",
|
|
126
|
+
className
|
|
127
|
+
),
|
|
128
|
+
...props,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
131
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-[var(--color-text-primary)]", children: file.name }),
|
|
132
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-[var(--color-text-muted)]", children: [
|
|
133
|
+
(file.size / 1024).toFixed(1),
|
|
134
|
+
" KB"
|
|
135
|
+
] })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
"button",
|
|
139
|
+
{
|
|
140
|
+
onClick: () => removeFile(index),
|
|
141
|
+
"aria-label": `Remove ${file.name}`,
|
|
142
|
+
className: "shrink-0 rounded p-1 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
143
|
+
children: /* @__PURE__ */ jsx(X, { size: "sm", "aria-hidden": "true" })
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
});
|
|
150
|
+
Item.displayName = "FileUpload.Item";
|
|
151
|
+
var FileUpload = { Root, Dropzone, List, Item };
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
FileUpload
|
|
155
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-AT6RPKU3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/Flag/Flag.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function countryCodeToEmoji(code) {
|
|
10
|
+
return code.toUpperCase().split("").map((c) => String.fromCodePoint(c.charCodeAt(0) - 65 + 127462)).join("");
|
|
11
|
+
}
|
|
12
|
+
var sizeClass = {
|
|
13
|
+
sm: "text-base",
|
|
14
|
+
md: "text-xl",
|
|
15
|
+
lg: "text-3xl"
|
|
16
|
+
};
|
|
17
|
+
var Flag = React.forwardRef(
|
|
18
|
+
({ code, size = "md", className, ...rest }, ref) => {
|
|
19
|
+
const emoji = countryCodeToEmoji(code);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
role: "img",
|
|
25
|
+
"aria-label": code,
|
|
26
|
+
className: cn("inline-block leading-none", sizeClass[size], className),
|
|
27
|
+
...rest,
|
|
28
|
+
children: emoji
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
Flag.displayName = "Flag";
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
Flag
|
|
37
|
+
};
|