@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
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkHHXDOKXY_js = require('./chunk-HHXDOKXY.js');
4
- var chunkNHDGKOAM_js = require('./chunk-NHDGKOAM.js');
5
3
  var chunkT2IY2TSR_js = require('./chunk-T2IY2TSR.js');
6
4
  var chunkXEHFB62A_js = require('./chunk-XEHFB62A.js');
7
5
  var chunkINP2AH3B_js = require('./chunk-INP2AH3B.js');
8
6
  var chunkHUPAHDJ7_js = require('./chunk-HUPAHDJ7.js');
9
- var chunkQJNQCLMV_js = require('./chunk-QJNQCLMV.js');
7
+ var chunkHHXDOKXY_js = require('./chunk-HHXDOKXY.js');
8
+ var chunkNHDGKOAM_js = require('./chunk-NHDGKOAM.js');
9
+ var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
10
10
  var React = require('react');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var reactDom = require('react-dom');
@@ -125,28 +125,17 @@ var ModalComponent = React.forwardRef(
125
125
  close
126
126
  }));
127
127
  const getModalClassName = () => {
128
- const baseClasses = ["nx:opacity-0"];
128
+ const baseClasses = ["nexus-modal-component"];
129
129
  if (modal.props.portalId) {
130
- baseClasses.push("nx:relative");
130
+ baseClasses.push("nexus-modal-component--portal");
131
131
  }
132
132
  if (["enter", "enter-done", "leave"].includes(status)) {
133
- baseClasses.push("nx:opacity-100");
133
+ baseClasses.push("nexus-modal-component--visible");
134
134
  }
135
135
  if (status === "enter") {
136
- baseClasses.push(
137
- "nx:[&_.modal-inner]:[animation-direction:var(--modal-animation-direction)]",
138
- "nx:[&_.modal-inner]:[animation-duration:var(--modal-animation-duration)]",
139
- "nx:[&_.modal-inner]:[animation-name:var(--modal-animation-name)]",
140
- "nx:[&_.modal-inner]:[animation-timing-function:var(--modal-animation-timing-function)]"
141
- );
136
+ baseClasses.push("nexus-modal-component--enter");
142
137
  } else if (status === "leave") {
143
- baseClasses.push(
144
- "nx:[&_.modal-inner]:[animation-direction:reverse]",
145
- "nx:[&_.modal-inner]:[animation-duration:var(--modal-animation-duration)]",
146
- "nx:[&_.modal-inner]:[animation-fill-mode:var(--modal-animation-fill-mode)]",
147
- "nx:[&_.modal-inner]:[animation-name:var(--modal-animation-name)]",
148
- "nx:[&_.modal-inner]:[animation-timing-function:var(--modal-animation-timing-function)]"
149
- );
138
+ baseClasses.push("nexus-modal-component--leave");
150
139
  }
151
140
  if (className) {
152
141
  baseClasses.push(className);
@@ -248,248 +237,154 @@ var ModalContainer = ({ className = "", breakPoints, ...defaultOption }) => {
248
237
  };
249
238
  var ModalContainer_default = ModalContainer;
250
239
  var ModalPortalTarget = ({ id, className }) => {
251
- return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: `nx:absolute nx:z-[9999] ${className || ""}` });
240
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: chunkCZC76ZD5_js.cn("nexus-modal-portal-target", className) });
252
241
  };
253
242
  var ModalPortalTarget_default = ModalPortalTarget;
