@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,640 +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
- var _chunkWDDXU3OHcjs = require('./chunk-WDDXU3OH.cjs');
4
-
5
-
6
-
7
- var _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
8
-
9
-
10
- var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
11
-
12
-
13
- var _chunkOW4N2C3Mcjs = require('./chunk-OW4N2C3M.cjs');
14
-
15
-
16
- var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
17
-
18
-
19
- var _chunkSL3V7R2Ycjs = require('./chunk-SL3V7R2Y.cjs');
20
-
21
-
22
- var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
23
-
24
-
25
- var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
26
-
27
-
28
- var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
29
-
30
-
31
- var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
32
-
33
- // src/components/bottom-sheet/bottom-sheet-close.tsx
34
- var _react = require('react');
35
-
36
- // src/components/bottom-sheet/bottom-sheet.context.ts
37
- var [BottomSheetProvider, useBottomSheet] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "BottomSheet");
38
-
39
- // src/components/bottom-sheet/bottom-sheet-close.tsx
40
- var _jsxruntime = require('react/jsx-runtime');
41
- var BottomSheetClose = _react.forwardRef.call(void 0,
42
- function BottomSheetClose2({
43
- children,
44
- asChild = false,
45
- accessibilityRole = "button",
46
- style,
47
- onPress,
48
- onPressIn,
49
- onPressOut,
50
- ...props
51
- }, ref) {
52
- const { close } = useBottomSheet();
53
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
54
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
55
- const handlePress = _react.useCallback.call(void 0,
56
- (event) => {
57
- _optionalChain([onPress, 'optionalCall', _ => _(event)]);
58
- close();
59
- },
60
- [close, onPress]
61
- );
62
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
63
- _chunkOW4N2C3Mcjs.PressableFeedback,
64
- {
65
- ref,
66
- isPressed,
67
- asChild,
68
- accessibilityRole,
69
- ...rest,
70
- style: [
71
- styleProps,
72
- typeof style === "function" ? style({ pressed: isPressed }) : style
73
- ],
74
- onPress: handlePress,
75
- onPressIn: press.onPressIn,
76
- onPressOut: press.onPressOut,
77
- children
78
- }
79
- );
80
- }
81
- );
82
- BottomSheetClose.displayName = "XAUI.BottomSheet.Close";
83
-
84
- // src/components/bottom-sheet/bottom-sheet-content.tsx
85
-
86
- var _reactnative = require('react-native');
87
- var _reactnativegesturehandler = require('react-native-gesture-handler');
88
-
89
-
90
-
91
-
92
-
93
- var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
94
-
95
- // src/components/bottom-sheet/bottom-sheet.animation.ts
96
- var SHEET_SPRING = { damping: 28, stiffness: 260, mass: 0.9 };
97
- var DISMISS_VELOCITY = 900;
98
- var THROW_PROJECTION = 0.15;
99
-
100
- // src/components/bottom-sheet/bottom-sheet.utils.ts
101
- function sheetOffset(state, geometry) {
102
- const { height, collapsedHeight } = geometry;
103
- if (state === "closed") return height;
104
- if (state === "expanded" || collapsedHeight === void 0) return 0;
105
- return Math.max(height - collapsedHeight, 0);
106
- }
107
- function paddingUnderSeam(style) {
108
- const value = _nullishCoalesce(_nullishCoalesce(style.paddingBottom, () => ( style.paddingVertical)), () => ( style.padding));
109
- return typeof value === "number" ? value : 0;
110
- }
111
- function collapsedExtent(summaryExtent, paddingBottom, collapsedHeight) {
112
- if (summaryExtent === void 0) return collapsedHeight;
113
- return summaryExtent + paddingBottom;
114
- }
115
- function nextSheetState(release, geometry) {
116
- const { from, translationY, velocityY, projection } = release;
117
- const { height, collapsedHeight } = geometry;
118
- const farEnough = Math.abs(translationY) > height * release.dismissThreshold;
119
- const fastEnough = Math.abs(velocityY) > release.dismissVelocity;
120
- if (!farEnough && !fastEnough) return from;
121
- if (translationY < 0) return "expanded";
122
- if (collapsedHeight === void 0) return "closed";
123
- if (from === "collapsed") return "closed";
124
- const released = sheetOffset(from, geometry) + translationY;
125
- const projected = released + velocityY * projection;
126
- const collapsed = sheetOffset("collapsed", geometry);
127
- return projected > collapsed + (height - collapsed) / 2 ? "closed" : "collapsed";
128
- }
129
-
130
- // src/components/bottom-sheet/bottom-sheet-content.tsx
131
-
132
- function BottomSheetContent({
133
- children,
134
- isSwipeable = true,
135
- accessibilityViewIsModal = true,
136
- style,
137
- onLayout,
138
- ...props
139
- }) {
140
- const context = useBottomSheet();
141
- const {
142
- contentStyle,
143
- isOpen,
144
- dismissThreshold,
145
- collapsedHeight,
146
- isExpanded,
147
- close,
148
- expand,
149
- collapse,
150
- setPaddingBottom
151
- } = context;
152
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
153
- const [height, setHeight] = _react.useState.call(void 0, 0);
154
- const offset = _reactnativereanimated.useSharedValue.call(void 0, OFFSCREEN);
155
- const measure = _react.useCallback.call(void 0,
156
- (event) => {
157
- _optionalChain([onLayout, 'optionalCall', _2 => _2(event)]);
158
- setHeight(event.nativeEvent.layout.height);
159
- },
160
- [onLayout]
161
- );
162
- const paddingBottom = _react.useMemo.call(void 0,
163
- () => paddingUnderSeam(_reactnative.StyleSheet.flatten([contentStyle, styleProps, style])),
164
- [contentStyle, style, styleProps]
165
- );
166
- _react.useEffect.call(void 0, () => {
167
- setPaddingBottom(paddingBottom);
168
- }, [paddingBottom, setPaddingBottom]);
169
- const geometry = _react.useMemo.call(void 0,
170
- () => ({ height, collapsedHeight }),
171
- [height, collapsedHeight]
172
- );
173
- const resting = isOpen ? isExpanded ? "expanded" : "collapsed" : "closed";
174
- _react.useEffect.call(void 0, () => {
175
- if (height === 0) return;
176
- offset.set(_reactnativereanimated.withSpring.call(void 0, sheetOffset(resting, geometry), SHEET_SPRING));
177
- }, [geometry, height, offset, resting]);
178
- const release = _react.useCallback.call(void 0,
179
- (translationY, velocityY) => {
180
- const next = nextSheetState(
181
- {
182
- from: isExpanded ? "expanded" : "collapsed",
183
- translationY,
184
- velocityY,
185
- projection: THROW_PROJECTION,
186
- dismissThreshold,
187
- dismissVelocity: DISMISS_VELOCITY
188
- },
189
- geometry
190
- );
191
- if (next === resting) {
192
- offset.set(_reactnativereanimated.withSpring.call(void 0, sheetOffset(resting, geometry), SHEET_SPRING));
193
- return;
194
- }
195
- if (next === "closed") return close();
196
- if (next === "collapsed") return collapse();
197
- expand();
198
- },
199
- [
200
- close,
201
- collapse,
202
- dismissThreshold,
203
- expand,
204
- geometry,
205
- isExpanded,
206
- offset,
207
- resting
208
- ]
209
- );
210
- const restingOffset = sheetOffset(resting, geometry);
211
- const pan = _reactnativegesturehandler.Gesture.Pan().enabled(isSwipeable).onUpdate((event) => {
212
- offset.set(Math.max(restingOffset + event.translationY, 0));
213
- }).onEnd((event) => {
214
- _reactnativereanimated.runOnJS.call(void 0, release)(event.translationY, event.velocityY);
215
- });
216
- const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
217
- transform: [{ translateY: offset.get() }]
218
- }));
219
- if (!isOpen) return null;
220
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BottomSheetProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativegesturehandler.GestureDetector, { gesture: pan, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
221
- _reactnativereanimated2.default.View,
222
- {
223
- accessibilityViewIsModal,
224
- onLayout: measure,
225
- ...rest,
226
- style: [contentStyle, slide, styleProps, style],
227
- children
228
- }
229
- ) }) }) });
230
- }
231
- var OFFSCREEN = 2e3;
232
- BottomSheetContent.displayName = "XAUI.BottomSheet.Content";
233
-
234
- // src/components/bottom-sheet/bottom-sheet-description.tsx
235
-
236
-
237
-
238
- var BottomSheetDescription = _react.forwardRef.call(void 0,
239
- function BottomSheetDescription2({ children, style, ...props }, ref) {
240
- const { descriptionStyle } = useBottomSheet();
241
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
242
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { ref, ...rest, style: [descriptionStyle, styleProps, style], children });
243
- }
244
- );
245
- BottomSheetDescription.displayName = "XAUI.BottomSheet.Description";
246
-
247
- // src/components/bottom-sheet/bottom-sheet-handle.tsx
248
-
249
-
250
-
251
- var BottomSheetHandle = _react.forwardRef.call(void 0,
252
- function BottomSheetHandle2({
253
- accessibilityRole = "button",
254
- style,
255
- onPress,
256
- onPressIn,
257
- onPressOut,
258
- ...props
259
- }, ref) {
260
- const { handleStyle, isCollapsible, isExpanded, toggleExpanded } = useBottomSheet();
261
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
262
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
263
- const handlePress = _react.useCallback.call(void 0,
264
- (event) => {
265
- _optionalChain([onPress, 'optionalCall', _3 => _3(event)]);
266
- toggleExpanded();
267
- },
268
- [onPress, toggleExpanded]
269
- );
270
- if (!isCollapsible) {
271
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
272
- _reactnative.View,
273
- {
274
- ref,
275
- accessibilityElementsHidden: true,
276
- importantForAccessibility: "no-hide-descendants",
277
- ...rest,
278
- style: [
279
- handleStyle,
280
- styleProps,
281
- typeof style === "function" ? style({ pressed: false }) : style
282
- ]
283
- }
284
- );
285
- }
286
- if (!rest.accessibilityLabel && !rest["aria-label"]) {
287
- _chunkEJQCQPETcjs.warnDev.call(void 0,
288
- "BottomSheet.Handle: a collapsible sheet needs an `accessibilityLabel` on its handle \u2014 it is the control that reduces and restores the sheet, and a pill says nothing to someone who cannot see it."
289
- );
290
- }
291
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
292
- _chunkOW4N2C3Mcjs.PressableFeedback,
293
- {
294
- ref,
295
- isPressed,
296
- accessibilityRole,
297
- accessibilityState: { expanded: isExpanded },
298
- ...rest,
299
- style: [
300
- handleStyle,
301
- styleProps,
302
- typeof style === "function" ? style({ pressed: isPressed }) : style
303
- ],
304
- onPress: handlePress,
305
- onPressIn: press.onPressIn,
306
- onPressOut: press.onPressOut
307
- }
308
- );
309
- }
310
- );
311
- BottomSheetHandle.displayName = "XAUI.BottomSheet.Handle";
312
-
313
- // src/components/bottom-sheet/bottom-sheet-overlay.tsx
314
-
315
-
316
-
317
-
318
- var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
319
- var BottomSheetOverlay = _react.forwardRef.call(void 0,
320
- function BottomSheetOverlay2({ children, isDismissable = true, style, ...props }, ref) {
321
- const context = useBottomSheet();
322
- const { overlayStyle, isOpen, close } = context;
323
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
324
- if (!isOpen) return null;
325
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BottomSheetProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
326
- AnimatedPressable,
327
- {
328
- ref,
329
- entering: _chunkEKS3W46Mcjs.overlayEntering,
330
- exiting: _chunkEKS3W46Mcjs.overlayExiting,
331
- accessibilityRole: "none",
332
- importantForAccessibility: "no",
333
- onPress: isDismissable ? close : void 0,
334
- ...rest,
335
- style: [overlayStyle, styleProps, style],
336
- children
337
- }
338
- ) }) });
339
- }
340
- );
341
- BottomSheetOverlay.displayName = "XAUI.BottomSheet.Overlay";
342
-
343
- // src/components/bottom-sheet/bottom-sheet-summary.tsx
344
-
345
-
346
-
347
- var BottomSheetSummary = _react.forwardRef.call(void 0,
348
- function BottomSheetSummary2({ children, style, onLayout, ...props }, ref) {
349
- const { setSummaryExtent } = useBottomSheet();
350
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
351
- const measure = _react.useCallback.call(void 0,
352
- (event) => {
353
- _optionalChain([onLayout, 'optionalCall', _4 => _4(event)]);
354
- const { y, height } = event.nativeEvent.layout;
355
- setSummaryExtent(y + height);
356
- },
357
- [onLayout, setSummaryExtent]
358
- );
359
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, onLayout: measure, style: [styleProps, style], children });
360
- }
361
- );
362
- BottomSheetSummary.displayName = "XAUI.BottomSheet.Summary";
363
-
364
- // src/components/bottom-sheet/bottom-sheet-title.tsx
365
-
366
-
367
-
368
- var BottomSheetTitle = _react.forwardRef.call(void 0,
369
- function BottomSheetTitle2({ children, accessibilityRole = "header", style, ...props }, ref) {
370
- const { titleStyle } = useBottomSheet();
371
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
372
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
373
- _reactnative.Text,
374
- {
375
- ref,
376
- accessibilityRole,
377
- ...rest,
378
- style: [titleStyle, styleProps, style],
379
- children
380
- }
381
- );
382
- }
383
- );
384
- BottomSheetTitle.displayName = "XAUI.BottomSheet.Title";
385
-
386
- // src/components/bottom-sheet/bottom-sheet-trigger.tsx
387
-
388
-
389
- var BottomSheetTrigger = _react.forwardRef.call(void 0,
390
- function BottomSheetTrigger2({
391
- children,
392
- asChild = false,
393
- accessibilityRole = "button",
394
- accessibilityState,
395
- style,
396
- onPress,
397
- onPressIn,
398
- onPressOut,
399
- ...props
400
- }, ref) {
401
- const { isOpen, isDisabled, toggle } = useBottomSheet();
402
- const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
403
- const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
404
- const handlePress = _react.useCallback.call(void 0,
405
- (event) => {
406
- _optionalChain([onPress, 'optionalCall', _5 => _5(event)]);
407
- toggle();
408
- },
409
- [onPress, toggle]
410
- );
411
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
412
- _chunkOW4N2C3Mcjs.PressableFeedback,
413
- {
414
- ref,
415
- isPressed,
416
- isDisabled,
417
- asChild,
418
- accessibilityRole,
419
- accessibilityState: {
420
- disabled: isDisabled,
421
- expanded: isOpen,
422
- ...accessibilityState
423
- },
424
- ...rest,
425
- style: [
426
- styleProps,
427
- typeof style === "function" ? style({ pressed: isPressed }) : style
428
- ],
429
- onPress: handlePress,
430
- onPressIn: press.onPressIn,
431
- onPressOut: press.onPressOut,
432
- children
433
- }
434
- );
435
- }
436
- );
437
- BottomSheetTrigger.displayName = "XAUI.BottomSheet.Trigger";
438
-
439
- // src/components/bottom-sheet/bottom-sheet.tsx
440
-
441
-
442
- // src/components/bottom-sheet/bottom-sheet.recipe.ts
443
- var SLOTS = ["overlay", "content", "handle", "title", "description"];
444
- var HANDLE = { width: 36, height: 4 };
445
- function topCorners(radius) {
446
- return (theme) => ({
447
- content: {
448
- borderTopStartRadius: theme.radius[radius],
449
- borderTopEndRadius: theme.radius[radius]
450
- }
451
- });
452
- }
453
- var RADII = [
454
- "xs",
455
- "sm",
456
- "md",
457
- "lg",
458
- "xl",
459
- "2xl",
460
- "3xl",
461
- "4xl",
462
- "field",
463
- "full"
464
- ];
465
- var bottomSheetRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
466
- slots: SLOTS,
467
- base: (theme) => ({
468
- overlay: {
469
- position: "absolute",
470
- top: 0,
471
- bottom: 0,
472
- start: 0,
473
- end: 0,
474
- backgroundColor: theme.colors.backdrop
475
- },
476
- content: {
477
- position: "absolute",
478
- start: 0,
479
- end: 0,
480
- bottom: 0,
481
- backgroundColor: theme.colors.overlay,
482
- padding: theme.spacing(5),
483
- gap: theme.spacing(2),
484
- // HeroUI's `--radius-4xl` on a base of 8 is 32 points; the nearest on our base of 12
485
- // is `3xl` at 36. A sheet's corner is the largest in the library because it is the
486
- // only edge of it you can see.
487
- borderTopStartRadius: theme.radius["3xl"],
488
- borderTopEndRadius: theme.radius["3xl"],
489
- borderCurve: "continuous",
490
- ...theme.shadows.overlay
491
- },
492
- /**
493
- * The grab bar. It is the only thing telling a reader the sheet can be dragged — the
494
- * gesture has no other affordance, and a sheet without one reads as a panel that
495
- * happens to have arrived from below.
496
- */
497
- handle: {
498
- alignSelf: "center",
499
- width: HANDLE.width,
500
- height: HANDLE.height,
501
- borderRadius: HANDLE.height / 2,
502
- backgroundColor: theme.colors.separator
503
- },
504
- title: {
505
- fontFamily: theme.fontFamilies.body,
506
- fontWeight: theme.fontWeights.medium,
507
- fontSize: theme.fontSizes.lg,
508
- lineHeight: theme.lineHeights.lg,
509
- color: theme.colors.overlayForeground
510
- },
511
- description: {
512
- fontFamily: theme.fontFamilies.body,
513
- fontSize: theme.fontSizes.md,
514
- lineHeight: theme.lineHeights.md,
515
- color: theme.colors.muted
516
- }
517
- }),
518
- /** One variant: a sheet is the theme's floating surface, with no emphasis to report. */
519
- variantTokens: { default: {} },
520
- variants: {
521
- radius: Object.fromEntries(RADII.map((r) => [r, topCorners(r)]))
522
- },
523
- defaultVariants: { variant: "default" }
524
- });
525
-
526
- // src/components/bottom-sheet/bottom-sheet.tsx
527
-
528
- function BottomSheet({
529
- children,
530
- radius,
531
- isOpen: controlledOpen,
532
- defaultOpen = false,
533
- onOpenChange,
534
- isDisabled = false,
535
- dismissThreshold = 0.35,
536
- collapsedHeight,
537
- isExpanded: controlledExpanded,
538
- defaultExpanded = true,
539
- onExpandedChange
540
- }) {
541
- const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0, );
542
- const [isOpen, setOpen] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
543
- value: controlledOpen,
544
- defaultValue: defaultOpen,
545
- onChange: onOpenChange
546
- });
547
- const [isExpanded, setExpanded] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
548
- value: controlledExpanded,
549
- defaultValue: defaultExpanded,
550
- onChange: onExpandedChange
551
- });
552
- const [summaryExtent, setSummaryExtent] = _react.useState.call(void 0, );
553
- const [paddingBottom, setPaddingBottom] = _react.useState.call(void 0, 0);
554
- const collapsed = collapsedExtent(summaryExtent, paddingBottom, collapsedHeight);
555
- _react.useEffect.call(void 0, () => {
556
- if (summaryExtent === void 0 || collapsedHeight === void 0) return;
557
- _chunkEJQCQPETcjs.warnDev.call(void 0,
558
- "BottomSheet: `collapsedHeight` is ignored when a `BottomSheet.Summary` is present \u2014 the summary measures where to cut. Remove one of the two."
559
- );
560
- }, [collapsedHeight, summaryExtent]);
561
- const styles = bottomSheetRecipe.resolve({ theme, selection: { radius } });
562
- const open = _react.useCallback.call(void 0, () => setOpen(true), [setOpen]);
563
- const close = _react.useCallback.call(void 0, () => setOpen(false), [setOpen]);
564
- const toggle = _react.useCallback.call(void 0, () => setOpen((current) => !current), [setOpen]);
565
- const expand = _react.useCallback.call(void 0, () => setExpanded(true), [setExpanded]);
566
- const collapse = _react.useCallback.call(void 0, () => setExpanded(false), [setExpanded]);
567
- const toggleExpanded = _react.useCallback.call(void 0,
568
- () => setExpanded((current) => !current),
569
- [setExpanded]
570
- );
571
- const context = _react.useMemo.call(void 0,
572
- () => ({
573
- overlayStyle: styles.overlay,
574
- contentStyle: styles.content,
575
- handleStyle: styles.handle,
576
- titleStyle: styles.title,
577
- descriptionStyle: styles.description,
578
- isOpen,
579
- isDisabled,
580
- dismissThreshold,
581
- collapsedHeight: collapsed,
582
- setSummaryExtent,
583
- setPaddingBottom,
584
- // A sheet with no reduced state has none to be out of, so it reports expanded
585
- // whatever the disclosure holds — a slot must not draw a chevron for a state the
586
- // sheet cannot reach.
587
- isExpanded: collapsed === void 0 ? true : isExpanded,
588
- isCollapsible: collapsed !== void 0,
589
- open,
590
- close,
591
- toggle,
592
- expand,
593
- collapse,
594
- toggleExpanded
595
- }),
596
- [
597
- styles,
598
- isOpen,
599
- isDisabled,
600
- dismissThreshold,
601
- collapsed,
602
- isExpanded,
603
- open,
604
- close,
605
- toggle,
606
- expand,
607
- collapse,
608
- toggleExpanded
609
- ]
610
- );
611
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BottomSheetProvider, { value: context, children });
612
- }
613
- BottomSheet.displayName = "XAUI.BottomSheet.Root";
614
-
615
- // src/components/bottom-sheet/index.ts
616
- var BottomSheet2 = Object.assign(BottomSheet, {
617
- Trigger: BottomSheetTrigger,
618
- Overlay: BottomSheetOverlay,
619
- Content: BottomSheetContent,
620
- Handle: BottomSheetHandle,
621
- Summary: BottomSheetSummary,
622
- Title: BottomSheetTitle,
623
- Description: BottomSheetDescription,
624
- Close: BottomSheetClose
625
- });
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
-
640
- exports.useBottomSheet = useBottomSheet; exports.BottomSheetClose = BottomSheetClose; exports.BottomSheetContent = BottomSheetContent; exports.BottomSheetDescription = BottomSheetDescription; exports.BottomSheetHandle = BottomSheetHandle; exports.BottomSheetOverlay = BottomSheetOverlay; exports.BottomSheetSummary = BottomSheetSummary; exports.BottomSheetTitle = BottomSheetTitle; exports.BottomSheetTrigger = BottomSheetTrigger; exports.bottomSheetRecipe = bottomSheetRecipe; exports.BottomSheet = BottomSheet; exports.BottomSheet2 = BottomSheet2;