@xaui/native 0.9.1-beta.95 → 0.9.1-beta.97

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 (205) hide show
  1. package/dist/{chunk-AXKDHX5V.cjs → chunk-2IOL3VDP.cjs} +3 -3
  2. package/dist/{chunk-LUPU7FJK.js → chunk-356DND54.js} +1 -1
  3. package/dist/{chunk-B5DBFS6M.js → chunk-3BRVAMXQ.js} +1 -1
  4. package/dist/{chunk-YJIVPYMG.cjs → chunk-3CI4JGY4.cjs} +14 -14
  5. package/dist/{chunk-4LRVB6WR.cjs → chunk-3DQCHPB6.cjs} +12 -12
  6. package/dist/{chunk-X6GT4H4I.cjs → chunk-3TBT6ORW.cjs} +15 -15
  7. package/dist/{chunk-DN3X5WIB.js → chunk-3VMKOQXH.js} +1 -1
  8. package/dist/{chunk-WPYJW3WM.cjs → chunk-435MOVG2.cjs} +3 -3
  9. package/dist/{chunk-NGXLJ5ZF.cjs → chunk-4R4SIP22.cjs} +22 -22
  10. package/dist/{chunk-V4IFH65I.cjs → chunk-5CXOSDFI.cjs} +2 -2
  11. package/dist/{chunk-5XTF2JDK.js → chunk-5G36GMFS.js} +1 -1
  12. package/dist/{chunk-VBS6VWW4.cjs → chunk-5UT5I53X.cjs} +3 -3
  13. package/dist/{chunk-5O7E73QP.cjs → chunk-7CGF3Z5S.cjs} +6 -6
  14. package/dist/{chunk-7OVYYZ7H.js → chunk-7EPH24S2.js} +15 -15
  15. package/dist/{chunk-G2YHGLN3.cjs → chunk-7JWOAGB3.cjs} +9 -9
  16. package/dist/{chunk-6SRFQSPR.cjs → chunk-ADGHFLBJ.cjs} +1 -1
  17. package/dist/{chunk-E4FWGZH2.js → chunk-AMFGATFY.js} +2 -2
  18. package/dist/{chunk-X22PLAP6.cjs → chunk-BGBJTBFC.cjs} +1 -1
  19. package/dist/{chunk-33BA4LVN.js → chunk-BH4IN6H6.js} +1 -1
  20. package/dist/{chunk-WLWZG2PA.cjs → chunk-BKY5YQ7W.cjs} +1 -1
  21. package/dist/{chunk-AHJLQJOE.cjs → chunk-C2S6J27O.cjs} +1 -1
  22. package/dist/chunk-C6JO2RTV.cjs +752 -0
  23. package/dist/{chunk-53E2E7GS.cjs → chunk-CP6AB6N5.cjs} +15 -15
  24. package/dist/{chunk-WYRM77XM.cjs → chunk-ENZBKNFJ.cjs} +15 -15
  25. package/dist/{chunk-BYDGJU5A.js → chunk-ES7RME6G.js} +3 -3
  26. package/dist/{chunk-KFB24VYT.js → chunk-EXONAJUX.js} +15 -15
  27. package/dist/{chunk-ERIGD4SE.cjs → chunk-FWAP4WAJ.cjs} +18 -18
  28. package/dist/{chunk-KMK6FUTK.cjs → chunk-FZXWZNYY.cjs} +9 -9
  29. package/dist/{chunk-K7VDLVLE.js → chunk-GKXOHUEW.js} +3 -3
  30. package/dist/{chunk-6W45YHTF.js → chunk-HDERVGWZ.js} +1 -1
  31. package/dist/{chunk-KHPODIQV.cjs → chunk-IHRPAKCZ.cjs} +15 -15
  32. package/dist/{chunk-2XEQDQAN.js → chunk-IVELCJEN.js} +99 -99
  33. package/dist/{chunk-5YZUYSV7.js → chunk-JYV53WUN.js} +1 -1
  34. package/dist/{chunk-DE4RSR7Q.cjs → chunk-KAYZH7ZN.cjs} +1 -1
  35. package/dist/{chunk-IMIY34F4.cjs → chunk-KIXHSX3L.cjs} +1 -1
  36. package/dist/{chunk-7M6YKCHX.js → chunk-KZZWNDDO.js} +2 -2
  37. package/dist/{chunk-OZLOYXLW.js → chunk-L6EWRWTE.js} +2 -2
  38. package/dist/{chunk-EQUD3NHO.js → chunk-LYWXGEED.js} +43 -43
  39. package/dist/{chunk-XOZMGNVS.js → chunk-MXSIY6QQ.js} +3 -3
  40. package/dist/{chunk-3CPLJJWX.js → chunk-MZUYTCCB.js} +1 -1
  41. package/dist/{chunk-NADCILBL.cjs → chunk-NRU5APUE.cjs} +4 -4
  42. package/dist/{chunk-43S673KF.js → chunk-NTVPLDJC.js} +1 -1
  43. package/dist/{chunk-7AVZ2FST.cjs → chunk-NXVSNESK.cjs} +12 -12
  44. package/dist/{chunk-4AIIAF6U.js → chunk-SRY3HKSC.js} +16 -16
  45. package/dist/chunk-SVS726BW.js +822 -0
  46. package/dist/{chunk-YOPWQHNO.js → chunk-TNFLBURM.js} +1 -1
  47. package/dist/{chunk-YCQEX25B.cjs → chunk-U6YD3UBO.cjs} +7 -7
  48. package/dist/{chunk-GN7BWYXP.cjs → chunk-USQK6SFZ.cjs} +15 -15
  49. package/dist/{chunk-YGETADPV.js → chunk-V7YT4SDX.js} +2 -2
  50. package/dist/{chunk-DBP5CA5R.js → chunk-VL2ZT4BB.js} +3 -3
  51. package/dist/{chunk-E5E2QA4K.js → chunk-VQG7K5QE.js} +15 -15
  52. package/dist/{chunk-Q6OVVUAT.js → chunk-VTGWFZCA.js} +2 -2
  53. package/dist/{chunk-MNBEUNC5.cjs → chunk-WH7MFY3H.cjs} +18 -18
  54. package/dist/{chunk-OX23MW5E.js → chunk-WMTGDNXU.js} +44 -44
  55. package/dist/{chunk-2TLPFGGR.cjs → chunk-XCEDD7PE.cjs} +24 -24
  56. package/dist/{chunk-J5COSALO.cjs → chunk-XILRXEUL.cjs} +2 -2
  57. package/dist/{chunk-AIHKBSQ5.cjs → chunk-YUCK5VJO.cjs} +8 -8
  58. package/dist/{chunk-YI5D4QZP.js → chunk-Z2KK5W7P.js} +15 -15
  59. package/dist/{chunk-SX5U5UJQ.js → chunk-ZBY7Q7WJ.js} +2 -2
  60. package/dist/{chunk-U5CUBDJA.js → chunk-ZR5YOCOQ.js} +15 -15
  61. package/dist/components/accordion/accordion.animation.d.cts +1 -1
  62. package/dist/components/accordion/accordion.animation.d.ts +1 -1
  63. package/dist/components/accordion/accordion.type.d.cts +1 -1
  64. package/dist/components/accordion/accordion.type.d.ts +1 -1
  65. package/dist/components/accordion/index.cjs +2 -2
  66. package/dist/components/accordion/index.js +1 -1
  67. package/dist/components/alert/alert-icon.d.cts +2 -2
  68. package/dist/components/alert/alert-icon.d.ts +2 -2
  69. package/dist/components/alert/alert.type.d.cts +1 -1
  70. package/dist/components/alert/alert.type.d.ts +1 -1
  71. package/dist/components/alert/index.cjs +2 -2
  72. package/dist/components/alert/index.js +1 -1
  73. package/dist/components/autocomplete/index.cjs +3 -3
  74. package/dist/components/autocomplete/index.js +2 -2
  75. package/dist/components/avatar/avatar-fallback.d.cts +1 -1
  76. package/dist/components/avatar/avatar-fallback.d.ts +1 -1
  77. package/dist/components/avatar/avatar.d.cts +1 -1
  78. package/dist/components/avatar/avatar.d.ts +1 -1
  79. package/dist/components/avatar/avatar.type.d.cts +1 -1
  80. package/dist/components/avatar/avatar.type.d.ts +1 -1
  81. package/dist/components/avatar/index.cjs +2 -2
  82. package/dist/components/avatar/index.js +1 -1
  83. package/dist/components/bottom-sheet/bottom-sheet.d.cts +1 -1
  84. package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
  85. package/dist/components/bottom-sheet/index.cjs +2 -2
  86. package/dist/components/bottom-sheet/index.js +1 -1
  87. package/dist/components/card/card-background.d.cts +1 -1
  88. package/dist/components/card/card-background.d.ts +1 -1
  89. package/dist/components/card/card.utils.d.cts +1 -1
  90. package/dist/components/card/card.utils.d.ts +1 -1
  91. package/dist/components/checkbox/checkbox.recipe.d.cts +1 -1
  92. package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
  93. package/dist/components/checkbox/checkbox.type.d.cts +1 -1
  94. package/dist/components/checkbox/checkbox.type.d.ts +1 -1
  95. package/dist/components/checkbox/index.cjs +2 -2
  96. package/dist/components/checkbox/index.js +1 -1
  97. package/dist/components/chip/chip.type.d.cts +1 -1
  98. package/dist/components/chip/chip.type.d.ts +1 -1
  99. package/dist/components/chip/index.cjs +2 -2
  100. package/dist/components/chip/index.js +1 -1
  101. package/dist/components/color-picker/index.cjs +7 -7
  102. package/dist/components/color-picker/index.js +6 -6
  103. package/dist/components/combobox/index.cjs +4 -4
  104. package/dist/components/combobox/index.js +3 -3
  105. package/dist/components/date-picker/index.cjs +4 -4
  106. package/dist/components/date-picker/index.js +3 -3
  107. package/dist/components/date-range-picker/index.cjs +4 -4
  108. package/dist/components/date-range-picker/index.js +3 -3
  109. package/dist/components/date-time-picker/index.cjs +5 -5
  110. package/dist/components/date-time-picker/index.js +4 -4
  111. package/dist/components/dialog/index.cjs +2 -2
  112. package/dist/components/dialog/index.js +1 -1
  113. package/dist/components/dummy-field/index.cjs +5 -5
  114. package/dist/components/dummy-field/index.js +4 -4
  115. package/dist/components/field-group/field-group-icon.d.cts +1 -1
  116. package/dist/components/field-group/field-group-icon.d.ts +1 -1
  117. package/dist/components/field-group/index.cjs +4 -4
  118. package/dist/components/field-group/index.js +3 -3
  119. package/dist/components/index.d.cts +1 -0
  120. package/dist/components/index.d.ts +1 -0
  121. package/dist/components/input-otp/input-otp.type.d.cts +1 -1
  122. package/dist/components/input-otp/input-otp.type.d.ts +1 -1
  123. package/dist/components/list-box/list-box-item-suffix.d.cts +1 -1
  124. package/dist/components/list-box/list-box-item-suffix.d.ts +1 -1
  125. package/dist/components/mask-field/index.cjs +5 -5
  126. package/dist/components/mask-field/index.js +4 -4
  127. package/dist/components/menu/index.cjs +2 -2
  128. package/dist/components/menu/index.js +1 -1
  129. package/dist/components/number-field/index.cjs +5 -5
  130. package/dist/components/number-field/index.js +4 -4
  131. package/dist/components/phone-number-field/index.cjs +37 -30
  132. package/dist/components/phone-number-field/index.js +13 -6
  133. package/dist/components/popover/index.cjs +2 -2
  134. package/dist/components/popover/index.js +1 -1
  135. package/dist/components/popover/popover.recipe.d.cts +1 -1
  136. package/dist/components/popover/popover.recipe.d.ts +1 -1
  137. package/dist/components/search-field/index.cjs +5 -5
  138. package/dist/components/search-field/index.js +4 -4
  139. package/dist/components/select/index.cjs +3 -3
  140. package/dist/components/select/index.js +2 -2
  141. package/dist/components/select/select-indicator.d.cts +1 -1
  142. package/dist/components/select/select-indicator.d.ts +1 -1
  143. package/dist/components/skeleton/skeleton.type.d.cts +1 -1
  144. package/dist/components/skeleton/skeleton.type.d.ts +1 -1
  145. package/dist/components/slide-button/index.cjs +30 -0
  146. package/dist/components/slide-button/index.d.cts +44 -0
  147. package/dist/components/slide-button/index.d.ts +44 -0
  148. package/dist/components/slide-button/index.js +30 -0
  149. package/dist/components/slide-button/slide-button-fill.d.cts +29 -0
  150. package/dist/components/slide-button/slide-button-fill.d.ts +29 -0
  151. package/dist/components/slide-button/slide-button-icon.d.cts +10 -0
  152. package/dist/components/slide-button/slide-button-icon.d.ts +10 -0
  153. package/dist/components/slide-button/slide-button-label.d.cts +20 -0
  154. package/dist/components/slide-button/slide-button-label.d.ts +20 -0
  155. package/dist/components/slide-button/slide-button-thumb.d.cts +20 -0
  156. package/dist/components/slide-button/slide-button-thumb.d.ts +20 -0
  157. package/dist/components/slide-button/slide-button.animation.d.cts +33 -0
  158. package/dist/components/slide-button/slide-button.animation.d.ts +33 -0
  159. package/dist/components/slide-button/slide-button.context.d.cts +7 -0
  160. package/dist/components/slide-button/slide-button.context.d.ts +7 -0
  161. package/dist/components/slide-button/slide-button.d.cts +56 -0
  162. package/dist/components/slide-button/slide-button.d.ts +56 -0
  163. package/dist/components/slide-button/slide-button.recipe.d.cts +31 -0
  164. package/dist/components/slide-button/slide-button.recipe.d.ts +31 -0
  165. package/dist/components/slide-button/slide-button.type.d.cts +79 -0
  166. package/dist/components/slide-button/slide-button.type.d.ts +79 -0
  167. package/dist/components/slider/slider-thumb.d.cts +1 -1
  168. package/dist/components/slider/slider-thumb.d.ts +1 -1
  169. package/dist/components/slider/slider.recipe.d.cts +1 -1
  170. package/dist/components/slider/slider.recipe.d.ts +1 -1
  171. package/dist/components/spinner/spinner.d.cts +1 -1
  172. package/dist/components/spinner/spinner.d.ts +1 -1
  173. package/dist/components/switch/switch.style.d.cts +1 -1
  174. package/dist/components/switch/switch.style.d.ts +1 -1
  175. package/dist/components/table/index.cjs +3 -3
  176. package/dist/components/table/index.js +2 -2
  177. package/dist/components/text-area/index.cjs +4 -4
  178. package/dist/components/text-area/index.js +3 -3
  179. package/dist/components/text-area/text-area.d.cts +1 -1
  180. package/dist/components/text-area/text-area.d.ts +1 -1
  181. package/dist/components/text-field/index.cjs +3 -3
  182. package/dist/components/text-field/index.js +2 -2
  183. package/dist/components/text-field/text-field.type.d.cts +4 -4
  184. package/dist/components/text-field/text-field.type.d.ts +4 -4
  185. package/dist/components/time-picker/index.cjs +4 -4
  186. package/dist/components/time-picker/index.js +3 -3
  187. package/dist/components/toast/index.cjs +2 -2
  188. package/dist/components/toast/index.js +1 -1
  189. package/dist/components/toast/toast.animation.d.cts +2 -2
  190. package/dist/components/toast/toast.animation.d.ts +2 -2
  191. package/dist/components/toast/toast.utils.d.cts +1 -1
  192. package/dist/components/toast/toast.utils.d.ts +1 -1
  193. package/dist/components/typography/typography.type.d.cts +1 -1
  194. package/dist/components/typography/typography.type.d.ts +1 -1
  195. package/dist/hooks/use-rotation.d.cts +1 -1
  196. package/dist/hooks/use-rotation.d.ts +1 -1
  197. package/dist/index.cjs +56 -38
  198. package/dist/index.js +64 -46
  199. package/dist/system/anchored/indicator-spring.d.cts +2 -2
  200. package/dist/system/anchored/indicator-spring.d.ts +2 -2
  201. package/dist/theme/derive-colors.d.cts +1 -1
  202. package/dist/theme/derive-colors.d.ts +1 -1
  203. package/dist/theme/index.cjs +2 -2
  204. package/dist/theme/index.js +1 -1
  205. package/package.json +11 -1
