@nori-ui/core 0.0.5 → 1.0.2

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 (387) hide show
  1. package/dist/animation/animated-view.cjs +13 -0
  2. package/dist/animation/animated-view.cjs.map +1 -0
  3. package/dist/animation/animated-view.d.cts +6 -0
  4. package/dist/animation/animated-view.d.ts +6 -0
  5. package/dist/animation/animated-view.js +4 -0
  6. package/dist/animation/animated-view.js.map +1 -0
  7. package/dist/animation/animated-view.web.cjs +9 -0
  8. package/dist/animation/animated-view.web.cjs.map +1 -0
  9. package/dist/animation/animated-view.web.d.cts +5 -0
  10. package/dist/animation/animated-view.web.d.ts +5 -0
  11. package/dist/animation/animated-view.web.js +8 -0
  12. package/dist/animation/animated-view.web.js.map +1 -0
  13. package/dist/animation/use-animated-number.cjs +80 -0
  14. package/dist/animation/use-animated-number.cjs.map +1 -0
  15. package/dist/animation/use-animated-number.d.cts +8 -0
  16. package/dist/animation/use-animated-number.d.ts +8 -0
  17. package/dist/animation/use-animated-number.js +4 -0
  18. package/dist/animation/use-animated-number.js.map +1 -0
  19. package/dist/animation/use-animated-number.web.cjs +28 -0
  20. package/dist/animation/use-animated-number.web.cjs.map +1 -0
  21. package/dist/animation/use-animated-number.web.d.cts +8 -0
  22. package/dist/animation/use-animated-number.web.d.ts +8 -0
  23. package/dist/animation/use-animated-number.web.js +25 -0
  24. package/dist/animation/use-animated-number.web.js.map +1 -0
  25. package/dist/{chunk-RX7UULY3.js → chunk-33S7ADWM.js} +3 -3
  26. package/dist/{chunk-RX7UULY3.js.map → chunk-33S7ADWM.js.map} +1 -1
  27. package/dist/chunk-3BDDPFCI.js +108 -0
  28. package/dist/chunk-3BDDPFCI.js.map +1 -0
  29. package/dist/chunk-3F4TXKDY.js +314 -0
  30. package/dist/chunk-3F4TXKDY.js.map +1 -0
  31. package/dist/chunk-5A2QOOVN.js +15 -0
  32. package/dist/chunk-5A2QOOVN.js.map +1 -0
  33. package/dist/chunk-5XEGZFG5.js +208 -0
  34. package/dist/chunk-5XEGZFG5.js.map +1 -0
  35. package/dist/chunk-6AD6KCVB.js +178 -0
  36. package/dist/chunk-6AD6KCVB.js.map +1 -0
  37. package/dist/chunk-7GPDNQSX.js +967 -0
  38. package/dist/chunk-7GPDNQSX.js.map +1 -0
  39. package/dist/chunk-7UKRN73P.js +42 -0
  40. package/dist/chunk-7UKRN73P.js.map +1 -0
  41. package/dist/chunk-7Z4NMNX6.js +64 -0
  42. package/dist/chunk-7Z4NMNX6.js.map +1 -0
  43. package/dist/chunk-ACLHDHX3.js +29 -0
  44. package/dist/chunk-ACLHDHX3.js.map +1 -0
  45. package/dist/chunk-BZLT6R62.js +80 -0
  46. package/dist/chunk-BZLT6R62.js.map +1 -0
  47. package/dist/chunk-CCUXO2HN.js +450 -0
  48. package/dist/chunk-CCUXO2HN.js.map +1 -0
  49. package/dist/chunk-CHXHRJNZ.js +43 -0
  50. package/dist/chunk-CHXHRJNZ.js.map +1 -0
  51. package/dist/chunk-DDGMLLS3.js +188 -0
  52. package/dist/chunk-DDGMLLS3.js.map +1 -0
  53. package/dist/chunk-EWWQQ5DB.js +654 -0
  54. package/dist/chunk-EWWQQ5DB.js.map +1 -0
  55. package/dist/chunk-FEPTH5RV.js +169 -0
  56. package/dist/chunk-FEPTH5RV.js.map +1 -0
  57. package/dist/{chunk-SSTXLK5I.js → chunk-FT2XBBQJ.js} +42 -6
  58. package/dist/chunk-FT2XBBQJ.js.map +1 -0
  59. package/dist/chunk-IKLA2CVQ.js +260 -0
  60. package/dist/chunk-IKLA2CVQ.js.map +1 -0
  61. package/dist/chunk-JQQ3FBN7.js +18 -0
  62. package/dist/chunk-JQQ3FBN7.js.map +1 -0
  63. package/dist/chunk-JSAG5YO7.js +69 -0
  64. package/dist/chunk-JSAG5YO7.js.map +1 -0
  65. package/dist/chunk-JZ774T7U.js +76 -0
  66. package/dist/chunk-JZ774T7U.js.map +1 -0
  67. package/dist/chunk-KWRDJPP3.js +10 -0
  68. package/dist/chunk-KWRDJPP3.js.map +1 -0
  69. package/dist/chunk-LVWNMQGR.js +1106 -0
  70. package/dist/chunk-LVWNMQGR.js.map +1 -0
  71. package/dist/chunk-LWLK6HSW.js +143 -0
  72. package/dist/chunk-LWLK6HSW.js.map +1 -0
  73. package/dist/chunk-MDOZGILD.js +134 -0
  74. package/dist/chunk-MDOZGILD.js.map +1 -0
  75. package/dist/chunk-MKSDYRWQ.js +446 -0
  76. package/dist/chunk-MKSDYRWQ.js.map +1 -0
  77. package/dist/chunk-MRJWPRCX.js +80 -0
  78. package/dist/chunk-MRJWPRCX.js.map +1 -0
  79. package/dist/chunk-NRYWNOG5.js +410 -0
  80. package/dist/chunk-NRYWNOG5.js.map +1 -0
  81. package/dist/chunk-OMU4R4Y5.js +144 -0
  82. package/dist/chunk-OMU4R4Y5.js.map +1 -0
  83. package/dist/chunk-PNP7L4TA.js +103 -0
  84. package/dist/chunk-PNP7L4TA.js.map +1 -0
  85. package/dist/chunk-QI6646JZ.js +3 -0
  86. package/dist/{chunk-UAKFCMWK.js.map → chunk-QI6646JZ.js.map} +1 -1
  87. package/dist/chunk-QJNV7YQP.js +138 -0
  88. package/dist/chunk-QJNV7YQP.js.map +1 -0
  89. package/dist/chunk-R5JMDDCB.js +292 -0
  90. package/dist/chunk-R5JMDDCB.js.map +1 -0
  91. package/dist/chunk-RB3YBWQ4.js +77 -0
  92. package/dist/chunk-RB3YBWQ4.js.map +1 -0
  93. package/dist/chunk-RFW5SRZA.js +23 -0
  94. package/dist/chunk-RFW5SRZA.js.map +1 -0
  95. package/dist/chunk-RGJ3NBKE.js +8 -0
  96. package/dist/chunk-RGJ3NBKE.js.map +1 -0
  97. package/dist/chunk-SFNDR6DI.js +485 -0
  98. package/dist/chunk-SFNDR6DI.js.map +1 -0
  99. package/dist/chunk-SWC5CNKE.js +13 -0
  100. package/dist/chunk-SWC5CNKE.js.map +1 -0
  101. package/dist/chunk-TLS54G6Y.js +15 -0
  102. package/dist/chunk-TLS54G6Y.js.map +1 -0
  103. package/dist/chunk-WCQVDF3K.js +12 -0
  104. package/dist/{chunk-7QVYU63E.js.map → chunk-WCQVDF3K.js.map} +1 -1
  105. package/dist/chunk-WGT345SV.js +427 -0
  106. package/dist/chunk-WGT345SV.js.map +1 -0
  107. package/dist/chunk-X7APG7G2.js +1566 -0
  108. package/dist/chunk-X7APG7G2.js.map +1 -0
  109. package/dist/chunk-XALU6LOT.js +306 -0
  110. package/dist/chunk-XALU6LOT.js.map +1 -0
  111. package/dist/chunk-YNKKEO2A.js +336 -0
  112. package/dist/chunk-YNKKEO2A.js.map +1 -0
  113. package/dist/chunk-ZBW3BA5R.js +148 -0
  114. package/dist/chunk-ZBW3BA5R.js.map +1 -0
  115. package/dist/{chunk-FXKIWONG.js → chunk-ZIBNLXIV.js} +12 -6
  116. package/dist/chunk-ZIBNLXIV.js.map +1 -0
  117. package/dist/chunk-ZMSIYLSI.js +563 -0
  118. package/dist/chunk-ZMSIYLSI.js.map +1 -0
  119. package/dist/chunk-ZQMNGPLE.js +981 -0
  120. package/dist/chunk-ZQMNGPLE.js.map +1 -0
  121. package/dist/chunk-ZRD4FQBT.js +153 -0
  122. package/dist/chunk-ZRD4FQBT.js.map +1 -0
  123. package/dist/client.cjs +11289 -439
  124. package/dist/client.cjs.map +1 -1
  125. package/dist/client.d.cts +68 -117
  126. package/dist/client.d.ts +68 -117
  127. package/dist/client.js +58 -40
  128. package/dist/client.js.map +1 -1
  129. package/dist/components/Accordion/index.cjs +900 -0
  130. package/dist/components/Accordion/index.cjs.map +1 -0
  131. package/dist/components/Accordion/index.d.cts +72 -0
  132. package/dist/components/Accordion/index.d.ts +72 -0
  133. package/dist/components/Accordion/index.js +10 -0
  134. package/dist/components/Accordion/index.js.map +1 -0
  135. package/dist/components/Alert/index.cjs +567 -0
  136. package/dist/components/Alert/index.cjs.map +1 -0
  137. package/dist/components/Alert/index.d.cts +41 -0
  138. package/dist/components/Alert/index.d.ts +41 -0
  139. package/dist/components/Alert/index.js +8 -0
  140. package/dist/components/Alert/index.js.map +1 -0
  141. package/dist/components/AlertDialog/index.cjs +892 -0
  142. package/dist/components/AlertDialog/index.cjs.map +1 -0
  143. package/dist/components/AlertDialog/index.d.cts +68 -0
  144. package/dist/components/AlertDialog/index.d.ts +68 -0
  145. package/dist/components/AlertDialog/index.js +9 -0
  146. package/dist/components/AlertDialog/index.js.map +1 -0
  147. package/dist/components/Avatar/index.cjs +427 -0
  148. package/dist/components/Avatar/index.cjs.map +1 -0
  149. package/dist/components/Avatar/index.d.cts +40 -0
  150. package/dist/components/Avatar/index.d.ts +40 -0
  151. package/dist/components/Avatar/index.js +7 -0
  152. package/dist/components/Avatar/index.js.map +1 -0
  153. package/dist/components/Badge/index.cjs +433 -0
  154. package/dist/components/Badge/index.cjs.map +1 -0
  155. package/dist/components/Badge/index.d.cts +35 -0
  156. package/dist/components/Badge/index.d.ts +35 -0
  157. package/dist/components/Badge/index.js +7 -0
  158. package/dist/components/Badge/index.js.map +1 -0
  159. package/dist/components/Box/index.cjs +415 -0
  160. package/dist/components/Box/index.cjs.map +1 -0
  161. package/dist/components/Box/index.d.cts +24 -0
  162. package/dist/components/Box/index.d.ts +24 -0
  163. package/dist/components/Box/index.js +9 -0
  164. package/dist/components/Box/index.js.map +1 -0
  165. package/dist/components/Breadcrumb/index.cjs +1939 -0
  166. package/dist/components/Breadcrumb/index.cjs.map +1 -0
  167. package/dist/components/Breadcrumb/index.d.cts +186 -0
  168. package/dist/components/Breadcrumb/index.d.ts +186 -0
  169. package/dist/components/Breadcrumb/index.js +11 -0
  170. package/dist/components/Breadcrumb/index.js.map +1 -0
  171. package/dist/components/Button/index.cjs +631 -0
  172. package/dist/components/Button/index.cjs.map +1 -0
  173. package/dist/components/Button/index.d.cts +27 -0
  174. package/dist/components/Button/index.d.ts +27 -0
  175. package/dist/components/Button/index.js +9 -0
  176. package/dist/components/Button/index.js.map +1 -0
  177. package/dist/components/Calendar/index.cjs +3017 -0
  178. package/dist/components/Calendar/index.cjs.map +1 -0
  179. package/dist/components/Calendar/index.d.cts +169 -0
  180. package/dist/components/Calendar/index.d.ts +169 -0
  181. package/dist/components/Calendar/index.js +11 -0
  182. package/dist/components/Calendar/index.js.map +1 -0
  183. package/dist/components/Card/index.cjs +469 -0
  184. package/dist/components/Card/index.cjs.map +1 -0
  185. package/dist/components/Card/index.d.cts +33 -0
  186. package/dist/components/Card/index.d.ts +33 -0
  187. package/dist/components/Card/index.js +7 -0
  188. package/dist/components/Card/index.js.map +1 -0
  189. package/dist/components/Checkbox/index.cjs +590 -0
  190. package/dist/components/Checkbox/index.cjs.map +1 -0
  191. package/dist/components/Checkbox/index.d.cts +22 -0
  192. package/dist/components/Checkbox/index.d.ts +22 -0
  193. package/dist/components/Checkbox/index.js +9 -0
  194. package/dist/components/Checkbox/index.js.map +1 -0
  195. package/dist/components/Dialog/index.cjs +888 -0
  196. package/dist/components/Dialog/index.cjs.map +1 -0
  197. package/dist/components/Dialog/index.d.cts +56 -0
  198. package/dist/components/Dialog/index.d.ts +56 -0
  199. package/dist/components/Dialog/index.js +10 -0
  200. package/dist/components/Dialog/index.js.map +1 -0
  201. package/dist/components/FloatButton/index.cjs +1254 -0
  202. package/dist/components/FloatButton/index.cjs.map +1 -0
  203. package/dist/components/FloatButton/index.d.cts +133 -0
  204. package/dist/components/FloatButton/index.d.ts +133 -0
  205. package/dist/components/FloatButton/index.js +11 -0
  206. package/dist/components/FloatButton/index.js.map +1 -0
  207. package/dist/components/HStack/index.cjs +480 -0
  208. package/dist/components/HStack/index.cjs.map +1 -0
  209. package/dist/components/HStack/index.d.cts +24 -0
  210. package/dist/components/HStack/index.d.ts +24 -0
  211. package/dist/components/HStack/index.js +9 -0
  212. package/dist/components/HStack/index.js.map +1 -0
  213. package/dist/components/InputGroup/index.cjs +638 -0
  214. package/dist/components/InputGroup/index.cjs.map +1 -0
  215. package/dist/components/InputGroup/index.d.cts +33 -0
  216. package/dist/components/InputGroup/index.d.ts +33 -0
  217. package/dist/components/InputGroup/index.js +7 -0
  218. package/dist/components/InputGroup/index.js.map +1 -0
  219. package/dist/components/Pagination/index.cjs +2501 -0
  220. package/dist/components/Pagination/index.cjs.map +1 -0
  221. package/dist/components/Pagination/index.d.cts +164 -0
  222. package/dist/components/Pagination/index.d.ts +164 -0
  223. package/dist/components/Pagination/index.js +12 -0
  224. package/dist/components/Pagination/index.js.map +1 -0
  225. package/dist/components/Popover/index.cjs +739 -0
  226. package/dist/components/Popover/index.cjs.map +1 -0
  227. package/dist/components/Popover/index.d.cts +44 -0
  228. package/dist/components/Popover/index.d.ts +44 -0
  229. package/dist/components/Popover/index.js +8 -0
  230. package/dist/components/Popover/index.js.map +1 -0
  231. package/dist/components/Progress/index.cjs +493 -0
  232. package/dist/components/Progress/index.cjs.map +1 -0
  233. package/dist/components/Progress/index.d.cts +63 -0
  234. package/dist/components/Progress/index.d.ts +63 -0
  235. package/dist/components/Progress/index.js +7 -0
  236. package/dist/components/Progress/index.js.map +1 -0
  237. package/dist/components/Radio/index.cjs +584 -0
  238. package/dist/components/Radio/index.cjs.map +1 -0
  239. package/dist/components/Radio/index.d.cts +51 -0
  240. package/dist/components/Radio/index.d.ts +51 -0
  241. package/dist/components/Radio/index.js +7 -0
  242. package/dist/components/Radio/index.js.map +1 -0
  243. package/dist/components/SegmentedControl/index.cjs +502 -0
  244. package/dist/components/SegmentedControl/index.cjs.map +1 -0
  245. package/dist/components/SegmentedControl/index.d.cts +45 -0
  246. package/dist/components/SegmentedControl/index.d.ts +45 -0
  247. package/dist/components/SegmentedControl/index.js +7 -0
  248. package/dist/components/SegmentedControl/index.js.map +1 -0
  249. package/dist/components/Select/index.cjs +1359 -0
  250. package/dist/components/Select/index.cjs.map +1 -0
  251. package/dist/components/Select/index.d.cts +140 -0
  252. package/dist/components/Select/index.d.ts +140 -0
  253. package/dist/components/Select/index.js +8 -0
  254. package/dist/components/Select/index.js.map +1 -0
  255. package/dist/components/Separator/index.cjs +358 -0
  256. package/dist/components/Separator/index.cjs.map +1 -0
  257. package/dist/components/Separator/index.d.cts +28 -0
  258. package/dist/components/Separator/index.d.ts +28 -0
  259. package/dist/components/Separator/index.js +6 -0
  260. package/dist/components/Separator/index.js.map +1 -0
  261. package/dist/components/Skeleton/index.cjs +384 -0
  262. package/dist/components/Skeleton/index.cjs.map +1 -0
  263. package/dist/components/Skeleton/index.d.cts +30 -0
  264. package/dist/components/Skeleton/index.d.ts +30 -0
  265. package/dist/components/Skeleton/index.js +6 -0
  266. package/dist/components/Skeleton/index.js.map +1 -0
  267. package/dist/components/Slider/index.cjs +880 -0
  268. package/dist/components/Slider/index.cjs.map +1 -0
  269. package/dist/components/Slider/index.d.cts +84 -0
  270. package/dist/components/Slider/index.d.ts +84 -0
  271. package/dist/components/Slider/index.js +6 -0
  272. package/dist/components/Slider/index.js.map +1 -0
  273. package/dist/components/Spinner/index.cjs +32 -0
  274. package/dist/components/Spinner/index.cjs.map +1 -0
  275. package/dist/components/Spinner/index.d.cts +25 -0
  276. package/dist/components/Spinner/index.d.ts +25 -0
  277. package/dist/components/Spinner/index.js +4 -0
  278. package/dist/components/Spinner/index.js.map +1 -0
  279. package/dist/components/Switch/index.cjs +623 -0
  280. package/dist/components/Switch/index.cjs.map +1 -0
  281. package/dist/components/Switch/index.d.cts +22 -0
  282. package/dist/components/Switch/index.d.ts +22 -0
  283. package/dist/components/Switch/index.js +10 -0
  284. package/dist/components/Switch/index.js.map +1 -0
  285. package/dist/components/Tabs/index.cjs +630 -0
  286. package/dist/components/Tabs/index.cjs.map +1 -0
  287. package/dist/components/Tabs/index.d.cts +63 -0
  288. package/dist/components/Tabs/index.d.ts +63 -0
  289. package/dist/components/Tabs/index.js +7 -0
  290. package/dist/components/Tabs/index.js.map +1 -0
  291. package/dist/components/Text/index.cjs +401 -0
  292. package/dist/components/Text/index.cjs.map +1 -0
  293. package/dist/components/Text/index.d.cts +24 -0
  294. package/dist/components/Text/index.d.ts +24 -0
  295. package/dist/components/Text/index.js +7 -0
  296. package/dist/components/Text/index.js.map +1 -0
  297. package/dist/components/TextArea/index.cjs +482 -0
  298. package/dist/components/TextArea/index.cjs.map +1 -0
  299. package/dist/components/TextArea/index.d.cts +25 -0
  300. package/dist/components/TextArea/index.d.ts +25 -0
  301. package/dist/components/TextArea/index.js +8 -0
  302. package/dist/components/TextArea/index.js.map +1 -0
  303. package/dist/components/TextInput/index.cjs +477 -0
  304. package/dist/components/TextInput/index.cjs.map +1 -0
  305. package/dist/components/TextInput/index.d.cts +33 -0
  306. package/dist/components/TextInput/index.d.ts +33 -0
  307. package/dist/components/TextInput/index.js +7 -0
  308. package/dist/components/TextInput/index.js.map +1 -0
  309. package/dist/components/Toast/index.cjs +167 -0
  310. package/dist/components/Toast/index.cjs.map +1 -0
  311. package/dist/components/Toast/index.d.cts +143 -0
  312. package/dist/components/Toast/index.d.ts +143 -0
  313. package/dist/components/Toast/index.js +4 -0
  314. package/dist/components/Toast/index.js.map +1 -0
  315. package/dist/components/Toggle/index.cjs +770 -0
  316. package/dist/components/Toggle/index.cjs.map +1 -0
  317. package/dist/components/Toggle/index.d.cts +83 -0
  318. package/dist/components/Toggle/index.d.ts +83 -0
  319. package/dist/components/Toggle/index.js +7 -0
  320. package/dist/components/Toggle/index.js.map +1 -0
  321. package/dist/components/Tooltip/index.cjs +813 -0
  322. package/dist/components/Tooltip/index.cjs.map +1 -0
  323. package/dist/components/Tooltip/index.d.cts +55 -0
  324. package/dist/components/Tooltip/index.d.ts +55 -0
  325. package/dist/components/Tooltip/index.js +8 -0
  326. package/dist/components/Tooltip/index.js.map +1 -0
  327. package/dist/components/VStack/index.cjs +480 -0
  328. package/dist/components/VStack/index.cjs.map +1 -0
  329. package/dist/components/VStack/index.d.cts +19 -0
  330. package/dist/components/VStack/index.d.ts +19 -0
  331. package/dist/components/VStack/index.js +9 -0
  332. package/dist/components/VStack/index.js.map +1 -0
  333. package/dist/i18n/index.cjs +39 -3
  334. package/dist/i18n/index.cjs.map +1 -1
  335. package/dist/i18n/index.d.cts +4 -60
  336. package/dist/i18n/index.d.ts +4 -60
  337. package/dist/i18n/index.js +3 -2
  338. package/dist/icons/index.cjs +326 -26
  339. package/dist/icons/index.cjs.map +1 -1
  340. package/dist/icons/index.js +4 -3
  341. package/dist/index-D3_M3G6U.d.ts +19 -0
  342. package/dist/index-uXPK_Rg8.d.cts +19 -0
  343. package/dist/index.cjs +11176 -463
  344. package/dist/index.cjs.map +1 -1
  345. package/dist/index.d.cts +39 -183
  346. package/dist/index.d.ts +39 -183
  347. package/dist/index.js +49 -9
  348. package/dist/resolve-D-GOaxZy.d.cts +60 -0
  349. package/dist/resolve-D-GOaxZy.d.ts +60 -0
  350. package/dist/slot/index.cjs +9 -3
  351. package/dist/slot/index.cjs.map +1 -1
  352. package/dist/slot/index.js +2 -2
  353. package/dist/stories/index.cjs +108 -0
  354. package/dist/stories/index.cjs.map +1 -0
  355. package/dist/stories/index.d.cts +46 -0
  356. package/dist/stories/index.d.ts +46 -0
  357. package/dist/stories/index.js +94 -0
  358. package/dist/stories/index.js.map +1 -0
  359. package/dist/theme/index.cjs +259 -26
  360. package/dist/theme/index.cjs.map +1 -1
  361. package/dist/theme/index.d.cts +26 -0
  362. package/dist/theme/index.d.ts +26 -0
  363. package/dist/theme/index.js +4 -3
  364. package/dist/use-theme-CoqfnvRs.d.cts +112 -0
  365. package/dist/use-theme-CoqfnvRs.d.ts +112 -0
  366. package/dist/utils/cn.cjs +18 -6
  367. package/dist/utils/cn.cjs.map +1 -1
  368. package/dist/utils/cn.js +2 -2
  369. package/package.json +41 -10
  370. package/dist/chunk-6OABNXBY.js +0 -213
  371. package/dist/chunk-6OABNXBY.js.map +0 -1
  372. package/dist/chunk-7QVYU63E.js +0 -6
  373. package/dist/chunk-FXKIWONG.js.map +0 -1
  374. package/dist/chunk-NDEDMCHT.js +0 -40
  375. package/dist/chunk-NDEDMCHT.js.map +0 -1
  376. package/dist/chunk-SSTXLK5I.js.map +0 -1
  377. package/dist/chunk-UAKFCMWK.js +0 -3
  378. package/dist/chunk-X3AJNNF6.js +0 -539
  379. package/dist/chunk-X3AJNNF6.js.map +0 -1
  380. package/dist/chunk-XGM2K4TT.js +0 -31
  381. package/dist/chunk-XGM2K4TT.js.map +0 -1
  382. package/dist/stories/story-registry.cjs +0 -776
  383. package/dist/stories/story-registry.cjs.map +0 -1
  384. package/dist/stories/story-registry.d.cts +0 -13
  385. package/dist/stories/story-registry.d.ts +0 -13
  386. package/dist/stories/story-registry.js +0 -106
  387. package/dist/stories/story-registry.js.map +0 -1
