@xaui/native 0.9.1-alpha.93 → 0.9.1-beta.100

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 (394) hide show
  1. package/dist/{chunk-AXKDHX5V.cjs → chunk-2IOL3VDP.cjs} +3 -3
  2. package/dist/{chunk-PAQZOD2L.js → chunk-2JFMCW5E.js} +1 -1
  3. package/dist/{chunk-TPYOQSKT.js → chunk-2UNLQRXY.js} +1 -1
  4. package/dist/{chunk-GYEQEF5H.js → chunk-356DND54.js} +1 -1
  5. package/dist/{chunk-OD6H7ANY.js → chunk-3BRVAMXQ.js} +2 -2
  6. package/dist/{chunk-QCH7X7O2.cjs → chunk-3DQCHPB6.cjs} +14 -14
  7. package/dist/{chunk-B33OU34Z.cjs → chunk-3MMOZP4Y.cjs} +20 -20
  8. package/dist/chunk-3TBT6ORW.cjs +662 -0
  9. package/dist/{chunk-DN3X5WIB.js → chunk-3VMKOQXH.js} +1 -1
  10. package/dist/{chunk-CBXILKQZ.cjs → chunk-435MOVG2.cjs} +3 -3
  11. package/dist/{chunk-2B6PUYTP.cjs → chunk-55KGHYYU.cjs} +4 -4
  12. package/dist/{chunk-V4IFH65I.cjs → chunk-5CXOSDFI.cjs} +2 -2
  13. package/dist/{chunk-FVEMTBU4.js → chunk-5G36GMFS.js} +3 -3
  14. package/dist/{chunk-BI5ME4QP.cjs → chunk-5UT5I53X.cjs} +8 -8
  15. package/dist/{chunk-V2CEKPJ6.js → chunk-6MVKLRLZ.js} +1 -1
  16. package/dist/{chunk-RSIWSVXI.js → chunk-6NAZ2IHL.js} +1 -1
  17. package/dist/{chunk-LPJ3UBSO.cjs → chunk-6NRWZR7T.cjs} +2 -2
  18. package/dist/{chunk-7NQL5DXY.js → chunk-6XY3XAEQ.js} +1 -1
  19. package/dist/{chunk-UEW3GAP5.cjs → chunk-6ZWQDTGQ.cjs} +5 -5
  20. package/dist/{chunk-ODQHAPQW.js → chunk-73EVNWZI.js} +25 -23
  21. package/dist/{chunk-VMPCXS4S.js → chunk-7EPH24S2.js} +23 -21
  22. package/dist/{chunk-G2YHGLN3.cjs → chunk-7JWOAGB3.cjs} +9 -9
  23. package/dist/{chunk-FXN32S75.cjs → chunk-ADGHFLBJ.cjs} +4 -4
  24. package/dist/{chunk-OPLPLFGK.cjs → chunk-AHKKEM3K.cjs} +66 -23
  25. package/dist/{chunk-WRZV6ORJ.js → chunk-AYOJXFHR.js} +1 -1
  26. package/dist/{chunk-MMFIMQMQ.js → chunk-BBQQIO6L.js} +6 -6
  27. package/dist/{chunk-PROLOLZ5.cjs → chunk-BGBJTBFC.cjs} +3 -3
  28. package/dist/{chunk-RXEUKYM5.js → chunk-BH4IN6H6.js} +2 -2
  29. package/dist/{chunk-WLWZG2PA.cjs → chunk-BKY5YQ7W.cjs} +1 -1
  30. package/dist/{chunk-CYOUOQXT.cjs → chunk-C2S6J27O.cjs} +6 -6
  31. package/dist/chunk-C6JO2RTV.cjs +752 -0
  32. package/dist/{chunk-NVODH2PR.js → chunk-CCTAJXZ3.js} +63 -61
  33. package/dist/{chunk-ORXVXYKC.cjs → chunk-CHGBWFDI.cjs} +63 -26
  34. package/dist/chunk-CS6CYB4I.cjs +260 -0
  35. package/dist/{chunk-WLJPO3AS.cjs → chunk-CZ2NUGUI.cjs} +357 -201
  36. package/dist/{chunk-PYQ2P3M5.cjs → chunk-CZEWWCWG.cjs} +58 -58
  37. package/dist/{chunk-PDSR42YC.cjs → chunk-D22K3NZU.cjs} +3 -3
  38. package/dist/{chunk-WYRM77XM.cjs → chunk-ENZBKNFJ.cjs} +15 -15
  39. package/dist/chunk-ETY5PM3E.cjs +797 -0
  40. package/dist/{chunk-62AYYMZP.cjs → chunk-FDYPWVNP.cjs} +3 -3
  41. package/dist/{chunk-PAQD6UUF.cjs → chunk-FLKTJ46K.cjs} +17 -17
  42. package/dist/{chunk-EBCAPIBD.js → chunk-FSVZXWLZ.js} +71 -51
  43. package/dist/{chunk-FOOXBVOQ.js → chunk-GVZJNIHN.js} +184 -68
  44. package/dist/chunk-GWTURY4S.cjs +999 -0
  45. package/dist/{chunk-OW4N2C3M.cjs → chunk-HBYT7B47.cjs} +88 -61
  46. package/dist/{chunk-7EVW6O2Q.js → chunk-HDERVGWZ.js} +2 -2
  47. package/dist/{chunk-XWIPLZTD.cjs → chunk-HOV25N3M.cjs} +2 -2
  48. package/dist/{chunk-5MMBEDZG.cjs → chunk-I3XIZWCV.cjs} +29 -29
  49. package/dist/{chunk-EDNCHCIN.cjs → chunk-IAJG7GYE.cjs} +2 -2
  50. package/dist/{chunk-P7OHZCU3.js → chunk-IAWLQN2W.js} +2 -2
  51. package/dist/{chunk-RCSEVEIR.js → chunk-ICVIWXK4.js} +1 -1
  52. package/dist/chunk-IHRPAKCZ.cjs +540 -0
  53. package/dist/{chunk-ZWS3FQ3J.js → chunk-IUDQG3JI.js} +57 -57
  54. package/dist/{chunk-JKDWYNSG.js → chunk-IVELCJEN.js} +110 -108
  55. package/dist/{chunk-5YZUYSV7.js → chunk-JYV53WUN.js} +1 -1
  56. package/dist/{chunk-QN2D5ZCS.cjs → chunk-KAYZH7ZN.cjs} +4 -4
  57. package/dist/{chunk-RREJUSAS.cjs → chunk-KIXHSX3L.cjs} +4 -4
  58. package/dist/{chunk-2AFA5HA2.js → chunk-KQW25RCC.js} +77 -75
  59. package/dist/{chunk-7M6YKCHX.js → chunk-KZZWNDDO.js} +2 -2
  60. package/dist/{chunk-J5COSALO.cjs → chunk-L4B6Z45Q.cjs} +5 -5
  61. package/dist/{chunk-X4CZYJZ6.cjs → chunk-LCGJA37L.cjs} +12 -12
  62. package/dist/{chunk-P2CJNTAP.js → chunk-LMMHAGOM.js} +33 -22
  63. package/dist/{chunk-SUJLTC2K.js → chunk-LPGY2IDX.js} +1 -1
  64. package/dist/{chunk-P5M5URAB.js → chunk-LSZW4G7B.js} +31 -31
  65. package/dist/{chunk-LECYGVIH.js → chunk-LYWXGEED.js} +51 -49
  66. package/dist/{chunk-VQGNLX5C.js → chunk-M352N6PQ.js} +6 -6
  67. package/dist/{chunk-AIND5F7P.js → chunk-MTQGFUW5.js} +29 -29
  68. package/dist/{chunk-ZKGVOXLQ.js → chunk-MXSIY6QQ.js} +4 -4
  69. package/dist/{chunk-3CPLJJWX.js → chunk-MZUYTCCB.js} +1 -1
  70. package/dist/{chunk-DYQB54JA.cjs → chunk-NPAGA6SH.cjs} +2 -2
  71. package/dist/{chunk-O6B72H4B.js → chunk-NQDTGYHC.js} +7 -9
  72. package/dist/{chunk-NADCILBL.cjs → chunk-NRU5APUE.cjs} +4 -4
  73. package/dist/{chunk-43S673KF.js → chunk-NTVPLDJC.js} +1 -1
  74. package/dist/{chunk-7AVZ2FST.cjs → chunk-NXVSNESK.cjs} +12 -12
  75. package/dist/{chunk-QELEKXN3.cjs → chunk-OMI2FRCU.cjs} +5 -5
  76. package/dist/{chunk-E4FWGZH2.js → chunk-OUNTRW6E.js} +5 -5
  77. package/dist/{chunk-JBZ7SBRV.cjs → chunk-Q3ZKZ2Y6.cjs} +3 -3
  78. package/dist/chunk-QRH45OO3.cjs +903 -0
  79. package/dist/{chunk-6RU6GUJP.js → chunk-QZF7RSVV.js} +1 -1
  80. package/dist/{chunk-UYQLW7OD.js → chunk-RAYO2TJL.js} +2 -2
  81. package/dist/{chunk-FRLWG5LM.js → chunk-RFT5MGJC.js} +25 -25
  82. package/dist/{chunk-USIWPESU.js → chunk-SIX5AVXG.js} +1 -1
  83. package/dist/chunk-SVS726BW.js +822 -0
  84. package/dist/{chunk-GGP2ERSV.js → chunk-T5ES7FOL.js} +1 -1
  85. package/dist/{chunk-JJYHW4PV.js → chunk-TNFLBURM.js} +2 -2
  86. package/dist/{chunk-YCQEX25B.cjs → chunk-U6YD3UBO.cjs} +7 -7
  87. package/dist/chunk-USQK6SFZ.cjs +627 -0
  88. package/dist/{chunk-MSORLKO7.cjs → chunk-V3C3ATRO.cjs} +2 -2
  89. package/dist/{chunk-TCWW7JI2.js → chunk-V5FYHQKQ.js} +111 -94
  90. package/dist/{chunk-CBRW53GN.cjs → chunk-V5V2QYFH.cjs} +43 -27
  91. package/dist/{chunk-YGETADPV.js → chunk-V7YT4SDX.js} +2 -2
  92. package/dist/{chunk-TRWZEOCO.js → chunk-VL2ZT4BB.js} +5 -5
  93. package/dist/{chunk-2SHWOFQV.js → chunk-VQ4OTVET.js} +29 -29
  94. package/dist/{chunk-Q6OVVUAT.js → chunk-VTGWFZCA.js} +2 -2
  95. package/dist/{chunk-6GQ7UTJ7.cjs → chunk-VXAIFOXL.cjs} +2 -2
  96. package/dist/{chunk-BJVO7DWJ.js → chunk-W4F4NQXM.js} +1 -1
  97. package/dist/{chunk-JC4YCKKL.js → chunk-WIGDDZHO.js} +198 -82
  98. package/dist/{chunk-ZE4IHUUO.cjs → chunk-WNEDQTH6.cjs} +2 -2
  99. package/dist/chunk-WSDDUVF6.cjs +395 -0
  100. package/dist/{chunk-QHXTO525.js → chunk-WYJHDTU7.js} +1 -1
  101. package/dist/{chunk-RLC3EXMV.js → chunk-XM4IN4Q6.js} +2 -2
  102. package/dist/chunk-XXXR2AD3.cjs +94 -0
  103. package/dist/{chunk-AR7667VN.cjs → chunk-YJA7OQQZ.cjs} +4 -4
  104. package/dist/{chunk-LKRQUQZQ.cjs → chunk-YRANVNJG.cjs} +2 -2
  105. package/dist/{chunk-WIX4SYZI.cjs → chunk-YUCK5VJO.cjs} +10 -10
  106. package/dist/chunk-ZBFBF7S4.cjs +1054 -0
  107. package/dist/{chunk-52XUGOLD.js → chunk-ZBY7Q7WJ.js} +3 -3
  108. package/dist/chunk-ZDJQ643D.js +62 -0
  109. package/dist/{chunk-QUSQEYLP.cjs → chunk-ZNKHL5O6.cjs} +30 -32
  110. package/dist/{chunk-U5CUBDJA.js → chunk-ZR5YOCOQ.js} +15 -15
  111. package/dist/components/accordion/accordion.animation.d.cts +1 -1
  112. package/dist/components/accordion/accordion.animation.d.ts +1 -1
  113. package/dist/components/accordion/accordion.type.d.cts +1 -1
  114. package/dist/components/accordion/accordion.type.d.ts +1 -1
  115. package/dist/components/accordion/index.cjs +3 -3
  116. package/dist/components/accordion/index.js +2 -2
  117. package/dist/components/agenda-calendar/agenda-calendar-today-button.d.cts +4 -0
  118. package/dist/components/agenda-calendar/agenda-calendar-today-button.d.ts +4 -0
  119. package/dist/components/agenda-calendar/agenda-calendar.recipe.d.cts +1 -1
  120. package/dist/components/agenda-calendar/agenda-calendar.recipe.d.ts +1 -1
  121. package/dist/components/agenda-calendar/agenda-calendar.type.d.cts +4 -1
  122. package/dist/components/agenda-calendar/agenda-calendar.type.d.ts +4 -1
  123. package/dist/components/agenda-calendar/index.cjs +4 -4
  124. package/dist/components/agenda-calendar/index.js +3 -3
  125. package/dist/components/alert/alert-icon.d.cts +2 -2
  126. package/dist/components/alert/alert-icon.d.ts +2 -2
  127. package/dist/components/alert/alert.type.d.cts +1 -1
  128. package/dist/components/alert/alert.type.d.ts +1 -1
  129. package/dist/components/alert/index.cjs +4 -4
  130. package/dist/components/alert/index.js +3 -3
  131. package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
  132. package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
  133. package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
  134. package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
  135. package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
  136. package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
  137. package/dist/components/autocomplete/autocomplete.d.cts +50 -7
  138. package/dist/components/autocomplete/autocomplete.d.ts +50 -7
  139. package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
  140. package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
  141. package/dist/components/autocomplete/index.cjs +11 -4
  142. package/dist/components/autocomplete/index.d.cts +50 -3
  143. package/dist/components/autocomplete/index.d.ts +50 -3
  144. package/dist/components/autocomplete/index.js +10 -3
  145. package/dist/components/avatar/avatar-fallback.d.cts +1 -1
  146. package/dist/components/avatar/avatar-fallback.d.ts +1 -1
  147. package/dist/components/avatar/avatar.d.cts +1 -1
  148. package/dist/components/avatar/avatar.d.ts +1 -1
  149. package/dist/components/avatar/avatar.type.d.cts +1 -1
  150. package/dist/components/avatar/avatar.type.d.ts +1 -1
  151. package/dist/components/avatar/index.cjs +2 -2
  152. package/dist/components/avatar/index.js +1 -1
  153. package/dist/components/bottom-sheet/bottom-sheet.d.cts +1 -1
  154. package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
  155. package/dist/components/bottom-sheet/index.cjs +3 -3
  156. package/dist/components/bottom-sheet/index.js +2 -2
  157. package/dist/components/button/index.cjs +3 -3
  158. package/dist/components/button/index.js +2 -2
  159. package/dist/components/calendar/index.cjs +3 -3
  160. package/dist/components/calendar/index.js +2 -2
  161. package/dist/components/card/card-background.d.cts +1 -1
  162. package/dist/components/card/card-background.d.ts +1 -1
  163. package/dist/components/card/card.utils.d.cts +1 -1
  164. package/dist/components/card/card.utils.d.ts +1 -1
  165. package/dist/components/card/index.cjs +3 -3
  166. package/dist/components/card/index.js +2 -2
  167. package/dist/components/carousel/index.cjs +3 -3
  168. package/dist/components/carousel/index.js +2 -2
  169. package/dist/components/checkbox/checkbox.recipe.d.cts +1 -1
  170. package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
  171. package/dist/components/checkbox/checkbox.type.d.cts +1 -1
  172. package/dist/components/checkbox/checkbox.type.d.ts +1 -1
  173. package/dist/components/checkbox/index.cjs +3 -3
  174. package/dist/components/checkbox/index.js +2 -2
  175. package/dist/components/chip/chip.type.d.cts +1 -1
  176. package/dist/components/chip/chip.type.d.ts +1 -1
  177. package/dist/components/chip/index.cjs +4 -4
  178. package/dist/components/chip/index.js +3 -3
  179. package/dist/components/close-button/index.cjs +4 -4
  180. package/dist/components/close-button/index.js +3 -3
  181. package/dist/components/color-picker/index.cjs +9 -9
  182. package/dist/components/color-picker/index.js +8 -8
  183. package/dist/components/combobox/combobox.type.d.cts +5 -1
  184. package/dist/components/combobox/combobox.type.d.ts +5 -1
  185. package/dist/components/combobox/index.cjs +6 -5
  186. package/dist/components/combobox/index.d.cts +15 -1
  187. package/dist/components/combobox/index.d.ts +15 -1
  188. package/dist/components/combobox/index.js +5 -4
  189. package/dist/components/date-picker/index.cjs +6 -6
  190. package/dist/components/date-picker/index.js +5 -5
  191. package/dist/components/date-range-picker/index.cjs +7 -7
  192. package/dist/components/date-range-picker/index.js +6 -6
  193. package/dist/components/date-time-picker/date-time-picker-indicator.d.cts +2 -2
  194. package/dist/components/date-time-picker/date-time-picker-indicator.d.ts +2 -2
  195. package/dist/components/date-time-picker/date-time-picker.type.d.cts +3 -2
  196. package/dist/components/date-time-picker/date-time-picker.type.d.ts +3 -2
  197. package/dist/components/date-time-picker/index.cjs +9 -10
  198. package/dist/components/date-time-picker/index.d.cts +1 -1
  199. package/dist/components/date-time-picker/index.d.ts +1 -1
  200. package/dist/components/date-time-picker/index.js +8 -9
  201. package/dist/components/dialog/index.cjs +4 -4
  202. package/dist/components/dialog/index.js +3 -3
  203. package/dist/components/dummy-field/index.cjs +6 -6
  204. package/dist/components/dummy-field/index.js +5 -5
  205. package/dist/components/fab/index.cjs +3 -3
  206. package/dist/components/fab/index.js +2 -2
  207. package/dist/components/field-group/field-group-icon.d.cts +1 -1
  208. package/dist/components/field-group/field-group-icon.d.ts +1 -1
  209. package/dist/components/field-group/index.cjs +4 -4
  210. package/dist/components/field-group/index.js +3 -3
  211. package/dist/components/flip-card/index.cjs +3 -3
  212. package/dist/components/flip-card/index.js +2 -2
  213. package/dist/components/index.d.cts +1 -1
  214. package/dist/components/index.d.ts +1 -1
  215. package/dist/components/input-otp/input-otp.type.d.cts +1 -1
  216. package/dist/components/input-otp/input-otp.type.d.ts +1 -1
  217. package/dist/components/list-box/index.cjs +2 -2
  218. package/dist/components/list-box/index.js +1 -1
  219. package/dist/components/list-box/list-box-item-suffix.d.cts +1 -1
  220. package/dist/components/list-box/list-box-item-suffix.d.ts +1 -1
  221. package/dist/components/mask-field/index.cjs +5 -5
  222. package/dist/components/mask-field/index.js +4 -4
  223. package/dist/components/menu/index.cjs +3 -3
  224. package/dist/components/menu/index.js +2 -2
  225. package/dist/components/morph-button/index.cjs +3 -3
  226. package/dist/components/morph-button/index.js +2 -2
  227. package/dist/components/number-field/index.cjs +5 -5
  228. package/dist/components/number-field/index.js +4 -4
  229. package/dist/components/number-field/number-field-increment.d.cts +2 -2
  230. package/dist/components/number-field/number-field-increment.d.ts +2 -2
  231. package/dist/components/number-pad/index.cjs +3 -3
  232. package/dist/components/number-pad/index.js +2 -2
  233. package/dist/components/number-stepper/index.cjs +3 -3
  234. package/dist/components/number-stepper/index.js +2 -2
  235. package/dist/components/pager/index.cjs +2 -2
  236. package/dist/components/pager/index.js +1 -1
  237. package/dist/components/phone-number-field/index.cjs +43 -36
  238. package/dist/components/phone-number-field/index.js +15 -8
  239. package/dist/components/popover/index.cjs +3 -3
  240. package/dist/components/popover/index.js +2 -2
  241. package/dist/components/popover/popover.recipe.d.cts +1 -1
  242. package/dist/components/popover/popover.recipe.d.ts +1 -1
  243. package/dist/components/radio/index.cjs +3 -3
  244. package/dist/components/radio/index.js +2 -2
  245. package/dist/components/range-calendar/index.cjs +4 -4
  246. package/dist/components/range-calendar/index.js +3 -3
  247. package/dist/components/rating/index.cjs +3 -3
  248. package/dist/components/rating/index.js +2 -2
  249. package/dist/components/search-field/index.cjs +7 -7
  250. package/dist/components/search-field/index.js +6 -6
  251. package/dist/components/segment/index.cjs +4 -4
  252. package/dist/components/segment/index.js +2 -2
  253. package/dist/components/select/index.cjs +11 -4
  254. package/dist/components/select/index.d.cts +45 -4
  255. package/dist/components/select/index.d.ts +45 -4
  256. package/dist/components/select/index.js +10 -3
  257. package/dist/components/select/select-description.d.cts +14 -0
  258. package/dist/components/select/select-description.d.ts +14 -0
  259. package/dist/components/select/select-error.d.cts +13 -0
  260. package/dist/components/select/select-error.d.ts +13 -0
  261. package/dist/components/select/select-group-label.d.cts +11 -0
  262. package/dist/components/select/select-group-label.d.ts +11 -0
  263. package/dist/components/select/select-indicator.d.cts +1 -1
  264. package/dist/components/select/select-indicator.d.ts +1 -1
  265. package/dist/components/select/select-label.d.cts +11 -2
  266. package/dist/components/select/select-label.d.ts +11 -2
  267. package/dist/components/select/select.d.cts +49 -9
  268. package/dist/components/select/select.d.ts +49 -9
  269. package/dist/components/select/select.recipe.d.cts +1 -1
  270. package/dist/components/select/select.recipe.d.ts +1 -1
  271. package/dist/components/select/select.type.d.cts +33 -9
  272. package/dist/components/select/select.type.d.ts +33 -9
  273. package/dist/components/skeleton/skeleton.type.d.cts +1 -1
  274. package/dist/components/skeleton/skeleton.type.d.ts +1 -1
  275. package/dist/components/slide-button/index.cjs +30 -0
  276. package/dist/components/slide-button/index.d.cts +44 -0
  277. package/dist/components/slide-button/index.d.ts +44 -0
  278. package/dist/components/slide-button/index.js +30 -0
  279. package/dist/components/slide-button/slide-button-fill.d.cts +29 -0
  280. package/dist/components/slide-button/slide-button-fill.d.ts +29 -0
  281. package/dist/components/slide-button/slide-button-icon.d.cts +10 -0
  282. package/dist/components/slide-button/slide-button-icon.d.ts +10 -0
  283. package/dist/components/slide-button/slide-button-label.d.cts +20 -0
  284. package/dist/components/slide-button/slide-button-label.d.ts +20 -0
  285. package/dist/components/slide-button/slide-button-thumb.d.cts +20 -0
  286. package/dist/components/slide-button/slide-button-thumb.d.ts +20 -0
  287. package/dist/components/slide-button/slide-button.animation.d.cts +33 -0
  288. package/dist/components/slide-button/slide-button.animation.d.ts +33 -0
  289. package/dist/components/slide-button/slide-button.context.d.cts +7 -0
  290. package/dist/components/slide-button/slide-button.context.d.ts +7 -0
  291. package/dist/components/slide-button/slide-button.d.cts +56 -0
  292. package/dist/components/slide-button/slide-button.d.ts +56 -0
  293. package/dist/components/slide-button/slide-button.recipe.d.cts +31 -0
  294. package/dist/components/slide-button/slide-button.recipe.d.ts +31 -0
  295. package/dist/components/slide-button/slide-button.type.d.cts +79 -0
  296. package/dist/components/slide-button/slide-button.type.d.ts +79 -0
  297. package/dist/components/slider/index.cjs +2 -2
  298. package/dist/components/slider/index.js +1 -1
  299. package/dist/components/slider/slider-thumb.d.cts +1 -1
  300. package/dist/components/slider/slider-thumb.d.ts +1 -1
  301. package/dist/components/slider/slider.recipe.d.cts +1 -1
  302. package/dist/components/slider/slider.recipe.d.ts +1 -1
  303. package/dist/components/snackbar/index.cjs +3 -3
  304. package/dist/components/snackbar/index.js +2 -2
  305. package/dist/components/spinner/spinner.d.cts +1 -1
  306. package/dist/components/spinner/spinner.d.ts +1 -1
  307. package/dist/components/switch/index.cjs +3 -3
  308. package/dist/components/switch/index.js +2 -2
  309. package/dist/components/switch/switch.style.d.cts +1 -1
  310. package/dist/components/switch/switch.style.d.ts +1 -1
  311. package/dist/components/table/index.cjs +4 -4
  312. package/dist/components/table/index.js +3 -3
  313. package/dist/components/tabs/index.cjs +4 -4
  314. package/dist/components/tabs/index.js +3 -3
  315. package/dist/components/tag-group/index.cjs +4 -4
  316. package/dist/components/tag-group/index.js +3 -3
  317. package/dist/components/text-area/index.cjs +4 -4
  318. package/dist/components/text-area/index.js +3 -3
  319. package/dist/components/text-area/text-area.d.cts +1 -1
  320. package/dist/components/text-area/text-area.d.ts +1 -1
  321. package/dist/components/text-field/index.cjs +3 -3
  322. package/dist/components/text-field/index.js +2 -2
  323. package/dist/components/text-field/text-field.type.d.cts +4 -4
  324. package/dist/components/text-field/text-field.type.d.ts +4 -4
  325. package/dist/components/time-picker/index.cjs +5 -6
  326. package/dist/components/time-picker/index.d.cts +1 -1
  327. package/dist/components/time-picker/index.d.ts +1 -1
  328. package/dist/components/time-picker/index.js +4 -5
  329. package/dist/components/time-picker/time-picker-display.d.cts +3 -3
  330. package/dist/components/time-picker/time-picker-display.d.ts +3 -3
  331. package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
  332. package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
  333. package/dist/components/time-picker/time-picker.d.cts +1 -1
  334. package/dist/components/time-picker/time-picker.d.ts +1 -1
  335. package/dist/components/time-picker/time-picker.type.d.cts +11 -1
  336. package/dist/components/time-picker/time-picker.type.d.ts +11 -1
  337. package/dist/components/toast/index.cjs +3 -3
  338. package/dist/components/toast/index.js +2 -2
  339. package/dist/components/toast/toast.animation.d.cts +2 -2
  340. package/dist/components/toast/toast.animation.d.ts +2 -2
  341. package/dist/components/toast/toast.utils.d.cts +1 -1
  342. package/dist/components/toast/toast.utils.d.ts +1 -1
  343. package/dist/components/toggle-button/index.cjs +3 -3
  344. package/dist/components/toggle-button/index.js +2 -2
  345. package/dist/components/typography/typography.type.d.cts +1 -1
  346. package/dist/components/typography/typography.type.d.ts +1 -1
  347. package/dist/components/wheel-picker/index.cjs +2 -2
  348. package/dist/components/wheel-picker/index.js +1 -1
  349. package/dist/hooks/use-rotation.d.cts +1 -1
  350. package/dist/hooks/use-rotation.d.ts +1 -1
  351. package/dist/index.cjs +74 -63
  352. package/dist/index.js +92 -81
  353. package/dist/system/anchored/indicator-spring.d.cts +2 -2
  354. package/dist/system/anchored/indicator-spring.d.ts +2 -2
  355. package/dist/system/index.cjs +3 -3
  356. package/dist/system/index.js +2 -2
  357. package/dist/theme/derive-colors.d.cts +1 -1
  358. package/dist/theme/derive-colors.d.ts +1 -1
  359. package/dist/theme/index.cjs +2 -2
  360. package/dist/theme/index.js +1 -1
  361. package/dist/utils/time.d.cts +29 -0
  362. package/dist/utils/time.d.ts +29 -0
  363. package/package.json +11 -11
  364. package/dist/chunk-3MRCSXGT.js +0 -73
  365. package/dist/chunk-5E6SHYEQ.cjs +0 -631
  366. package/dist/chunk-6JAGPPZU.cjs +0 -788
  367. package/dist/chunk-CEPX7CKM.cjs +0 -365
  368. package/dist/chunk-CHFPFYNV.js +0 -60
  369. package/dist/chunk-ECR6GPJ6.js +0 -198
  370. package/dist/chunk-GBTNFQXN.cjs +0 -33
  371. package/dist/chunk-GZAGWNQM.cjs +0 -719
  372. package/dist/chunk-ILXKBDC6.cjs +0 -209
  373. package/dist/chunk-IPD3IUE2.cjs +0 -640
  374. package/dist/chunk-P2V6PIM7.cjs +0 -478
  375. package/dist/chunk-Q2BWXT55.cjs +0 -1011
  376. package/dist/chunk-UFKSUELU.cjs +0 -453
  377. package/dist/chunk-W4IPOWLY.cjs +0 -198
  378. package/dist/chunk-YSTLHVQV.cjs +0 -73
  379. package/dist/components/time-field/index.cjs +0 -27
  380. package/dist/components/time-field/index.d.cts +0 -52
  381. package/dist/components/time-field/index.d.ts +0 -52
  382. package/dist/components/time-field/index.js +0 -27
  383. package/dist/components/time-field/time-field-field.d.cts +0 -11
  384. package/dist/components/time-field/time-field-field.d.ts +0 -11
  385. package/dist/components/time-field/time-field-period.d.cts +0 -34
  386. package/dist/components/time-field/time-field-period.d.ts +0 -34
  387. package/dist/components/time-field/time-field.context.d.cts +0 -9
  388. package/dist/components/time-field/time-field.context.d.ts +0 -9
  389. package/dist/components/time-field/time-field.d.cts +0 -56
  390. package/dist/components/time-field/time-field.d.ts +0 -56
  391. package/dist/components/time-field/time-field.type.d.cts +0 -72
  392. package/dist/components/time-field/time-field.type.d.ts +0 -72
  393. package/dist/utils/time-mask.d.cts +0 -68
  394. package/dist/utils/time-mask.d.ts +0 -68