@@ -0,0 +1,10 @@
1
+ import type { SlideButtonIconProps } from './slide-button.type';
2
+ /**
3
+ * The mark in the thumb. Written inside `SlideButton.Thumb`, it inherits the handle's glyph
4
+ * size and — because the handle is the surface colour whatever the pill does — the theme's
5
+ * foreground. `size` and `color` override both.
6
+ */
7
+ export declare function SlideButtonIcon({ size, color, ...rest }: SlideButtonIconProps): import("react").JSX.Element;
8
+ export declare namespace SlideButtonIcon {
9
+ var displayName: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { SlideButtonIconProps } from './slide-button.type';
2
+ /**
3
+ * The mark in the thumb. Written inside `SlideButton.Thumb`, it inherits the handle's glyph
4
+ * size and — because the handle is the surface colour whatever the pill does — the theme's
5
+ * foreground. `size` and `color` override both.
6
+ */
7
+ export declare function SlideButtonIcon({ size, color, ...rest }: SlideButtonIconProps): import("react").JSX.Element;
8
+ export declare namespace SlideButtonIcon {
9
+ var displayName: string;
10
+ }
@@ -0,0 +1,20 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * The instruction, centred across the whole pill. The thumb slides over it rather than
4
+ * beside it — there is no gap to keep, because they are not laid out together.
5
+ *
6
+ * **It is drawn twice.** On the four intent variants the pill sweeps from its soft slice
7
+ * to the vivid one, and no single text colour survives that: painted for the soft pill a
8
+ * label reads about 1.3:1 against the vivid trail, painted for the trail it is invisible
9
+ * at rest. So the second copy is painted for the swept ground and clipped to exactly the
10
+ * trail's width — a word the trail is halfway through is dark on the half that is still
11
+ * soft and light on the half that is not. Where a variant names no `fgSelected` both
12
+ * copies resolve to the same colour and the second one costs a `Text` that changes
13
+ * nothing.
14
+ *
15
+ * The clip's width is driven on the UI thread off the same shared offset the trail reads,
16
+ * so the two edges are the same edge and never separate under the finger.
17
+ */
18
+ export declare const SlideButtonLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
19
+ children?: import("react").ReactNode;
20
+ } & import("react").RefAttributes<Text>>;
@@ -0,0 +1,20 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * The instruction, centred across the whole pill. The thumb slides over it rather than
4
+ * beside it — there is no gap to keep, because they are not laid out together.
5
+ *
6
+ * **It is drawn twice.** On the four intent variants the pill sweeps from its soft slice
7
+ * to the vivid one, and no single text colour survives that: painted for the soft pill a
8
+ * label reads about 1.3:1 against the vivid trail, painted for the trail it is invisible
9
+ * at rest. So the second copy is painted for the swept ground and clipped to exactly the
10
+ * trail's width — a word the trail is halfway through is dark on the half that is still
11
+ * soft and light on the half that is not. Where a variant names no `fgSelected` both
12
+ * copies resolve to the same colour and the second one costs a `Text` that changes
13
+ * nothing.
14
+ *
15
+ * The clip's width is driven on the UI thread off the same shared offset the trail reads,
16
+ * so the two edges are the same edge and never separate under the finger.
17
+ */
18
+ export declare const SlideButtonLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
19
+ children?: import("react").ReactNode;
20
+ } & import("react").RefAttributes<Text>>;
@@ -0,0 +1,20 @@
1
+ import type { SlideButtonThumbProps } from './slide-button.type';
2
+ /**
3
+ * The handle the finger drags.
4
+ *
5
+ * The pan runs on `react-native-gesture-handler`, the same **optional** peer the `Slider`
6
+ * reaches for and imported here and nowhere else — an app that never touches
7
+ * `@xaui/native/slide-button` does not pay for it.
8
+ *
9
+ * Everything the finger does stays on the UI thread: the offset is a shared value the pan
10
+ * writes and the fill and the handle both read. The one hop to JS is `runOnJS` on release,
11
+ * once, when the slide has reached the threshold — the confirm is React state and a
12
+ * callback, and neither belongs on the worklet.
13
+ *
14
+ * With no children it draws the built-in chevron, mirrored under RTL so it always points
15
+ * the way the handle travels. Pass an `Icon` — or anything — to replace it.
16
+ */
17
+ export declare function SlideButtonThumb({ children, style, ...props }: SlideButtonThumbProps): import("react").JSX.Element;
18
+ export declare namespace SlideButtonThumb {
19
+ var displayName: string;
20
+ }
@@ -0,0 +1,20 @@
1
+ import type { SlideButtonThumbProps } from './slide-button.type';
2
+ /**
3
+ * The handle the finger drags.
4
+ *
5
+ * The pan runs on `react-native-gesture-handler`, the same **optional** peer the `Slider`
6
+ * reaches for and imported here and nowhere else — an app that never touches
7
+ * `@xaui/native/slide-button` does not pay for it.
8
+ *
9
+ * Everything the finger does stays on the UI thread: the offset is a shared value the pan
10
+ * writes and the fill and the handle both read. The one hop to JS is `runOnJS` on release,
11
+ * once, when the slide has reached the threshold — the confirm is React state and a
12
+ * callback, and neither belongs on the worklet.
13
+ *
14
+ * With no children it draws the built-in chevron, mirrored under RTL so it always points
15
+ * the way the handle travels. Pass an `Icon` — or anything — to replace it.
16
+ */
17
+ export declare function SlideButtonThumb({ children, style, ...props }: SlideButtonThumbProps): import("react").JSX.Element;
18
+ export declare namespace SlideButtonThumb {
19
+ var displayName: string;
20
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The thumb's motion.
3
+ *
4
+ * It grows a little under the finger, the only confirmation the control can give that the
5
+ * drag has taken — the finger is already over the handle, so the scale is what shows in the
6
+ * ring of pill around it. The `Slider`'s knob does the same.
7
+ */
8
+ export declare const THUMB_PRESSED_SCALE = 1.06;
9
+ /**
10
+ * How the thumb settles when the finger lifts — springing home if the slide fell short,
11
+ * or on to the end if it did not. Stiff and well damped: a confirmation arrives, it does
12
+ * not wobble.
13
+ */
14
+ export declare const THUMB_SPRING: {
15
+ readonly damping: 20;
16
+ readonly stiffness: 260;
17
+ readonly mass: 0.7;
18
+ };
19
+ /** How far along the track the thumb must reach for the slide to count, from 0 to 1. */
20
+ export declare const DEFAULT_THRESHOLD = 0.9;
21
+ /**
22
+ * How much of the pill the slide has swept, in points — the trail's width, and the width
23
+ * of the clip the swept label is read through.
24
+ *
25
+ * It is the fraction of the travel laid over the **whole** pill rather than the handle's
26
+ * raw offset, because the handle stops a handle's width short of the trailing cap and a
27
+ * trail that stopped with it would leave a confirmed slide showing unswept pill.
28
+ *
29
+ * The two callers have to agree to the point: the trail paints the swept ground and the
30
+ * clip decides which half of a straddling word is painted for it. Two expressions of the
31
+ * same edge would eventually drift, so there is one.
32
+ */
33
+ export declare function sweptWidth(offset: number, travel: number, trackLength: number): number;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The thumb's motion.
3
+ *
4
+ * It grows a little under the finger, the only confirmation the control can give that the
5
+ * drag has taken — the finger is already over the handle, so the scale is what shows in the
6
+ * ring of pill around it. The `Slider`'s knob does the same.
7
+ */
8
+ export declare const THUMB_PRESSED_SCALE = 1.06;
9
+ /**
10
+ * How the thumb settles when the finger lifts — springing home if the slide fell short,
11
+ * or on to the end if it did not. Stiff and well damped: a confirmation arrives, it does
12
+ * not wobble.
13
+ */
14
+ export declare const THUMB_SPRING: {
15
+ readonly damping: 20;
16
+ readonly stiffness: 260;
17
+ readonly mass: 0.7;
18
+ };
19
+ /** How far along the track the thumb must reach for the slide to count, from 0 to 1. */
20
+ export declare const DEFAULT_THRESHOLD = 0.9;
21
+ /**
22
+ * How much of the pill the slide has swept, in points — the trail's width, and the width
23
+ * of the clip the swept label is read through.
24
+ *
25
+ * It is the fraction of the travel laid over the **whole** pill rather than the handle's
26
+ * raw offset, because the handle stops a handle's width short of the trailing cap and a
27
+ * trail that stopped with it would leave a confirmed slide showing unswept pill.
28
+ *
29
+ * The two callers have to agree to the point: the trail paints the swept ground and the
30
+ * clip decides which half of a straddling word is painted for it. Two expressions of the
31
+ * same edge would eventually drift, so there is one.
32
+ */
33
+ export declare function sweptWidth(offset: number, travel: number, trackLength: number): number;
@@ -0,0 +1,7 @@
1
+ import type { SlideButtonContextValue } from './slide-button.type';
2
+ /**
3
+ * R10 — `useSlideButton` is exported so a third party can write its own slot (a second
4
+ * mark, a progress readout) against the same resolved styles and the same shared offset
5
+ * the built-in ones read. Outside a `<SlideButton>` it throws by name.
6
+ */
7
+ export declare const SlideButtonProvider: import("react").Provider<SlideButtonContextValue | null>, useSlideButton: () => SlideButtonContextValue;
@@ -0,0 +1,7 @@
1
+ import type { SlideButtonContextValue } from './slide-button.type';
2
+ /**
3
+ * R10 — `useSlideButton` is exported so a third party can write its own slot (a second
4
+ * mark, a progress readout) against the same resolved styles and the same shared offset
5
+ * the built-in ones read. Outside a `<SlideButton>` it throws by name.
6
+ */
7
+ export declare const SlideButtonProvider: import("react").Provider<SlideButtonContextValue | null>, useSlideButton: () => SlideButtonContextValue;
@@ -0,0 +1,56 @@
1
+ import { View } from 'react-native';
2
+ import type { ViewStyle } from 'react-native';
3
+ /**
4
+ * A button you drag rather than tap, for the action that should not happen by accident:
5
+ * slide the thumb to the far end and it fires once. Below the threshold it springs home.
6
+ *
7
+ * ```tsx
8
+ * <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
9
+ *
10
+ * <SlideButton variant="danger" onConfirm={wipe}>
11
+ * <SlideButton.Fill />
12
+ * <SlideButton.Label>Slide to delete</SlideButton.Label>
13
+ * <SlideButton.Thumb>
14
+ * <SlideButton.Icon as={TrashIcon} />
15
+ * </SlideButton.Thumb>
16
+ * </SlideButton>
17
+ * ```
18
+ *
19
+ * **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
20
+ * same optional `react-native-gesture-handler` peer, the track measures its own length
21
+ * the same way, and the travel is inset by the thumb at each end for the same reason —
22
+ * but there is no `min`, `max` or `step`, because the only positions that mean anything
23
+ * are "not yet" and "done".
24
+ *
25
+ * **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
26
+ * `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
27
+ *
28
+ * **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
29
+ * the fill, the label and the thumb for you; write the slots out to put a mark in the
30
+ * thumb or leave the fill off.
31
+ */
32
+ export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
33
+ children?: import("react").ReactNode;
34
+ variant?: import("./slide-button.type").SlideButtonVariant;
35
+ size?: import("./slide-button.type").SlideButtonSize;
36
+ radius?: import("../..").RadiusKey;
37
+ color?: string;
38
+ threshold?: number;
39
+ isConfirmed?: boolean;
40
+ defaultConfirmed?: boolean;
41
+ onConfirm?: () => void;
42
+ isDisabled?: boolean;
43
+ style?: import("react-native").StyleProp<ViewStyle>;
44
+ } & Omit<import("react-native").ViewProps, keyof {
45
+ children?: import("react").ReactNode;
46
+ variant?: import("./slide-button.type").SlideButtonVariant;
47
+ size?: import("./slide-button.type").SlideButtonSize;
48
+ radius?: import("../..").RadiusKey;
49
+ color?: string;
50
+ threshold?: number;
51
+ isConfirmed?: boolean;
52
+ defaultConfirmed?: boolean;
53
+ onConfirm?: () => void;
54
+ isDisabled?: boolean;
55
+ style?: import("react-native").StyleProp<ViewStyle>;
56
+ }> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
@@ -0,0 +1,56 @@
1
+ import { View } from 'react-native';
2
+ import type { ViewStyle } from 'react-native';
3
+ /**
4
+ * A button you drag rather than tap, for the action that should not happen by accident:
5
+ * slide the thumb to the far end and it fires once. Below the threshold it springs home.
6
+ *
7
+ * ```tsx
8
+ * <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
9
+ *
10
+ * <SlideButton variant="danger" onConfirm={wipe}>
11
+ * <SlideButton.Fill />
12
+ * <SlideButton.Label>Slide to delete</SlideButton.Label>
13
+ * <SlideButton.Thumb>
14
+ * <SlideButton.Icon as={TrashIcon} />
15
+ * </SlideButton.Thumb>
16
+ * </SlideButton>
17
+ * ```
18
+ *
19
+ * **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
20
+ * same optional `react-native-gesture-handler` peer, the track measures its own length
21
+ * the same way, and the travel is inset by the thumb at each end for the same reason —
22
+ * but there is no `min`, `max` or `step`, because the only positions that mean anything
23
+ * are "not yet" and "done".
24
+ *
25
+ * **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
26
+ * `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
27
+ *
28
+ * **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
29
+ * the fill, the label and the thumb for you; write the slots out to put a mark in the
30
+ * thumb or leave the fill off.
31
+ */
32
+ export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
33
+ children?: import("react").ReactNode;
34
+ variant?: import("./slide-button.type").SlideButtonVariant;
35
+ size?: import("./slide-button.type").SlideButtonSize;
36
+ radius?: import("../..").RadiusKey;
37
+ color?: string;
38
+ threshold?: number;
39
+ isConfirmed?: boolean;
40
+ defaultConfirmed?: boolean;
41
+ onConfirm?: () => void;
42
+ isDisabled?: boolean;
43
+ style?: import("react-native").StyleProp<ViewStyle>;
44
+ } & Omit<import("react-native").ViewProps, keyof {
45
+ children?: import("react").ReactNode;
46
+ variant?: import("./slide-button.type").SlideButtonVariant;
47
+ size?: import("./slide-button.type").SlideButtonSize;
48
+ radius?: import("../..").RadiusKey;
49
+ color?: string;
50
+ threshold?: number;
51
+ isConfirmed?: boolean;
52
+ defaultConfirmed?: boolean;
53
+ onConfirm?: () => void;
54
+ isDisabled?: boolean;
55
+ style?: import("react-native").StyleProp<ViewStyle>;
56
+ }> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
@@ -0,0 +1,31 @@
1
+ import type { SlotStyles } from '../../system/recipe';
2
+ import type { XAUITheme } from '../../theme/theme.type';
3
+ import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
4
+ type SizeStep = {
5
+ /** The control-height key. The handle's height is that less twice the inset. */
6
+ height: SlideButtonSize;
7
+ /** How far the handle sits in from the pill's edge, in points. The air around it. */
8
+ inset: number;
9
+ /**
10
+ * The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
11
+ * in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
12
+ */
13
+ glyph: number;
14
+ /** The label's type key. */
15
+ label: SlideButtonSize;
16
+ };
17
+ /**
18
+ * The three sizes, measured rather than scaled off one number: a slide button is a target
19
+ * before it is type, so the height leads and the rest follows it.
20
+ */
21
+ declare const SIZES: Record<SlideButtonSize, SizeStep>;
22
+ export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
23
+ readonly size: {
24
+ readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
25
+ readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
26
+ readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
27
+ };
28
+ /** After `size`, so a caller's `radius` wins over the pill's `full`. */
29
+ readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
30
+ }>;
31
+ export { SIZES as slideButtonSizes };
@@ -0,0 +1,31 @@
1
+ import type { SlotStyles } from '../../system/recipe';
2
+ import type { XAUITheme } from '../../theme/theme.type';
3
+ import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
4
+ type SizeStep = {
5
+ /** The control-height key. The handle's height is that less twice the inset. */
6
+ height: SlideButtonSize;
7
+ /** How far the handle sits in from the pill's edge, in points. The air around it. */
8
+ inset: number;
9
+ /**
10
+ * The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
11
+ * in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
12
+ */
13
+ glyph: number;
14
+ /** The label's type key. */
15
+ label: SlideButtonSize;
16
+ };
17
+ /**
18
+ * The three sizes, measured rather than scaled off one number: a slide button is a target
19
+ * before it is type, so the height leads and the rest follows it.
20
+ */
21
+ declare const SIZES: Record<SlideButtonSize, SizeStep>;
22
+ export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
23
+ readonly size: {
24
+ readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
25
+ readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
26
+ readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
27
+ };
28
+ /** After `size`, so a caller's `radius` wins over the pill's `full`. */
29
+ readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
30
+ }>;
31
+ export { SIZES as slideButtonSizes };
@@ -0,0 +1,79 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SharedValue } from 'react-native-reanimated';
3
+ import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
4
+ import type { IconContextValue, IconProps } from '../../system/icon';
5
+ import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
6
+ import type { RadiusKey } from '../../theme/theme.type';
7
+ export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
8
+ /**
9
+ * The flat variant union, the same ten values every control in the library takes. A
10
+ * slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
11
+ * intents stay.
12
+ */
13
+ export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
14
+ export type SlideButtonSize = 'sm' | 'md' | 'lg';
15
+ type SlideButtonOwnProps = {
16
+ children?: ReactNode;
17
+ variant?: SlideButtonVariant;
18
+ /** Height, horizontal padding and the label's type. Never a width. */
19
+ size?: SlideButtonSize;
20
+ /** Overrides the pill's corner. `full` unless you say otherwise. */
21
+ radius?: RadiusKey;
22
+ /** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
23
+ color?: string;
24
+ /**
25
+ * How far along the track the thumb has to reach for the slide to count, from 0 to 1.
26
+ * Below it the thumb springs home on release.
27
+ * @default 0.9
28
+ */
29
+ threshold?: number;
30
+ /** Controlled: `true` pins the thumb at the end, `false` springs it home. */
31
+ isConfirmed?: boolean;
32
+ /** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
33
+ defaultConfirmed?: boolean;
34
+ /** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
35
+ onConfirm?: () => void;
36
+ isDisabled?: boolean;
37
+ style?: StyleProp<ViewStyle>;
38
+ };
39
+ export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
40
+ type SlideButtonFillOwnProps = {
41
+ children?: never;
42
+ };
43
+ export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
44
+ export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
45
+ children?: ReactNode;
46
+ };
47
+ type SlideButtonThumbOwnProps = {
48
+ /** Replaces the built-in chevron — an `Icon`, or anything else. */
49
+ children?: ReactNode;
50
+ };
51
+ export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
52
+ export type SlideButtonIconProps = IconProps;
53
+ /** R5 — resolved style ids and the shared progress the animated slots read. */
54
+ export type SlideButtonContextValue = {
55
+ /** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
56
+ fillClipStyle: StyleProp<ViewStyle>;
57
+ fillStyle: StyleProp<ViewStyle>;
58
+ labelStyle: StyleProp<TextStyle>;
59
+ /** The label's swept copy, already carrying the width the clip must not re-centre it in. */
60
+ labelSweptStyle: StyleProp<TextStyle>;
61
+ thumbStyle: StyleProp<ViewStyle>;
62
+ glyphStyle: StyleProp<ViewStyle>;
63
+ icon: IconContextValue;
64
+ /** The handle's offset from the leading edge, in points, driven on the UI thread. */
65
+ offset: SharedValue<number>;
66
+ /** How far the handle can travel — the track's length less the handle and its insets. */
67
+ travel: number;
68
+ /** The handle's width, the amount the travel is shortened by. */
69
+ thumbSize: number;
70
+ /** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
71
+ threshold: number;
72
+ isDisabled: boolean;
73
+ isConfirmed: boolean;
74
+ /** Called from the pan on release once the thumb has reached `threshold`. */
75
+ confirm: () => void;
76
+ /** The pill's measured width. Zero until it has been laid out. */
77
+ trackLength: number;
78
+ };
79
+ export {};
@@ -0,0 +1,79 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SharedValue } from 'react-native-reanimated';
3
+ import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
4
+ import type { IconContextValue, IconProps } from '../../system/icon';
5
+ import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
6
+ import type { RadiusKey } from '../../theme/theme.type';
7
+ export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
8
+ /**
9
+ * The flat variant union, the same ten values every control in the library takes. A
10
+ * slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
11
+ * intents stay.
12
+ */
13
+ export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
14
+ export type SlideButtonSize = 'sm' | 'md' | 'lg';
15
+ type SlideButtonOwnProps = {
16
+ children?: ReactNode;
17
+ variant?: SlideButtonVariant;
18
+ /** Height, horizontal padding and the label's type. Never a width. */
19
+ size?: SlideButtonSize;
20
+ /** Overrides the pill's corner. `full` unless you say otherwise. */
21
+ radius?: RadiusKey;
22
+ /** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
23
+ color?: string;
24
+ /**
25
+ * How far along the track the thumb has to reach for the slide to count, from 0 to 1.
26
+ * Below it the thumb springs home on release.
27
+ * @default 0.9
28
+ */
29
+ threshold?: number;
30
+ /** Controlled: `true` pins the thumb at the end, `false` springs it home. */
31
+ isConfirmed?: boolean;
32
+ /** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
33
+ defaultConfirmed?: boolean;
34
+ /** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
35
+ onConfirm?: () => void;
36
+ isDisabled?: boolean;
37
+ style?: StyleProp<ViewStyle>;
38
+ };
39
+ export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
40
+ type SlideButtonFillOwnProps = {
41
+ children?: never;
42
+ };
43
+ export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
44
+ export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
45
+ children?: ReactNode;
46
+ };
47
+ type SlideButtonThumbOwnProps = {
48
+ /** Replaces the built-in chevron — an `Icon`, or anything else. */
49
+ children?: ReactNode;
50
+ };
51
+ export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
52
+ export type SlideButtonIconProps = IconProps;
53
+ /** R5 — resolved style ids and the shared progress the animated slots read. */
54
+ export type SlideButtonContextValue = {
55
+ /** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
56
+ fillClipStyle: StyleProp<ViewStyle>;
57
+ fillStyle: StyleProp<ViewStyle>;
58
+ labelStyle: StyleProp<TextStyle>;
59
+ /** The label's swept copy, already carrying the width the clip must not re-centre it in. */
60
+ labelSweptStyle: StyleProp<TextStyle>;
61
+ thumbStyle: StyleProp<ViewStyle>;
62
+ glyphStyle: StyleProp<ViewStyle>;
63
+ icon: IconContextValue;
64
+ /** The handle's offset from the leading edge, in points, driven on the UI thread. */
65
+ offset: SharedValue<number>;
66
+ /** How far the handle can travel — the track's length less the handle and its insets. */
67
+ travel: number;
68
+ /** The handle's width, the amount the travel is shortened by. */
69
+ thumbSize: number;
70
+ /** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
71
+ threshold: number;
72
+ isDisabled: boolean;
73
+ isConfirmed: boolean;
74
+ /** Called from the pan on release once the thumb has reached `threshold`. */
75
+ confirm: () => void;
76
+ /** The pill's measured width. Zero until it has been laid out. */
77
+ trackLength: number;
78
+ };
79
+ export {};
@@ -12,7 +12,7 @@ import type { SliderThumbProps } from './slider.type';
12
12
  * the scale can stay on the other thread.
