@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
@@ -0,0 +1,892 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var reactNative = require('react-native');
5
+ var jsxRuntime = require('nativewind/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+
10
+ // src/slot/compose-refs.ts
11
+ function composeRefs(...refs) {
12
+ return (node) => {
13
+ for (const ref of refs) {
14
+ if (ref == null) {
15
+ continue;
16
+ }
17
+ if (typeof ref === "function") {
18
+ ref(node);
19
+ } else {
20
+ ref.current = node;
21
+ }
22
+ }
23
+ };
24
+ }
25
+ __name(composeRefs, "composeRefs");
26
+ var Slot = react.forwardRef(/* @__PURE__ */ __name(function Slot2(props, forwardedRef) {
27
+ const { children, ...slotProps } = props;
28
+ if (!react.isValidElement(children)) {
29
+ return null;
30
+ }
31
+ const child = react.Children.only(children);
32
+ const merged = mergeProps(slotProps, child.props);
33
+ const childRef = child.ref;
34
+ if (forwardedRef || childRef) {
35
+ merged.ref = composeRefs(forwardedRef, childRef);
36
+ }
37
+ return react.cloneElement(child, merged);
38
+ }, "Slot"));
39
+ Slot.displayName = "Slot";
40
+ function mergeProps(outer, inner) {
41
+ const merged = { ...outer };
42
+ for (const key of Object.keys(inner)) {
43
+ const outerValue = outer[key];
44
+ const innerValue = inner[key];
45
+ if (key === "className" || key === "class") {
46
+ merged[key] = joinClass(outerValue, innerValue);
47
+ continue;
48
+ }
49
+ if (key === "style") {
50
+ merged[key] = {
51
+ ...outerValue,
52
+ ...innerValue
53
+ };
54
+ continue;
55
+ }
56
+ if (isEventHandler(key, outerValue, innerValue)) {
57
+ merged[key] = composeHandlers(outerValue, innerValue);
58
+ continue;
59
+ }
60
+ merged[key] = innerValue;
61
+ }
62
+ return merged;
63
+ }
64
+ __name(mergeProps, "mergeProps");
65
+ function joinClass(outer, inner) {
66
+ const a = typeof outer === "string" ? outer : "";
67
+ const b = typeof inner === "string" ? inner : "";
68
+ const joined = [a, b].filter(Boolean).join(" ");
69
+ return joined.length > 0 ? joined : void 0;
70
+ }
71
+ __name(joinClass, "joinClass");
72
+ function isEventHandler(key, outer, inner) {
73
+ if (!key.startsWith("on") || key.length < 3) {
74
+ return false;
75
+ }
76
+ if (key[2] !== key[2]?.toUpperCase()) {
77
+ return false;
78
+ }
79
+ return typeof outer === "function" && typeof inner === "function";
80
+ }
81
+ __name(isEventHandler, "isEventHandler");
82
+ function composeHandlers(outer, inner) {
83
+ return (...args) => {
84
+ outer(...args);
85
+ inner(...args);
86
+ };
87
+ }
88
+ __name(composeHandlers, "composeHandlers");
89
+
90
+ // src/theme/px.ts
91
+ function px(value) {
92
+ if (typeof value === "number") {
93
+ return value;
94
+ }
95
+ const n = Number.parseFloat(value);
96
+ return Number.isFinite(n) ? n : 0;
97
+ }
98
+ __name(px, "px");
99
+ var ColorSchemeOverrideContext = react.createContext(null);
100
+ ColorSchemeOverrideContext.displayName = "ColorSchemeOverrideContext";
101
+ var isWeb = reactNative.Platform.OS === "web";
102
+ function readWebScheme() {
103
+ if (typeof document === "undefined") {
104
+ return "light";
105
+ }
106
+ const root = document.documentElement;
107
+ if (root.classList.contains("dark")) {
108
+ return "dark";
109
+ }
110
+ if (root.getAttribute("data-theme") === "dark") {
111
+ return "dark";
112
+ }
113
+ return "light";
114
+ }
115
+ __name(readWebScheme, "readWebScheme");
116
+ function useColorScheme() {
117
+ const override = react.useContext(ColorSchemeOverrideContext);
118
+ const [scheme, setScheme] = react.useState(() => {
119
+ if (isWeb) {
120
+ return readWebScheme();
121
+ }
122
+ return reactNative.Appearance.getColorScheme() ?? "light";
123
+ });
124
+ react.useEffect(() => {
125
+ if (isWeb) {
126
+ const root = document.documentElement;
127
+ const update = /* @__PURE__ */ __name(() => setScheme(readWebScheme()), "update");
128
+ const observer = new MutationObserver(update);
129
+ observer.observe(root, { attributes: true, attributeFilter: ["class", "data-theme"] });
130
+ update();
131
+ return () => observer.disconnect();
132
+ }
133
+ const sub = reactNative.Appearance.addChangeListener(({ colorScheme }) => {
134
+ setScheme(colorScheme ?? "light");
135
+ });
136
+ return () => sub.remove();
137
+ }, []);
138
+ return override ?? scheme;
139
+ }
140
+ __name(useColorScheme, "useColorScheme");
141
+
142
+ // ../tokens/build/theme.ts
143
+ var theme = {
144
+ color: {
145
+ danger: "#ef4444",
146
+ info: "#3b82f6",
147
+ neutral: {
148
+ "100": "#f4f4f5",
149
+ "200": "#e4e4e7",
150
+ "300": "#d4d4d8",
151
+ "400": "#a1a1aa",
152
+ "50": "#fafafa",
153
+ "500": "#71717a",
154
+ "600": "#52525b",
155
+ "700": "#3f3f46",
156
+ "800": "#27272a",
157
+ "900": "#18181b"
158
+ },
159
+ primary: {
160
+ "100": "#ccfbf1",
161
+ "200": "#99f6e4",
162
+ "300": "#5eead4",
163
+ "400": "#2dd4bf",
164
+ "50": "#f0fdfa",
165
+ "500": "#14b8a6",
166
+ "600": "#0d9488",
167
+ "700": "#0f766e",
168
+ "800": "#115e59",
169
+ "900": "#134e4a"
170
+ },
171
+ success: "#22c55e",
172
+ warning: "#f59e0b"
173
+ },
174
+ fontFamily: {
175
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
176
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
177
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
178
+ },
179
+ fontSize: {
180
+ "2xl": "24px",
181
+ "3xl": "30px",
182
+ "4xl": "36px",
183
+ lg: "18px",
184
+ md: "16px",
185
+ sm: "14px",
186
+ xl: "20px",
187
+ xs: "12px"
188
+ },
189
+ fontWeight: {
190
+ bold: "700",
191
+ medium: "500",
192
+ regular: "400",
193
+ semibold: "600"
194
+ },
195
+ lineHeight: {
196
+ normal: "1.4",
197
+ relaxed: "1.6",
198
+ tight: "1.2"
199
+ },
200
+ radius: {
201
+ "2xl": "16px",
202
+ full: "9999px",
203
+ lg: "8px",
204
+ md: "6px",
205
+ none: "0px",
206
+ sm: "4px",
207
+ xl: "12px"
208
+ },
209
+ semantic: {
210
+ background: {
211
+ default: "#fafafa",
212
+ elevated: "#ffffff",
213
+ subtle: "#f4f4f5"
214
+ },
215
+ border: {
216
+ default: "#e4e4e7",
217
+ strong: "#d4d4d8"
218
+ },
219
+ interactive: {
220
+ destructive: "#ef4444",
221
+ primary: "#0d9488",
222
+ primaryHover: "#0f766e",
223
+ primaryPressed: "#115e59"
224
+ },
225
+ text: {
226
+ default: "#18181b",
227
+ inverted: "#fafafa",
228
+ muted: "#52525b"
229
+ }
230
+ },
231
+ shadow: {
232
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
233
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
234
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
235
+ },
236
+ spacing: {
237
+ "0": "0px",
238
+ "1": "4px",
239
+ "10": "40px",
240
+ "12": "48px",
241
+ "16": "64px",
242
+ "2": "8px",
243
+ "20": "80px",
244
+ "24": "96px",
245
+ "3": "12px",
246
+ "4": "16px",
247
+ "5": "20px",
248
+ "6": "24px",
249
+ "8": "32px"
250
+ }
251
+ };
252
+ var themeDark = {
253
+ color: {
254
+ danger: "#ef4444",
255
+ info: "#3b82f6",
256
+ neutral: {
257
+ "100": "#f4f4f5",
258
+ "200": "#e4e4e7",
259
+ "300": "#d4d4d8",
260
+ "400": "#a1a1aa",
261
+ "50": "#fafafa",
262
+ "500": "#71717a",
263
+ "600": "#52525b",
264
+ "700": "#3f3f46",
265
+ "800": "#27272a",
266
+ "900": "#18181b"
267
+ },
268
+ primary: {
269
+ "100": "#ccfbf1",
270
+ "200": "#99f6e4",
271
+ "300": "#5eead4",
272
+ "400": "#2dd4bf",
273
+ "50": "#f0fdfa",
274
+ "500": "#14b8a6",
275
+ "600": "#0d9488",
276
+ "700": "#0f766e",
277
+ "800": "#115e59",
278
+ "900": "#134e4a"
279
+ },
280
+ success: "#22c55e",
281
+ warning: "#f59e0b"
282
+ },
283
+ fontFamily: {
284
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
285
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
286
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
287
+ },
288
+ fontSize: {
289
+ "2xl": "24px",
290
+ "3xl": "30px",
291
+ "4xl": "36px",
292
+ lg: "18px",
293
+ md: "16px",
294
+ sm: "14px",
295
+ xl: "20px",
296
+ xs: "12px"
297
+ },
298
+ fontWeight: {
299
+ bold: "700",
300
+ medium: "500",
301
+ regular: "400",
302
+ semibold: "600"
303
+ },
304
+ lineHeight: {
305
+ normal: "1.4",
306
+ relaxed: "1.6",
307
+ tight: "1.2"
308
+ },
309
+ radius: {
310
+ "2xl": "16px",
311
+ full: "9999px",
312
+ lg: "8px",
313
+ md: "6px",
314
+ none: "0px",
315
+ sm: "4px",
316
+ xl: "12px"
317
+ },
318
+ semantic: {
319
+ background: {
320
+ default: "#18181b",
321
+ elevated: "#3f3f46",
322
+ subtle: "#27272a"
323
+ },
324
+ border: {
325
+ default: "#3f3f46",
326
+ strong: "#52525b"
327
+ },
328
+ interactive: {
329
+ destructive: "#ef4444",
330
+ primary: "#2dd4bf",
331
+ primaryHover: "#5eead4",
332
+ primaryPressed: "#99f6e4"
333
+ },
334
+ text: {
335
+ default: "#fafafa",
336
+ inverted: "#18181b",
337
+ muted: "#a1a1aa"
338
+ }
339
+ },
340
+ shadow: {
341
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
342
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
343
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
344
+ },
345
+ spacing: {
346
+ "0": "0px",
347
+ "1": "4px",
348
+ "10": "40px",
349
+ "12": "48px",
350
+ "16": "64px",
351
+ "2": "8px",
352
+ "20": "80px",
353
+ "24": "96px",
354
+ "3": "12px",
355
+ "4": "16px",
356
+ "5": "20px",
357
+ "6": "24px",
358
+ "8": "32px"
359
+ }
360
+ };
361
+ var defaultTheme = {
362
+ light: theme,
363
+ dark: themeDark
364
+ };
365
+ var ThemeContext = react.createContext(defaultTheme);
366
+ ThemeContext.displayName = "ThemeContext";
367
+
368
+ // src/theme/use-theme-colors.ts
369
+ function useThemeColors() {
370
+ const scheme = useColorScheme();
371
+ const themePair = react.useContext(ThemeContext);
372
+ return scheme === "dark" ? themePair.dark : themePair.light;
373
+ }
374
+ __name(useThemeColors, "useThemeColors");
375
+
376
+ // src/utils/cn.ts
377
+ function cn(...inputs) {
378
+ const out = [];
379
+ for (const input of inputs) {
380
+ append(out, input);
381
+ }
382
+ return out.join(" ");
383
+ }
384
+ __name(cn, "cn");
385
+ function append(out, input) {
386
+ if (!input) {
387
+ return;
388
+ }
389
+ if (typeof input === "string") {
390
+ if (input.length > 0) {
391
+ out.push(input);
392
+ }
393
+ return;
394
+ }
395
+ if (typeof input === "number") {
396
+ return;
397
+ }
398
+ if (Array.isArray(input)) {
399
+ for (const inner of input) {
400
+ append(out, inner);
401
+ }
402
+ return;
403
+ }
404
+ if (typeof input === "object") {
405
+ for (const key of Object.keys(input)) {
406
+ if (input[key]) {
407
+ out.push(key);
408
+ }
409
+ }
410
+ }
411
+ }
412
+ __name(append, "append");
413
+
414
+ // src/components/Dialog/blur-backdrop.tsx
415
+ var BlurBackdrop = /* @__PURE__ */ __name((_props) => {
416
+ return null;
417
+ }, "BlurBackdrop");
418
+ var AlertDialogContext = react.createContext(null);
419
+ var useAlertDialogContext = /* @__PURE__ */ __name((label) => {
420
+ const ctx = react.useContext(AlertDialogContext);
421
+ if (!ctx) {
422
+ throw new Error(`<${label}> must be rendered inside an <AlertDialog>.`);
423
+ }
424
+ return ctx;
425
+ }, "useAlertDialogContext");
426
+ var AlertDialogRoot = /* @__PURE__ */ __name(({ open, defaultOpen = false, onOpenChange, children }) => {
427
+ const [inner, setInner] = react.useState(defaultOpen);
428
+ const isControlled = open !== void 0;
429
+ const current = isControlled ? open : inner;
430
+ const setOpen = react.useCallback(
431
+ (next) => {
432
+ if (!isControlled) {
433
+ setInner(next);
434
+ }
435
+ onOpenChange?.(next);
436
+ },
437
+ [isControlled, onOpenChange]
438
+ );
439
+ const baseId = react.useId();
440
+ const triggerRef = react.useRef(null);
441
+ const cancelRef = react.useRef(null);
442
+ const ctxValue = {
443
+ open: current,
444
+ setOpen,
445
+ titleId: `${baseId}-title`,
446
+ descriptionId: `${baseId}-description`,
447
+ triggerRef,
448
+ cancelRef
449
+ };
450
+ return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogContext.Provider, { value: ctxValue, children });
451
+ }, "AlertDialogRoot");
452
+ var AlertDialogTrigger = /* @__PURE__ */ __name(({ asChild = true, children, className, testID }) => {
453
+ const ctx = useAlertDialogContext("AlertDialogTrigger");
454
+ const onPress = react.useCallback(() => ctx.setOpen(true), [ctx]);
455
+ if (asChild && react.isValidElement(children)) {
456
+ const child = children;
457
+ const fire = /* @__PURE__ */ __name((existing) => (event) => {
458
+ existing?.(event);
459
+ ctx.setOpen(true);
460
+ }, "fire");
461
+ return /* @__PURE__ */ jsxRuntime.jsx(
462
+ Slot,
463
+ {
464
+ ref: (node) => {
465
+ ctx.triggerRef.current = node;
466
+ },
467
+ onClick: fire(child.props.onClick),
468
+ onPress: fire(child.props.onPress),
469
+ ...testID !== void 0 ? { "data-testid": testID } : {},
470
+ ...className !== void 0 ? { className } : {},
471
+ children: child
472
+ }
473
+ );
474
+ }
475
+ return /* @__PURE__ */ jsxRuntime.jsx(
476
+ reactNative.Pressable,
477
+ {
478
+ ref: (node) => {
479
+ ctx.triggerRef.current = node;
480
+ },
481
+ onPress,
482
+ ...testID !== void 0 ? { testID } : {},
483
+ ...className !== void 0 ? { className } : {},
484
+ children: wrapStringChildren(children)
485
+ }
486
+ );
487
+ }, "AlertDialogTrigger");
488
+ function wrapStringChildren(children) {
489
+ if (typeof children === "string" || typeof children === "number") {
490
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { children });
491
+ }
492
+ return children;
493
+ }
494
+ __name(wrapStringChildren, "wrapStringChildren");
495
+ var SCRIM_COLOR = "rgba(0, 0, 0, 0.24)";
496
+ var BLUR_AMOUNT = 4;
497
+ var OVERLAY_LAYOUT_BASE = {
498
+ position: reactNative.Platform.OS === "web" ? "fixed" : "absolute",
499
+ top: 0,
500
+ left: 0,
501
+ right: 0,
502
+ bottom: 0,
503
+ alignItems: "center",
504
+ justifyContent: "center",
505
+ // Native overlay stays transparent — the BlurBackdrop sibling renders
506
+ // dim + frosted-glass via expo-blur, and a SCRIM_COLOR layer on top
507
+ // would hide the blur. Web keeps its CSS overlay path (the imperative
508
+ // useEffect below sets backgroundColor + backdrop-filter on web).
509
+ ...reactNative.Platform.OS === "web" ? { zIndex: 50 } : { backgroundColor: "transparent" }
510
+ };
511
+ var CONTENT_LAYOUT_BASE = {
512
+ width: "100%",
513
+ maxWidth: 480,
514
+ // component-density literal — not from theme
515
+ ...reactNative.Platform.OS === "web" ? {
516
+ boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",
517
+ // Subtle scale-in: 0.95 → 1 over 150ms. Honors prefers-reduced-motion
518
+ // via the media query below — set as a CSS variable so the keyframe
519
+ // can be disabled without remounting.
520
+ animationName: "nori-alert-dialog-in",
521
+ animationDuration: "150ms",
522
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
523
+ animationFillMode: "both"
524
+ } : { elevation: 24 }
525
+ };
526
+ var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), [role="button"]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])';
527
+ function ensureFocusable(node) {
528
+ if (!node) {
529
+ return;
530
+ }
531
+ if (node.hasAttribute("tabindex")) {
532
+ return;
533
+ }
534
+ node.setAttribute("tabindex", "0");
535
+ }
536
+ __name(ensureFocusable, "ensureFocusable");
537
+ var KEYFRAMES_STYLE_ID = "nori-alert-dialog-keyframes";
538
+ var KEYFRAMES_CSS = `
539
+ @keyframes nori-alert-dialog-in {
540
+ from { opacity: 0; transform: scale(0.95); }
541
+ to { opacity: 1; transform: scale(1); }
542
+ }
543
+ @media (prefers-reduced-motion: reduce) {
544
+ [data-nori-alert-dialog-content] { animation: none !important; }
545
+ }
546
+ `;
547
+ function ensureKeyframesInjected() {
548
+ if (reactNative.Platform.OS !== "web") {
549
+ return;
550
+ }
551
+ if (typeof document === "undefined") {
552
+ return;
553
+ }
554
+ if (document.getElementById(KEYFRAMES_STYLE_ID)) {
555
+ return;
556
+ }
557
+ const style = document.createElement("style");
558
+ style.id = KEYFRAMES_STYLE_ID;
559
+ style.textContent = KEYFRAMES_CSS;
560
+ document.head.appendChild(style);
561
+ }
562
+ __name(ensureKeyframesInjected, "ensureKeyframesInjected");
563
+ var AlertDialogContent = /* @__PURE__ */ __name(({ children, className, testID }) => {
564
+ const ctx = useAlertDialogContext("AlertDialogContent");
565
+ const colors = useThemeColors();
566
+ const scheme = useColorScheme();
567
+ const contentRef = react.useRef(null);
568
+ const overlayDomRef = react.useRef(null);
569
+ const overlayStyle = {
570
+ ...OVERLAY_LAYOUT_BASE,
571
+ padding: px(colors.spacing["4"])
572
+ };
573
+ const contentStyle = {
574
+ ...CONTENT_LAYOUT_BASE,
575
+ borderRadius: px(colors.radius.xl),
576
+ padding: px(colors.spacing["6"]),
577
+ gap: px(colors.spacing["3"])
578
+ };
579
+ const [entered, setEntered] = react.useState(false);
580
+ react.useEffect(() => {
581
+ if (reactNative.Platform.OS !== "web") {
582
+ setEntered(true);
583
+ return;
584
+ }
585
+ if (!ctx.open) {
586
+ setEntered(false);
587
+ return;
588
+ }
589
+ const id = requestAnimationFrame(() => setEntered(true));
590
+ return () => cancelAnimationFrame(id);
591
+ }, [ctx.open]);
592
+ react.useEffect(() => {
593
+ if (reactNative.Platform.OS !== "web") {
594
+ return;
595
+ }
596
+ const node = overlayDomRef.current;
597
+ if (!node) {
598
+ return;
599
+ }
600
+ node.style.transitionProperty = "background-color, backdrop-filter, -webkit-backdrop-filter";
601
+ node.style.transitionDuration = "150ms, 200ms, 200ms";
602
+ node.style.transitionTimingFunction = "ease-out";
603
+ if (entered) {
604
+ node.style.backgroundColor = SCRIM_COLOR;
605
+ node.style.backdropFilter = `blur(${BLUR_AMOUNT}px)`;
606
+ node.style.setProperty("-webkit-backdrop-filter", `blur(${BLUR_AMOUNT}px)`);
607
+ } else {
608
+ node.style.backgroundColor = "rgba(0, 0, 0, 0)";
609
+ node.style.backdropFilter = "blur(0px)";
610
+ node.style.setProperty("-webkit-backdrop-filter", "blur(0px)");
611
+ }
612
+ }, [entered]);
613
+ react.useEffect(() => {
614
+ if (!ctx.open) {
615
+ return;
616
+ }
617
+ if (reactNative.Platform.OS !== "web") {
618
+ return;
619
+ }
620
+ if (typeof document === "undefined") {
621
+ return;
622
+ }
623
+ ensureKeyframesInjected();
624
+ const previouslyFocused = document.activeElement;
625
+ const prevBodyOverflow = document.body.style.overflow;
626
+ document.body.style.overflow = "hidden";
627
+ const focusInitial = /* @__PURE__ */ __name(() => {
628
+ const node = contentRef.current;
629
+ if (!node) {
630
+ return;
631
+ }
632
+ const focusable = node.querySelectorAll(FOCUSABLE_SELECTOR);
633
+ for (const el of focusable) {
634
+ ensureFocusable(el);
635
+ }
636
+ const cancel = ctx.cancelRef.current;
637
+ if (cancel?.focus) {
638
+ ensureFocusable(cancel);
639
+ cancel.focus();
640
+ return;
641
+ }
642
+ const first = focusable[0];
643
+ if (first) {
644
+ first.focus();
645
+ } else {
646
+ node.setAttribute("tabindex", "-1");
647
+ node.focus();
648
+ }
649
+ }, "focusInitial");
650
+ focusInitial();
651
+ const onKeyDown = /* @__PURE__ */ __name((event) => {
652
+ if (event.key !== "Tab") {
653
+ return;
654
+ }
655
+ const node = contentRef.current;
656
+ if (!node) {
657
+ return;
658
+ }
659
+ const focusable = Array.from(node.querySelectorAll(FOCUSABLE_SELECTOR));
660
+ if (focusable.length === 0) {
661
+ event.preventDefault();
662
+ return;
663
+ }
664
+ const first = focusable[0];
665
+ const last = focusable[focusable.length - 1];
666
+ if (!first || !last) {
667
+ return;
668
+ }
669
+ for (const el of focusable) {
670
+ ensureFocusable(el);
671
+ }
672
+ if (event.shiftKey) {
673
+ if (document.activeElement === first || !node.contains(document.activeElement)) {
674
+ event.preventDefault();
675
+ last.focus();
676
+ }
677
+ } else if (document.activeElement === last) {
678
+ event.preventDefault();
679
+ first.focus();
680
+ }
681
+ }, "onKeyDown");
682
+ document.addEventListener("keydown", onKeyDown);
683
+ return () => {
684
+ document.removeEventListener("keydown", onKeyDown);
685
+ document.body.style.overflow = prevBodyOverflow;
686
+ const restoreTo = ctx.triggerRef.current ?? previouslyFocused;
687
+ restoreTo?.focus?.();
688
+ };
689
+ }, [ctx.open, ctx.triggerRef, ctx.cancelRef]);
690
+ const onRequestClose = react.useCallback(() => {
691
+ }, []);
692
+ return /* @__PURE__ */ jsxRuntime.jsxs(
693
+ reactNative.Modal,
694
+ {
695
+ visible: ctx.open,
696
+ transparent: true,
697
+ animationType: reactNative.Platform.OS === "web" ? "none" : "fade",
698
+ onRequestClose,
699
+ children: [
700
+ /* @__PURE__ */ jsxRuntime.jsx(BlurBackdrop, { intensity: 60, tint: scheme === "dark" ? "dark" : "light", style: reactNative.StyleSheet.absoluteFill }),
701
+ /* @__PURE__ */ jsxRuntime.jsx(
702
+ reactNative.View,
703
+ {
704
+ ref: (node) => {
705
+ overlayDomRef.current = node;
706
+ },
707
+ accessibilityRole: "none",
708
+ "aria-hidden": true,
709
+ style: overlayStyle,
710
+ children: /* @__PURE__ */ jsxRuntime.jsx(
711
+ reactNative.View,
712
+ {
713
+ ref: (node) => {
714
+ contentRef.current = node;
715
+ },
716
+ role: "alertdialog",
717
+ accessibilityRole: "alert",
718
+ "aria-modal": true,
719
+ "aria-labelledby": ctx.titleId,
720
+ "aria-describedby": ctx.descriptionId,
721
+ ...testID !== void 0 ? { testID } : {},
722
+ ...{ "data-nori-alert-dialog-content": "true" },
723
+ className: cn("w-full max-w-md rounded-xl bg-semantic-background-elevated p-6 gap-3", className),
724
+ style: [contentStyle, { backgroundColor: colors.semantic.background.elevated }],
725
+ children: /* @__PURE__ */ jsxRuntime.jsx(
726
+ reactNative.View,
727
+ {
728
+ className: "flex-col gap-1.5",
729
+ style: { flexDirection: "column", gap: px(colors.spacing["2"]) - 2 },
730
+ children
731
+ }
732
+ )
733
+ }
734
+ )
735
+ }
736
+ )
737
+ ]
738
+ }
739
+ );
740
+ }, "AlertDialogContent");
741
+ var AlertDialogTitle = /* @__PURE__ */ __name(({ children, className }) => {
742
+ const ctx = useAlertDialogContext("AlertDialogTitle");
743
+ const colors = useThemeColors();
744
+ return /* @__PURE__ */ jsxRuntime.jsx(
745
+ reactNative.Text,
746
+ {
747
+ nativeID: ctx.titleId,
748
+ id: ctx.titleId,
749
+ role: "heading",
750
+ "aria-level": 2,
751
+ className: cn("text-lg font-semibold text-semantic-text-default", className),
752
+ style: {
753
+ color: colors.semantic.text.default,
754
+ fontFamily: colors.fontFamily.display,
755
+ fontSize: px(colors.fontSize.lg),
756
+ fontWeight: colors.fontWeight.semibold
757
+ },
758
+ children
759
+ }
760
+ );
761
+ }, "AlertDialogTitle");
762
+ var AlertDialogDescription = /* @__PURE__ */ __name(({ children, className }) => {
763
+ const ctx = useAlertDialogContext("AlertDialogDescription");
764
+ const colors = useThemeColors();
765
+ return /* @__PURE__ */ jsxRuntime.jsx(
766
+ reactNative.Text,
767
+ {
768
+ nativeID: ctx.descriptionId,
769
+ id: ctx.descriptionId,
770
+ className: cn("text-sm text-semantic-text-muted", className),
771
+ style: {
772
+ color: colors.semantic.text.muted,
773
+ fontFamily: colors.fontFamily.body,
774
+ fontSize: px(colors.fontSize.sm),
775
+ lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal)
776
+ },
777
+ children
778
+ }
779
+ );
780
+ }, "AlertDialogDescription");
781
+ var AlertDialogAction = /* @__PURE__ */ __name(({ asChild = true, children, className, testID, onPress }) => {
782
+ const ctx = useAlertDialogContext("AlertDialogAction");
783
+ const handle = react.useCallback(
784
+ (event) => {
785
+ onPress?.(event);
786
+ ctx.setOpen(false);
787
+ },
788
+ [ctx, onPress]
789
+ );
790
+ if (asChild && react.isValidElement(children)) {
791
+ const child = children;
792
+ const fire = /* @__PURE__ */ __name((existing) => (event) => {
793
+ existing?.(event);
794
+ handle(event);
795
+ }, "fire");
796
+ return /* @__PURE__ */ jsxRuntime.jsx(
797
+ Slot,
798
+ {
799
+ onClick: fire(child.props.onClick),
800
+ onPress: fire(child.props.onPress),
801
+ ...testID !== void 0 ? { "data-testid": testID } : {},
802
+ ...className !== void 0 ? { className } : {},
803
+ children: child
804
+ }
805
+ );
806
+ }
807
+ return /* @__PURE__ */ jsxRuntime.jsx(
808
+ reactNative.Pressable,
809
+ {
810
+ onPress: handle,
811
+ role: "button",
812
+ accessibilityRole: "button",
813
+ ...testID !== void 0 ? { testID } : {},
814
+ ...className !== void 0 ? { className } : {},
815
+ children: wrapStringChildren(children)
816
+ }
817
+ );
818
+ }, "AlertDialogAction");
819
+ var AlertDialogCancel = /* @__PURE__ */ __name(({ asChild = true, children, className, testID, onPress }) => {
820
+ const ctx = useAlertDialogContext("AlertDialogCancel");
821
+ const handle = react.useCallback(
822
+ (event) => {
823
+ onPress?.(event);
824
+ ctx.setOpen(false);
825
+ },
826
+ [ctx, onPress]
827
+ );
828
+ if (asChild && react.isValidElement(children)) {
829
+ const child = children;
830
+ const fire = /* @__PURE__ */ __name((existing) => (event) => {
831
+ existing?.(event);
832
+ handle(event);
833
+ }, "fire");
834
+ return /* @__PURE__ */ jsxRuntime.jsx(
835
+ Slot,
836
+ {
837
+ ref: (node) => {
838
+ ctx.cancelRef.current = node;
839
+ },
840
+ onClick: fire(child.props.onClick),
841
+ onPress: fire(child.props.onPress),
842
+ ...testID !== void 0 ? { "data-testid": testID } : {},
843
+ ...className !== void 0 ? { className } : {},
844
+ children: child
845
+ }
846
+ );
847
+ }
848
+ return /* @__PURE__ */ jsxRuntime.jsx(
849
+ reactNative.Pressable,
850
+ {
851
+ ref: (node) => {
852
+ ctx.cancelRef.current = node;
853
+ },
854
+ onPress: handle,
855
+ role: "button",
856
+ accessibilityRole: "button",
857
+ ...testID !== void 0 ? { testID } : {},
858
+ ...className !== void 0 ? { className } : {},
859
+ children: wrapStringChildren(children)
860
+ }
861
+ );
862
+ }, "AlertDialogCancel");
863
+ var AlertDialogFooter = /* @__PURE__ */ __name(({ children, className }) => {
864
+ const colors = useThemeColors();
865
+ return /* @__PURE__ */ jsxRuntime.jsx(
866
+ reactNative.View,
867
+ {
868
+ className: cn("mt-4 flex-row items-center justify-end gap-2", className),
869
+ style: {
870
+ marginTop: px(colors.spacing["4"]),
871
+ flexDirection: "row",
872
+ alignItems: "center",
873
+ justifyContent: "flex-end",
874
+ gap: px(colors.spacing["2"])
875
+ },
876
+ children
877
+ }
878
+ );
879
+ }, "AlertDialogFooter");
880
+ var AlertDialog = Object.assign(AlertDialogRoot, {
881
+ Trigger: AlertDialogTrigger,
882
+ Content: AlertDialogContent,
883
+ Title: AlertDialogTitle,
884
+ Description: AlertDialogDescription,
885
+ Footer: AlertDialogFooter,
886
+ Action: AlertDialogAction,
887
+ Cancel: AlertDialogCancel
888
+ });
889
+
890
+ exports.AlertDialog = AlertDialog;
891
+ //# sourceMappingURL=index.cjs.map
892
+ //# sourceMappingURL=index.cjs.map