@nexub/react 1.5.1 → 1.7.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 (207) hide show
  1. package/dist/chunk-24ZFAXB2.js +101 -0
  2. package/dist/{chunk-XR4NBY54.js → chunk-2DYKENBM.js} +10 -10
  3. package/dist/{chunk-SVQCINRE.js → chunk-2I7FIU6R.js} +5 -2
  4. package/dist/{chunk-S46W2QER.js → chunk-37L5ERUJ.js} +17 -11
  5. package/dist/{chunk-CWS37T3K.js → chunk-3E7X3YK3.js} +4 -2
  6. package/dist/{chunk-EZ23IA3H.js → chunk-3LTB6TGN.js} +4 -4
  7. package/dist/chunk-3QD76BKT.js +80 -0
  8. package/dist/{chunk-PQ6GU7SG.js → chunk-4HQFOIZW.js} +20 -14
  9. package/dist/{chunk-RLE5RN3T.js → chunk-4NFUBFYK.js} +15 -11
  10. package/dist/{chunk-B54WADL4.js → chunk-4P2JJ2FH.js} +12 -12
  11. package/dist/{chunk-I4BHRVRL.js → chunk-4UBVU53C.js} +9 -5
  12. package/dist/chunk-52ZVJPF7.js +1 -0
  13. package/dist/chunk-5QEARXY3.js +55 -0
  14. package/dist/chunk-643EYCLL.js +54 -0
  15. package/dist/{chunk-CNNJFWFA.js → chunk-6BGUZQAX.js} +4 -4
  16. package/dist/{chunk-LDYD7WL3.js → chunk-6ECOCGZG.js} +4 -3
  17. package/dist/{chunk-3AXIMXDU.js → chunk-6JBQAJJD.js} +6 -12
  18. package/dist/{chunk-YRDCY6BI.js → chunk-6UKNUI46.js} +0 -19
  19. package/dist/chunk-77LYWSJW.js +85 -0
  20. package/dist/{chunk-NCRFKPA4.js → chunk-7MSIOYJZ.js} +6 -8
  21. package/dist/{chunk-GIGOTRXX.js → chunk-7VJABRKB.js} +3 -10
  22. package/dist/{chunk-6QLLH6ID.js → chunk-7XWJCFWI.js} +8 -17
  23. package/dist/chunk-A3O23F2B.js +1 -0
  24. package/dist/chunk-AGYGWU6C.js +88 -0
  25. package/dist/chunk-AT2DSFP3.js +47 -0
  26. package/dist/{chunk-IIPYF6ZQ.js → chunk-B254JXS7.js} +16 -13
  27. package/dist/{chunk-GRB6T2TT.js → chunk-BSL62LBX.js} +19 -13
  28. package/dist/{chunk-GHCV6UXG.js → chunk-BTYDDKRQ.js} +5 -5
  29. package/dist/chunk-C6JRJ6JW.js +167 -0
  30. package/dist/chunk-CAOLGXA5.js +1 -0
  31. package/dist/{chunk-OJ2TLWYD.js → chunk-CKFRMCZ7.js} +5 -3
  32. package/dist/{chunk-LZB3KTSH.js → chunk-CQWYZPPJ.js} +1 -1
  33. package/dist/{chunk-6RBNM5RO.js → chunk-CUOASXI7.js} +10 -10
  34. package/dist/{chunk-HG6HTUWU.js → chunk-CV5ZKED7.js} +2 -2
  35. package/dist/{chunk-HJERFB7J.js → chunk-DDRYT3SY.js} +2 -2
  36. package/dist/chunk-DGCAM2UJ.js +60 -0
  37. package/dist/{chunk-FD7YU53N.js → chunk-DT3QGFXB.js} +4 -4
  38. package/dist/chunk-F73DTG2V.js +123 -0
  39. package/dist/{chunk-Z3IG5WRA.js → chunk-FJUVYRNT.js} +3 -3
  40. package/dist/{chunk-KQPLFVFR.js → chunk-FLZD7HQY.js} +0 -2
  41. package/dist/chunk-GG54WBLA.js +134 -0
  42. package/dist/{chunk-64JDZWCV.js → chunk-GRKCUQG4.js} +6 -5
  43. package/dist/{chunk-YPHNHQYQ.js → chunk-GWDEKW7P.js} +6 -2
  44. package/dist/{chunk-4I5ULCYG.js → chunk-HFTS5AN7.js} +3 -3
  45. package/dist/{chunk-GUB7YKG2.js → chunk-I4U36P54.js} +6 -3
  46. package/dist/{chunk-BTRTORKU.js → chunk-I6CAF7C5.js} +6 -7
  47. package/dist/{chunk-TJCHA3OI.js → chunk-J65MK3N4.js} +7 -4
  48. package/dist/{chunk-IK23Q2OF.js → chunk-JHVYI5GK.js} +3 -3
  49. package/dist/{chunk-J6TU45KP.js → chunk-JSBNYRO4.js} +26 -12
  50. package/dist/chunk-K5FKEAAK.js +94 -0
  51. package/dist/{chunk-5URGARPH.js → chunk-KE4YVG5Q.js} +6 -10
  52. package/dist/{chunk-QCNLE27O.js → chunk-KRCLK5O4.js} +11 -7
  53. package/dist/{chunk-A4IMFAZX.js → chunk-LESI7J7B.js} +3 -3
  54. package/dist/chunk-MLT7SA3T.js +171 -0
  55. package/dist/chunk-MNEXMMLM.js +23 -0
  56. package/dist/{chunk-PVTACENM.js → chunk-MTK3GHDQ.js} +2 -2
  57. package/dist/chunk-MYP5ZTC3.js +169 -0
  58. package/dist/chunk-NA5UMOE5.js +55 -0
  59. package/dist/chunk-NAJKIBU2.js +163 -0
  60. package/dist/{chunk-WESZPFBZ.js → chunk-NERAWEIQ.js} +7 -4
  61. package/dist/{chunk-YJ3JQYAN.js → chunk-NGQKBDHA.js} +5 -13
  62. package/dist/{chunk-7Q7ZF6BY.js → chunk-NNIFOMIH.js} +18 -8
  63. package/dist/{chunk-7L3CGIRA.js → chunk-NQPGELMP.js} +8 -19
  64. package/dist/{chunk-5O34ZNC3.js → chunk-NYWD5SI4.js} +19 -13
  65. package/dist/chunk-NZR4UGUZ.js +143 -0
  66. package/dist/{chunk-6J3QTWKC.js → chunk-NZT4TTNV.js} +18 -9
  67. package/dist/{chunk-JSD3H7WV.js → chunk-OYCK6BRG.js} +6 -6
  68. package/dist/{chunk-2555JXCP.js → chunk-PBPUSRTJ.js} +19 -11
  69. package/dist/{chunk-QD7H3WV3.js → chunk-PGDXFBKT.js} +8 -8
  70. package/dist/{chunk-NIX4SEKM.js → chunk-PREMZMLU.js} +7 -4
  71. package/dist/{chunk-4SSUM4CL.js → chunk-QUNH4BFR.js} +9 -6
  72. package/dist/{chunk-FHFVBOF3.js → chunk-QUYOV2ZJ.js} +6 -4
  73. package/dist/{chunk-KM6Z3VTI.js → chunk-QVTVDL6Y.js} +1 -1
  74. package/dist/{chunk-XI63BK3S.js → chunk-RATKKN3F.js} +3 -3
  75. package/dist/chunk-RM7MTOT5.js +339 -0
  76. package/dist/{chunk-DJZZ3FIP.js → chunk-RUR57JZQ.js} +5 -14
  77. package/dist/{chunk-ZV3AF5CL.js → chunk-S2CTBFLN.js} +13 -2
  78. package/dist/{chunk-72I7EVOL.js → chunk-SYZADSLI.js} +10 -6
  79. package/dist/{chunk-W2NEXOTG.js → chunk-T7RLPFGX.js} +2 -2
  80. package/dist/chunk-TAVVXXGO.js +131 -0
  81. package/dist/{chunk-BFRX6X4O.js → chunk-TZ6KJIR4.js} +23 -17
  82. package/dist/{chunk-V3TETH4J.js → chunk-U2ZYPPRG.js} +17 -16
  83. package/dist/{chunk-AHT35UWY.js → chunk-UTLKZPKJ.js} +10 -6
  84. package/dist/{chunk-OJRSPDNJ.js → chunk-VD4RFTNV.js} +8 -14
  85. package/dist/chunk-VLQGQFW7.js +110 -0
  86. package/dist/{chunk-RTDUTWJ4.js → chunk-VMT7Y3AT.js} +5 -8
  87. package/dist/{chunk-AXOKFS4K.js → chunk-W3KO3JNZ.js} +20 -4
  88. package/dist/{chunk-LGQ737BP.js → chunk-WHTLXQB6.js} +1 -1
  89. package/dist/chunk-WLRRMT6W.js +1 -0
  90. package/dist/{chunk-2FCSWBSM.js → chunk-WMWX6DPB.js} +3 -3
  91. package/dist/{chunk-UMC64NCT.js → chunk-WVBGQCYC.js} +6 -3
  92. package/dist/{chunk-TEOLG3N2.js → chunk-X4BQHXLB.js} +10 -6
  93. package/dist/{chunk-SY6V3HAK.js → chunk-XDU27NRX.js} +3 -3
  94. package/dist/{chunk-KA2J5OBA.js → chunk-XQDD76EF.js} +4 -7
  95. package/dist/chunk-XTATJMY6.js +64 -0
  96. package/dist/chunk-XYXMPHND.js +1 -0
  97. package/dist/{chunk-7ZWBHHRK.js → chunk-YNU6VRD5.js} +23 -32
  98. package/dist/{chunk-6SJPVQQW.js → chunk-Z3HF6XJ3.js} +1 -1
  99. package/dist/{chunk-I4URNMI7.js → chunk-ZC4MZAEX.js} +9 -7
  100. package/dist/{chunk-PWBPHGM3.js → chunk-ZCEUVK2R.js} +2 -2
  101. package/dist/{chunk-NQVRF4RB.js → chunk-ZMJ54TG6.js} +16 -13
  102. package/dist/chunk-ZT3NWE5U.js +1 -0
  103. package/dist/{chunk-RHOYF7MO.js → chunk-ZTLALVWA.js} +6 -15
  104. package/dist/components/Accordion/index.js +1 -1
  105. package/dist/components/Alert/index.js +2 -1
  106. package/dist/components/AlertDialog/index.js +3 -3
  107. package/dist/components/Amount/index.js +3 -1
  108. package/dist/components/AspectRatio/index.js +1 -1
  109. package/dist/components/Autocomplete/index.js +3 -2
  110. package/dist/components/Avatar/index.js +1 -1
  111. package/dist/components/AvatarGroup/index.js +3 -2
  112. package/dist/components/Badge/index.js +1 -1
  113. package/dist/components/Banner/index.js +2 -1
  114. package/dist/components/Breadcrumb/index.js +2 -1
  115. package/dist/components/Button/index.js +1 -1
  116. package/dist/components/ButtonGroup/index.js +1 -1
  117. package/dist/components/Callout/index.js +1 -1
  118. package/dist/components/Card/index.js +3 -1
  119. package/dist/components/CheckList/index.js +1 -1
  120. package/dist/components/Checkbox/index.js +1 -1
  121. package/dist/components/CheckboxCard/index.js +9 -0
  122. package/dist/components/Chip/index.js +2 -1
  123. package/dist/components/Citation/index.js +17 -0
  124. package/dist/components/Code/index.js +1 -1
  125. package/dist/components/Combobox/index.js +1 -1
  126. package/dist/components/CommandPalette/index.js +3 -2
  127. package/dist/components/ContextMenu/index.js +2 -2
  128. package/dist/components/CountryBadge/index.js +1 -1
  129. package/dist/components/DataTable/index.js +2 -1
  130. package/dist/components/DatePicker/index.js +5 -1
  131. package/dist/components/DateRangePicker/index.js +5 -1
  132. package/dist/components/Dialog/index.js +2 -2
  133. package/dist/components/Drawer/index.js +2 -2
  134. package/dist/components/DropdownMenu/index.js +2 -2
  135. package/dist/components/EmptyState/index.js +1 -1
  136. package/dist/components/ErrorState/index.js +2 -1
  137. package/dist/components/EyebrowChip/index.js +4 -1
  138. package/dist/components/FileUpload/index.js +2 -1
  139. package/dist/components/FilterChip/index.js +3 -1
  140. package/dist/components/Flex/index.js +2 -1
  141. package/dist/components/FormError/index.js +1 -1
  142. package/dist/components/FormField/index.js +7 -4
  143. package/dist/components/GradientDivider/index.js +1 -1
  144. package/dist/components/Grid/index.js +2 -1
  145. package/dist/components/Heading/index.js +4 -1
  146. package/dist/components/HelperText/index.js +4 -1
  147. package/dist/components/HoverCard/index.js +3 -2
  148. package/dist/components/IconButton/index.js +2 -1
  149. package/dist/components/Input/index.js +1 -1
  150. package/dist/components/Kbd/index.js +1 -1
  151. package/dist/components/KeyboardShortcut/index.js +2 -2
  152. package/dist/components/Label/index.js +4 -1
  153. package/dist/components/Link/index.js +1 -1
  154. package/dist/components/Logo/index.js +1 -1
  155. package/dist/components/MediaCard/index.js +9 -0
  156. package/dist/components/Menubar/index.js +2 -2
  157. package/dist/components/MessageBubble/index.js +18 -0
  158. package/dist/components/MoneyInput/index.js +3 -2
  159. package/dist/components/NavigationMenu/index.js +2 -2
  160. package/dist/components/NavigationRail/index.js +2 -1
  161. package/dist/components/NexubProvider/index.js +14 -0
  162. package/dist/components/NumberInput/index.js +3 -2
  163. package/dist/components/NumberTicker/index.js +10 -0
  164. package/dist/components/PageHeader/index.js +1 -1
  165. package/dist/components/Pagination/index.js +3 -1
  166. package/dist/components/PasswordInput/index.js +3 -2
  167. package/dist/components/Popover/index.js +2 -2
  168. package/dist/components/Progress/index.js +2 -1
  169. package/dist/components/PromptInput/index.js +15 -0
  170. package/dist/components/RadioCard/index.js +11 -0
  171. package/dist/components/RadioGroup/index.js +1 -1
  172. package/dist/components/Rating/index.js +2 -1
  173. package/dist/components/ScrollArea/index.js +1 -1
  174. package/dist/components/SearchInput/index.js +3 -2
  175. package/dist/components/Section/index.js +1 -1
  176. package/dist/components/SegmentedControl/index.js +3 -2
  177. package/dist/components/Select/index.js +2 -2
  178. package/dist/components/Separator/index.js +1 -1
  179. package/dist/components/Sidebar/index.js +2 -1
  180. package/dist/components/Skeleton/index.js +1 -1
  181. package/dist/components/Spinner/index.js +2 -1
  182. package/dist/components/SplitButton/index.js +5 -5
  183. package/dist/components/Stack/index.js +2 -1
  184. package/dist/components/StatusPill/index.js +1 -1
  185. package/dist/components/StreamingText/index.js +8 -0
  186. package/dist/components/Switch/index.js +1 -1
  187. package/dist/components/Table/index.js +1 -1
  188. package/dist/components/Tabs/index.js +3 -2
  189. package/dist/components/Tag/index.js +1 -1
  190. package/dist/components/Text/index.js +1 -1
  191. package/dist/components/Textarea/index.js +1 -1
  192. package/dist/components/ThinkingIndicator/index.js +9 -0
  193. package/dist/components/Toast/index.js +3 -1
  194. package/dist/components/Tooltip/index.js +2 -1
  195. package/dist/components/TopNav/index.js +2 -1
  196. package/dist/index.d.ts +440 -24
  197. package/dist/index.js +225 -146
  198. package/package.json +52 -50
  199. package/dist/chunk-63DPMUMR.js +0 -67
  200. package/dist/chunk-CHGPGRML.js +0 -115
  201. package/dist/chunk-H2W7IYVY.js +0 -155
  202. package/dist/chunk-J2T4GFFS.js +0 -85
  203. package/dist/chunk-LH3BSAIS.js +0 -119
  204. package/dist/chunk-LMPGHWUA.js +0 -114
  205. package/dist/chunk-NMH5WSZG.js +0 -72
  206. package/dist/chunk-P44EROBX.js +0 -55
  207. package/dist/chunk-TYTW4F3B.js +0 -178
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexub/react",
3
- "version": "1.5.1",
3
+ "version": "1.7.0",
4
4
  "description": "React component library for Nexub Design System — 90+ accessible, themeable UI components built on Radix UI primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,68 +36,70 @@
