@nexub/react 1.5.0 → 1.6.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-XR4NBY54.js → chunk-2DYKENBM.js} +10 -10
- package/dist/{chunk-SVQCINRE.js → chunk-2I7FIU6R.js} +5 -2
- package/dist/{chunk-FHFVBOF3.js → chunk-2Y4WLNEZ.js} +3 -3
- package/dist/{chunk-CWS37T3K.js → chunk-3E7X3YK3.js} +4 -2
- package/dist/{chunk-GRB6T2TT.js → chunk-3FPJIXG7.js} +19 -13
- package/dist/chunk-3MT23LNM.js +171 -0
- package/dist/chunk-3QD76BKT.js +80 -0
- package/dist/{chunk-B54WADL4.js → chunk-4P2JJ2FH.js} +12 -12
- package/dist/chunk-52ZVJPF7.js +1 -0
- package/dist/chunk-5KI4YHA3.js +144 -0
- package/dist/chunk-5QEARXY3.js +55 -0
- package/dist/chunk-5VW6RUKZ.js +134 -0
- package/dist/{chunk-CNNJFWFA.js → chunk-6BGUZQAX.js} +4 -4
- package/dist/{chunk-LDYD7WL3.js → chunk-6ECOCGZG.js} +4 -3
- package/dist/{chunk-3AXIMXDU.js → chunk-6JBQAJJD.js} +6 -12
- package/dist/{chunk-YRDCY6BI.js → chunk-6UKNUI46.js} +0 -19
- package/dist/chunk-743Y5MY3.js +95 -0
- package/dist/{chunk-BFRX6X4O.js → chunk-74RUJ5KZ.js} +23 -17
- package/dist/chunk-77LYWSJW.js +85 -0
- package/dist/{chunk-YPHNHQYQ.js → chunk-7B4VF2ZU.js} +6 -2
- package/dist/{chunk-NCRFKPA4.js → chunk-7MSIOYJZ.js} +6 -8
- package/dist/{chunk-AHT35UWY.js → chunk-7Q4T7CB6.js} +10 -6
- package/dist/{chunk-GIGOTRXX.js → chunk-7VJABRKB.js} +3 -10
- package/dist/{chunk-6QLLH6ID.js → chunk-7XWJCFWI.js} +8 -17
- package/dist/chunk-A3O23F2B.js +1 -0
- package/dist/chunk-AT2DSFP3.js +47 -0
- package/dist/{chunk-OASFXI27.js → chunk-BNFGVFZ3.js} +5 -5
- package/dist/{chunk-GHCV6UXG.js → chunk-BTYDDKRQ.js} +5 -5
- package/dist/chunk-C6JRJ6JW.js +167 -0
- package/dist/chunk-CAOLGXA5.js +1 -0
- package/dist/{chunk-IIPYF6ZQ.js → chunk-CBDJRPMD.js} +16 -13
- package/dist/{chunk-OJ2TLWYD.js → chunk-CKFRMCZ7.js} +5 -3
- package/dist/{chunk-LZB3KTSH.js → chunk-CQWYZPPJ.js} +1 -1
- package/dist/{chunk-6RBNM5RO.js → chunk-CUOASXI7.js} +10 -10
- package/dist/{chunk-HG6HTUWU.js → chunk-CV5ZKED7.js} +2 -2
- package/dist/{chunk-HJERFB7J.js → chunk-DDRYT3SY.js} +2 -2
- package/dist/chunk-DGCAM2UJ.js +60 -0
- package/dist/{chunk-RLE5RN3T.js → chunk-DGQJRTO6.js} +15 -11
- package/dist/{chunk-FD7YU53N.js → chunk-DT3QGFXB.js} +4 -4
- package/dist/chunk-F73DTG2V.js +123 -0
- package/dist/{chunk-V3TETH4J.js → chunk-FIDUY6SS.js} +17 -16
- package/dist/{chunk-Z3IG5WRA.js → chunk-FJUVYRNT.js} +3 -3
- package/dist/{chunk-KQPLFVFR.js → chunk-FLZD7HQY.js} +0 -2
- package/dist/{chunk-64JDZWCV.js → chunk-GRKCUQG4.js} +6 -5
- package/dist/{chunk-EZ23IA3H.js → chunk-GSG2W6DP.js} +3 -3
- package/dist/{chunk-4I5ULCYG.js → chunk-HFTS5AN7.js} +3 -3
- package/dist/{chunk-RB4CVS22.js → chunk-HH7EHNOW.js} +3 -1
- package/dist/{chunk-S46W2QER.js → chunk-HSPGJSFJ.js} +17 -11
- package/dist/{chunk-NQVRF4RB.js → chunk-HXV5UA7K.js} +16 -13
- package/dist/{chunk-GUB7YKG2.js → chunk-I4U36P54.js} +6 -3
- package/dist/{chunk-BTRTORKU.js → chunk-I6CAF7C5.js} +6 -7
- package/dist/chunk-IGLOYOCH.js +134 -0
- package/dist/{chunk-IK23Q2OF.js → chunk-JHVYI5GK.js} +3 -3
- package/dist/chunk-K5FKEAAK.js +94 -0
- package/dist/{chunk-5URGARPH.js → chunk-KE4YVG5Q.js} +6 -10
- package/dist/{chunk-A4IMFAZX.js → chunk-LESI7J7B.js} +3 -3
- package/dist/chunk-MEUJBGY5.js +88 -0
- package/dist/chunk-MNEXMMLM.js +23 -0
- package/dist/{chunk-PVTACENM.js → chunk-MTK3GHDQ.js} +2 -2
- package/dist/chunk-NA5UMOE5.js +55 -0
- package/dist/{chunk-YJ3JQYAN.js → chunk-NGQKBDHA.js} +5 -13
- package/dist/{chunk-7Q7ZF6BY.js → chunk-NNIFOMIH.js} +18 -8
- package/dist/{chunk-7L3CGIRA.js → chunk-NQPGELMP.js} +8 -19
- package/dist/chunk-NSVXGOR3.js +54 -0
- package/dist/{chunk-6J3QTWKC.js → chunk-NZT4TTNV.js} +18 -9
- package/dist/{chunk-TJCHA3OI.js → chunk-O626NJEM.js} +7 -4
- package/dist/chunk-O74XEHLA.js +331 -0
- package/dist/{chunk-JSD3H7WV.js → chunk-OYCK6BRG.js} +6 -6
- package/dist/{chunk-2555JXCP.js → chunk-PBPUSRTJ.js} +19 -11
- package/dist/{chunk-QD7H3WV3.js → chunk-PGDXFBKT.js} +8 -8
- package/dist/{chunk-PQ6GU7SG.js → chunk-PMWYLYM3.js} +20 -14
- package/dist/{chunk-I4BHRVRL.js → chunk-PPCGUIAB.js} +9 -5
- package/dist/{chunk-NIX4SEKM.js → chunk-PREMZMLU.js} +7 -4
- package/dist/{chunk-4SSUM4CL.js → chunk-Q3ESHXKU.js} +9 -6
- package/dist/{chunk-KM6Z3VTI.js → chunk-QVTVDL6Y.js} +1 -1
- package/dist/{chunk-AXOKFS4K.js → chunk-RSU2UHN4.js} +20 -4
- package/dist/{chunk-DJZZ3FIP.js → chunk-RUR57JZQ.js} +5 -14
- package/dist/{chunk-ZV3AF5CL.js → chunk-S2CTBFLN.js} +13 -2
- package/dist/{chunk-WESZPFBZ.js → chunk-S7GH2BJP.js} +7 -4
- package/dist/chunk-SAUA52EJ.js +131 -0
- package/dist/{chunk-72I7EVOL.js → chunk-SYZADSLI.js} +10 -6
- package/dist/{chunk-TEOLG3N2.js → chunk-SZ2WPWXJ.js} +10 -6
- package/dist/{chunk-W2NEXOTG.js → chunk-T7RLPFGX.js} +2 -2
- package/dist/{chunk-J6TU45KP.js → chunk-TRA6A5C5.js} +26 -12
- package/dist/{chunk-H2W7IYVY.js → chunk-UTJJ5HFX.js} +18 -12
- package/dist/{chunk-5O34ZNC3.js → chunk-VAFBGFKY.js} +19 -13
- package/dist/{chunk-OJRSPDNJ.js → chunk-VD4RFTNV.js} +8 -14
- package/dist/chunk-VLQGQFW7.js +110 -0
- package/dist/{chunk-RTDUTWJ4.js → chunk-VMT7Y3AT.js} +5 -8
- package/dist/{chunk-LGQ737BP.js → chunk-WHTLXQB6.js} +1 -1
- package/dist/chunk-WLRRMT6W.js +1 -0
- package/dist/{chunk-2FCSWBSM.js → chunk-WMWX6DPB.js} +3 -3
- package/dist/{chunk-UMC64NCT.js → chunk-WVBGQCYC.js} +6 -3
- package/dist/{chunk-QCNLE27O.js → chunk-WXRQ42DR.js} +11 -7
- package/dist/{chunk-SY6V3HAK.js → chunk-XDU27NRX.js} +3 -3
- package/dist/{chunk-KA2J5OBA.js → chunk-XQDD76EF.js} +4 -7
- package/dist/chunk-XTATJMY6.js +64 -0
- package/dist/chunk-XYXMPHND.js +1 -0
- package/dist/{chunk-7ZWBHHRK.js → chunk-YNU6VRD5.js} +23 -32
- package/dist/{chunk-6SJPVQQW.js → chunk-Z3HF6XJ3.js} +1 -1
- package/dist/{chunk-I4URNMI7.js → chunk-ZC4MZAEX.js} +9 -7
- package/dist/{chunk-PWBPHGM3.js → chunk-ZCEUVK2R.js} +2 -2
- package/dist/chunk-ZT3NWE5U.js +1 -0
- package/dist/{chunk-RHOYF7MO.js → chunk-ZTLALVWA.js} +6 -15
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/Amount/index.js +3 -1
- package/dist/components/AspectRatio/index.js +1 -1
- package/dist/components/Autocomplete/index.js +3 -2
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/AvatarGroup/index.js +3 -2
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/index.js +2 -1
- package/dist/components/Breadcrumb/index.js +2 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Card/index.js +3 -1
- package/dist/components/CheckList/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxCard/index.js +9 -0
- package/dist/components/Chip/index.js +2 -1
- package/dist/components/Citation/index.js +17 -0
- package/dist/components/Code/index.js +1 -1
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/CommandPalette/index.js +3 -2
- package/dist/components/ContextMenu/index.js +2 -2
- package/dist/components/CountryBadge/index.js +1 -1
- package/dist/components/DataTable/index.js +2 -1
- package/dist/components/DatePicker/index.js +5 -1
- package/dist/components/DateRangePicker/index.js +5 -1
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/DropdownMenu/index.js +2 -2
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/index.js +2 -1
- package/dist/components/EyebrowChip/index.js +4 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterChip/index.js +3 -1
- package/dist/components/Flex/index.js +2 -1
- package/dist/components/FormError/index.js +1 -1
- package/dist/components/FormField/index.js +7 -4
- package/dist/components/GradientDivider/index.js +1 -1
- package/dist/components/Grid/index.js +2 -1
- package/dist/components/Heading/index.js +4 -1
- package/dist/components/HelperText/index.js +4 -1
- package/dist/components/HoverCard/index.js +3 -2
- package/dist/components/IconButton/index.js +2 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Kbd/index.js +1 -1
- package/dist/components/KeyboardShortcut/index.js +2 -2
- package/dist/components/Label/index.js +4 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/MediaCard/index.js +9 -0
- package/dist/components/Menubar/index.js +2 -2
- package/dist/components/MessageBubble/index.js +18 -0
- package/dist/components/MoneyInput/index.js +3 -2
- package/dist/components/NavigationMenu/index.js +2 -2
- package/dist/components/NavigationRail/index.js +2 -1
- package/dist/components/NexubProvider/index.js +14 -0
- package/dist/components/NumberInput/index.js +3 -2
- package/dist/components/NumberTicker/index.js +10 -0
- package/dist/components/PageHeader/index.js +1 -1
- package/dist/components/Pagination/index.js +3 -1
- package/dist/components/PasswordInput/index.js +3 -2
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/index.js +2 -1
- package/dist/components/PromptInput/index.js +15 -0
- package/dist/components/RadioCard/index.js +11 -0
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/Rating/index.js +2 -1
- package/dist/components/ScrollArea/index.js +1 -1
- package/dist/components/SearchInput/index.js +3 -2
- package/dist/components/Section/index.js +1 -1
- package/dist/components/SegmentedControl/index.js +3 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Separator/index.js +1 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Spinner/index.js +2 -1
- package/dist/components/SplitButton/index.js +5 -5
- package/dist/components/Stack/index.js +2 -1
- package/dist/components/StatusPill/index.js +1 -1
- package/dist/components/StreamingText/index.js +8 -0
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/index.js +3 -2
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/TextGradient/index.js +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/ThinkingIndicator/index.js +9 -0
- package/dist/components/Toast/index.js +3 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/TopNav/index.js +2 -1
- package/dist/index.d.ts +407 -22
- package/dist/index.js +245 -166
- package/package.json +52 -50
- package/dist/chunk-63DPMUMR.js +0 -67
- package/dist/chunk-CHGPGRML.js +0 -115
- package/dist/chunk-J2T4GFFS.js +0 -85
- package/dist/chunk-LH3BSAIS.js +0 -119
- package/dist/chunk-LMPGHWUA.js +0 -114
- package/dist/chunk-NMH5WSZG.js +0 -72
- package/dist/chunk-P44EROBX.js +0 -55
- package/dist/chunk-TYTW4F3B.js +0 -178
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Combobox
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FJUVYRNT.js";
|
|
5
|
+
import {
|
|
6
|
+
useNexubMessages
|
|
7
|
+
} from "./chunk-743Y5MY3.js";
|
|
5
8
|
|
|
6
9
|
// src/components/Autocomplete/Autocomplete.tsx
|
|
7
10
|
import * as React from "react";
|
|
@@ -10,11 +13,12 @@ function Autocomplete({
|
|
|
10
13
|
options,
|
|
11
14
|
value,
|
|
12
15
|
onValueChange,
|
|
13
|
-
placeholder
|
|
14
|
-
emptyText
|
|
16
|
+
placeholder,
|
|
17
|
+
emptyText,
|
|
15
18
|
loading = false,
|
|
16
19
|
className
|
|
17
20
|
}) {
|
|
21
|
+
const messages = useNexubMessages();
|
|
18
22
|
const selectedLabel = options.find((o) => o.value === value)?.label ?? "";
|
|
19
23
|
const [search, setSearch] = React.useState(selectedLabel);
|
|
20
24
|
const [prevValue, setPrevValue] = React.useState(value);
|
|
@@ -23,9 +27,9 @@ function Autocomplete({
|
|
|
23
27
|
setSearch(selectedLabel);
|
|
24
28
|
}
|
|
25
29
|
return /* @__PURE__ */ jsxs(Combobox.Root, { className, children: [
|
|
26
|
-
/* @__PURE__ */ jsx(Combobox.Input, { placeholder, value: search, onValueChange: setSearch }),
|
|
27
|
-
/* @__PURE__ */ jsx(Combobox.List, { children: loading ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm text-[var(--color-
|
|
28
|
-
/* @__PURE__ */ jsx(Combobox.Empty, { children: emptyText }),
|
|
30
|
+
/* @__PURE__ */ jsx(Combobox.Input, { placeholder: placeholder ?? messages.searchPlaceholder, value: search, onValueChange: setSearch }),
|
|
31
|
+
/* @__PURE__ */ jsx(Combobox.List, { children: loading ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm text-[var(--color-on-surface-muted)]", children: messages.loading }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Combobox.Empty, { children: emptyText ?? messages.noResults }),
|
|
29
33
|
options.map((opt) => /* @__PURE__ */ jsx(
|
|
30
34
|
Combobox.Item,
|
|
31
35
|
{
|
|
@@ -13,7 +13,7 @@ var Root2 = React.forwardRef(
|
|
|
13
13
|
RadixAccordion.Root,
|
|
14
14
|
{
|
|
15
15
|
ref,
|
|
16
|
-
className: cn("divide-y divide-[var(--color-
|
|
16
|
+
className: cn("divide-y divide-[var(--color-outline-variant)]", className),
|
|
17
17
|
...props
|
|
18
18
|
}
|
|
19
19
|
)
|
|
@@ -30,7 +30,7 @@ var Trigger2 = React.forwardRef(
|
|
|
30
30
|
ref,
|
|
31
31
|
className: cn(
|
|
32
32
|
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all",
|
|
33
|
-
"hover:underline
|
|
33
|
+
"hover:underline",
|
|
34
34
|
"[&[data-state=open]>svg]:rotate-180",
|
|
35
35
|
className
|
|
36
36
|
),
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
disabledText,
|
|
4
|
+
pressable
|
|
5
|
+
} from "./chunk-7SXR4PGO.js";
|
|
6
|
+
import {
|
|
7
|
+
useNexubMessages
|
|
8
|
+
} from "./chunk-743Y5MY3.js";
|
|
2
9
|
import {
|
|
3
10
|
cn
|
|
4
11
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -7,6 +14,11 @@ import {
|
|
|
7
14
|
import * as React from "react";
|
|
8
15
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from "@nexub/icons";
|
|
9
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var navButton = cn(
|
|
18
|
+
pressable,
|
|
19
|
+
"inline-flex h-11 w-11 items-center justify-center bg-transparent text-[var(--color-on-surface)]",
|
|
20
|
+
disabledText
|
|
21
|
+
);
|
|
10
22
|
function generatePages(current, total, siblings) {
|
|
11
23
|
if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
|
|
12
24
|
const leftSibling = Math.max(current - siblings, 1);
|
|
@@ -32,6 +44,7 @@ var Pagination = React.forwardRef(
|
|
|
32
44
|
onPageChange,
|
|
33
45
|
...props
|
|
34
46
|
}, ref) => {
|
|
47
|
+
const messages = useNexubMessages();
|
|
35
48
|
const totalPages = Math.ceil(totalItems / pageSize);
|
|
36
49
|
if (totalPages <= 1) return null;
|
|
37
50
|
const pages = generatePages(page, totalPages, siblingCount);
|
|
@@ -40,8 +53,8 @@ var Pagination = React.forwardRef(
|
|
|
40
53
|
{
|
|
41
54
|
ref,
|
|
42
55
|
role: "navigation",
|
|
43
|
-
"aria-label":
|
|
44
|
-
className: cn("flex items-center gap-1", className),
|
|
56
|
+
"aria-label": messages.pagination,
|
|
57
|
+
className: cn("flex items-center gap-1 tabular-nums", className),
|
|
45
58
|
...props,
|
|
46
59
|
children: [
|
|
47
60
|
/* @__PURE__ */ jsx(
|
|
@@ -49,16 +62,16 @@ var Pagination = React.forwardRef(
|
|
|
49
62
|
{
|
|
50
63
|
onClick: () => onPageChange(page - 1),
|
|
51
64
|
disabled: page <= 1,
|
|
52
|
-
"aria-label":
|
|
53
|
-
className:
|
|
54
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { size: "sm", "aria-hidden": "true" })
|
|
65
|
+
"aria-label": messages.previousPage,
|
|
66
|
+
className: navButton,
|
|
67
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: "sm", "aria-hidden": "true", className: "rtl:-scale-x-100" })
|
|
55
68
|
}
|
|
56
69
|
),
|
|
57
70
|
pages.map(
|
|
58
71
|
(p, i) => p === "..." ? /* @__PURE__ */ jsx(
|
|
59
72
|
"span",
|
|
60
73
|
{
|
|
61
|
-
className: "flex h-11 w-11 items-center justify-center text-[var(--color-
|
|
74
|
+
className: "flex h-11 w-11 items-center justify-center text-[var(--color-on-surface-muted)]",
|
|
62
75
|
children: /* @__PURE__ */ jsx(MoreHorizontal, { size: "sm", "aria-hidden": "true" })
|
|
63
76
|
},
|
|
64
77
|
`ellipsis-${i}`
|
|
@@ -66,11 +79,12 @@ var Pagination = React.forwardRef(
|
|
|
66
79
|
"button",
|
|
67
80
|
{
|
|
68
81
|
onClick: () => onPageChange(p),
|
|
69
|
-
"aria-label":
|
|
82
|
+
"aria-label": messages.goToPage(p),
|
|
70
83
|
"aria-current": p === page ? "page" : void 0,
|
|
71
84
|
className: cn(
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
pressable,
|
|
86
|
+
"inline-flex h-11 min-w-11 px-2 items-center justify-center text-label-lg",
|
|
87
|
+
p === page ? "bg-[var(--color-primary)] text-[var(--color-on-primary)]" : "bg-transparent text-[var(--color-on-surface)]"
|
|
74
88
|
),
|
|
75
89
|
children: p
|
|
76
90
|
},
|
|
@@ -82,9 +96,9 @@ var Pagination = React.forwardRef(
|
|
|
82
96
|
{
|
|
83
97
|
onClick: () => onPageChange(page + 1),
|
|
84
98
|
disabled: page >= totalPages,
|
|
85
|
-
"aria-label":
|
|
86
|
-
className:
|
|
87
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { size: "sm", "aria-hidden": "true" })
|
|
99
|
+
"aria-label": messages.nextPage,
|
|
100
|
+
className: navButton,
|
|
101
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: "sm", "aria-hidden": "true", className: "rtl:-scale-x-100" })
|
|
88
102
|
}
|
|
89
103
|
)
|
|
90
104
|
]
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useNexubMessages
|
|
4
|
+
} from "./chunk-743Y5MY3.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -48,6 +51,7 @@ Root.displayName = "FileUpload.Root";
|
|
|
48
51
|
var Dropzone = React.forwardRef(
|
|
49
52
|
({ className, children, ...props }, ref) => {
|
|
50
53
|
const { accept, addFiles, isDragging, setIsDragging } = useFileUpload();
|
|
54
|
+
const messages = useNexubMessages();
|
|
51
55
|
const inputRef = React.useRef(null);
|
|
52
56
|
function handleDrop(e) {
|
|
53
57
|
e.preventDefault();
|
|
@@ -61,7 +65,7 @@ var Dropzone = React.forwardRef(
|
|
|
61
65
|
ref,
|
|
62
66
|
role: "button",
|
|
63
67
|
tabIndex: 0,
|
|
64
|
-
"aria-label":
|
|
68
|
+
"aria-label": messages.uploadFiles,
|
|
65
69
|
onClick: () => inputRef.current?.click(),
|
|
66
70
|
onKeyDown: (e) => {
|
|
67
71
|
if (e.key === "Enter" || e.key === " ") inputRef.current?.click();
|
|
@@ -73,17 +77,18 @@ var Dropzone = React.forwardRef(
|
|
|
73
77
|
onDragLeave: () => setIsDragging(false),
|
|
74
78
|
onDrop: handleDrop,
|
|
75
79
|
className: cn(
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
// Hover/press = the state layer; focus = the global ring.
|
|
81
|
+
"nx-state-layer flex cursor-pointer flex-col items-center justify-center gap-2 rounded-shape-container border-2 border-dashed p-8 text-center text-[var(--color-on-surface)] transition-colors",
|
|
82
|
+
isDragging ? "border-[var(--color-primary)] bg-[color-mix(in_srgb,var(--color-primary)_8%,transparent)]" : "border-[var(--color-outline)] hover:border-[var(--color-primary)]",
|
|
78
83
|
className
|
|
79
84
|
),
|
|
80
85
|
...props,
|
|
81
86
|
children: [
|
|
82
|
-
/* @__PURE__ */ jsx(Upload, { size: "lg", className: "text-[var(--color-
|
|
83
|
-
children ?? /* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--color-
|
|
84
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[var(--color-
|
|
87
|
+
/* @__PURE__ */ jsx(Upload, { size: "lg", className: "text-[var(--color-on-surface-muted)]", "aria-hidden": "true" }),
|
|
88
|
+
children ?? /* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--color-on-surface-muted)]", children: [
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[var(--color-primary)]", children: messages.clickToUpload }),
|
|
85
90
|
" ",
|
|
86
|
-
|
|
91
|
+
messages.orDragAndDrop
|
|
87
92
|
] }),
|
|
88
93
|
/* @__PURE__ */ jsx(
|
|
89
94
|
"input",
|
|
@@ -115,6 +120,7 @@ var List = React.forwardRef(
|
|
|
115
120
|
List.displayName = "FileUpload.List";
|
|
116
121
|
var Item = React.forwardRef(({ className, index, ...props }, ref) => {
|
|
117
122
|
const { files, removeFile } = useFileUpload();
|
|
123
|
+
const messages = useNexubMessages();
|
|
118
124
|
const file = files[index];
|
|
119
125
|
if (!file) return null;
|
|
120
126
|
return /* @__PURE__ */ jsxs(
|
|
@@ -122,14 +128,14 @@ var Item = React.forwardRef(({ className, index, ...props }, ref) => {
|
|
|
122
128
|
{
|
|
123
129
|
ref,
|
|
124
130
|
className: cn(
|
|
125
|
-
"flex items-center justify-between gap-3 rounded-
|
|
131
|
+
"flex items-center justify-between gap-3 rounded-shape-container border border-[var(--color-outline-variant)] bg-[var(--color-surface)] p-3",
|
|
126
132
|
className
|
|
127
133
|
),
|
|
128
134
|
...props,
|
|
129
135
|
children: [
|
|
130
136
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
131
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-[var(--color-
|
|
132
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-[var(--color-
|
|
137
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-[var(--color-on-surface)]", children: file.name }),
|
|
138
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-[var(--color-on-surface-muted)]", children: [
|
|
133
139
|
(file.size / 1024).toFixed(1),
|
|
134
140
|
" KB"
|
|
135
141
|
] })
|
|
@@ -138,8 +144,8 @@ var Item = React.forwardRef(({ className, index, ...props }, ref) => {
|
|
|
138
144
|
"button",
|
|
139
145
|
{
|
|
140
146
|
onClick: () => removeFile(index),
|
|
141
|
-
"aria-label":
|
|
142
|
-
className: "shrink-0 rounded p-1 text-[var(--color-
|
|
147
|
+
"aria-label": messages.removeFile(file.name),
|
|
148
|
+
className: "nx-state-layer shrink-0 rounded-full p-1 text-[var(--color-on-surface-muted)] hover:text-[var(--color-on-surface)] transition-colors",
|
|
143
149
|
children: /* @__PURE__ */ jsx(X, { size: "sm", "aria-hidden": "true" })
|
|
144
150
|
}
|
|
145
151
|
)
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useNexubMessages
|
|
4
|
+
} from "./chunk-743Y5MY3.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -8,19 +11,22 @@ import * as React from "react";
|
|
|
8
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
9
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
13
|
var Root = React.forwardRef(
|
|
11
|
-
({ className, header, children, "aria-label": ariaLabel
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
({ className, header, children, "aria-label": ariaLabel, ...props }, ref) => {
|
|
15
|
+
const messages = useNexubMessages();
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"nav",
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
"aria-label": ariaLabel ?? messages.mainNavigation,
|
|
21
|
+
className: cn("flex h-full w-20 shrink-0 flex-col items-center gap-3 py-4", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [
|
|
24
|
+
header && /* @__PURE__ */ jsx("div", { className: "mb-3 flex flex-col items-center", children: header }),
|
|
25
|
+
/* @__PURE__ */ jsx("ul", { className: "flex w-full flex-col items-center gap-1", role: "list", children })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
24
30
|
);
|
|
25
31
|
Root.displayName = "NavigationRail.Root";
|
|
26
32
|
var Item = React.forwardRef(
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
enterExit,
|
|
4
3
|
floatingSurface,
|
|
5
4
|
menuContent,
|
|
6
5
|
menuItem,
|
|
7
6
|
menuLabel,
|
|
8
7
|
menuSeparator
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FLZD7HQY.js";
|
|
10
9
|
import {
|
|
11
10
|
cn
|
|
12
11
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -59,12 +58,7 @@ var contentBaseClasses = cn(
|
|
|
59
58
|
"z-[var(--z-popover)] min-w-48 outline-none",
|
|
60
59
|
floatingSurface,
|
|
61
60
|
menuContent,
|
|
62
|
-
|
|
63
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
64
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
65
|
-
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
66
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
67
|
-
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2"
|
|
61
|
+
"nx-motion nx-pop origin-[var(--radix-menubar-content-transform-origin)]"
|
|
68
62
|
);
|
|
69
63
|
var Content2 = React.forwardRef(
|
|
70
64
|
function MenubarContent({ className, sideOffset = 8, ...props }, ref) {
|
|
@@ -130,11 +124,11 @@ var CheckboxItem2 = React.forwardRef(function MenubarCheckboxItem({ className, c
|
|
|
130
124
|
RadixMenubar.CheckboxItem,
|
|
131
125
|
{
|
|
132
126
|
ref,
|
|
133
|
-
className: cn(itemBaseClasses, "
|
|
127
|
+
className: cn(itemBaseClasses, "ps-8", className),
|
|
134
128
|
checked,
|
|
135
129
|
...props,
|
|
136
130
|
children: [
|
|
137
|
-
/* @__PURE__ */ jsx("span", { className: "absolute
|
|
131
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixMenubar.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
138
132
|
children
|
|
139
133
|
]
|
|
140
134
|
}
|
|
@@ -146,10 +140,10 @@ var RadioItem2 = React.forwardRef(function MenubarRadioItem({ className, childre
|
|
|
146
140
|
RadixMenubar.RadioItem,
|
|
147
141
|
{
|
|
148
142
|
ref,
|
|
149
|
-
className: cn(itemBaseClasses, "
|
|
143
|
+
className: cn(itemBaseClasses, "ps-8", className),
|
|
150
144
|
...props,
|
|
151
145
|
children: [
|
|
152
|
-
/* @__PURE__ */ jsx("span", { className: "absolute
|
|
146
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixMenubar.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", { className: "h-2 w-2 fill-current", viewBox: "0 0 8 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("circle", { cx: "4", cy: "4", r: "4" }) }) }) }),
|
|
153
147
|
children
|
|
154
148
|
]
|
|
155
149
|
}
|
|
@@ -169,7 +163,7 @@ var SubTrigger2 = React.forwardRef(function MenubarSubTrigger({ className, child
|
|
|
169
163
|
...props,
|
|
170
164
|
children: [
|
|
171
165
|
children,
|
|
172
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
166
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ms-auto h-4 w-4 rtl:-scale-x-100" })
|
|
173
167
|
]
|
|
174
168
|
}
|
|
175
169
|
);
|
|
@@ -192,7 +186,7 @@ var Arrow2 = React.forwardRef(
|
|
|
192
186
|
RadixMenubar.Arrow,
|
|
193
187
|
{
|
|
194
188
|
ref,
|
|
195
|
-
className: cn("fill-[var(--color-
|
|
189
|
+
className: cn("fill-[var(--color-outline-variant)]", className),
|
|
196
190
|
...props
|
|
197
191
|
}
|
|
198
192
|
);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/utils/layout.ts
|
|
4
|
+
var GAP = {
|
|
5
|
+
"0": "gap-0",
|
|
6
|
+
"0.5": "gap-0.5",
|
|
7
|
+
"1": "gap-1",
|
|
8
|
+
"1.5": "gap-1.5",
|
|
9
|
+
"2": "gap-2",
|
|
10
|
+
"2.5": "gap-2.5",
|
|
11
|
+
"3": "gap-3",
|
|
12
|
+
"3.5": "gap-3.5",
|
|
13
|
+
"4": "gap-4",
|
|
14
|
+
"5": "gap-5",
|
|
15
|
+
"6": "gap-6",
|
|
16
|
+
"7": "gap-7",
|
|
17
|
+
"8": "gap-8",
|
|
18
|
+
"9": "gap-9",
|
|
19
|
+
"10": "gap-10",
|
|
20
|
+
"11": "gap-11",
|
|
21
|
+
"12": "gap-12",
|
|
22
|
+
"14": "gap-14",
|
|
23
|
+
"16": "gap-16",
|
|
24
|
+
"20": "gap-20",
|
|
25
|
+
"24": "gap-24"
|
|
26
|
+
};
|
|
27
|
+
var ALIGN = {
|
|
28
|
+
start: "items-start",
|
|
29
|
+
"flex-start": "items-start",
|
|
30
|
+
end: "items-end",
|
|
31
|
+
"flex-end": "items-end",
|
|
32
|
+
center: "items-center",
|
|
33
|
+
baseline: "items-baseline",
|
|
34
|
+
stretch: "items-stretch"
|
|
35
|
+
};
|
|
36
|
+
var JUSTIFY = {
|
|
37
|
+
start: "justify-start",
|
|
38
|
+
"flex-start": "justify-start",
|
|
39
|
+
end: "justify-end",
|
|
40
|
+
"flex-end": "justify-end",
|
|
41
|
+
center: "justify-center",
|
|
42
|
+
between: "justify-between",
|
|
43
|
+
"space-between": "justify-between",
|
|
44
|
+
around: "justify-around",
|
|
45
|
+
"space-around": "justify-around",
|
|
46
|
+
evenly: "justify-evenly",
|
|
47
|
+
"space-evenly": "justify-evenly",
|
|
48
|
+
stretch: "justify-stretch"
|
|
49
|
+
};
|
|
50
|
+
var COLS = {
|
|
51
|
+
"1": "grid-cols-1",
|
|
52
|
+
"2": "grid-cols-2",
|
|
53
|
+
"3": "grid-cols-3",
|
|
54
|
+
"4": "grid-cols-4",
|
|
55
|
+
"5": "grid-cols-5",
|
|
56
|
+
"6": "grid-cols-6",
|
|
57
|
+
"7": "grid-cols-7",
|
|
58
|
+
"8": "grid-cols-8",
|
|
59
|
+
"9": "grid-cols-9",
|
|
60
|
+
"10": "grid-cols-10",
|
|
61
|
+
"11": "grid-cols-11",
|
|
62
|
+
"12": "grid-cols-12"
|
|
63
|
+
};
|
|
64
|
+
var ROWS = {
|
|
65
|
+
"1": "grid-rows-1",
|
|
66
|
+
"2": "grid-rows-2",
|
|
67
|
+
"3": "grid-rows-3",
|
|
68
|
+
"4": "grid-rows-4",
|
|
69
|
+
"5": "grid-rows-5",
|
|
70
|
+
"6": "grid-rows-6",
|
|
71
|
+
"7": "grid-rows-7",
|
|
72
|
+
"8": "grid-rows-8",
|
|
73
|
+
"9": "grid-rows-9",
|
|
74
|
+
"10": "grid-rows-10",
|
|
75
|
+
"11": "grid-rows-11",
|
|
76
|
+
"12": "grid-rows-12"
|
|
77
|
+
};
|
|
78
|
+
function layoutProps({ gap, align, justify, cols, rows, style }) {
|
|
79
|
+
const className = [];
|
|
80
|
+
const s = {};
|
|
81
|
+
if (gap !== void 0) {
|
|
82
|
+
const cls = typeof gap === "number" ? GAP[String(gap)] : void 0;
|
|
83
|
+
if (cls) className.push(cls);
|
|
84
|
+
else s.gap = typeof gap === "number" ? `${gap * 0.25}rem` : gap;
|
|
85
|
+
}
|
|
86
|
+
if (align) {
|
|
87
|
+
if (ALIGN[align]) className.push(ALIGN[align]);
|
|
88
|
+
else s.alignItems = align;
|
|
89
|
+
}
|
|
90
|
+
if (justify) {
|
|
91
|
+
if (JUSTIFY[justify]) className.push(JUSTIFY[justify]);
|
|
92
|
+
else s.justifyContent = justify;
|
|
93
|
+
}
|
|
94
|
+
if (cols !== void 0) {
|
|
95
|
+
const cls = typeof cols === "number" ? COLS[String(cols)] : void 0;
|
|
96
|
+
if (cls) className.push(cls);
|
|
97
|
+
else s.gridTemplateColumns = typeof cols === "number" ? `repeat(${cols}, minmax(0, 1fr))` : cols;
|
|
98
|
+
}
|
|
99
|
+
if (rows !== void 0) {
|
|
100
|
+
const cls = typeof rows === "number" ? ROWS[String(rows)] : void 0;
|
|
101
|
+
if (cls) className.push(cls);
|
|
102
|
+
else s.gridTemplateRows = typeof rows === "number" ? `repeat(${rows}, minmax(0, 1fr))` : rows;
|
|
103
|
+
}
|
|
104
|
+
const merged = { ...s, ...style };
|
|
105
|
+
return { className, style: Object.keys(merged).length ? merged : void 0 };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
layoutProps
|
|
110
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
enterExit,
|
|
4
3
|
floatingSurface,
|
|
5
4
|
menuLabel,
|
|
6
5
|
menuSeparator
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FLZD7HQY.js";
|
|
8
7
|
import {
|
|
9
8
|
field,
|
|
10
9
|
fieldFocusVisible,
|
|
@@ -33,7 +32,7 @@ var Trigger2 = React.forwardRef(
|
|
|
33
32
|
fieldFocusVisible,
|
|
34
33
|
// Open reads like focus: the 2px primary border.
|
|
35
34
|
"data-[state=open]:border-[var(--color-primary)] data-[state=open]:shadow-[inset_0_0_0_1px_var(--color-primary)]",
|
|
36
|
-
"data-[placeholder]:text-[var(--color-
|
|
35
|
+
"data-[placeholder]:text-[var(--color-on-surface-muted)]",
|
|
37
36
|
"disabled:cursor-not-allowed disabled:border-[var(--color-outline-variant)] disabled:bg-[var(--color-surface-container-low)] disabled:text-[var(--color-text-disabled)]",
|
|
38
37
|
invalid && fieldInvalid,
|
|
39
38
|
"[&>span]:line-clamp-1",
|
|
@@ -80,9 +79,7 @@ var Content2 = React.forwardRef(
|
|
|
80
79
|
className: cn(
|
|
81
80
|
"relative z-[var(--z-popover)] max-h-96 min-w-32 overflow-hidden",
|
|
82
81
|
floatingSurface,
|
|
83
|
-
|
|
84
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
85
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
82
|
+
"nx-motion nx-pop origin-[var(--radix-select-content-transform-origin)]",
|
|
86
83
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 w-[var(--radix-select-trigger-width)]",
|
|
87
84
|
className
|
|
88
85
|
),
|
|
@@ -123,7 +120,7 @@ var Item2 = React.forwardRef(
|
|
|
123
120
|
{
|
|
124
121
|
ref,
|
|
125
122
|
className: cn(
|
|
126
|
-
"relative flex w-full cursor-default select-none items-center rounded-[10px] py-2
|
|
123
|
+
"relative flex w-full cursor-default select-none items-center rounded-[10px] py-2 ps-8 pe-2 text-body-sm text-[var(--color-on-surface)] outline-none",
|
|
127
124
|
// Highlight = the on-surface state layer at hover opacity.
|
|
128
125
|
"focus:bg-[color-mix(in_srgb,var(--color-on-surface)_8%,transparent)]",
|
|
129
126
|
"data-[disabled]:pointer-events-none data-[disabled]:text-[var(--color-text-disabled)]",
|
|
@@ -131,7 +128,7 @@ var Item2 = React.forwardRef(
|
|
|
131
128
|
),
|
|
132
129
|
...props,
|
|
133
130
|
children: [
|
|
134
|
-
/* @__PURE__ */ jsx("span", { className: "absolute
|
|
131
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(RadixSelect.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { size: "xs", "aria-hidden": "true" }) }) }),
|
|
135
132
|
/* @__PURE__ */ jsx(RadixSelect.ItemText, { children })
|
|
136
133
|
]
|
|
137
134
|
}
|
|
@@ -23,7 +23,7 @@ var ButtonGroup = React.forwardRef(
|
|
|
23
23
|
attached ? [
|
|
24
24
|
"gap-0.5",
|
|
25
25
|
"[&>*:not(:first-child):not(:last-child)]:rounded-[6px]",
|
|
26
|
-
orientation === "horizontal" ? ["[&>*:first-child]:rounded-
|
|
26
|
+
orientation === "horizontal" ? ["[&>*:first-child]:rounded-e-[6px]", "[&>*:last-child]:rounded-s-[6px]"] : ["[&>*:first-child]:rounded-b-[6px]", "[&>*:last-child]:rounded-t-[6px]"]
|
|
27
27
|
] : "gap-2",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -25,7 +25,7 @@ var Illustration = React.forwardRef(
|
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
ref,
|
|
28
|
-
className: cn("text-[var(--color-
|
|
28
|
+
className: cn("text-[var(--color-on-surface-muted)]", className),
|
|
29
29
|
...props
|
|
30
30
|
}
|
|
31
31
|
)
|
|
@@ -36,7 +36,7 @@ var Title = React.forwardRef(
|
|
|
36
36
|
"h3",
|
|
37
37
|
{
|
|
38
38
|
ref,
|
|
39
|
-
className: cn("text-lg font-semibold text-[var(--color-
|
|
39
|
+
className: cn("text-lg font-semibold text-[var(--color-on-surface)]", className),
|
|
40
40
|
...props
|
|
41
41
|
}
|
|
42
42
|
)
|
|
@@ -46,7 +46,7 @@ var Description = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
46
46
|
"p",
|
|
47
47
|
{
|
|
48
48
|
ref,
|
|
49
|
-
className: cn("max-w-sm text-sm text-[var(--color-
|
|
49
|
+
className: cn("max-w-sm text-sm text-[var(--color-on-surface-muted)]", className),
|
|
50
50
|
...props
|
|
51
51
|
}
|
|
52
52
|
));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
toneTextClasses
|
|
4
|
+
} from "./chunk-C6JRJ6JW.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -8,15 +11,15 @@ import * as React from "react";
|
|
|
8
11
|
import { jsx } from "react/jsx-runtime";
|
|
9
12
|
var HelperText = React.forwardRef(
|
|
10
13
|
({ className, tone, style, children, ...props }, ref) => {
|
|
11
|
-
const toneStyle = tone ? { color: `var(--color-text-${tone})` } : {};
|
|
12
14
|
return /* @__PURE__ */ jsx(
|
|
13
15
|
"p",
|
|
14
16
|
{
|
|
15
17
|
ref,
|
|
16
18
|
"data-tone": tone,
|
|
17
|
-
style
|
|
19
|
+
style,
|
|
18
20
|
className: cn(
|
|
19
|
-
"text-sm text-[var(--color-
|
|
21
|
+
"text-sm text-[var(--color-on-surface-muted)] leading-snug",
|
|
22
|
+
tone && toneTextClasses[tone],
|
|
20
23
|
className
|
|
21
24
|
),
|
|
22
25
|
...props,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
avatarVariants
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2Y4WLNEZ.js";
|
|
5
|
+
import {
|
|
6
|
+
useNexubMessages
|
|
7
|
+
} from "./chunk-743Y5MY3.js";
|
|
5
8
|
import {
|
|
6
9
|
cn
|
|
7
10
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -13,9 +16,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
16
|
var avatarGroupVariants = cva("flex items-center", {
|
|
14
17
|
variants: {
|
|
15
18
|
spacing: {
|
|
16
|
-
sm: "[&>*:not(:first-child)]:-
|
|
17
|
-
md: "[&>*:not(:first-child)]:-
|
|
18
|
-
lg: "[&>*:not(:first-child)]:-
|
|
19
|
+
sm: "[&>*:not(:first-child)]:-ms-3",
|
|
20
|
+
md: "[&>*:not(:first-child)]:-ms-2",
|
|
21
|
+
lg: "[&>*:not(:first-child)]:-ms-1"
|
|
19
22
|
}
|
|
20
23
|
},
|
|
21
24
|
defaultVariants: {
|
|
@@ -24,6 +27,7 @@ var avatarGroupVariants = cva("flex items-center", {
|
|
|
24
27
|
});
|
|
25
28
|
var AvatarGroup = React.forwardRef(
|
|
26
29
|
({ className, max, size = "md", spacing, children, ...props }, ref) => {
|
|
30
|
+
const messages = useNexubMessages();
|
|
27
31
|
const items = React.Children.toArray(children);
|
|
28
32
|
const visibleItems = max !== void 0 ? items.slice(0, max) : items;
|
|
29
33
|
const overflowCount = max !== void 0 && items.length > max ? items.length - max : 0;
|
|
@@ -44,18 +48,18 @@ var AvatarGroup = React.forwardRef(
|
|
|
44
48
|
return /* @__PURE__ */ jsx(
|
|
45
49
|
"span",
|
|
46
50
|
{
|
|
47
|
-
className: "ring-2 ring-[var(--color-
|
|
51
|
+
className: "ring-2 ring-[var(--color-surface)] rounded-full inline-flex",
|
|
48
52
|
children: childWithSize
|
|
49
53
|
},
|
|
50
54
|
child.key ?? index
|
|
51
55
|
);
|
|
52
56
|
}),
|
|
53
|
-
overflowCount > 0 && /* @__PURE__ */ jsx("span", { className: "ring-2 ring-[var(--color-
|
|
57
|
+
overflowCount > 0 && /* @__PURE__ */ jsx("span", { className: "ring-2 ring-[var(--color-surface)] rounded-full inline-flex", children: /* @__PURE__ */ jsx(
|
|
54
58
|
"span",
|
|
55
59
|
{
|
|
56
60
|
className: cn(avatarVariants({ size }), "font-medium"),
|
|
57
61
|
role: "img",
|
|
58
|
-
"aria-label":
|
|
62
|
+
"aria-label": messages.moreCount(overflowCount),
|
|
59
63
|
children: /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", children: [
|
|
60
64
|
"+",
|
|
61
65
|
overflowCount
|