@xaui/native 0.9.1-alpha.93 → 0.9.1-alpha.94

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 (238) hide show
  1. package/dist/{chunk-PAQZOD2L.js → chunk-2JFMCW5E.js} +1 -1
  2. package/dist/chunk-2TLPFGGR.cjs +251 -0
  3. package/dist/{chunk-TPYOQSKT.js → chunk-2UNLQRXY.js} +1 -1
  4. package/dist/{chunk-JKDWYNSG.js → chunk-2XEQDQAN.js} +109 -107
  5. package/dist/{chunk-RXEUKYM5.js → chunk-33BA4LVN.js} +1 -1
  6. package/dist/{chunk-ODQHAPQW.js → chunk-4AIIAF6U.js} +24 -22
  7. package/dist/{chunk-QCH7X7O2.cjs → chunk-4LRVB6WR.cjs} +14 -14
  8. package/dist/{chunk-QUSQEYLP.cjs → chunk-53E2E7GS.cjs} +26 -28
  9. package/dist/{chunk-2B6PUYTP.cjs → chunk-55KGHYYU.cjs} +4 -4
  10. package/dist/{chunk-B33OU34Z.cjs → chunk-5O7E73QP.cjs} +12 -12
  11. package/dist/{chunk-FVEMTBU4.js → chunk-5XTF2JDK.js} +2 -2
  12. package/dist/{chunk-V2CEKPJ6.js → chunk-6MVKLRLZ.js} +1 -1
  13. package/dist/{chunk-RSIWSVXI.js → chunk-6NAZ2IHL.js} +1 -1
  14. package/dist/{chunk-LPJ3UBSO.cjs → chunk-6NRWZR7T.cjs} +2 -2
  15. package/dist/{chunk-FXN32S75.cjs → chunk-6SRFQSPR.cjs} +3 -3
  16. package/dist/{chunk-7EVW6O2Q.js → chunk-6W45YHTF.js} +1 -1
  17. package/dist/{chunk-7NQL5DXY.js → chunk-6XY3XAEQ.js} +1 -1
  18. package/dist/{chunk-UEW3GAP5.cjs → chunk-6ZWQDTGQ.cjs} +5 -5
  19. package/dist/{chunk-VMPCXS4S.js → chunk-7OVYYZ7H.js} +22 -20
  20. package/dist/{chunk-CYOUOQXT.cjs → chunk-AHJLQJOE.cjs} +5 -5
  21. package/dist/{chunk-OPLPLFGK.cjs → chunk-AHKKEM3K.cjs} +66 -23
  22. package/dist/{chunk-WIX4SYZI.cjs → chunk-AIHKBSQ5.cjs} +2 -2
  23. package/dist/{chunk-WRZV6ORJ.js → chunk-AYOJXFHR.js} +1 -1
  24. package/dist/{chunk-OD6H7ANY.js → chunk-B5DBFS6M.js} +1 -1
  25. package/dist/{chunk-VQGNLX5C.js → chunk-BYDGJU5A.js} +1 -1
  26. package/dist/{chunk-NVODH2PR.js → chunk-CCTAJXZ3.js} +63 -61
  27. package/dist/{chunk-ORXVXYKC.cjs → chunk-CHGBWFDI.cjs} +63 -26
  28. package/dist/{chunk-WLJPO3AS.cjs → chunk-CZ2NUGUI.cjs} +357 -201
  29. package/dist/{chunk-PYQ2P3M5.cjs → chunk-CZEWWCWG.cjs} +58 -58
  30. package/dist/{chunk-PDSR42YC.cjs → chunk-D22K3NZU.cjs} +3 -3
  31. package/dist/{chunk-TRWZEOCO.js → chunk-DBP5CA5R.js} +2 -2
  32. package/dist/{chunk-QN2D5ZCS.cjs → chunk-DE4RSR7Q.cjs} +3 -3
  33. package/dist/{chunk-FOOXBVOQ.js → chunk-E5E2QA4K.js} +22 -20
  34. package/dist/{chunk-LECYGVIH.js → chunk-EQUD3NHO.js} +50 -48
  35. package/dist/chunk-ERIGD4SE.cjs +686 -0
  36. package/dist/{chunk-62AYYMZP.cjs → chunk-FDYPWVNP.cjs} +3 -3
  37. package/dist/chunk-GN7BWYXP.cjs +627 -0
  38. package/dist/chunk-GWTURY4S.cjs +999 -0
  39. package/dist/{chunk-OW4N2C3M.cjs → chunk-HBYT7B47.cjs} +88 -61
  40. package/dist/{chunk-XWIPLZTD.cjs → chunk-HOV25N3M.cjs} +2 -2
  41. package/dist/{chunk-5MMBEDZG.cjs → chunk-I3XIZWCV.cjs} +29 -29
  42. package/dist/{chunk-EDNCHCIN.cjs → chunk-IAJG7GYE.cjs} +2 -2
  43. package/dist/{chunk-P7OHZCU3.js → chunk-IAWLQN2W.js} +2 -2
  44. package/dist/{chunk-RCSEVEIR.js → chunk-ICVIWXK4.js} +1 -1
  45. package/dist/{chunk-RREJUSAS.cjs → chunk-IMIY34F4.cjs} +3 -3
  46. package/dist/{chunk-ZWS3FQ3J.js → chunk-IUDQG3JI.js} +57 -57
  47. package/dist/{chunk-O6B72H4B.js → chunk-K7VDLVLE.js} +6 -8
  48. package/dist/{chunk-P2CJNTAP.js → chunk-KFB24VYT.js} +22 -20
  49. package/dist/chunk-KHPODIQV.cjs +540 -0
  50. package/dist/{chunk-CBRW53GN.cjs → chunk-KMK6FUTK.cjs} +39 -23
  51. package/dist/{chunk-2AFA5HA2.js → chunk-KQW25RCC.js} +77 -75
  52. package/dist/{chunk-X4CZYJZ6.cjs → chunk-LCGJA37L.cjs} +12 -12
  53. package/dist/{chunk-SUJLTC2K.js → chunk-LPGY2IDX.js} +1 -1
  54. package/dist/{chunk-P5M5URAB.js → chunk-LSZW4G7B.js} +31 -31
  55. package/dist/{chunk-GYEQEF5H.js → chunk-LUPU7FJK.js} +1 -1
  56. package/dist/chunk-MNBEUNC5.cjs +792 -0
  57. package/dist/{chunk-AIND5F7P.js → chunk-MTQGFUW5.js} +29 -29
  58. package/dist/chunk-NGXLJ5ZF.cjs +395 -0
  59. package/dist/{chunk-DYQB54JA.cjs → chunk-NPAGA6SH.cjs} +2 -2
  60. package/dist/{chunk-QELEKXN3.cjs → chunk-OMI2FRCU.cjs} +5 -5
  61. package/dist/{chunk-EBCAPIBD.js → chunk-OX23MW5E.js} +70 -50
  62. package/dist/{chunk-MMFIMQMQ.js → chunk-OZLOYXLW.js} +2 -2
  63. package/dist/{chunk-JBZ7SBRV.cjs → chunk-Q3ZKZ2Y6.cjs} +3 -3
  64. package/dist/{chunk-TCWW7JI2.js → chunk-QT7KLGO3.js} +65 -63
  65. package/dist/{chunk-6RU6GUJP.js → chunk-QZF7RSVV.js} +1 -1
  66. package/dist/{chunk-UYQLW7OD.js → chunk-RAYO2TJL.js} +2 -2
  67. package/dist/{chunk-FRLWG5LM.js → chunk-RFT5MGJC.js} +25 -25
  68. package/dist/chunk-SIOSYITD.cjs +1039 -0
  69. package/dist/{chunk-USIWPESU.js → chunk-SIX5AVXG.js} +1 -1
  70. package/dist/{chunk-52XUGOLD.js → chunk-SX5U5UJQ.js} +3 -3
  71. package/dist/{chunk-GGP2ERSV.js → chunk-T5ES7FOL.js} +1 -1
  72. package/dist/{chunk-MSORLKO7.cjs → chunk-V3C3ATRO.cjs} +2 -2
  73. package/dist/{chunk-BI5ME4QP.cjs → chunk-VBS6VWW4.cjs} +5 -5
  74. package/dist/{chunk-2SHWOFQV.js → chunk-VQ4OTVET.js} +29 -29
  75. package/dist/{chunk-6GQ7UTJ7.cjs → chunk-VXAIFOXL.cjs} +2 -2
  76. package/dist/{chunk-BJVO7DWJ.js → chunk-W4F4NQXM.js} +1 -1
  77. package/dist/{chunk-ZE4IHUUO.cjs → chunk-WNEDQTH6.cjs} +2 -2
  78. package/dist/{chunk-CBXILKQZ.cjs → chunk-WPYJW3WM.cjs} +3 -3
  79. package/dist/{chunk-QHXTO525.js → chunk-WYJHDTU7.js} +1 -1
  80. package/dist/{chunk-PROLOLZ5.cjs → chunk-X22PLAP6.cjs} +2 -2
  81. package/dist/chunk-X6GT4H4I.cjs +662 -0
  82. package/dist/{chunk-RLC3EXMV.js → chunk-XM4IN4Q6.js} +2 -2
  83. package/dist/{chunk-ZKGVOXLQ.js → chunk-XOZMGNVS.js} +1 -1
  84. package/dist/chunk-XXXR2AD3.cjs +94 -0
  85. package/dist/{chunk-JC4YCKKL.js → chunk-YI5D4QZP.js} +22 -20
  86. package/dist/{chunk-AR7667VN.cjs → chunk-YJA7OQQZ.cjs} +4 -4
  87. package/dist/{chunk-PAQD6UUF.cjs → chunk-YJIVPYMG.cjs} +3 -3
  88. package/dist/{chunk-JJYHW4PV.js → chunk-YOPWQHNO.js} +1 -1
  89. package/dist/{chunk-LKRQUQZQ.cjs → chunk-YRANVNJG.cjs} +2 -2
  90. package/dist/chunk-ZDJQ643D.js +62 -0
  91. package/dist/components/accordion/index.cjs +3 -3
  92. package/dist/components/accordion/index.js +2 -2
  93. package/dist/components/agenda-calendar/index.cjs +4 -4
  94. package/dist/components/agenda-calendar/index.js +3 -3
  95. package/dist/components/alert/index.cjs +4 -4
  96. package/dist/components/alert/index.js +3 -3
  97. package/dist/components/autocomplete/index.cjs +3 -3
  98. package/dist/components/autocomplete/index.js +2 -2
  99. package/dist/components/bottom-sheet/index.cjs +3 -3
  100. package/dist/components/bottom-sheet/index.js +2 -2
  101. package/dist/components/button/index.cjs +3 -3
  102. package/dist/components/button/index.js +2 -2
  103. package/dist/components/calendar/index.cjs +3 -3
  104. package/dist/components/calendar/index.js +2 -2
  105. package/dist/components/card/index.cjs +3 -3
  106. package/dist/components/card/index.js +2 -2
  107. package/dist/components/carousel/index.cjs +3 -3
  108. package/dist/components/carousel/index.js +2 -2
  109. package/dist/components/checkbox/index.cjs +3 -3
  110. package/dist/components/checkbox/index.js +2 -2
  111. package/dist/components/chip/index.cjs +4 -4
  112. package/dist/components/chip/index.js +3 -3
  113. package/dist/components/close-button/index.cjs +4 -4
  114. package/dist/components/close-button/index.js +3 -3
  115. package/dist/components/color-picker/index.cjs +6 -6
  116. package/dist/components/color-picker/index.js +5 -5
  117. package/dist/components/combobox/index.cjs +4 -4
  118. package/dist/components/combobox/index.js +3 -3
  119. package/dist/components/date-picker/index.cjs +4 -4
  120. package/dist/components/date-picker/index.js +3 -3
  121. package/dist/components/date-range-picker/index.cjs +6 -6
  122. package/dist/components/date-range-picker/index.js +5 -5
  123. package/dist/components/date-time-picker/date-time-picker-indicator.d.cts +2 -2
  124. package/dist/components/date-time-picker/date-time-picker-indicator.d.ts +2 -2
  125. package/dist/components/date-time-picker/date-time-picker.type.d.cts +3 -2
  126. package/dist/components/date-time-picker/date-time-picker.type.d.ts +3 -2
  127. package/dist/components/date-time-picker/index.cjs +8 -9
  128. package/dist/components/date-time-picker/index.d.cts +1 -1
  129. package/dist/components/date-time-picker/index.d.ts +1 -1
  130. package/dist/components/date-time-picker/index.js +7 -8
  131. package/dist/components/dialog/index.cjs +4 -4
  132. package/dist/components/dialog/index.js +3 -3
  133. package/dist/components/dummy-field/index.cjs +3 -3
  134. package/dist/components/dummy-field/index.js +2 -2
  135. package/dist/components/fab/index.cjs +3 -3
  136. package/dist/components/fab/index.js +2 -2
  137. package/dist/components/flip-card/index.cjs +3 -3
  138. package/dist/components/flip-card/index.js +2 -2
  139. package/dist/components/index.d.cts +0 -1
  140. package/dist/components/index.d.ts +0 -1
  141. package/dist/components/list-box/index.cjs +2 -2
  142. package/dist/components/list-box/index.js +1 -1
  143. package/dist/components/menu/index.cjs +3 -3
  144. package/dist/components/menu/index.js +2 -2
  145. package/dist/components/morph-button/index.cjs +3 -3
  146. package/dist/components/morph-button/index.js +2 -2
  147. package/dist/components/number-field/number-field-increment.d.cts +2 -2
  148. package/dist/components/number-field/number-field-increment.d.ts +2 -2
  149. package/dist/components/number-pad/index.cjs +3 -3
  150. package/dist/components/number-pad/index.js +2 -2
  151. package/dist/components/number-stepper/index.cjs +3 -3
  152. package/dist/components/number-stepper/index.js +2 -2
  153. package/dist/components/pager/index.cjs +2 -2
  154. package/dist/components/pager/index.js +1 -1
  155. package/dist/components/phone-number-field/index.cjs +14 -14
  156. package/dist/components/phone-number-field/index.js +3 -3
  157. package/dist/components/popover/index.cjs +3 -3
  158. package/dist/components/popover/index.js +2 -2
  159. package/dist/components/radio/index.cjs +3 -3
  160. package/dist/components/radio/index.js +2 -2
  161. package/dist/components/range-calendar/index.cjs +4 -4
  162. package/dist/components/range-calendar/index.js +3 -3
  163. package/dist/components/rating/index.cjs +3 -3
  164. package/dist/components/rating/index.js +2 -2
  165. package/dist/components/search-field/index.cjs +4 -4
  166. package/dist/components/search-field/index.js +3 -3
  167. package/dist/components/segment/index.cjs +4 -4
  168. package/dist/components/segment/index.js +2 -2
  169. package/dist/components/select/index.cjs +3 -3
  170. package/dist/components/select/index.js +2 -2
  171. package/dist/components/slider/index.cjs +2 -2
  172. package/dist/components/slider/index.js +1 -1
  173. package/dist/components/snackbar/index.cjs +3 -3
  174. package/dist/components/snackbar/index.js +2 -2
  175. package/dist/components/switch/index.cjs +3 -3
  176. package/dist/components/switch/index.js +2 -2
  177. package/dist/components/table/index.cjs +4 -4
  178. package/dist/components/table/index.js +3 -3
  179. package/dist/components/tabs/index.cjs +4 -4
  180. package/dist/components/tabs/index.js +3 -3
  181. package/dist/components/tag-group/index.cjs +4 -4
  182. package/dist/components/tag-group/index.js +3 -3
  183. package/dist/components/time-picker/index.cjs +4 -5
  184. package/dist/components/time-picker/index.d.cts +1 -1
  185. package/dist/components/time-picker/index.d.ts +1 -1
  186. package/dist/components/time-picker/index.js +3 -4
  187. package/dist/components/time-picker/time-picker-display.d.cts +3 -3
  188. package/dist/components/time-picker/time-picker-display.d.ts +3 -3
  189. package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
  190. package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
  191. package/dist/components/time-picker/time-picker.d.cts +1 -1
  192. package/dist/components/time-picker/time-picker.d.ts +1 -1
  193. package/dist/components/time-picker/time-picker.type.d.cts +11 -1
  194. package/dist/components/time-picker/time-picker.type.d.ts +11 -1
  195. package/dist/components/toast/index.cjs +3 -3
  196. package/dist/components/toast/index.js +2 -2
  197. package/dist/components/toggle-button/index.cjs +3 -3
  198. package/dist/components/toggle-button/index.js +2 -2
  199. package/dist/components/wheel-picker/index.cjs +2 -2
  200. package/dist/components/wheel-picker/index.js +1 -1
  201. package/dist/index.cjs +47 -60
  202. package/dist/index.js +50 -63
  203. package/dist/system/index.cjs +3 -3
  204. package/dist/system/index.js +2 -2
  205. package/dist/utils/time.d.cts +29 -0
  206. package/dist/utils/time.d.ts +29 -0
  207. package/package.json +1 -11
  208. package/dist/chunk-3MRCSXGT.js +0 -73
  209. package/dist/chunk-5E6SHYEQ.cjs +0 -631
  210. package/dist/chunk-6JAGPPZU.cjs +0 -788
  211. package/dist/chunk-CEPX7CKM.cjs +0 -365
  212. package/dist/chunk-CHFPFYNV.js +0 -60
  213. package/dist/chunk-ECR6GPJ6.js +0 -198
  214. package/dist/chunk-GBTNFQXN.cjs +0 -33
  215. package/dist/chunk-GZAGWNQM.cjs +0 -719
  216. package/dist/chunk-ILXKBDC6.cjs +0 -209
  217. package/dist/chunk-IPD3IUE2.cjs +0 -640
  218. package/dist/chunk-P2V6PIM7.cjs +0 -478
  219. package/dist/chunk-Q2BWXT55.cjs +0 -1011
  220. package/dist/chunk-UFKSUELU.cjs +0 -453
  221. package/dist/chunk-W4IPOWLY.cjs +0 -198
  222. package/dist/chunk-YSTLHVQV.cjs +0 -73
  223. package/dist/components/time-field/index.cjs +0 -27
  224. package/dist/components/time-field/index.d.cts +0 -52
  225. package/dist/components/time-field/index.d.ts +0 -52
  226. package/dist/components/time-field/index.js +0 -27
  227. package/dist/components/time-field/time-field-field.d.cts +0 -11
  228. package/dist/components/time-field/time-field-field.d.ts +0 -11
  229. package/dist/components/time-field/time-field-period.d.cts +0 -34
  230. package/dist/components/time-field/time-field-period.d.ts +0 -34
  231. package/dist/components/time-field/time-field.context.d.cts +0 -9
  232. package/dist/components/time-field/time-field.context.d.ts +0 -9
  233. package/dist/components/time-field/time-field.d.cts +0 -56
  234. package/dist/components/time-field/time-field.d.ts +0 -56
  235. package/dist/components/time-field/time-field.type.d.cts +0 -72
  236. package/dist/components/time-field/time-field.type.d.ts +0 -72
  237. package/dist/utils/time-mask.d.cts +0 -68
  238. package/dist/utils/time-mask.d.ts +0 -68
