@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,1359 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var reactDom = require('react-dom');
5
+ var reactNative = require('react-native');
6
+ var jsxRuntime = require('nativewind/jsx-runtime');
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+
11
+ // ../tokens/build/theme.ts
12
+ var theme = {
13
+ color: {
14
+ danger: "#ef4444",
15
+ info: "#3b82f6",
16
+ neutral: {
17
+ "100": "#f4f4f5",
18
+ "200": "#e4e4e7",
19
+ "300": "#d4d4d8",
20
+ "400": "#a1a1aa",
21
+ "50": "#fafafa",
22
+ "500": "#71717a",
23
+ "600": "#52525b",
24
+ "700": "#3f3f46",
25
+ "800": "#27272a",
26
+ "900": "#18181b"
27
+ },
28
+ primary: {
29
+ "100": "#ccfbf1",
30
+ "200": "#99f6e4",
31
+ "300": "#5eead4",
32
+ "400": "#2dd4bf",
33
+ "50": "#f0fdfa",
34
+ "500": "#14b8a6",
35
+ "600": "#0d9488",
36
+ "700": "#0f766e",
37
+ "800": "#115e59",
38
+ "900": "#134e4a"
39
+ },
40
+ success: "#22c55e",
41
+ warning: "#f59e0b"
42
+ },
43
+ fontFamily: {
44
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
45
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
46
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
47
+ },
48
+ fontSize: {
49
+ "2xl": "24px",
50
+ "3xl": "30px",
51
+ "4xl": "36px",
52
+ lg: "18px",
53
+ md: "16px",
54
+ sm: "14px",
55
+ xl: "20px",
56
+ xs: "12px"
57
+ },
58
+ fontWeight: {
59
+ bold: "700",
60
+ medium: "500",
61
+ regular: "400",
62
+ semibold: "600"
63
+ },
64
+ lineHeight: {
65
+ normal: "1.4",
66
+ relaxed: "1.6",
67
+ tight: "1.2"
68
+ },
69
+ radius: {
70
+ "2xl": "16px",
71
+ full: "9999px",
72
+ lg: "8px",
73
+ md: "6px",
74
+ none: "0px",
75
+ sm: "4px",
76
+ xl: "12px"
77
+ },
78
+ semantic: {
79
+ background: {
80
+ default: "#fafafa",
81
+ elevated: "#ffffff",
82
+ subtle: "#f4f4f5"
83
+ },
84
+ border: {
85
+ default: "#e4e4e7",
86
+ strong: "#d4d4d8"
87
+ },
88
+ interactive: {
89
+ destructive: "#ef4444",
90
+ primary: "#0d9488",
91
+ primaryHover: "#0f766e",
92
+ primaryPressed: "#115e59"
93
+ },
94
+ text: {
95
+ default: "#18181b",
96
+ inverted: "#fafafa",
97
+ muted: "#52525b"
98
+ }
99
+ },
100
+ shadow: {
101
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
102
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
103
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
104
+ },
105
+ spacing: {
106
+ "0": "0px",
107
+ "1": "4px",
108
+ "10": "40px",
109
+ "12": "48px",
110
+ "16": "64px",
111
+ "2": "8px",
112
+ "20": "80px",
113
+ "24": "96px",
114
+ "3": "12px",
115
+ "4": "16px",
116
+ "5": "20px",
117
+ "6": "24px",
118
+ "8": "32px"
119
+ }
120
+ };
121
+ var themeDark = {
122
+ color: {
123
+ danger: "#ef4444",
124
+ info: "#3b82f6",
125
+ neutral: {
126
+ "100": "#f4f4f5",
127
+ "200": "#e4e4e7",
128
+ "300": "#d4d4d8",
129
+ "400": "#a1a1aa",
130
+ "50": "#fafafa",
131
+ "500": "#71717a",
132
+ "600": "#52525b",
133
+ "700": "#3f3f46",
134
+ "800": "#27272a",
135
+ "900": "#18181b"
136
+ },
137
+ primary: {
138
+ "100": "#ccfbf1",
139
+ "200": "#99f6e4",
140
+ "300": "#5eead4",
141
+ "400": "#2dd4bf",
142
+ "50": "#f0fdfa",
143
+ "500": "#14b8a6",
144
+ "600": "#0d9488",
145
+ "700": "#0f766e",
146
+ "800": "#115e59",
147
+ "900": "#134e4a"
148
+ },
149
+ success: "#22c55e",
150
+ warning: "#f59e0b"
151
+ },
152
+ fontFamily: {
153
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
154
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
155
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
156
+ },
157
+ fontSize: {
158
+ "2xl": "24px",
159
+ "3xl": "30px",
160
+ "4xl": "36px",
161
+ lg: "18px",
162
+ md: "16px",
163
+ sm: "14px",
164
+ xl: "20px",
165
+ xs: "12px"
166
+ },
167
+ fontWeight: {
168
+ bold: "700",
169
+ medium: "500",
170
+ regular: "400",
171
+ semibold: "600"
172
+ },
173
+ lineHeight: {
174
+ normal: "1.4",
175
+ relaxed: "1.6",
176
+ tight: "1.2"
177
+ },
178
+ radius: {
179
+ "2xl": "16px",
180
+ full: "9999px",
181
+ lg: "8px",
182
+ md: "6px",
183
+ none: "0px",
184
+ sm: "4px",
185
+ xl: "12px"
186
+ },
187
+ semantic: {
188
+ background: {
189
+ default: "#18181b",
190
+ elevated: "#3f3f46",
191
+ subtle: "#27272a"
192
+ },
193
+ border: {
194
+ default: "#3f3f46",
195
+ strong: "#52525b"
196
+ },
197
+ interactive: {
198
+ destructive: "#ef4444",
199
+ primary: "#2dd4bf",
200
+ primaryHover: "#5eead4",
201
+ primaryPressed: "#99f6e4"
202
+ },
203
+ text: {
204
+ default: "#fafafa",
205
+ inverted: "#18181b",
206
+ muted: "#a1a1aa"
207
+ }
208
+ },
209
+ shadow: {
210
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
211
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
212
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
213
+ },
214
+ spacing: {
215
+ "0": "0px",
216
+ "1": "4px",
217
+ "10": "40px",
218
+ "12": "48px",
219
+ "16": "64px",
220
+ "2": "8px",
221
+ "20": "80px",
222
+ "24": "96px",
223
+ "3": "12px",
224
+ "4": "16px",
225
+ "5": "20px",
226
+ "6": "24px",
227
+ "8": "32px"
228
+ }
229
+ };
230
+ var defaultTheme = {
231
+ light: theme,
232
+ dark: themeDark
233
+ };
234
+ var ThemeContext = react.createContext(defaultTheme);
235
+ ThemeContext.displayName = "ThemeContext";
236
+ var ColorSchemeOverrideContext = react.createContext(null);
237
+ ColorSchemeOverrideContext.displayName = "ColorSchemeOverrideContext";
238
+ var isWeb = reactNative.Platform.OS === "web";
239
+ function readWebScheme() {
240
+ if (typeof document === "undefined") {
241
+ return "light";
242
+ }
243
+ const root = document.documentElement;
244
+ if (root.classList.contains("dark")) {
245
+ return "dark";
246
+ }
247
+ if (root.getAttribute("data-theme") === "dark") {
248
+ return "dark";
249
+ }
250
+ return "light";
251
+ }
252
+ __name(readWebScheme, "readWebScheme");
253
+ function useColorScheme() {
254
+ const override = react.useContext(ColorSchemeOverrideContext);
255
+ const [scheme, setScheme] = react.useState(() => {
256
+ if (isWeb) {
257
+ return readWebScheme();
258
+ }
259
+ return reactNative.Appearance.getColorScheme() ?? "light";
260
+ });
261
+ react.useEffect(() => {
262
+ if (isWeb) {
263
+ const root = document.documentElement;
264
+ const update = /* @__PURE__ */ __name(() => setScheme(readWebScheme()), "update");
265
+ const observer = new MutationObserver(update);
266
+ observer.observe(root, { attributes: true, attributeFilter: ["class", "data-theme"] });
267
+ update();
268
+ return () => observer.disconnect();
269
+ }
270
+ const sub = reactNative.Appearance.addChangeListener(({ colorScheme }) => {
271
+ setScheme(colorScheme ?? "light");
272
+ });
273
+ return () => sub.remove();
274
+ }, []);
275
+ return override ?? scheme;
276
+ }
277
+ __name(useColorScheme, "useColorScheme");
278
+
279
+ // src/theme/use-theme-colors.ts
280
+ function useThemeColors() {
281
+ const scheme = useColorScheme();
282
+ const themePair = react.useContext(ThemeContext);
283
+ return scheme === "dark" ? themePair.dark : themePair.light;
284
+ }
285
+ __name(useThemeColors, "useThemeColors");
286
+ var isWeb2 = reactNative.Platform.OS === "web";
287
+ var make = /* @__PURE__ */ __name(({ path, glyph }) => /* @__PURE__ */ __name(function PlaceholderIcon({ size = 20, color = "currentColor" }) {
288
+ const colors = useThemeColors();
289
+ if (isWeb2) {
290
+ return /* @__PURE__ */ jsxRuntime.jsx(
291
+ "svg",
292
+ {
293
+ width: size,
294
+ height: size,
295
+ viewBox: "0 0 24 24",
296
+ fill: "none",
297
+ stroke: color,
298
+ strokeWidth: "2",
299
+ strokeLinecap: "round",
300
+ strokeLinejoin: "round",
301
+ "aria-hidden": "true",
302
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: path })
303
+ }
304
+ );
305
+ }
306
+ const resolvedColor = color === "currentColor" ? colors.semantic.text.default : color;
307
+ return /* @__PURE__ */ jsxRuntime.jsx(
308
+ reactNative.Text,
309
+ {
310
+ accessibilityElementsHidden: true,
311
+ importantForAccessibility: "no-hide-descendants",
312
+ style: { fontSize: size, lineHeight: size, color: resolvedColor },
313
+ children: glyph
314
+ }
315
+ );
316
+ }, "PlaceholderIcon"), "make");
317
+ var defaultSemanticIcons = {
318
+ checkmark: make({ path: "M20 6 9 17l-5-5", glyph: "\u2713" }),
319
+ close: make({ path: "M18 6 6 18 M6 6l12 12", glyph: "\u2715" }),
320
+ eye: make({
321
+ path: "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",
322
+ glyph: "\u{1F441}"
323
+ }),
324
+ eyeOff: make({
325
+ path: "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",
326
+ glyph: "\u{1F648}"
327
+ }),
328
+ chevronDown: make({ path: "m6 9 6 6 6-6", glyph: "\u2304" }),
329
+ chevronUp: make({ path: "m18 15-6-6-6 6", glyph: "\u2303" }),
330
+ alertTriangle: make({
331
+ path: "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",
332
+ glyph: "\u26A0"
333
+ }),
334
+ info: make({
335
+ path: "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",
336
+ glyph: "\u24D8"
337
+ }),
338
+ check: make({ path: "M20 6 9 17l-5-5", glyph: "\u2713" }),
339
+ x: make({ path: "M18 6 6 18 M6 6l12 12", glyph: "\u2715" })
340
+ };
341
+
342
+ // src/theme/px.ts
343
+ function px(value) {
344
+ if (typeof value === "number") {
345
+ return value;
346
+ }
347
+ const n = Number.parseFloat(value);
348
+ return Number.isFinite(n) ? n : 0;
349
+ }
350
+ __name(px, "px");
351
+
352
+ // src/utils/cn.ts
353
+ function cn(...inputs) {
354
+ const out = [];
355
+ for (const input of inputs) {
356
+ append(out, input);
357
+ }
358
+ return out.join(" ");
359
+ }
360
+ __name(cn, "cn");
361
+ function append(out, input) {
362
+ if (!input) {
363
+ return;
364
+ }
365
+ if (typeof input === "string") {
366
+ if (input.length > 0) {
367
+ out.push(input);
368
+ }
369
+ return;
370
+ }
371
+ if (typeof input === "number") {
372
+ return;
373
+ }
374
+ if (Array.isArray(input)) {
375
+ for (const inner of input) {
376
+ append(out, inner);
377
+ }
378
+ return;
379
+ }
380
+ if (typeof input === "object") {
381
+ for (const key of Object.keys(input)) {
382
+ if (input[key]) {
383
+ out.push(key);
384
+ }
385
+ }
386
+ }
387
+ }
388
+ __name(append, "append");
389
+ var DEFAULT_PAGE_SIZE = 50;
390
+ var DEFAULT_ITEM_HEIGHT = 36;
391
+ var DEFAULT_MAX_MENU = 320;
392
+ var SEARCH_DEBOUNCE_MS = 150;
393
+ var VIRTUAL_OVERSCAN = 4;
394
+ var TYPE_AHEAD_RESET_MS = 500;
395
+ var defaultFilter = /* @__PURE__ */ __name((option, search) => {
396
+ if (!search) {
397
+ return true;
398
+ }
399
+ return option.label.toLowerCase().includes(search.toLowerCase());
400
+ }, "defaultFilter");
401
+ var Select = /* @__PURE__ */ __name((props) => {
402
+ const {
403
+ options: staticOptions,
404
+ loadOptions,
405
+ pageSize = DEFAULT_PAGE_SIZE,
406
+ searchable: searchableProp,
407
+ searchPlaceholder = "Search\u2026",
408
+ filterOption,
409
+ renderOption,
410
+ placeholder = "Select\u2026",
411
+ locale,
412
+ sortByLocale = true,
413
+ noOptionsMessage = "No options",
414
+ loadingMessage = "Loading\u2026",
415
+ disabled = false,
416
+ dir = "ltr",
417
+ virtualized: virtualizedProp,
418
+ itemHeight = DEFAULT_ITEM_HEIGHT,
419
+ maxMenuHeight = DEFAULT_MAX_MENU,
420
+ className,
421
+ testID
422
+ } = props;
423
+ const ariaLabel = props["aria-label"];
424
+ const multiple = props.multiple === true;
425
+ const maxSelected = multiple ? props.maxSelected : void 0;
426
+ const maxChips = multiple ? props.maxChips ?? 3 : void 0;
427
+ const baseId = react.useId();
428
+ const colors = useThemeColors();
429
+ const [open, setOpen] = react.useState(false);
430
+ const controlledValues = multiple ? props.value : props.value !== void 0 ? [props.value] : void 0;
431
+ const defaultValues = multiple ? props.defaultValue ?? [] : props.defaultValue !== void 0 ? [props.defaultValue] : [];
432
+ const [innerValues, setInnerValues] = react.useState(defaultValues);
433
+ const isControlled = controlledValues !== void 0;
434
+ const currentValues = isControlled ? controlledValues : innerValues;
435
+ const current = currentValues[0];
436
+ const [searchInput, setSearchInput] = react.useState("");
437
+ const [debouncedSearch, setDebouncedSearch] = react.useState("");
438
+ const [activeIndex, setActiveIndex] = react.useState(0);
439
+ react.useEffect(() => {
440
+ const t = setTimeout(() => setDebouncedSearch(searchInput), SEARCH_DEBOUNCE_MS);
441
+ return () => clearTimeout(t);
442
+ }, [searchInput]);
443
+ const [asyncItems, setAsyncItems] = react.useState([]);
444
+ const [asyncLoading, setAsyncLoading] = react.useState(false);
445
+ const [asyncTotal, setAsyncTotal] = react.useState(void 0);
446
+ const asyncRequestId = react.useRef(0);
447
+ const isAsync = loadOptions !== void 0;
448
+ react.useEffect(() => {
449
+ if (!isAsync || !loadOptions || !open) {
450
+ return;
451
+ }
452
+ const requestId = ++asyncRequestId.current;
453
+ setAsyncLoading(true);
454
+ setAsyncItems([]);
455
+ setAsyncTotal(void 0);
456
+ loadOptions({ search: debouncedSearch, offset: 0, limit: pageSize }).then((result) => {
457
+ if (requestId !== asyncRequestId.current) {
458
+ return;
459
+ }
460
+ setAsyncItems(result.items.slice());
461
+ setAsyncTotal(result.total);
462
+ }).catch(() => {
463
+ }).finally(() => {
464
+ if (requestId === asyncRequestId.current) {
465
+ setAsyncLoading(false);
466
+ }
467
+ });
468
+ }, [debouncedSearch, isAsync, loadOptions, pageSize, open]);
469
+ const loadMore = react.useCallback(() => {
470
+ if (!isAsync || !loadOptions || asyncLoading) {
471
+ return;
472
+ }
473
+ const haveAll = asyncTotal !== void 0 && asyncItems.length >= asyncTotal;
474
+ if (haveAll) {
475
+ return;
476
+ }
477
+ const requestId = ++asyncRequestId.current;
478
+ setAsyncLoading(true);
479
+ loadOptions({ search: debouncedSearch, offset: asyncItems.length, limit: pageSize }).then((result) => {
480
+ if (requestId !== asyncRequestId.current) {
481
+ return;
482
+ }
483
+ setAsyncItems((prev) => prev.concat(result.items));
484
+ if (result.total !== void 0) {
485
+ setAsyncTotal(result.total);
486
+ }
487
+ }).catch(() => void 0).finally(() => {
488
+ if (requestId === asyncRequestId.current) {
489
+ setAsyncLoading(false);
490
+ }
491
+ });
492
+ }, [asyncItems.length, asyncLoading, asyncTotal, debouncedSearch, isAsync, loadOptions, pageSize]);
493
+ const visibleOptions = react.useMemo(() => {
494
+ const source = isAsync ? asyncItems : staticOptions ?? [];
495
+ const filtered = isAsync ? source.slice() : source.filter((opt) => (filterOption ?? defaultFilter)(opt, debouncedSearch));
496
+ if (locale && sortByLocale) {
497
+ const collator = new Intl.Collator(locale, { sensitivity: "base", numeric: true });
498
+ return filtered.slice().sort((a, b) => {
499
+ const ga = a.group ?? "";
500
+ const gb = b.group ?? "";
501
+ const groupDelta = collator.compare(ga, gb);
502
+ if (groupDelta !== 0) {
503
+ return groupDelta;
504
+ }
505
+ return collator.compare(a.label, b.label);
506
+ });
507
+ }
508
+ return filtered;
509
+ }, [isAsync, asyncItems, staticOptions, filterOption, debouncedSearch, locale, sortByLocale]);
510
+ const selectedOption = react.useMemo(() => {
511
+ const all = isAsync ? asyncItems : staticOptions ?? [];
512
+ return all.find((o) => o.value === current);
513
+ }, [asyncItems, isAsync, staticOptions, current]);
514
+ const selectedOptions = react.useMemo(() => {
515
+ if (!multiple) {
516
+ return [];
517
+ }
518
+ const all = isAsync ? asyncItems : staticOptions ?? [];
519
+ const map = new Map(all.map((o) => [o.value, o]));
520
+ return currentValues.map((v) => map.get(v)).filter((o) => o !== void 0);
521
+ }, [multiple, currentValues, asyncItems, isAsync, staticOptions]);
522
+ const searchable = searchableProp ?? (isAsync || staticOptions !== void 0 && staticOptions.length >= 10);
523
+ const virtualized = virtualizedProp ?? visibleOptions.length > 100;
524
+ react.useEffect(() => {
525
+ setActiveIndex((idx) => Math.min(Math.max(0, idx), Math.max(0, visibleOptions.length - 1)));
526
+ }, [visibleOptions.length]);
527
+ const onSelect = react.useCallback(
528
+ (option) => {
529
+ if (option.disabled) {
530
+ return;
531
+ }
532
+ if (multiple) {
533
+ const has = currentValues.includes(option.value);
534
+ let nextValues;
535
+ if (has) {
536
+ nextValues = currentValues.filter((v) => v !== option.value);
537
+ } else {
538
+ if (maxSelected !== void 0 && currentValues.length >= maxSelected) {
539
+ return;
540
+ }
541
+ nextValues = [...currentValues, option.value];
542
+ }
543
+ if (!isControlled) {
544
+ setInnerValues(nextValues);
545
+ }
546
+ const allOpts = [
547
+ ...staticOptions ?? [],
548
+ ...asyncItems
549
+ ];
550
+ const optMap = new Map(allOpts.map((o) => [o.value, o]));
551
+ const selectedOpts = nextValues.map((v) => optMap.get(v)).filter((o) => o !== void 0);
552
+ props.onChange?.(nextValues, selectedOpts);
553
+ return;
554
+ }
555
+ if (!isControlled) {
556
+ setInnerValues([option.value]);
557
+ }
558
+ props.onChange?.(option.value, option);
559
+ setOpen(false);
560
+ setSearchInput("");
561
+ },
562
+ // biome-ignore lint/correctness/useExhaustiveDependencies: `props` is the discriminated union — destructuring it would defeat the narrowing; the asyncItems / staticOptions captures intentionally re-trigger the callback when the option pool changes
563
+ [multiple, isControlled, currentValues, maxSelected, staticOptions, asyncItems, props]
564
+ );
565
+ const clearAll = react.useCallback(() => {
566
+ if (!isControlled) {
567
+ setInnerValues([]);
568
+ }
569
+ props.onChange?.([], []);
570
+ }, [isControlled, props]);
571
+ const moveActive = react.useCallback(
572
+ (delta) => {
573
+ setActiveIndex((idx) => {
574
+ if (visibleOptions.length === 0) {
575
+ return 0;
576
+ }
577
+ let next = (idx + delta + visibleOptions.length) % visibleOptions.length;
578
+ for (let attempts = 0; attempts < visibleOptions.length; attempts += 1) {
579
+ if (!visibleOptions[next]?.disabled) {
580
+ return next;
581
+ }
582
+ next = (next + delta + visibleOptions.length) % visibleOptions.length;
583
+ }
584
+ return idx;
585
+ });
586
+ },
587
+ [visibleOptions]
588
+ );
589
+ const typeAheadRef = react.useRef({
590
+ buffer: "",
591
+ timer: null
592
+ });
593
+ react.useEffect(() => {
594
+ return () => {
595
+ if (typeAheadRef.current.timer) {
596
+ clearTimeout(typeAheadRef.current.timer);
597
+ typeAheadRef.current.timer = null;
598
+ }
599
+ };
600
+ }, []);
601
+ const handleTypeAhead = react.useCallback(
602
+ (char) => {
603
+ if (visibleOptions.length === 0) {
604
+ return;
605
+ }
606
+ if (typeAheadRef.current.timer) {
607
+ clearTimeout(typeAheadRef.current.timer);
608
+ }
609
+ const nextBuffer = typeAheadRef.current.buffer + char.toLowerCase();
610
+ typeAheadRef.current.buffer = nextBuffer;
611
+ typeAheadRef.current.timer = setTimeout(() => {
612
+ typeAheadRef.current.buffer = "";
613
+ typeAheadRef.current.timer = null;
614
+ }, TYPE_AHEAD_RESET_MS);
615
+ const allSame = nextBuffer.length > 1 && nextBuffer.split("").every((c) => c === nextBuffer[0]);
616
+ const cycleMode = nextBuffer.length === 1 || allSame;
617
+ const needle = cycleMode ? nextBuffer.charAt(0) : nextBuffer;
618
+ const len = visibleOptions.length;
619
+ const startFrom = cycleMode ? (activeIndex + 1) % len : 0;
620
+ for (let i = 0; i < len; i += 1) {
621
+ const idx = (startFrom + i) % len;
622
+ const opt = visibleOptions[idx];
623
+ if (!opt || opt.disabled) {
624
+ continue;
625
+ }
626
+ if (opt.label.toLowerCase().startsWith(needle)) {
627
+ setActiveIndex(idx);
628
+ return;
629
+ }
630
+ }
631
+ },
632
+ [visibleOptions, activeIndex]
633
+ );
634
+ const handleListKeyDown = react.useCallback(
635
+ (event) => {
636
+ switch (event.key) {
637
+ case "ArrowDown":
638
+ event.preventDefault();
639
+ moveActive(1);
640
+ return true;
641
+ case "ArrowUp":
642
+ event.preventDefault();
643
+ moveActive(-1);
644
+ return true;
645
+ case "Home": {
646
+ event.preventDefault();
647
+ const idx = visibleOptions.findIndex((o) => !o.disabled);
648
+ if (idx >= 0) {
649
+ setActiveIndex(idx);
650
+ }
651
+ return true;
652
+ }
653
+ case "End": {
654
+ event.preventDefault();
655
+ for (let i = visibleOptions.length - 1; i >= 0; i -= 1) {
656
+ if (!visibleOptions[i]?.disabled) {
657
+ setActiveIndex(i);
658
+ break;
659
+ }
660
+ }
661
+ return true;
662
+ }
663
+ case "Enter": {
664
+ const opt = visibleOptions[activeIndex];
665
+ if (opt) {
666
+ event.preventDefault();
667
+ onSelect(opt);
668
+ }
669
+ return true;
670
+ }
671
+ case "Escape":
672
+ event.preventDefault();
673
+ setOpen(false);
674
+ if (reactNative.Platform.OS === "web") {
675
+ const trigger = triggerRef.current;
676
+ trigger?.focus?.();
677
+ }
678
+ return true;
679
+ case "Tab":
680
+ setOpen(false);
681
+ return true;
682
+ }
683
+ return false;
684
+ },
685
+ [moveActive, activeIndex, visibleOptions, onSelect]
686
+ );
687
+ const handleSearchKeyDown = react.useCallback(
688
+ (event) => {
689
+ handleListKeyDown(event);
690
+ },
691
+ [handleListKeyDown]
692
+ );
693
+ const handlePopupKeyDown = react.useCallback(
694
+ (event) => {
695
+ if (handleListKeyDown(event)) {
696
+ return;
697
+ }
698
+ if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey && event.key !== " ") {
699
+ event.preventDefault();
700
+ handleTypeAhead(event.key);
701
+ }
702
+ },
703
+ [handleListKeyDown, handleTypeAhead]
704
+ );
705
+ const handleTriggerKeyDown = react.useCallback(
706
+ (event) => {
707
+ switch (event.key) {
708
+ case " ":
709
+ case "Enter":
710
+ case "ArrowDown":
711
+ case "ArrowUp":
712
+ event.preventDefault();
713
+ setOpen(true);
714
+ return;
715
+ }
716
+ if (!disabled && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
717
+ event.preventDefault();
718
+ setOpen(true);
719
+ handleTypeAhead(event.key);
720
+ }
721
+ },
722
+ [disabled, handleTypeAhead]
723
+ );
724
+ const containerRef = react.useRef(null);
725
+ const triggerRef = react.useRef(null);
726
+ const popupRef = react.useRef(null);
727
+ react.useEffect(() => {
728
+ if (reactNative.Platform.OS !== "web" || typeof document === "undefined" || typeof document.addEventListener !== "function") {
729
+ return;
730
+ }
731
+ if (!open) {
732
+ return;
733
+ }
734
+ const onDocClick = /* @__PURE__ */ __name((event) => {
735
+ const node = containerRef.current;
736
+ const popup = popupRef.current;
737
+ const target = event.target;
738
+ if (node?.contains(target)) {
739
+ return;
740
+ }
741
+ if (popup?.contains(target)) {
742
+ return;
743
+ }
744
+ setOpen(false);
745
+ }, "onDocClick");
746
+ document.addEventListener("mousedown", onDocClick);
747
+ return () => document.removeEventListener("mousedown", onDocClick);
748
+ }, [open]);
749
+ const [triggerRect, setTriggerRect] = react.useState(
750
+ null
751
+ );
752
+ const measureTrigger = react.useCallback(() => {
753
+ const node = triggerRef.current;
754
+ if (!node) {
755
+ return;
756
+ }
757
+ if (reactNative.Platform.OS === "web" && typeof node.getBoundingClientRect === "function") {
758
+ const rect = node.getBoundingClientRect();
759
+ setTriggerRect({ top: rect.top, left: rect.left, width: rect.width, height: rect.height });
760
+ return;
761
+ }
762
+ if (typeof node.measure === "function") {
763
+ node.measure((_x, _y, w, h, pageX, pageY) => {
764
+ setTriggerRect({ top: pageY, left: pageX, width: w, height: h });
765
+ });
766
+ }
767
+ }, []);
768
+ react.useEffect(() => {
769
+ if (!open) {
770
+ return;
771
+ }
772
+ if (reactNative.Platform.OS !== "web" || typeof window === "undefined" || typeof window.addEventListener !== "function") {
773
+ return;
774
+ }
775
+ measureTrigger();
776
+ window.addEventListener("scroll", measureTrigger, true);
777
+ window.addEventListener("resize", measureTrigger);
778
+ return () => {
779
+ window.removeEventListener("scroll", measureTrigger, true);
780
+ window.removeEventListener("resize", measureTrigger);
781
+ };
782
+ }, [open, measureTrigger]);
783
+ react.useEffect(() => {
784
+ if (!open || searchable || reactNative.Platform.OS !== "web") {
785
+ return;
786
+ }
787
+ const id = requestAnimationFrame(() => {
788
+ const node = popupRef.current;
789
+ node?.focus?.();
790
+ });
791
+ return () => cancelAnimationFrame(id);
792
+ }, [open, searchable]);
793
+ const onListScroll = react.useCallback(
794
+ (event) => {
795
+ if (!isAsync) {
796
+ return;
797
+ }
798
+ const { contentOffset, contentSize, layoutMeasurement } = event.nativeEvent;
799
+ const remaining = contentSize.height - contentOffset.y - layoutMeasurement.height;
800
+ if (remaining < itemHeight * 4) {
801
+ loadMore();
802
+ }
803
+ },
804
+ [isAsync, itemHeight, loadMore]
805
+ );
806
+ const triggerStyle = {
807
+ flexDirection: "row",
808
+ alignItems: "center",
809
+ justifyContent: "space-between",
810
+ gap: px(colors.spacing["2"]),
811
+ paddingHorizontal: px(colors.spacing["3"]),
812
+ paddingVertical: px(colors.spacing["2"]),
813
+ minHeight: 36,
814
+ // component-density literal — not from theme
815
+ borderWidth: 1,
816
+ borderColor: colors.semantic.border.default,
817
+ borderRadius: px(colors.radius.md),
818
+ backgroundColor: colors.semantic.background.elevated,
819
+ opacity: disabled ? 0.6 : 1
820
+ };
821
+ const winDims = reactNative.useWindowDimensions();
822
+ const popupStyle = triggerRect ? {
823
+ position: reactNative.Platform.OS === "web" ? "fixed" : "absolute",
824
+ top: triggerRect.top + triggerRect.height + px(colors.spacing["1"]),
825
+ left: dir === "rtl" ? void 0 : triggerRect.left,
826
+ right: dir === "rtl" ? reactNative.Platform.OS === "web" && typeof window !== "undefined" ? window.innerWidth - (triggerRect.left + triggerRect.width) : winDims.width - (triggerRect.left + triggerRect.width) : void 0,
827
+ minWidth: Math.max(200, triggerRect.width),
828
+ backgroundColor: colors.semantic.background.elevated,
829
+ borderRadius: px(colors.radius.lg),
830
+ borderWidth: 1,
831
+ borderColor: colors.semantic.border.default,
832
+ // 2147483646 (max int32 - 1) so we sit above any third-party
833
+ // chrome (toasts, modals, dev banners) without picking a fight
834
+ // for the very top slot. Combined with portaling to body below,
835
+ // this also dodges any ancestor stacking context that would
836
+ // otherwise trap our z-index inside a sibling preview frame.
837
+ zIndex: 2147483646,
838
+ ...{ boxShadow: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)" }
839
+ } : {
840
+ // Trigger not yet measured — render off-screen until the
841
+ // first measurement lands. Avoids a one-frame flash at (0,0).
842
+ position: reactNative.Platform.OS === "web" ? "fixed" : "absolute",
843
+ top: -9999,
844
+ left: -9999
845
+ };
846
+ const containerProps = {
847
+ ref: /* @__PURE__ */ __name((node) => {
848
+ containerRef.current = node;
849
+ }, "ref"),
850
+ ...testID !== void 0 ? { testID } : {},
851
+ dir
852
+ };
853
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...containerProps, className: cn("relative", className), style: { position: "relative" }, children: [
854
+ /* @__PURE__ */ jsxRuntime.jsxs(
855
+ reactNative.Pressable,
856
+ {
857
+ ref: (node) => {
858
+ triggerRef.current = node;
859
+ },
860
+ ...{
861
+ onKeyDown: handleTriggerKeyDown,
862
+ role: "combobox",
863
+ accessibilityRole: "combobox",
864
+ "aria-expanded": open,
865
+ "aria-controls": `${baseId}-listbox`,
866
+ "aria-haspopup": "listbox",
867
+ tabIndex: disabled ? -1 : 0,
868
+ ...ariaLabel !== void 0 ? { "aria-label": ariaLabel, accessibilityLabel: ariaLabel } : {},
869
+ ...disabled ? { "aria-disabled": true, disabled: true } : {}
870
+ },
871
+ onPress: () => {
872
+ if (disabled) {
873
+ return;
874
+ }
875
+ measureTrigger();
876
+ setOpen((v) => !v);
877
+ },
878
+ style: triggerStyle,
879
+ children: [
880
+ multiple ? /* @__PURE__ */ jsxRuntime.jsx(MultiTriggerLabel, { options: selectedOptions, placeholder, maxChips: maxChips ?? 3 }) : /* @__PURE__ */ jsxRuntime.jsx(
881
+ reactNative.Text,
882
+ {
883
+ style: {
884
+ color: selectedOption ? colors.semantic.text.default : colors.semantic.text.muted,
885
+ fontFamily: colors.fontFamily.body,
886
+ fontSize: px(colors.fontSize.sm),
887
+ flex: 1
888
+ },
889
+ numberOfLines: 1,
890
+ children: selectedOption?.label ?? placeholder
891
+ }
892
+ ),
893
+ /* @__PURE__ */ jsxRuntime.jsx(defaultSemanticIcons.chevronDown, { size: 16, color: colors.semantic.text.muted })
894
+ ]
895
+ }
896
+ ),
897
+ open ? renderPopup() : null
898
+ ] });
899
+ function renderPopup() {
900
+ const popup = /* @__PURE__ */ jsxRuntime.jsxs(
901
+ reactNative.View,
902
+ {
903
+ ref: (node) => {
904
+ popupRef.current = node;
905
+ },
906
+ ...{
907
+ role: "listbox",
908
+ id: `${baseId}-listbox`,
909
+ ...multiple ? { "aria-multiselectable": true } : {},
910
+ // Without a search field there's no input to capture
911
+ // keystrokes — make the popup itself focusable and own
912
+ // arrow / Enter / Escape / type-ahead. With a search
913
+ // field these belong to the input below.
914
+ ...searchable ? {} : { tabIndex: -1, onKeyDown: handlePopupKeyDown }
915
+ },
916
+ style: popupStyle,
917
+ children: [
918
+ searchable ? /* @__PURE__ */ jsxRuntime.jsx(
919
+ SearchInput,
920
+ {
921
+ value: searchInput,
922
+ onChange: setSearchInput,
923
+ onKeyDown: handleSearchKeyDown,
924
+ placeholder: searchPlaceholder,
925
+ dir
926
+ }
927
+ ) : null,
928
+ multiple && currentValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(MultiSelectionHeader, { count: currentValues.length, onClearAll: clearAll }) : null,
929
+ /* @__PURE__ */ jsxRuntime.jsx(
930
+ SelectList,
931
+ {
932
+ options: visibleOptions,
933
+ activeIndex,
934
+ currentValue: current,
935
+ selectedValues: currentValues,
936
+ multiple,
937
+ onSelect,
938
+ onActiveChange: setActiveIndex,
939
+ ...renderOption !== void 0 ? { renderOption } : {},
940
+ itemHeight,
941
+ maxHeight: maxMenuHeight,
942
+ virtualized,
943
+ loading: isAsync && asyncLoading,
944
+ loadingMessage,
945
+ noOptionsMessage,
946
+ listboxId: `${baseId}-listbox`,
947
+ onScroll: onListScroll
948
+ }
949
+ )
950
+ ]
951
+ }
952
+ );
953
+ if (reactNative.Platform.OS === "web" && typeof document !== "undefined") {
954
+ return reactDom.createPortal(popup, document.body);
955
+ }
956
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Modal, { transparent: true, visible: true, animationType: "fade", onRequestClose: () => setOpen(false), statusBarTranslucent: true, children: [
957
+ /* @__PURE__ */ jsxRuntime.jsx(
958
+ reactNative.Pressable,
959
+ {
960
+ onPress: () => setOpen(false),
961
+ style: {
962
+ position: "absolute",
963
+ top: 0,
964
+ left: 0,
965
+ right: 0,
966
+ bottom: 0
967
+ }
968
+ }
969
+ ),
970
+ popup
971
+ ] });
972
+ }
973
+ }, "Select");
974
+ var SearchInput = /* @__PURE__ */ __name(({ value, onChange, onKeyDown, placeholder, dir }) => {
975
+ const colors = useThemeColors();
976
+ const inputRef = react.useRef(null);
977
+ react.useEffect(() => {
978
+ inputRef.current?.focus?.();
979
+ }, []);
980
+ return /* @__PURE__ */ jsxRuntime.jsx(
981
+ reactNative.View,
982
+ {
983
+ style: {
984
+ paddingHorizontal: px(colors.spacing["2"]),
985
+ paddingVertical: px(colors.spacing["2"]),
986
+ borderBottomWidth: 1,
987
+ borderBottomColor: colors.semantic.border.default
988
+ },
989
+ children: /* @__PURE__ */ jsxRuntime.jsx(
990
+ "input",
991
+ {
992
+ ref: inputRef,
993
+ type: "text",
994
+ value,
995
+ onChange: (event) => onChange(event.target.value),
996
+ onKeyDown,
997
+ placeholder,
998
+ dir,
999
+ "aria-label": "Search options",
1000
+ style: {
1001
+ width: "100%",
1002
+ // Inline `padding: '6px 8px'` shorthand intentionally kept as a
1003
+ // string for the native HTML <input> — it's not an RN style prop.
1004
+ padding: `${px(colors.spacing["2"]) - 2}px ${px(colors.spacing["2"])}px`,
1005
+ fontFamily: colors.fontFamily.body,
1006
+ fontSize: px(colors.fontSize.sm),
1007
+ color: colors.semantic.text.default,
1008
+ backgroundColor: colors.semantic.background.elevated,
1009
+ border: `1px solid ${colors.semantic.border.default}`,
1010
+ borderRadius: px(colors.radius.sm),
1011
+ outline: "none"
1012
+ }
1013
+ }
1014
+ )
1015
+ }
1016
+ );
1017
+ }, "SearchInput");
1018
+ var SelectList = /* @__PURE__ */ __name(({
1019
+ options,
1020
+ activeIndex,
1021
+ currentValue,
1022
+ selectedValues,
1023
+ multiple,
1024
+ onSelect,
1025
+ onActiveChange,
1026
+ renderOption,
1027
+ itemHeight,
1028
+ maxHeight,
1029
+ virtualized,
1030
+ loading,
1031
+ loadingMessage,
1032
+ noOptionsMessage,
1033
+ listboxId,
1034
+ onScroll
1035
+ }) => {
1036
+ const colors = useThemeColors();
1037
+ const [scrollTop, setScrollTop] = react.useState(0);
1038
+ const totalHeight = options.length * itemHeight;
1039
+ const visibleStart = virtualized ? Math.max(0, Math.floor(scrollTop / itemHeight) - VIRTUAL_OVERSCAN) : 0;
1040
+ const visibleEnd = virtualized ? Math.min(options.length, Math.ceil((scrollTop + maxHeight) / itemHeight) + VIRTUAL_OVERSCAN) : options.length;
1041
+ const handleScroll = /* @__PURE__ */ __name((event) => {
1042
+ if (virtualized) {
1043
+ setScrollTop(event.nativeEvent.contentOffset.y);
1044
+ }
1045
+ onScroll(event);
1046
+ }, "handleScroll");
1047
+ if (loading && options.length === 0) {
1048
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: px(colors.spacing["4"]), alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
1049
+ reactNative.Text,
1050
+ {
1051
+ style: {
1052
+ color: colors.semantic.text.muted,
1053
+ fontFamily: colors.fontFamily.body,
1054
+ fontSize: px(colors.fontSize.sm)
1055
+ },
1056
+ children: loadingMessage
1057
+ }
1058
+ ) });
1059
+ }
1060
+ if (options.length === 0) {
1061
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: px(colors.spacing["4"]), alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
1062
+ reactNative.Text,
1063
+ {
1064
+ style: {
1065
+ color: colors.semantic.text.muted,
1066
+ fontFamily: colors.fontFamily.body,
1067
+ fontSize: px(colors.fontSize.sm)
1068
+ },
1069
+ children: noOptionsMessage
1070
+ }
1071
+ ) });
1072
+ }
1073
+ const items = [];
1074
+ let lastGroup;
1075
+ for (let i = visibleStart; i < visibleEnd; i += 1) {
1076
+ const opt = options[i];
1077
+ if (!opt) {
1078
+ continue;
1079
+ }
1080
+ if (opt.group !== lastGroup && opt.group !== void 0) {
1081
+ items.push(
1082
+ /* @__PURE__ */ jsxRuntime.jsx(
1083
+ reactNative.View,
1084
+ {
1085
+ style: {
1086
+ paddingHorizontal: px(colors.spacing["3"]),
1087
+ paddingTop: px(colors.spacing["2"]),
1088
+ paddingBottom: px(colors.spacing["1"]),
1089
+ position: virtualized ? "absolute" : "relative",
1090
+ top: virtualized ? i * itemHeight - px(colors.spacing["4"]) : void 0,
1091
+ left: 0,
1092
+ right: 0
1093
+ },
1094
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1095
+ reactNative.Text,
1096
+ {
1097
+ style: {
1098
+ color: colors.semantic.text.muted,
1099
+ fontFamily: colors.fontFamily.body,
1100
+ fontSize: 11,
1101
+ // group header — component-density literal — not from theme (smaller than xs)
1102
+ fontWeight: colors.fontWeight.semibold,
1103
+ textTransform: "uppercase",
1104
+ letterSpacing: 0.5
1105
+ },
1106
+ children: opt.group
1107
+ }
1108
+ )
1109
+ },
1110
+ `grp-${i}-${opt.group}`
1111
+ )
1112
+ );
1113
+ lastGroup = opt.group;
1114
+ }
1115
+ const selected = multiple ? selectedValues.includes(opt.value) : opt.value === currentValue;
1116
+ const active = i === activeIndex;
1117
+ const itemNode = renderOption ? renderOption(opt, { selected, active }) : /* @__PURE__ */ jsxRuntime.jsx(DefaultOptionRow, { option: opt, selected, active, multiple });
1118
+ items.push(
1119
+ /* @__PURE__ */ jsxRuntime.jsx(
1120
+ reactNative.Pressable,
1121
+ {
1122
+ ...{
1123
+ role: "option",
1124
+ accessibilityRole: "none",
1125
+ "aria-selected": selected,
1126
+ onMouseEnter: /* @__PURE__ */ __name(() => onActiveChange(i), "onMouseEnter"),
1127
+ ...opt.disabled ? { "aria-disabled": true, disabled: true } : {}
1128
+ },
1129
+ onPress: () => onSelect(opt),
1130
+ style: {
1131
+ position: virtualized ? "absolute" : "relative",
1132
+ top: virtualized ? i * itemHeight : void 0,
1133
+ left: 0,
1134
+ right: 0,
1135
+ height: itemHeight,
1136
+ flexDirection: "row",
1137
+ alignItems: "center",
1138
+ paddingHorizontal: px(colors.spacing["3"]),
1139
+ backgroundColor: active ? colors.semantic.background.subtle : "transparent",
1140
+ opacity: opt.disabled ? 0.5 : 1
1141
+ },
1142
+ children: itemNode
1143
+ },
1144
+ `opt-${i}-${opt.value}`
1145
+ )
1146
+ );
1147
+ }
1148
+ return /* @__PURE__ */ jsxRuntime.jsx(
1149
+ reactNative.ScrollView,
1150
+ {
1151
+ nativeID: listboxId,
1152
+ onScroll: handleScroll,
1153
+ scrollEventThrottle: 16,
1154
+ style: { maxHeight },
1155
+ contentContainerStyle: virtualized ? { height: totalHeight, position: "relative" } : void 0,
1156
+ children: items
1157
+ }
1158
+ );
1159
+ }, "SelectList");
1160
+ var DefaultOptionRow = /* @__PURE__ */ __name(({
1161
+ option,
1162
+ selected,
1163
+ active,
1164
+ multiple = false
1165
+ }) => {
1166
+ const colors = useThemeColors();
1167
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "row", alignItems: "center", flex: 1, gap: px(colors.spacing["2"]) }, children: [
1168
+ multiple ? (
1169
+ // Inline checkbox-style indicator. We don't reuse <Checkbox>
1170
+ // here because the row is already a Pressable — nesting two
1171
+ // pressable surfaces breaks tap handling on native; this
1172
+ // is purely visual (the Pressable parent owns the toggle).
1173
+ /* @__PURE__ */ jsxRuntime.jsx(
1174
+ reactNative.View,
1175
+ {
1176
+ "aria-hidden": true,
1177
+ accessibilityElementsHidden: true,
1178
+ importantForAccessibility: "no-hide-descendants",
1179
+ style: {
1180
+ width: 18,
1181
+ height: 18,
1182
+ borderWidth: 1,
1183
+ borderRadius: px(colors.radius.sm),
1184
+ borderColor: selected ? colors.semantic.interactive.primary : colors.semantic.border.strong,
1185
+ backgroundColor: selected ? colors.semantic.interactive.primary : "transparent",
1186
+ alignItems: "center",
1187
+ justifyContent: "center"
1188
+ },
1189
+ children: selected ? /* @__PURE__ */ jsxRuntime.jsx(defaultSemanticIcons.check, { size: 12, color: colors.semantic.text.inverted }) : null
1190
+ }
1191
+ )
1192
+ ) : null,
1193
+ /* @__PURE__ */ jsxRuntime.jsx(
1194
+ reactNative.Text,
1195
+ {
1196
+ style: {
1197
+ color: colors.semantic.text.default,
1198
+ fontFamily: colors.fontFamily.body,
1199
+ fontSize: px(colors.fontSize.sm),
1200
+ fontWeight: selected ? colors.fontWeight.semibold : colors.fontWeight.regular,
1201
+ flex: 1
1202
+ },
1203
+ numberOfLines: 1,
1204
+ children: option.label
1205
+ }
1206
+ ),
1207
+ selected && !multiple ? /* @__PURE__ */ jsxRuntime.jsx(defaultSemanticIcons.check, { size: 16, color: colors.semantic.interactive.primary }) : null,
1208
+ active ? null : null
1209
+ ] });
1210
+ }, "DefaultOptionRow");
1211
+ var MultiTriggerLabel = /* @__PURE__ */ __name(({
1212
+ options,
1213
+ placeholder,
1214
+ maxChips
1215
+ }) => {
1216
+ const colors = useThemeColors();
1217
+ if (options.length === 0) {
1218
+ return /* @__PURE__ */ jsxRuntime.jsx(
1219
+ reactNative.Text,
1220
+ {
1221
+ style: {
1222
+ color: colors.semantic.text.muted,
1223
+ fontFamily: colors.fontFamily.body,
1224
+ fontSize: px(colors.fontSize.sm),
1225
+ flex: 1
1226
+ },
1227
+ numberOfLines: 1,
1228
+ children: placeholder
1229
+ }
1230
+ );
1231
+ }
1232
+ if (options.length > maxChips) {
1233
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1234
+ reactNative.Text,
1235
+ {
1236
+ style: {
1237
+ color: colors.semantic.text.default,
1238
+ fontFamily: colors.fontFamily.body,
1239
+ fontSize: px(colors.fontSize.sm),
1240
+ fontWeight: colors.fontWeight.medium,
1241
+ fontVariant: ["tabular-nums"],
1242
+ flex: 1
1243
+ },
1244
+ numberOfLines: 1,
1245
+ children: [
1246
+ options.length,
1247
+ " selected"
1248
+ ]
1249
+ }
1250
+ );
1251
+ }
1252
+ return /* @__PURE__ */ jsxRuntime.jsx(
1253
+ reactNative.View,
1254
+ {
1255
+ style: {
1256
+ flexDirection: "row",
1257
+ alignItems: "center",
1258
+ flexWrap: "wrap",
1259
+ rowGap: px(colors.spacing["1"]),
1260
+ columnGap: px(colors.spacing["1"]),
1261
+ flex: 1
1262
+ },
1263
+ children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
1264
+ reactNative.View,
1265
+ {
1266
+ style: {
1267
+ flexDirection: "row",
1268
+ alignItems: "center",
1269
+ paddingHorizontal: px(colors.spacing["2"]),
1270
+ paddingVertical: 2,
1271
+ borderRadius: px(colors.radius.sm),
1272
+ backgroundColor: colors.semantic.background.subtle,
1273
+ borderWidth: 1,
1274
+ borderColor: colors.semantic.border.default
1275
+ },
1276
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1277
+ reactNative.Text,
1278
+ {
1279
+ style: {
1280
+ color: colors.semantic.text.default,
1281
+ fontFamily: colors.fontFamily.body,
1282
+ fontSize: px(colors.fontSize.sm)
1283
+ },
1284
+ numberOfLines: 1,
1285
+ children: opt.label
1286
+ }
1287
+ )
1288
+ },
1289
+ `chip-${opt.value}`
1290
+ ))
1291
+ }
1292
+ );
1293
+ }, "MultiTriggerLabel");
1294
+ var MultiSelectionHeader = /* @__PURE__ */ __name(({ count, onClearAll }) => {
1295
+ const colors = useThemeColors();
1296
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1297
+ reactNative.View,
1298
+ {
1299
+ style: {
1300
+ flexDirection: "row",
1301
+ alignItems: "center",
1302
+ justifyContent: "space-between",
1303
+ paddingHorizontal: px(colors.spacing["3"]),
1304
+ paddingVertical: px(colors.spacing["2"]),
1305
+ borderBottomWidth: 1,
1306
+ borderBottomColor: colors.semantic.border.default
1307
+ },
1308
+ children: [
1309
+ /* @__PURE__ */ jsxRuntime.jsxs(
1310
+ reactNative.Text,
1311
+ {
1312
+ style: {
1313
+ color: colors.semantic.text.muted,
1314
+ fontFamily: colors.fontFamily.body,
1315
+ fontSize: px(colors.fontSize.sm),
1316
+ fontVariant: ["tabular-nums"]
1317
+ },
1318
+ children: [
1319
+ count,
1320
+ " selected"
1321
+ ]
1322
+ }
1323
+ ),
1324
+ /* @__PURE__ */ jsxRuntime.jsx(
1325
+ reactNative.Pressable,
1326
+ {
1327
+ role: "button",
1328
+ accessibilityRole: "button",
1329
+ "aria-label": "Clear all",
1330
+ accessibilityLabel: "Clear all",
1331
+ onPress: onClearAll,
1332
+ style: ({ pressed }) => ({
1333
+ paddingHorizontal: px(colors.spacing["2"]),
1334
+ paddingVertical: 2,
1335
+ borderRadius: px(colors.radius.sm),
1336
+ opacity: pressed ? 0.6 : 1
1337
+ }),
1338
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1339
+ reactNative.Text,
1340
+ {
1341
+ style: {
1342
+ color: colors.semantic.interactive.primary,
1343
+ fontFamily: colors.fontFamily.body,
1344
+ fontSize: px(colors.fontSize.sm),
1345
+ fontWeight: colors.fontWeight.medium
1346
+ },
1347
+ children: "Clear all"
1348
+ }
1349
+ )
1350
+ }
1351
+ )
1352
+ ]
1353
+ }
1354
+ );
1355
+ }, "MultiSelectionHeader");
1356
+
1357
+ exports.Select = Select;
1358
+ //# sourceMappingURL=index.cjs.map
1359
+ //# sourceMappingURL=index.cjs.map