@@ -1,788 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
-
4
-
5
-
6
- var _chunkFTPPUTWLcjs = require('./chunk-FTPPUTWL.cjs');
7
-
8
-
9
- var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
10
-
11
-
12
- var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
13
-
14
-
15
- var _chunkOW4N2C3Mcjs = require('./chunk-OW4N2C3M.cjs');
16
-
17
-
18
- var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
19
-
20
-
21
-
22
- var _chunkSL3V7R2Ycjs = require('./chunk-SL3V7R2Y.cjs');
23
-
24
-
25
-
26
- var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
27
-
28
-
29
- var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
30
-
31
-
32
- var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
33
-
34
-
35
- var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
36
-
37
- // src/components/carousel/carousel-content.tsx
38
- var _react = require('react');
39
-
40
-
41
-
42
-
43
- var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
44
-
45
- // src/components/carousel/carousel.context.ts
46
- var [CarouselProvider, useCarousel] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Carousel");
47
-
48
- // src/components/carousel/carousel-content.tsx
49
- var _jsxruntime = require('react/jsx-runtime');
50
- var CarouselContent = _react.forwardRef.call(void 0,
51
- function CarouselContent2({ children, style, onLayout, ...props }, ref) {
52
- const {
53
- contentStyle,
54
- metrics,
55
- width,
56
- count,
57
- setCount,
58
- offset,
59
- trackRef,
60
- isDisabled,
61
- onInteract,
62
- onSettle,
63
- setTrackHeight
64
- } = useCarousel();
65
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
66
- const track = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, ref, trackRef);
67
- const given = _react.Children.count(children);
68
- _react.useEffect.call(void 0, () => {
69
- if (given !== count) setCount(given);
70
- }, [count, given, setCount]);
71
- const handleLayout = (event) => {
72
- _optionalChain([onLayout, 'optionalCall', _2 => _2(event)]);
73
- setTrackHeight(event.nativeEvent.layout.height);
74
- };
75
- const settled = _reactnativereanimated.useSharedValue.call(void 0, 0);
76
- const { step } = metrics;
77
- const scroll = _reactnativereanimated.useAnimatedScrollHandler.call(void 0, (event) => {
78
- offset.set(event.contentOffset.x);
79
- const next = _chunkFTPPUTWLcjs.indexFromOffset.call(void 0, event.contentOffset.x, step, count);
80
- if (next !== settled.get()) {
81
- settled.set(next);
82
- _reactnativereanimated.runOnJS.call(void 0, onSettle)(next);
83
- }
84
- });
85
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
86
- _reactnativereanimated2.default.ScrollView,
87
- {
88
- ref: track,
89
- horizontal: true,
90
- showsHorizontalScrollIndicator: false,
91
- scrollEnabled: !isDisabled,
92
- snapToInterval: metrics.step,
93
- decelerationRate: "fast",
94
- disableIntervalMomentum: true,
95
- scrollEventThrottle: 16,
96
- ...rest,
97
- contentContainerStyle: [
98
- { gap: metrics.gap },
99
- // R13 — the inset is the same at both ends, so one key rather than two, and no
100
- // side to get the wrong way round in a right-to-left layout.
101
- { paddingHorizontal: metrics.inset }
102
- ],
103
- style: [contentStyle, styleProps, style],
104
- onLayout: handleLayout,
105
- onScroll: scroll,
106
- onScrollBeginDrag: onInteract,
107
- children: width > 0 ? children : null
108
- }
109
- );
110
- }
111
- );
112
- CarouselContent.displayName = "XAUI.Carousel.Content";
113
-
114
- // src/components/carousel/carousel-counter.tsx
115
-
116
- var _reactnative = require('react-native');
117
-
118
- var CarouselCounter = _react.forwardRef.call(void 0,
119
- function CarouselCounter2({ children, style, ...props }, ref) {
120
- const { counterStyle, index, count } = useCarousel();
121
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
122
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { ref, ...rest, style: [counterStyle, styleProps, style], children: _nullishCoalesce(children, () => ( `${count === 0 ? 0 : index + 1} / ${count}`)) });
123
- }
124
- );
125
- CarouselCounter.displayName = "XAUI.Carousel.Counter";
126
-
127
- // src/components/carousel/carousel-indicator.tsx
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- var HIT_SLOP = 8;
136
- var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
137
- var CarouselIndicator = _react.forwardRef.call(void 0,
138
- function CarouselIndicator2({ children, style, ...props }, ref) {
139
- const { indicatorStyle, count } = useCarousel();
140
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
141
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, style: [indicatorStyle, styleProps, style], children: _nullishCoalesce(children, () => ( Array.from({ length: count }, (_, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CarouselDot, { index }, index)))) });
142
- }
143
- );
144
- CarouselIndicator.displayName = "XAUI.Carousel.Indicator";
145
- var CarouselDot = _react.forwardRef.call(void 0, function CarouselDot2({ index, children, style, ...props }, ref) {
146
- const {
147
- dotStyle,
148
- dotInk,
149
- offset,
150
- metrics,
151
- count,
152
- index: current,
153
- isDisabled,
154
- goTo,
155
- onInteract
156
- } = useCarousel();
157
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
158
- const { step } = metrics;
159
- const { rest: restColor, active, width, pill } = dotInk;
160
- const grow = _reactnativereanimated.useAnimatedStyle.call(void 0, () => {
161
- const distance = Math.abs(_chunkFTPPUTWLcjs.progressFromOffset.call(void 0, offset.get(), step, count) - index);
162
- const nearness = Math.max(0, 1 - distance);
163
- return {
164
- width: width + (pill - width) * nearness,
165
- backgroundColor: _reactnativereanimated.interpolateColor.call(void 0, nearness, [0, 1], [restColor, active])
166
- };
167
- });
168
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
169
- AnimatedPressable,
170
- {
171
- ref,
172
- accessibilityRole: "button",
173
- accessibilityState: { selected: index === current, disabled: isDisabled },
174
- accessibilityValue: { now: index + 1, min: 1, max: count },
175
- disabled: isDisabled,
176
- hitSlop: HIT_SLOP,
177
- ...rest,
178
- style: [dotStyle, grow, styleProps, style],
179
- onPress: () => {
180
- onInteract();
181
- goTo(index);
182
- },
183
- children
184
- }
185
- );
186
- });
187
- CarouselDot.displayName = "XAUI.Carousel.Dot";
188
-
189
- // src/components/carousel/carousel-item.tsx
190
-
191
-
192
-
193
- var CarouselItem = _react.forwardRef.call(void 0,
194
- function CarouselItem2({ children, style, ...props }, ref) {
195
- const { itemStyle, metrics } = useCarousel();
196
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
197
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
198
- _reactnative.View,
199
- {
200
- ref,
201
- ...rest,
202
- style: [itemStyle, { width: metrics.itemWidth }, styleProps, style],
203
- children
204
- }
205
- );
206
- }
207
- );
208
- CarouselItem.displayName = "XAUI.Carousel.Item";
209
-
210
- // src/components/carousel/carousel-control.tsx
211
-
212
-
213
-
214
- // src/components/carousel/carousel.style.ts
215
-
216
- var QUARTER = _reactnative.I18nManager.isRTL ? "-45deg" : "45deg";
217
- var carouselSheet = _reactnative.StyleSheet.create({
218
- /** Towards the end of the series — pointing right in a left-to-right layout. */
219
- chevronForward: {
220
- borderStartWidth: 0,
221
- borderBottomWidth: 0,
222
- transform: [{ rotate: QUARTER }]
223
- },
224
- /** And back the other way. */
225
- chevronBack: {
226
- borderEndWidth: 0,
227
- borderTopWidth: 0,
228
- transform: [{ rotate: QUARTER }]
229
- }
230
- });
231
-
232
- // src/components/carousel/carousel-control.tsx
233
-
234
- function control({ delta, displayName, edge, turn }) {
235
- const Component = _react.forwardRef.call(void 0, function CarouselControl({ children, asChild = false, style, onPressIn, onPressOut, ...props }, ref) {
236
- const {
237
- controlStyle,
238
- controlInactiveStyle,
239
- chevronStyle,
240
- controlBox,
241
- trackHeight,
242
- index,
243
- count,
244
- hasLoop,
245
- isDisabled,
246
- moveBy,
247
- onInteract
248
- } = useCarousel();
249
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
250
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
251
- if (!asChild && !rest.accessibilityLabel && !rest["aria-label"]) {
252
- _chunkEJQCQPETcjs.warnDev.call(void 0,
253
- `${displayName}: a carousel arrow needs an \`accessibilityLabel\` \u2014 a chevron is not text, and there is nothing beside it that names the action.`
254
- );
255
- }
256
- const atEnd = delta > 0 ? index >= count - 1 : index <= 0;
257
- const isInactive = isDisabled || !hasLoop && atEnd;
258
- const place = {
259
- // Half a button above the track's middle. Zero until the track has been measured,
260
- // which puts the arrow at the top for one frame and nowhere wrong after it.
261
- top: Math.max(0, (trackHeight - controlBox.size) / 2),
262
- [edge]: controlBox.inset
263
- };
264
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
265
- _chunkOW4N2C3Mcjs.PressableFeedback,
266
- {
267
- ref,
268
- isPressed,
269
- asChild,
270
- accessibilityRole: "button",
271
- accessibilityState: { disabled: isInactive },
272
- isDisabled: isInactive,
273
- ...rest,
274
- style: [
275
- controlStyle,
276
- isInactive ? controlInactiveStyle : null,
277
- place,
278
- styleProps,
279
- typeof style === "function" ? style({ pressed: isPressed }) : style
280
- ],
281
- onPress: () => {
282
- onInteract();
283
- moveBy(delta);
284
- },
285
- onPressIn: press.onPressIn,
286
- onPressOut: press.onPressOut,
287
- children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [chevronStyle, carouselSheet[turn]] })))
288
- }
289
- );
290
- });
291
- Component.displayName = displayName;
292
- return Component;
293
- }
294
- var CarouselPrevious = control({
295
- delta: -1,
296
- displayName: "XAUI.Carousel.Previous",
297
- edge: "start",
298
- turn: "chevronBack"
299
- });
300
- var CarouselNext = control({
301
- delta: 1,
302
- displayName: "XAUI.Carousel.Next",
303
- edge: "end",
304
- turn: "chevronForward"
305
- });
306
-
307
- // src/components/carousel/carousel.tsx
308
-
309
-
310
-
311
-
312
- // src/components/carousel/carousel.recipe.ts
313
- var SLOTS = [
314
- "root",
315
- "content",
316
- "item",
317
- "control",
318
- "controlInactive",
319
- "chevron",
320
- "indicator",
321
- "dot",
322
- "dotActive",
323
- "counter",
324
- "thumbnails",
325
- "thumbnail",
326
- "thumbnailActive"
327
- ];
328
- var VARIANT_TOKENS = {
329
- // The arrows sit **on** the slide, so their ground is the raised one rather than the
330
- // page's: a control the same colour as the page vanishes over a pale photograph.
331
- primary: {
332
- bg: "surface",
333
- fg: "foreground",
334
- bgSelected: "accent",
335
- fgSelected: "foreground"
336
- },
337
- secondary: {
338
- bg: "default",
339
- fg: "defaultForeground",
340
- bgSelected: "defaultForeground",
341
- fgSelected: "defaultForeground"
342
- },
343
- tertiary: {
344
- bg: "surface",
345
- fg: "foreground",
346
- border: "border",
347
- bgSelected: "foreground",
348
- fgSelected: "foreground"
349
- },
350
- // No ground at all: the chevron is drawn straight on the slide, which is what a carousel
351
- // over a dark photograph wants and what a carousel over a white one must not use.
352
- ghost: { fg: "foreground", bgSelected: "accent", fgSelected: "foreground" }
353
- };
354
- var SIZES = {
355
- xs: {
356
- control: 24,
357
- chevron: 6,
358
- stroke: 1.5,
359
- dot: 5,
360
- pill: 14,
361
- gap: 1.5,
362
- thumbnail: 40,
363
- counter: "xs"
364
- },
365
- sm: {
366
- control: 30,
367
- chevron: 7,
368
- stroke: 1.5,
369
- dot: 6,
370
- pill: 18,
371
- gap: 2,
372
- thumbnail: 48,
373
- counter: "xs"
374
- },
375
- md: {
376
- control: 36,
377
- chevron: 8,
378
- stroke: 2,
379
- dot: 7,
380
- pill: 22,
381
- gap: 2.5,
382
- thumbnail: 60,
383
- counter: "sm"
384
- },
385
- lg: {
386
- control: 44,
387
- chevron: 10,
388
- stroke: 2,
389
- dot: 8,
390
- pill: 26,
391
- gap: 3,
392
- thumbnail: 72,
393
- counter: "md"
394
- }
395
- };
396
- function carouselGap(theme, size) {
397
- return theme.spacing(SIZES[size].gap);
398
- }
399
- function carouselControlBox(theme, size) {
400
- return { size: SIZES[size].control, inset: theme.spacing(2) };
401
- }
402
- function sizeAxis(step) {
403
- const { control: control2, chevron, stroke, dot, pill, gap, thumbnail, counter } = step;
404
- return (theme) => ({
405
- control: { width: control2, height: control2, borderRadius: control2 / 2 },
406
- chevron: { width: chevron, height: chevron, borderWidth: stroke },
407
- indicator: { gap: theme.spacing(gap) * 0.5, height: dot },
408
- dot: { width: dot, height: dot, borderRadius: dot / 2 },
409
- /**
410
- * The chosen dot, **read as values and never applied as a style**: the width and the
411
- * colour are interpolated on the UI thread, and a worklet cannot read a `StyleSheet`
412
- * id. The root flattens this slot into `dotInk`, so the recipe still owns both numbers.
413
- *
414
- * A pill, not a wider dot: the corner stays the dot's own, so the shape grows sideways
415
- * out of the circle it was rather than turning into a different one.
416
- */
417
- dotActive: { width: pill, height: dot, borderRadius: dot / 2 },
418
- thumbnails: { gap: theme.spacing(gap) * 0.75 },
419
- thumbnail: { width: thumbnail, height: thumbnail },
420
- thumbnailActive: { width: thumbnail, height: thumbnail },
421
- counter: {
422
- fontSize: theme.fontSizes[counter],
423
- lineHeight: theme.lineHeights[counter]
424
- }
425
- });
426
- }
427
- var carouselRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
428
- slots: SLOTS,
429
- base: (theme) => ({
430
- root: { flexDirection: "column", gap: theme.spacing(2), position: "relative" },
431
- content: { flexGrow: 0 },
432
- item: {
433
- borderCurve: "continuous",
434
- overflow: "hidden",
435
- // A slide is exactly as wide as `carouselMetrics` said and never less. In a row it
436
- // is a flex item, and a flex item with a width still *shrinks* to fit its container
437
- // — so five slides in a track one slide wide would each squeeze down to a fifth, the
438
- // content would stop overflowing, and a carousel with nowhere to scroll to would sit
439
- // there showing all five at once and ignoring its own arrows.
440
- flexShrink: 0
441
- },
442
- /**
443
- * An arrow at the end of a series that does not loop. It stays in place and stays
444
- * legible — a control that disappears at the last slide takes its width with it and
445
- * shifts everything beside it.
446
- *
447
- * A slot rather than a state, because the engine's states are a fixed set and this is
448
- * not one of them: the carousel is not disabled, one of its two arrows is.
449
- */
450
- controlInactive: { opacity: theme.opacity.disabled },
451
- control: {
452
- // Over the slides rather than beside them: an arrow in the flow would move the track
453
- // it belongs to, and the two would disagree about where the middle is.
454
- position: "absolute",
455
- alignItems: "center",
456
- justifyContent: "center",
457
- borderCurve: "continuous",
458
- ...theme.shadows.surface
459
- },
460
- // The box and the stroke only. Which two of the four edges are actually drawn is
461
- // `carousel.style.ts`'s — it is geometry, and it differs between the two arrows.
462
- chevron: {},
463
- indicator: {
464
- flexDirection: "row",
465
- alignItems: "center",
466
- justifyContent: "center"
467
- },
468
- // A neutral fill rather than a faint version of the active one: the dots sit under
469
- // the slides, on the page, and a pale tint of the accent there reads as a control that
470
- // has half failed to load. `color` reaches the pill, which is the thing it should move.
471
- dot: { backgroundColor: theme.colors.default },
472
- counter: {
473
- fontFamily: theme.fontFamilies.body,
474
- color: theme.colors.muted
475
- },
476
- thumbnails: { flexGrow: 0, flexDirection: "row" },
477
- thumbnail: {
478
- borderCurve: "continuous",
479
- overflow: "hidden",
480
- // The strip is a row too, and the same squeeze applies to it.
481
- flexShrink: 0,
482
- // The ring is always there and only its colour moves, so choosing a thumbnail does
483
- // not resize it — a border that appears on selection nudges every thumbnail after it.
484
- borderWidth: theme.borderWidth.field,
485
- borderColor: "transparent"
486
- },
487
- thumbnailActive: {
488
- borderCurve: "continuous",
489
- overflow: "hidden",
490
- flexShrink: 0,
491
- borderWidth: theme.borderWidth.field
492
- }
493
- }),
494
- variantTokens: VARIANT_TOKENS,
495
- paint: (theme, colors) => ({
496
- control: {
497
- backgroundColor: colors.bg,
498
- borderColor: colors.border,
499
- borderWidth: colors.border ? theme.borderWidth.default : 0
500
- },
501
- chevron: { borderColor: colors.fg },
502
- dotActive: { backgroundColor: colors.bgSelected },
503
- thumbnailActive: { borderColor: colors.bgSelected }
504
- }),
505
- variants: {
506
- size: {
507
- xs: sizeAxis(SIZES.xs),
508
- sm: sizeAxis(SIZES.sm),
509
- md: sizeAxis(SIZES.md),
510
- lg: sizeAxis(SIZES.lg)
511
- },
512
- /** The slides' corner, and the thumbnails'. The arrows stay round. */
513
- radius: _chunkSL3V7R2Ycjs.radiusAxis.call(void 0, "item", "thumbnail", "thumbnailActive")
514
- },
515
- states: {
516
- disabled: (theme) => ({ root: { opacity: theme.opacity.disabled } })
517
- },
518
- defaultVariants: { variant: "primary", size: "md", radius: "2xl" }
519
- });
520
-
521
- // src/components/carousel/carousel.tsx
522
-
523
- function setTrackOffset(track, x) {
524
- _optionalChain([track, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.scrollTo, 'call', _5 => _5({ x, y: 0, animated: false })]);
525
- }
526
- var GLIDE_MS = 420;
527
- var GLIDE_FRAME_MS = 16;
528
- function easeOutCubic(t) {
529
- return 1 - (1 - t) ** 3;
530
- }
531
- var CarouselRoot = _react.forwardRef.call(void 0, function Carousel({
532
- children,
533
- variant,
534
- size = "md",
535
- color,
536
- radius,
537
- index: indexProp,
538
- defaultIndex = 0,
539
- onIndexChange,
540
- itemsPerView = 1,
541
- peek = 0,
542
- gap,
543
- hasLoop = false,
544
- autoPlayInterval,
545
- isDisabled = false,
546
- asChild = false,
547
- style,
548
- onLayout,
549
- ...props
550
- }, ref) {
551
- const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0, );
552
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
553
- const [index, setIndex] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
554
- value: indexProp,
555
- defaultValue: defaultIndex,
556
- onChange: onIndexChange
557
- });
558
- const [width, setWidth] = _react.useState.call(void 0, 0);
559
- const [trackHeight, setTrackHeight] = _react.useState.call(void 0, 0);
560
- const [count, setCount] = _react.useState.call(void 0, 0);
561
- const hasInteracted = _react.useRef.call(void 0, false);
562
- const trackRef = _reactnativereanimated.useAnimatedRef.call(void 0, );
563
- const offset = _reactnativereanimated.useSharedValue.call(void 0, 0);
564
- const glideTimer = _react.useRef.call(void 0, null);
565
- const selection = { variant, size, radius };
566
- const styles = carouselRecipe.resolve({
567
- theme,
568
- selection,
569
- states: { disabled: isDisabled }
570
- });
571
- const tint = color ? carouselRecipe.tint({ theme, color, selection }) : void 0;
572
- const dotInk = _react.useMemo.call(void 0, () => {
573
- const at = _reactnative.StyleSheet.flatten([styles.dot]);
574
- const on = _reactnative.StyleSheet.flatten([styles.dotActive, _optionalChain([tint, 'optionalAccess', _6 => _6.dotActive])]);
575
- return {
576
- rest: typeof at.backgroundColor === "string" ? at.backgroundColor : theme.colors.default,
577
- active: typeof on.backgroundColor === "string" ? on.backgroundColor : theme.colors.accent,
578
- width: typeof at.width === "number" ? at.width : 0,
579
- pill: typeof on.width === "number" ? on.width : 0
580
- };
581
- }, [styles, tint, theme]);
582
- const resolvedGap = _nullishCoalesce(gap, () => ( carouselGap(theme, size)));
583
- const controlBox = _react.useMemo.call(void 0, () => carouselControlBox(theme, size), [theme, size]);
584
- const metrics = _react.useMemo.call(void 0,
585
- () => _chunkFTPPUTWLcjs.carouselMetrics.call(void 0, { width, itemsPerView, gap: resolvedGap, peek }),
586
- [width, itemsPerView, resolvedGap, peek]
587
- );
588
- const handleLayout = (event) => {
589
- _optionalChain([onLayout, 'optionalCall', _7 => _7(event)]);
590
- setWidth(event.nativeEvent.layout.width);
591
- };
592
- const stopGlide = _react.useCallback.call(void 0, () => {
593
- if (glideTimer.current !== null) {
594
- clearInterval(glideTimer.current);
595
- glideTimer.current = null;
596
- }
597
- }, []);
598
- const glideTo = _react.useCallback.call(void 0,
599
- (x) => {
600
- stopGlide();
601
- const from = offset.get();
602
- const distance = x - from;
603
- if (Math.abs(distance) < 1) {
604
- setTrackOffset(trackRef, x);
605
- return;
606
- }
607
- const start = Date.now();
608
- glideTimer.current = setInterval(() => {
609
- const t = Math.min(1, (Date.now() - start) / GLIDE_MS);
610
- setTrackOffset(trackRef, from + distance * easeOutCubic(t));
611
- if (t >= 1) stopGlide();
612
- }, GLIDE_FRAME_MS);
613
- },
614
- [offset, stopGlide, trackRef]
615
- );
616
- const goTo = _react.useCallback.call(void 0,
617
- (next) => {
618
- glideTo(next * metrics.step);
619
- setIndex(next);
620
- },
621
- [glideTo, metrics.step, setIndex]
622
- );
623
- const moveBy = _react.useCallback.call(void 0,
624
- (delta) => goTo(_chunkFTPPUTWLcjs.stepIndex.call(void 0, index, delta, count, hasLoop)),
625
- [count, goTo, hasLoop, index]
626
- );
627
- const onInteract = _react.useCallback.call(void 0, () => {
628
- hasInteracted.current = true;
629
- stopGlide();
630
- }, [stopGlide]);
631
- _react.useEffect.call(void 0, () => stopGlide, [stopGlide]);
632
- _react.useEffect.call(void 0, () => {
633
- if (!autoPlayInterval || isDisabled || count < 2) return;
634
- const timer = setInterval(() => {
635
- if (hasInteracted.current) {
636
- clearInterval(timer);
637
- return;
638
- }
639
- setIndex((current) => {
640
- const next = _chunkFTPPUTWLcjs.stepIndex.call(void 0, current, 1, count, true);
641
- glideTo(next * metrics.step);
642
- return next;
643
- });
644
- }, autoPlayInterval);
645
- return () => clearInterval(timer);
646
- }, [autoPlayInterval, count, isDisabled, glideTo, metrics.step, setIndex]);
647
- const context = _react.useMemo.call(void 0,
648
- () => ({
649
- contentStyle: styles.content,
650
- itemStyle: styles.item,
651
- controlStyle: [styles.control, _optionalChain([tint, 'optionalAccess', _8 => _8.control])],
652
- controlInactiveStyle: [styles.control, _optionalChain([tint, 'optionalAccess', _9 => _9.control]), styles.controlInactive],
653
- chevronStyle: [styles.chevron, _optionalChain([tint, 'optionalAccess', _10 => _10.chevron])],
654
- indicatorStyle: styles.indicator,
655
- dotStyle: styles.dot,
656
- dotInk,
657
- counterStyle: styles.counter,
658
- thumbnailsStyle: styles.thumbnails,
659
- thumbnailStyle: styles.thumbnail,
660
- thumbnailActiveStyle: [styles.thumbnailActive, _optionalChain([tint, 'optionalAccess', _11 => _11.thumbnailActive])],
661
- index,
662
- count,
663
- setCount,
664
- metrics,
665
- width,
666
- trackHeight,
667
- setTrackHeight,
668
- controlBox,
669
- hasLoop,
670
- isDisabled,
671
- offset,
672
- trackRef,
673
- goTo,
674
- moveBy,
675
- onInteract,
676
- onSettle: setIndex
677
- }),
678
- [
679
- styles,
680
- tint,
681
- dotInk,
682
- index,
683
- count,
684
- metrics,
685
- width,
686
- trackHeight,
687
- setTrackHeight,
688
- controlBox,
689
- hasLoop,
690
- isDisabled,
691
- offset,
692
- goTo,
693
- moveBy,
694
- onInteract,
695
- setIndex
696
- ]
697
- );
698
- const rootStyle = [styles.root, styleProps, style];
699
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CarouselProvider, { value: context, children: asChild ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCDRGTUYFcjs.Slot, { ref, ...rest, onLayout: handleLayout, style: rootStyle, children }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, onLayout: handleLayout, style: rootStyle, children }) });
700
- });
701
- CarouselRoot.displayName = "XAUI.Carousel.Root";
702
-
703
- // src/components/carousel/carousel-thumbnails.tsx
704
-
705
-
706
-
707
- var CarouselThumbnails = _react.forwardRef.call(void 0,
708
- function CarouselThumbnails2({ children, style, ...props }, ref) {
709
- const { thumbnailsStyle } = useCarousel();
710
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
711
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
712
- _reactnative.ScrollView,
713
- {
714
- ref,
715
- horizontal: true,
716
- showsHorizontalScrollIndicator: false,
717
- ...rest,
718
- style: [thumbnailsStyle, styleProps, style],
719
- contentContainerStyle: CONTENT,
720
- children
721
- }
722
- );
723
- }
724
- );
725
- CarouselThumbnails.displayName = "XAUI.Carousel.Thumbnails";
726
- var CONTENT = { flexDirection: "row", gap: 8 };
727
- var CarouselThumbnail = _react.forwardRef.call(void 0,
728
- function CarouselThumbnail2({ index, children, style, ...props }, ref) {
729
- const {
730
- thumbnailStyle,
731
- thumbnailActiveStyle,
732
- index: current,
733
- count,
734
- isDisabled,
735
- goTo,
736
- onInteract
737
- } = useCarousel();
738
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
739
- const isActive = index === current;
740
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
741
- _reactnative.Pressable,
742
- {
743
- ref,
744
- accessibilityRole: "button",
745
- accessibilityState: { selected: isActive, disabled: isDisabled },
746
- accessibilityValue: { now: index + 1, min: 1, max: count },
747
- disabled: isDisabled,
748
- ...rest,
749
- style: [isActive ? thumbnailActiveStyle : thumbnailStyle, styleProps, style],
750
- onPress: () => {
751
- onInteract();
752
- goTo(index);
753
- },
754
- children
755
- }
756
- );
757
- }
758
- );
759
- CarouselThumbnail.displayName = "XAUI.Carousel.Thumbnail";
760
-
761
- // src/components/carousel/index.ts
762
- var Carousel2 = Object.assign(CarouselRoot, {
763
- Content: CarouselContent,
764
- Item: CarouselItem,
765
- Previous: CarouselPrevious,
766
- Next: CarouselNext,
767
- Indicator: CarouselIndicator,
768
- Dot: CarouselDot,
769
- Counter: CarouselCounter,
770
- Thumbnails: CarouselThumbnails,
771
- Thumbnail: CarouselThumbnail
772
- });
773
-
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
-
783
-
784
-
785
-
786
-
787
-
788
- exports.useCarousel = useCarousel; exports.CarouselContent = CarouselContent; exports.CarouselCounter = CarouselCounter; exports.CarouselIndicator = CarouselIndicator; exports.CarouselDot = CarouselDot; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.carouselRecipe = carouselRecipe; exports.CarouselRoot = CarouselRoot; exports.CarouselThumbnails = CarouselThumbnails; exports.CarouselThumbnail = CarouselThumbnail; exports.Carousel = Carousel2;