@@ -1,719 +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
- var _chunkFJGPDWMScjs = require('./chunk-FJGPDWMS.cjs');
6
-
7
-
8
- var _chunkYVYYONTPcjs = require('./chunk-YVYYONTP.cjs');
9
-
10
-
11
- var _chunkJ5COSALOcjs = require('./chunk-J5COSALO.cjs');
12
-
13
-
14
- var _chunkWDDXU3OHcjs = require('./chunk-WDDXU3OH.cjs');
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
- var _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
23
-
24
-
25
- var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
26
-
27
-
28
- var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
29
-
30
-
31
- var _chunkOW4N2C3Mcjs = require('./chunk-OW4N2C3M.cjs');
32
-
33
-
34
- var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
35
-
36
-
37
-
38
-
39
- var _chunkGSZDN6EZcjs = require('./chunk-GSZDN6EZ.cjs');
40
-
41
-
42
- var _chunkFHNIGHN5cjs = require('./chunk-FHNIGHN5.cjs');
43
-
44
-
45
- var _chunkSL3V7R2Ycjs = require('./chunk-SL3V7R2Y.cjs');
46
-
47
-
48
- var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
49
-
50
-
51
- var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
52
-
53
-
54
- var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
55
-
56
- // src/components/autocomplete/autocomplete.tsx
57
- var _react = require('react');
58
- var _reactnative = require('react-native');
59
-
60
- // src/components/autocomplete/autocomplete.context.ts
61
- var [AutocompleteProvider, useAutocomplete] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Autocomplete");
62
- var [AutocompleteItemProvider, useAutocompleteItem] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Autocomplete.Item");
63
-
64
- // src/components/autocomplete/autocomplete.recipe.ts
65
- var SLOTS = ["search", "empty"];
66
- var VARIANT_TOKENS = {
67
- // The search box is a field **inside** a panel rather than one on a page, so it takes
68
- // the recessed neutral rather than `fieldBackground` — on a white panel the latter is
69
- // the panel's own colour and the box would vanish into it. It is the same reasoning the
70
- // `Checkbox`'s `secondary` gives for the same swap.
71
- default: { bg: "default", fg: "fieldForeground" }
72
- };
73
- var SIZES = {
74
- sm: { value: "md" },
75
- md: { value: "md" },
76
- lg: { value: "lg" }
77
- };
78
- var BOX = {
79
- height: 10,
80
- paddingHorizontal: 3,
81
- radius: "field",
82
- marginBottom: 2
83
- };
84
- function sizeAxis(step) {
85
- return (theme) => ({
86
- search: {
87
- fontSize: theme.fontSizes[step.value],
88
- lineHeight: theme.lineHeights[step.value]
89
- }
90
- });
91
- }
92
- var autocompleteRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
93
- slots: SLOTS,
94
- base: (theme) => ({
95
- search: {
96
- height: theme.spacing(BOX.height),
97
- paddingHorizontal: theme.spacing(BOX.paddingHorizontal),
98
- marginBottom: theme.spacing(BOX.marginBottom),
99
- borderRadius: theme.radius[BOX.radius],
100
- borderCurve: "continuous",
101
- fontFamily: theme.fontFamilies.body
102
- },
103
- empty: {
104
- fontFamily: theme.fontFamilies.body,
105
- fontSize: theme.fontSizes.sm,
106
- lineHeight: theme.lineHeights.sm,
107
- color: theme.colors.muted,
108
- textAlign: "center",
109
- paddingVertical: theme.spacing(4)
110
- }
111
- }),
112
- variantTokens: VARIANT_TOKENS,
113
- paint: (_theme, colors) => ({
114
- search: { backgroundColor: colors.bg, color: colors.fg }
115
- }),
116
- variants: {
117
- size: { sm: sizeAxis(SIZES.sm), md: sizeAxis(SIZES.md), lg: sizeAxis(SIZES.lg) }
118
- },
119
- defaultVariants: { variant: "default", size: "md" }
120
- });
121
-
122
- // src/components/autocomplete/autocomplete.tsx
123
- var _jsxruntime = require('react/jsx-runtime');
124
- function Autocomplete({
125
- children,
126
- variant,
127
- size,
128
- radius,
129
- color,
130
- value: controlledValue,
131
- defaultValue,
132
- onValueChange,
133
- isOpen: controlledOpen,
134
- defaultOpen = false,
135
- onOpenChange,
136
- query: controlledQuery,
137
- defaultQuery = "",
138
- onQueryChange,
139
- isDisabled = false,
140
- isInvalid = false
141
- }) {
142
- const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0, );
143
- const { labelFor, registerLabel } = _chunkFJGPDWMScjs.useLabelRegistry.call(void 0, );
144
- const [anchor, setAnchor] = _react.useState.call(void 0, null);
145
- const [value, setValue] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
146
- value: controlledValue,
147
- defaultValue,
148
- onChange: onValueChange
149
- });
150
- const [isOpen, setOpen] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
151
- value: controlledOpen,
152
- defaultValue: defaultOpen,
153
- onChange: onOpenChange
154
- });
155
- const [query, setQueryState] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
156
- value: controlledQuery,
157
- defaultValue: defaultQuery,
158
- onChange: onQueryChange
159
- });
160
- const selection = {
161
- variant,
162
- size,
163
- radius,
164
- isOpen: isOpen ? "true" : void 0,
165
- isInvalid: isInvalid ? "true" : void 0
166
- };
167
- const styles = _chunkJ5COSALOcjs.selectRecipe.resolve({
168
- theme,
169
- selection,
170
- states: { disabled: isDisabled }
171
- });
172
- const pressed = _chunkJ5COSALOcjs.selectRecipe.resolve({
173
- theme,
174
- selection,
175
- states: { pressed: true }
176
- });
177
- const tint = color ? _chunkJ5COSALOcjs.selectRecipe.tint({ theme, color, selection }) : void 0;
178
- const own = autocompleteRecipe.resolve({ theme, selection: { size } });
179
- const ownTint = color ? autocompleteRecipe.tint({ theme, color, selection: { size } }) : void 0;
180
- const open = _react.useCallback.call(void 0, () => setOpen(true), [setOpen]);
181
- const close = _react.useCallback.call(void 0, () => {
182
- setOpen(false);
183
- setQueryState("");
184
- }, [setOpen, setQueryState]);
185
- const toggle = _react.useCallback.call(void 0,
186
- () => isOpen ? close() : open(),
187
- [close, isOpen, open]
188
- );
189
- const select = _react.useCallback.call(void 0,
190
- (next, label) => {
191
- if (label !== void 0) registerLabel(next, label);
192
- setValue(next);
193
- close();
194
- },
195
- [close, registerLabel, setValue]
196
- );
197
- const context = _react.useMemo.call(void 0, () => {
198
- const indicator = _reactnative.StyleSheet.flatten([
199
- styles.indicator,
200
- _optionalChain([tint, 'optionalAccess', _ => _.indicator])
201
- ]);
202
- const tintedPlaceholder = tint ? _reactnative.StyleSheet.flatten([tint.value]).color : void 0;
203
- return {
204
- triggerStyle: tint ? [styles.trigger, tint.trigger] : styles.trigger,
205
- triggerPressedStyle: pressed.trigger,
206
- valueStyle: tint ? [styles.value, tint.value] : styles.value,
207
- placeholderStyle: tint ? [styles.placeholder, { color: tintedPlaceholder }] : styles.placeholder,
208
- indicatorStyle: styles.indicator,
209
- overlayStyle: styles.overlay,
210
- contentStyle: styles.content,
211
- searchStyle: ownTint ? [own.search, ownTint.search] : own.search,
212
- emptyStyle: own.empty,
213
- itemStyle: styles.item,
214
- itemPressedStyle: pressed.item,
215
- itemLabelStyle: styles.itemLabel,
216
- glyph: {
217
- size: indicator.fontSize,
218
- color: typeof indicator.color === "string" ? indicator.color : void 0
219
- },
220
- placeholderColor: _reactnative.StyleSheet.flatten([styles.placeholder]).color,
221
- value,
222
- query,
223
- setQuery: setQueryState,
224
- isOpen,
225
- isDisabled,
226
- isInvalid,
227
- open,
228
- close,
229
- toggle,
230
- select,
231
- anchor,
232
- setAnchor,
233
- labelFor,
234
- registerLabel
235
- };
236
- }, [
237
- styles,
238
- pressed,
239
- tint,
240
- own,
241
- ownTint,
242
- value,
243
- query,
244
- setQueryState,
245
- isOpen,
246
- isDisabled,
247
- isInvalid,
248
- open,
249
- close,
250
- toggle,
251
- select,
252
- anchor,
253
- labelFor,
254
- registerLabel
255
- ]);
256
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AutocompleteProvider, { value: context, children });
257
- }
258
- Autocomplete.displayName = "XAUI.Autocomplete.Root";
259
-
260
- // src/components/autocomplete/autocomplete-content.tsx
261
-
262
-
263
- var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
264
-
265
- // src/utils/filter-items.ts
266
-
267
- function fold(text) {
268
- return text.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
269
- }
270
- function matchesQuery(label, query) {
271
- const needle = fold(query.trim());
272
- return needle === "" || fold(label).includes(needle);
273
- }
274
- function filterItems(children, query, isItem2) {
275
- const kept = [];
276
- let matched = 0;
277
- _react.Children.forEach(children, (child) => {
278
- if (!_react.isValidElement.call(void 0, child) || !isItem2(child.type)) {
279
- kept.push(child);
280
- return;
281
- }
282
- const label = _chunkFJGPDWMScjs.readItemLabel.call(void 0,
283
- child.props
284
- );
285
- if (label !== void 0 && !matchesQuery(label, query)) return;
286
- matched += 1;
287
- kept.push(child);
288
- });
289
- return { children: kept, matched };
290
- }
291
-
292
- // src/components/autocomplete/autocomplete-empty.tsx
293
-
294
-
295
-
296
- var AutocompleteEmpty = _react.forwardRef.call(void 0,
297
- function AutocompleteEmpty2({ children, style, ...props }, ref) {
298
- const { emptyStyle } = useAutocomplete();
299
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
300
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { ref, ...rest, style: [emptyStyle, styleProps, style], children });
301
- }
302
- );
303
- AutocompleteEmpty.displayName = "XAUI.Autocomplete.Empty";
304
-
305
- // src/components/autocomplete/autocomplete-item.tsx
306
-
307
-
308
- // src/components/autocomplete/autocomplete-item-label.tsx
309
-
310
-
311
-
312
- var AutocompleteItemLabel = _react.forwardRef.call(void 0,
313
- function AutocompleteItemLabel2({ children, style, ...props }, ref) {
314
- const { itemLabelStyle } = useAutocomplete();
315
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
316
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { ref, ...rest, style: [itemLabelStyle, styleProps, style], children });
317
- }
318
- );
319
- AutocompleteItemLabel.displayName = "XAUI.Autocomplete.ItemLabel";
320
-
321
- // src/components/autocomplete/autocomplete-item.tsx
322
-
323
- var AutocompleteItem = _react.forwardRef.call(void 0,
324
- function AutocompleteItem2({
325
- value,
326
- label,
327
- children,
328
- isDisabled = false,
329
- asChild = false,
330
- accessibilityRole = "menuitem",
331
- accessibilityState,
332
- style,
333
- onPress,
334
- onPressIn,
335
- onPressOut,
336
- ...props
337
- }, ref) {
338
- const {
339
- itemStyle,
340
- itemPressedStyle,
341
- value: selected,
342
- isDisabled: isRootDisabled,
343
- select
344
- } = useAutocomplete();
345
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
346
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
347
- const isSelected = selected === value;
348
- const disabled = isRootDisabled || isDisabled;
349
- const handlePress = _react.useCallback.call(void 0,
350
- (event) => {
351
- _optionalChain([onPress, 'optionalCall', _2 => _2(event)]);
352
- select(value, _nullishCoalesce(_nullishCoalesce(label, () => ( _chunkFHNIGHN5cjs.childrenToString.call(void 0, children))), () => ( void 0)));
353
- },
354
- [children, label, onPress, select, value]
355
- );
356
- const context = _react.useMemo.call(void 0,
357
- () => ({ isSelected, isPressed, isDisabled: disabled }),
358
- [isSelected, isPressed, disabled]
359
- );
360
- const text = _chunkFHNIGHN5cjs.childrenToString.call(void 0, children);
361
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AutocompleteItemProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
362
- _chunkOW4N2C3Mcjs.PressableFeedback,
363
- {
364
- ref,
365
- isPressed,
366
- isDisabled: disabled,
367
- asChild,
368
- accessibilityRole,
369
- accessibilityState: {
370
- disabled,
371
- selected: isSelected,
372
- ...accessibilityState
373
- },
374
- ...rest,
375
- style: [
376
- itemStyle,
377
- isPressed && itemPressedStyle,
378
- styleProps,
379
- typeof style === "function" ? style({ pressed: isPressed }) : style
380
- ],
381
- onPress: handlePress,
382
- onPressIn: press.onPressIn,
383
- onPressOut: press.onPressOut,
384
- children: text !== null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AutocompleteItemLabel, { children: text }) : children
385
- }
386
- ) });
387
- }
388
- );
389
- AutocompleteItem.displayName = "XAUI.Autocomplete.Item";
390
-
391
- // src/components/autocomplete/autocomplete-search.tsx
392
-
393
-
394
-
395
- var AutocompleteSearch = _react.forwardRef.call(void 0,
396
- function AutocompleteSearch2({ autoFocus = true, style, ...props }, ref) {
397
- const { searchStyle, placeholderColor, query, setQuery, isDisabled } = useAutocomplete();
398
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
399
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
400
- _reactnative.TextInput,
401
- {
402
- ref,
403
- value: query,
404
- onChangeText: setQuery,
405
- autoFocus,
406
- editable: !isDisabled,
407
- autoCorrect: false,
408
- autoCapitalize: "none",
409
- placeholderTextColor: placeholderColor,
410
- accessibilityRole: "search",
411
- ...rest,
412
- style: [searchStyle, styleProps, style]
413
- }
414
- );
415
- }
416
- );
417
- AutocompleteSearch.displayName = "XAUI.Autocomplete.Search";
418
-
419
- // src/components/autocomplete/autocomplete-content.tsx
420
-
421
- var DEFAULT_OFFSET = 8;
422
- var DEFAULT_INSETS = { top: 12, bottom: 12, start: 12, end: 12 };
423
- var isItem = (type) => type === AutocompleteItem;
424
- var isSearch = (type) => type === AutocompleteSearch;
425
- var isEmpty = (type) => type === AutocompleteEmpty;
426
- var AutocompleteContent = _react.forwardRef.call(void 0,
427
- function AutocompleteContent2({
428
- children,
429
- placement = "bottom",
430
- align = "center",
431
- width = "trigger",
432
- offset = DEFAULT_OFFSET,
433
- alignOffset = 0,
434
- avoidCollisions = true,
435
- insets,
436
- style,
437
- onLayout,
438
- ...props
439
- }, ref) {
440
- const context = useAutocomplete();
441
- const { contentStyle, isOpen, anchor, query, registerLabel } = context;
442
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
443
- const { position, onContentLayout, measuringStyle } = _chunkYVYYONTPcjs.useAnchoredPosition.call(void 0, {
444
- anchor,
445
- isOpen,
446
- placement,
447
- align,
448
- width,
449
- offset,
450
- alignOffset,
451
- avoidCollisions,
452
- insets: { ...DEFAULT_INSETS, ...insets },
453
- onLayout
454
- });
455
- _react.useEffect.call(void 0, () => {
456
- for (const [value, label] of _chunkFJGPDWMScjs.collectItemLabels.call(void 0, children, isItem)) {
457
- registerLabel(value, label);
458
- }
459
- }, [children, registerLabel]);
460
- const {
461
- search,
462
- empty,
463
- rest: listed
464
- } = _react.useMemo.call(void 0, () => partition(children), [children]);
465
- const { children: results, matched } = _react.useMemo.call(void 0,
466
- () => filterItems(listed, query, isItem),
467
- [listed, query]
468
- );
469
- if (!isOpen || anchor === null) return null;
470
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AutocompleteProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
471
- _reactnativereanimated2.default.View,
472
- {
473
- ref,
474
- entering: position ? _chunkEKS3W46Mcjs.anchoredEntering.call(void 0, position.placement) : void 0,
475
- exiting: position ? _chunkEKS3W46Mcjs.anchoredExiting.call(void 0, position.placement) : void 0,
476
- onLayout: onContentLayout,
477
- ...rest,
478
- style: [
479
- contentStyle,
480
- position === null ? measuringStyle : {
481
- top: position.top,
482
- start: position.start,
483
- width: position.width,
484
- maxHeight: position.maxHeight
485
- },
486
- styleProps,
487
- style
488
- ],
489
- children: [
490
- search,
491
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
492
- _reactnative.ScrollView,
493
- {
494
- bounces: false,
495
- keyboardShouldPersistTaps: "handled",
496
- showsVerticalScrollIndicator: false,
497
- children: matched === 0 && empty !== null ? empty : results
498
- }
499
- )
500
- ]
501
- },
502
- _nullishCoalesce(_optionalChain([position, 'optionalAccess', _3 => _3.placement]), () => ( "measuring"))
503
- ) }) });
504
- }
505
- );
506
- AutocompleteContent.displayName = "XAUI.Autocomplete.Content";
507
- function partition(children) {
508
- let search = null;
509
- let empty = null;
510
- const rest = [];
511
- _react.Children.forEach(children, (child) => {
512
- if (_react.isValidElement.call(void 0, child) && isSearch(child.type)) {
513
- search = child;
514
- return;
515
- }
516
- if (_react.isValidElement.call(void 0, child) && isEmpty(child.type)) {
517
- empty = child;
518
- return;
519
- }
520
- rest.push(child);
521
- });
522
- return { search, empty, rest };
523
- }
524
-
525
- // src/components/autocomplete/autocomplete-indicator.tsx
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
- function AutocompleteIndicator(props) {
535
- const { as = _chunkGSZDN6EZcjs.ChevronDownIcon } = props;
536
- const { indicatorStyle, isOpen } = useAutocomplete();
537
- const progress = _reactnativereanimated.useSharedValue.call(void 0, isOpen ? 1 : 0);
538
- _react.useEffect.call(void 0, () => {
539
- progress.set(_reactnativereanimated.withSpring.call(void 0, isOpen ? 1 : 0, _chunkEKS3W46Mcjs.INDICATOR_SPRING));
540
- }, [isOpen, progress]);
541
- const rotation = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
542
- transform: [
543
- {
544
- rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0], _chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])}deg`
545
- }
546
- ]
547
- }));
548
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { style: [indicatorStyle, rotation], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.Icon, { as }) });
549
- }
550
- AutocompleteIndicator.displayName = "XAUI.Autocomplete.Indicator";
551
-
552
- // src/components/autocomplete/autocomplete-overlay.tsx
553
-
554
-
555
-
556
-
557
- var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
558
- var AutocompleteOverlay = _react.forwardRef.call(void 0,
559
- function AutocompleteOverlay2({ children, style, ...props }, ref) {
560
- const context = useAutocomplete();
561
- const { overlayStyle, isOpen, close } = context;
562
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
563
- if (!isOpen) return null;
564
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AutocompleteProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
565
- AnimatedPressable,
566
- {
567
- ref,
568
- entering: _chunkEKS3W46Mcjs.overlayEntering,
569
- exiting: _chunkEKS3W46Mcjs.overlayExiting,
570
- accessibilityRole: "none",
571
- importantForAccessibility: "no",
572
- onPress: close,
573
- ...rest,
574
- style: [overlayStyle, styleProps, style],
575
- children
576
- }
577
- ) }) });
578
- }
579
- );
580
- AutocompleteOverlay.displayName = "XAUI.Autocomplete.Overlay";
581
-
582
- // src/components/autocomplete/autocomplete-trigger.tsx
583
-
584
-
585
- var AutocompleteTrigger = _react.forwardRef.call(void 0,
586
- function AutocompleteTrigger2({
587
- children,
588
- asChild = false,
589
- accessibilityRole = "combobox",
590
- accessibilityState,
591
- style,
592
- onLayout,
593
- onPressIn,
594
- onPressOut,
595
- onPress,
596
- ...props
597
- }, ref) {
598
- const {
599
- triggerStyle,
600
- triggerPressedStyle,
601
- glyph,
602
- isOpen,
603
- isDisabled,
604
- isInvalid,
605
- toggle,
606
- setAnchor
607
- } = useAutocomplete();
608
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
609
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
610
- const node = _react.useRef.call(void 0, null);
611
- const refs = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, node, ref);
612
- const measure = _react.useCallback.call(void 0, () => {
613
- _optionalChain([node, 'access', _4 => _4.current, 'optionalAccess', _5 => _5.measureInWindow, 'call', _6 => _6((x, y, width, height) => {
614
- setAnchor({ x, y, width, height });
615
- })]);
616
- }, [setAnchor]);
617
- const handleLayout = _react.useCallback.call(void 0,
618
- (event) => {
619
- _optionalChain([onLayout, 'optionalCall', _7 => _7(event)]);
620
- measure();
621
- },
622
- [measure, onLayout]
623
- );
624
- _react.useEffect.call(void 0, () => {
625
- if (isOpen) measure();
626
- }, [isOpen, measure]);
627
- const handlePress = _react.useCallback.call(void 0,
628
- (event) => {
629
- _optionalChain([onPress, 'optionalCall', _8 => _8(event)]);
630
- measure();
631
- toggle();
632
- },
633
- [measure, onPress, toggle]
634
- );
635
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.IconContext.Provider, { value: glyph, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
636
- _chunkOW4N2C3Mcjs.PressableFeedback,
637
- {
638
- ref: refs,
639
- isPressed,
640
- isDisabled,
641
- asChild,
642
- accessibilityRole,
643
- accessibilityState: {
644
- disabled: isDisabled,
645
- expanded: isOpen,
646
- ...accessibilityState
647
- },
648
- "aria-invalid": isInvalid || void 0,
649
- ...rest,
650
- onLayout: handleLayout,
651
- style: [
652
- triggerStyle,
653
- isPressed && triggerPressedStyle,
654
- styleProps,
655
- typeof style === "function" ? style({ pressed: isPressed }) : style
656
- ],
657
- onPress: handlePress,
658
- onPressIn: press.onPressIn,
659
- onPressOut: press.onPressOut,
660
- children
661
- }
662
- ) });
663
- }
664
- );
665
- AutocompleteTrigger.displayName = "XAUI.Autocomplete.Trigger";
666
-
667
- // src/components/autocomplete/autocomplete-value.tsx
668
-
669
-
670
-
671
- var AutocompleteValue = _react.forwardRef.call(void 0,
672
- function AutocompleteValue2({ children, placeholder, style, ...props }, ref) {
673
- const { valueStyle, placeholderStyle, value, labelFor } = useAutocomplete();
674
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
675
- const label = _nullishCoalesce(children, () => ( (value === void 0 ? void 0 : labelFor(value))));
676
- const isEmpty2 = label === void 0 || label === null;
677
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
678
- _reactnative.Text,
679
- {
680
- ref,
681
- numberOfLines: 1,
682
- ...rest,
683
- style: [isEmpty2 ? placeholderStyle : valueStyle, styleProps, style],
684
- children: isEmpty2 ? placeholder : label
685
- }
686
- );
687
- }
688
- );
689
- AutocompleteValue.displayName = "XAUI.Autocomplete.Value";
690
-
691
- // src/components/autocomplete/index.ts
692
- var Autocomplete2 = Object.assign(Autocomplete, {
693
- Trigger: AutocompleteTrigger,
694
- Value: AutocompleteValue,
695
- Indicator: AutocompleteIndicator,
696
- Overlay: AutocompleteOverlay,
697
- Content: AutocompleteContent,
698
- Search: AutocompleteSearch,
699
- Item: AutocompleteItem,
700
- ItemLabel: AutocompleteItemLabel,
701
- Empty: AutocompleteEmpty
702
- });
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
-
712
-
713
-
714
-
715
-
716
-
717
-
718
-
719
- exports.useAutocomplete = useAutocomplete; exports.useAutocompleteItem = useAutocompleteItem; exports.autocompleteRecipe = autocompleteRecipe; exports.Autocomplete = Autocomplete; exports.AutocompleteEmpty = AutocompleteEmpty; exports.AutocompleteItemLabel = AutocompleteItemLabel; exports.AutocompleteItem = AutocompleteItem; exports.AutocompleteSearch = AutocompleteSearch; exports.AutocompleteContent = AutocompleteContent; exports.AutocompleteIndicator = AutocompleteIndicator; exports.AutocompleteOverlay = AutocompleteOverlay; exports.AutocompleteTrigger = AutocompleteTrigger; exports.AutocompleteValue = AutocompleteValue; exports.Autocomplete2 = Autocomplete2;