36
36
  "main": "./dist/index.js",
37
37
  "types": "./dist/index.d.ts",
38
38
  "dependencies": {
39
- "@radix-ui/react-accordion": "^1.2.12",
40
- "@radix-ui/react-alert-dialog": "^1.1.15",
41
- "@radix-ui/react-checkbox": "^1.3.3",
42
- "@radix-ui/react-collapsible": "^1.1.12",
43
- "@radix-ui/react-context-menu": "^2.2.16",
44
- "@radix-ui/react-dialog": "^1.1.15",
45
- "@radix-ui/react-dropdown-menu": "^2.1.16",
46
- "@radix-ui/react-hover-card": "^1.1.15",
47
- "@radix-ui/react-menubar": "^1.1.16",
48
- "@radix-ui/react-navigation-menu": "^1.2.14",
49
- "@radix-ui/react-popover": "^1.1.15",
50
- "@radix-ui/react-radio-group": "^1.3.8",
51
- "@radix-ui/react-scroll-area": "^1.2.10",
52
- "@radix-ui/react-select": "^2.2.6",
53
- "@radix-ui/react-slider": "^1.3.6",
54
- "@radix-ui/react-slot": "^1.1.0",
55
- "@radix-ui/react-switch": "^1.2.6",
56
- "@radix-ui/react-tabs": "^1.1.13",
57
- "@radix-ui/react-toast": "^1.2.15",
58
- "@radix-ui/react-toggle": "^1.1.10",
59
- "@radix-ui/react-toggle-group": "^1.1.11",
60
- "@radix-ui/react-toolbar": "^1.1.11",
61
- "@radix-ui/react-tooltip": "^1.2.8",
62
- "@radix-ui/react-visually-hidden": "^1.1.0",
39
+ "@radix-ui/react-accordion": "^1.3.1",
40
+ "@radix-ui/react-alert-dialog": "^1.2.1",
41
+ "@radix-ui/react-checkbox": "^1.4.1",
42
+ "@radix-ui/react-collapsible": "^1.2.1",
43
+ "@radix-ui/react-context-menu": "^2.4.1",
44
+ "@radix-ui/react-dialog": "^1.3.1",
45
+ "@radix-ui/react-direction": "^1.2.0",
46
+ "@radix-ui/react-dropdown-menu": "^2.2.1",
47
+ "@radix-ui/react-hover-card": "^1.2.1",
48
+ "@radix-ui/react-menubar": "^1.2.1",
49
+ "@radix-ui/react-navigation-menu": "^1.4.1",
50
+ "@radix-ui/react-popover": "^1.3.1",
51
+ "@radix-ui/react-radio-group": "^1.5.1",
52
+ "@radix-ui/react-scroll-area": "^1.4.0",
53
+ "@radix-ui/react-select": "^2.4.1",
54
+ "@radix-ui/react-slider": "^1.6.1",
55
+ "@radix-ui/react-slot": "^1.5.0",
56
+ "@radix-ui/react-switch": "^1.4.1",
57
+ "@radix-ui/react-tabs": "^1.2.1",
58
+ "@radix-ui/react-toast": "^1.3.1",
59
+ "@radix-ui/react-toggle": "^1.2.1",
60
+ "@radix-ui/react-toggle-group": "^1.2.1",
61
+ "@radix-ui/react-toolbar": "^1.2.1",
62
+ "@radix-ui/react-tooltip": "^1.4.1",
63
+ "@radix-ui/react-visually-hidden": "^1.2.13",
63
64
  "@tanstack/react-table": "^8.21.3",
64
65
  "class-variance-authority": "^0.7.1",
65
66
  "clsx": "^2.1.1",
66
67
  "cmdk": "^1.1.1",
67
- "date-fns": "^4.1.0",
68
+ "date-fns": "^4.4.0",
68
69
  "react-day-picker": "^9.14.0",
69
- "tailwind-merge": "^2.5.4",
70
- "@nexub/icons": "1.5.1"
70
+ "tailwind-merge": "^2.6.1",
71
+ "@nexub/icons": "1.7.0"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "react": ">=18 <20",
74
75
  "react-dom": ">=18 <20",
75
- "@nexub/tokens": "^1.5.1"
76
+ "@nexub/tokens": "^1.7.0"
76
77
  },
