@nexub/react 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/chunk-24CZFBTG.js +83 -0
  2. package/dist/chunk-2RLSIOGB.js +173 -0
  3. package/dist/chunk-2VDP2ML4.js +105 -0
  4. package/dist/chunk-3CSKW56L.js +44 -0
  5. package/dist/chunk-3U54QLYB.js +87 -0
  6. package/dist/chunk-46CFSBEO.js +48 -0
  7. package/dist/chunk-4NGB7XIM.js +88 -0
  8. package/dist/chunk-4OCXGNP3.js +85 -0
  9. package/dist/chunk-52KTX5A7.js +119 -0
  10. package/dist/chunk-6AZP6VBM.js +62 -0
  11. package/dist/chunk-6Y734SXN.js +51 -0
  12. package/dist/chunk-7B4FS7VQ.js +150 -0
  13. package/dist/chunk-7W2YDJ5W.js +128 -0
  14. package/dist/chunk-A7L75YXY.js +61 -0
  15. package/dist/chunk-ADO2DB6Q.js +1 -0
  16. package/dist/chunk-AT6RPKU3.js +12 -0
  17. package/dist/chunk-BBVOB4EC.js +36 -0
  18. package/dist/chunk-BGY23Y5O.js +104 -0
  19. package/dist/chunk-BJKW3G2L.js +99 -0
  20. package/dist/chunk-BMVAZIAJ.js +187 -0
  21. package/dist/chunk-BTZW34TX.js +76 -0
  22. package/dist/chunk-BUBYXAJK.js +20 -0
  23. package/dist/chunk-BV3U3ATL.js +1 -0
  24. package/dist/chunk-BYCTJHXY.js +75 -0
  25. package/dist/chunk-BYF223HT.js +92 -0
  26. package/dist/chunk-CPV367VS.js +106 -0
  27. package/dist/chunk-CVBAWKNG.js +124 -0
  28. package/dist/chunk-CZUNTABW.js +25 -0
  29. package/dist/chunk-DAXDAFNG.js +92 -0
  30. package/dist/chunk-DD6XCW6R.js +53 -0
  31. package/dist/chunk-DEH2Z27F.js +50 -0
  32. package/dist/chunk-DGJE5MX5.js +102 -0
  33. package/dist/chunk-DOHXBNOP.js +119 -0
  34. package/dist/chunk-DR2Y3PIT.js +91 -0
  35. package/dist/chunk-ELC2NBGH.js +89 -0
  36. package/dist/chunk-EV43I5J6.js +1 -0
  37. package/dist/chunk-EVCTOIRS.js +66 -0
  38. package/dist/chunk-FS4XKWFA.js +308 -0
  39. package/dist/chunk-FUJOSPNQ.js +38 -0
  40. package/dist/chunk-GTQIA62H.js +60 -0
  41. package/dist/chunk-H4MXRAXP.js +37 -0
  42. package/dist/chunk-HW3I7I3R.js +29 -0
  43. package/dist/chunk-HY3JWSG4.js +1 -0
  44. package/dist/chunk-I5Z3A7N3.js +40 -0
  45. package/dist/chunk-IBCYG6HR.js +55 -0
  46. package/dist/chunk-IHW2L532.js +175 -0
  47. package/dist/chunk-IU76LV3W.js +101 -0
  48. package/dist/chunk-IZ6ZPEZ2.js +1 -0
  49. package/dist/chunk-JCUVWDUC.js +57 -0
  50. package/dist/chunk-JKTZMWWC.js +63 -0
  51. package/dist/chunk-JQDLCN5D.js +66 -0
  52. package/dist/chunk-K7CUCLLI.js +43 -0
  53. package/dist/chunk-KBB7M6WO.js +65 -0
  54. package/dist/chunk-KLTQJZOX.js +1 -0
  55. package/dist/chunk-KWWV3CM3.js +62 -0
  56. package/dist/chunk-KZW37FQZ.js +40 -0
  57. package/dist/chunk-LAWZQ6R6.js +76 -0
  58. package/dist/chunk-LOP63AVE.js +49 -0
  59. package/dist/chunk-MY6XUJ5P.js +216 -0
  60. package/dist/chunk-N2GIMMTF.js +98 -0
  61. package/dist/chunk-NAIZ7R2L.js +59 -0
  62. package/dist/chunk-NHUQLIHL.js +9 -0
  63. package/dist/chunk-NZ7UK3G6.js +1 -0
  64. package/dist/chunk-OUBBOOZE.js +34 -0
  65. package/dist/chunk-OZPPL76D.js +82 -0
  66. package/dist/chunk-P6BZNFVU.js +38 -0
  67. package/dist/chunk-PANDAMD2.js +54 -0
  68. package/dist/chunk-PBLEGOLM.js +71 -0
  69. package/dist/chunk-PER3O4FD.js +33 -0
  70. package/dist/chunk-PICMOOAZ.js +1 -0
  71. package/dist/chunk-POBSY7EZ.js +155 -0
  72. package/dist/chunk-POFKKYHY.js +37 -0
  73. package/dist/chunk-QF7GUDOE.js +67 -0
  74. package/dist/chunk-QHJ43Q2T.js +70 -0
  75. package/dist/chunk-QRZV2FLW.js +106 -0
  76. package/dist/chunk-QURKXXNS.js +46 -0
  77. package/dist/chunk-RIDDJUPA.js +122 -0
  78. package/dist/chunk-ROZVVWPV.js +8 -0
  79. package/dist/chunk-SZKUSLHI.js +176 -0
  80. package/dist/chunk-T4IVMVMQ.js +32 -0
  81. package/dist/chunk-TCTFQYLH.js +115 -0
  82. package/dist/chunk-U3AEA4BZ.js +56 -0
  83. package/dist/chunk-U3EGB3JL.js +43 -0
  84. package/dist/chunk-UALYS4XI.js +67 -0
  85. package/dist/chunk-UTBUIBEP.js +153 -0
  86. package/dist/chunk-UWWL5FPC.js +80 -0
  87. package/dist/chunk-V3FZHIEB.js +52 -0
  88. package/dist/chunk-VPZCQFVY.js +33 -0
  89. package/dist/chunk-VT7RKY46.js +49 -0
  90. package/dist/chunk-W4IEXUD4.js +127 -0
  91. package/dist/chunk-WCJNZ5ME.js +1593 -0
  92. package/dist/chunk-WPPNDU2E.js +36 -0
  93. package/dist/chunk-XNDCVVNE.js +45 -0
  94. package/dist/chunk-Y45JAJKW.js +44 -0
  95. package/dist/chunk-YAGVMERC.js +81 -0
  96. package/dist/chunk-YGOR3KT7.js +46 -0
  97. package/dist/chunk-YJD66LTV.js +54 -0
  98. package/dist/chunk-YJU4ZRQZ.js +1 -0
  99. package/dist/chunk-YUFCNHZF.js +27 -0
  100. package/dist/chunk-YUNWZAAD.js +57 -0
  101. package/dist/chunk-ZFVBFCYV.js +84 -0
  102. package/dist/chunk-ZLSUVZM2.js +145 -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 +36 -14
  196. package/dist/index.js +479 -5896
  197. package/package.json +13 -13
  198. package/dist/index.cjs +0 -6112
  199. package/dist/index.d.cts +0 -1245
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Skeleton/Skeleton.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var skeletonVariants = cva(
11
+ "bg-[var(--color-bg-muted)]",
12
+ {
13
+ variants: {
14
+ shape: {
15
+ line: "rounded",
16
+ rect: "rounded-md",
17
+ circle: "rounded-full"
18
+ },
19
+ animated: {
20
+ true: "animate-pulse"
21
+ }
22
+ },
23
+ defaultVariants: {
24
+ shape: "line",
25
+ animated: true
26
+ }
27
+ }
28
+ );
29
+ var Skeleton = React.forwardRef(
30
+ ({
31
+ className,
32
+ shape = "line",
33
+ width,
34
+ height,
35
+ animated = true,
36
+ style,
37
+ ...props
38
+ }, ref) => {
39
+ const defaultHeight = shape === "line" ? "1em" : shape === "circle" ? void 0 : void 0;
40
+ const resolvedWidth = width !== void 0 ? typeof width === "number" ? `${width}px` : width : shape === "circle" ? height !== void 0 ? typeof height === "number" ? `${height}px` : height : "2.5rem" : "100%";
41
+ const resolvedHeight = height !== void 0 ? typeof height === "number" ? `${height}px` : height : shape === "circle" ? resolvedWidth : defaultHeight;
42
+ return /* @__PURE__ */ jsx(
43
+ "span",
44
+ {
45
+ ref,
46
+ "aria-hidden": "true",
47
+ className: cn(
48
+ skeletonVariants({ shape, animated }),
49
+ "block",
50
+ className
51
+ ),
52
+ style: {
53
+ width: resolvedWidth,
54
+ height: resolvedHeight,
55
+ ...style
56
+ },
57
+ ...props
58
+ }
59
+ );
60
+ }
61
+ );
62
+ Skeleton.displayName = "Skeleton";
63
+
64
+ export {
65
+ skeletonVariants,
66
+ Skeleton
67
+ };
@@ -0,0 +1,70 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/Spinner/Spinner.tsx
7
+ import * as React from "react";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var spinnerVariants = cva(
11
+ [
12
+ "inline-block rounded-full border-2 border-solid",
13
+ "animate-spin",
14
+ // One transparent segment gives the illusion of rotation
15
+ "border-t-transparent"
16
+ ],
17
+ {
18
+ variants: {
19
+ size: {
20
+ xs: "h-3 w-3 border-[1.5px]",
21
+ sm: "h-4 w-4 border-2",
22
+ md: "h-6 w-6 border-2",
23
+ lg: "h-8 w-8 border-[3px]",
24
+ xl: "h-10 w-10 border-4"
25
+ },
26
+ tone: {
27
+ neutral: "border-[var(--color-neutral-500)]",
28
+ info: "border-[var(--color-semantic-info-default)]",
29
+ success: "border-[var(--color-semantic-success-default)]",
30
+ warning: "border-[var(--color-semantic-warning-default)]",
31
+ danger: "border-[var(--color-semantic-error-default)]",
32
+ leap: "border-[var(--color-leap-500)]",
33
+ bookub: "border-[var(--color-bookub-500)]",
34
+ payub: "border-[var(--color-payub-500)]",
35
+ founderub: "border-[var(--color-founderub-500)]"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ size: "md",
40
+ tone: "neutral"
41
+ }
42
+ }
43
+ );
44
+ var Spinner = React.forwardRef(
45
+ ({ className, size, tone = "neutral", label = "Loading\u2026", ...props }, ref) => {
46
+ return /* @__PURE__ */ jsx(
47
+ "span",
48
+ {
49
+ ref,
50
+ role: "status",
51
+ "aria-label": label,
52
+ className: cn("inline-flex items-center justify-center", className),
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx(
55
+ "span",
56
+ {
57
+ className: cn(spinnerVariants({ size, tone })),
58
+ "aria-hidden": "true"
59
+ }
60
+ )
61
+ }
62
+ );
63
+ }
64
+ );
65
+ Spinner.displayName = "Spinner";
66
+
67
+ export {
68
+ spinnerVariants,
69
+ Spinner
70
+ };
@@ -0,0 +1,106 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/CommandPalette/CommandPalette.tsx
7
+ import * as React from "react";
8
+ import * as RadixDialog from "@radix-ui/react-dialog";
9
+ import { Command } from "cmdk";
10
+ import { Search } from "@nexub/icons";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Root2 = React.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx(RadixDialog.Root, { ...props, children: /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
13
+ /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "fixed inset-0 z-[var(--z-modal)] bg-[var(--color-overlay)] backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0" }),
14
+ /* @__PURE__ */ jsx(
15
+ RadixDialog.Content,
16
+ {
17
+ ref,
18
+ className: cn(
19
+ "fixed left-1/2 top-[20%] z-[var(--z-modal)] w-full max-w-xl -translate-x-1/2",
20
+ "overflow-hidden rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-2xl",
21
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
22
+ "data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
23
+ "data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
24
+ ),
25
+ children: /* @__PURE__ */ jsx(Command, { className: "flex h-full w-full flex-col overflow-hidden text-[var(--color-text-primary)]", children })
26
+ }
27
+ )
28
+ ] }) }));
29
+ Root2.displayName = "CommandPalette.Root";
30
+ var Input = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-[var(--color-border-default)] px-3", children: [
31
+ /* @__PURE__ */ jsx(Search, { size: "sm", className: "mr-2 shrink-0 opacity-50", "aria-hidden": "true" }),
32
+ /* @__PURE__ */ jsx(
33
+ Command.Input,
34
+ {
35
+ ref,
36
+ className: cn(
37
+ "flex h-12 w-full bg-transparent py-3 text-sm outline-none placeholder:text-[var(--color-text-muted)] disabled:cursor-not-allowed disabled:opacity-50",
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ )
43
+ ] }));
44
+ Input.displayName = "CommandPalette.Input";
45
+ var List = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
46
+ Command.List,
47
+ {
48
+ ref,
49
+ className: cn("max-h-[400px] overflow-y-auto overflow-x-hidden p-2", className),
50
+ ...props
51
+ }
52
+ ));
53
+ List.displayName = "CommandPalette.List";
54
+ var Empty = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55
+ Command.Empty,
56
+ {
57
+ ref,
58
+ className: cn(
59
+ "py-8 text-center text-sm text-[var(--color-text-muted)]",
60
+ className
61
+ ),
62
+ ...props
63
+ }
64
+ ));
65
+ Empty.displayName = "CommandPalette.Empty";
66
+ var Group = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
67
+ Command.Group,
68
+ {
69
+ ref,
70
+ className: cn(
71
+ "overflow-hidden p-1 text-[var(--color-text-primary)]",
72
+ "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-[var(--color-text-muted)]",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ ));
78
+ Group.displayName = "CommandPalette.Group";
79
+ var Item = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
80
+ Command.Item,
81
+ {
82
+ ref,
83
+ className: cn(
84
+ "relative flex cursor-default select-none items-center rounded-md px-3 py-2 text-sm outline-none",
85
+ "aria-selected:bg-[var(--color-bg-subtle)] aria-selected:text-[var(--color-text-primary)]",
86
+ "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ ));
92
+ Item.displayName = "CommandPalette.Item";
93
+ var Separator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
94
+ Command.Separator,
95
+ {
96
+ ref,
97
+ className: cn("-mx-1 my-1 h-px bg-[var(--color-border-default)]", className),
98
+ ...props
99
+ }
100
+ ));
101
+ Separator.displayName = "CommandPalette.Separator";
102
+ var CommandPalette = { Root: Root2, Input, List, Empty, Group, Item, Separator };
103
+
104
+ export {
105
+ CommandPalette
106
+ };
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/ButtonGroup/ButtonGroup.tsx
7
+ import * as React from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var ButtonGroup = React.forwardRef(
10
+ ({ className, orientation = "horizontal", attached = false, children, ...props }, ref) => {
11
+ return /* @__PURE__ */ jsx(
12
+ "div",
13
+ {
14
+ ref,
15
+ role: "group",
16
+ "data-orientation": orientation,
17
+ "data-attached": attached || void 0,
18
+ className: cn(
19
+ "flex",
20
+ orientation === "vertical" ? "flex-col" : "flex-row",
21
+ attached ? [
22
+ "gap-0",
23
+ "[&>*:not(:first-child):not(:last-child)]:rounded-none",
24
+ orientation === "horizontal" ? [
25
+ "[&>*:first-child]:rounded-r-none",
26
+ "[&>*:last-child]:rounded-l-none",
27
+ "[&>*:not(:first-child)]:border-l-0"
28
+ ] : [
29
+ "[&>*:first-child]:rounded-b-none",
30
+ "[&>*:last-child]:rounded-t-none",
31
+ "[&>*:not(:first-child)]:border-t-0"
32
+ ]
33
+ ] : "gap-2",
34
+ className
35
+ ),
36
+ ...props,
37
+ children
38
+ }
39
+ );
40
+ }
41
+ );
42
+ ButtonGroup.displayName = "ButtonGroup";
43
+
44
+ export {
45
+ ButtonGroup
46
+ };
@@ -0,0 +1,122 @@
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/Dialog/Dialog.tsx
10
+ import * as React from "react";
11
+ import * as RadixDialog from "@radix-ui/react-dialog";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var Root2 = RadixDialog.Root;
14
+ var Trigger2 = RadixDialog.Trigger;
15
+ var Portal2 = RadixDialog.Portal;
16
+ var Close2 = RadixDialog.Close;
17
+ var Overlay2 = React.forwardRef(
18
+ function DialogOverlay({ className, ...props }, ref) {
19
+ return /* @__PURE__ */ jsx(
20
+ RadixDialog.Overlay,
21
+ {
22
+ ref,
23
+ className: cn(
24
+ "fixed inset-0 z-[var(--z-modal)] bg-[var(--color-overlay)] backdrop-blur-sm",
25
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
26
+ "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
27
+ className
28
+ ),
29
+ ...props
30
+ }
31
+ );
32
+ }
33
+ );
34
+ Overlay2.displayName = "Dialog.Overlay";
35
+ var Content2 = React.forwardRef(
36
+ function DialogContent({ className, size = "md", surface = "solid", children, ...props }, ref) {
37
+ const sizeMap = {
38
+ sm: "max-w-sm",
39
+ md: "max-w-lg",
40
+ lg: "max-w-2xl",
41
+ xl: "max-w-4xl",
42
+ full: "max-w-[calc(100vw-2rem)]"
43
+ };
44
+ return /* @__PURE__ */ jsx(
45
+ RadixDialog.Content,
46
+ {
47
+ ref,
48
+ className: cn(
49
+ "fixed left-1/2 top-1/2 z-[var(--z-modal)] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2",
50
+ "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-xl",
51
+ "max-h-[90vh] overflow-y-auto p-6 focus:outline-none",
52
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
53
+ "data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
54
+ "data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
55
+ "data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
56
+ "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
57
+ sizeMap[size],
58
+ surface === "glass" && glassSurfaceClass,
59
+ className
60
+ ),
61
+ "data-material": surface === "glass" ? "glass" : void 0,
62
+ ...props,
63
+ children
64
+ }
65
+ );
66
+ }
67
+ );
68
+ Content2.displayName = "Dialog.Content";
69
+ var Title2 = React.forwardRef(
70
+ function DialogTitle({ className, ...props }, ref) {
71
+ return /* @__PURE__ */ jsx(
72
+ RadixDialog.Title,
73
+ {
74
+ ref,
75
+ className: cn("text-lg font-semibold text-[var(--color-text-primary)]", className),
76
+ ...props
77
+ }
78
+ );
79
+ }
80
+ );
81
+ Title2.displayName = "Dialog.Title";
82
+ var Description2 = React.forwardRef(
83
+ function DialogDescription({ className, ...props }, ref) {
84
+ return /* @__PURE__ */ jsx(
85
+ RadixDialog.Description,
86
+ {
87
+ ref,
88
+ className: cn("mt-1 text-sm text-[var(--color-text-muted)]", className),
89
+ ...props
90
+ }
91
+ );
92
+ }
93
+ );
94
+ Description2.displayName = "Dialog.Description";
95
+ var Header = React.forwardRef(
96
+ function DialogHeader({ className, ...props }, ref) {
97
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4 flex flex-col gap-1", className), ...props });
98
+ }
99
+ );
100
+ Header.displayName = "Dialog.Header";
101
+ var Footer = React.forwardRef(
102
+ function DialogFooter({ className, ...props }, ref) {
103
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
104
+ }
105
+ );
106
+ Footer.displayName = "Dialog.Footer";
107
+ var Dialog = {
108
+ Root: Root2,
109
+ Trigger: Trigger2,
110
+ Portal: Portal2,
111
+ Overlay: Overlay2,
112
+ Content: Content2,
113
+ Close: Close2,
114
+ Title: Title2,
115
+ Description: Description2,
116
+ Header,
117
+ Footer
118
+ };
119
+
120
+ export {
121
+ Dialog
122
+ };
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+
3
+ // src/utils/glass.ts
4
+ var glassSurfaceClass = "bg-[var(--glass-bg)] border-[var(--glass-border)] backdrop-blur-[var(--glass-blur)] [box-shadow:inset_0_1px_0_0_var(--glass-highlight),var(--glass-shadow)]";
5
+
6
+ export {
7
+ glassSurfaceClass
8
+ };
@@ -0,0 +1,176 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/DropdownMenu/DropdownMenu.tsx
7
+ import * as React from "react";
8
+ import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
9
+ import { Check, ChevronRight } from "@nexub/icons";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Root2 = RadixDropdownMenu.Root;
12
+ var Trigger2 = RadixDropdownMenu.Trigger;
13
+ var Portal2 = RadixDropdownMenu.Portal;
14
+ var Group2 = RadixDropdownMenu.Group;
15
+ var RadioGroup2 = RadixDropdownMenu.RadioGroup;
16
+ var Sub2 = RadixDropdownMenu.Sub;
17
+ var Content2 = React.forwardRef(
18
+ function DropdownMenuContent({ className, sideOffset = 4, ...props }, ref) {
19
+ return /* @__PURE__ */ jsx(
20
+ RadixDropdownMenu.Content,
21
+ {
22
+ ref,
23
+ sideOffset,
24
+ className: cn(
25
+ "z-[var(--z-popover)] min-w-48 rounded-lg border border-[var(--color-border-default)]",
26
+ "bg-[var(--color-bg-default)] p-1 shadow-md outline-none",
27
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
28
+ "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
29
+ "data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
30
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
31
+ "data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
32
+ className
33
+ ),
34
+ ...props
35
+ }
36
+ );
37
+ }
38
+ );
39
+ Content2.displayName = "DropdownMenu.Content";
40
+ var itemBaseClasses = cn(
41
+ "relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none",
42
+ "transition-colors hover:bg-[var(--color-bg-subtle)] focus:bg-[var(--color-bg-subtle)]",
43
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
44
+ );
45
+ var Item2 = React.forwardRef(
46
+ function DropdownMenuItem({ className, ...props }, ref) {
47
+ return /* @__PURE__ */ jsx(
48
+ RadixDropdownMenu.Item,
49
+ {
50
+ ref,
51
+ className: cn(itemBaseClasses, className),
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+ );
57
+ Item2.displayName = "DropdownMenu.Item";
58
+ var Label2 = React.forwardRef(
59
+ function DropdownMenuLabel({ className, ...props }, ref) {
60
+ return /* @__PURE__ */ jsx(
61
+ RadixDropdownMenu.Label,
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "px-2 py-1 text-xs font-semibold text-[var(--color-text-muted)]",
66
+ className
67
+ ),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ );
73
+ Label2.displayName = "DropdownMenu.Label";
74
+ var Separator2 = React.forwardRef(
75
+ function DropdownMenuSeparator({ className, ...props }, ref) {
76
+ return /* @__PURE__ */ jsx(
77
+ RadixDropdownMenu.Separator,
78
+ {
79
+ ref,
80
+ className: cn("-mx-1 my-1 h-px bg-[var(--color-border-default)]", className),
81
+ ...props
82
+ }
83
+ );
84
+ }
85
+ );
86
+ Separator2.displayName = "DropdownMenu.Separator";
87
+ var CheckboxItem2 = React.forwardRef(function DropdownMenuCheckboxItem({ className, children, checked, ...props }, ref) {
88
+ return /* @__PURE__ */ jsxs(
89
+ RadixDropdownMenu.CheckboxItem,
90
+ {
91
+ ref,
92
+ className: cn(itemBaseClasses, "pl-8", className),
93
+ checked,
94
+ ...props,
95
+ children: [
96
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixDropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
97
+ children
98
+ ]
99
+ }
100
+ );
101
+ });
102
+ CheckboxItem2.displayName = "DropdownMenu.CheckboxItem";
103
+ var RadioItem2 = React.forwardRef(function DropdownMenuRadioItem({ className, children, ...props }, ref) {
104
+ return /* @__PURE__ */ jsxs(
105
+ RadixDropdownMenu.RadioItem,
106
+ {
107
+ ref,
108
+ className: cn(itemBaseClasses, "pl-8", className),
109
+ ...props,
110
+ children: [
111
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(RadixDropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", { className: "h-2 w-2 fill-current", viewBox: "0 0 8 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("circle", { cx: "4", cy: "4", r: "4" }) }) }) }),
112
+ children
113
+ ]
114
+ }
115
+ );
116
+ });
117
+ RadioItem2.displayName = "DropdownMenu.RadioItem";
118
+ var SubTrigger2 = React.forwardRef(function DropdownMenuSubTrigger({ className, children, ...props }, ref) {
119
+ return /* @__PURE__ */ jsxs(
120
+ RadixDropdownMenu.SubTrigger,
121
+ {
122
+ ref,
123
+ className: cn(
124
+ itemBaseClasses,
125
+ "data-[state=open]:bg-[var(--color-bg-subtle)]",
126
+ className
127
+ ),
128
+ ...props,
129
+ children: [
130
+ children,
131
+ /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
132
+ ]
133
+ }
134
+ );
135
+ });
136
+ SubTrigger2.displayName = "DropdownMenu.SubTrigger";
137
+ var SubContent2 = React.forwardRef(function DropdownMenuSubContent({ className, ...props }, ref) {
138
+ return /* @__PURE__ */ jsx(
139
+ RadixDropdownMenu.SubContent,
140
+ {
141
+ ref,
142
+ className: cn(
143
+ "z-[var(--z-popover)] min-w-48 rounded-lg border border-[var(--color-border-default)]",
144
+ "bg-[var(--color-bg-default)] p-1 shadow-md outline-none",
145
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
146
+ "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
147
+ "data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
148
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
149
+ "data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
150
+ className
151
+ ),
152
+ ...props
153
+ }
154
+ );
155
+ });
156
+ SubContent2.displayName = "DropdownMenu.SubContent";
157
+ var DropdownMenu = {
158
+ Root: Root2,
159
+ Trigger: Trigger2,
160
+ Portal: Portal2,
161
+ Content: Content2,
162
+ Item: Item2,
163
+ Group: Group2,
164
+ Label: Label2,
165
+ Separator: Separator2,
166
+ CheckboxItem: CheckboxItem2,
167
+ RadioGroup: RadioGroup2,
168
+ RadioItem: RadioItem2,
169
+ Sub: Sub2,
170
+ SubTrigger: SubTrigger2,
171
+ SubContent: SubContent2
172
+ };
173
+
174
+ export {
175
+ DropdownMenu
176
+ };
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import {
3
+ cn
4
+ } from "./chunk-AT6RPKU3.js";
5
+
6
+ // src/components/HelperText/HelperText.tsx
7
+ import * as React from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var HelperText = React.forwardRef(
10
+ ({ className, tone, style, children, ...props }, ref) => {
11
+ const toneStyle = tone ? { color: `var(--color-text-${tone})` } : {};
12
+ return /* @__PURE__ */ jsx(
13
+ "p",
14
+ {
15
+ ref,
16
+ "data-tone": tone,
17
+ style: { ...toneStyle, ...style },
18
+ className: cn(
19
+ "text-sm text-[var(--color-text-muted)] leading-snug",
20
+ className
21
+ ),
22
+ ...props,
23
+ children
24
+ }
25
+ );
26
+ }
27
+ );
28
+ HelperText.displayName = "HelperText";
29
+
30
+ export {
31
+ HelperText
32
+ };