@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.
Files changed (199) hide show
  1. package/dist/chunk-24CZFBTG.js +83 -0
  2. package/dist/chunk-2MKB5FQI.js +122 -0
  3. package/dist/chunk-2RLSIOGB.js +173 -0
  4. package/dist/chunk-2VDP2ML4.js +105 -0
  5. package/dist/chunk-3CSKW56L.js +44 -0
  6. package/dist/chunk-3U54QLYB.js +87 -0
  7. package/dist/chunk-46CFSBEO.js +48 -0
  8. package/dist/chunk-4BTP4464.js +92 -0
  9. package/dist/chunk-4NGB7XIM.js +88 -0
  10. package/dist/chunk-4OCXGNP3.js +85 -0
  11. package/dist/chunk-52KTX5A7.js +119 -0
  12. package/dist/chunk-6AZP6VBM.js +62 -0
  13. package/dist/chunk-6Y734SXN.js +51 -0
  14. package/dist/chunk-7B4FS7VQ.js +150 -0
  15. package/dist/chunk-7W2YDJ5W.js +128 -0
  16. package/dist/chunk-A7L75YXY.js +61 -0
  17. package/dist/chunk-ADO2DB6Q.js +1 -0
  18. package/dist/chunk-AHZQQ7OT.js +83 -0
  19. package/dist/chunk-AT6RPKU3.js +12 -0
  20. package/dist/chunk-BBVOB4EC.js +36 -0
  21. package/dist/chunk-BGY23Y5O.js +104 -0
  22. package/dist/chunk-BJKW3G2L.js +99 -0
  23. package/dist/chunk-BMVAZIAJ.js +187 -0
  24. package/dist/chunk-BTZW34TX.js +76 -0
  25. package/dist/chunk-BUBYXAJK.js +20 -0
  26. package/dist/chunk-BV3U3ATL.js +1 -0
  27. package/dist/chunk-BYCTJHXY.js +75 -0
  28. package/dist/chunk-BYF223HT.js +92 -0
  29. package/dist/chunk-CPV367VS.js +106 -0
  30. package/dist/chunk-CVBAWKNG.js +124 -0
  31. package/dist/chunk-CZUNTABW.js +25 -0
  32. package/dist/chunk-DAXDAFNG.js +92 -0
  33. package/dist/chunk-DD6XCW6R.js +53 -0
  34. package/dist/chunk-DEH2Z27F.js +50 -0
  35. package/dist/chunk-DOHXBNOP.js +119 -0
  36. package/dist/chunk-DR2Y3PIT.js +91 -0
  37. package/dist/chunk-ELC2NBGH.js +89 -0
  38. package/dist/chunk-EV43I5J6.js +1 -0
  39. package/dist/chunk-FS4XKWFA.js +308 -0
  40. package/dist/chunk-FUJOSPNQ.js +38 -0
  41. package/dist/chunk-GTQIA62H.js +60 -0
  42. package/dist/chunk-H4MXRAXP.js +37 -0
  43. package/dist/chunk-HW3I7I3R.js +29 -0
  44. package/dist/chunk-HY3JWSG4.js +1 -0
  45. package/dist/chunk-I5Z3A7N3.js +40 -0
  46. package/dist/chunk-IBCYG6HR.js +55 -0
  47. package/dist/chunk-IHW2L532.js +175 -0
  48. package/dist/chunk-IU76LV3W.js +101 -0
  49. package/dist/chunk-IZ6ZPEZ2.js +1 -0
  50. package/dist/chunk-JCUVWDUC.js +57 -0
  51. package/dist/chunk-JKTZMWWC.js +63 -0
  52. package/dist/chunk-JQDLCN5D.js +66 -0
  53. package/dist/chunk-K7CUCLLI.js +43 -0
  54. package/dist/chunk-KBB7M6WO.js +65 -0
  55. package/dist/chunk-KLTQJZOX.js +1 -0
  56. package/dist/chunk-KWWV3CM3.js +62 -0
  57. package/dist/chunk-KZW37FQZ.js +40 -0
  58. package/dist/chunk-L6GBZ2HB.js +145 -0
  59. package/dist/chunk-LAWZQ6R6.js +76 -0
  60. package/dist/chunk-LOP63AVE.js +49 -0
  61. package/dist/chunk-MY6XUJ5P.js +216 -0
  62. package/dist/chunk-N2GIMMTF.js +98 -0
  63. package/dist/chunk-NAIZ7R2L.js +59 -0
  64. package/dist/chunk-NHUQLIHL.js +9 -0
  65. package/dist/chunk-NZ7UK3G6.js +1 -0
  66. package/dist/chunk-OUBBOOZE.js +34 -0
  67. package/dist/chunk-OZPPL76D.js +82 -0
  68. package/dist/chunk-P6BZNFVU.js +38 -0
  69. package/dist/chunk-PANDAMD2.js +54 -0
  70. package/dist/chunk-PBLEGOLM.js +71 -0
  71. package/dist/chunk-PER3O4FD.js +33 -0
  72. package/dist/chunk-PICMOOAZ.js +1 -0
  73. package/dist/chunk-POBSY7EZ.js +155 -0
  74. package/dist/chunk-POFKKYHY.js +37 -0
  75. package/dist/chunk-QF7GUDOE.js +67 -0
  76. package/dist/chunk-QHJ43Q2T.js +70 -0
  77. package/dist/chunk-QURKXXNS.js +46 -0
  78. package/dist/chunk-ROZVVWPV.js +8 -0
  79. package/dist/chunk-S344IRK4.js +63 -0
  80. package/dist/chunk-SZKUSLHI.js +176 -0
  81. package/dist/chunk-T4IVMVMQ.js +32 -0
  82. package/dist/chunk-TCTFQYLH.js +115 -0
  83. package/dist/chunk-U3AEA4BZ.js +56 -0
  84. package/dist/chunk-U3EGB3JL.js +43 -0
  85. package/dist/chunk-UALYS4XI.js +67 -0
  86. package/dist/chunk-UTBUIBEP.js +153 -0
  87. package/dist/chunk-UWWL5FPC.js +80 -0
  88. package/dist/chunk-V3FZHIEB.js +52 -0
  89. package/dist/chunk-V6GZZFTV.js +106 -0
  90. package/dist/chunk-VPZCQFVY.js +33 -0
  91. package/dist/chunk-VT7RKY46.js +49 -0
  92. package/dist/chunk-W4IEXUD4.js +127 -0
  93. package/dist/chunk-WPPNDU2E.js +36 -0
  94. package/dist/chunk-XNDCVVNE.js +45 -0
  95. package/dist/chunk-Y45JAJKW.js +44 -0
  96. package/dist/chunk-YAGVMERC.js +81 -0
  97. package/dist/chunk-YGOR3KT7.js +46 -0
  98. package/dist/chunk-YJD66LTV.js +54 -0
  99. package/dist/chunk-YJU4ZRQZ.js +1 -0
  100. package/dist/chunk-YUFCNHZF.js +27 -0
  101. package/dist/chunk-YUNWZAAD.js +57 -0
  102. package/dist/chunk-ZFVBFCYV.js +84 -0
  103. package/dist/chunk-ZXLACKEB.js +8 -0
  104. package/dist/components/Accordion/index.js +8 -0
  105. package/dist/components/Alert/index.js +10 -0
  106. package/dist/components/AlertDialog/index.js +8 -0
  107. package/dist/components/AppShell/index.js +8 -0
  108. package/dist/components/AspectRatio/index.js +8 -0
  109. package/dist/components/Autocomplete/index.js +9 -0
  110. package/dist/components/Avatar/index.js +11 -0
  111. package/dist/components/AvatarGroup/index.js +11 -0
  112. package/dist/components/Badge/index.js +10 -0
  113. package/dist/components/Banner/index.js +10 -0
  114. package/dist/components/Box/index.js +8 -0
  115. package/dist/components/Breadcrumb/index.js +8 -0
  116. package/dist/components/Button/index.js +10 -0
  117. package/dist/components/ButtonGroup/index.js +8 -0
  118. package/dist/components/Callout/index.js +10 -0
  119. package/dist/components/Card/index.js +11 -0
  120. package/dist/components/CheckList/index.js +10 -0
  121. package/dist/components/Checkbox/index.js +8 -0
  122. package/dist/components/Chip/index.js +10 -0
  123. package/dist/components/Code/index.js +8 -0
  124. package/dist/components/Collapsible/index.js +8 -0
  125. package/dist/components/Combobox/index.js +9 -0
  126. package/dist/components/CommandPalette/index.js +8 -0
  127. package/dist/components/Container/index.js +10 -0
  128. package/dist/components/ContextMenu/index.js +8 -0
  129. package/dist/components/CountryBadge/index.js +9 -0
  130. package/dist/components/DataTable/index.js +8 -0
  131. package/dist/components/DatePicker/index.js +8 -0
  132. package/dist/components/DateRangePicker/index.js +8 -0
  133. package/dist/components/Dialog/index.js +9 -0
  134. package/dist/components/Drawer/index.js +11 -0
  135. package/dist/components/DropdownMenu/index.js +8 -0
  136. package/dist/components/EmptyState/index.js +8 -0
  137. package/dist/components/ErrorState/index.js +8 -0
  138. package/dist/components/EyebrowChip/index.js +8 -0
  139. package/dist/components/FileUpload/index.js +8 -0
  140. package/dist/components/FilterChip/index.js +8 -0
  141. package/dist/components/Flag/index.js +9 -0
  142. package/dist/components/Flex/index.js +8 -0
  143. package/dist/components/FormError/index.js +9 -0
  144. package/dist/components/FormField/index.js +11 -0
  145. package/dist/components/GradientDivider/index.js +8 -0
  146. package/dist/components/Grid/index.js +8 -0
  147. package/dist/components/Heading/index.js +10 -0
  148. package/dist/components/HelperText/index.js +9 -0
  149. package/dist/components/HoverCard/index.js +8 -0
  150. package/dist/components/IconButton/index.js +10 -0
  151. package/dist/components/Input/index.js +15 -0
  152. package/dist/components/Kbd/index.js +9 -0
  153. package/dist/components/KeyboardShortcut/index.js +9 -0
  154. package/dist/components/Label/index.js +11 -0
  155. package/dist/components/Link/index.js +10 -0
  156. package/dist/components/Logo/index.js +10 -0
  157. package/dist/components/Menubar/index.js +8 -0
  158. package/dist/components/Motion/index.js +13 -0
  159. package/dist/components/NavigationMenu/index.js +8 -0
  160. package/dist/components/NumberInput/index.js +9 -0
  161. package/dist/components/PageHeader/index.js +8 -0
  162. package/dist/components/Pagination/index.js +8 -0
  163. package/dist/components/PasswordInput/index.js +9 -0
  164. package/dist/components/Popover/index.js +9 -0
  165. package/dist/components/Progress/index.js +12 -0
  166. package/dist/components/RadioGroup/index.js +8 -0
  167. package/dist/components/Rating/index.js +11 -0
  168. package/dist/components/ScrollArea/index.js +8 -0
  169. package/dist/components/SearchInput/index.js +9 -0
  170. package/dist/components/Section/index.js +10 -0
  171. package/dist/components/SegmentedControl/index.js +8 -0
  172. package/dist/components/Select/index.js +8 -0
  173. package/dist/components/Separator/index.js +10 -0
  174. package/dist/components/Sidebar/index.js +8 -0
  175. package/dist/components/Skeleton/index.js +10 -0
  176. package/dist/components/Slider/index.js +8 -0
  177. package/dist/components/Spinner/index.js +10 -0
  178. package/dist/components/Stack/index.js +8 -0
  179. package/dist/components/StatusPill/index.js +10 -0
  180. package/dist/components/Switch/index.js +8 -0
  181. package/dist/components/Table/index.js +8 -0
  182. package/dist/components/Tabs/index.js +8 -0
  183. package/dist/components/Tag/index.js +10 -0
  184. package/dist/components/Text/index.js +10 -0
  185. package/dist/components/TextGradient/index.js +8 -0
  186. package/dist/components/Textarea/index.js +10 -0
  187. package/dist/components/ThemeProvider/index.js +10 -0
  188. package/dist/components/Toast/index.js +14 -0
  189. package/dist/components/Toggle/index.js +11 -0
  190. package/dist/components/ToggleGroup/index.js +9 -0
  191. package/dist/components/Toolbar/index.js +8 -0
  192. package/dist/components/Tooltip/index.js +16 -0
  193. package/dist/components/TopNav/index.js +9 -0
  194. package/dist/components/VisuallyHidden/index.js +7 -0
  195. package/dist/index.d.ts +28 -11
  196. package/dist/index.js +479 -5896
  197. package/package.json +12 -12
  198. package/dist/index.cjs +0 -6112
  199. package/dist/index.d.cts +0 -1245
