@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,770 @@
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/theme/px.ts
11
+ function px(value) {
12
+ if (typeof value === "number") {
13
+ return value;
14
+ }
15
+ const n = Number.parseFloat(value);
16
+ return Number.isFinite(n) ? n : 0;
17
+ }
18
+ __name(px, "px");
19
+
20
+ // ../tokens/build/theme.ts
21
+ var theme = {
22
+ color: {
23
+ danger: "#ef4444",
24
+ info: "#3b82f6",
25
+ neutral: {
26
+ "100": "#f4f4f5",
27
+ "200": "#e4e4e7",
28
+ "300": "#d4d4d8",
29
+ "400": "#a1a1aa",
30
+ "50": "#fafafa",
31
+ "500": "#71717a",
32
+ "600": "#52525b",
33
+ "700": "#3f3f46",
34
+ "800": "#27272a",
35
+ "900": "#18181b"
36
+ },
37
+ primary: {
38
+ "100": "#ccfbf1",
39
+ "200": "#99f6e4",
40
+ "300": "#5eead4",
41
+ "400": "#2dd4bf",
42
+ "50": "#f0fdfa",
43
+ "500": "#14b8a6",
44
+ "600": "#0d9488",
45
+ "700": "#0f766e",
46
+ "800": "#115e59",
47
+ "900": "#134e4a"
48
+ },
49
+ success: "#22c55e",
50
+ warning: "#f59e0b"
51
+ },
52
+ fontFamily: {
53
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
54
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
55
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
56
+ },
57
+ fontSize: {
58
+ "2xl": "24px",
59
+ "3xl": "30px",
60
+ "4xl": "36px",
61
+ lg: "18px",
62
+ md: "16px",
63
+ sm: "14px",
64
+ xl: "20px",
65
+ xs: "12px"
66
+ },
67
+ fontWeight: {
68
+ bold: "700",
69
+ medium: "500",
70
+ regular: "400",
71
+ semibold: "600"
72
+ },
73
+ lineHeight: {
74
+ normal: "1.4",
75
+ relaxed: "1.6",
76
+ tight: "1.2"
77
+ },
78
+ radius: {
79
+ "2xl": "16px",
80
+ full: "9999px",
81
+ lg: "8px",
82
+ md: "6px",
83
+ none: "0px",
84
+ sm: "4px",
85
+ xl: "12px"
86
+ },
87
+ semantic: {
88
+ background: {
89
+ default: "#fafafa",
90
+ elevated: "#ffffff",
91
+ subtle: "#f4f4f5"
92
+ },
93
+ border: {
94
+ default: "#e4e4e7",
95
+ strong: "#d4d4d8"
96
+ },
97
+ interactive: {
98
+ destructive: "#ef4444",
99
+ primary: "#0d9488",
100
+ primaryHover: "#0f766e",
101
+ primaryPressed: "#115e59"
102
+ },
103
+ text: {
104
+ default: "#18181b",
105
+ inverted: "#fafafa",
106
+ muted: "#52525b"
107
+ }
108
+ },
109
+ shadow: {
110
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
111
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
112
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
113
+ },
114
+ spacing: {
115
+ "0": "0px",
116
+ "1": "4px",
117
+ "10": "40px",
118
+ "12": "48px",
119
+ "16": "64px",
120
+ "2": "8px",
121
+ "20": "80px",
122
+ "24": "96px",
123
+ "3": "12px",
124
+ "4": "16px",
125
+ "5": "20px",
126
+ "6": "24px",
127
+ "8": "32px"
128
+ }
129
+ };
130
+ var themeDark = {
131
+ color: {
132
+ danger: "#ef4444",
133
+ info: "#3b82f6",
134
+ neutral: {
135
+ "100": "#f4f4f5",
136
+ "200": "#e4e4e7",
137
+ "300": "#d4d4d8",
138
+ "400": "#a1a1aa",
139
+ "50": "#fafafa",
140
+ "500": "#71717a",
141
+ "600": "#52525b",
142
+ "700": "#3f3f46",
143
+ "800": "#27272a",
144
+ "900": "#18181b"
145
+ },
146
+ primary: {
147
+ "100": "#ccfbf1",
148
+ "200": "#99f6e4",
149
+ "300": "#5eead4",
150
+ "400": "#2dd4bf",
151
+ "50": "#f0fdfa",
152
+ "500": "#14b8a6",
153
+ "600": "#0d9488",
154
+ "700": "#0f766e",
155
+ "800": "#115e59",
156
+ "900": "#134e4a"
157
+ },
158
+ success: "#22c55e",
159
+ warning: "#f59e0b"
160
+ },
161
+ fontFamily: {
162
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
163
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
164
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
165
+ },
166
+ fontSize: {
167
+ "2xl": "24px",
168
+ "3xl": "30px",
169
+ "4xl": "36px",
170
+ lg: "18px",
171
+ md: "16px",
172
+ sm: "14px",
173
+ xl: "20px",
174
+ xs: "12px"
175
+ },
176
+ fontWeight: {
177
+ bold: "700",
178
+ medium: "500",
179
+ regular: "400",
180
+ semibold: "600"
181
+ },
182
+ lineHeight: {
183
+ normal: "1.4",
184
+ relaxed: "1.6",
185
+ tight: "1.2"
186
+ },
187
+ radius: {
188
+ "2xl": "16px",
189
+ full: "9999px",
190
+ lg: "8px",
191
+ md: "6px",
192
+ none: "0px",
193
+ sm: "4px",
194
+ xl: "12px"
195
+ },
196
+ semantic: {
197
+ background: {
198
+ default: "#18181b",
199
+ elevated: "#3f3f46",
200
+ subtle: "#27272a"
201
+ },
202
+ border: {
203
+ default: "#3f3f46",
204
+ strong: "#52525b"
205
+ },
206
+ interactive: {
207
+ destructive: "#ef4444",
208
+ primary: "#2dd4bf",
209
+ primaryHover: "#5eead4",
210
+ primaryPressed: "#99f6e4"
211
+ },
212
+ text: {
213
+ default: "#fafafa",
214
+ inverted: "#18181b",
215
+ muted: "#a1a1aa"
216
+ }
217
+ },
218
+ shadow: {
219
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
220
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
221
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
222
+ },
223
+ spacing: {
224
+ "0": "0px",
225
+ "1": "4px",
226
+ "10": "40px",
227
+ "12": "48px",
228
+ "16": "64px",
229
+ "2": "8px",
230
+ "20": "80px",
231
+ "24": "96px",
232
+ "3": "12px",
233
+ "4": "16px",
234
+ "5": "20px",
235
+ "6": "24px",
236
+ "8": "32px"
237
+ }
238
+ };
239
+ var defaultTheme = {
240
+ light: theme,
241
+ dark: themeDark
242
+ };
243
+ var ThemeContext = react.createContext(defaultTheme);
244
+ ThemeContext.displayName = "ThemeContext";
245
+ var ColorSchemeOverrideContext = react.createContext(null);
246
+ ColorSchemeOverrideContext.displayName = "ColorSchemeOverrideContext";
247
+ var isWeb = reactNative.Platform.OS === "web";
248
+ function readWebScheme() {
249
+ if (typeof document === "undefined") {
250
+ return "light";
251
+ }
252
+ const root = document.documentElement;
253
+ if (root.classList.contains("dark")) {
254
+ return "dark";
255
+ }
256
+ if (root.getAttribute("data-theme") === "dark") {
257
+ return "dark";
258
+ }
259
+ return "light";
260
+ }
261
+ __name(readWebScheme, "readWebScheme");
262
+ function useColorScheme() {
263
+ const override = react.useContext(ColorSchemeOverrideContext);
264
+ const [scheme, setScheme] = react.useState(() => {
265
+ if (isWeb) {
266
+ return readWebScheme();
267
+ }
268
+ return reactNative.Appearance.getColorScheme() ?? "light";
269
+ });
270
+ react.useEffect(() => {
271
+ if (isWeb) {
272
+ const root = document.documentElement;
273
+ const update = /* @__PURE__ */ __name(() => setScheme(readWebScheme()), "update");
274
+ const observer = new MutationObserver(update);
275
+ observer.observe(root, { attributes: true, attributeFilter: ["class", "data-theme"] });
276
+ update();
277
+ return () => observer.disconnect();
278
+ }
279
+ const sub = reactNative.Appearance.addChangeListener(({ colorScheme }) => {
280
+ setScheme(colorScheme ?? "light");
281
+ });
282
+ return () => sub.remove();
283
+ }, []);
284
+ return override ?? scheme;
285
+ }
286
+ __name(useColorScheme, "useColorScheme");
287
+
288
+ // src/theme/use-theme-colors.ts
289
+ function useThemeColors() {
290
+ const scheme = useColorScheme();
291
+ const themePair = react.useContext(ThemeContext);
292
+ return scheme === "dark" ? themePair.dark : themePair.light;
293
+ }
294
+ __name(useThemeColors, "useThemeColors");
295
+
296
+ // src/utils/cn.ts
297
+ function cn(...inputs) {
298
+ const out = [];
299
+ for (const input of inputs) {
300
+ append(out, input);
301
+ }
302
+ return out.join(" ");
303
+ }
304
+ __name(cn, "cn");
305
+ function append(out, input) {
306
+ if (!input) {
307
+ return;
308
+ }
309
+ if (typeof input === "string") {
310
+ if (input.length > 0) {
311
+ out.push(input);
312
+ }
313
+ return;
314
+ }
315
+ if (typeof input === "number") {
316
+ return;
317
+ }
318
+ if (Array.isArray(input)) {
319
+ for (const inner of input) {
320
+ append(out, inner);
321
+ }
322
+ return;
323
+ }
324
+ if (typeof input === "object") {
325
+ for (const key of Object.keys(input)) {
326
+ if (input[key]) {
327
+ out.push(key);
328
+ }
329
+ }
330
+ }
331
+ }
332
+ __name(append, "append");
333
+ var SIZE_TOKENS = {
334
+ sm: { height: 32, paddingHKey: "2", fontKey: "sm", iconSize: 14 },
335
+ // 8px (closest to legacy 10) / fontSize sm 14
336
+ md: { height: 40, paddingHKey: "3", fontKey: "sm", iconSize: 16 },
337
+ // 12px / fontSize sm 14
338
+ lg: { height: 48, paddingHKey: "4", fontKey: "md", iconSize: 20 }
339
+ // 16px / fontSize md 16
340
+ };
341
+ var ToggleRoot = /* @__PURE__ */ __name(({
342
+ pressed,
343
+ defaultPressed = false,
344
+ onChange,
345
+ variant = "default",
346
+ size = "md",
347
+ disabled = false,
348
+ children,
349
+ "aria-label": ariaLabel,
350
+ accessibilityLabel,
351
+ className,
352
+ testID
353
+ }) => {
354
+ const [inner, setInner] = react.useState(defaultPressed);
355
+ const isControlled = pressed !== void 0;
356
+ const isOn = isControlled ? Boolean(pressed) : inner;
357
+ const handlePress = react.useCallback(() => {
358
+ if (disabled) {
359
+ return;
360
+ }
361
+ const next = !isOn;
362
+ if (!isControlled) {
363
+ setInner(next);
364
+ }
365
+ onChange?.(next);
366
+ }, [disabled, isControlled, isOn, onChange]);
367
+ return /* @__PURE__ */ jsxRuntime.jsx(
368
+ ToggleVisual,
369
+ {
370
+ isOn,
371
+ disabled,
372
+ variant,
373
+ size,
374
+ onPress: handlePress,
375
+ ariaLabel: ariaLabel ?? accessibilityLabel,
376
+ className,
377
+ testID,
378
+ children
379
+ }
380
+ );
381
+ }, "ToggleRoot");
382
+ var ToggleVisual = /* @__PURE__ */ __name(({
383
+ isOn,
384
+ disabled,
385
+ variant,
386
+ size,
387
+ onPress,
388
+ onKeyDown,
389
+ onFocus,
390
+ ariaLabel,
391
+ className,
392
+ testID,
393
+ children,
394
+ tabIndex,
395
+ borderRadius,
396
+ suppressRightBorder,
397
+ forceBorder,
398
+ refCallback
399
+ }) => {
400
+ const colors = useThemeColors();
401
+ const tokens = SIZE_TOKENS[size];
402
+ const paddingH = px(colors.spacing[tokens.paddingHKey]);
403
+ const fontSize = px(colors.fontSize[tokens.fontKey]);
404
+ const radiusEach = borderRadius && typeof borderRadius !== "number" ? borderRadius : void 0;
405
+ const radiusValue = typeof borderRadius === "number" ? borderRadius : radiusEach ? void 0 : px(colors.radius.md);
406
+ const baseStyle = {
407
+ height: tokens.height,
408
+ paddingHorizontal: paddingH,
409
+ flexDirection: "row",
410
+ alignItems: "center",
411
+ justifyContent: "center",
412
+ gap: px(colors.spacing["2"]) - 2,
413
+ // closest theme-rooted approximation of legacy 6
414
+ ...radiusValue !== void 0 ? { borderRadius: radiusValue } : null,
415
+ ...radiusEach ? {
416
+ borderTopLeftRadius: radiusEach.topLeft,
417
+ borderTopRightRadius: radiusEach.topRight,
418
+ borderBottomLeftRadius: radiusEach.bottomLeft,
419
+ borderBottomRightRadius: radiusEach.bottomRight
420
+ } : null,
421
+ // 200ms color/background transition. Web only; native ignores it.
422
+ ...{
423
+ transitionProperty: "background-color, border-color, color",
424
+ transitionDuration: "200ms",
425
+ transitionTimingFunction: "ease"
426
+ }
427
+ };
428
+ const surfaceFor = /* @__PURE__ */ __name((hovered) => {
429
+ if (variant === "outline" || forceBorder) {
430
+ return {
431
+ backgroundColor: isOn ? variant === "outline" ? colors.semantic.background.subtle : colors.semantic.interactive.primary : hovered ? colors.semantic.background.subtle : "transparent",
432
+ borderWidth: 1,
433
+ borderColor: isOn ? colors.semantic.interactive.primary : colors.semantic.border.default,
434
+ ...suppressRightBorder ? { borderRightWidth: 0 } : null
435
+ };
436
+ }
437
+ return {
438
+ backgroundColor: isOn ? colors.semantic.interactive.primary : hovered ? colors.semantic.background.subtle : colors.semantic.background.elevated,
439
+ borderWidth: 1,
440
+ borderColor: isOn ? colors.semantic.interactive.primary : colors.semantic.border.default
441
+ };
442
+ }, "surfaceFor");
443
+ const textColor = variant === "outline" ? isOn ? colors.semantic.interactive.primary : colors.semantic.text.default : isOn ? colors.semantic.text.inverted : colors.semantic.text.default;
444
+ const accessibilityProps = {
445
+ role: "button",
446
+ accessibilityRole: "button",
447
+ "aria-pressed": isOn,
448
+ accessibilityState: { selected: isOn, disabled },
449
+ ...ariaLabel ? { "aria-label": ariaLabel, accessibilityLabel: ariaLabel } : {},
450
+ ...disabled ? { "aria-disabled": true } : {},
451
+ ...testID !== void 0 ? { testID } : {},
452
+ ...tabIndex !== void 0 ? { tabIndex } : {},
453
+ ...onKeyDown ? { onKeyDown } : {},
454
+ ...onFocus ? { onFocus } : {}
455
+ };
456
+ const surfaceStatic = surfaceFor(false);
457
+ return /* @__PURE__ */ jsxRuntime.jsx(
458
+ reactNative.Pressable,
459
+ {
460
+ ref: (node) => {
461
+ refCallback?.(node);
462
+ },
463
+ disabled,
464
+ onPress: () => {
465
+ if (!disabled) {
466
+ onPress();
467
+ }
468
+ },
469
+ ...accessibilityProps,
470
+ className: cn(
471
+ "inline-flex flex-row items-center justify-center select-none",
472
+ disabled ? "opacity-50" : void 0,
473
+ className
474
+ ),
475
+ style: [baseStyle, surfaceStatic, disabled ? { opacity: 0.5 } : null],
476
+ children: /* @__PURE__ */ jsxRuntime.jsx(
477
+ reactNative.Text,
478
+ {
479
+ style: {
480
+ color: textColor,
481
+ fontFamily: colors.fontFamily.body,
482
+ fontSize,
483
+ fontWeight: colors.fontWeight.medium
484
+ },
485
+ children
486
+ }
487
+ )
488
+ }
489
+ );
490
+ }, "ToggleVisual");
491
+ var ToggleGroupContext = react.createContext(null);
492
+ var useToggleGroupContext = /* @__PURE__ */ __name(() => {
493
+ const ctx = react.useContext(ToggleGroupContext);
494
+ if (!ctx) {
495
+ throw new Error("<ToggleGroupItem> must be rendered inside a <ToggleGroup>.");
496
+ }
497
+ return ctx;
498
+ }, "useToggleGroupContext");
499
+ var ToggleGroup = /* @__PURE__ */ __name((props) => {
500
+ const {
501
+ type,
502
+ disabled = false,
503
+ variant = "default",
504
+ size = "md",
505
+ children,
506
+ className,
507
+ testID,
508
+ "aria-label": ariaLabel,
509
+ accessibilityLabel
510
+ } = props;
511
+ const [innerSingle, setInnerSingle] = react.useState(
512
+ type === "single" ? props.defaultValue : void 0
513
+ );
514
+ const [innerMultiple, setInnerMultiple] = react.useState(
515
+ type === "multiple" ? props.defaultValue ?? [] : []
516
+ );
517
+ const isSingle = type === "single";
518
+ const isControlled = isSingle ? props.value !== void 0 : props.value !== void 0;
519
+ const setValue = react.useCallback(
520
+ (next) => {
521
+ if (disabled) {
522
+ return;
523
+ }
524
+ if (isSingle) {
525
+ const current = isControlled ? props.value : innerSingle;
526
+ const updated = current === next ? void 0 : next;
527
+ if (!isControlled) {
528
+ setInnerSingle(updated);
529
+ }
530
+ props.onChange?.(updated);
531
+ } else {
532
+ const current = (isControlled ? props.value : innerMultiple) ?? [];
533
+ const updated = current.includes(next) ? current.filter((v) => v !== next) : [...current, next];
534
+ if (!isControlled) {
535
+ setInnerMultiple(updated);
536
+ }
537
+ props.onChange?.(updated);
538
+ }
539
+ },
540
+ [disabled, isSingle, isControlled, innerSingle, innerMultiple, props]
541
+ );
542
+ const isPressed = react.useCallback(
543
+ (v) => {
544
+ if (isSingle) {
545
+ const current2 = isControlled ? props.value : innerSingle;
546
+ return current2 === v;
547
+ }
548
+ const current = (isControlled ? props.value : innerMultiple) ?? [];
549
+ return current.includes(v);
550
+ },
551
+ [isSingle, isControlled, innerSingle, innerMultiple, props]
552
+ );
553
+ const refs = react.useRef(/* @__PURE__ */ new Map());
554
+ const [order, setOrder] = react.useState([]);
555
+ const [rovingValue, setRovingValueState] = react.useState(void 0);
556
+ const register = react.useCallback((v, ref) => {
557
+ refs.current.set(v, ref);
558
+ setOrder((prev) => prev.includes(v) ? prev : [...prev, v]);
559
+ setRovingValueState((current) => current ?? v);
560
+ }, []);
561
+ const unregister = react.useCallback((v) => {
562
+ refs.current.delete(v);
563
+ setOrder((prev) => prev.filter((x) => x !== v));
564
+ setRovingValueState((current) => current === v ? void 0 : current);
565
+ }, []);
566
+ const focusValue = react.useCallback((v) => {
567
+ refs.current.get(v)?.current?.focus?.();
568
+ }, []);
569
+ const setRovingValue = react.useCallback((v) => setRovingValueState(v), []);
570
+ const moveBy = react.useCallback(
571
+ (delta, current) => {
572
+ const list = order;
573
+ if (list.length === 0) {
574
+ return;
575
+ }
576
+ const idx = list.indexOf(current);
577
+ const start = idx === -1 ? 0 : idx;
578
+ const next = list[(start + delta + list.length) % list.length];
579
+ if (!next) {
580
+ return;
581
+ }
582
+ setRovingValueState(next);
583
+ focusValue(next);
584
+ },
585
+ [order, focusValue]
586
+ );
587
+ const moveTo = react.useCallback(
588
+ (position) => {
589
+ const list = order;
590
+ if (list.length === 0) {
591
+ return;
592
+ }
593
+ const next = position === "first" ? list[0] : list[list.length - 1];
594
+ if (!next) {
595
+ return;
596
+ }
597
+ setRovingValueState(next);
598
+ focusValue(next);
599
+ },
600
+ [order, focusValue]
601
+ );
602
+ const ctxValue = react.useMemo(
603
+ () => ({
604
+ type,
605
+ setValue,
606
+ isPressed,
607
+ disabled,
608
+ variant,
609
+ size,
610
+ register,
611
+ unregister,
612
+ rovingValue,
613
+ setRovingValue,
614
+ moveBy,
615
+ moveTo,
616
+ order
617
+ }),
618
+ [
619
+ type,
620
+ setValue,
621
+ isPressed,
622
+ disabled,
623
+ variant,
624
+ size,
625
+ register,
626
+ unregister,
627
+ rovingValue,
628
+ setRovingValue,
629
+ moveBy,
630
+ moveTo,
631
+ order
632
+ ]
633
+ );
634
+ const groupRole = isSingle ? "radiogroup" : "group";
635
+ const label = ariaLabel ?? accessibilityLabel;
636
+ const groupProps = {
637
+ role: groupRole,
638
+ accessibilityRole: groupRole,
639
+ ...label ? { "aria-label": label, accessibilityLabel: label } : {},
640
+ ...disabled ? { "aria-disabled": true } : {},
641
+ ...testID !== void 0 ? { testID } : {}
642
+ };
643
+ const colors = useThemeColors();
644
+ const containerStyle = variant === "default" ? { flexDirection: "row", alignItems: "stretch", gap: 0 } : { flexDirection: "row", alignItems: "stretch", gap: px(colors.spacing["1"]) };
645
+ return /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxRuntime.jsx(
646
+ reactNative.View,
647
+ {
648
+ ...groupProps,
649
+ className: cn(
650
+ "inline-flex flex-row items-stretch",
651
+ variant === "default" ? "gap-0" : "gap-1",
652
+ disabled ? "opacity-60" : void 0,
653
+ className
654
+ ),
655
+ style: [containerStyle, disabled ? { opacity: 0.6 } : null],
656
+ children
657
+ }
658
+ ) });
659
+ }, "ToggleGroup");
660
+ var ToggleGroupItem = /* @__PURE__ */ __name(({
661
+ value,
662
+ disabled,
663
+ children,
664
+ "aria-label": ariaLabel,
665
+ accessibilityLabel,
666
+ className,
667
+ testID
668
+ }) => {
669
+ const ctx = useToggleGroupContext();
670
+ const ownRef = react.useRef(null);
671
+ const registryRef = react.useRef({ register: ctx.register, unregister: ctx.unregister });
672
+ registryRef.current = { register: ctx.register, unregister: ctx.unregister };
673
+ react.useEffect(() => {
674
+ const holder = {
675
+ get current() {
676
+ return ownRef.current;
677
+ },
678
+ set current(_v) {
679
+ }
680
+ };
681
+ registryRef.current.register(value, holder);
682
+ return () => registryRef.current.unregister(value);
683
+ }, [value]);
684
+ const isOn = ctx.isPressed(value);
685
+ const isDisabled = disabled || ctx.disabled;
686
+ const isRoving = ctx.rovingValue === value;
687
+ const handleKeyDown = react.useCallback(
688
+ (event) => {
689
+ switch (event.key) {
690
+ case "ArrowRight":
691
+ case "ArrowDown": {
692
+ event.preventDefault();
693
+ ctx.moveBy(1, value);
694
+ return;
695
+ }
696
+ case "ArrowLeft":
697
+ case "ArrowUp": {
698
+ event.preventDefault();
699
+ ctx.moveBy(-1, value);
700
+ return;
701
+ }
702
+ case "Home": {
703
+ event.preventDefault();
704
+ ctx.moveTo("first");
705
+ return;
706
+ }
707
+ case "End": {
708
+ event.preventDefault();
709
+ ctx.moveTo("last");
710
+ return;
711
+ }
712
+ case " ":
713
+ case "Enter": {
714
+ event.preventDefault();
715
+ if (!isDisabled) {
716
+ ctx.setValue(value);
717
+ }
718
+ return;
719
+ }
720
+ }
721
+ },
722
+ [ctx, isDisabled, value]
723
+ );
724
+ const handleFocus = react.useCallback(() => {
725
+ ctx.setRovingValue(value);
726
+ }, [ctx, value]);
727
+ const colors = useThemeColors();
728
+ const idx = ctx.order.indexOf(value);
729
+ const isFirst = idx === 0;
730
+ const isLast = idx === ctx.order.length - 1;
731
+ const sharedRadius = px(colors.radius.md);
732
+ const isClustered = ctx.order.length > 1;
733
+ const borderRadius = isClustered ? {
734
+ topLeft: isFirst ? sharedRadius : 0,
735
+ bottomLeft: isFirst ? sharedRadius : 0,
736
+ topRight: isLast ? sharedRadius : 0,
737
+ bottomRight: isLast ? sharedRadius : 0
738
+ } : sharedRadius;
739
+ return /* @__PURE__ */ jsxRuntime.jsx(
740
+ ToggleVisual,
741
+ {
742
+ isOn,
743
+ disabled: Boolean(isDisabled),
744
+ variant: ctx.variant,
745
+ size: ctx.size,
746
+ onPress: () => ctx.setValue(value),
747
+ onKeyDown: handleKeyDown,
748
+ onFocus: handleFocus,
749
+ ariaLabel: ariaLabel ?? accessibilityLabel,
750
+ className,
751
+ testID,
752
+ tabIndex: isRoving ? 0 : -1,
753
+ borderRadius,
754
+ forceBorder: ctx.variant === "default" && isClustered,
755
+ suppressRightBorder: isClustered && !isLast,
756
+ refCallback: (node) => {
757
+ ownRef.current = node;
758
+ },
759
+ children
760
+ }
761
+ );
762
+ }, "ToggleGroupItem");
763
+ var Toggle = Object.assign(ToggleRoot, {
764
+ Group: ToggleGroup,
765
+ Item: ToggleGroupItem
766
+ });
767
+
768
+ exports.Toggle = Toggle;
769
+ //# sourceMappingURL=index.cjs.map
770
+ //# sourceMappingURL=index.cjs.map