@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,104 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkQJNQCLMV_js = require('./chunk-QJNQCLMV.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 textInputVariants = classVarianceAuthority.cva(
29
- [
30
- "nx:flex nx:w-full nx:rounded-md nx:border nx:bg-surface-default nx:text-sm nx:text-text-primary",
31
- "nx:transition-colors nx:duration-200",
32
- "nx:placeholder:text-text-tertiary",
33
- "nx:disabled:cursor-not-allowed nx:disabled:opacity-50"
34
- ],
35
- {
36
- variants: {
37
- size: {
38
- sm: "nx:h-8 nx:px-2.5 nx:text-xs",
39
- md: "nx:h-10 nx:px-3 nx:text-sm",
40
- lg: "nx:h-12 nx:px-4 nx:text-base"
41
- },
42
- state: {
43
- default: "nx:border-border-default nx:focus-within:border-text-primary",
44
- error: "nx:border-status-negative nx:focus-within:border-status-negative"
45
- }
46
- },
47
- defaultVariants: {
48
- size: "md",
49
- state: "default"
50
- }
51
- }
52
- );
53
- var TextInput = React__namespace.forwardRef(
54
- ({ className, size, error, prefixIcon, suffixIcon, onValueChange, onChange, ...props }, ref) => {
55
- const state = error ? "error" : "default";
56
- const handleChange = React__namespace.useCallback(
57
- (e) => {
58
- onValueChange?.(e.target.value);
59
- onChange?.(e);
60
- },
61
- [onValueChange, onChange]
62
- );
63
- if (prefixIcon || suffixIcon) {
64
- return /* @__PURE__ */ jsxRuntime.jsxs(
65
- "div",
66
- {
67
- className: chunkQJNQCLMV_js.cn(
68
- textInputVariants({ size, state }),
69
- "nx:items-center nx:gap-2",
70
- className
71
- ),
72
- children: [
73
- prefixIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nx:flex nx:shrink-0 nx:text-text-tertiary", children: prefixIcon }),
74
- /* @__PURE__ */ jsxRuntime.jsx(
75
- "input",
76
- {
77
- ref,
78
- className: "nx:h-full nx:w-full nx:bg-transparent nx:outline-none nx:placeholder:text-text-tertiary",
79
- "aria-invalid": error || void 0,
80
- onChange: handleChange,
81
- ...props
82
- }
83
- ),
84
- suffixIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nx:flex nx:shrink-0 nx:text-text-tertiary", children: suffixIcon })
85
- ]
86
- }
87
- );
88
- }
89
- return /* @__PURE__ */ jsxRuntime.jsx(
90
- "input",
91
- {
92
- ref,
93
- className: chunkQJNQCLMV_js.cn(textInputVariants({ size, state }), className),
94
- "aria-invalid": error || void 0,
95
- onChange: handleChange,
96
- ...props
97
- }
98
- );
99
- }
100
- );
101
- TextInput.displayName = "TextInput";
102
-
103
- exports.TextInput = TextInput;
104
- exports.textInputVariants = textInputVariants;
@@ -1,86 +0,0 @@
1
- import { cn } from './chunk-XALPBGSC.mjs';
2
- import { Toaster as Toaster$1, toast } from 'sonner';
3
- export { toast } from 'sonner';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- function Toaster({
7
- position = "top-center",
8
- unstyled = false,
9
- toastOptions,
10
- ...props
11
- }) {
12
- return /* @__PURE__ */ jsx(
13
- Toaster$1,
14
- {
15
- position,
16
- toastOptions: {
17
- unstyled,
18
- ...toastOptions,
19
- classNames: {
20
- toast: cn(
21
- !unstyled && "nx:flex nx:items-center nx:gap-3 nx:rounded-lg nx:border nx:px-4 nx:py-3 nx:shadow-lg",
22
- !unstyled && "nx:bg-surface-default nx:border-border-default nx:text-text-primary",
23
- toastOptions?.classNames?.toast
24
- ),
25
- title: cn(!unstyled && "nx:text-sm nx:font-medium", toastOptions?.classNames?.title),
26
- description: cn(
27
- !unstyled && "nx:text-xs nx:text-text-secondary",
28
- toastOptions?.classNames?.description
29
- ),
30
- success: cn(
31
- !unstyled && "nx:border-status-positive/30 nx:bg-status-positive/10 nx:text-status-positive",
32
- toastOptions?.classNames?.success
33
- ),
34
- error: cn(
35
- !unstyled && "nx:border-status-negative/30 nx:bg-status-negative/10 nx:text-status-negative",
36
- toastOptions?.classNames?.error
37
- ),
38
- warning: cn(
39
- !unstyled && "nx:border-status-caution/30 nx:bg-status-caution/10 nx:text-status-caution",
40
- toastOptions?.classNames?.warning
41
- ),
42
- info: cn(
43
- !unstyled && "nx:border-accent-primary/30 nx:bg-accent-primary/10 nx:text-accent-primary",
44
- toastOptions?.classNames?.info
45
- ),
46
- actionButton: cn(
47
- !unstyled && "nx:bg-accent-primary nx:text-accent-on-primary nx:rounded nx:px-3 nx:py-1.5 nx:text-xs nx:font-medium",
48
- toastOptions?.classNames?.actionButton
49
- ),
50
- cancelButton: cn(
51
- !unstyled && "nx:bg-surface-hover nx:text-text-secondary nx:rounded nx:px-3 nx:py-1.5 nx:text-xs nx:font-medium",
52
- toastOptions?.classNames?.cancelButton
53
- ),
54
- closeButton: cn(
55
- !unstyled && "nx:text-text-tertiary nx:hover:text-text-primary",
56
- toastOptions?.classNames?.closeButton
57
- ),
58
- ...toastOptions?.classNames
59
- }
60
- },
61
- ...props
62
- }
63
- );
64
- }
65
- function useToast() {
66
- const showToast = (message, options) => toast(message, options);
67
- const successToast = (message, options) => toast.success(message, options);
68
- const errorToast = (message, options) => toast.error(message, options);
69
- const warningToast = (message, options) => toast.warning(message, options);
70
- const infoToast = (message, options) => toast.info(message, options);
71
- const promiseToast = (promise, msgs, options) => toast.promise(promise, { ...msgs, ...options });
72
- const customToast = (jsx2, options) => toast.custom(jsx2, options);
73
- const dismissToast = (id) => toast.dismiss(id);
74
- return {
75
- toast: showToast,
76
- successToast,
77
- errorToast,
78
- warningToast,
79
- infoToast,
80
- promiseToast,
81
- customToast,
82
- dismissToast
83
- };
84
- }
85
-
86
- export { Toaster, useToast };
@@ -1,113 +0,0 @@
1
- import { cn } from './chunk-XALPBGSC.mjs';
2
- import * as React from 'react';
3
- import { Slot } from '@radix-ui/react-slot';
4
- import { cva } from 'class-variance-authority';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var buttonVariants = cva(
8
- [
9
- "nx:inline-flex nx:items-center nx:justify-center nx:gap-comp-btn-gap nx:whitespace-nowrap",
10
- "nx:shadow-comp-btn nx:transition-colors nx:duration-200 nx:select-none",
11
- "nx:disabled:pointer-events-none nx:disabled:opacity-comp-btn-disabled",
12
- "nx:aria-disabled:pointer-events-none nx:aria-disabled:opacity-comp-btn-disabled",
13
- "nx:focus-visible:outline-none nx:focus-visible:ring-2 nx:focus-visible:ring-comp-btn-focus-ring/50"
14
- ],
15
- {
16
- variants: {
17
- semantic: {
18
- primary: "btn-palette-primary",
19
- secondary: "btn-palette-secondary",
20
- normal: "btn-palette-normal",
21
- danger: "btn-palette-danger"
22
- },
23
- variant: {
24
- contained: "nx:bg-[var(--_btn-base)] nx:text-[var(--_btn-on)] nx:hover:bg-[var(--_btn-hover)] nx:active:bg-[var(--_btn-pressed)]",
25
- outlined: [
26
- "nx:border nx:border-solid nx:border-[var(--_btn-border)] nx:text-[var(--_btn-text)] nx:bg-[var(--_btn-outlined-bg)]",
27
- "nx:hover:bg-[var(--_btn-outlined-hover-bg)] nx:hover:border-[var(--_btn-border-hover)]",
28
- "nx:active:bg-[var(--_btn-outlined-pressed-bg)] nx:active:border-[var(--_btn-border-hover)]"
29
- ].join(" "),
30
- subtle: "nx:bg-[var(--_btn-subtle-fill)] nx:text-[var(--_btn-text)] nx:hover:bg-[var(--_btn-light-bg)] nx:active:bg-[var(--_btn-light-bg)]",
31
- ghost: "nx:bg-transparent nx:text-[var(--_btn-text)] nx:hover:bg-[var(--_btn-ghost-hover-bg)] nx:active:bg-[var(--_btn-ghost-pressed-bg)]"
32
- },
33
- size: {
34
- xl: "nx:h-comp-btn-xl-h nx:px-comp-btn-xl-px nx:text-comp-btn-xl nx:font-semibold nx:rounded-comp-btn-xl",
35
- lg: "nx:h-comp-btn-lg-h nx:px-comp-btn-lg-px nx:text-comp-btn-lg nx:font-semibold nx:rounded-comp-btn-lg",
36
- md: "nx:h-comp-btn-md-h nx:px-comp-btn-md-px nx:text-comp-btn-md nx:font-medium nx:rounded-comp-btn-md",
37
- sm: "nx:px-comp-btn-sm-px nx:py-comp-btn-sm-py nx:text-comp-btn-sm nx:font-medium nx:rounded-comp-btn-sm"
38
- },
39
- radius: {
40
- default: "",
41
- circle: "nx:!rounded-full"
42
- }
43
- },
44
- defaultVariants: {
45
- semantic: "primary",
46
- variant: "contained",
47
- size: "md",
48
- radius: "default"
49
- }
50
- }
51
- );
52
- var Button = React.forwardRef(
53
- ({
54
- className,
55
- semantic,
56
- variant,
57
- size,
58
- radius,
59
- asChild = false,
60
- detectDoubleClick = false,
61
- disabled,
62
- children,
63
- onClick,
64
- style,
65
- ...props
66
- }, ref) => {
67
- const clickTimeoutRef = React.useRef(
68
- null
69
- );
70
- const handleClick = React.useCallback(
71
- (e) => {
72
- if (detectDoubleClick && clickTimeoutRef.current) return;
73
- onClick?.(e);
74
- if (detectDoubleClick) {
75
- clickTimeoutRef.current = setTimeout(() => {
76
- clickTimeoutRef.current = null;
77
- }, 500);
78
- }
79
- },
80
- [detectDoubleClick, onClick]
81
- );
82
- const Comp = asChild ? Slot : "button";
83
- const resolvedStyle = React.useMemo(
84
- () => ({
85
- color: variant === "contained" ? "var(--_btn-on)" : "var(--_btn-text)",
86
- ...style
87
- }),
88
- [style, variant]
89
- );
90
- return /* @__PURE__ */ jsx(
91
- Comp,
92
- {
93
- ref,
94
- type: asChild ? void 0 : "button",
95
- role: asChild ? "button" : void 0,
96
- className: cn(
97
- buttonVariants({ semantic, variant, size, radius }),
98
- className
99
- ),
100
- disabled: asChild ? void 0 : disabled,
101
- "aria-disabled": disabled || void 0,
102
- tabIndex: disabled ? -1 : void 0,
103
- onClick: disabled ? void 0 : handleClick,
104
- style: resolvedStyle,
105
- ...props,
106
- children
107
- }
108
- );
109
- }
110
- );
111
- Button.displayName = "Button";
112
-
113
- export { Button, buttonVariants };
@@ -1,88 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkQJNQCLMV_js = require('./chunk-QJNQCLMV.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(
29
- [
30
- "nx:w-full nx:rounded-md nx:border nx:bg-surface-default nx:px-3 nx:py-2 nx:text-sm nx:text-text-primary",
31
- "nx:transition-colors nx:duration-200 nx:resize-none",
32
- "nx:placeholder:text-text-tertiary",
33
- "nx:disabled:cursor-not-allowed nx:disabled:opacity-50"
34
- ],
35
- {
36
- variants: {
37
- state: {
38
- default: "nx:border-border-default nx:focus:border-text-primary",
39
- error: "nx:border-status-negative nx:focus:border-status-negative"
40
- }
41
- },
42
- defaultVariants: { state: "default" }
43
- }
44
- );
45
- var TextArea = React__namespace.forwardRef(
46
- ({ className, error, showCount, maxLength, onValueChange, onChange, ...props }, ref) => {
47
- const state = error ? "error" : "default";
48
- const [count, setCount] = React__namespace.useState(0);
49
- const handleChange = React__namespace.useCallback(
50
- (e) => {
51
- setCount(e.target.value.length);
52
- onValueChange?.(e.target.value);
53
- onChange?.(e);
54
- },
55
- [onValueChange, onChange]
56
- );
57
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nx:flex nx:flex-col", children: [
58
- /* @__PURE__ */ jsxRuntime.jsx(
59
- "textarea",
60
- {
61
- ref,
62
- className: chunkQJNQCLMV_js.cn(textAreaVariants({ state }), className),
63
- maxLength,
64
- "aria-invalid": error || void 0,
65
- onChange: handleChange,
66
- ...props
67
- }
68
- ),
69
- showCount && maxLength && /* @__PURE__ */ jsxRuntime.jsxs(
70
- "p",
71
- {
72
- className: "nx:mt-1 nx:text-right nx:text-xs nx:text-text-tertiary",
73
- "aria-live": "polite",
74
- "aria-atomic": "true",
75
- children: [
76
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nx:text-text-primary nx:font-medium", children: count.toLocaleString() }),
77
- "/",
78
- maxLength.toLocaleString()
79
- ]
80
- }
81
- )
82
- ] });
83
- }
84
- );
85
- TextArea.displayName = "TextArea";
86
-
87
- exports.TextArea = TextArea;
88
- exports.textAreaVariants = textAreaVariants;
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- var clsx = require('clsx');
4
- var tailwindMerge = require('tailwind-merge');
5
-
6
- // src/utils/cn.ts
7
- var PREFIX = "nx:";
8
- var twMerge = tailwindMerge.extendTailwindMerge({ prefix: "nx" });
9
- function cn(...inputs) {
10
- const flat = clsx.clsx(inputs);
11
- const tokens = flat.split(/\s+/).filter(Boolean);
12
- const nxTokens = [];
13
- const plainTokens = [];
14
- for (const t of tokens) {
15
- (t.startsWith(PREFIX) ? nxTokens : plainTokens).push(t);
16
- }
17
- if (plainTokens.length === 0) return twMerge(flat);
18
- if (nxTokens.length === 0) return flat;
19
- const prefixed = plainTokens.map((t) => `${PREFIX}${t}`);
20
- const prefixedSet = new Set(prefixed);
21
- const merged = twMerge([...nxTokens, ...prefixed].join(" "));
22
- return merged.split(/\s+/).filter(Boolean).map((cls) => prefixedSet.has(cls) ? cls.slice(PREFIX.length) : cls).join(" ");
23
- }
24
-
25
- exports.cn = cn;
@@ -1,81 +0,0 @@
1
- import { cn } from './chunk-XALPBGSC.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(
7
- [
8
- "nx:flex nx:w-full nx:rounded-md nx:border nx:bg-surface-default nx:text-sm nx:text-text-primary",
9
- "nx:transition-colors nx:duration-200",
10
- "nx:placeholder:text-text-tertiary",
11
- "nx:disabled:cursor-not-allowed nx:disabled:opacity-50"
12
- ],
13
- {
14
- variants: {
15
- size: {
16
- sm: "nx:h-8 nx:px-2.5 nx:text-xs",
17
- md: "nx:h-10 nx:px-3 nx:text-sm",
18
- lg: "nx:h-12 nx:px-4 nx:text-base"
19
- },
20
- state: {
21
- default: "nx:border-border-default nx:focus-within:border-text-primary",
22
- error: "nx:border-status-negative nx:focus-within:border-status-negative"
23
- }
24
- },
25
- defaultVariants: {
26
- size: "md",
27
- state: "default"
28
- }
29
- }
30
- );
31
- var TextInput = React.forwardRef(
32
- ({ className, size, error, prefixIcon, suffixIcon, onValueChange, onChange, ...props }, ref) => {
33
- const state = error ? "error" : "default";
34
- const handleChange = React.useCallback(
35
- (e) => {
36
- onValueChange?.(e.target.value);
37
- onChange?.(e);
38
- },
39
- [onValueChange, onChange]
40
- );
41
- if (prefixIcon || suffixIcon) {
42
- return /* @__PURE__ */ jsxs(
43
- "div",
44
- {
45
- className: cn(
46
- textInputVariants({ size, state }),
47
- "nx:items-center nx:gap-2",
48
- className
49
- ),
50
- children: [
51
- prefixIcon && /* @__PURE__ */ jsx("span", { className: "nx:flex nx:shrink-0 nx:text-text-tertiary", children: prefixIcon }),
52
- /* @__PURE__ */ jsx(
53
- "input",
54
- {
55
- ref,
56
- className: "nx:h-full nx:w-full nx:bg-transparent nx:outline-none nx:placeholder:text-text-tertiary",
57
- "aria-invalid": error || void 0,
58
- onChange: handleChange,
59
- ...props
60
- }
61
- ),
62
- suffixIcon && /* @__PURE__ */ jsx("span", { className: "nx:flex nx:shrink-0 nx:text-text-tertiary", children: suffixIcon })
63
- ]
64
- }
65
- );
66
- }
67
- return /* @__PURE__ */ jsx(
68
- "input",
69
- {
70
- ref,
71
- className: cn(textInputVariants({ size, state }), className),
72
- "aria-invalid": error || void 0,
73
- onChange: handleChange,
74
- ...props
75
- }
76
- );
77
- }
78
- );
79
- TextInput.displayName = "TextInput";
80
-
81
- export { TextInput, textInputVariants };
@@ -1,65 +0,0 @@
1
- import { cn } from './chunk-XALPBGSC.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 textAreaVariants = cva(
7
- [
8
- "nx:w-full nx:rounded-md nx:border nx:bg-surface-default nx:px-3 nx:py-2 nx:text-sm nx:text-text-primary",
9
- "nx:transition-colors nx:duration-200 nx:resize-none",
10
- "nx:placeholder:text-text-tertiary",
11
- "nx:disabled:cursor-not-allowed nx:disabled:opacity-50"
12
- ],
13
- {
14
- variants: {
15
- state: {
16
- default: "nx:border-border-default nx:focus:border-text-primary",
17
- error: "nx:border-status-negative nx:focus:border-status-negative"
18
- }
19
- },
20
- defaultVariants: { state: "default" }
21
- }
22
- );
23
- var TextArea = React.forwardRef(
24
- ({ className, error, showCount, maxLength, onValueChange, onChange, ...props }, ref) => {
25
- const state = error ? "error" : "default";
26
- const [count, setCount] = React.useState(0);
27
- const handleChange = React.useCallback(
28
- (e) => {
29
- setCount(e.target.value.length);
30
- onValueChange?.(e.target.value);
31
- onChange?.(e);
32
- },
33
- [onValueChange, onChange]
34
- );
35
- return /* @__PURE__ */ jsxs("div", { className: "nx:flex nx:flex-col", children: [
36
- /* @__PURE__ */ jsx(
37
- "textarea",
38
- {
39
- ref,
40
- className: cn(textAreaVariants({ state }), className),
41
- maxLength,
42
- "aria-invalid": error || void 0,
43
- onChange: handleChange,
44
- ...props
45
- }
46
- ),
47
- showCount && maxLength && /* @__PURE__ */ jsxs(
48
- "p",
49
- {
50
- className: "nx:mt-1 nx:text-right nx:text-xs nx:text-text-tertiary",
51
- "aria-live": "polite",
52
- "aria-atomic": "true",
53
- children: [
54
- /* @__PURE__ */ jsx("span", { className: "nx:text-text-primary nx:font-medium", children: count.toLocaleString() }),
55
- "/",
56
- maxLength.toLocaleString()
57
- ]
58
- }
59
- )
60
- ] });
61
- }
62
- );
63
- TextArea.displayName = "TextArea";
64
-
65
- export { TextArea, textAreaVariants };