@nexus-cross/design-system 1.0.4-beta.1 → 1.0.4

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 (327) hide show
  1. package/cursor-rules/nexus-project-setup.mdc +167 -145
  2. package/cursor-rules/nexus-ui-api.mdc +894 -311
  3. package/cursor-rules/nexus-ui-components.mdc +179 -91
  4. package/dist/accordion.js +7 -7
  5. package/dist/accordion.mjs +2 -2
  6. package/dist/alert.d.mts +17 -0
  7. package/dist/alert.d.ts +17 -0
  8. package/dist/alert.js +16 -0
  9. package/dist/alert.mjs +3 -0
  10. package/dist/avatar.js +4 -4
  11. package/dist/avatar.mjs +2 -2
  12. package/dist/badge.d.mts +18 -0
  13. package/dist/badge.d.ts +18 -0
  14. package/dist/badge.js +16 -0
  15. package/dist/badge.mjs +3 -0
  16. package/dist/breadcrumb.d.mts +15 -0
  17. package/dist/breadcrumb.d.ts +15 -0
  18. package/dist/breadcrumb.js +12 -0
  19. package/dist/breadcrumb.mjs +3 -0
  20. package/dist/button.js +4 -4
  21. package/dist/button.mjs +2 -2
  22. package/dist/carousel.js +8 -8
  23. package/dist/carousel.mjs +2 -2
  24. package/dist/checkbox.js +5 -5
  25. package/dist/checkbox.mjs +2 -2
  26. package/dist/chip.d.mts +1 -1
  27. package/dist/chip.d.ts +1 -1
  28. package/dist/chip.js +4 -4
  29. package/dist/chip.mjs +2 -2
  30. package/dist/chunks/{chunk-5TBXVD56.js → chunk-2MC7XJSE.js} +16 -6
  31. package/dist/chunks/chunk-2N2EPBO4.js +120 -0
  32. package/dist/chunks/{chunk-BEA727LO.mjs → chunk-2RPRCWKV.mjs} +57 -26
  33. package/dist/chunks/chunk-2UPGFY6E.mjs +76 -0
  34. package/dist/chunks/{chunk-5I2VRWWU.js → chunk-2ZXDXO4I.js} +32 -38
  35. package/dist/chunks/{chunk-RLP3U52D.mjs → chunk-33UFQJIO.mjs} +22 -40
  36. package/dist/chunks/{chunk-AOVU67NI.mjs → chunk-3HHJORN7.mjs} +23 -25
  37. package/dist/chunks/{chunk-TWHDXCKR.js → chunk-3PCNRCTB.js} +8 -8
  38. package/dist/chunks/chunk-3ZWN66YH.js +53 -0
  39. package/dist/chunks/chunk-4ENXP7WH.js +224 -0
  40. package/dist/chunks/{chunk-YEGPB7A7.js → chunk-5JHJNN2K.js} +4 -4
  41. package/dist/chunks/chunk-5PQ3UCKF.js +99 -0
  42. package/dist/chunks/chunk-6BWOKTVQ.mjs +87 -0
  43. package/dist/chunks/chunk-6DBRL6NA.mjs +81 -0
  44. package/dist/chunks/{chunk-C3E7CSKG.mjs → chunk-6FMDO6TT.mjs} +7 -8
  45. package/dist/chunks/{chunk-76CY4STF.js → chunk-7G65JBTN.js} +34 -66
  46. package/dist/chunks/{chunk-GMIGQ5VP.mjs → chunk-ADO7PDLY.mjs} +15 -35
  47. package/dist/chunks/{chunk-ZINDMFOI.js → chunk-AFSEYJZT.js} +24 -32
  48. package/dist/chunks/chunk-B5O6W3Z4.mjs +73 -0
  49. package/dist/chunks/{chunk-6FHK6CBR.js → chunk-B6G5TJRO.js} +7 -8
  50. package/dist/chunks/chunk-BBLBTOP4.js +205 -0
  51. package/dist/chunks/{chunk-5XVEYVYA.js → chunk-BLGQHR3M.js} +5 -8
  52. package/dist/chunks/{chunk-LVTD2UQN.mjs → chunk-BPUQ2CO2.mjs} +2 -2
  53. package/dist/chunks/{chunk-AWBGWBFS.js → chunk-BSZ2LN6E.js} +21 -27
  54. package/dist/chunks/chunk-C2DSAJTL.js +109 -0
  55. package/dist/chunks/{chunk-KWPIEHD2.mjs → chunk-CA3SOLI3.mjs} +1 -1
  56. package/dist/chunks/{chunk-MPKRXMCJ.js → chunk-CSJDDREF.js} +7 -10
  57. package/dist/chunks/chunk-CUTMLBC3.mjs +86 -0
  58. package/dist/chunks/chunk-CV4GMFWP.js +174 -0
  59. package/dist/chunks/{chunk-SXLMI7CZ.mjs → chunk-CWMLTXOH.mjs} +162 -234
  60. package/dist/chunks/chunk-CZC76ZD5.js +10 -0
  61. package/dist/chunks/chunk-DICN6GKE.js +99 -0
  62. package/dist/chunks/{chunk-TLTEUIBY.js → chunk-DLFV7ZZV.js} +4 -4
  63. package/dist/chunks/chunk-DO6VK2QQ.mjs +108 -0
  64. package/dist/chunks/chunk-DYPPVXQF.js +143 -0
  65. package/dist/chunks/{chunk-GQP7IXH2.mjs → chunk-ECVAVQUY.mjs} +23 -31
  66. package/dist/chunks/{chunk-3CHRUKSJ.mjs → chunk-EHAUUUWB.mjs} +3 -3
  67. package/dist/chunks/chunk-EJY7IVSK.mjs +31 -0
  68. package/dist/chunks/{chunk-G4XJG7XI.js → chunk-EVOOTSY5.js} +3 -10
  69. package/dist/chunks/chunk-FUIBYZZ4.mjs +98 -0
  70. package/dist/chunks/{chunk-VH5FF6DZ.mjs → chunk-GX6GSWX3.mjs} +7 -7
  71. package/dist/chunks/chunk-H2G5FMRN.mjs +75 -0
  72. package/dist/chunks/chunk-H2V7RHYV.mjs +120 -0
  73. package/dist/chunks/{chunk-DDMZSNTG.js → chunk-HFBTS42N.js} +168 -240
  74. package/dist/chunks/{chunk-OGUTGD4J.mjs → chunk-HNLI646G.mjs} +71 -39
  75. package/dist/chunks/{chunk-C6H2UNOX.js → chunk-IE4DGLMH.js} +13 -21
  76. package/dist/chunks/{chunk-U76LT5GE.js → chunk-IOSIQLZL.js} +2 -2
  77. package/dist/chunks/{chunk-ZCMKIB5U.js → chunk-J5ZKGPBY.js} +33 -41
  78. package/dist/chunks/{chunk-JUZHWKGS.mjs → chunk-K2TBLM3F.mjs} +6 -12
  79. package/dist/chunks/chunk-KZ7S5VN2.js +7 -0
  80. package/dist/chunks/{chunk-FHPHDK3O.mjs → chunk-LI7SFBUQ.mjs} +4 -4
  81. package/dist/chunks/{chunk-7OEK2KX3.mjs → chunk-LMMON5AU.mjs} +4 -4
  82. package/dist/chunks/{chunk-6DZVNFVY.js → chunk-LOQXCHKL.js} +4 -12
  83. package/dist/chunks/{chunk-377KBJQG.js → chunk-MA2VCCIY.js} +19 -22
  84. package/dist/chunks/chunk-MCKOWMLS.mjs +8 -0
  85. package/dist/chunks/chunk-MMCA33FW.mjs +85 -0
  86. package/dist/chunks/{chunk-TR5JBBEA.mjs → chunk-MRRKW5QN.mjs} +31 -39
  87. package/dist/chunks/{chunk-76K6KXCT.js → chunk-NFIPQZ4O.js} +1 -1
  88. package/dist/chunks/chunk-NZHK76R3.js +109 -0
  89. package/dist/chunks/{chunk-I7YJB2F5.js → chunk-OMN5YQCE.js} +3 -3
  90. package/dist/chunks/{chunk-B7UU3FSS.mjs → chunk-P2T72N62.mjs} +4 -7
  91. package/dist/chunks/chunk-P3DZKXG4.js +116 -0
  92. package/dist/chunks/chunk-P73MEU7N.mjs +150 -0
  93. package/dist/chunks/chunk-PDJTSQOC.js +59 -0
  94. package/dist/chunks/{chunk-RXVYL4AU.js → chunk-PEIEVKD5.js} +7 -13
  95. package/dist/chunks/chunk-PI464222.mjs +5 -0
  96. package/dist/chunks/{chunk-IJG7J2VU.mjs → chunk-QZ4QR3XV.mjs} +30 -36
  97. package/dist/chunks/{chunk-6NTASYZO.js → chunk-RS3SBY3I.js} +61 -30
  98. package/dist/chunks/{chunk-AKIBUO5A.mjs → chunk-RX5UKRYK.mjs} +19 -26
  99. package/dist/chunks/chunk-S2GMEC43.js +109 -0
  100. package/dist/chunks/{chunk-WJ2OVQD3.mjs → chunk-SGNRVYYQ.mjs} +19 -25
  101. package/dist/chunks/{chunk-IB5UCYQY.mjs → chunk-SJMCPSVH.mjs} +15 -5
  102. package/dist/chunks/chunk-UKRU46PH.mjs +182 -0
  103. package/dist/chunks/{chunk-WNFJ4NJN.mjs → chunk-ULGYTBCT.mjs} +3 -11
  104. package/dist/chunks/{chunk-TXYYBJBQ.js → chunk-VGO4Z2WH.js} +73 -41
  105. package/dist/chunks/{chunk-LBKBCI2K.mjs → chunk-VIGRCJAE.mjs} +3 -10
  106. package/dist/chunks/chunk-VVXQZ4XH.mjs +93 -0
  107. package/dist/chunks/{chunk-Z7OKV6NW.mjs → chunk-W4GG5A7K.mjs} +12 -20
  108. package/dist/chunks/chunk-WGGBE4ZD.mjs +201 -0
  109. package/dist/chunks/{chunk-WSWD5ZUJ.js → chunk-WKCXACMZ.js} +20 -27
  110. package/dist/chunks/{chunk-GSLIY6WW.js → chunk-X2SHTVZQ.js} +17 -37
  111. package/dist/chunks/chunk-X3CTJ7TD.js +108 -0
  112. package/dist/chunks/{chunk-U6KOUYWX.mjs → chunk-XG6QG65W.mjs} +7 -10
  113. package/dist/chunks/chunk-XGIJZ3NZ.js +160 -0
  114. package/dist/chunks/chunk-YB5ZKHVB.js +64 -0
  115. package/dist/chunks/{chunk-Q7H6LCNN.js → chunk-YCG4FZC3.js} +23 -25
  116. package/dist/chunks/{chunk-JZ3PWHKS.mjs → chunk-YLO4UKSC.mjs} +18 -21
  117. package/dist/chunks/chunk-YO5MSDPX.mjs +36 -0
  118. package/dist/chunks/{chunk-Q2TMXHPK.js → chunk-YZV6FWE7.js} +25 -43
  119. package/dist/chunks/chunk-ZI4LN2B2.js +96 -0
  120. package/dist/chunks/chunk-ZU4AWAFT.mjs +137 -0
  121. package/dist/chunks/chunk-ZWSIIGA3.mjs +58 -0
  122. package/dist/countdown.js +4 -4
  123. package/dist/countdown.mjs +2 -2
  124. package/dist/counter.js +2 -2
  125. package/dist/counter.mjs +1 -1
  126. package/dist/data-list.js +5 -5
  127. package/dist/data-list.mjs +4 -4
  128. package/dist/date-picker.d.mts +17 -0
  129. package/dist/date-picker.d.ts +17 -0
  130. package/dist/date-picker.js +12 -0
  131. package/dist/date-picker.mjs +3 -0
  132. package/dist/divider.js +4 -4
  133. package/dist/divider.mjs +2 -2
  134. package/dist/drawer.d.mts +1 -1
  135. package/dist/drawer.d.ts +1 -1
  136. package/dist/drawer.js +11 -11
  137. package/dist/drawer.mjs +2 -2
  138. package/dist/dropdown-menu.d.mts +30 -0
  139. package/dist/dropdown-menu.d.ts +30 -0
  140. package/dist/dropdown-menu.js +32 -0
  141. package/dist/dropdown-menu.mjs +3 -0
  142. package/dist/ellipsis.js +3 -3
  143. package/dist/ellipsis.mjs +2 -2
  144. package/dist/empty-state.d.mts +16 -0
  145. package/dist/empty-state.d.ts +16 -0
  146. package/dist/empty-state.js +16 -0
  147. package/dist/empty-state.mjs +3 -0
  148. package/dist/error-boundary.d.mts +1 -1
  149. package/dist/error-boundary.d.ts +1 -1
  150. package/dist/error-boundary.js +2 -2
  151. package/dist/error-boundary.mjs +1 -1
  152. package/dist/index.d.mts +15 -0
  153. package/dist/index.d.ts +15 -0
  154. package/dist/index.js +322 -200
  155. package/dist/index.mjs +49 -35
  156. package/dist/infinite-scroll.js +3 -3
  157. package/dist/infinite-scroll.mjs +2 -2
  158. package/dist/marquee.js +3 -3
  159. package/dist/marquee.mjs +2 -2
  160. package/dist/modal/index.js +13 -13
  161. package/dist/modal/index.mjs +4 -4
  162. package/dist/number-input.d.mts +1 -1
  163. package/dist/number-input.d.ts +1 -1
  164. package/dist/number-input.js +5 -5
  165. package/dist/number-input.mjs +2 -2
  166. package/dist/nx-image.d.mts +13 -0
  167. package/dist/nx-image.d.ts +13 -0
  168. package/dist/nx-image.js +12 -0
  169. package/dist/nx-image.mjs +3 -0
  170. package/dist/pagination.d.mts +1 -0
  171. package/dist/pagination.d.ts +1 -0
  172. package/dist/pagination.js +5 -5
  173. package/dist/pagination.mjs +2 -2
  174. package/dist/popover.d.mts +1 -1
  175. package/dist/popover.d.ts +1 -1
  176. package/dist/popover.js +8 -8
  177. package/dist/popover.mjs +2 -2
  178. package/dist/price-input.d.mts +36 -0
  179. package/dist/price-input.d.ts +36 -0
  180. package/dist/price-input.js +16 -0
  181. package/dist/price-input.mjs +3 -0
  182. package/dist/progress.d.mts +18 -0
  183. package/dist/progress.d.ts +18 -0
  184. package/dist/progress.js +16 -0
  185. package/dist/progress.mjs +3 -0
  186. package/dist/radio-group.js +6 -6
  187. package/dist/radio-group.mjs +2 -2
  188. package/dist/schemas/_all.json +2356 -404
  189. package/dist/schemas/accordion.json +14 -11
  190. package/dist/schemas/alert.json +49 -0
  191. package/dist/schemas/avatar.json +13 -7
  192. package/dist/schemas/badge.json +76 -0
  193. package/dist/schemas/breadcrumb.json +47 -0
  194. package/dist/schemas/button.json +27 -9
  195. package/dist/schemas/carousel.json +10 -4
  196. package/dist/schemas/carouselButton.json +20 -0
  197. package/dist/schemas/carouselDots.json +17 -0
  198. package/dist/schemas/carouselSlide.json +20 -0
  199. package/dist/schemas/checkBox.json +33 -8
  200. package/dist/schemas/chip.json +15 -6
  201. package/dist/schemas/clientOnly.json +19 -0
  202. package/dist/schemas/countdown.json +10 -7
  203. package/dist/schemas/counter.json +15 -9
  204. package/dist/schemas/dataList.json +10 -10
  205. package/dist/schemas/datePicker.json +56 -0
  206. package/dist/schemas/divider.json +8 -5
  207. package/dist/schemas/drawer.json +24 -2
  208. package/dist/schemas/drawerClose.json +24 -0
  209. package/dist/schemas/drawerContent.json +9 -6
  210. package/dist/schemas/drawerDescription.json +20 -0
  211. package/dist/schemas/drawerTitle.json +20 -0
  212. package/dist/schemas/drawerTrigger.json +24 -0
  213. package/dist/schemas/dropdownMenu.json +83 -0
  214. package/dist/schemas/ellipsis.json +17 -7
  215. package/dist/schemas/emptyState.json +44 -0
  216. package/dist/schemas/errorBoundary.json +22 -0
  217. package/dist/schemas/infiniteScroll.json +18 -9
  218. package/dist/schemas/marquee.json +12 -6
  219. package/dist/schemas/modalCall.json +81 -3
  220. package/dist/schemas/modalTemplate.json +67 -14
  221. package/dist/schemas/numberInput.json +42 -12
  222. package/dist/schemas/nxImage.json +56 -0
  223. package/dist/schemas/pagination.json +13 -6
  224. package/dist/schemas/popover.json +18 -9
  225. package/dist/schemas/priceInput.json +104 -0
  226. package/dist/schemas/progress.json +63 -0
  227. package/dist/schemas/radioGroup.json +19 -9
  228. package/dist/schemas/radioItem.json +12 -5
  229. package/dist/schemas/select.json +15 -9
  230. package/dist/schemas/selectItem.json +7 -4
  231. package/dist/schemas/skeleton.json +12 -6
  232. package/dist/schemas/slider.json +78 -0
  233. package/dist/schemas/spinner.json +11 -4
  234. package/dist/schemas/stepper.json +73 -0
  235. package/dist/schemas/switch.json +23 -5
  236. package/dist/schemas/tab.json +17 -14
  237. package/dist/schemas/table.json +75 -0
  238. package/dist/schemas/tableRow.json +32 -0
  239. package/dist/schemas/tagInput.json +70 -0
  240. package/dist/schemas/tdColumn.json +107 -0
  241. package/dist/schemas/textArea.json +72 -7
  242. package/dist/schemas/textInput.json +72 -10
  243. package/dist/schemas/themeProvider.json +65 -0
  244. package/dist/schemas/toastOptions.json +81 -0
  245. package/dist/schemas/toaster.json +76 -0
  246. package/dist/schemas/toggleGroup.json +88 -0
  247. package/dist/schemas/tooltip.json +12 -9
  248. package/dist/schemas/virtualGrid.json +22 -11
  249. package/dist/schemas/virtualList.json +14 -8
  250. package/dist/schemas.d.mts +1360 -81
  251. package/dist/schemas.d.ts +1360 -81
  252. package/dist/schemas.js +725 -273
  253. package/dist/schemas.mjs +698 -273
  254. package/dist/select.js +6 -6
  255. package/dist/select.mjs +2 -2
  256. package/dist/skeleton.js +3 -3
  257. package/dist/skeleton.mjs +2 -2
  258. package/dist/slider.d.mts +20 -0
  259. package/dist/slider.d.ts +20 -0
  260. package/dist/slider.js +16 -0
  261. package/dist/slider.mjs +3 -0
  262. package/dist/spinner.js +3 -3
  263. package/dist/spinner.mjs +2 -2
  264. package/dist/stepper.d.mts +20 -0
  265. package/dist/stepper.d.ts +20 -0
  266. package/dist/stepper.js +16 -0
  267. package/dist/stepper.mjs +3 -0
  268. package/dist/styles/layer.d.mts +3 -0
  269. package/dist/styles/layer.d.ts +3 -0
  270. package/dist/styles/layer.js +18 -0
  271. package/dist/styles/layer.mjs +16 -0
  272. package/dist/styles.css +3872 -2
  273. package/dist/styles.js +2 -5
  274. package/dist/styles.layered.css +3875 -0
  275. package/dist/styles.mjs +1 -4
  276. package/dist/switch.js +4 -4
  277. package/dist/switch.mjs +2 -2
  278. package/dist/tab.js +5 -5
  279. package/dist/tab.mjs +2 -2
  280. package/dist/table.d.mts +2 -2
  281. package/dist/table.d.ts +2 -2
  282. package/dist/table.js +9 -9
  283. package/dist/table.mjs +3 -3
  284. package/dist/tag-input.d.mts +21 -0
  285. package/dist/tag-input.d.ts +21 -0
  286. package/dist/tag-input.js +16 -0
  287. package/dist/tag-input.mjs +3 -0
  288. package/dist/text-area.d.mts +5 -1
  289. package/dist/text-area.d.ts +5 -1
  290. package/dist/text-area.js +4 -4
  291. package/dist/text-area.mjs +2 -2
  292. package/dist/text-input.d.mts +5 -1
  293. package/dist/text-input.d.ts +5 -1
  294. package/dist/text-input.js +4 -4
  295. package/dist/text-input.mjs +2 -2
  296. package/dist/toast.js +5 -5
  297. package/dist/toast.mjs +2 -2
  298. package/dist/toggle-group.d.mts +36 -0
  299. package/dist/toggle-group.d.ts +36 -0
  300. package/dist/toggle-group.js +16 -0
  301. package/dist/toggle-group.mjs +3 -0
  302. package/dist/tooltip.js +5 -5
  303. package/dist/tooltip.mjs +2 -2
  304. package/dist/utils/cn.d.mts +0 -10
  305. package/dist/utils/cn.d.ts +0 -10
  306. package/dist/utils/cn.js +2 -2
  307. package/dist/utils/cn.mjs +1 -1
  308. package/dist/virtual-scroll.js +4 -4
  309. package/dist/virtual-scroll.mjs +2 -2
  310. package/package.json +90 -17
  311. package/scripts/setup-cursor-rules.cjs +6 -6
  312. package/dist/chunks/chunk-7MT3QYE6.js +0 -92
  313. package/dist/chunks/chunk-FA2OPP3U.mjs +0 -140
  314. package/dist/chunks/chunk-FKZI2HTI.js +0 -104
  315. package/dist/chunks/chunk-NCQDOPBR.mjs +0 -86
  316. package/dist/chunks/chunk-NTN55ZIX.mjs +0 -113
  317. package/dist/chunks/chunk-Q7GQVAYY.js +0 -88
  318. package/dist/chunks/chunk-QJNQCLMV.js +0 -25
  319. package/dist/chunks/chunk-UDQXLI5Y.mjs +0 -81
  320. package/dist/chunks/chunk-UR6JOKVB.mjs +0 -65
  321. package/dist/chunks/chunk-WVIEIRK2.js +0 -136
  322. package/dist/chunks/chunk-XALPBGSC.mjs +0 -23
  323. package/dist/schemas/typography.json +0 -70
  324. package/dist/typography.d.mts +0 -19
  325. package/dist/typography.d.ts +0 -19
  326. package/dist/typography.js +0 -102
  327. package/dist/typography.mjs +0 -79
