@nexus-cross/design-system 1.0.6-beta.2 → 1.0.7

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 (403) hide show
  1. package/DESIGN.md +185 -0
  2. package/cursor-rules/nexus-ui-api.mdc +223 -7
  3. package/cursor-rules/nexus-ui-components.mdc +44 -17
  4. package/dist/alert.js +16 -0
  5. package/dist/alert.mjs +3 -0
  6. package/dist/badge.js +16 -0
  7. package/dist/badge.mjs +3 -0
  8. package/dist/breadcrumb.js +12 -0
  9. package/dist/breadcrumb.mjs +3 -0
  10. package/dist/chunks/chunk-22O6YUYH.mjs +5 -0
  11. package/dist/chunks/chunk-2N2EPBO4.js +120 -0
  12. package/dist/chunks/{chunk-AFSEYJZT.js → chunk-2T7RUYEK.js} +175 -50
  13. package/dist/chunks/chunk-2UPGFY6E.mjs +76 -0
  14. package/dist/chunks/{chunk-VGO4Z2WH.js → chunk-3RK3UT2O.js} +50 -12
  15. package/dist/chunks/chunk-3ZWN66YH.js +53 -0
  16. package/dist/chunks/chunk-5PQ3UCKF.js +99 -0
  17. package/dist/chunks/chunk-6BWOKTVQ.mjs +87 -0
  18. package/dist/chunks/chunk-6DBRL6NA.mjs +81 -0
  19. package/dist/chunks/{chunk-HNLI646G.mjs → chunk-AAITRHED.mjs} +51 -13
  20. package/dist/chunks/chunk-B5O6W3Z4.mjs +73 -0
  21. package/dist/chunks/chunk-BJM3NDT2.mjs +368 -0
  22. package/dist/chunks/chunk-C2DSAJTL.js +109 -0
  23. package/dist/chunks/chunk-CUTMLBC3.mjs +86 -0
  24. package/dist/chunks/chunk-CV4GMFWP.js +174 -0
  25. package/dist/chunks/chunk-DICN6GKE.js +99 -0
  26. package/dist/chunks/chunk-DYPPVXQF.js +143 -0
  27. package/dist/chunks/chunk-EJY7IVSK.mjs +31 -0
  28. package/dist/chunks/chunk-FUIBYZZ4.mjs +98 -0
  29. package/dist/chunks/chunk-H2G5FMRN.mjs +75 -0
  30. package/dist/chunks/chunk-H2V7RHYV.mjs +120 -0
  31. package/dist/chunks/chunk-MMCA33FW.mjs +85 -0
  32. package/dist/chunks/chunk-NZHK76R3.js +109 -0
  33. package/dist/chunks/chunk-OE5BAEBE.js +7 -0
  34. package/dist/chunks/chunk-P73MEU7N.mjs +150 -0
  35. package/dist/chunks/chunk-PDJTSQOC.js +59 -0
  36. package/dist/chunks/chunk-S2GMEC43.js +109 -0
  37. package/dist/chunks/chunk-X3CTJ7TD.js +108 -0
  38. package/dist/chunks/chunk-XGIJZ3NZ.js +160 -0
  39. package/dist/chunks/chunk-YO5MSDPX.mjs +36 -0
  40. package/dist/chunks/chunk-ZI4LN2B2.js +96 -0
  41. package/dist/chunks/chunk-ZU4AWAFT.mjs +137 -0
  42. package/dist/component-tokens/button.d.ts +3 -0
  43. package/dist/component-tokens/button.d.ts.map +1 -0
  44. package/dist/component-tokens/index.d.ts +3 -0
  45. package/dist/component-tokens/index.d.ts.map +1 -0
  46. package/dist/component-tokens/types.d.ts +19 -0
  47. package/dist/component-tokens/types.d.ts.map +1 -0
  48. package/dist/{accordion.d.mts → components/Accordion.d.ts} +2 -3
  49. package/dist/components/Accordion.d.ts.map +1 -0
  50. package/dist/components/Alert.d.ts +16 -0
  51. package/dist/components/Alert.d.ts.map +1 -0
  52. package/dist/{avatar.d.mts → components/Avatar.d.ts} +5 -6
  53. package/dist/components/Avatar.d.ts.map +1 -0
  54. package/dist/components/Badge.d.ts +17 -0
  55. package/dist/components/Badge.d.ts.map +1 -0
  56. package/dist/components/Breadcrumb.d.ts +15 -0
  57. package/dist/components/Breadcrumb.d.ts.map +1 -0
  58. package/dist/{button.d.mts → components/Button.d.ts} +5 -6
  59. package/dist/components/Button.d.ts.map +1 -0
  60. package/dist/{carousel.d.mts → components/Carousel.d.ts} +5 -6
  61. package/dist/components/Carousel.d.ts.map +1 -0
  62. package/dist/{checkbox.d.mts → components/CheckBox.d.ts} +6 -7
  63. package/dist/components/CheckBox.d.ts.map +1 -0
  64. package/dist/{chip.d.mts → components/Chip.d.ts} +6 -7
  65. package/dist/components/Chip.d.ts.map +1 -0
  66. package/dist/{client-only.d.mts → components/ClientOnly.d.ts} +4 -5
  67. package/dist/components/ClientOnly.d.ts.map +1 -0
  68. package/dist/{countdown.d.mts → components/Countdown.d.ts} +3 -3
  69. package/dist/components/Countdown.d.ts.map +1 -0
  70. package/dist/{counter.d.mts → components/Counter.d.ts} +3 -3
  71. package/dist/components/Counter.d.ts.map +1 -0
  72. package/dist/{data-list.d.mts → components/DataList.d.ts} +4 -5
  73. package/dist/components/DataList.d.ts.map +1 -0
  74. package/dist/components/DatePicker.d.ts +17 -0
  75. package/dist/components/DatePicker.d.ts.map +1 -0
  76. package/dist/{divider.d.mts → components/Divider.d.ts} +5 -6
  77. package/dist/components/Divider.d.ts.map +1 -0
  78. package/dist/{drawer.d.mts → components/Drawer.d.ts} +13 -15
  79. package/dist/components/Drawer.d.ts.map +1 -0
  80. package/dist/components/DropdownMenu.d.ts +30 -0
  81. package/dist/components/DropdownMenu.d.ts.map +1 -0
  82. package/dist/{ellipsis.d.mts → components/Ellipsis.d.ts} +4 -5
  83. package/dist/components/Ellipsis.d.ts.map +1 -0
  84. package/dist/components/EmptyState.d.ts +15 -0
  85. package/dist/components/EmptyState.d.ts.map +1 -0
  86. package/dist/{error-boundary.d.mts → components/ErrorBoundary.d.ts} +4 -5
  87. package/dist/components/ErrorBoundary.d.ts.map +1 -0
  88. package/dist/{infinite-scroll.d.mts → components/InfiniteScroll.d.ts} +5 -6
  89. package/dist/components/InfiniteScroll.d.ts.map +1 -0
  90. package/dist/{marquee.d.mts → components/Marquee.d.ts} +3 -3
  91. package/dist/components/Marquee.d.ts.map +1 -0
  92. package/dist/{number-input.d.mts → components/NumberInput.d.ts} +10 -12
  93. package/dist/components/NumberInput.d.ts.map +1 -0
  94. package/dist/components/NxImage.d.ts +13 -0
  95. package/dist/components/NxImage.d.ts.map +1 -0
  96. package/dist/{pagination.d.mts → components/Pagination.d.ts} +6 -7
  97. package/dist/components/Pagination.d.ts.map +1 -0
  98. package/dist/components/Popover.d.ts +23 -0
  99. package/dist/components/Popover.d.ts.map +1 -0
  100. package/dist/{price-input.d.mts → components/PriceInput.d.ts} +5 -6
  101. package/dist/components/PriceInput.d.ts.map +1 -0
  102. package/dist/components/Progress.d.ts +17 -0
  103. package/dist/components/Progress.d.ts.map +1 -0
  104. package/dist/{radio-group.d.mts → components/RadioGroup.d.ts} +6 -7
  105. package/dist/components/RadioGroup.d.ts.map +1 -0
  106. package/dist/{select.d.mts → components/Select.d.ts} +7 -10
  107. package/dist/components/Select.d.ts.map +1 -0
  108. package/dist/{skeleton.d.mts → components/Skeleton.d.ts} +3 -3
  109. package/dist/components/Skeleton.d.ts.map +1 -0
  110. package/dist/components/Slider.d.ts +19 -0
  111. package/dist/components/Slider.d.ts.map +1 -0
  112. package/dist/{spinner.d.mts → components/Spinner.d.ts} +3 -3
  113. package/dist/components/Spinner.d.ts.map +1 -0
  114. package/dist/components/Stepper.d.ts +19 -0
  115. package/dist/components/Stepper.d.ts.map +1 -0
  116. package/dist/{switch.d.mts → components/Switch.d.ts} +5 -6
  117. package/dist/components/Switch.d.ts.map +1 -0
  118. package/dist/{tab.d.mts → components/Tab.d.ts} +7 -9
  119. package/dist/components/Tab.d.ts.map +1 -0
  120. package/dist/components/TagInput.d.ts +20 -0
  121. package/dist/components/TagInput.d.ts.map +1 -0
  122. package/dist/components/TextArea.d.ts +18 -0
  123. package/dist/components/TextArea.d.ts.map +1 -0
  124. package/dist/{text-input.d.mts → components/TextInput.d.ts} +5 -6
  125. package/dist/components/TextInput.d.ts.map +1 -0
  126. package/dist/{theme-provider.d.mts → components/ThemeProvider.d.ts} +3 -3
  127. package/dist/components/ThemeProvider.d.ts.map +1 -0
  128. package/dist/components/ToggleGroup.d.ts +35 -0
  129. package/dist/components/ToggleGroup.d.ts.map +1 -0
  130. package/dist/{tooltip.d.mts → components/Tooltip.d.ts} +6 -10
  131. package/dist/components/Tooltip.d.ts.map +1 -0
  132. package/dist/{virtual-scroll.d.mts → components/VirtualScroll.d.ts} +4 -4
  133. package/dist/components/VirtualScroll.d.ts.map +1 -0
  134. package/dist/date-picker.js +12 -0
  135. package/dist/date-picker.mjs +3 -0
  136. package/dist/dropdown-menu.js +32 -0
  137. package/dist/dropdown-menu.mjs +3 -0
  138. package/dist/empty-state.js +16 -0
  139. package/dist/empty-state.mjs +3 -0
  140. package/dist/hooks/useCheckDevice.d.ts +4 -4
  141. package/dist/hooks/useCheckDevice.d.ts.map +1 -0
  142. package/dist/hooks/useClickOutside.d.ts +2 -2
  143. package/dist/hooks/useClickOutside.d.ts.map +1 -0
  144. package/dist/hooks/useDraggableBottomSheet.d.ts +3 -3
  145. package/dist/hooks/useDraggableBottomSheet.d.ts.map +1 -0
  146. package/dist/hooks/useDraggableWindow.d.ts +5 -7
  147. package/dist/hooks/useDraggableWindow.d.ts.map +1 -0
  148. package/dist/hooks/useInView.d.ts +3 -3
  149. package/dist/hooks/useInView.d.ts.map +1 -0
  150. package/dist/hooks/useModal.d.ts +48 -2
  151. package/dist/hooks/useModal.d.ts.map +1 -0
  152. package/dist/index.d.ts +100 -77
  153. package/dist/index.d.ts.map +1 -0
  154. package/dist/index.js +269 -157
  155. package/dist/index.mjs +30 -18
  156. package/dist/modal/Modal.d.ts +52 -0
  157. package/dist/modal/Modal.d.ts.map +1 -0
  158. package/dist/modal/components/ModalComponent.d.ts +22 -0
  159. package/dist/modal/components/ModalComponent.d.ts.map +1 -0
  160. package/dist/modal/components/ModalContainer.d.ts +9 -0
  161. package/dist/modal/components/ModalContainer.d.ts.map +1 -0
  162. package/dist/modal/components/ModalPortal.d.ts +8 -0
  163. package/dist/modal/components/ModalPortal.d.ts.map +1 -0
  164. package/dist/modal/components/ModalPortalTarget.d.ts +7 -0
  165. package/dist/modal/components/ModalPortalTarget.d.ts.map +1 -0
  166. package/dist/modal/components/ModalTemplate.d.ts +20 -0
  167. package/dist/modal/components/ModalTemplate.d.ts.map +1 -0
  168. package/dist/modal/components/ModalTemplate.variants.d.ts +29 -0
  169. package/dist/modal/components/ModalTemplate.variants.d.ts.map +1 -0
  170. package/dist/modal/constants.d.ts +3 -0
  171. package/dist/modal/constants.d.ts.map +1 -0
  172. package/dist/modal/index.d.ts +11 -82
  173. package/dist/modal/index.d.ts.map +1 -0
  174. package/dist/modal/index.js +12 -12
  175. package/dist/modal/index.mjs +3 -3
  176. package/dist/modal/types.d.ts +90 -0
  177. package/dist/modal/types.d.ts.map +1 -0
  178. package/dist/number-input.js +4 -4
  179. package/dist/number-input.mjs +1 -1
  180. package/dist/nx-image.js +12 -0
  181. package/dist/nx-image.mjs +3 -0
  182. package/dist/progress.js +16 -0
  183. package/dist/progress.mjs +3 -0
  184. package/dist/schemas/_all.json +840 -13
  185. package/dist/schemas/accordion.d.ts +67 -0
  186. package/dist/schemas/accordion.d.ts.map +1 -0
  187. package/dist/schemas/alert.d.ts +30 -0
  188. package/dist/schemas/alert.d.ts.map +1 -0
  189. package/dist/schemas/alert.json +49 -0
  190. package/dist/schemas/avatar.d.ts +30 -0
  191. package/dist/schemas/avatar.d.ts.map +1 -0
  192. package/dist/schemas/badge.d.ts +33 -0
  193. package/dist/schemas/badge.d.ts.map +1 -0
  194. package/dist/schemas/badge.json +76 -0
  195. package/dist/schemas/breadcrumb.d.ts +38 -0
  196. package/dist/schemas/breadcrumb.d.ts.map +1 -0
  197. package/dist/schemas/breadcrumb.json +47 -0
  198. package/dist/schemas/button.d.ts +42 -0
  199. package/dist/schemas/button.d.ts.map +1 -0
  200. package/dist/schemas/carousel.d.ts +48 -0
  201. package/dist/schemas/carousel.d.ts.map +1 -0
  202. package/dist/schemas/checkbox.d.ts +48 -0
  203. package/dist/schemas/checkbox.d.ts.map +1 -0
  204. package/dist/schemas/chip.d.ts +30 -0
  205. package/dist/schemas/chip.d.ts.map +1 -0
  206. package/dist/schemas/client-only.d.ts +12 -0
  207. package/dist/schemas/client-only.d.ts.map +1 -0
  208. package/dist/schemas/countdown.d.ts +52 -0
  209. package/dist/schemas/countdown.d.ts.map +1 -0
  210. package/dist/schemas/counter.d.ts +36 -0
  211. package/dist/schemas/counter.d.ts.map +1 -0
  212. package/dist/schemas/data-list.d.ts +33 -0
  213. package/dist/schemas/data-list.d.ts.map +1 -0
  214. package/dist/schemas/date-picker.d.ts +36 -0
  215. package/dist/schemas/date-picker.d.ts.map +1 -0
  216. package/dist/schemas/datePicker.json +56 -0
  217. package/dist/schemas/divider.d.ts +21 -0
  218. package/dist/schemas/divider.d.ts.map +1 -0
  219. package/dist/schemas/drawer.d.ts +95 -0
  220. package/dist/schemas/drawer.d.ts.map +1 -0
  221. package/dist/schemas/dropdown-menu.d.ts +64 -0
  222. package/dist/schemas/dropdown-menu.d.ts.map +1 -0
  223. package/dist/schemas/dropdownMenu.json +83 -0
  224. package/dist/schemas/ellipsis.d.ts +30 -0
  225. package/dist/schemas/ellipsis.d.ts.map +1 -0
  226. package/dist/schemas/empty-state.d.ts +27 -0
  227. package/dist/schemas/empty-state.d.ts.map +1 -0
  228. package/dist/schemas/emptyState.json +44 -0
  229. package/dist/schemas/error-boundary.d.ts +15 -0
  230. package/dist/schemas/error-boundary.d.ts.map +1 -0
  231. package/dist/schemas/index.d.ts +47 -0
  232. package/dist/schemas/index.d.ts.map +1 -0
  233. package/dist/schemas/infinite-scroll.d.ts +39 -0
  234. package/dist/schemas/infinite-scroll.d.ts.map +1 -0
  235. package/dist/schemas/marquee.d.ts +27 -0
  236. package/dist/schemas/marquee.d.ts.map +1 -0
  237. package/dist/schemas/modal.d.ts +176 -0
  238. package/dist/schemas/modal.d.ts.map +1 -0
  239. package/dist/schemas/number-input.d.ts +72 -0
  240. package/dist/schemas/number-input.d.ts.map +1 -0
  241. package/dist/schemas/numberInput.json +27 -8
  242. package/dist/schemas/nx-image.d.ts +33 -0
  243. package/dist/schemas/nx-image.d.ts.map +1 -0
  244. package/dist/schemas/nxImage.json +56 -0
  245. package/dist/schemas/pagination.d.ts +27 -0
  246. package/dist/schemas/pagination.d.ts.map +1 -0
  247. package/dist/schemas/popover.d.ts +39 -0
  248. package/dist/schemas/popover.d.ts.map +1 -0
  249. package/dist/schemas/price-input.d.ts +63 -0
  250. package/dist/schemas/price-input.d.ts.map +1 -0
  251. package/dist/schemas/progress.d.ts +30 -0
  252. package/dist/schemas/progress.d.ts.map +1 -0
  253. package/dist/schemas/progress.json +63 -0
  254. package/dist/schemas/radio-group.d.ts +61 -0
  255. package/dist/schemas/radio-group.d.ts.map +1 -0
  256. package/dist/schemas/select.d.ts +52 -0
  257. package/dist/schemas/select.d.ts.map +1 -0
  258. package/dist/schemas/skeleton.d.ts +27 -0
  259. package/dist/schemas/skeleton.d.ts.map +1 -0
  260. package/dist/schemas/slider.d.ts +45 -0
  261. package/dist/schemas/slider.d.ts.map +1 -0
  262. package/dist/schemas/slider.json +78 -0
  263. package/dist/schemas/spinner.d.ts +21 -0
  264. package/dist/schemas/spinner.d.ts.map +1 -0
  265. package/dist/schemas/stepper.d.ts +39 -0
  266. package/dist/schemas/stepper.d.ts.map +1 -0
  267. package/dist/schemas/stepper.json +73 -0
  268. package/dist/schemas/switch.d.ts +33 -0
  269. package/dist/schemas/switch.d.ts.map +1 -0
  270. package/dist/schemas/tab.d.ts +61 -0
  271. package/dist/schemas/tab.d.ts.map +1 -0
  272. package/dist/schemas/table.d.ts +113 -0
  273. package/dist/schemas/table.d.ts.map +1 -0
  274. package/dist/schemas/tag-input.d.ts +39 -0
  275. package/dist/schemas/tag-input.d.ts.map +1 -0
  276. package/dist/schemas/tagInput.json +70 -0
  277. package/dist/schemas/text-area.d.ts +69 -0
  278. package/dist/schemas/text-area.d.ts.map +1 -0
  279. package/dist/schemas/text-input.d.ts +78 -0
  280. package/dist/schemas/text-input.d.ts.map +1 -0
  281. package/dist/schemas/textArea.json +26 -1
  282. package/dist/schemas/theme-provider.d.ts +36 -0
  283. package/dist/schemas/theme-provider.d.ts.map +1 -0
  284. package/dist/schemas/toast.d.ts +91 -0
  285. package/dist/schemas/toast.d.ts.map +1 -0
  286. package/dist/schemas/toggle-group.d.ts +58 -0
  287. package/dist/schemas/toggle-group.d.ts.map +1 -0
  288. package/dist/schemas/toggleGroup.json +88 -0
  289. package/dist/schemas/tooltip.d.ts +33 -0
  290. package/dist/schemas/tooltip.d.ts.map +1 -0
  291. package/dist/schemas/virtual-scroll.d.ts +67 -0
  292. package/dist/schemas/virtual-scroll.d.ts.map +1 -0
  293. package/dist/schemas.js +177 -7
  294. package/dist/schemas.mjs +166 -8
  295. package/dist/slider.js +16 -0
  296. package/dist/slider.mjs +3 -0
  297. package/dist/stepper.js +16 -0
  298. package/dist/stepper.mjs +3 -0
  299. package/dist/styles/.generated/built.d.ts +3 -0
  300. package/dist/styles/.generated/built.d.ts.map +1 -0
  301. package/dist/styles/inject-layer.d.ts +2 -0
  302. package/dist/styles/inject-layer.d.ts.map +1 -0
  303. package/dist/styles/inject.d.ts +2 -0
  304. package/dist/styles/inject.d.ts.map +1 -0
  305. package/dist/styles/layer.js +2 -2
  306. package/dist/styles/layer.mjs +1 -1
  307. package/dist/styles.css +1655 -162
  308. package/dist/styles.js +2 -2
  309. package/dist/styles.layered.css +1655 -162
  310. package/dist/styles.mjs +1 -1
  311. package/dist/table/Table.d.ts +20 -0
  312. package/dist/table/Table.d.ts.map +1 -0
  313. package/dist/table/TableHighlightContext.d.ts +11 -0
  314. package/dist/table/TableHighlightContext.d.ts.map +1 -0
  315. package/dist/table/TableRow.d.ts +17 -0
  316. package/dist/table/TableRow.d.ts.map +1 -0
  317. package/dist/table/TdColumn.d.ts +14 -0
  318. package/dist/table/TdColumn.d.ts.map +1 -0
  319. package/dist/table/index.d.ts +23 -0
  320. package/dist/table/index.d.ts.map +1 -0
  321. package/dist/table/types.d.ts +27 -0
  322. package/dist/table/types.d.ts.map +1 -0
  323. package/dist/table.js +7 -7
  324. package/dist/table.mjs +1 -1
  325. package/dist/tag-input.js +16 -0
  326. package/dist/tag-input.mjs +3 -0
  327. package/dist/text-area.js +3 -3
  328. package/dist/text-area.mjs +1 -1
  329. package/dist/toast/Toast.d.ts +8 -0
  330. package/dist/toast/Toast.d.ts.map +1 -0
  331. package/dist/toast/index.d.ts +6 -0
  332. package/dist/toast/index.d.ts.map +1 -0
  333. package/dist/{toast.d.ts → toast/useToast.d.ts} +4 -14
  334. package/dist/toast/useToast.d.ts.map +1 -0
  335. package/dist/toggle-group.js +16 -0
  336. package/dist/toggle-group.mjs +3 -0
  337. package/dist/utils/cn.d.ts +3 -5
  338. package/dist/utils/cn.d.ts.map +1 -0
  339. package/dist/utils/scroll.d.ts +3 -4
  340. package/dist/utils/scroll.d.ts.map +1 -0
  341. package/package.json +104 -38
  342. package/scripts/setup-cursor-rules.cjs +15 -1
  343. package/dist/accordion.d.ts +0 -28
  344. package/dist/avatar.d.ts +0 -17
  345. package/dist/button.d.ts +0 -17
  346. package/dist/carousel.d.ts +0 -36
  347. package/dist/checkbox.d.ts +0 -21
  348. package/dist/chip.d.ts +0 -16
  349. package/dist/chunks/chunk-26BUGBOY.mjs +0 -57
  350. package/dist/chunks/chunk-CLGH2RTS.js +0 -7
  351. package/dist/chunks/chunk-ECVAVQUY.mjs +0 -243
  352. package/dist/chunks/chunk-UPCWJWXR.mjs +0 -5
  353. package/dist/chunks/chunk-WR55D4ZS.js +0 -80
  354. package/dist/client-only.d.ts +0 -13
  355. package/dist/countdown.d.ts +0 -27
  356. package/dist/counter.d.ts +0 -15
  357. package/dist/data-list.d.ts +0 -33
  358. package/dist/divider.d.ts +0 -14
  359. package/dist/drawer.d.ts +0 -42
  360. package/dist/ellipsis.d.ts +0 -16
  361. package/dist/error-boundary.d.ts +0 -20
  362. package/dist/hooks/useCheckDevice.d.mts +0 -47
  363. package/dist/hooks/useClickOutside.d.mts +0 -12
  364. package/dist/hooks/useDraggableBottomSheet.d.mts +0 -24
  365. package/dist/hooks/useDraggableWindow.d.mts +0 -21
  366. package/dist/hooks/useInView.d.mts +0 -14
  367. package/dist/hooks/useModal.d.mts +0 -2
  368. package/dist/index.d.mts +0 -77
  369. package/dist/infinite-scroll.d.ts +0 -26
  370. package/dist/marquee.d.ts +0 -12
  371. package/dist/modal/index.d.mts +0 -87
  372. package/dist/number-input.d.ts +0 -38
  373. package/dist/pagination.d.ts +0 -22
  374. package/dist/popover.d.mts +0 -25
  375. package/dist/popover.d.ts +0 -25
  376. package/dist/price-input.d.ts +0 -36
  377. package/dist/radio-group.d.ts +0 -29
  378. package/dist/schemas.d.mts +0 -1689
  379. package/dist/schemas.d.ts +0 -1689
  380. package/dist/select.d.ts +0 -31
  381. package/dist/skeleton.d.ts +0 -15
  382. package/dist/spinner.d.ts +0 -9
  383. package/dist/styles/layer.d.mts +0 -3
  384. package/dist/styles/layer.d.ts +0 -3
  385. package/dist/styles.d.mts +0 -3
  386. package/dist/styles.d.ts +0 -3
  387. package/dist/switch.d.ts +0 -15
  388. package/dist/tab.d.ts +0 -36
  389. package/dist/table.d.mts +0 -80
  390. package/dist/table.d.ts +0 -80
  391. package/dist/text-area.d.mts +0 -15
  392. package/dist/text-area.d.ts +0 -15
  393. package/dist/text-input.d.ts +0 -21
  394. package/dist/theme-provider.d.ts +0 -25
  395. package/dist/toast.d.mts +0 -42
  396. package/dist/tooltip.d.ts +0 -24
  397. package/dist/useModal-BsGIcP8t.d.mts +0 -128
  398. package/dist/useModal-BsGIcP8t.d.ts +0 -128
  399. package/dist/utils/cn.d.mts +0 -5
  400. package/dist/utils/scroll.d.mts +0 -4
  401. package/dist/virtual-scroll.d.ts +0 -34
  402. package/dist/chunks/{chunk-3VFBPFZF.mjs → chunk-CWMLTXOH.mjs} +2 -2
  403. package/dist/chunks/{chunk-U53UA76K.js → chunk-HFBTS42N.js} +2 -2
