@nexub/react 0.0.2 → 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 +41 -13
  196. package/dist/index.js +479 -5856
  197. package/package.json +24 -12
  198. package/dist/index.cjs +0 -6072
  199. package/dist/index.d.cts +0 -1234
@@ -0,0 +1,128 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/NavigationMenu/NavigationMenu.tsx
7
+ import * as React from "react";
8
+ import * as RadixNav from "@radix-ui/react-navigation-menu";
9
+ import { ChevronDown } from "@nexub/icons";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Root2 = React.forwardRef(
12
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
13
+ RadixNav.Root,
14
+ {
15
+ ref,
16
+ className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className),
17
+ ...props,
18
+ children: [
19
+ children,
20
+ /* @__PURE__ */ jsx(Viewport2, {})
21
+ ]
22
+ }
23
+ )
24
+ );
25
+ Root2.displayName = "NavigationMenu.Root";
26
+ var List2 = React.forwardRef(
27
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
28
+ RadixNav.List,
29
+ {
30
+ ref,
31
+ className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
32
+ ...props
33
+ }
34
+ )
35
+ );
36
+ List2.displayName = "NavigationMenu.List";
37
+ var Item2 = RadixNav.Item;
38
+ var Trigger2 = React.forwardRef(
39
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
40
+ RadixNav.Trigger,
41
+ {
42
+ ref,
43
+ className: cn(
44
+ "group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors",
45
+ "hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)] focus:bg-[var(--color-bg-subtle)] focus:text-[var(--color-text-primary)] focus:outline-none",
46
+ "data-[active]:bg-[var(--color-bg-subtle)]/50 data-[state=open]:bg-[var(--color-bg-subtle)]/50",
47
+ "disabled:pointer-events-none disabled:opacity-50",
48
+ className
49
+ ),
50
+ ...props,
51
+ children: [
52
+ children,
53
+ /* @__PURE__ */ jsx(
54
+ ChevronDown,
55
+ {
56
+ size: "xs",
57
+ className: "relative ml-1 transition duration-300 group-data-[state=open]:rotate-180",
58
+ "aria-hidden": "true"
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ )
64
+ );
65
+ Trigger2.displayName = "NavigationMenu.Trigger";
66
+ var Content2 = React.forwardRef(
67
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
68
+ RadixNav.Content,
69
+ {
70
+ ref,
71
+ className: cn(
72
+ "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ )
78
+ );
79
+ Content2.displayName = "NavigationMenu.Content";
80
+ var Link2 = React.forwardRef(
81
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
82
+ RadixNav.Link,
83
+ {
84
+ ref,
85
+ className: cn(
86
+ "block select-none rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)] focus:bg-[var(--color-bg-subtle)] focus:text-[var(--color-text-primary)]",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ )
92
+ );
93
+ Link2.displayName = "NavigationMenu.Link";
94
+ var Viewport2 = React.forwardRef(
95
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "absolute left-0 top-full flex justify-center", children: /* @__PURE__ */ jsx(
96
+ RadixNav.Viewport,
97
+ {
98
+ ref,
99
+ className: cn(
100
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
101
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
102
+ className
103
+ ),
104
+ ...props
105
+ }
106
+ ) })
107
+ );
108
+ Viewport2.displayName = "NavigationMenu.Viewport";
109
+ var Indicator2 = React.forwardRef(
110
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
111
+ RadixNav.Indicator,
112
+ {
113
+ ref,
114
+ className: cn(
115
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=visible]:animate-in data-[state=hidden]:fade-out data-[state=visible]:fade-in",
116
+ className
117
+ ),
118
+ ...props,
119
+ children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-[var(--color-border-default)] shadow-md" })
120
+ }
121
+ )
122
+ );
123
+ Indicator2.displayName = "NavigationMenu.Indicator";
124
+ var NavigationMenu = { Root: Root2, List: List2, Item: Item2, Trigger: Trigger2, Content: Content2, Link: Link2, Viewport: Viewport2, Indicator: Indicator2 };
125
+
126
+ export {
127
+ NavigationMenu
128
+ };
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ import {
3
+ Input
4
+ } from "./chunk-CVBAWKNG.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-AT6RPKU3.js";
8
+
9
+ // src/components/SearchInput/SearchInput.tsx
10
+ import * as React from "react";
11
+ import { Search, X } from "@nexub/icons";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var SearchInput = React.forwardRef(
14
+ ({ value, defaultValue: _defaultValue, onChange, onClear, className, ...props }, ref) => {
15
+ const [internalValue, setInternalValue] = React.useState(
16
+ _defaultValue ?? ""
17
+ );
18
+ const controlled = value !== void 0;
19
+ const currentValue = controlled ? String(value) : internalValue;
20
+ const hasValue = currentValue.length > 0;
21
+ const handleChange = (e) => {
22
+ if (!controlled) setInternalValue(e.target.value);
23
+ onChange?.(e);
24
+ };
25
+ const handleClear = () => {
26
+ if (!controlled) setInternalValue("");
27
+ onClear?.();
28
+ };
29
+ const clearButton = hasValue ? /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ type: "button",
33
+ onClick: handleClear,
34
+ "aria-label": "Clear search",
35
+ className: cn(
36
+ "shrink-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors",
37
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-ring-default)] rounded"
38
+ ),
39
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
40
+ }
41
+ ) : null;
42
+ return /* @__PURE__ */ jsx(
43
+ Input,
44
+ {
45
+ ref,
46
+ type: "search",
47
+ value: controlled ? value : internalValue,
48
+ onChange: handleChange,
49
+ className,
50
+ leadingIcon: /* @__PURE__ */ jsx(Search, { className: "h-4 w-4", "aria-hidden": "true" }),
51
+ trailingIcon: clearButton ?? void 0,
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+ );
57
+ SearchInput.displayName = "SearchInput";
58
+
59
+ export {
60
+ SearchInput
61
+ };
@@ -0,0 +1 @@
1
+ 'use client';
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Logo/Logo.tsx
7
+ import * as React from "react";
8
+ import { NexubMark } from "@nexub/icons";
9
+ import { cva } from "class-variance-authority";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var logoVariants = cva("inline-flex items-center gap-2", {
12
+ variants: {
13
+ size: {
14
+ sm: "h-6",
15
+ md: "h-8",
16
+ lg: "h-10"
17
+ },
18
+ tone: {
19
+ default: "text-[var(--color-text-primary)]",
20
+ inverse: "text-white"
21
+ }
22
+ },
23
+ defaultVariants: {
24
+ size: "md",
25
+ tone: "default"
26
+ }
27
+ });
28
+ var iconSizeMap = {
29
+ sm: "h-5 w-5",
30
+ md: "h-7 w-7",
31
+ lg: "h-9 w-9"
32
+ };
33
+ var wordmarkSizeMap = {
34
+ sm: "text-base",
35
+ md: "text-xl",
36
+ lg: "text-2xl"
37
+ };
38
+ var Logo = React.forwardRef(
39
+ ({
40
+ variant = "full",
41
+ size = "md",
42
+ tone = "default",
43
+ className,
44
+ ...rest
45
+ }, ref) => {
46
+ const resolvedSize = size ?? "md";
47
+ const resolvedTone = tone ?? "default";
48
+ return /* @__PURE__ */ jsxs(
49
+ "span",
50
+ {
51
+ ref,
52
+ className: cn(logoVariants({ size: resolvedSize, tone: resolvedTone }), className),
53
+ "aria-label": "Nexub",
54
+ ...rest,
55
+ children: [
56
+ /* @__PURE__ */ jsx(
57
+ NexubMark,
58
+ {
59
+ className: cn(iconSizeMap[resolvedSize], "shrink-0"),
60
+ "aria-hidden": "true"
61
+ }
62
+ ),
63
+ variant === "full" && /* @__PURE__ */ jsx(
64
+ "span",
65
+ {
66
+ className: cn(
67
+ wordmarkSizeMap[resolvedSize],
68
+ "font-semibold tracking-tight leading-none"
69
+ ),
70
+ children: "nexub"
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ );
76
+ }
77
+ );
78
+ Logo.displayName = "Logo";
79
+
80
+ export {
81
+ logoVariants,
82
+ Logo
83
+ };
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+
3
+ // src/utils/cn.ts
4
+ import { clsx } from "clsx";
5
+ import { twMerge } from "tailwind-merge";
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+
10
+ export {
11
+ cn
12
+ };
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/ScrollArea/ScrollArea.tsx
7
+ import * as React from "react";
8
+ import * as RadixScrollArea from "@radix-ui/react-scroll-area";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var ScrollArea = React.forwardRef(
11
+ ({ className, children, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxs(RadixScrollArea.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
12
+ /* @__PURE__ */ jsx(RadixScrollArea.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
13
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx(
14
+ RadixScrollArea.Scrollbar,
15
+ {
16
+ className: "flex touch-none select-none transition-colors h-full w-2.5 border-l border-l-transparent p-[1px]",
17
+ orientation: "vertical",
18
+ children: /* @__PURE__ */ jsx(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-[var(--color-border-default)]" })
19
+ }
20
+ ),
21
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx(
22
+ RadixScrollArea.Scrollbar,
23
+ {
24
+ className: "flex touch-none select-none transition-colors flex-col h-2.5 border-t border-t-transparent p-[1px]",
25
+ orientation: "horizontal",
26
+ children: /* @__PURE__ */ jsx(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-[var(--color-border-default)]" })
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx(RadixScrollArea.Corner, {})
30
+ ] })
31
+ );
32
+ ScrollArea.displayName = "ScrollArea";
33
+
34
+ export {
35
+ ScrollArea
36
+ };
@@ -0,0 +1,104 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Badge/Badge.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var badgeVariants = cva(
11
+ [
12
+ "inline-flex items-center gap-1 font-medium rounded-full whitespace-nowrap",
13
+ "transition-colors select-none"
14
+ ],
15
+ {
16
+ variants: {
17
+ size: {
18
+ sm: "px-2 py-0.5 text-xs",
19
+ md: "px-2.5 py-0.5 text-sm",
20
+ lg: "px-3 py-1 text-sm"
21
+ },
22
+ variant: {
23
+ solid: "",
24
+ soft: "",
25
+ outline: "bg-transparent border"
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ size: "md",
30
+ variant: "solid"
31
+ }
32
+ }
33
+ );
34
+ var toneClasses = {
35
+ neutral: {
36
+ solid: "bg-[var(--color-neutral-500)] text-white",
37
+ soft: "bg-[var(--color-neutral-500)]/10 text-[var(--color-neutral-700)]",
38
+ outline: "border-[var(--color-neutral-500)] text-[var(--color-neutral-700)]"
39
+ },
40
+ info: {
41
+ solid: "bg-[var(--color-fill-info)] text-white",
42
+ soft: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-text-info)]",
43
+ outline: "border-[var(--color-semantic-info-default)] text-[var(--color-text-info)]"
44
+ },
45
+ success: {
46
+ solid: "bg-[var(--color-fill-success)] text-white",
47
+ soft: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-text-success)]",
48
+ outline: "border-[var(--color-semantic-success-default)] text-[var(--color-text-success)]"
49
+ },
50
+ warning: {
51
+ solid: "bg-[var(--color-fill-warning)] text-white",
52
+ soft: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-text-warning)]",
53
+ outline: "border-[var(--color-semantic-warning-default)] text-[var(--color-text-warning)]"
54
+ },
55
+ danger: {
56
+ solid: "bg-[var(--color-fill-danger)] text-white",
57
+ soft: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-text-danger)]",
58
+ outline: "border-[var(--color-semantic-error-default)] text-[var(--color-text-danger)]"
59
+ },
60
+ leap: {
61
+ solid: "bg-[var(--color-fill-leap)] text-white",
62
+ soft: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)]",
63
+ outline: "border-[var(--color-leap-500)] text-[var(--color-leap-700)]"
64
+ },
65
+ bookub: {
66
+ solid: "bg-[var(--color-fill-bookub)] text-white",
67
+ soft: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)]",
68
+ outline: "border-[var(--color-bookub-500)] text-[var(--color-bookub-700)]"
69
+ },
70
+ payub: {
71
+ solid: "bg-[var(--color-fill-payub)] text-white",
72
+ soft: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)]",
73
+ outline: "border-[var(--color-payub-500)] text-[var(--color-payub-700)]"
74
+ },
75
+ founderub: {
76
+ solid: "bg-[var(--color-fill-founderub)] text-white",
77
+ soft: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)]",
78
+ outline: "border-[var(--color-founderub-500)] text-[var(--color-founderub-700)]"
79
+ }
80
+ };
81
+ var Badge = React.forwardRef(
82
+ ({ className, size, variant = "solid", tone = "neutral", leadingIcon, children, ...props }, ref) => {
83
+ const resolvedVariant = variant ?? "solid";
84
+ const toneStyle = toneClasses[tone][resolvedVariant];
85
+ return /* @__PURE__ */ jsxs(
86
+ "span",
87
+ {
88
+ ref,
89
+ className: cn(badgeVariants({ size, variant: resolvedVariant }), toneStyle, className),
90
+ ...props,
91
+ children: [
92
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center", children: leadingIcon }),
93
+ children
94
+ ]
95
+ }
96
+ );
97
+ }
98
+ );
99
+ Badge.displayName = "Badge";
100
+
101
+ export {
102
+ badgeVariants,
103
+ Badge
104
+ };
@@ -0,0 +1,99 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Pagination/Pagination.tsx
7
+ import * as React from "react";
8
+ import { ChevronLeft, ChevronRight, MoreHorizontal } from "@nexub/icons";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function generatePages(current, total, siblings) {
11
+ if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
12
+ const leftSibling = Math.max(current - siblings, 1);
13
+ const rightSibling = Math.min(current + siblings, total);
14
+ const showLeft = leftSibling > 2;
15
+ const showRight = rightSibling < total - 1;
16
+ const pages = [1];
17
+ if (showLeft) pages.push("...");
18
+ for (let i = leftSibling; i <= rightSibling; i++) {
19
+ if (i !== 1 && i !== total) pages.push(i);
20
+ }
21
+ if (showRight) pages.push("...");
22
+ pages.push(total);
23
+ return pages;
24
+ }
25
+ var Pagination = React.forwardRef(
26
+ ({
27
+ className,
28
+ page,
29
+ totalItems,
30
+ pageSize = 20,
31
+ siblingCount = 1,
32
+ onPageChange,
33
+ ...props
34
+ }, ref) => {
35
+ const totalPages = Math.ceil(totalItems / pageSize);
36
+ if (totalPages <= 1) return null;
37
+ const pages = generatePages(page, totalPages, siblingCount);
38
+ return /* @__PURE__ */ jsxs(
39
+ "nav",
40
+ {
41
+ ref,
42
+ role: "navigation",
43
+ "aria-label": "Pagination",
44
+ className: cn("flex items-center gap-1", className),
45
+ ...props,
46
+ children: [
47
+ /* @__PURE__ */ jsx(
48
+ "button",
49
+ {
50
+ onClick: () => onPageChange(page - 1),
51
+ disabled: page <= 1,
52
+ "aria-label": "Go to previous page",
53
+ className: "inline-flex h-11 w-11 items-center justify-center rounded-md border border-[var(--color-border-default)] text-[var(--color-text-primary)] transition-colors hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
54
+ children: /* @__PURE__ */ jsx(ChevronLeft, { size: "sm", "aria-hidden": "true" })
55
+ }
56
+ ),
57
+ pages.map(
58
+ (p, i) => p === "..." ? /* @__PURE__ */ jsx(
59
+ "span",
60
+ {
61
+ className: "flex h-11 w-11 items-center justify-center text-[var(--color-text-muted)]",
62
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { size: "sm", "aria-hidden": "true" })
63
+ },
64
+ `ellipsis-${i}`
65
+ ) : /* @__PURE__ */ jsx(
66
+ "button",
67
+ {
68
+ onClick: () => onPageChange(p),
69
+ "aria-label": `Go to page ${p}`,
70
+ "aria-current": p === page ? "page" : void 0,
71
+ className: cn(
72
+ "inline-flex h-11 w-11 items-center justify-center rounded-md text-sm font-medium transition-colors",
73
+ p === page ? "bg-[var(--color-fill-primary)] text-white" : "border border-[var(--color-border-default)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]"
74
+ ),
75
+ children: p
76
+ },
77
+ p
78
+ )
79
+ ),
80
+ /* @__PURE__ */ jsx(
81
+ "button",
82
+ {
83
+ onClick: () => onPageChange(page + 1),
84
+ disabled: page >= totalPages,
85
+ "aria-label": "Go to next page",
86
+ className: "inline-flex h-11 w-11 items-center justify-center rounded-md border border-[var(--color-border-default)] text-[var(--color-text-primary)] transition-colors hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
87
+ children: /* @__PURE__ */ jsx(ChevronRight, { size: "sm", "aria-hidden": "true" })
88
+ }
89
+ )
90
+ ]
91
+ }
92
+ );
93
+ }
94
+ );
95
+ Pagination.displayName = "Pagination";
96
+
97
+ export {
98
+ Pagination
99
+ };