@@ -0,0 +1,187 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/DataTable/DataTable.tsx
7
+ import * as React from "react";
8
+ import {
9
+ useReactTable,
10
+ getCoreRowModel,
11
+ getSortedRowModel,
12
+ getFilteredRowModel,
13
+ getPaginationRowModel,
14
+ flexRender
15
+ } from "@tanstack/react-table";
16
+ import { ArrowUp, ArrowDown, ChevronsUpDown } from "@nexub/icons";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ var TableRoot = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "w-full overflow-auto", children: /* @__PURE__ */ jsx(
19
+ "table",
20
+ {
21
+ ref,
22
+ className: cn("w-full caption-bottom text-sm", className),
23
+ ...props
24
+ }
25
+ ) }));
26
+ TableRoot.displayName = "DataTable.TableRoot";
27
+ var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
28
+ "thead",
29
+ {
30
+ ref,
31
+ className: cn("[&_tr]:border-b border-[var(--color-border-default)]", className),
32
+ ...props
33
+ }
34
+ ));
35
+ TableHeader.displayName = "DataTable.TableHeader";
36
+ var TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
37
+ "tbody",
38
+ {
39
+ ref,
40
+ className: cn("[&_tr:last-child]:border-0", className),
41
+ ...props
42
+ }
43
+ ));
44
+ TableBody.displayName = "DataTable.TableBody";
45
+ var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
46
+ "tr",
47
+ {
48
+ ref,
49
+ className: cn(
50
+ "border-b border-[var(--color-border-default)] transition-colors hover:bg-[var(--color-bg-subtle)] data-[state=selected]:bg-[var(--color-bg-subtle)]",
51
+ className
52
+ ),
53
+ ...props
54
+ }
55
+ ));
56
+ TableRow.displayName = "DataTable.TableRow";
57
+ var TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
58
+ "th",
59
+ {
60
+ ref,
61
+ className: cn(
62
+ "h-10 px-4 text-left align-middle text-xs font-medium text-[var(--color-text-muted)] [&:has([role=checkbox])]:pr-0",
63
+ className
64
+ ),
65
+ ...props
66
+ }
67
+ ));
68
+ TableHead.displayName = "DataTable.TableHead";
69
+ var TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
70
+ "td",
71
+ {
72
+ ref,
73
+ className: cn(
74
+ "px-4 py-3 align-middle text-[var(--color-text-primary)] [&:has([role=checkbox])]:pr-0",
75
+ className
76
+ ),
77
+ ...props
78
+ }
79
+ ));
80
+ TableCell.displayName = "DataTable.TableCell";
81
+ function DataTable({
82
+ columns,
83
+ data,
84
+ enableSorting = false,
85
+ enableRowSelection = false,
86
+ pagination,
87
+ className,
88
+ ...props
89
+ }) {
90
+ const [sorting, setSorting] = React.useState([]);
91
+ const [rowSelection, setRowSelection] = React.useState({});
92
+ const [paginationState, setPaginationState] = React.useState({
93
+ pageIndex: 0,
94
+ pageSize: pagination?.pageSize ?? 20
95
+ });
96
+ const tableState = React.useMemo(
97
+ () => ({
98
+ sorting: enableSorting ? sorting : void 0,
99
+ rowSelection: enableRowSelection ? rowSelection : void 0,
100
+ pagination: pagination ? paginationState : void 0
101
+ }),
102
+ [enableSorting, sorting, enableRowSelection, rowSelection, pagination, paginationState]
103
+ );
104
+ const table = useReactTable({
105
+ data,
106
+ columns,
107
+ state: tableState,
108
+ onSortingChange: enableSorting ? setSorting : void 0,
109
+ onRowSelectionChange: enableRowSelection ? setRowSelection : void 0,
110
+ onPaginationChange: pagination ? setPaginationState : void 0,
111
+ getCoreRowModel: getCoreRowModel(),
112
+ getSortedRowModel: enableSorting ? getSortedRowModel() : void 0,
113
+ getFilteredRowModel: getFilteredRowModel(),
114
+ getPaginationRowModel: pagination ? getPaginationRowModel() : void 0,
115
+ enableRowSelection,
116
+ manualPagination: false
117
+ });
118
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), ...props, children: [
119
+ /* @__PURE__ */ jsxs(TableRoot, { children: [
120
+ /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { className: "hover:bg-transparent", children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(
121
+ TableHead,
122
+ {
123
+ "aria-sort": enableSorting && header.column.getCanSort() ? header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none" : void 0,
124
+ children: header.isPlaceholder ? null : enableSorting && header.column.getCanSort() ? /* @__PURE__ */ jsxs(
125
+ "button",
126
+ {
127
+ onClick: header.column.getToggleSortingHandler(),
128
+ className: "inline-flex items-center gap-1 hover:text-[var(--color-text-primary)]",
129
+ children: [
130
+ flexRender(header.column.columnDef.header, header.getContext()),
131
+ header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { size: "xs", "aria-hidden": "true" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronsUpDown, { size: "xs", className: "opacity-40", "aria-hidden": "true" })
132
+ ]
133
+ }
134
+ ) : flexRender(header.column.columnDef.header, header.getContext())
135
+ },
136
+ header.id
137
+ )) }, headerGroup.id)) }),
138
+ /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
139
+ TableRow,
140
+ {
141
+ "data-state": enableRowSelection && row.getIsSelected() ? "selected" : void 0,
142
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
143
+ },
144
+ row.id
145
+ )) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
146
+ TableCell,
147
+ {
148
+ colSpan: columns.length,
149
+ className: "h-24 text-center text-[var(--color-text-muted)]",
150
+ children: "No results."
151
+ }
152
+ ) }) })
153
+ ] }),
154
+ pagination && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 text-sm text-[var(--color-text-muted)]", children: [
155
+ /* @__PURE__ */ jsxs("span", { children: [
156
+ "Page ",
157
+ table.getState().pagination.pageIndex + 1,
158
+ " of ",
159
+ table.getPageCount()
160
+ ] }),
161
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
162
+ /* @__PURE__ */ jsx(
163
+ "button",
164
+ {
165
+ onClick: () => table.previousPage(),
166
+ disabled: !table.getCanPreviousPage(),
167
+ className: "rounded border border-[var(--color-border-default)] px-3 py-2 min-h-[44px] disabled:opacity-50",
168
+ children: "Previous"
169
+ }
170
+ ),
171
+ /* @__PURE__ */ jsx(
172
+ "button",
173
+ {
174
+ onClick: () => table.nextPage(),
175
+ disabled: !table.getCanNextPage(),
176
+ className: "rounded border border-[var(--color-border-default)] px-3 py-2 min-h-[44px] disabled:opacity-50",
177
+ children: "Next"
178
+ }
179
+ )
180
+ ] })
181
+ ] })
182
+ ] });
183
+ }
184
+
185
+ export {
186
+ DataTable
187
+ };
@@ -0,0 +1,76 @@
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/TopNav/TopNav.tsx
10
+ import * as React from "react";
11
+ import { Slot } from "@radix-ui/react-slot";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var Root = React.forwardRef(
14
+ ({ className, children, surface = "solid", ...props }, ref) => /* @__PURE__ */ jsx(
15
+ "header",
16
+ {
17
+ ref,
18
+ className: cn(
19
+ "sticky top-0 z-[var(--z-sticky,100)] flex h-[var(--size-nav-header,64px)] items-center border-b border-[var(--color-border-default)] bg-[var(--color-bg-default)] px-4",
20
+ surface === "glass" && glassSurfaceClass,
21
+ className
22
+ ),
23
+ "data-material": surface === "glass" ? "glass" : void 0,
24
+ ...props,
25
+ children: /* @__PURE__ */ jsx("div", { className: "flex w-full items-center gap-4", children })
26
+ }
27
+ )
28
+ );
29
+ Root.displayName = "TopNav.Root";
30
+ var Logo = React.forwardRef(
31
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("shrink-0 flex items-center", className), ...props })
32
+ );
33
+ Logo.displayName = "TopNav.Logo";
34
+ var Menu = React.forwardRef(
35
+ ({ className, ...props }, ref) => (
36
+ // Scrolls horizontally on narrow screens rather than hiding the links.
37
+ /* @__PURE__ */ jsx(
38
+ "nav",
39
+ {
40
+ ref,
41
+ "aria-label": "Main",
42
+ className: cn("flex min-w-0 items-center gap-1 overflow-x-auto", className),
43
+ ...props
44
+ }
45
+ )
46
+ )
47
+ );
48
+ Menu.displayName = "TopNav.Menu";
49
+ var Item = React.forwardRef(
50
+ ({ className, active, asChild, ...props }, ref) => {
51
+ const Comp = asChild ? Slot : "a";
52
+ return /* @__PURE__ */ jsx(
53
+ Comp,
54
+ {
55
+ ref,
56
+ "aria-current": active ? "page" : void 0,
57
+ className: cn(
58
+ "inline-flex h-9 shrink-0 items-center rounded-md px-4 text-sm font-medium transition-colors",
59
+ active ? "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]" : "text-[var(--color-text-muted)] hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)]",
60
+ className
61
+ ),
62
+ ...props
63
+ }
64
+ );
65
+ }
66
+ );
67
+ Item.displayName = "TopNav.Item";
68
+ var Actions = React.forwardRef(
69
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("ml-auto flex items-center gap-2", className), ...props })
70
+ );
71
+ Actions.displayName = "TopNav.Actions";
72
+ var TopNav = { Root, Logo, Menu, Item, Actions };
73
+
74
+ export {
75
+ TopNav
76
+ };
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Box/Box.tsx
7
+ import * as React from "react";
8
+ import { Slot } from "@radix-ui/react-slot";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var Box = React.forwardRef(
11
+ ({ asChild = false, className, children, ...rest }, ref) => {
12
+ const Comp = asChild ? Slot : "div";
13
+ return /* @__PURE__ */ jsx(Comp, { ref, className: cn(className), ...rest, children });
14
+ }
15
+ );
16
+ Box.displayName = "Box";
17
+
18
+ export {
19
+ Box
20
+ };
@@ -0,0 +1 @@
1
+ 'use client';
@@ -0,0 +1,75 @@
1
+ 'use client';
2
+ import {
3
+ avatarVariants
4
+ } from "./chunk-CPV367VS.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-AT6RPKU3.js";
8
+
9
+ // src/components/AvatarGroup/AvatarGroup.tsx
10
+ import * as React from "react";
11
+ import { cva } from "class-variance-authority";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var avatarGroupVariants = cva("flex items-center", {
14
+ variants: {
15
+ spacing: {
16
+ sm: "[&>*:not(:first-child)]:-ml-3",
17
+ md: "[&>*:not(:first-child)]:-ml-2",
18
+ lg: "[&>*:not(:first-child)]:-ml-1"
19
+ }
20
+ },
21
+ defaultVariants: {
22
+ spacing: "md"
23
+ }
24
+ });
25
+ var AvatarGroup = React.forwardRef(
26
+ ({ className, max, size = "md", spacing, children, ...props }, ref) => {
27
+ const items = React.Children.toArray(children);
28
+ const visibleItems = max !== void 0 ? items.slice(0, max) : items;
29
+ const overflowCount = max !== void 0 && items.length > max ? items.length - max : 0;
30
+ return /* @__PURE__ */ jsxs(
31
+ "div",
32
+ {
33
+ ref,
34
+ className: cn(avatarGroupVariants({ spacing }), className),
35
+ role: "group",
36
+ ...props,
37
+ children: [
38
+ visibleItems.map((child, index) => {
39
+ if (!React.isValidElement(child)) return child;
40
+ const childWithSize = React.cloneElement(
41
+ child,
42
+ { size }
43
+ );
44
+ return /* @__PURE__ */ jsx(
45
+ "span",
46
+ {
47
+ className: "ring-2 ring-[var(--color-bg-default)] rounded-full inline-flex",
48
+ children: childWithSize
49
+ },
50
+ child.key ?? index
51
+ );
52
+ }),
53
+ overflowCount > 0 && /* @__PURE__ */ jsx("span", { className: "ring-2 ring-[var(--color-bg-default)] rounded-full inline-flex", children: /* @__PURE__ */ jsx(
54
+ "span",
55
+ {
56
+ className: cn(avatarVariants({ size }), "font-medium"),
57
+ role: "img",
58
+ "aria-label": `${overflowCount} more`,
59
+ children: /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", children: [
60
+ "+",
61
+ overflowCount
62
+ ] })
63
+ }
64
+ ) })
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ );
70
+ AvatarGroup.displayName = "AvatarGroup";
71
+
72
+ export {
73
+ avatarGroupVariants,
74
+ AvatarGroup
75
+ };
@@ -0,0 +1,92 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Progress/Progress.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var progressTrackVariants = cva(
11
+ "relative w-full overflow-hidden rounded-full bg-[var(--color-bg-muted)]",
12
+ {
13
+ variants: {
14
+ size: {
15
+ sm: "h-1",
16
+ md: "h-2",
17
+ lg: "h-3"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ size: "md"
22
+ }
23
+ }
24
+ );
25
+ var progressFillVariants = cva(
26
+ "h-full rounded-full transition-all duration-300 ease-in-out",
27
+ {
28
+ variants: {
29
+ tone: {
30
+ neutral: "bg-[var(--color-neutral-500)]",
31
+ info: "bg-[var(--color-semantic-info-default)]",
32
+ success: "bg-[var(--color-semantic-success-default)]",
33
+ warning: "bg-[var(--color-semantic-warning-default)]",
34
+ danger: "bg-[var(--color-semantic-error-default)]",
35
+ leap: "bg-[var(--color-leap-500)]",
36
+ bookub: "bg-[var(--color-bookub-500)]",
37
+ payub: "bg-[var(--color-payub-500)]",
38
+ founderub: "bg-[var(--color-founderub-500)]"
39
+ },
40
+ animated: {
41
+ true: "bg-[length:200%_100%] animate-[progress-stripes_1s_linear_infinite]"
42
+ }
43
+ },
44
+ defaultVariants: {
45
+ tone: "neutral"
46
+ }
47
+ }
48
+ );
49
+ var Progress = React.forwardRef(
50
+ ({
51
+ className,
52
+ size,
53
+ tone = "neutral",
54
+ value = 0,
55
+ max = 100,
56
+ animated = false,
57
+ ...props
58
+ }, ref) => {
59
+ const clampedValue = Math.min(Math.max(value, 0), max);
60
+ const percentage = clampedValue / max * 100;
61
+ const isIndeterminate = value === void 0 || value === null;
62
+ return /* @__PURE__ */ jsx(
63
+ "div",
64
+ {
65
+ ref,
66
+ role: "progressbar",
67
+ "aria-valuenow": isIndeterminate ? void 0 : clampedValue,
68
+ "aria-valuemin": 0,
69
+ "aria-valuemax": max,
70
+ className: cn(progressTrackVariants({ size }), className),
71
+ ...props,
72
+ children: /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ className: cn(
76
+ progressFillVariants({ tone }),
77
+ animated && "animate-pulse"
78
+ ),
79
+ style: { width: `${percentage}%` }
80
+ }
81
+ )
82
+ }
83
+ );
84
+ }
85
+ );
86
+ Progress.displayName = "Progress";
87
+
88
+ export {
89
+ progressTrackVariants,
90
+ progressFillVariants,
91
+ Progress
92
+ };
@@ -0,0 +1,106 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Avatar/Avatar.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var avatarVariants = cva(
11
+ "relative inline-flex items-center justify-center shrink-0 rounded-full overflow-hidden bg-[var(--color-bg-muted)] text-[var(--color-text-muted)] font-medium select-none",
12
+ {
13
+ variants: {
14
+ size: {
15
+ xs: "h-6 w-6 text-[10px]",
16
+ sm: "h-8 w-8 text-xs",
17
+ md: "h-10 w-10 text-sm",
18
+ lg: "h-12 w-12 text-base",
19
+ xl: "h-16 w-16 text-xl"
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ size: "md"
24
+ }
25
+ }
26
+ );
27
+ var badgeSizeMap = {
28
+ xs: "h-1.5 w-1.5",
29
+ sm: "h-2 w-2",
30
+ md: "h-2.5 w-2.5",
31
+ lg: "h-3 w-3",
32
+ xl: "h-3.5 w-3.5"
33
+ };
34
+ function getInitials(name) {
35
+ const parts = name.trim().split(/\s+/);
36
+ const first = parts[0] ?? "";
37
+ if (parts.length === 1) return first.charAt(0).toUpperCase();
38
+ const last = parts[parts.length - 1] ?? "";
39
+ return (first.charAt(0) + last.charAt(0)).toUpperCase();
40
+ }
41
+ var Avatar = React.forwardRef(
42
+ ({
43
+ className,
44
+ size = "md",
45
+ src,
46
+ name,
47
+ fallback,
48
+ badge,
49
+ badgeColor,
50
+ ...props
51
+ }, ref) => {
52
+ const [imgError, setImgError] = React.useState(false);
53
+ const showImage = Boolean(src) && !imgError;
54
+ const initials = name ? getInitials(name) : null;
55
+ return /* @__PURE__ */ jsxs(
56
+ "span",
57
+ {
58
+ ref,
59
+ className: cn(avatarVariants({ size }), className),
60
+ "aria-label": name ?? void 0,
61
+ role: "img",
62
+ ...props,
63
+ children: [
64
+ showImage ? /* @__PURE__ */ jsx(
65
+ "img",
66
+ {
67
+ src,
68
+ alt: name ?? "",
69
+ className: "h-full w-full object-cover",
70
+ onError: () => setImgError(true)
71
+ }
72
+ ) : initials ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: initials }) : fallback ? fallback : (
73
+ /* Generic user icon */
74
+ /* @__PURE__ */ jsx(
75
+ "svg",
76
+ {
77
+ "aria-hidden": "true",
78
+ viewBox: "0 0 24 24",
79
+ fill: "currentColor",
80
+ className: "h-[55%] w-[55%]",
81
+ children: /* @__PURE__ */ jsx("path", { d: "M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z" })
82
+ }
83
+ )
84
+ ),
85
+ badge && /* @__PURE__ */ jsx(
86
+ "span",
87
+ {
88
+ className: cn(
89
+ "absolute bottom-0 right-0 rounded-full ring-2 ring-[var(--color-bg-default)]",
90
+ badgeSizeMap[size ?? "md"],
91
+ badgeColor ?? "bg-[var(--color-semantic-success-default)]"
92
+ ),
93
+ "aria-hidden": "true"
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }
100
+ );
101
+ Avatar.displayName = "Avatar";
102
+
103
+ export {
104
+ avatarVariants,
105
+ Avatar
106
+ };
@@ -0,0 +1,124 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Input/Input.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var inputVariants = cva(
11
+ [
12
+ // The wrapper owns ALL focus styling (border + ring). Strip every possible
13
+ // focus indicator from the inner <input> so we never get a double ring.
14
+ "flex-1 min-w-0 bg-transparent",
15
+ "border-0 shadow-none",
16
+ "outline-none focus:outline-none focus-visible:outline-none",
17
+ "ring-0 focus:ring-0 focus-visible:ring-0",
18
+ "placeholder:text-[var(--color-text-placeholder)]",
19
+ "text-[var(--color-text-primary)]",
20
+ "disabled:opacity-50 disabled:cursor-not-allowed"
21
+ ],
22
+ {
23
+ variants: {
24
+ size: {
25
+ sm: "text-sm",
26
+ md: "text-sm",
27
+ lg: "text-base"
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ size: "md"
32
+ }
33
+ }
34
+ );
35
+ var inputWrapperVariants = cva(
36
+ [
37
+ "flex items-center w-full rounded-md border bg-[var(--color-bg-default)] transition-colors",
38
+ "border-[var(--color-border-input)]",
39
+ // On focus: the border shifts to the ring color and the ring is a
40
+ // semi-transparent halo. One hard 1 px border + one soft 2 px glow =
41
+ // a single clean focus indicator. No double ring.
42
+ "focus-within:outline-none focus-within:border-[var(--color-ring-default)] focus-within:ring-2 focus-within:ring-[color-mix(in_srgb,var(--color-ring-default)_25%,transparent)]",
43
+ "has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed"
44
+ ],
45
+ {
46
+ variants: {
47
+ size: {
48
+ sm: "h-8 px-3 gap-1.5",
49
+ md: "h-9 px-3 gap-2",
50
+ lg: "h-10 px-4 gap-2"
51
+ },
52
+ invalid: {
53
+ true: "border-[var(--color-danger-500)] focus-within:border-[var(--color-danger-500)] focus-within:ring-[color-mix(in_srgb,var(--color-danger-500)_25%,transparent)]"
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ size: "md"
58
+ }
59
+ }
60
+ );
61
+ var addonVariants = cva(
62
+ [
63
+ "flex items-center self-stretch px-3 text-[var(--color-text-muted)] bg-[var(--color-bg-subtle)]",
64
+ "border-[var(--color-border-default)] shrink-0"
65
+ ],
66
+ {
67
+ variants: {
68
+ side: {
69
+ leading: "border-r rounded-l-md",
70
+ trailing: "border-l rounded-r-md"
71
+ }
72
+ }
73
+ }
74
+ );
75
+ var Input = React.forwardRef(
76
+ ({
77
+ className,
78
+ size,
79
+ invalid,
80
+ leadingAddon,
81
+ trailingAddon,
82
+ leadingIcon,
83
+ trailingIcon,
84
+ wrapperClassName,
85
+ disabled,
86
+ ...props
87
+ }, ref) => {
88
+ const hasAddon = Boolean(leadingAddon ?? trailingAddon);
89
+ const inputEl = /* @__PURE__ */ jsx(
90
+ "input",
91
+ {
92
+ ref,
93
+ className: cn(inputVariants({ size }), className),
94
+ "aria-invalid": invalid ?? void 0,
95
+ disabled,
96
+ ...props
97
+ }
98
+ );
99
+ if (hasAddon) {
100
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full rounded-md overflow-hidden border border-[var(--color-border-input)]", invalid && "border-[var(--color-danger-500)]"), children: [
101
+ leadingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "leading" })), children: leadingAddon }),
102
+ /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), "rounded-none border-0 ring-offset-0", wrapperClassName), children: [
103
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: leadingIcon }),
104
+ inputEl,
105
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: trailingIcon })
106
+ ] }),
107
+ trailingAddon && /* @__PURE__ */ jsx("span", { className: cn(addonVariants({ side: "trailing" })), children: trailingAddon })
108
+ ] });
109
+ }
110
+ return /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), wrapperClassName), children: [
111
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: leadingIcon }),
112
+ inputEl,
113
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[var(--color-text-muted)]", children: trailingIcon })
114
+ ] });
115
+ }
116
+ );
117
+ Input.displayName = "Input";
118
+
119
+ export {
120
+ inputVariants,
121
+ inputWrapperVariants,
122
+ addonVariants,
123
+ Input
124
+ };