@@ -0,0 +1,150 @@
1
+ import { cn } from './chunk-MCKOWMLS.mjs';
2
+ import * as React from 'react';
3
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
+ import { cva } from 'class-variance-authority';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var toggleGroupVariants = cva("nexus-toggle-group", {
8
+ variants: {
9
+ variant: {
10
+ default: "nexus-toggle-group--default",
11
+ outline: "nexus-toggle-group--outline"
12
+ },
13
+ size: {
14
+ sm: "nexus-toggle-group--sm",
15
+ md: "nexus-toggle-group--md",
16
+ lg: "nexus-toggle-group--lg"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ size: "md"
22
+ }
23
+ });
24
+ var ToggleGroup = React.forwardRef(
25
+ ({ className, variant, size, items, disabled, ...props }, ref) => {
26
+ const rootRef = React.useRef(null);
27
+ const [animated, setAnimated] = React.useState(false);
28
+ const [pos, setPos] = React.useState(null);
29
+ const combinedRef = React.useCallback(
30
+ (node) => {
31
+ rootRef.current = node;
32
+ if (typeof ref === "function") ref(node);
33
+ else if (ref) ref.current = node;
34
+ },
35
+ [ref]
36
+ );
37
+ const currentValue = props.type === "multiple" ? props.value ?? props.defaultValue : props.value ?? props.defaultValue;
38
+ const [trackedValue, setTrackedValue] = React.useState(currentValue);
39
+ React.useEffect(() => {
40
+ if (currentValue !== void 0) setTrackedValue(currentValue);
41
+ }, [currentValue]);
42
+ const isDefault = variant !== "outline";
43
+ React.useLayoutEffect(() => {
44
+ const root = rootRef.current;
45
+ if (!root || !isDefault) return;
46
+ const activeVal = Array.isArray(trackedValue) ? trackedValue[0] : trackedValue;
47
+ if (!activeVal) {
48
+ setPos(null);
49
+ return;
50
+ }
51
+ const idx = items.findIndex((item) => item.value === activeVal);
52
+ if (idx === -1) {
53
+ setPos(null);
54
+ return;
55
+ }
56
+ const itemEls = root.querySelectorAll(
57
+ ".nexus-toggle-group__item"
58
+ );
59
+ const el = itemEls[idx];
60
+ if (!el) return;
61
+ const rootRect = root.getBoundingClientRect();
62
+ const elRect = el.getBoundingClientRect();
63
+ setPos({
64
+ width: elRect.width,
65
+ height: elRect.height,
66
+ x: elRect.left - rootRect.left,
67
+ y: elRect.top - rootRect.top
68
+ });
69
+ }, [trackedValue, items, isDefault]);
70
+ React.useEffect(() => {
71
+ const frame = requestAnimationFrame(() => {
72
+ requestAnimationFrame(() => setAnimated(true));
73
+ });
74
+ return () => cancelAnimationFrame(frame);
75
+ }, []);
76
+ const handleSingleChange = React.useCallback(
77
+ (val) => {
78
+ setTrackedValue(val);
79
+ if (props.type !== "multiple") {
80
+ props.onValueChange?.(val);
81
+ }
82
+ },
83
+ [props.type, props.onValueChange]
84
+ );
85
+ const handleMultipleChange = React.useCallback(
86
+ (val) => {
87
+ setTrackedValue(val);
88
+ if (props.type === "multiple") {
89
+ props.onValueChange?.(val);
90
+ }
91
+ },
92
+ [props.type, props.onValueChange]
93
+ );
94
+ const rootProps = props.type === "multiple" ? {
95
+ type: "multiple",
96
+ value: props.value,
97
+ defaultValue: props.defaultValue,
98
+ onValueChange: handleMultipleChange
99
+ } : {
100
+ type: "single",
101
+ value: props.value,
102
+ defaultValue: props.defaultValue,
103
+ onValueChange: handleSingleChange
104
+ };
105
+ const indicatorStyle = pos ? {
106
+ width: pos.width,
107
+ height: pos.height,
108
+ transform: `translate(${pos.x}px, ${pos.y}px)`,
109
+ opacity: 1
110
+ } : { opacity: 0 };
111
+ return /* @__PURE__ */ jsxs(
112
+ ToggleGroupPrimitive.Root,
113
+ {
114
+ ref: combinedRef,
115
+ className: cn(toggleGroupVariants({ variant, size }), className),
116
+ disabled,
117
+ ...rootProps,
118
+ children: [
119
+ isDefault && /* @__PURE__ */ jsx(
120
+ "span",
121
+ {
122
+ className: cn(
123
+ "nexus-toggle-group__indicator",
124
+ animated && "nexus-toggle-group__indicator--animated"
125
+ ),
126
+ style: indicatorStyle,
127
+ "aria-hidden": true
128
+ }
129
+ ),
130
+ items.map((item) => /* @__PURE__ */ jsxs(
131
+ ToggleGroupPrimitive.Item,
132
+ {
133
+ value: item.value,
134
+ disabled: item.disabled,
135
+ className: "nexus-toggle-group__item",
136
+ children: [
137
+ item.icon && /* @__PURE__ */ jsx("span", { className: "nexus-toggle-group__icon", children: item.icon }),
138
+ item.label && /* @__PURE__ */ jsx("span", { children: item.label })
139
+ ]
140
+ },
141
+ item.value
142
+ ))
143
+ ]
144
+ }
145
+ );
146
+ }
147
+ );
148
+ ToggleGroup.displayName = "ToggleGroup";
149
+
150
+ export { ToggleGroup, toggleGroupVariants };
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
4
+ var React = require('react');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var emptyStateVariants = classVarianceAuthority.cva("nexus-empty-state", {
29
+ variants: {
30
+ size: {
31
+ sm: "nexus-empty-state--sm",
32
+ md: "nexus-empty-state--md",
33
+ lg: "nexus-empty-state--lg"
34
+ }
35
+ },
36
+ defaultVariants: { size: "md" }
37
+ });
38
+ var DefaultIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4", strokeLinecap: "round", strokeLinejoin: "round" }) });
39
+ var EmptyState = React__namespace.forwardRef(
40
+ ({ className, size, icon, title, description, action, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
41
+ "div",
42
+ {
43
+ ref,
44
+ className: chunkCZC76ZD5_js.cn(emptyStateVariants({ size }), className),
45
+ ...props,
46
+ children: [
47
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-empty-state__icon", children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, { className: "nexus-empty-state__default-icon" }) }),
48
+ title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "nexus-empty-state__title", children: title }),
49
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "nexus-empty-state__description", children: description }),
50
+ children,
51
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-empty-state__action", children: action })
52
+ ]
53
+ }
54
+ )
55
+ );
56
+ EmptyState.displayName = "EmptyState";
57
+
58
+ exports.EmptyState = EmptyState;
59
+ exports.emptyStateVariants = emptyStateVariants;
@@ -0,0 +1,109 @@
1
+ 'use strict';
2
+
3
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
4
+ var React = require('react');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var badgeVariants = classVarianceAuthority.cva("nexus-badge", {
29
+ variants: {
30
+ variant: {
31
+ danger: "nexus-badge--danger",
32
+ primary: "nexus-badge--primary",
33
+ secondary: "nexus-badge--secondary",
34
+ info: "nexus-badge--info",
35
+ success: "nexus-badge--success",
36
+ warning: "nexus-badge--warning"
37
+ },
38
+ size: {
39
+ sm: "nexus-badge--sm",
40
+ md: "nexus-badge--md",
41
+ lg: "nexus-badge--lg"
42
+ }
43
+ },
44
+ defaultVariants: {
45
+ variant: "danger",
46
+ size: "md"
47
+ }
48
+ });
49
+ var Badge = React__namespace.forwardRef(
50
+ ({
51
+ className,
52
+ children,
53
+ variant,
54
+ size,
55
+ count,
56
+ max = 99,
57
+ dot = false,
58
+ showZero = false,
59
+ offset,
60
+ style,
61
+ ...props
62
+ }, ref) => {
63
+ const displayCount = count !== void 0 && max !== void 0 && count > max ? `${max}+` : count;
64
+ const isHidden = !dot && (count === void 0 || count === 0 && !showZero);
65
+ const badgeStyle = {
66
+ ...style,
67
+ ...offset ? { "--nexus-badge-offset-x": `${offset[0]}px`, "--nexus-badge-offset-y": `${offset[1]}px` } : {}
68
+ };
69
+ if (!children) {
70
+ if (isHidden) return null;
71
+ return /* @__PURE__ */ jsxRuntime.jsx(
72
+ "span",
73
+ {
74
+ ref,
75
+ className: chunkCZC76ZD5_js.cn(
76
+ badgeVariants({ variant, size }),
77
+ dot && "nexus-badge--dot",
78
+ className
79
+ ),
80
+ style: badgeStyle,
81
+ ...props,
82
+ children: !dot && displayCount
83
+ }
84
+ );
85
+ }
86
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nexus-badge-wrapper", style: { position: "relative", display: "inline-flex" }, children: [
87
+ children,
88
+ !isHidden && /* @__PURE__ */ jsxRuntime.jsx(
89
+ "span",
90
+ {
91
+ ref,
92
+ className: chunkCZC76ZD5_js.cn(
93
+ badgeVariants({ variant, size }),
94
+ dot && "nexus-badge--dot",
95
+ "nexus-badge--positioned",
96
+ className
97
+ ),
98
+ style: badgeStyle,
99
+ ...props,
100
+ children: !dot && displayCount
101
+ }
102
+ )
103
+ ] });
104
+ }
105
+ );
106
+ Badge.displayName = "Badge";
107
+
108
+ exports.Badge = Badge;
109
+ exports.badgeVariants = badgeVariants;
@@ -0,0 +1,108 @@
1
+ 'use strict';
2
+
3
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
4
+ var React = require('react');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var stepperVariants = classVarianceAuthority.cva("nexus-stepper", {
29
+ variants: {
30
+ orientation: {
31
+ horizontal: "nexus-stepper--horizontal",
32
+ vertical: "nexus-stepper--vertical"
33
+ },
34
+ size: {
35
+ sm: "nexus-stepper--sm",
36
+ md: "nexus-stepper--md"
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ orientation: "horizontal",
41
+ size: "md"
42
+ }
43
+ });
44
+ var CheckIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.5 8.5l3 3 6-6", strokeLinecap: "round", strokeLinejoin: "round" }) });
45
+ var Stepper = React__namespace.forwardRef(
46
+ ({ className, orientation, size, steps, current = 0, status = "process", ...props }, ref) => {
47
+ const isHorizontal = orientation !== "vertical";
48
+ return /* @__PURE__ */ jsxRuntime.jsx(
49
+ "div",
50
+ {
51
+ ref,
52
+ className: chunkCZC76ZD5_js.cn(stepperVariants({ orientation, size }), className),
53
+ "aria-label": "Progress",
54
+ ...props,
55
+ children: steps.map((step, i) => {
56
+ const state = i < current ? "completed" : i === current ? status === "error" ? "error" : "active" : "pending";
57
+ const isFirst = i === 0;
58
+ const isLast = i === steps.length - 1;
59
+ const prevCompleted = i <= current;
60
+ const nextCompleted = i < current;
61
+ return /* @__PURE__ */ jsxRuntime.jsxs(
62
+ "div",
63
+ {
64
+ className: chunkCZC76ZD5_js.cn("nexus-stepper__step", `nexus-stepper__step--${state}`),
65
+ children: [
66
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-stepper__indicator-wrap", children: isHorizontal ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
67
+ /* @__PURE__ */ jsxRuntime.jsx(
68
+ "div",
69
+ {
70
+ className: chunkCZC76ZD5_js.cn(
71
+ "nexus-stepper__connector",
72
+ isFirst && "nexus-stepper__connector--hidden",
73
+ prevCompleted && "nexus-stepper__connector--completed"
74
+ )
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-stepper__indicator", children: state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "nexus-stepper__check" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: i + 1 }) }),
78
+ /* @__PURE__ */ jsxRuntime.jsx(
79
+ "div",
80
+ {
81
+ className: chunkCZC76ZD5_js.cn(
82
+ "nexus-stepper__connector",
83
+ isLast && "nexus-stepper__connector--hidden",
84
+ nextCompleted && "nexus-stepper__connector--completed"
85
+ )
86
+ }
87
+ )
88
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
89
+ !isFirst && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkCZC76ZD5_js.cn("nexus-stepper__connector", prevCompleted && "nexus-stepper__connector--completed") }),
90
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-stepper__indicator", children: state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "nexus-stepper__check" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: i + 1 }) })
91
+ ] }) }),
92
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nexus-stepper__content", children: [
93
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-stepper__label", children: step.label }),
94
+ step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-stepper__description", children: step.description })
95
+ ] })
96
+ ]
97
+ },
98
+ i
99
+ );
100
+ })
101
+ }
102
+ );
103
+ }
104
+ );
105
+ Stepper.displayName = "Stepper";
106
+
107
+ exports.Stepper = Stepper;
108
+ exports.stepperVariants = stepperVariants;
@@ -0,0 +1,160 @@
1
+ 'use strict';
2
+
3
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
4
+ var React = require('react');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var textAreaVariants = classVarianceAuthority.cva("nexus-textarea", {
29
+ variants: {
30
+ size: {
31
+ lg: "nexus-textarea--lg",
32
+ md: "nexus-textarea--md"
33
+ },
34
+ state: {
35
+ default: "nexus-textarea--default",
36
+ error: "nexus-textarea--error"
37
+ }
38
+ },
39
+ defaultVariants: { size: "lg", state: "default" }
40
+ });
41
+ var TextArea = React__namespace.forwardRef(
42
+ ({
43
+ className,
44
+ size,
45
+ error,
46
+ label,
47
+ description,
48
+ showCount,
49
+ resize = "default",
50
+ maxLength,
51
+ onValueChange,
52
+ onChange,
53
+ value: controlledValue,
54
+ defaultValue,
55
+ disabled,
56
+ id,
57
+ ...props
58
+ }, ref) => {
59
+ const fallbackId = React__namespace.useRef(
60
+ `nexus-ta-${Math.random().toString(36).slice(2, 9)}`
61
+ );
62
+ const inputId = id || fallbackId.current;
63
+ const textareaRef = React__namespace.useRef(null);
64
+ const setRef = React__namespace.useCallback(
65
+ (node) => {
66
+ textareaRef.current = node;
67
+ if (typeof ref === "function") ref(node);
68
+ else if (ref)
69
+ ref.current = node;
70
+ },
71
+ [ref]
72
+ );
73
+ const isControlled = controlledValue !== void 0;
74
+ const [internalValue, setInternalValue] = React__namespace.useState(
75
+ () => defaultValue != null ? String(defaultValue) : ""
76
+ );
77
+ const currentValue = isControlled ? String(controlledValue) : internalValue;
78
+ const charCount = currentValue.length;
79
+ const isOverLimit = !!(maxLength && charCount > maxLength);
80
+ const state = error || isOverLimit ? "error" : "default";
81
+ const hasField = !!(label || description || showCount);
82
+ const autoResize = React__namespace.useCallback(() => {
83
+ const el = textareaRef.current;
84
+ if (!el || resize !== "auto") return;
85
+ el.style.height = "auto";
86
+ el.style.height = `${el.scrollHeight}px`;
87
+ }, [resize]);
88
+ React__namespace.useEffect(() => {
89
+ autoResize();
90
+ }, [currentValue, autoResize]);
91
+ const handleChange = React__namespace.useCallback(
92
+ (e) => {
93
+ if (!isControlled) setInternalValue(e.target.value);
94
+ onValueChange?.(e.target.value);
95
+ onChange?.(e);
96
+ },
97
+ [isControlled, onValueChange, onChange]
98
+ );
99
+ const resizeClass = resize === "default" ? "nexus-textarea--resize-default" : resize === "auto" ? "nexus-textarea--resize-auto" : "";
100
+ const textarea = /* @__PURE__ */ jsxRuntime.jsx(
101
+ "textarea",
102
+ {
103
+ ref: setRef,
104
+ id: label ? inputId : id,
105
+ className: chunkCZC76ZD5_js.cn(
106
+ textAreaVariants({ size, state }),
107
+ disabled && "nexus-textarea--disabled",
108
+ resizeClass,
109
+ !hasField && className
110
+ ),
111
+ maxLength: showCount ? void 0 : maxLength,
112
+ disabled,
113
+ "aria-invalid": error || isOverLimit || void 0,
114
+ "aria-describedby": description ? `${inputId}-desc` : void 0,
115
+ value: isControlled ? controlledValue : void 0,
116
+ defaultValue: !isControlled ? defaultValue : void 0,
117
+ onChange: handleChange,
118
+ ...props
119
+ }
120
+ );
121
+ if (!hasField) return textarea;
122
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkCZC76ZD5_js.cn("nexus-textarea-field", className), children: [
123
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "nexus-textarea-field__label", htmlFor: inputId, children: label }),
124
+ textarea,
125
+ (description || showCount && maxLength) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nexus-textarea-field__footer", children: [
126
+ description && /* @__PURE__ */ jsxRuntime.jsx(
127
+ "p",
128
+ {
129
+ id: `${inputId}-desc`,
130
+ className: chunkCZC76ZD5_js.cn(
131
+ "nexus-textarea-field__description",
132
+ (error || isOverLimit) && "nexus-textarea-field__description--error"
133
+ ),
134
+ children: description
135
+ }
136
+ ),
137
+ showCount && maxLength && /* @__PURE__ */ jsxRuntime.jsxs(
138
+ "span",
139
+ {
140
+ className: chunkCZC76ZD5_js.cn(
141
+ "nexus-textarea-field__count",
142
+ isOverLimit && "nexus-textarea-field__count--error"
143
+ ),
144
+ "aria-live": "polite",
145
+ "aria-atomic": "true",
146
+ children: [
147
+ charCount,
148
+ "/",
149
+ maxLength
150
+ ]
151
+ }
152
+ )
153
+ ] })
154
+ ] });
155
+ }
156
+ );
157
+ TextArea.displayName = "TextArea";
158
+
159
+ exports.TextArea = TextArea;
160
+ exports.textAreaVariants = textAreaVariants;
@@ -0,0 +1,36 @@
1
+ import { cn } from './chunk-MCKOWMLS.mjs';
2
+ import * as React from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var emptyStateVariants = cva("nexus-empty-state", {
7
+ variants: {
8
+ size: {
9
+ sm: "nexus-empty-state--sm",
10
+ md: "nexus-empty-state--md",
11
+ lg: "nexus-empty-state--lg"
12
+ }
13
+ },
14
+ defaultVariants: { size: "md" }
15
+ });
16
+ var DefaultIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx("path", { d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4", strokeLinecap: "round", strokeLinejoin: "round" }) });
17
+ var EmptyState = React.forwardRef(
18
+ ({ className, size, icon, title, description, action, children, ...props }, ref) => /* @__PURE__ */ jsxs(
19
+ "div",
20
+ {
21
+ ref,
22
+ className: cn(emptyStateVariants({ size }), className),
23
+ ...props,
24
+ children: [
25
+ /* @__PURE__ */ jsx("div", { className: "nexus-empty-state__icon", children: icon ?? /* @__PURE__ */ jsx(DefaultIcon, { className: "nexus-empty-state__default-icon" }) }),
26
+ title && /* @__PURE__ */ jsx("h3", { className: "nexus-empty-state__title", children: title }),
27
+ description && /* @__PURE__ */ jsx("p", { className: "nexus-empty-state__description", children: description }),
28
+ children,
29
+ action && /* @__PURE__ */ jsx("div", { className: "nexus-empty-state__action", children: action })
30
+ ]
31
+ }
32
+ )
33
+ );
34
+ EmptyState.displayName = "EmptyState";
35
+
36
+ export { EmptyState, emptyStateVariants };