@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,92 @@
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/Drawer/Drawer.tsx
10
+ import * as React from "react";
11
+ import { Drawer as VaulDrawer } from "vaul";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var Root = VaulDrawer.Root;
14
+ var Trigger = VaulDrawer.Trigger;
15
+ var Portal = VaulDrawer.Portal;
16
+ var Close = VaulDrawer.Close;
17
+ var Overlay = VaulDrawer.Overlay;
18
+ var Content = React.forwardRef(({ className, children, side = "right", surface = "solid", ...props }, ref) => {
19
+ const sideMap = {
20
+ right: "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l",
21
+ left: "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r",
22
+ top: "inset-x-0 top-0 w-full border-b",
23
+ bottom: "inset-x-0 bottom-0 w-full border-t rounded-t-2xl"
24
+ };
25
+ return /* @__PURE__ */ jsxs(
26
+ VaulDrawer.Content,
27
+ {
28
+ ref,
29
+ className: cn(
30
+ "fixed z-[var(--z-modal)] flex flex-col bg-[var(--color-bg-default)] shadow-xl focus:outline-none",
31
+ sideMap[side],
32
+ surface === "glass" && glassSurfaceClass,
33
+ className
34
+ ),
35
+ "data-material": surface === "glass" ? "glass" : void 0,
36
+ ...props,
37
+ children: [
38
+ side === "bottom" && /* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-20 rounded-full bg-[var(--color-border-default)]" }),
39
+ children
40
+ ]
41
+ }
42
+ );
43
+ });
44
+ Content.displayName = "Drawer.Content";
45
+ var Title = React.forwardRef(
46
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
47
+ VaulDrawer.Title,
48
+ {
49
+ ref,
50
+ className: cn("text-lg font-semibold text-[var(--color-text-primary)]", className),
51
+ ...props
52
+ }
53
+ )
54
+ );
55
+ Title.displayName = "Drawer.Title";
56
+ var Description = React.forwardRef(
57
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
58
+ VaulDrawer.Description,
59
+ {
60
+ ref,
61
+ className: cn("text-sm text-[var(--color-text-muted)]", className),
62
+ ...props
63
+ }
64
+ )
65
+ );
66
+ Description.displayName = "Drawer.Description";
67
+ var Header = React.forwardRef(
68
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-6", className), ...props })
69
+ );
70
+ Header.displayName = "Drawer.Header";
71
+ var Footer = React.forwardRef(
72
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mt-auto flex flex-col gap-2 p-6", className), ...props })
73
+ );
74
+ Footer.displayName = "Drawer.Footer";
75
+ var Drawer = {
76
+ Root,
77
+ Trigger,
78
+ Portal,
79
+ Overlay,
80
+ Content,
81
+ Close,
82
+ Title,
83
+ Description,
84
+ Header,
85
+ Footer
86
+ };
87
+ var Sheet = Drawer;
88
+
89
+ export {
90
+ Drawer,
91
+ Sheet
92
+ };
@@ -0,0 +1,88 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Sidebar/Sidebar.tsx
7
+ import * as React from "react";
8
+ import { Slot } from "@radix-ui/react-slot";
9
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ var Root = React.forwardRef(
11
+ ({ className, collapsed = false, ...props }, ref) => /* @__PURE__ */ jsx(
12
+ "nav",
13
+ {
14
+ ref,
15
+ "aria-label": "Sidebar",
16
+ "data-collapsed": collapsed,
17
+ className: cn(
18
+ "group/sidebar flex flex-col gap-1 bg-[var(--color-bg-default)] border-r border-[var(--color-border-default)] transition-all duration-200",
19
+ collapsed ? "w-[var(--size-nav-sidebar-collapsed,56px)]" : "w-[var(--size-nav-sidebar,240px)]",
20
+ "h-full overflow-y-auto overflow-x-hidden",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ )
26
+ );
27
+ Root.displayName = "Sidebar.Root";
28
+ var Group = React.forwardRef(
29
+ ({ className, label, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-0.5 p-2", className), ...props, children: [
30
+ label && /* @__PURE__ */ jsx("p", { className: "px-2 py-1 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]", children: label }),
31
+ children
32
+ ] })
33
+ );
34
+ Group.displayName = "Sidebar.Group";
35
+ var Item = React.forwardRef(
36
+ ({ className, icon, active, asChild, children, ...props }, ref) => {
37
+ const child = asChild && React.isValidElement(children) ? children : null;
38
+ const label = child ? child.props.children : children;
39
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
40
+ icon && /* @__PURE__ */ jsx("span", { className: "shrink-0", "aria-hidden": "true", children: icon }),
41
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate group-data-[collapsed=true]/sidebar:sr-only", children: label })
42
+ ] });
43
+ const itemProps = {
44
+ ref,
45
+ "aria-current": active ? "page" : void 0,
46
+ // Native tooltip for the icon-only collapsed state.
47
+ title: typeof label === "string" ? label : void 0,
48
+ className: cn(
49
+ "flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",
50
+ active ? "bg-[var(--color-fill-primary)] text-white" : "text-[var(--color-text-primary)] hover:bg-[var(--color-bg-subtle)]",
51
+ className
52
+ ),
53
+ ...props
54
+ };
55
+ return child ? /* @__PURE__ */ jsx(Slot, { ...itemProps, children: React.cloneElement(child, void 0, content) }) : /* @__PURE__ */ jsx("a", { ...itemProps, children: content });
56
+ }
57
+ );
58
+ Item.displayName = "Sidebar.Item";
59
+ var Separator = React.forwardRef(
60
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
61
+ "hr",
62
+ {
63
+ ref,
64
+ className: cn("my-2 border-[var(--color-border-default)]", className),
65
+ ...props
66
+ }
67
+ )
68
+ );
69
+ Separator.displayName = "Sidebar.Separator";
70
+ var Footer = React.forwardRef(
71
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ ref,
75
+ className: cn(
76
+ "mt-auto border-t border-[var(--color-border-default)] p-4",
77
+ className
78
+ ),
79
+ ...props
80
+ }
81
+ )
82
+ );
83
+ Footer.displayName = "Sidebar.Footer";
84
+ var Sidebar = { Root, Group, Item, Separator, Footer };
85
+
86
+ export {
87
+ Sidebar
88
+ };
@@ -0,0 +1,85 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/StatusPill/StatusPill.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var statusPillVariants = cva(
11
+ "inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium select-none",
12
+ {
13
+ variants: {
14
+ tone: {
15
+ neutral: "bg-[var(--color-neutral-100)] text-[var(--color-neutral-700)] border border-[var(--color-neutral-200)]",
16
+ info: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-semantic-info-default)] border border-[var(--color-semantic-info-default)]/20",
17
+ success: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-semantic-success-default)] border border-[var(--color-semantic-success-default)]/20",
18
+ warning: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-semantic-warning-default)] border border-[var(--color-semantic-warning-default)]/20",
19
+ danger: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-semantic-error-default)] border border-[var(--color-semantic-error-default)]/20",
20
+ leap: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)] border border-[var(--color-leap-500)]/20",
21
+ bookub: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)] border border-[var(--color-bookub-500)]/20",
22
+ payub: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)] border border-[var(--color-payub-500)]/20",
23
+ founderub: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)] border border-[var(--color-founderub-500)]/20"
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ tone: "neutral"
28
+ }
29
+ }
30
+ );
31
+ var dotColorMap = {
32
+ neutral: "bg-[var(--color-neutral-500)]",
33
+ info: "bg-[var(--color-semantic-info-default)]",
34
+ success: "bg-[var(--color-semantic-success-default)]",
35
+ warning: "bg-[var(--color-semantic-warning-default)]",
36
+ danger: "bg-[var(--color-semantic-error-default)]",
37
+ leap: "bg-[var(--color-leap-500)]",
38
+ bookub: "bg-[var(--color-bookub-500)]",
39
+ payub: "bg-[var(--color-payub-500)]",
40
+ founderub: "bg-[var(--color-founderub-500)]"
41
+ };
42
+ var pulseTones = ["success", "info"];
43
+ var StatusPill = React.forwardRef(
44
+ ({ className, tone = "neutral", label, dot = false, ...props }, ref) => {
45
+ const shouldPulse = dot && pulseTones.includes(tone);
46
+ return /* @__PURE__ */ jsxs(
47
+ "span",
48
+ {
49
+ ref,
50
+ className: cn(statusPillVariants({ tone }), className),
51
+ ...props,
52
+ children: [
53
+ dot && /* @__PURE__ */ jsxs("span", { className: "relative inline-flex h-2 w-2 shrink-0", children: [
54
+ shouldPulse && /* @__PURE__ */ jsx(
55
+ "span",
56
+ {
57
+ className: cn(
58
+ "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
59
+ dotColorMap[tone]
60
+ ),
61
+ "aria-hidden": "true"
62
+ }
63
+ ),
64
+ /* @__PURE__ */ jsx(
65
+ "span",
66
+ {
67
+ className: cn(
68
+ "relative inline-flex rounded-full h-2 w-2",
69
+ dotColorMap[tone]
70
+ )
71
+ }
72
+ )
73
+ ] }),
74
+ label
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ );
80
+ StatusPill.displayName = "StatusPill";
81
+
82
+ export {
83
+ statusPillVariants,
84
+ StatusPill
85
+ };
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+ import {
3
+ inputWrapperVariants
4
+ } from "./chunk-CVBAWKNG.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-AT6RPKU3.js";
8
+
9
+ // src/components/NumberInput/NumberInput.tsx
10
+ import * as React from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var formatValue = (v, precision) => {
13
+ if (precision !== void 0) return v.toFixed(precision);
14
+ return String(v);
15
+ };
16
+ var clampValue = (v, min, max) => {
17
+ let result = v;
18
+ if (min !== void 0 && result < min) result = min;
19
+ if (max !== void 0 && result > max) result = max;
20
+ return result;
21
+ };
22
+ var NumberInput = React.forwardRef(
23
+ ({
24
+ className,
25
+ size = "md",
26
+ min,
27
+ max,
28
+ step = 1,
29
+ precision,
30
+ showSteppers = false,
31
+ value,
32
+ defaultValue = 0,
33
+ onChange,
34
+ invalid,
35
+ disabled,
36
+ ...props
37
+ }, ref) => {
38
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
39
+ const controlled = value !== void 0;
40
+ const currentValue = controlled ? value : internalValue;
41
+ const commit = (next) => {
42
+ const clamped = clampValue(next, min, max);
43
+ if (!controlled) setInternalValue(clamped);
44
+ onChange?.(clamped);
45
+ };
46
+ const handleChange = (e) => {
47
+ const parsed = parseFloat(e.target.value);
48
+ if (!isNaN(parsed)) commit(parsed);
49
+ };
50
+ const increment = () => commit(currentValue + step);
51
+ const decrement = () => commit(currentValue - step);
52
+ const stepperButtonClass = cn(
53
+ "flex items-center justify-center px-2 self-stretch shrink-0",
54
+ "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)]",
55
+ "hover:bg-[var(--color-bg-subtle)] transition-colors",
56
+ "disabled:opacity-50 disabled:pointer-events-none",
57
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-ring-default)]"
58
+ );
59
+ return /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size, invalid }), "pr-0 gap-0", className), children: [
60
+ /* @__PURE__ */ jsx(
61
+ "input",
62
+ {
63
+ ref,
64
+ type: "number",
65
+ value: formatValue(currentValue, precision),
66
+ onChange: handleChange,
67
+ min,
68
+ max,
69
+ step,
70
+ disabled,
71
+ "aria-invalid": invalid ?? void 0,
72
+ className: cn(
73
+ // Wrapper owns ALL focus styling — strip every indicator from the inner input.
74
+ "flex-1 min-w-0 bg-transparent text-[var(--color-text-primary)]",
75
+ "border-0 shadow-none",
76
+ "outline-none focus:outline-none focus-visible:outline-none",
77
+ "ring-0 focus:ring-0 focus-visible:ring-0",
78
+ "placeholder:text-[var(--color-text-placeholder)]",
79
+ "disabled:opacity-50 disabled:cursor-not-allowed",
80
+ "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
81
+ size === "sm" ? "text-sm" : size === "lg" ? "text-base" : "text-sm"
82
+ ),
83
+ ...props
84
+ }
85
+ ),
86
+ showSteppers && /* @__PURE__ */ jsxs("div", { className: "flex flex-col border-l border-[var(--color-border-default)] self-stretch", children: [
87
+ /* @__PURE__ */ jsx(
88
+ "button",
89
+ {
90
+ type: "button",
91
+ tabIndex: -1,
92
+ onClick: increment,
93
+ disabled: disabled || max !== void 0 && currentValue >= max,
94
+ className: cn(stepperButtonClass, "border-b border-[var(--color-border-default)] text-xs leading-none flex-1"),
95
+ "aria-label": "Increment",
96
+ children: "\u25B2"
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsx(
100
+ "button",
101
+ {
102
+ type: "button",
103
+ tabIndex: -1,
104
+ onClick: decrement,
105
+ disabled: disabled || min !== void 0 && currentValue <= min,
106
+ className: cn(stepperButtonClass, "text-xs leading-none flex-1"),
107
+ "aria-label": "Decrement",
108
+ children: "\u25BC"
109
+ }
110
+ )
111
+ ] })
112
+ ] });
113
+ }
114
+ );
115
+ NumberInput.displayName = "NumberInput";
116
+
117
+ export {
118
+ NumberInput
119
+ };
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/EmptyState/EmptyState.tsx
7
+ import * as React from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var Root = React.forwardRef(
10
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
11
+ "div",
12
+ {
13
+ ref,
14
+ className: cn(
15
+ "flex flex-col items-center justify-center gap-4 py-16 text-center",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ )
21
+ );
22
+ Root.displayName = "EmptyState.Root";
23
+ var Illustration = React.forwardRef(
24
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
25
+ "div",
26
+ {
27
+ ref,
28
+ className: cn("text-[var(--color-text-muted)]", className),
29
+ ...props
30
+ }
31
+ )
32
+ );
33
+ Illustration.displayName = "EmptyState.Illustration";
34
+ var Title = React.forwardRef(
35
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
36
+ "h3",
37
+ {
38
+ ref,
39
+ className: cn("text-lg font-semibold text-[var(--color-text-primary)]", className),
40
+ ...props
41
+ }
42
+ )
43
+ );
44
+ Title.displayName = "EmptyState.Title";
45
+ var Description = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
46
+ "p",
47
+ {
48
+ ref,
49
+ className: cn("max-w-sm text-sm text-[var(--color-text-muted)]", className),
50
+ ...props
51
+ }
52
+ ));
53
+ Description.displayName = "EmptyState.Description";
54
+ var Actions = React.forwardRef(
55
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2", className), ...props })
56
+ );
57
+ Actions.displayName = "EmptyState.Actions";
58
+ var EmptyState = { Root, Illustration, Title, Description, Actions };
59
+
60
+ export {
61
+ EmptyState
62
+ };
@@ -0,0 +1,51 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Container/Container.tsx
7
+ import * as React from "react";
8
+ import { Slot } from "@radix-ui/react-slot";
9
+ import { cva } from "class-variance-authority";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var containerVariants = cva("mx-auto w-full", {
12
+ variants: {
13
+ size: {
14
+ sm: "max-w-[var(--container-sm,640px)]",
15
+ md: "max-w-[var(--container-md,768px)]",
16
+ lg: "max-w-[var(--container-lg,1024px)]",
17
+ xl: "max-w-[var(--container-xl,1280px)]",
18
+ "2xl": "max-w-[var(--container-2xl,1536px)]",
19
+ nexub: "max-w-[var(--container-nexub,1440px)]",
20
+ prose: "max-w-[var(--container-prose,65ch)]"
21
+ },
22
+ paddingX: {
23
+ true: "px-4 sm:px-6 lg:px-8",
24
+ false: ""
25
+ }
26
+ },
27
+ defaultVariants: {
28
+ size: "xl",
29
+ paddingX: true
30
+ }
31
+ });
32
+ var Container = React.forwardRef(
33
+ ({ size, paddingX = true, asChild = false, className, children, ...rest }, ref) => {
34
+ const Comp = asChild ? Slot : "div";
35
+ return /* @__PURE__ */ jsx(
36
+ Comp,
37
+ {
38
+ ref,
39
+ className: cn(containerVariants({ size, paddingX }), className),
40
+ ...rest,
41
+ children
42
+ }
43
+ );
44
+ }
45
+ );
46
+ Container.displayName = "Container";
47
+
48
+ export {
49
+ containerVariants,
50
+ Container
51
+ };
@@ -0,0 +1,150 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Select/Select.tsx
7
+ import * as React from "react";
8
+ import * as RadixSelect from "@radix-ui/react-select";
9
+ import { Check, ChevronDown, ChevronUp } from "@nexub/icons";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Root2 = RadixSelect.Root;
12
+ var Group2 = RadixSelect.Group;
13
+ var Value2 = RadixSelect.Value;
14
+ var Trigger2 = React.forwardRef(
15
+ ({ className, children, invalid, ...props }, ref) => /* @__PURE__ */ jsxs(
16
+ RadixSelect.Trigger,
17
+ {
18
+ ref,
19
+ className: cn(
20
+ "flex h-9 w-full items-center justify-between rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
21
+ // Border shifts to ring color on focus; ring is a semi-transparent halo.
22
+ "placeholder:text-[var(--color-text-muted)] focus:outline-none focus:border-[var(--color-ring-default)] focus:ring-2 focus:ring-[color-mix(in_srgb,var(--color-ring-default)_25%,transparent)]",
23
+ "disabled:cursor-not-allowed disabled:opacity-50",
24
+ invalid && "border-[var(--color-semantic-error-default)] focus:border-[var(--color-semantic-error-default)] focus:ring-[color-mix(in_srgb,var(--color-semantic-error-default)_25%,transparent)]",
25
+ "[&>span]:line-clamp-1",
26
+ className
27
+ ),
28
+ ...props,
29
+ children: [
30
+ children,
31
+ /* @__PURE__ */ jsx(RadixSelect.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { size: "sm", className: "opacity-50", "aria-hidden": "true" }) })
32
+ ]
33
+ }
34
+ )
35
+ );
36
+ Trigger2.displayName = "Select.Trigger";
37
+ var ScrollUpButton2 = React.forwardRef(
38
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
39
+ RadixSelect.ScrollUpButton,
40
+ {
41
+ ref,
42
+ className: cn("flex cursor-default items-center justify-center py-1", className),
43
+ ...props,
44
+ children: /* @__PURE__ */ jsx(ChevronUp, { size: "sm", "aria-hidden": "true" })
45
+ }
46
+ )
47
+ );
48
+ ScrollUpButton2.displayName = "Select.ScrollUpButton";
49
+ var ScrollDownButton2 = React.forwardRef(
50
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
51
+ RadixSelect.ScrollDownButton,
52
+ {
53
+ ref,
54
+ className: cn("flex cursor-default items-center justify-center py-1", className),
55
+ ...props,
56
+ children: /* @__PURE__ */ jsx(ChevronDown, { size: "sm", "aria-hidden": "true" })
57
+ }
58
+ )
59
+ );
60
+ ScrollDownButton2.displayName = "Select.ScrollDownButton";
61
+ var Content2 = React.forwardRef(
62
+ ({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(RadixSelect.Portal, { children: /* @__PURE__ */ jsxs(
63
+ RadixSelect.Content,
64
+ {
65
+ ref,
66
+ className: cn(
67
+ "relative z-[var(--z-popover)] max-h-96 min-w-32 overflow-hidden rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
68
+ "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",
69
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
70
+ 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)]",
71
+ className
72
+ ),
73
+ position,
74
+ ...props,
75
+ children: [
76
+ /* @__PURE__ */ jsx(ScrollUpButton2, {}),
77
+ /* @__PURE__ */ jsx(
78
+ RadixSelect.Viewport,
79
+ {
80
+ className: cn(
81
+ "p-1",
82
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
83
+ ),
84
+ children
85
+ }
86
+ ),
87
+ /* @__PURE__ */ jsx(ScrollDownButton2, {})
88
+ ]
89
+ }
90
+ ) })
91
+ );
92
+ Content2.displayName = "Select.Content";
93
+ var Label2 = React.forwardRef(
94
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
95
+ RadixSelect.Label,
96
+ {
97
+ ref,
98
+ className: cn("px-2 py-1.5 text-xs font-semibold text-[var(--color-text-muted)]", className),
99
+ ...props
100
+ }
101
+ )
102
+ );
103
+ Label2.displayName = "Select.Label";
104
+ var Item2 = React.forwardRef(
105
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
106
+ RadixSelect.Item,
107
+ {
108
+ ref,
109
+ className: cn(
110
+ "relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none",
111
+ "focus:bg-[var(--color-bg-subtle)] focus:text-[var(--color-text-primary)]",
112
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
113
+ className
114
+ ),
115
+ ...props,
116
+ children: [
117
+ /* @__PURE__ */ jsx("span", { className: "absolute left-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" }) }) }),
118
+ /* @__PURE__ */ jsx(RadixSelect.ItemText, { children })
119
+ ]
120
+ }
121
+ )
122
+ );
123
+ Item2.displayName = "Select.Item";
124
+ var Separator2 = React.forwardRef(
125
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
126
+ RadixSelect.Separator,
127
+ {
128
+ ref,
129
+ className: cn("-mx-1 my-1 h-px bg-[var(--color-border-default)]", className),
130
+ ...props
131
+ }
132
+ )
133
+ );
134
+ Separator2.displayName = "Select.Separator";
135
+ var Select = {
136
+ Root: Root2,
137
+ Group: Group2,
138
+ Value: Value2,
139
+ Trigger: Trigger2,
140
+ ScrollUpButton: ScrollUpButton2,
141
+ ScrollDownButton: ScrollDownButton2,
142
+ Content: Content2,
143
+ Label: Label2,
144
+ Item: Item2,
145
+ Separator: Separator2
146
+ };
147
+
148
+ export {
149
+ Select
150
+ };