254
- var modalWrapVariants = classVarianceAuthority.cva(
255
- "modal-wrap nx:pointer-events-none nx:fixed nx:inset-0 nx:z-[99999] nx:flex nx:h-full nx:items-center nx:justify-center nx:text-text-primary",
256
- {
257
- variants: {
258
- layout: {
259
- default: "",
260
- "bottom-sheet": "nx:items-end",
261
- "slide-left": "nx:h-full nx:justify-start",
262
- "slide-right": "nx:h-full nx:justify-end",
263
- "full-page": "nx:h-full nx:justify-start",
264
- "full-page-reverse": "nx:h-full nx:justify-start",
265
- draggable: ""
266
- }
267
- },
268
- defaultVariants: {
269
- layout: "default"
243
+ var modalWrapVariants = classVarianceAuthority.cva("nexus-modal-wrap", {
244
+ variants: {
245
+ layout: {
246
+ default: "",
247
+ "bottom-sheet": "nexus-modal-wrap--bottom-sheet",
248
+ "slide-left": "nexus-modal-wrap--slide-left",
249
+ "slide-right": "nexus-modal-wrap--slide-right",
250
+ "full-page": "nexus-modal-wrap--full-page",
251
+ "full-page-reverse": "nexus-modal-wrap--full-page-reverse",
252
+ draggable: ""
270
253
  }
254
+ },
255
+ defaultVariants: {
256
+ layout: "default"
271
257
  }
272
- );
273
- var modalInnerVariants = classVarianceAuthority.cva(
274
- [
275
- "modal-inner",
276
- "nx:relative nx:z-[2] nx:min-h-[200px] nx:w-full nx:overflow-hidden",
277
- "nx:pointer-events-auto nx:rounded-corner-lg nx:border nx:border-border-default nx:bg-surface-default nx:text-text-primary",
278
- "nx:sm:w-[480px] nx:sm:min-h-auto",
279
- "nx:[&>div]:contents"
280
- ],
281
- {
282
- variants: {
283
- layout: {
284
- default: "",
285
- "bottom-sheet": "nx:mx-0 nx:my-0 nx:w-full nx:rounded-t-2xl nx:rounded-b-none nx:border-t nx:border-border-default nx:px-4 nx:pt-6",
286
- "slide-left": "nx:h-full nx:rounded-none",
287
- "slide-right": "nx:h-full nx:rounded-none",
288
- "full-page": "nx:h-full nx:w-full nx:sm:w-full nx:rounded-none nx:border-transparent",
289
- "full-page-reverse": "nx:h-full nx:w-full nx:sm:w-full nx:rounded-none nx:border-transparent",
290
- draggable: "nx:min-w-[320px] nx:overflow-visible"
291
- },
292
- hasFooter: {
293
- true: "",
294
- false: ""
295
- }
258
+ });
259
+ var modalInnerVariants = classVarianceAuthority.cva("nexus-modal-inner", {
260
+ variants: {
261
+ layout: {
262
+ default: "",
263
+ "bottom-sheet": "nexus-modal-inner--bottom-sheet",
264
+ "slide-left": "nexus-modal-inner--slide-left",
265
+ "slide-right": "nexus-modal-inner--slide-right",
266
+ "full-page": "nexus-modal-inner--full-page",
267
+ "full-page-reverse": "nexus-modal-inner--full-page-reverse",
268
+ draggable: "nexus-modal-inner--draggable"
296
269
  },
297
- compoundVariants: [
298
- { layout: "default", hasFooter: true, class: "nx:pb-[88px]" },
299
- { layout: "bottom-sheet", hasFooter: true, class: "nx:pb-20" }
300
- ],
301
- defaultVariants: {
302
- layout: "default",
303
- hasFooter: false
270
+ hasFooter: {
271
+ true: "nexus-modal-inner--has-footer",
272
+ false: ""
304
273
  }
274
+ },
275
+ compoundVariants: [
276
+ { layout: "bottom-sheet", hasFooter: true, class: "nexus-modal-inner--bottom-sheet nexus-modal-inner--has-footer" }
277
+ ],
278
+ defaultVariants: {
279
+ layout: "default",
280
+ hasFooter: false
305
281
  }
306
- );
307
- var modalHeaderVariants = classVarianceAuthority.cva("modal-header nx:relative nx:px-5 nx:pt-6", {
282
+ });
283
+ var modalHeaderVariants = classVarianceAuthority.cva("nexus-modal-header", {
308
284
  variants: {
309
285
  layout: {
310
286
  default: "",
311
- "bottom-sheet": "nx:p-0",
287
+ "bottom-sheet": "nexus-modal-header--bottom-sheet",
312
288
  "slide-left": "",
313
289
  "slide-right": "",
314
290
  "full-page": "",
315
291
  "full-page-reverse": "",
316
- draggable: "nx:cursor-grab nx:active:cursor-grabbing nx:select-none"
292
+ draggable: "nexus-modal-header--draggable"
317
293
  }
318
294
  },
319
295
  defaultVariants: {
320
296
  layout: "default"
321
297
  }
322
298
  });
323
- var modalCloseButtonVariants = classVarianceAuthority.cva(
324
- "btn-close nx:absolute nx:top-6 nx:right-5 nx:z-[1] nx:ml-auto nx:flex nx:cursor-pointer nx:items-center nx:justify-end",
325
- {
326
- variants: {
327
- layout: {
328
- default: "",
329
- "bottom-sheet": "nx:relative nx:top-0 nx:right-0",
330
- "slide-left": "",
331
- "slide-right": "",
332
- "full-page": "",
333
- "full-page-reverse": "",
334
- draggable: ""
335
- }
336
- },
337
- defaultVariants: {
338
- layout: "default"
299
+ var modalCloseButtonVariants = classVarianceAuthority.cva("nexus-modal-close-btn", {
300
+ variants: {
301
+ layout: {
302
+ default: "",
303
+ "bottom-sheet": "nexus-modal-close-btn--bottom-sheet",
304
+ "slide-left": "",
305
+ "slide-right": "",
306
+ "full-page": "",
307
+ "full-page-reverse": "",
308
+ draggable: ""
339
309
  }
310
+ },
311
+ defaultVariants: {
312
+ layout: "default"
340
313
  }
341
- );
342
- var modalTitleVariants = classVarianceAuthority.cva(
343
- "modal-title nx:m-0 nx:pr-[42px] nx:text-text-lg nx:font-semibold nx:leading-[26px] nx:tracking-[-0.002em] nx:text-text-primary",
344
- {
345
- variants: {
346
- layout: {
347
- default: "",
348
- "bottom-sheet": "nx:pt-1.5 nx:leading-7 nx:tracking-[-0.012em]",
349
- "slide-left": "",
350
- "slide-right": "",
351
- "full-page": "",
352
- "full-page-reverse": "",
353
- draggable: ""
354
- }
355
- },
356
- defaultVariants: {
357
- layout: "default"
314
+ });
315
+ var modalTitleVariants = classVarianceAuthority.cva("nexus-modal-title", {
316
+ variants: {
317
+ layout: {
318
+ default: "",
319
+ "bottom-sheet": "nexus-modal-title--bottom-sheet",
320
+ "slide-left": "",
321
+ "slide-right": "",
322
+ "full-page": "",
323
+ "full-page-reverse": "",
324
+ draggable: ""
358
325
  }
326
+ },
327
+ defaultVariants: {
328
+ layout: "default"
359
329
  }
360
- );
361
- var modalBodyVariants = classVarianceAuthority.cva(
362
- ["modal-body", "nx:relative nx:overflow-y-auto nx:px-5 nx:pt-6", "nx:scrollbar-none"],
363
- {
364
- variants: {
365
- layout: {
366
- default: "",
367
- "bottom-sheet": "nx:mt-6 nx:max-h-[calc(100vh-108px)] nx:p-0 nx:pb-6",
368
- "slide-left": "nx:h-full nx:max-h-full nx:overflow-y-auto",
369
- "slide-right": "nx:h-full nx:max-h-full nx:overflow-y-auto",
370
- "full-page": "nx:h-full nx:max-h-full nx:overflow-y-auto nx:pb-0",
371
- "full-page-reverse": "nx:h-full nx:max-h-full nx:overflow-y-auto nx:pb-0",
372
- draggable: ""
373
- },
374
- hasHeader: {
375
- true: "",
376
- false: ""
377
- },
378
- hasFooter: {
379
- true: "",
380
- false: "nx:pb-6"
381
- }
330
+ });
331
+ var modalBodyVariants = classVarianceAuthority.cva("nexus-modal-body", {
332
+ variants: {
333
+ layout: {
334
+ default: "",
335
+ "bottom-sheet": "nexus-modal-body--bottom-sheet",
336
+ "slide-left": "nexus-modal-body--slide",
337
+ "slide-right": "nexus-modal-body--slide",
338
+ "full-page": "nexus-modal-body--full-page",
339
+ "full-page-reverse": "nexus-modal-body--full-page",
340
+ draggable: ""
382
341
  },
383
- compoundVariants: [
384
- {
385
- layout: "default",
386
- hasHeader: true,
387
- class: "nx:max-h-[calc(90vh-var(--hd-height,60px))]"
388
- },
389
- {
390
- layout: "default",
391
- hasHeader: true,
392
- hasFooter: true,
393
- class: "nx:max-h-[calc(90vh-var(--ft-height,88px)-var(--hd-height,60px))]"
394
- },
395
- {
396
- layout: "default",
397
- hasFooter: true,
398
- hasHeader: false,
399
- class: "nx:max-h-[calc(90vh-var(--ft-height,88px))]"
400
- },
401
- {
402
- layout: "bottom-sheet",
403
- hasHeader: true,
404
- class: "nx:max-h-[calc(100vh-var(--hd-height,60px)-124px)] nx:pb-0"
405
- },
406
- {
407
- layout: "bottom-sheet",
408
- hasHeader: true,
409
- hasFooter: true,
410
- class: "nx:max-h-[calc(100vh-var(--ft-height,88px)-var(--hd-height,60px)-100px)]"
411
- },
412
- {
413
- layout: "full-page",
414
- hasHeader: true,
415
- class: "nx:max-h-[calc(100vh-var(--hd-height,60px))] nx:pb-0"
416
- },
417
- {
418
- layout: "full-page",
419
- hasHeader: true,
420
- hasFooter: true,
421
- class: "nx:max-h-[calc(100vh-var(--ft-height,88px)-var(--hd-height,60px))]"
422
- },
423
- {
424
- layout: "full-page-reverse",
425
- hasHeader: true,
426
- class: "nx:max-h-[calc(100vh-var(--hd-height,60px))] nx:pb-0"
427
- },
428
- {
429
- layout: "full-page-reverse",
430
- hasHeader: true,
431
- hasFooter: true,
432
- class: "nx:max-h-[calc(100vh-var(--ft-height,88px)-var(--hd-height,60px))]"
433
- },
434
- {
435
- layout: "slide-left",
436
- hasHeader: true,
437
- class: "nx:max-h-[calc(100%-var(--hd-height,60px))]"
438
- },
439
- {
440
- layout: "slide-right",
441
- hasHeader: true,
442
- class: "nx:max-h-[calc(100%-var(--hd-height,60px))]"
443
- }
444
- ],
445
- defaultVariants: {
446
- layout: "default",
447
- hasHeader: false,
448
- hasFooter: false
342
+ hasHeader: {
343
+ true: "",
344
+ false: ""
345
+ },
346
+ hasFooter: {
347
+ true: "",
348
+ false: "nexus-modal-body--no-footer"
449
349
  }
350
+ },
351
+ defaultVariants: {
352
+ layout: "default",
353
+ hasHeader: false,
354
+ hasFooter: false
450
355
  }
451
- );
452
- var modalFooterVariants = classVarianceAuthority.cva(
453
- [
454
- "modal-footer",
455
- "nx:absolute nx:bottom-0 nx:left-0 nx:z-[2] nx:flex nx:w-full nx:px-5 nx:py-6 nx:pb-5",
456
- "nx:[&_button]:h-12 nx:[&_button]:flex-1"
457
- ],
458
- {
459
- variants: {
460
- layout: {
461
- default: "",
462
- "bottom-sheet": "nx:px-4 nx:py-3 nx:pb-6",
463
- "slide-left": "",
464
- "slide-right": "",
465
- "full-page": "",
466
- "full-page-reverse": "",
467
- draggable: "nx:relative"
468
- }
469
- },
470
- defaultVariants: {
471
- layout: "default"
356
+ });
357
+ var modalFooterVariants = classVarianceAuthority.cva("nexus-modal-footer", {
358
+ variants: {
359
+ layout: {
360
+ default: "",
361
+ "bottom-sheet": "nexus-modal-footer--bottom-sheet",
362
+ "slide-left": "",
363
+ "slide-right": "",
364
+ "full-page": "",
365
+ "full-page-reverse": "",
366
+ draggable: "nexus-modal-footer--draggable"
472
367
  }
368
+ },
369
+ defaultVariants: {
370
+ layout: "default"
473
371
  }
474
- );
475
- var modalDimVariants = classVarianceAuthority.cva(
476
- "dim nx:pointer-events-auto nx:fixed nx:inset-0 nx:z-[1] nx:block nx:h-screen nx:w-screen nx:bg-static-black/75",
477
- {
478
- variants: {
479
- visible: {
480
- true: "",
481
- false: "nx:hidden"
482
- }
483
- },
484
- defaultVariants: {
485
- visible: true
372
+ });
373
+ var modalDimVariants = classVarianceAuthority.cva("nexus-modal-dim", {
374
+ variants: {
375
+ visible: {
376
+ true: "",
377
+ false: "nexus-modal-dim--hidden"
486
378
  }
379
+ },
380
+ defaultVariants: {
381
+ visible: true
487
382
  }
488
- );
383
+ });
489
384
  var CloseIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
490
385
  "svg",
491
386
  {
492
- className: "nx:w-5 nx:h-5 nx:text-text-muted",
387
+ className: "nexus-modal-close-icon",
493
388
  fill: "none",
494
389
  stroke: "currentColor",
495
390
  viewBox: "0 0 24 24",
@@ -564,6 +459,37 @@ var ModalTemplate = React.forwardRef(
564
459
  }
565
460
  }, []);
566
461
  React.useImperativeHandle(ref, () => elRef.current);
462
+ React.useEffect(() => {
463
+ const inner = innerRef.current;
464
+ if (!inner) return;
465
+ const focusableSelector = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
466
+ const handleKeyDown = (e) => {
467
+ if (e.key !== "Tab") return;
468
+ const focusable = inner.querySelectorAll(focusableSelector);
469
+ if (focusable.length === 0) return;
470
+ const first = focusable[0];
471
+ const last = focusable[focusable.length - 1];
472
+ if (e.shiftKey) {
473
+ if (document.activeElement === first) {
474
+ e.preventDefault();
475
+ last.focus();
476
+ }
477
+ } else {
478
+ if (document.activeElement === last) {
479
+ e.preventDefault();
480
+ first.focus();
481
+ }
482
+ }
483
+ };
484
+ inner.addEventListener("keydown", handleKeyDown);
485
+ const prev = document.activeElement;
486
+ const firstFocusable = inner.querySelector(focusableSelector);
487
+ firstFocusable?.focus();
488
+ return () => {
489
+ inner.removeEventListener("keydown", handleKeyDown);
490
+ prev?.focus();
491
+ };
492
+ }, []);
567
493
  const hasHeader = !hideHeader;
568
494
  const hasFooter = !hideFooter;
569
495
  const wrapStyle = {};
@@ -587,7 +513,7 @@ var ModalTemplate = React.forwardRef(
587
513
  "div",
588
514
  {
589
515
  ref: elRef,
590
- className: chunkQJNQCLMV_js.cn(modalWrapVariants({ layout }), className),
516
+ className: chunkCZC76ZD5_js.cn(modalWrapVariants({ layout }), className),
591
517
  style: wrapStyle,
592
518
  onTouchStart: isBottomSheet ? dragHandlers.onTouchStart : void 0,
593
519
  onTouchMove: isBottomSheet ? dragHandlers.onTouchMove : void 0,
@@ -599,7 +525,7 @@ var ModalTemplate = React.forwardRef(
599
525
  tabIndex: -1,
600
526
  role: "button",
601
527
  "aria-label": "modal-dim",
602
- className: chunkQJNQCLMV_js.cn(modalDimVariants({ visible: showDim }), dimClassName),
528
+ className: chunkCZC76ZD5_js.cn(modalDimVariants({ visible: showDim }), dimClassName),
603
529
  style: isBottomSheet ? {
604
530
  opacity: dragHandlers.dimOpacity,
605
531
  transition: dragHandlers.isAnimating ? "opacity 250ms ease-out" : void 0
@@ -616,10 +542,7 @@ var ModalTemplate = React.forwardRef(
616
542
  tabIndex: -1,
617
543
  role: "button",
618
544
  "aria-label": "modal-dim",
619
- className: chunkQJNQCLMV_js.cn(
620
- "dim nx:pointer-events-auto nx:fixed nx:inset-0 nx:z-[1] nx:block nx:h-screen nx:w-screen nx:bg-static-black/30",
621
- dimClassName
622
- ),
545
+ className: chunkCZC76ZD5_js.cn("nexus-modal-dim nexus-modal-dim--draggable", dimClassName),
623
546
  onClick: closeModal2
624
547
  }
625
548
  ),
@@ -627,32 +550,37 @@ var ModalTemplate = React.forwardRef(
627
550
  "div",
628
551
  {
629
552
  ref: innerRef,
630
- className: chunkQJNQCLMV_js.cn(
553
+ role: "dialog",
554
+ "aria-modal": "true",
555
+ "aria-label": typeof title === "string" ? title : void 0,
556
+ className: chunkCZC76ZD5_js.cn(
631
557
  modalInnerVariants({ layout, hasFooter }),
632
558
  innerClassName
633
559
  ),
634
560
  style: innerStyle,
635
561
  children: [
636
- isBottomSheet && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nx:flex nx:w-full nx:justify-center nx:pt-3 nx:pb-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nx:bg-border-default nx:h-1.5 nx:w-16 nx:rounded-full" }) }),
637
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nx:contents", children: [
562
+ isBottomSheet && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-modal-bottom-sheet-handle", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-modal-bottom-sheet-bar" }) }),
563
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nexus-contents", children: [
638
564
  hasHeader && /* @__PURE__ */ jsxRuntime.jsxs(
639
565
  "header",
640
566
  {
641
- className: chunkQJNQCLMV_js.cn(modalHeaderVariants({ layout }), headerClassName),
567
+ className: chunkCZC76ZD5_js.cn(modalHeaderVariants({ layout }), headerClassName),
642
568
  ref: modalHeaderRef,
643
569
  onMouseDown: isDraggable && enableDrag ? windowDrag.handleMouseDown : void 0,
644
570
  children: [
645
571
  /* @__PURE__ */ jsxRuntime.jsx(
646
572
  "button",
647
573
  {
574
+ type: "button",
648
575
  className: modalCloseButtonVariants({ layout }),
649
576
  onClick: () => close(),
577
+ "aria-label": "Close",
650
578
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
651
579
  }
652
580
  ),
653
581
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "modal-header-inner", children: [
654
582
  title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: modalTitleVariants({ layout }), children: title }),
655
- desc && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "modal-desc nx:text-text-muted nx:text-xs nx:mt-1", children: desc })
583
+ desc && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "nexus-modal-desc", children: desc })
656
584
  ] })
657
585
  ]
658
586
  }
@@ -660,7 +588,7 @@ var ModalTemplate = React.forwardRef(
660
588
  /* @__PURE__ */ jsxRuntime.jsx(
661
589
  "section",
662
590
  {
663
- className: chunkQJNQCLMV_js.cn(
591
+ className: chunkCZC76ZD5_js.cn(
664
592
  modalBodyVariants({ layout, hasHeader, hasFooter }),
665
593
  bodyClassName
666
594
  ),
@@ -671,7 +599,7 @@ var ModalTemplate = React.forwardRef(
671
599
  "footer",
672
600
  {
673
601
  ref: modalFooterRef,
674
- className: chunkQJNQCLMV_js.cn(modalFooterVariants({ layout }), footerClassName),
602
+ className: chunkCZC76ZD5_js.cn(modalFooterVariants({ layout }), footerClassName),
675
603
  children: footer
676
604
  }
677
605
  )