@@ -1,776 +0,0 @@
1
- 'use strict';
2
-
3
- var reactNative = require('react-native');
4
- var jsxRuntime = require('nativewind/jsx-runtime');
5
- var react = require('react');
6
-
7
- var __defProp = Object.defineProperty;
8
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
-
10
- // src/utils/cn.ts
11
- function cn(...inputs) {
12
- const out = [];
13
- for (const input of inputs) append(out, input);
14
- return out.join(" ");
15
- }
16
- __name(cn, "cn");
17
- function append(out, input) {
18
- if (!input) return;
19
- if (typeof input === "string") {
20
- if (input.length > 0) out.push(input);
21
- return;
22
- }
23
- if (typeof input === "number") return;
24
- if (Array.isArray(input)) {
25
- for (const inner of input) append(out, inner);
26
- return;
27
- }
28
- if (typeof input === "object") {
29
- for (const key of Object.keys(input)) {
30
- if (input[key]) out.push(key);
31
- }
32
- }
33
- }
34
- __name(append, "append");
35
- function Box({ className, children, ...rest }) {
36
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...rest, className: cn(className), children });
37
- }
38
- __name(Box, "Box");
39
-
40
- // ../tokens/build/theme.ts
41
- var theme = {
42
- color: {
43
- danger: "#ef4444",
44
- neutral: {
45
- "100": "#f4f4f5",
46
- "200": "#e4e4e7",
47
- "300": "#d4d4d8",
48
- "400": "#a1a1aa",
49
- "500": "#71717a",
50
- "900": "#18181b"
51
- },
52
- primary: {
53
- "600": "#2563eb"}}};
54
-
55
- // src/slot/compose-refs.ts
56
- function composeRefs(...refs) {
57
- return (node) => {
58
- for (const ref of refs) {
59
- if (ref == null) continue;
60
- if (typeof ref === "function") {
61
- ref(node);
62
- } else {
63
- ref.current = node;
64
- }
65
- }
66
- };
67
- }
68
- __name(composeRefs, "composeRefs");
69
- var Slot = react.forwardRef(/* @__PURE__ */ __name(function Slot2(props, forwardedRef) {
70
- const { children, ...slotProps } = props;
71
- if (!react.isValidElement(children)) {
72
- return null;
73
- }
74
- const child = react.Children.only(children);
75
- const merged = mergeProps(slotProps, child.props);
76
- const childRef = child.ref;
77
- if (forwardedRef || childRef) {
78
- merged.ref = composeRefs(forwardedRef, childRef);
79
- }
80
- return react.cloneElement(child, merged);
81
- }, "Slot"));
82
- Slot.displayName = "Slot";
83
- function mergeProps(outer, inner) {
84
- const merged = { ...outer };
85
- for (const key of Object.keys(inner)) {
86
- const outerValue = outer[key];
87
- const innerValue = inner[key];
88
- if (key === "className" || key === "class") {
89
- merged[key] = joinClass(outerValue, innerValue);
90
- continue;
91
- }
92
- if (key === "style") {
93
- merged[key] = {
94
- ...outerValue,
95
- ...innerValue
96
- };
97
- continue;
98
- }
99
- if (isEventHandler(key, outerValue, innerValue)) {
100
- merged[key] = composeHandlers(outerValue, innerValue);
101
- continue;
102
- }
103
- merged[key] = innerValue;
104
- }
105
- return merged;
106
- }
107
- __name(mergeProps, "mergeProps");
108
- function joinClass(outer, inner) {
109
- const a = typeof outer === "string" ? outer : "";
110
- const b = typeof inner === "string" ? inner : "";
111
- const joined = [a, b].filter(Boolean).join(" ");
112
- return joined.length > 0 ? joined : void 0;
113
- }
114
- __name(joinClass, "joinClass");
115
- function isEventHandler(key, outer, inner) {
116
- if (!key.startsWith("on") || key.length < 3) return false;
117
- if (key[2] !== key[2]?.toUpperCase()) return false;
118
- return typeof outer === "function" && typeof inner === "function";
119
- }
120
- __name(isEventHandler, "isEventHandler");
121
- function composeHandlers(outer, inner) {
122
- return (...args) => {
123
- outer(...args);
124
- inner(...args);
125
- };
126
- }
127
- __name(composeHandlers, "composeHandlers");
128
- var SIZE_MAP = {
129
- sm: 12,
130
- md: 16,
131
- lg: 24,
132
- xl: 32
133
- };
134
- function Spinner({ label = "Loading", size = "md", testID, color, style, ...rest }) {
135
- const px = typeof size === "number" ? size : SIZE_MAP[size];
136
- return /* @__PURE__ */ jsxRuntime.jsx(
137
- reactNative.ActivityIndicator,
138
- {
139
- ...rest,
140
- ...testID !== void 0 ? { testID } : {},
141
- accessibilityRole: "progressbar",
142
- accessibilityLabel: label,
143
- ...color !== void 0 ? { color } : {},
144
- size: px,
145
- style: [{ width: px, height: px }, style]
146
- }
147
- );
148
- }
149
- __name(Spinner, "Spinner");
150
- var VARIANT_CLASSES = {
151
- primary: "bg-semantic-interactive-primary hover:bg-semantic-interactive-primaryHover active:bg-semantic-interactive-primaryPressed",
152
- secondary: "bg-neutral-100 hover:bg-neutral-200 active:bg-neutral-300",
153
- ghost: "bg-transparent hover:bg-neutral-100 active:bg-neutral-200",
154
- destructive: "bg-semantic-interactive-destructive hover:opacity-90 active:opacity-80"
155
- };
156
- var SIZE_CLASSES = {
157
- sm: "h-8 px-3 text-sm",
158
- md: "h-10 px-4 text-md",
159
- lg: "h-12 px-5 text-lg"
160
- };
161
- var ICON_SIZE = { sm: 14, md: 16, lg: 20 };
162
- var BASE_CLASSES = "inline-flex flex-row items-center justify-center gap-2 rounded-md select-none";
163
- var VARIANT_STYLES = {
164
- primary: { backgroundColor: theme.color.primary["600"] },
165
- secondary: { backgroundColor: theme.color.neutral["100"] },
166
- ghost: { backgroundColor: "transparent" },
167
- destructive: { backgroundColor: theme.color.danger }
168
- };
169
- var VARIANT_TEXT_COLOR = {
170
- primary: "#ffffff",
171
- secondary: theme.color.neutral["900"],
172
- ghost: theme.color.neutral["900"],
173
- destructive: "#ffffff"
174
- };
175
- var SIZE_STYLES = {
176
- sm: { container: { height: 32, paddingHorizontal: 12 }, text: { fontSize: 14 } },
177
- md: { container: { height: 40, paddingHorizontal: 16 }, text: { fontSize: 16 } },
178
- lg: { container: { height: 48, paddingHorizontal: 20 }, text: { fontSize: 18 } }
179
- };
180
- var BASE_STYLE = {
181
- flexDirection: "row",
182
- alignItems: "center",
183
- justifyContent: "center",
184
- gap: 8,
185
- borderRadius: 6
186
- };
187
- var Button = react.forwardRef(/* @__PURE__ */ __name(function Button2({
188
- children,
189
- variant = "primary",
190
- size = "md",
191
- disabled,
192
- loading,
193
- leadingIcon: LeadingIcon,
194
- trailingIcon: TrailingIcon,
195
- asChild,
196
- className,
197
- onPress,
198
- testID,
199
- style,
200
- ...rest
201
- }, forwardedRef) {
202
- const isInoperative = Boolean(disabled) || Boolean(loading);
203
- const classes = cn(
204
- BASE_CLASSES,
205
- VARIANT_CLASSES[variant],
206
- SIZE_CLASSES[size],
207
- isInoperative ? "opacity-60" : void 0,
208
- className
209
- );
210
- const baseInlineStyle = [
211
- BASE_STYLE,
212
- VARIANT_STYLES[variant],
213
- SIZE_STYLES[size].container,
214
- isInoperative ? { opacity: 0.6 } : null
215
- ];
216
- const pressableStyle = typeof style === "function" ? (state) => [baseInlineStyle, style(state)] : [baseInlineStyle, style];
217
- const slotStyle = [baseInlineStyle, typeof style === "function" ? null : style];
218
- const textColor = VARIANT_TEXT_COLOR[variant];
219
- const textStyle = { color: textColor, fontSize: SIZE_STYLES[size].text.fontSize, fontWeight: "500" };
220
- const handlePress = /* @__PURE__ */ __name((ev) => {
221
- if (isInoperative) return;
222
- onPress?.(ev);
223
- }, "handlePress");
224
- if (asChild) {
225
- const slotProps = {
226
- ref: forwardedRef,
227
- className: classes,
228
- style: slotStyle,
229
- onClick: handlePress,
230
- ...rest
231
- };
232
- if (isInoperative) slotProps["aria-disabled"] = true;
233
- if (loading) slotProps["aria-busy"] = true;
234
- if (testID !== void 0) slotProps["data-testid"] = testID;
235
- return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...slotProps, children });
236
- }
237
- const pressableExtra = {};
238
- if (isInoperative) pressableExtra["aria-disabled"] = true;
239
- if (loading) pressableExtra["aria-busy"] = true;
240
- return /* @__PURE__ */ jsxRuntime.jsxs(
241
- reactNative.Pressable,
242
- {
243
- ref: forwardedRef,
244
- ...testID !== void 0 ? { testID } : {},
245
- role: "button",
246
- accessibilityRole: "button",
247
- accessibilityState: { disabled: isInoperative, busy: Boolean(loading) },
248
- disabled: isInoperative,
249
- onPress: handlePress,
250
- className: classes,
251
- style: pressableStyle,
252
- ...pressableExtra,
253
- ...rest,
254
- children: [
255
- loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: ICON_SIZE[size], label: "Loading", color: textColor }) : LeadingIcon ? /* @__PURE__ */ jsxRuntime.jsx(LeadingIcon, { size: ICON_SIZE[size], color: textColor }) : null,
256
- /* @__PURE__ */ jsxRuntime.jsx(
257
- reactNative.Text,
258
- {
259
- className: cn("font-medium", SIZE_CLASSES[size].includes("text-") ? void 0 : "text-md"),
260
- style: textStyle,
261
- children
262
- }
263
- ),
264
- TrailingIcon ? /* @__PURE__ */ jsxRuntime.jsx(TrailingIcon, { size: ICON_SIZE[size], color: textColor }) : null
265
- ]
266
- }
267
- );
268
- }, "Button"));
269
- Button.displayName = "Button";
270
- var make = /* @__PURE__ */ __name((path) => /* @__PURE__ */ __name(function PlaceholderIcon({ size = 20, color = "currentColor" }) {
271
- return /* @__PURE__ */ jsxRuntime.jsx(
272
- "svg",
273
- {
274
- width: size,
275
- height: size,
276
- viewBox: "0 0 24 24",
277
- fill: "none",
278
- stroke: color,
279
- strokeWidth: "2",
280
- strokeLinecap: "round",
281
- strokeLinejoin: "round",
282
- "aria-hidden": "true",
283
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: path })
284
- }
285
- );
286
- }, "PlaceholderIcon"), "make");
287
- var defaultSemanticIcons = {
288
- checkmark: make("M20 6 9 17l-5-5"),
289
- close: make("M18 6 6 18 M6 6l12 12"),
290
- eye: make("M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"),
291
- eyeOff: make("M17.94 17.94A10 10 0 0 1 2 12s3.5-7 10-7c2 0 3.8.6 5.4 1.5 M1 1l22 22"),
292
- chevronDown: make("m6 9 6 6 6-6"),
293
- chevronUp: make("m18 15-6-6-6 6"),
294
- alertTriangle: make(
295
- "M12 9v4 M12 17h.01 M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
296
- ),
297
- info: make(
298
- "M12 8h.01 M11 12h1v4h1 M12 22C6.48 22 2 17.52 2 12 2 6.48 6.48 2 12 2c5.52 0 10 4.48 10 10 0 5.52-4.48 10-10 10z"
299
- ),
300
- check: make("M20 6 9 17l-5-5"),
301
- x: make("M18 6 6 18 M6 6l12 12")
302
- };
303
- var SemanticIconsContext = react.createContext(defaultSemanticIcons);
304
- SemanticIconsContext.displayName = "SemanticIconsContext";
305
-
306
- // src/icons/use-semantic-icon.ts
307
- function useSemanticIcon(name) {
308
- const icons = react.useContext(SemanticIconsContext);
309
- return icons[name];
310
- }
311
- __name(useSemanticIcon, "useSemanticIcon");
312
- var ROW_STYLE = { flexDirection: "row", alignItems: "center", gap: 8 };
313
- var BOX_STYLE = {
314
- width: 20,
315
- height: 20,
316
- borderRadius: 4,
317
- borderWidth: 1,
318
- borderColor: theme.color.neutral["300"],
319
- backgroundColor: "#ffffff",
320
- alignItems: "center",
321
- justifyContent: "center"
322
- };
323
- var BOX_STYLE_CHECKED = {
324
- backgroundColor: theme.color.primary["600"],
325
- borderColor: theme.color.primary["600"]
326
- };
327
- function Checkbox({
328
- checked,
329
- defaultChecked = false,
330
- indeterminate,
331
- disabled,
332
- onChange,
333
- label,
334
- className,
335
- testID,
336
- asChild,
337
- children
338
- }) {
339
- const [inner, setInner] = react.useState(defaultChecked);
340
- const isControlled = checked !== void 0;
341
- const value = isControlled ? Boolean(checked) : inner;
342
- const ariaChecked = indeterminate ? "mixed" : value ? "true" : "false";
343
- const isMarked = value || Boolean(indeterminate);
344
- const toggle = react.useCallback(() => {
345
- if (disabled) return;
346
- const next = !value;
347
- if (!isControlled) setInner(next);
348
- onChange?.(next);
349
- }, [disabled, value, isControlled, onChange]);
350
- const Check = useSemanticIcon("checkmark");
351
- const commonProps = {
352
- role: "checkbox",
353
- "aria-checked": ariaChecked,
354
- accessibilityRole: "checkbox",
355
- accessibilityState: { checked: value, disabled: Boolean(disabled) },
356
- testID
357
- };
358
- if (disabled) commonProps["aria-disabled"] = true;
359
- if (label !== void 0) {
360
- commonProps["aria-label"] = label;
361
- commonProps.accessibilityLabel = label;
362
- }
363
- if (asChild) {
364
- const slotProps = {
365
- role: "checkbox",
366
- "aria-checked": ariaChecked,
367
- onClick: toggle
368
- };
369
- if (disabled) slotProps["aria-disabled"] = true;
370
- if (label !== void 0) slotProps["aria-label"] = label;
371
- if (testID !== void 0) slotProps["data-testid"] = testID;
372
- if (className !== void 0) slotProps.className = className;
373
- return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...slotProps, children });
374
- }
375
- const boxClasses = cn("w-5 h-5 rounded-sm border border-semantic-border-strong items-center justify-center");
376
- return /* @__PURE__ */ jsxRuntime.jsxs(
377
- reactNative.View,
378
- {
379
- className: cn("flex-row items-center gap-2", disabled ? "opacity-60" : void 0, className),
380
- style: [ROW_STYLE, disabled ? { opacity: 0.6 } : null],
381
- children: [
382
- /* @__PURE__ */ jsxRuntime.jsx(
383
- reactNative.Pressable,
384
- {
385
- onPress: toggle,
386
- ...commonProps,
387
- className: boxClasses,
388
- style: [BOX_STYLE, isMarked && !disabled ? BOX_STYLE_CHECKED : null],
389
- children: isMarked && !disabled ? /* @__PURE__ */ jsxRuntime.jsx(Check, { size: 14, color: "#ffffff" }) : null
390
- }
391
- ),
392
- children ?? (label !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.color.neutral["900"], fontSize: 16 }, children: label }) : null)
393
- ]
394
- }
395
- );
396
- }
397
- __name(Checkbox, "Checkbox");
398
- var ALIGN_CLASS = {
399
- start: "items-start",
400
- center: "items-center",
401
- end: "items-end",
402
- stretch: "items-stretch",
403
- baseline: "items-baseline"
404
- };
405
- var JUSTIFY_CLASS = {
406
- start: "justify-start",
407
- center: "justify-center",
408
- end: "justify-end",
409
- between: "justify-between",
410
- around: "justify-around",
411
- evenly: "justify-evenly"
412
- };
413
- function HStack({ gap, align, justify, className, children, ...rest }) {
414
- return /* @__PURE__ */ jsxRuntime.jsx(
415
- reactNative.View,
416
- {
417
- ...rest,
418
- className: cn(
419
- "flex-row",
420
- gap !== void 0 && gap !== 0 ? `gap-${gap}` : void 0,
421
- align !== void 0 ? ALIGN_CLASS[align] : void 0,
422
- justify !== void 0 ? JUSTIFY_CLASS[justify] : void 0,
423
- className
424
- ),
425
- children
426
- }
427
- );
428
- }
429
- __name(HStack, "HStack");
430
- var ROW_STYLE2 = { flexDirection: "row", alignItems: "center", gap: 8 };
431
- var TRACK_BASE = {
432
- width: 40,
433
- height: 24,
434
- borderRadius: 12,
435
- justifyContent: "center",
436
- paddingHorizontal: 2
437
- };
438
- var THUMB_STYLE = {
439
- width: 20,
440
- height: 20,
441
- borderRadius: 10,
442
- backgroundColor: "#ffffff",
443
- shadowColor: "#000",
444
- shadowOpacity: 0.15,
445
- shadowRadius: 2,
446
- shadowOffset: { width: 0, height: 1 },
447
- elevation: 2
448
- };
449
- function Switch({
450
- checked,
451
- defaultChecked = false,
452
- disabled,
453
- onChange,
454
- label,
455
- className,
456
- testID,
457
- asChild,
458
- children
459
- }) {
460
- const [inner, setInner] = react.useState(defaultChecked);
461
- const isControlled = checked !== void 0;
462
- const value = isControlled ? Boolean(checked) : inner;
463
- const toggle = react.useCallback(() => {
464
- if (disabled) return;
465
- const next = !value;
466
- if (!isControlled) setInner(next);
467
- onChange?.(next);
468
- }, [disabled, value, isControlled, onChange]);
469
- const ariaChecked = value ? "true" : "false";
470
- const commonProps = {
471
- role: "switch",
472
- "aria-checked": ariaChecked,
473
- accessibilityRole: "switch",
474
- accessibilityState: { checked: value, disabled: Boolean(disabled) },
475
- testID
476
- };
477
- if (disabled) commonProps["aria-disabled"] = true;
478
- if (label !== void 0) {
479
- commonProps["aria-label"] = label;
480
- commonProps.accessibilityLabel = label;
481
- }
482
- if (asChild) {
483
- const slotProps = {
484
- role: "switch",
485
- "aria-checked": ariaChecked,
486
- onClick: toggle
487
- };
488
- if (disabled) slotProps["aria-disabled"] = true;
489
- if (label !== void 0) slotProps["aria-label"] = label;
490
- if (testID !== void 0) slotProps["data-testid"] = testID;
491
- if (className !== void 0) slotProps.className = className;
492
- return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...slotProps, children });
493
- }
494
- const trackClasses = cn(
495
- "w-10 h-6 rounded-full justify-center px-0.5 transition-colors",
496
- value ? "bg-semantic-interactive-primary" : "bg-neutral-300",
497
- disabled ? "opacity-60" : void 0
498
- );
499
- const thumbClasses = cn("w-5 h-5 rounded-full bg-white shadow-sm", value ? "self-end" : "self-start");
500
- const trackStyle = [
501
- TRACK_BASE,
502
- { backgroundColor: value ? theme.color.primary["600"] : theme.color.neutral["300"] },
503
- disabled ? { opacity: 0.6 } : null
504
- ];
505
- const thumbStyle = [THUMB_STYLE, { alignSelf: value ? "flex-end" : "flex-start" }];
506
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex-row items-center gap-2", className), style: ROW_STYLE2, children: [
507
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: toggle, ...commonProps, className: trackClasses, style: trackStyle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: thumbClasses, style: thumbStyle }) }),
508
- label ? /* @__PURE__ */ jsxRuntime.jsx(
509
- reactNative.Text,
510
- {
511
- className: "text-md text-semantic-text-default",
512
- style: { color: theme.color.neutral["900"], fontSize: 16 },
513
- children: label
514
- }
515
- ) : null,
516
- children
517
- ] });
518
- }
519
- __name(Switch, "Switch");
520
- var VARIANT_CLASSES2 = {
521
- "body-xs": "text-xs leading-normal",
522
- "body-sm": "text-sm leading-normal",
523
- "body-md": "text-md leading-normal",
524
- "body-lg": "text-lg leading-relaxed",
525
- "heading-1": "text-4xl leading-tight font-bold",
526
- "heading-2": "text-3xl leading-tight font-semibold",
527
- "heading-3": "text-2xl leading-tight font-semibold"
528
- };
529
- var HEADING_VARIANTS = /* @__PURE__ */ new Set(["heading-1", "heading-2", "heading-3"]);
530
- function Text({ variant = "body-md", className, testID, children, ...rest }) {
531
- const isHeading = HEADING_VARIANTS.has(variant);
532
- const role = isHeading ? "header" : rest.accessibilityRole;
533
- return /* @__PURE__ */ jsxRuntime.jsx(
534
- reactNative.Text,
535
- {
536
- testID,
537
- ...rest,
538
- ...role !== void 0 ? { accessibilityRole: role } : {},
539
- className: cn(VARIANT_CLASSES2[variant], className),
540
- children
541
- }
542
- );
543
- }
544
- __name(Text, "Text");
545
- var CONTAINER_STYLE = { flexDirection: "column", gap: 4 };
546
- var LABEL_STYLE = { fontSize: 14, fontWeight: "500", color: theme.color.neutral["900"] };
547
- var FIELD_BASE_STYLE = {
548
- flexDirection: "row",
549
- alignItems: "center",
550
- borderRadius: 6,
551
- borderWidth: 1,
552
- paddingHorizontal: 12
553
- };
554
- var INPUT_STYLE = {
555
- flex: 1,
556
- paddingVertical: 8,
557
- fontSize: 16,
558
- color: theme.color.neutral["900"]
559
- };
560
- var HELPER_STYLE = { fontSize: 14, color: theme.color.neutral["500"] };
561
- var ERROR_STYLE = { fontSize: 14, color: theme.color.danger };
562
- function TextInput({
563
- label,
564
- helperText,
565
- error,
566
- disabled,
567
- leading,
568
- trailing,
569
- containerClassName,
570
- className,
571
- testID,
572
- onChangeText,
573
- multiline,
574
- numberOfLines,
575
- ...rest
576
- }) {
577
- const reactId = react.useId();
578
- const inputId = testID ?? `nori-ui-input-${reactId}`;
579
- const describeId = `${inputId}-describe`;
580
- const hasError = Boolean(error);
581
- const describedBy = error || helperText ? describeId : void 0;
582
- const inputExtras = {};
583
- if (testID !== void 0) inputExtras.testID = testID;
584
- if (label !== void 0) inputExtras.accessibilityLabel = label;
585
- if (hasError) inputExtras["aria-invalid"] = true;
586
- if (describedBy !== void 0) inputExtras["aria-describedby"] = describedBy;
587
- if (multiline !== void 0) inputExtras.multiline = multiline;
588
- if (numberOfLines !== void 0) inputExtras.numberOfLines = numberOfLines;
589
- if (onChangeText !== void 0) inputExtras.onChangeText = onChangeText;
590
- const fieldStyle = [
591
- FIELD_BASE_STYLE,
592
- { borderColor: hasError ? theme.color.danger : theme.color.neutral["200"] },
593
- disabled ? { opacity: 0.6 } : null
594
- ];
595
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex flex-col gap-1", containerClassName), style: CONTAINER_STYLE, children: [
596
- label !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
597
- "label",
598
- {
599
- htmlFor: inputId,
600
- className: "text-sm font-medium text-semantic-text-default",
601
- style: LABEL_STYLE,
602
- children: label
603
- }
604
- ) : null,
605
- /* @__PURE__ */ jsxRuntime.jsxs(
606
- reactNative.View,
607
- {
608
- className: cn(
609
- "flex-row items-center rounded-md border px-3",
610
- hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
611
- disabled ? "opacity-60" : void 0
612
- ),
613
- style: fieldStyle,
614
- children: [
615
- leading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "mr-2", style: { marginRight: 8 }, children: leading }) : null,
616
- /* @__PURE__ */ jsxRuntime.jsx(
617
- reactNative.TextInput,
618
- {
619
- nativeID: inputId,
620
- editable: !disabled,
621
- className: cn("flex-1 py-2 text-md text-semantic-text-default outline-none", className),
622
- style: INPUT_STYLE,
623
- placeholderTextColor: theme.color.neutral["400"],
624
- ...inputExtras,
625
- ...rest
626
- }
627
- ),
628
- trailing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "ml-2", style: { marginLeft: 8 }, children: trailing }) : null
629
- ]
630
- }
631
- ),
632
- error ? /* @__PURE__ */ jsxRuntime.jsx(
633
- reactNative.Text,
634
- {
635
- nativeID: describeId,
636
- className: "text-sm text-semantic-interactive-destructive",
637
- style: ERROR_STYLE,
638
- children: error
639
- }
640
- ) : helperText ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: describeId, className: "text-sm text-semantic-text-muted", style: HELPER_STYLE, children: helperText }) : null
641
- ] });
642
- }
643
- __name(TextInput, "TextInput");
644
- function TextArea({ numberOfLines = 4, ...rest }) {
645
- return /* @__PURE__ */ jsxRuntime.jsx(TextInput, { multiline: true, numberOfLines, ...rest });
646
- }
647
- __name(TextArea, "TextArea");
648
- var ALIGN_CLASS2 = {
649
- start: "items-start",
650
- center: "items-center",
651
- end: "items-end",
652
- stretch: "items-stretch",
653
- baseline: "items-baseline"
654
- };
655
- var JUSTIFY_CLASS2 = {
656
- start: "justify-start",
657
- center: "justify-center",
658
- end: "justify-end",
659
- between: "justify-between",
660
- around: "justify-around",
661
- evenly: "justify-evenly"
662
- };
663
- function VStack({ gap, align, justify, className, children, ...rest }) {
664
- return /* @__PURE__ */ jsxRuntime.jsx(
665
- reactNative.View,
666
- {
667
- ...rest,
668
- className: cn(
669
- "flex-col",
670
- gap !== void 0 && gap !== 0 ? `gap-${gap}` : void 0,
671
- align !== void 0 ? ALIGN_CLASS2[align] : void 0,
672
- justify !== void 0 ? JUSTIFY_CLASS2[justify] : void 0,
673
- className
674
- ),
675
- children
676
- }
677
- );
678
- }
679
- __name(VStack, "VStack");
680
- var stories = [
681
- {
682
- id: "text.body-md",
683
- title: "Text \xB7 body-md",
684
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Text, { testID: "story-text-body-md", children: "Hello world" }), "render")
685
- },
686
- {
687
- id: "text.heading-1",
688
- title: "Text \xB7 heading-1",
689
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "heading-1", testID: "story-text-heading-1", children: "Heading" }), "render")
690
- },
691
- {
692
- id: "box.default",
693
- title: "Box \xB7 default",
694
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Box, { testID: "story-box-default", className: "p-4 bg-primary-50 rounded-md", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "Box content" }) }), "render")
695
- },
696
- {
697
- id: "hstack.gap-4",
698
- title: "HStack \xB7 gap 4",
699
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { testID: "story-hstack-gap-4", gap: 4, children: [
700
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: "story-hstack-a", style: { padding: 8, backgroundColor: "#dbeafe" }, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "A" }) }),
701
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: "story-hstack-b", style: { padding: 8, backgroundColor: "#bfdbfe" }, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "B" }) })
702
- ] }), "render")
703
- },
704
- {
705
- id: "vstack.gap-4",
706
- title: "VStack \xB7 gap 4",
707
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { testID: "story-vstack-gap-4", gap: 4, children: [
708
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: "story-vstack-a", style: { padding: 8, backgroundColor: "#dbeafe" }, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "A" }) }),
709
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: "story-vstack-b", style: { padding: 8, backgroundColor: "#bfdbfe" }, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "B" }) })
710
- ] }), "render")
711
- },
712
- {
713
- id: "spinner.md",
714
- title: "Spinner \xB7 md",
715
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Spinner, { testID: "story-spinner-md", size: "md" }), "render")
716
- },
717
- {
718
- id: "spinner.lg",
719
- title: "Spinner \xB7 lg",
720
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Spinner, { testID: "story-spinner-lg", size: "lg" }), "render")
721
- },
722
- {
723
- id: "button.primary",
724
- title: "Button \xB7 primary",
725
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Button, { testID: "story-button-primary", children: "Click me" }), "render")
726
- },
727
- {
728
- id: "button.destructive",
729
- title: "Button \xB7 destructive",
730
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Button, { testID: "story-button-destructive", variant: "destructive", children: "Delete" }), "render")
731
- },
732
- {
733
- id: "button.loading",
734
- title: "Button \xB7 loading",
735
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Button, { testID: "story-button-loading", loading: true, children: "Saving" }), "render")
736
- },
737
- {
738
- id: "text-input.default",
739
- title: "TextInput \xB7 default",
740
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(TextInput, { testID: "story-text-input-default", label: "Email", placeholder: "you@example.com" }), "render")
741
- },
742
- {
743
- id: "text-input.error",
744
- title: "TextInput \xB7 error",
745
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(TextInput, { testID: "story-text-input-error", label: "Email", error: "Required" }), "render")
746
- },
747
- {
748
- id: "text-area.default",
749
- title: "TextArea \xB7 default",
750
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(TextArea, { testID: "story-text-area-default", label: "Bio", numberOfLines: 3 }), "render")
751
- },
752
- {
753
- id: "checkbox.default",
754
- title: "Checkbox \xB7 default",
755
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { testID: "story-checkbox-default", label: "Accept" }), "render")
756
- },
757
- {
758
- id: "checkbox.checked",
759
- title: "Checkbox \xB7 checked",
760
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { testID: "story-checkbox-checked", label: "Accept", defaultChecked: true }), "render")
761
- },
762
- {
763
- id: "switch.default",
764
- title: "Switch \xB7 default",
765
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Switch, { testID: "story-switch-default", label: "Dark mode" }), "render")
766
- },
767
- {
768
- id: "switch.on",
769
- title: "Switch \xB7 on",
770
- render: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntime.jsx(Switch, { testID: "story-switch-on", label: "Dark mode", defaultChecked: true }), "render")
771
- }
772
- ];
773
-
774
- exports.stories = stories;
775
- //# sourceMappingURL=story-registry.cjs.map
776
- //# sourceMappingURL=story-registry.cjs.map