77
78
  "devDependencies": {
78
79
  "@playwright/test": "1.64.0",
79
- "@storybook/addon-essentials": "8.6.14",
80
- "@storybook/react": "8.6.14",
81
- "@storybook/react-vite": "8.6.14",
82
- "@testing-library/jest-dom": "^6.6.3",
83
- "@testing-library/react": "^16.1.0",
84
- "@testing-library/user-event": "^14.5.2",
85
- "@types/react": "^19.0.0",
86
- "@types/react-dom": "^19.0.0",
87
- "autoprefixer": "^10.4.20",
88
- "axe-core": "^4.11.3",
89
- "jsdom": "^25.0.1",
90
- "postcss": "^8.4.49",
91
- "react": "^19.0.0",
92
- "react-dom": "^19.0.0",
93
- "storybook": "8.6.14",
94
- "tailwindcss": "^3.4.0",
95
- "tsup": "^8.3.5",
96
- "typescript": "^5.6.3",
80
+ "@storybook/react": "10.6.3",
81
+ "@storybook/react-vite": "10.6.3",
82
+ "@testing-library/jest-dom": "^6.9.1",
83
+ "@testing-library/react": "^16.3.3",
84
+ "@testing-library/user-event": "^14.6.8",
85
+ "@types/node": "^26.6.5",
86
+ "@types/react": "^19.3.0",
87
+ "@types/react-dom": "^19.3.0",
88
+ "autoprefixer": "^10.6.1",
89
+ "axe-core": "^4.14.0",
90
+ "jsdom": "^30.1.3",
91
+ "postcss": "^8.5.31",
92
+ "react": "^19.3.1",
93
+ "react-dom": "^19.3.1",
94
+ "storybook": "10.6.3",
95
+ "tailwindcss": "^3.4.19",
96
+ "tsup": "^8.5.1",
97
+ "typescript": "^5.9.3",
97
98
  "vaul": "1.1.2",
98
- "vitest": "^2.1.8",
99
- "@nexub/themes": "1.5.1",
100
- "@nexub/tokens": "1.5.1"
99
+ "vite": "^7.3.7",
100
+ "vitest": "^5.0.5",
101
+ "@nexub/themes": "1.7.0",
102
+ "@nexub/tokens": "1.7.0"
101
103
  },