13
13
  *
14
14
  * It is a **disc of the page's own colour inside a ring of the fill's**, which is the
15
- * legacy component's shape rather than HeroUI's capsule-with-a-core. A solid accent knob
15
+ * legacy component's shape rather than the reference implementation's capsule-with-a-core. A solid accent knob
16
16
  * on an accent fill disappears the moment the value reaches the top; a ring never does.
17
17
  */
18
18
  export declare function SliderThumb({ index, accessibilityValueText, style, ...props }: SliderThumbProps): import("react").JSX.Element;
@@ -12,7 +12,7 @@ import type { SliderThumbProps } from './slider.type';
12
12
  * the scale can stay on the other thread.
13
13
  *
14
14
  * It is a **disc of the page's own colour inside a ring of the fill's**, which is the
15
- * legacy component's shape rather than HeroUI's capsule-with-a-core. A solid accent knob
15
+ * legacy component's shape rather than the reference implementation's capsule-with-a-core. A solid accent knob
16
16
  * on an accent fill disappears the moment the value reaches the top; a ring never does.
17
17
  */
18
18
  export declare function SliderThumb({ index, accessibilityValueText, style, ...props }: SliderThumbProps): import("react").JSX.Element;
@@ -11,7 +11,7 @@ type SizeStep = {
11
11
  * The legacy slider's proportions, point for point.
12
12
  *
13
13
  * A **thin rail with a round knob on it**, not a capsule with a core inside — which is what
14
- * this component shipped as, borrowed from HeroUI's. The rail is 6 to 10 points and the
14
+ * this component shipped as, borrowed from the reference implementation's. The rail is 6 to 10 points and the
15
15
  * knob 16 to 24, so the knob overhangs the rail by half their difference on each side. That
16
16
  * overhang is the shape: it is what makes the knob read as sitting *on* a line rather than
17
17
  * as a segment *of* one.
@@ -11,7 +11,7 @@ type SizeStep = {
11
11
  * The legacy slider's proportions, point for point.
12
12
  *
13
13
  * A **thin rail with a round knob on it**, not a capsule with a core inside — which is what
14
- * this component shipped as, borrowed from HeroUI's. The rail is 6 to 10 points and the
14
+ * this component shipped as, borrowed from the reference implementation's. The rail is 6 to 10 points and the
15
15
  * knob 16 to 24, so the knob overhangs the rail by half their difference on each side. That
16
16
  * overhang is the shape: it is what makes the knob read as sitting *on* a line rather than
17
17
  * as a segment *of* one.
@@ -14,7 +14,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
14
14
  * the same circle with a quarter missing. There is nothing between them for a slot to
15
15
  * name, and the two are one figure rather than two parts.
16
16
  *
17
- * It is HeroUI's spinner drawn with borders instead of a gradient stroke. Theirs fades a
17
+ * It is the reference implementation's spinner drawn with borders instead of a gradient stroke. Theirs fades a
18
18
  * single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
19
19
  * `react-native-svg` — an optional peer, which a component in the fifteen-component core
20
20
  * cannot require. Two circles of one ink at two opacities read as the same figure and
@@ -14,7 +14,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
14
14
  * the same circle with a quarter missing. There is nothing between them for a slot to
15
15
  * name, and the two are one figure rather than two parts.
16
16
  *
17
- * It is HeroUI's spinner drawn with borders instead of a gradient stroke. Theirs fades a
17
+ * It is the reference implementation's spinner drawn with borders instead of a gradient stroke. Theirs fades a
18
18
  * single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
19
19
  * `react-native-svg` — an optional peer, which a component in the fifteen-component core
20
20
  * cannot require. Two circles of one ink at two opacities read as the same figure and
@@ -3,6 +3,6 @@
3
3
  * on two nodes, and they have to arrive together — which they only do if neither owns the
4
4
  * number.
5
5
  *
6
- * 175ms is HeroUI's, and it is the length of the platform's own switch.
6
+ * 175ms is the reference implementation's, and it is the length of the platform's own switch.
7
7
  */
8
8
  export declare const SWITCH_DURATION = 175;
@@ -3,6 +3,6 @@
3
3
  * on two nodes, and they have to arrive together — which they only do if neither owns the
4
4
  * number.
5
5
  *
6
- * 175ms is HeroUI's, and it is the length of the platform's own switch.
6
+ * 175ms is the reference implementation's, and it is the length of the platform's own switch.
7
7
  */
8
8
  export declare const SWITCH_DURATION = 175;