@@ -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;
@@ -1,34 +1,31 @@
1
- import { cn } from './chunk-XALPBGSC.mjs';
1
+ import { cn } from './chunk-MCKOWMLS.mjs';
2
2
  import * as React from 'react';
3
3
  import { Drawer as Drawer$1 } from 'vaul';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
7
7
  var DrawerDirectionCtx = React.createContext("bottom");
8
- var drawerOverlayVariants = cva("nx:fixed nx:inset-0 nx:z-50 nx:bg-static-black/60", {
8
+ var drawerOverlayVariants = cva("nexus-drawer-overlay", {
9
9
  variants: {
10
10
  blur: {
11
11
  none: "",
12
- sm: "nx:backdrop-blur-sm",
13
- md: "nx:backdrop-blur-md"
12
+ sm: "nexus-drawer-overlay--blur-sm",
13
+ md: "nexus-drawer-overlay--blur-md"
14
14
  }
15
15
  },
16
16
  defaultVariants: { blur: "none" }
17
17
  });
18
- var drawerContentVariants = cva(
19
- "nx:fixed nx:z-50 nx:flex nx:flex-col nx:bg-surface-default",
20
- {
21
- variants: {
22
- direction: {
23
- bottom: "nx:inset-x-0 nx:bottom-0 nx:mt-24 nx:rounded-t-2xl nx:border-t nx:border-border-default",
24
- top: "nx:inset-x-0 nx:top-0 nx:mb-24 nx:rounded-b-2xl nx:border-b nx:border-border-default",
25
- left: "nx:inset-y-0 nx:left-0 nx:mr-24 nx:w-[85vw] nx:max-w-sm nx:rounded-r-2xl nx:border-r nx:border-border-default",
26
- right: "nx:inset-y-0 nx:right-0 nx:ml-24 nx:w-[85vw] nx:max-w-sm nx:rounded-l-2xl nx:border-l nx:border-border-default"
27
- }
28
- },
29
- defaultVariants: { direction: "bottom" }
30
- }
31
- );
18
+ var drawerContentVariants = cva("nexus-drawer-content", {
19
+ variants: {
20
+ direction: {
21
+ bottom: "nexus-drawer-content--bottom",
22
+ top: "nexus-drawer-content--top",
23
+ left: "nexus-drawer-content--left",
24
+ right: "nexus-drawer-content--right"
25
+ }
26
+ },
27
+ defaultVariants: { direction: "bottom" }
28
+ });
32
29
  var DrawerRoot = ({ direction = "bottom", ...props }) => /* @__PURE__ */ jsx(DrawerDirectionCtx.Provider, { value: direction, children: /* @__PURE__ */ jsx(Drawer$1.Root, { shouldScaleBackground: false, direction, ...props }) });
33
30
  var DrawerTrigger = (props) => /* @__PURE__ */ jsx(Drawer$1.Trigger, { ...props });
34
31
  DrawerTrigger.displayName = "DrawerTrigger";
@@ -61,11 +58,8 @@ var DrawerContent = React.forwardRef(
61
58
  showHandle && (direction === "bottom" || direction === "top") && /* @__PURE__ */ jsx(
62
59
  "div",
63
60
  {
64
- className: cn(
65
- "nx:flex nx:justify-center",
66
- direction === "bottom" ? "nx:pt-4" : "nx:pb-4"
67
- ),
68
- children: /* @__PURE__ */ jsx("div", { className: "nx:bg-border-strong nx:h-1.5 nx:w-12 nx:rounded-full" })
61
+ className: cn("nexus-drawer-handle", direction === "bottom" ? "nexus-drawer-handle--bottom" : "nexus-drawer-handle--top"),
62
+ children: /* @__PURE__ */ jsx("div", { className: "nexus-drawer-handle__bar" })
69
63
  }
70
64
  ),
71
65
  children
@@ -81,7 +75,7 @@ DrawerClose.displayName = "DrawerClose";
81
75
  var DrawerTitle = ({ className, ...props }) => /* @__PURE__ */ jsx(
82
76
  Drawer$1.Title,
83
77
  {
84
- className: cn("nx:text-lg nx:font-semibold nx:text-text-primary", className),
78
+ className: cn("nexus-drawer-title", className),
85
79
  ...props
86
80
  }
87
81
  );
@@ -89,7 +83,7 @@ DrawerTitle.displayName = "DrawerTitle";
89
83
  var DrawerDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(
90
84
  Drawer$1.Description,
91
85
  {
92
- className: cn("nx:text-sm nx:text-text-secondary", className),
86
+ className: cn("nexus-drawer-description", className),
93
87
  ...props
94
88
  }
95
89
  );
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-XALPBGSC.mjs';
1
+ import { cn } from './chunk-MCKOWMLS.mjs';
2
2
  import * as React from 'react';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
@@ -6,6 +6,14 @@ var Marquee = React.forwardRef(
6
6
  ({ direction = "left", speed = 40, pauseOnHover = false, gap = 16, children, className, style, ...props }, ref) => {
7
7
  const containerRef = React.useRef(null);
8
8
  const [copies, setCopies] = React.useState(2);
9
+ const [prefersReducedMotion, setPrefersReducedMotion] = React.useState(false);
10
+ React.useEffect(() => {
11
+ const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
12
+ setPrefersReducedMotion(mq.matches);
13
+ const handler = (e) => setPrefersReducedMotion(e.matches);
14
+ mq.addEventListener("change", handler);
15
+ return () => mq.removeEventListener("change", handler);
16
+ }, []);
9
17
  const isHorizontal = direction === "left" || direction === "right";
10
18
  const isReverse = direction === "right" || direction === "down";
11
19
  React.useEffect(() => {
@@ -33,8 +41,10 @@ var Marquee = React.forwardRef(
33
41
  display: "flex",
34
42
  flexDirection: isHorizontal ? "row" : "column",
35
43
  gap,
36
- animation: `${animationName} ${speed}s linear infinite`,
37
- ...isReverse ? { animationDirection: "reverse" } : {}
44
+ ...prefersReducedMotion ? {} : {
45
+ animation: `${animationName} ${speed}s linear infinite`,
46
+ ...isReverse ? { animationDirection: "reverse" } : {}
47
+ }
38
48
  };
39
49
  const keyframes = `
40
50
  @keyframes ${animationName} {
@@ -47,8 +57,8 @@ var Marquee = React.forwardRef(
47
57
  {
48
58
  ref,
49
59
  className: cn(
50
- "nx:overflow-hidden",
51
- pauseOnHover && "nx:[&:hover_>_div]:![animation-play-state:paused]",
60
+ "nexus-marquee",
61
+ pauseOnHover && "nexus-marquee--pause-on-hover",
52
62
  className
53
63
  ),
54
64
  style,
@@ -0,0 +1,182 @@
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 textInputVariants = cva("nexus-text-input", {
7
+ variants: {
8
+ size: {
9
+ md: "nexus-text-input--md",
10
+ lg: "nexus-text-input--lg",
11
+ xl: "nexus-text-input--xl"
12
+ },
13
+ state: {
14
+ default: "nexus-text-input--default",
15
+ error: "nexus-text-input--error"
16
+ }
17
+ },
18
+ defaultVariants: { size: "md", state: "default" }
19
+ });
20
+ var ClearIcon = () => /* @__PURE__ */ jsx(
21
+ "svg",
22
+ {
23
+ width: "14",
24
+ height: "14",
25
+ viewBox: "0 0 14 14",
26
+ fill: "none",
27
+ stroke: "currentColor",
28
+ strokeWidth: "1.5",
29
+ strokeLinecap: "round",
30
+ children: /* @__PURE__ */ jsx("path", { d: "M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5" })
31
+ }
32
+ );
33
+ var TextInput = React.forwardRef(
34
+ ({
35
+ className,
36
+ size,
37
+ error,
38
+ prefixIcon,
39
+ suffixIcon,
40
+ label,
41
+ description,
42
+ showCount,
43
+ clearable,
44
+ onValueChange,
45
+ onChange,
46
+ value: controlledValue,
47
+ defaultValue,
48
+ disabled,
49
+ maxLength,
50
+ id,
51
+ ...props
52
+ }, ref) => {
53
+ const fallbackId = React.useRef(
54
+ `nexus-ti-${Math.random().toString(36).slice(2, 9)}`
55
+ );
56
+ const inputId = id || fallbackId.current;
57
+ const inputRef = React.useRef(null);
58
+ const setInputRef = React.useCallback(
59
+ (node) => {
60
+ inputRef.current = node;
61
+ if (typeof ref === "function") ref(node);
62
+ else if (ref)
63
+ ref.current = node;
64
+ },
65
+ [ref]
66
+ );
67
+ const isControlled = controlledValue !== void 0;
68
+ const [internalValue, setInternalValue] = React.useState(
69
+ () => defaultValue != null ? String(defaultValue) : ""
70
+ );
71
+ const currentValue = isControlled ? String(controlledValue) : internalValue;
72
+ const charCount = currentValue.length;
73
+ const isOverLimit = !!(maxLength && charCount > maxLength);
74
+ const state = error || isOverLimit ? "error" : "default";
75
+ const hasField = !!(label || description || showCount);
76
+ const handleChange = React.useCallback(
77
+ (e) => {
78
+ if (!isControlled) setInternalValue(e.target.value);
79
+ onValueChange?.(e.target.value);
80
+ onChange?.(e);
81
+ },
82
+ [isControlled, onValueChange, onChange]
83
+ );
84
+ const handleClear = React.useCallback(() => {
85
+ const input = inputRef.current;
86
+ if (!input) return;
87
+ const setter = Object.getOwnPropertyDescriptor(
88
+ HTMLInputElement.prototype,
89
+ "value"
90
+ )?.set;
91
+ if (setter) {
92
+ setter.call(input, "");
93
+ input.dispatchEvent(new Event("input", { bubbles: true }));
94
+ }
95
+ if (!isControlled) setInternalValue("");
96
+ onValueChange?.("");
97
+ input.focus();
98
+ }, [isControlled, onValueChange]);
99
+ const handleWrapperClick = React.useCallback(() => {
100
+ if (!disabled) inputRef.current?.focus();
101
+ }, [disabled]);
102
+ const inputBox = /* @__PURE__ */ jsxs(
103
+ "div",
104
+ {
105
+ className: cn(
106
+ textInputVariants({ size, state }),
107
+ disabled && "nexus-text-input--disabled",
108
+ !hasField && className
109
+ ),
110
+ onClick: handleWrapperClick,
111
+ children: [
112
+ prefixIcon && /* @__PURE__ */ jsx("span", { className: "nexus-text-input__icon", children: prefixIcon }),
113
+ /* @__PURE__ */ jsx(
114
+ "input",
115
+ {
116
+ ref: setInputRef,
117
+ id: label ? inputId : id,
118
+ className: "nexus-text-input__inner",
119
+ disabled,
120
+ maxLength: showCount ? void 0 : maxLength,
121
+ "aria-invalid": error || isOverLimit || void 0,
122
+ "aria-describedby": description ? `${inputId}-desc` : void 0,
123
+ value: isControlled ? controlledValue : void 0,
124
+ defaultValue: !isControlled ? defaultValue : void 0,
125
+ onChange: handleChange,
126
+ ...props
127
+ }
128
+ ),
129
+ clearable && currentValue.length > 0 && !disabled && /* @__PURE__ */ jsx(
130
+ "button",
131
+ {
132
+ type: "button",
133
+ className: "nexus-text-input__clear",
134
+ onClick: handleClear,
135
+ tabIndex: -1,
136
+ "aria-label": "Clear",
137
+ children: /* @__PURE__ */ jsx(ClearIcon, {})
138
+ }
139
+ ),
140
+ suffixIcon && /* @__PURE__ */ jsx("span", { className: "nexus-text-input__icon", children: suffixIcon })
141
+ ]
142
+ }
143
+ );
144
+ if (!hasField) return inputBox;
145
+ return /* @__PURE__ */ jsxs("div", { className: cn("nexus-text-input-field", className), children: [
146
+ label && /* @__PURE__ */ jsx("label", { className: "nexus-text-input-field__label", htmlFor: inputId, children: label }),
147
+ inputBox,
148
+ (description || showCount && maxLength) && /* @__PURE__ */ jsxs("div", { className: "nexus-text-input-field__footer", children: [
149
+ description && /* @__PURE__ */ jsx(
150
+ "p",
151
+ {
152
+ id: `${inputId}-desc`,
153
+ className: cn(
154
+ "nexus-text-input-field__description",
155
+ (error || isOverLimit) && "nexus-text-input-field__description--error"
156
+ ),
157
+ children: description
158
+ }
159
+ ),
160
+ showCount && maxLength && /* @__PURE__ */ jsxs(
161
+ "span",
162
+ {
163
+ className: cn(
164
+ "nexus-text-input-field__count",
165
+ isOverLimit && "nexus-text-input-field__count--error"
166
+ ),
167
+ "aria-live": "polite",
168
+ "aria-atomic": "true",
169
+ children: [
170
+ charCount,
171
+ "/",
172
+ maxLength
173
+ ]
174
+ }
175
+ )
176
+ ] })
177
+ ] });
178
+ }
179
+ );
180
+ TextInput.displayName = "TextInput";
181
+
182
+ export { TextInput, textInputVariants };
@@ -1,16 +1,8 @@
1
- import { cn } from './chunk-XALPBGSC.mjs';
1
+ import { cn } from './chunk-MCKOWMLS.mjs';
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
5
- var popoverContentClasses = [
6
- "nx:z-50 nx:rounded-lg nx:border nx:p-4 nx:shadow-lg nx:outline-none",
7
- "nx:bg-surface-default nx:border-border-default nx:text-text-primary",
8
- "nx:data-[state=open]:animate-in nx:data-[state=closed]:animate-out",
9
- "nx:data-[state=closed]:fade-out-0 nx:data-[state=open]:fade-in-0",
10
- "nx:data-[state=closed]:zoom-out-95 nx:data-[state=open]:zoom-in-95",
11
- "nx:data-[side=bottom]:slide-in-from-top-2 nx:data-[side=left]:slide-in-from-right-2",
12
- "nx:data-[side=right]:slide-in-from-left-2 nx:data-[side=top]:slide-in-from-bottom-2"
13
- ].join(" ");
5
+ var popoverContentClasses = "nexus-popover-content";
14
6
  var Popover = ({
15
7
  children,
16
8
  trigger,
@@ -39,7 +31,7 @@ var Popover = ({
39
31
  /* @__PURE__ */ jsx(
40
32
  PopoverPrimitive.Arrow,
41
33
  {
42
- className: cn("nx:fill-surface-default", arrowClassName)
34
+ className: cn("nexus-popover-arrow", arrowClassName)
43
35
  }
44
36
  )
45
37
  ]
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk5XVEYVYA_js = require('./chunk-5XVEYVYA.js');
4
- var chunkQJNQCLMV_js = require('./chunk-QJNQCLMV.js');
3
+ var chunkBLGQHR3M_js = require('./chunk-BLGQHR3M.js');
4
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
5
5
  var lodashEs = require('lodash-es');
6
6
  var React = require('react');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -22,20 +22,21 @@ var TableHighlightProvider = ({ children }) => {
22
22
  return /* @__PURE__ */ jsxRuntime.jsx(TableHighlightContext.Provider, { value: { highlightValue, setHighlightValue }, children });
23
23
  };
24
24
  var ALIGN_CLASSES = {
25
- center: "nx:text-center nx:justify-center",
26
- left: "nx:text-left nx:justify-start",
27
- right: "nx:text-right nx:justify-end"
25
+ center: "nexus-td--center",
26
+ left: "nexus-td--left",
27
+ right: "nexus-td--right"
28
28
  };
29
29
  var TEXT_OVERFLOW_CLASSES = {
30
- auto: "nx:whitespace-nowrap",
31
- truncate: "nx:truncate",
32
- wrap: "nx:whitespace-normal nx:break-words",
33
- "break-all": "nx:whitespace-normal nx:break-all"
30
+ auto: "nexus-td--nowrap",
31
+ truncate: "nexus-td--truncate",
32
+ wrap: "nexus-td--wrap",
33
+ "break-all": "nexus-td--break-all"
34
34
  };
35
35
  var TdColumn = ({
36
36
  className = "",
37
37
  children,
38
38
  fieldId,
39
+ size,
39
40
  colSpan,
40
41
  rowSpan,
41
42
  align = "left",
@@ -50,24 +51,26 @@ var TdColumn = ({
50
51
  const handleMouseLeave = React.useCallback(() => {
51
52
  if (highlightKey) setHighlightValue(null);
52
53
  }, [highlightKey, setHighlightValue]);
54
+ const sizeStyle = size ? { width: typeof size === "number" ? `${size}px` : size, flex: `0 0 ${typeof size === "number" ? `${size}px` : size}` } : void 0;
53
55
  return /* @__PURE__ */ jsxRuntime.jsx(
54
56
  "td",
55
57
  {
56
- className: chunkQJNQCLMV_js.cn("nx:min-w-0 nx:w-full", fieldId, className),
58
+ className: chunkCZC76ZD5_js.cn("nexus-td", fieldId, className),
57
59
  title: textOverflow === "truncate" && typeof children === "string" ? children : void 0,
58
60
  colSpan,
59
61
  rowSpan,
62
+ style: sizeStyle,
60
63
  onMouseEnter: handleMouseEnter,
61
64
  onMouseLeave: handleMouseLeave,
62
65
  children: /* @__PURE__ */ jsxRuntime.jsx(
63
66
  "div",
64
67
  {
65
- className: chunkQJNQCLMV_js.cn(
66
- typeof children !== "string" && "nx:flex",
68
+ className: chunkCZC76ZD5_js.cn(
69
+ typeof children !== "string" && "nexus-td__inner--flex",
67
70
  TEXT_OVERFLOW_CLASSES[textOverflow],
68
71
  ALIGN_CLASSES[align],
69
- "nx:rounded-md nx:px-1 nx:py-[2px] nx:transition-colors nx:duration-150",
70
- isHighlighted && "nx:bg-accent-primary/10 nx:outline-accent-primary nx:outline nx:-outline-offset-1 nx:outline-dashed"
72
+ "nexus-td__inner",
73
+ isHighlighted && "nexus-td__inner--highlight"
71
74
  ),
72
75
  children
73
76
  }
@@ -76,11 +79,11 @@ var TdColumn = ({
76
79
  );
77
80
  };
78
81
  TdColumn.displayName = "TdColumn";
79
- var tableRowVariants = classVarianceAuthority.cva("nx:border-border-default nx:scrollbar-none nx:flex nx:border-b", {
82
+ var tableRowVariants = classVarianceAuthority.cva("nexus-table-row", {
80
83
  variants: {
81
84
  variant: {
82
- default: "nx:hover:bg-surface-hover",
83
- accent: "nx:hover:bg-accent-primary/5"
85
+ default: "nexus-table-row--default",
86
+ accent: "nexus-table-row--accent"
84
87
  }
85
88
  },
86
89
  defaultVariants: { variant: "default" }
@@ -104,10 +107,10 @@ var TableRow = ({ className = "", children, onClick, variant = "default" }) => {
104
107
  const childList = Array.isArray(children) ? children : [children];
105
108
  return getChildren(childList);
106
109
  }, [children]);
107
- return /* @__PURE__ */ jsxRuntime.jsx("tr", { className: chunkQJNQCLMV_js.cn(tableRowVariants({ variant }), "nx:min-w-0", className), onClick, children: columnList });
110
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", { className: chunkCZC76ZD5_js.cn(tableRowVariants({ variant }), className), onClick, children: columnList });
108
111
  };
109
112
  TableRow.displayName = "TableRow";
110
- var DefaultSortIcon = ({ direction }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "nx:size-4", viewBox: "0 0 16 16", fill: "currentColor", children: [
113
+ var DefaultSortIcon = ({ direction }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "nexus-table-sort-icon", viewBox: "0 0 16 16", fill: "currentColor", children: [
111
114
  direction === "asc" && /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 4l4 5H4z" }),
112
115
  direction === "desc" && /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 12l4-5H4z" }),
113
116
  direction === "default" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -142,12 +145,12 @@ var findTrRow = (children) => {
142
145
  return result;
143
146
  };
144
147
  var ALIGN_CLASSES2 = {
145
- center: "nx:text-center nx:justify-center",
146
- left: "nx:text-left nx:justify-start",
147
- right: "nx:text-right nx:justify-end"
148
+ center: "nexus-td--center",
149
+ left: "nexus-td--left",
150
+ right: "nexus-td--right"
148
151
  };
149
- var DefaultNoData = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nx:flex nx:items-center nx:justify-center nx:py-12 nx:text-text-tertiary", children: "No data available." });
150
- var DefaultLoading = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nx:flex nx:items-center nx:justify-center nx:py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nx:h-8 nx:w-8 nx:animate-spin nx:rounded-full nx:border-2 nx:border-border-default nx:border-t-accent-primary" }) });
152
+ var DefaultNoData = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-table-center nexus-table-nodata", children: "No data available." });
153
+ var DefaultLoading = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-table-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-table-loading-icon" }) });
151
154
  function Table({
152
155
  className = "",
153
156
  theadClassName = "",
@@ -190,6 +193,7 @@ function Table({
190
193
  thRowSpan: component.props?.thRowSpan,
191
194
  rowSpan: component.props?.rowSpan,
192
195
  colSpan: component.props?.colSpan,
196
+ size: component.props?.size,
193
197
  widthClassName: widthClassName && widthClassName.join(" "),
194
198
  align: component.props?.align ?? "left",
195
199
  order: component.props?.order ?? ""
@@ -211,8 +215,19 @@ function Table({
211
215
  return Array.from({ length: skeletonCount }, (_, trIndex) => /* @__PURE__ */ jsxRuntime.jsx(
212
216
  "tr",
213
217
  {
214
- className: chunkQJNQCLMV_js.cn(trRowComponent?.props?.className, "nx:flex nx:cursor-default"),
215
- children: thRowData?.map((thData, tdIndex) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: chunkQJNQCLMV_js.cn(thData.widthClassName, "nx:h-full nx:w-full nx:py-4"), children: /* @__PURE__ */ jsxRuntime.jsx(chunk5XVEYVYA_js.Skeleton, { className: "nx:h-4 nx:w-full" }) }, `skeleton-td-${tdIndex}`))
218
+ className: chunkCZC76ZD5_js.cn(trRowComponent?.props?.className, "nexus-table-skeleton-row"),
219
+ children: thRowData?.map((thData, tdIndex) => /* @__PURE__ */ jsxRuntime.jsx(
220
+ "td",
221
+ {
222
+ className: chunkCZC76ZD5_js.cn(thData.widthClassName, "nexus-table-skeleton-td"),
223
+ style: thData.size ? {
224
+ width: typeof thData.size === "number" ? `${thData.size}px` : thData.size,
225
+ flex: `0 0 ${typeof thData.size === "number" ? `${thData.size}px` : thData.size}`
226
+ } : void 0,
227
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkBLGQHR3M_js.Skeleton, { className: "nexus-table-skeleton-bar" })
228
+ },
229
+ `skeleton-td-${tdIndex}`
230
+ ))
216
231
  },
217
232
  `skeleton-tr-${trIndex}`
218
233
  ));
@@ -261,28 +276,45 @@ function Table({
261
276
  }
262
277
  }
263
278
  };
264
- return /* @__PURE__ */ jsxRuntime.jsx(TableHighlightProvider, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkQJNQCLMV_js.cn("nx:overflow-x-auto", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "nx:w-full", children: [
265
- !hideThead && /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: chunkQJNQCLMV_js.cn("nx:flex nx:bg-surface-default", theadClassName), children: thRowData.map((thData, index) => /* @__PURE__ */ jsxRuntime.jsxs(
279
+ return /* @__PURE__ */ jsxRuntime.jsx(TableHighlightProvider, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkCZC76ZD5_js.cn("nexus-table-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "nexus-table", children: [
280
+ !hideThead && /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: chunkCZC76ZD5_js.cn("nexus-table-thead", theadClassName), children: thRowData.map((thData, index) => /* @__PURE__ */ jsxRuntime.jsx(
266
281
  "th",
267
282
  {
268
283
  rowSpan: thData.thRowSpan ?? thData.rowSpan,
269
284
  colSpan: thData.thColSpan ?? thData.colSpan,
270
- onClick: () => handleThSorting({ ...thData, index }),
271
- className: chunkQJNQCLMV_js.cn(
272
- "nx:flex",
273
- thData.widthClassName?.includes("flex-1") ? "" : "nx:w-full",
274
- thData.enableSorting && "nx:cursor-pointer nx:items-center nx:gap-1",
285
+ className: chunkCZC76ZD5_js.cn(
286
+ "nexus-table-th",
287
+ thData.enableSorting && "nexus-table-th--sortable",
275
288
  ALIGN_CLASSES2[thData.align ?? "left"],
276
289
  thData.widthClassName
277
290
  ),
278
- children: [
279
- thData.label,
280
- !!thData.enableSorting && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
281
- thData.order !== "desc" && thData.order !== "asc" && /* @__PURE__ */ jsxRuntime.jsx(DefaultSortIcon, { direction: "default" }),
282
- thData.order === "desc" && sortDownElement,
283
- thData.order === "asc" && sortUpElement
284
- ] })
285
- ]
291
+ style: thData.size ? {
292
+ width: typeof thData.size === "number" ? `${thData.size}px` : thData.size,
293
+ flex: `0 0 ${typeof thData.size === "number" ? `${thData.size}px` : thData.size}`
294
+ } : void 0,
295
+ children: thData.enableSorting ? /* @__PURE__ */ jsxRuntime.jsxs(
296
+ "button",
297
+ {
298
+ type: "button",
299
+ className: "nexus-table-th__sort-btn",
300
+ onClick: () => handleThSorting({ ...thData, index }),
301
+ onKeyDown: (e) => {
302
+ if (e.key === "Enter" || e.key === " ") {
303
+ e.preventDefault();
304
+ handleThSorting({ ...thData, index });
305
+ }
306
+ },
307
+ "aria-label": `Sort by ${thData.label}${thData.order === "asc" ? ", ascending" : thData.order === "desc" ? ", descending" : ""}`,
308
+ children: [
309
+ thData.label,
310
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
311
+ thData.order !== "desc" && thData.order !== "asc" && /* @__PURE__ */ jsxRuntime.jsx(DefaultSortIcon, { direction: "default" }),
312
+ thData.order === "desc" && sortDownElement,
313
+ thData.order === "asc" && sortUpElement
314
+ ] })
315
+ ]
316
+ }
317
+ ) : thData.label
286
318
  },
287
319
  `th-${thData.fieldId ?? index}`
288
320
  )) }) }),