102
104
  "scripts": {
103
105
  "build": "tsup && node scripts/check-dts.mjs",
@@ -1,67 +0,0 @@
1
- 'use client';
2
- import {
3
- cn
4
- } from "./chunk-Q7G5WGYV.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
- };
@@ -1,115 +0,0 @@
1
- 'use client';
2
- import {
3
- cn
4
- } from "./chunk-Q7G5WGYV.js";
5
-
6
- // src/components/DateRangePicker/DateRangePicker.tsx
7
- import * as React from "react";
8
- import * as RadixPopover from "@radix-ui/react-popover";
9
- import { DayPicker } from "react-day-picker";
10
- import { format } from "date-fns";
11
- import { CalendarDays, ChevronLeft, ChevronRight } from "@nexub/icons";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- function formatRange(range, placeholder) {
14
- if (!range) return placeholder;
15
- if (range.from && range.to) {
16
- return `${format(range.from, "PP")} \u2013 ${format(range.to, "PP")}`;
17
- }
18
- if (range.from) return `${format(range.from, "PP")} \u2013 \u2026`;
19
- return placeholder;
20
- }
21
- var calendarClassNames = {
22
- months: "flex flex-col sm:flex-row gap-4",
23
- month: "flex flex-col gap-4",
24
- month_caption: "flex justify-center pt-1 relative items-center",
25
- caption_label: "text-sm font-medium",
26
- nav: "flex items-center gap-1",
27
- button_previous: "absolute left-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
28
- button_next: "absolute right-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
29
- month_grid: "w-full border-collapse",
30
- weekdays: "flex",
31
- weekday: "text-[var(--color-text-muted)] rounded-md w-8 font-normal text-[0.8rem] flex-1 text-center",
32
- week: "flex w-full mt-2",
33
- day: "relative p-0 text-center text-sm flex-1 focus-within:relative focus-within:z-20",
34
- day_button: "inline-flex h-8 w-8 items-center justify-center rounded-md text-sm hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
35
- selected: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)]",
36
- range_start: "rounded-l-md",
37
- range_end: "rounded-r-md",
38
- range_middle: "aria-selected:bg-[var(--color-bg-subtle)] aria-selected:text-[var(--color-text-primary)] rounded-none",
39
- today: "bg-[var(--color-bg-subtle)]",
40
- outside: "opacity-50",
41
- disabled: "opacity-50",
42
- hidden: "invisible"
43
- };
44
- var DateRangePicker = React.forwardRef(function DateRangePicker2({
45
- value,
46
- onChange,
47
- placeholder = "Pick a date range",
48
- disabled = false,
49
- minDate,
50
- maxDate,
51
- className,
52
- id,
53
- "aria-label": ariaLabel
54
- }, ref) {
55
- const [open, setOpen] = React.useState(false);
56
- const display = formatRange(value, placeholder);
57
- const label = ariaLabel ? `${ariaLabel}: ${display}` : display;
58
- return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
59
- /* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
60
- "button",
61
- {
62
- ref,
63
- id,
64
- disabled,
65
- "aria-label": label,
66
- className: cn(
67
- "inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
68
- "hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
69
- "disabled:cursor-not-allowed disabled:opacity-50",
70
- !value && "text-[var(--color-text-muted)]",
71
- className
72
- ),
73
- children: [
74
- /* @__PURE__ */ jsx(CalendarDays, { size: "sm", "aria-hidden": "true" }),
75
- display
76
- ]
77
- }
78
- ) }),
79
- /* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
80
- RadixPopover.Content,
81
- {
82
- align: "start",
83
- className: cn(
84
- "z-[var(--z-popover)] rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
85
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
86
- "data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
87
- "data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
88
- ),
89
- children: /* @__PURE__ */ jsx(
90
- DayPicker,
91
- {
92
- mode: "range",
93
- selected: value,
94
- onSelect: onChange,
95
- numberOfMonths: 2,
96
- startMonth: minDate,
97
- endMonth: maxDate,
98
- initialFocus: true,
99
- showOutsideDays: true,
100
- className: "p-3",
101
- classNames: calendarClassNames,
102
- components: {
103
- Chevron: ({ orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { size: "xs", "aria-hidden": "true" }) : orientation === "right" ? /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true", ...rest })
104
- }
105
- }
106
- )
107
- }
108
- ) })
109
- ] });
110
- });
111
- DateRangePicker.displayName = "DateRangePicker";
112
-
113
- export {
114
- DateRangePicker
115
- };
@@ -1,155 +0,0 @@
1
- 'use client';
2
- import {
3
- cn
4
- } from "./chunk-Q7G5WGYV.js";
5
-
6
- // src/components/FileUpload/FileUpload.tsx
7
- import * as React from "react";
8
- import { Upload, X } from "@nexub/icons";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- var FileUploadContext = React.createContext(null);
11
- function useFileUpload() {
12
- const ctx = React.useContext(FileUploadContext);
13
- if (!ctx) throw new Error("FileUpload parts must be used inside FileUpload.Root");
14
- return ctx;
15
- }
16
- var Root = React.forwardRef(
17
- ({ className, accept, maxFiles, onFilesChange, children, ...props }, ref) => {
18
- const [files, setFiles] = React.useState([]);
19
- const [isDragging, setIsDragging] = React.useState(false);
20
- const addFiles = React.useCallback(
21
- (newFiles) => {
22
- setFiles((prev) => {
23
- const next = [...prev, ...newFiles].slice(0, maxFiles);
24
- onFilesChange?.(next);
25
- return next;
26
- });
27
- },
28
- [maxFiles, onFilesChange]
29
- );
30
- const removeFile = React.useCallback(
31
- (index) => {
32
- setFiles((prev) => {
33
- const next = prev.filter((_, i) => i !== index);
34
- onFilesChange?.(next);
35
- return next;
36
- });
37
- },
38
- [onFilesChange]
39
- );
40
- const contextValue = React.useMemo(
41
- () => ({ accept, maxFiles, onFilesChange, files, addFiles, removeFile, isDragging, setIsDragging }),
42
- [accept, maxFiles, onFilesChange, files, addFiles, removeFile, isDragging, setIsDragging]
43
- );
44
- return /* @__PURE__ */ jsx(FileUploadContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-4", className), ...props, children }) });
45
- }
46
- );
47
- Root.displayName = "FileUpload.Root";
48
- var Dropzone = React.forwardRef(
49
- ({ className, children, ...props }, ref) => {
50
- const { accept, addFiles, isDragging, setIsDragging } = useFileUpload();
51
- const inputRef = React.useRef(null);
52
- function handleDrop(e) {
53
- e.preventDefault();
54
- setIsDragging(false);
55
- const dropped = Array.from(e.dataTransfer.files);
56
- addFiles(dropped);
57
- }
58
- return /* @__PURE__ */ jsxs(
59
- "div",
60
- {
61
- ref,
62
- role: "button",
63
- tabIndex: 0,
64
- "aria-label": "Upload files",
65
- onClick: () => inputRef.current?.click(),
66
- onKeyDown: (e) => {
67
- if (e.key === "Enter" || e.key === " ") inputRef.current?.click();
68
- },
69
- onDragOver: (e) => {
70
- e.preventDefault();
71
- setIsDragging(true);
72
- },
73
- onDragLeave: () => setIsDragging(false),
74
- onDrop: handleDrop,
75
- className: cn(
76
- "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed p-8 text-center transition-colors",
77
- isDragging ? "border-[var(--color-brand-primary-500)] bg-[var(--color-brand-primary-500)]/5" : "border-[var(--color-border-input)] hover:border-[var(--color-brand-primary-500)] hover:bg-[var(--color-bg-subtle)]",
78
- className
79
- ),
80
- ...props,
81
- children: [
82
- /* @__PURE__ */ jsx(Upload, { size: "lg", className: "text-[var(--color-text-muted)]", "aria-hidden": "true" }),
83
- children ?? /* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--color-text-muted)]", children: [
84
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-[var(--color-brand-primary-500)]", children: "Click to upload" }),
85
- " ",
86
- "or drag and drop"
87
- ] }),
88
- /* @__PURE__ */ jsx(
89
- "input",
90
- {
91
- ref: inputRef,
92
- type: "file",
93
- className: "sr-only",
94
- multiple: true,
95
- accept: accept?.join(","),
96
- onChange: (e) => {
97
- if (e.target.files) addFiles(Array.from(e.target.files));
98
- e.target.value = "";
99
- }
100
- }
101
- )
102
- ]
103
- }
104
- );
105
- }
106
- );
107
- Dropzone.displayName = "FileUpload.Dropzone";
108
- var List = React.forwardRef(
109
- ({ className, ...props }, ref) => {
110
- const { files } = useFileUpload();
111
- if (files.length === 0) return null;
112
- return /* @__PURE__ */ jsx("ul", { ref, className: cn("flex flex-col gap-2", className), ...props });
113
- }
114
- );
115
- List.displayName = "FileUpload.List";
116
- var Item = React.forwardRef(({ className, index, ...props }, ref) => {
117
- const { files, removeFile } = useFileUpload();
118
- const file = files[index];
119
- if (!file) return null;
120
- return /* @__PURE__ */ jsxs(
121
- "li",
122
- {
123
- ref,
124
- className: cn(
125
- "flex items-center justify-between gap-3 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] p-3",
126
- className
127
- ),
128
- ...props,
129
- children: [
130
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
131
- /* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-[var(--color-text-primary)]", children: file.name }),
132
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-[var(--color-text-muted)]", children: [
133
- (file.size / 1024).toFixed(1),
134
- " KB"
135
- ] })
136
- ] }),
137
- /* @__PURE__ */ jsx(
138
- "button",
139
- {
140
- onClick: () => removeFile(index),
141
- "aria-label": `Remove ${file.name}`,
142
- className: "shrink-0 rounded p-1 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors",
143
- children: /* @__PURE__ */ jsx(X, { size: "sm", "aria-hidden": "true" })
144
- }
145
- )
146
- ]
147
- }
148
- );
149
- });
150
- Item.displayName = "FileUpload.Item";
151
- var FileUpload = { Root, Dropzone, List, Item };
152
-
153
- export {
154
- FileUpload
155
- };
@@ -1,85 +0,0 @@
1
- 'use client';
2
- import {
3
- cn
4
- } from "./chunk-Q7G5WGYV.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
- };
@@ -1,119 +0,0 @@
1
- 'use client';
2
- import {
3
- cn
4
- } from "./chunk-Q7G5WGYV.js";
5
-
6
- // src/components/DatePicker/DatePicker.tsx
7
- import * as React from "react";
8
- import * as RadixPopover from "@radix-ui/react-popover";
9
- import { DayPicker } from "react-day-picker";
10
- import { format } from "date-fns";
11
- import { CalendarDays, ChevronLeft, ChevronRight } from "@nexub/icons";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- var calendarClassNames = {
14
- months: "flex flex-col sm:flex-row gap-4",
15
- month: "flex flex-col gap-4",
16
- month_caption: "flex justify-center pt-1 relative items-center",
17
- caption_label: "text-sm font-medium",
18
- nav: "flex items-center gap-1",
19
- button_previous: "absolute left-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
20
- button_next: "absolute right-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
21
- month_grid: "w-full border-collapse",
22
- weekdays: "flex",
23
- weekday: "text-[var(--color-text-muted)] rounded-md w-8 font-normal text-[0.8rem] flex-1 text-center",
24
- week: "flex w-full mt-2",
25
- day: cn(
26
- "relative p-0 text-center text-sm flex-1",
27
- "[&:has([aria-selected].day-range-end)]:rounded-r-md",
28
- "[&:has([aria-selected].day-outside)]:bg-[var(--color-bg-subtle)]/50",
29
- "[&:has([aria-selected])]:bg-[var(--color-bg-subtle)]",
30
- "first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md",
31
- "focus-within:relative focus-within:z-20"
32
- ),
33
- day_button: cn(
34
- "inline-flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
35
- "hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)]",
36
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
37
- "aria-selected:opacity-100"
38
- ),
39
- selected: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)] hover:text-white focus:bg-[var(--color-fill-primary)] focus:text-white",
40
- today: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]",
41
- outside: "text-[var(--color-text-muted)] opacity-50",
42
- disabled: "text-[var(--color-text-muted)] opacity-50",
43
- hidden: "invisible"
44
- };
45
- var DatePicker = React.forwardRef(
46
- function DatePicker2({
47
- value,
48
- onChange,
49
- placeholder = "Pick a date",
50
- disabled = false,
51
- minDate,
52
- maxDate,
53
- className,
54
- id,
55
- "aria-label": ariaLabel
56
- }, ref) {
57
- const [open, setOpen] = React.useState(false);
58
- const display = value ? format(value, "PP") : placeholder;
59
- return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
60
- /* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
61
- "button",
62
- {
63
- ref,
64
- id,
65
- disabled,
66
- "aria-label": ariaLabel ? `${ariaLabel}: ${display}` : display,
67
- className: cn(
68
- "inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
69
- "hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
70
- "disabled:cursor-not-allowed disabled:opacity-50",
71
- !value && "text-[var(--color-text-muted)]",
72
- className
73
- ),
74
- children: [
75
- /* @__PURE__ */ jsx(CalendarDays, { size: "sm", "aria-hidden": "true" }),
76
- value ? format(value, "PP") : placeholder
77
- ]
78
- }
79
- ) }),
80
- /* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
81
- RadixPopover.Content,
82
- {
83
- align: "start",
84
- className: cn(
85
- "z-[var(--z-popover)] rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
86
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
87
- "data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
88
- "data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
89
- ),
90
- children: /* @__PURE__ */ jsx(
91
- DayPicker,
92
- {
93
- mode: "single",
94
- selected: value,
95
- onSelect: (date) => {
96
- onChange?.(date);
97
- setOpen(false);
98
- },
99
- startMonth: minDate,
100
- endMonth: maxDate,
101
- initialFocus: true,
102
- showOutsideDays: true,
103
- className: "p-3",
104
- classNames: calendarClassNames,
105
- components: {
106
- Chevron: ({ orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { size: "xs", "aria-hidden": "true" }) : orientation === "right" ? /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true", ...rest })
107
- }
108
- }
109
- )
110
- }
111
- ) })
112
- ] });
113
- }
114
- );
115
- DatePicker.displayName = "DatePicker";
116
-
117
- export {
118
- DatePicker
119
- };