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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) 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-4LRVB6WR.cjs → chunk-3DQCHPB6.cjs} +12 -12
  5. package/dist/{chunk-5O7E73QP.cjs → chunk-3MMOZP4Y.cjs} +8 -8
  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-V4IFH65I.cjs → chunk-5CXOSDFI.cjs} +2 -2
  10. package/dist/{chunk-5XTF2JDK.js → chunk-5G36GMFS.js} +1 -1
  11. package/dist/{chunk-VBS6VWW4.cjs → chunk-5UT5I53X.cjs} +3 -3
  12. package/dist/{chunk-4AIIAF6U.js → chunk-73EVNWZI.js} +16 -16
  13. package/dist/{chunk-7OVYYZ7H.js → chunk-7EPH24S2.js} +15 -15
  14. package/dist/{chunk-G2YHGLN3.cjs → chunk-7JWOAGB3.cjs} +9 -9
  15. package/dist/{chunk-6SRFQSPR.cjs → chunk-ADGHFLBJ.cjs} +1 -1
  16. package/dist/{chunk-OZLOYXLW.js → chunk-BBQQIO6L.js} +4 -4
  17. package/dist/{chunk-X22PLAP6.cjs → chunk-BGBJTBFC.cjs} +1 -1
  18. package/dist/{chunk-33BA4LVN.js → chunk-BH4IN6H6.js} +1 -1
  19. package/dist/{chunk-WLWZG2PA.cjs → chunk-BKY5YQ7W.cjs} +1 -1
  20. package/dist/{chunk-AHJLQJOE.cjs → chunk-C2S6J27O.cjs} +1 -1
  21. package/dist/chunk-C6JO2RTV.cjs +752 -0
  22. package/dist/{chunk-2TLPFGGR.cjs → chunk-CS6CYB4I.cjs} +34 -25
  23. package/dist/{chunk-WYRM77XM.cjs → chunk-ENZBKNFJ.cjs} +15 -15
  24. package/dist/{chunk-ERIGD4SE.cjs → chunk-ETY5PM3E.cjs} +150 -39
  25. package/dist/{chunk-YJIVPYMG.cjs → chunk-FLKTJ46K.cjs} +15 -15
  26. package/dist/{chunk-OX23MW5E.js → chunk-FSVZXWLZ.js} +44 -44
  27. package/dist/{chunk-E5E2QA4K.js → chunk-GVZJNIHN.js} +176 -62
  28. package/dist/{chunk-6W45YHTF.js → chunk-HDERVGWZ.js} +1 -1
  29. package/dist/{chunk-KHPODIQV.cjs → chunk-IHRPAKCZ.cjs} +15 -15
  30. package/dist/{chunk-2XEQDQAN.js → chunk-IVELCJEN.js} +99 -99
  31. package/dist/{chunk-5YZUYSV7.js → chunk-JYV53WUN.js} +1 -1
  32. package/dist/{chunk-DE4RSR7Q.cjs → chunk-KAYZH7ZN.cjs} +1 -1
  33. package/dist/{chunk-IMIY34F4.cjs → chunk-KIXHSX3L.cjs} +1 -1
  34. package/dist/{chunk-7M6YKCHX.js → chunk-KZZWNDDO.js} +2 -2
  35. package/dist/{chunk-J5COSALO.cjs → chunk-L4B6Z45Q.cjs} +5 -5
  36. package/dist/{chunk-KFB24VYT.js → chunk-LMMHAGOM.js} +26 -17
  37. package/dist/{chunk-EQUD3NHO.js → chunk-LYWXGEED.js} +43 -43
  38. package/dist/{chunk-BYDGJU5A.js → chunk-M352N6PQ.js} +5 -5
  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-K7VDLVLE.js → chunk-NQDTGYHC.js} +3 -3
  42. package/dist/{chunk-NADCILBL.cjs → chunk-NRU5APUE.cjs} +4 -4
  43. package/dist/{chunk-43S673KF.js → chunk-NTVPLDJC.js} +1 -1
  44. package/dist/{chunk-7AVZ2FST.cjs → chunk-NXVSNESK.cjs} +12 -12
  45. package/dist/{chunk-E4FWGZH2.js → chunk-OUNTRW6E.js} +5 -5
  46. package/dist/{chunk-MNBEUNC5.cjs → chunk-QRH45OO3.cjs} +144 -33
  47. package/dist/chunk-SVS726BW.js +822 -0
  48. package/dist/{chunk-YOPWQHNO.js → chunk-TNFLBURM.js} +1 -1
  49. package/dist/{chunk-YCQEX25B.cjs → chunk-U6YD3UBO.cjs} +7 -7
  50. package/dist/{chunk-GN7BWYXP.cjs → chunk-USQK6SFZ.cjs} +15 -15
  51. package/dist/{chunk-QT7KLGO3.js → chunk-V5FYHQKQ.js} +102 -87
  52. package/dist/{chunk-KMK6FUTK.cjs → chunk-V5V2QYFH.cjs} +9 -9
  53. package/dist/{chunk-YGETADPV.js → chunk-V7YT4SDX.js} +2 -2
  54. package/dist/{chunk-DBP5CA5R.js → chunk-VL2ZT4BB.js} +3 -3
  55. package/dist/{chunk-Q6OVVUAT.js → chunk-VTGWFZCA.js} +2 -2
  56. package/dist/{chunk-YI5D4QZP.js → chunk-WIGDDZHO.js} +190 -76
  57. package/dist/{chunk-NGXLJ5ZF.cjs → chunk-WSDDUVF6.cjs} +22 -22
  58. package/dist/{chunk-AIHKBSQ5.cjs → chunk-YUCK5VJO.cjs} +8 -8
  59. package/dist/{chunk-SIOSYITD.cjs → chunk-ZBFBF7S4.cjs} +60 -45
  60. package/dist/{chunk-SX5U5UJQ.js → chunk-ZBY7Q7WJ.js} +2 -2
  61. package/dist/{chunk-53E2E7GS.cjs → chunk-ZNKHL5O6.cjs} +15 -15
  62. package/dist/{chunk-U5CUBDJA.js → chunk-ZR5YOCOQ.js} +15 -15
  63. package/dist/components/accordion/accordion.animation.d.cts +1 -1
  64. package/dist/components/accordion/accordion.animation.d.ts +1 -1
  65. package/dist/components/accordion/accordion.type.d.cts +1 -1
  66. package/dist/components/accordion/accordion.type.d.ts +1 -1
  67. package/dist/components/accordion/index.cjs +2 -2
  68. package/dist/components/accordion/index.js +1 -1
  69. package/dist/components/agenda-calendar/agenda-calendar-today-button.d.cts +4 -0
  70. package/dist/components/agenda-calendar/agenda-calendar-today-button.d.ts +4 -0
  71. package/dist/components/agenda-calendar/agenda-calendar.recipe.d.cts +1 -1
  72. package/dist/components/agenda-calendar/agenda-calendar.recipe.d.ts +1 -1
  73. package/dist/components/agenda-calendar/agenda-calendar.type.d.cts +4 -1
  74. package/dist/components/agenda-calendar/agenda-calendar.type.d.ts +4 -1
  75. package/dist/components/agenda-calendar/index.cjs +2 -2
  76. package/dist/components/agenda-calendar/index.js +1 -1
  77. package/dist/components/alert/alert-icon.d.cts +2 -2
  78. package/dist/components/alert/alert-icon.d.ts +2 -2
  79. package/dist/components/alert/alert.type.d.cts +1 -1
  80. package/dist/components/alert/alert.type.d.ts +1 -1
  81. package/dist/components/alert/index.cjs +2 -2
  82. package/dist/components/alert/index.js +1 -1
  83. package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
  84. package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
  85. package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
  86. package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
  87. package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
  88. package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
  89. package/dist/components/autocomplete/autocomplete.d.cts +50 -7
  90. package/dist/components/autocomplete/autocomplete.d.ts +50 -7
  91. package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
  92. package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
  93. package/dist/components/autocomplete/index.cjs +10 -3
  94. package/dist/components/autocomplete/index.d.cts +50 -3
  95. package/dist/components/autocomplete/index.d.ts +50 -3
  96. package/dist/components/autocomplete/index.js +9 -2
  97. package/dist/components/avatar/avatar-fallback.d.cts +1 -1
  98. package/dist/components/avatar/avatar-fallback.d.ts +1 -1
  99. package/dist/components/avatar/avatar.d.cts +1 -1
  100. package/dist/components/avatar/avatar.d.ts +1 -1
  101. package/dist/components/avatar/avatar.type.d.cts +1 -1
  102. package/dist/components/avatar/avatar.type.d.ts +1 -1
  103. package/dist/components/avatar/index.cjs +2 -2
  104. package/dist/components/avatar/index.js +1 -1
  105. package/dist/components/bottom-sheet/bottom-sheet.d.cts +1 -1
  106. package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
  107. package/dist/components/bottom-sheet/index.cjs +2 -2
  108. package/dist/components/bottom-sheet/index.js +1 -1
  109. package/dist/components/card/card-background.d.cts +1 -1
  110. package/dist/components/card/card-background.d.ts +1 -1
  111. package/dist/components/card/card.utils.d.cts +1 -1
  112. package/dist/components/card/card.utils.d.ts +1 -1
  113. package/dist/components/checkbox/checkbox.recipe.d.cts +1 -1
  114. package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
  115. package/dist/components/checkbox/checkbox.type.d.cts +1 -1
  116. package/dist/components/checkbox/checkbox.type.d.ts +1 -1
  117. package/dist/components/checkbox/index.cjs +2 -2
  118. package/dist/components/checkbox/index.js +1 -1
  119. package/dist/components/chip/chip.type.d.cts +1 -1
  120. package/dist/components/chip/chip.type.d.ts +1 -1
  121. package/dist/components/chip/index.cjs +2 -2
  122. package/dist/components/chip/index.js +1 -1
  123. package/dist/components/color-picker/index.cjs +7 -7
  124. package/dist/components/color-picker/index.js +6 -6
  125. package/dist/components/combobox/combobox.type.d.cts +5 -1
  126. package/dist/components/combobox/combobox.type.d.ts +5 -1
  127. package/dist/components/combobox/index.cjs +5 -4
  128. package/dist/components/combobox/index.d.cts +15 -1
  129. package/dist/components/combobox/index.d.ts +15 -1
  130. package/dist/components/combobox/index.js +4 -3
  131. package/dist/components/date-picker/index.cjs +4 -4
  132. package/dist/components/date-picker/index.js +3 -3
  133. package/dist/components/date-range-picker/index.cjs +4 -4
  134. package/dist/components/date-range-picker/index.js +3 -3
  135. package/dist/components/date-time-picker/index.cjs +5 -5
  136. package/dist/components/date-time-picker/index.js +4 -4
  137. package/dist/components/dialog/index.cjs +2 -2
  138. package/dist/components/dialog/index.js +1 -1
  139. package/dist/components/dummy-field/index.cjs +5 -5
  140. package/dist/components/dummy-field/index.js +4 -4
  141. package/dist/components/field-group/field-group-icon.d.cts +1 -1
  142. package/dist/components/field-group/field-group-icon.d.ts +1 -1
  143. package/dist/components/field-group/index.cjs +4 -4
  144. package/dist/components/field-group/index.js +3 -3
  145. package/dist/components/index.d.cts +1 -0
  146. package/dist/components/index.d.ts +1 -0
  147. package/dist/components/input-otp/input-otp.type.d.cts +1 -1
  148. package/dist/components/input-otp/input-otp.type.d.ts +1 -1
  149. package/dist/components/list-box/list-box-item-suffix.d.cts +1 -1
  150. package/dist/components/list-box/list-box-item-suffix.d.ts +1 -1
  151. package/dist/components/mask-field/index.cjs +5 -5
  152. package/dist/components/mask-field/index.js +4 -4
  153. package/dist/components/menu/index.cjs +2 -2
  154. package/dist/components/menu/index.js +1 -1
  155. package/dist/components/number-field/index.cjs +5 -5
  156. package/dist/components/number-field/index.js +4 -4
  157. package/dist/components/phone-number-field/index.cjs +37 -30
  158. package/dist/components/phone-number-field/index.js +13 -6
  159. package/dist/components/popover/index.cjs +2 -2
  160. package/dist/components/popover/index.js +1 -1
  161. package/dist/components/popover/popover.recipe.d.cts +1 -1
  162. package/dist/components/popover/popover.recipe.d.ts +1 -1
  163. package/dist/components/search-field/index.cjs +5 -5
  164. package/dist/components/search-field/index.js +4 -4
  165. package/dist/components/select/index.cjs +10 -3
  166. package/dist/components/select/index.d.cts +45 -4
  167. package/dist/components/select/index.d.ts +45 -4
  168. package/dist/components/select/index.js +9 -2
  169. package/dist/components/select/select-description.d.cts +14 -0
  170. package/dist/components/select/select-description.d.ts +14 -0
  171. package/dist/components/select/select-error.d.cts +13 -0
  172. package/dist/components/select/select-error.d.ts +13 -0
  173. package/dist/components/select/select-group-label.d.cts +11 -0
  174. package/dist/components/select/select-group-label.d.ts +11 -0
  175. package/dist/components/select/select-indicator.d.cts +1 -1
  176. package/dist/components/select/select-indicator.d.ts +1 -1
  177. package/dist/components/select/select-label.d.cts +11 -2
  178. package/dist/components/select/select-label.d.ts +11 -2
  179. package/dist/components/select/select.d.cts +49 -9
  180. package/dist/components/select/select.d.ts +49 -9
  181. package/dist/components/select/select.recipe.d.cts +1 -1
  182. package/dist/components/select/select.recipe.d.ts +1 -1
  183. package/dist/components/select/select.type.d.cts +33 -9
  184. package/dist/components/select/select.type.d.ts +33 -9
  185. package/dist/components/skeleton/skeleton.type.d.cts +1 -1
  186. package/dist/components/skeleton/skeleton.type.d.ts +1 -1
  187. package/dist/components/slide-button/index.cjs +30 -0
  188. package/dist/components/slide-button/index.d.cts +44 -0
  189. package/dist/components/slide-button/index.d.ts +44 -0
  190. package/dist/components/slide-button/index.js +30 -0
  191. package/dist/components/slide-button/slide-button-fill.d.cts +29 -0
  192. package/dist/components/slide-button/slide-button-fill.d.ts +29 -0
  193. package/dist/components/slide-button/slide-button-icon.d.cts +10 -0
  194. package/dist/components/slide-button/slide-button-icon.d.ts +10 -0
  195. package/dist/components/slide-button/slide-button-label.d.cts +20 -0
  196. package/dist/components/slide-button/slide-button-label.d.ts +20 -0
  197. package/dist/components/slide-button/slide-button-thumb.d.cts +20 -0
  198. package/dist/components/slide-button/slide-button-thumb.d.ts +20 -0
  199. package/dist/components/slide-button/slide-button.animation.d.cts +33 -0
  200. package/dist/components/slide-button/slide-button.animation.d.ts +33 -0
  201. package/dist/components/slide-button/slide-button.context.d.cts +7 -0
  202. package/dist/components/slide-button/slide-button.context.d.ts +7 -0
  203. package/dist/components/slide-button/slide-button.d.cts +56 -0
  204. package/dist/components/slide-button/slide-button.d.ts +56 -0
  205. package/dist/components/slide-button/slide-button.recipe.d.cts +31 -0
  206. package/dist/components/slide-button/slide-button.recipe.d.ts +31 -0
  207. package/dist/components/slide-button/slide-button.type.d.cts +79 -0
  208. package/dist/components/slide-button/slide-button.type.d.ts +79 -0
  209. package/dist/components/slider/slider-thumb.d.cts +1 -1
  210. package/dist/components/slider/slider-thumb.d.ts +1 -1
  211. package/dist/components/slider/slider.recipe.d.cts +1 -1
  212. package/dist/components/slider/slider.recipe.d.ts +1 -1
  213. package/dist/components/spinner/spinner.d.cts +1 -1
  214. package/dist/components/spinner/spinner.d.ts +1 -1
  215. package/dist/components/switch/switch.style.d.cts +1 -1
  216. package/dist/components/switch/switch.style.d.ts +1 -1
  217. package/dist/components/table/index.cjs +3 -3
  218. package/dist/components/table/index.js +2 -2
  219. package/dist/components/text-area/index.cjs +4 -4
  220. package/dist/components/text-area/index.js +3 -3
  221. package/dist/components/text-area/text-area.d.cts +1 -1
  222. package/dist/components/text-area/text-area.d.ts +1 -1
  223. package/dist/components/text-field/index.cjs +3 -3
  224. package/dist/components/text-field/index.js +2 -2
  225. package/dist/components/text-field/text-field.type.d.cts +4 -4
  226. package/dist/components/text-field/text-field.type.d.ts +4 -4
  227. package/dist/components/time-picker/index.cjs +4 -4
  228. package/dist/components/time-picker/index.js +3 -3
  229. package/dist/components/toast/index.cjs +2 -2
  230. package/dist/components/toast/index.js +1 -1
  231. package/dist/components/toast/toast.animation.d.cts +2 -2
  232. package/dist/components/toast/toast.animation.d.ts +2 -2
  233. package/dist/components/toast/toast.utils.d.cts +1 -1
  234. package/dist/components/toast/toast.utils.d.ts +1 -1
  235. package/dist/components/typography/typography.type.d.cts +1 -1
  236. package/dist/components/typography/typography.type.d.ts +1 -1
  237. package/dist/hooks/use-rotation.d.cts +1 -1
  238. package/dist/hooks/use-rotation.d.ts +1 -1
  239. package/dist/index.cjs +66 -42
  240. package/dist/index.js +74 -50
  241. package/dist/system/anchored/indicator-spring.d.cts +2 -2
  242. package/dist/system/anchored/indicator-spring.d.ts +2 -2
  243. package/dist/theme/derive-colors.d.cts +1 -1
  244. package/dist/theme/derive-colors.d.ts +1 -1
  245. package/dist/theme/index.cjs +2 -2
  246. package/dist/theme/index.js +1 -1
  247. package/package.json +11 -1
@@ -5,7 +5,7 @@ import type { IconComponentProps, IconContextValue } from '../../system/icon';
5
5
  import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
6
6
  import type { RadiusKey, Size } from '../../theme/theme.type';
7
7
  import type { Align, Anchor, AnchoredWidth, Insets, Placement } from '../../utils/placement';
8
- export type SelectSlot = 'trigger' | 'value' | 'placeholder' | 'indicator' | 'overlay' | 'content' | 'label' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator';
8
+ export type SelectSlot = 'trigger' | 'value' | 'placeholder' | 'indicator' | 'overlay' | 'content' | 'groupLabel' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator';
9
9
  /**
10
10
  * The trigger **is** a field, so it takes the field's four emphasis levels rather than
11
11
  * the button's ten. A select that offers `danger` would be offering an intent to a
@@ -51,15 +51,17 @@ type SelectOwnProps = {
51
51
  onOpenChange?: (isOpen: boolean) => void;
52
52
  isDisabled?: boolean;
53
53
  isInvalid?: boolean;
54
+ asChild?: boolean;
54
55
  };
55
56
  /**
56
- * The root renders **no node**. It is state and resolved style around a trigger and a
57
- * list, and the trigger is the control — which is why `ref`, `style`, `testID`, the a11y
58
- * props and R14's style props are all on `Select.Trigger` rather than here. A wrapper
59
- * view would exist only to receive them, and it would put a second box around a field
60
- * that already is one.
57
+ * The root is the **column** — a `View` stacking `Select.Label`, the trigger and
58
+ * `Select.Description` / `.Error` with one `gap` — so `ref`, `style` and R14's style props
59
+ * here dress that column. The control itself is `Select.Trigger`, which keeps its own
60
+ * `ref` and its own a11y props: it is the node the panel measures and the node a screen
61
+ * reader stops on. `Select.Overlay` and `Select.Content` portal out, so they add nothing
62
+ * to the column.
61
63
  */
62
- export type SelectProps = SelectOwnProps;
64
+ export type SelectProps = SelectOwnProps & Omit<ViewProps, keyof SelectOwnProps> & Omit<ViewStyleProps, keyof SelectOwnProps | keyof ViewProps>;
63
65
  type SelectTriggerOwnProps = {
64
66
  children?: ReactNode;
65
67
  asChild?: boolean;
@@ -112,10 +114,20 @@ type SelectContentOwnProps = {
112
114
  insets?: SelectInsets;
113
115
  };
114
116
  export type SelectContentProps = SelectContentOwnProps & Omit<ViewProps, keyof SelectContentOwnProps> & Omit<ViewStyleProps, keyof SelectContentOwnProps | keyof ViewProps>;
115
- type SelectLabelOwnProps = {
117
+ type SelectTextSlotOwnProps = {
116
118
  children?: ReactNode;
117
119
  };
118
- export type SelectLabelProps = SelectLabelOwnProps & Omit<TextProps, keyof SelectLabelOwnProps> & Omit<TextStyleProps, keyof SelectLabelOwnProps | keyof TextProps>;
120
+ /**
121
+ * What the field is for — the `TextField.Label`, on a field that opens a list. The
122
+ * heading over a run of rows *inside* the panel is `Select.GroupLabel`.
123
+ */
124
+ export type SelectLabelProps = SelectTextSlotOwnProps & Omit<TextProps, keyof SelectTextSlotOwnProps> & Omit<TextStyleProps, keyof SelectTextSlotOwnProps | keyof TextProps>;
125
+ /** The hint under the field — the `TextField.Description`. */
126
+ export type SelectDescriptionProps = SelectLabelProps;
127
+ /** What is wrong with the chosen value — the `TextField.Error`. */
128
+ export type SelectErrorProps = SelectLabelProps;
129
+ /** A heading over a run of rows, inside the panel. */
130
+ export type SelectGroupLabelProps = SelectLabelProps;
119
131
  /** What an item's render function is handed, so it can paint its own selected state. */
120
132
  export type SelectItemRenderState = {
121
133
  isSelected: boolean;
@@ -160,7 +172,16 @@ export type SelectContextValue = {
160
172
  indicatorStyle: StyleProp<ViewStyle>;
161
173
  overlayStyle: StyleProp<ViewStyle>;
162
174
  contentStyle: StyleProp<ViewStyle>;
175
+ /** The panel's section heading. The field's own label is `labelStyle`. */
176
+ groupLabelStyle: StyleProp<TextStyle>;
177
+ /**
178
+ * The column's three text slots, resolved through `textFieldRecipe` rather than this
179
+ * component's own: a select and a text field stacked in one form read as one control,
180
+ * and a second table here would be two to keep in step.
181
+ */
163
182
  labelStyle: StyleProp<TextStyle>;
183
+ descriptionStyle: StyleProp<TextStyle>;
184
+ errorStyle: StyleProp<TextStyle>;
164
185
  itemStyle: StyleProp<ViewStyle>;
165
186
  /** The same split as the trigger's, for the row a finger happens to be on. */
166
187
  itemPressedStyle: StyleProp<ViewStyle>;
@@ -188,6 +209,9 @@ export type SelectContextValue = {
188
209
  /** Labels registered by the items, so `Select.Value` can name the chosen one. */
189
210
  labelFor: (value: string) => string | undefined;
190
211
  registerLabel: (value: string, label: string) => void;
212
+ /** The ids the trigger points at with `aria-labelledby` / `aria-describedby`. */
213
+ labelId: string;
214
+ descriptionId: string;
191
215
  };
192
216
  /** The trigger's rectangle in window coordinates. */
193
217
  export type SelectAnchor = Anchor;
@@ -5,7 +5,7 @@ import type { IconComponentProps, IconContextValue } from '../../system/icon';
5
5
  import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
6
6
  import type { RadiusKey, Size } from '../../theme/theme.type';
7
7
  import type { Align, Anchor, AnchoredWidth, Insets, Placement } from '../../utils/placement';
8
- export type SelectSlot = 'trigger' | 'value' | 'placeholder' | 'indicator' | 'overlay' | 'content' | 'label' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator';
8
+ export type SelectSlot = 'trigger' | 'value' | 'placeholder' | 'indicator' | 'overlay' | 'content' | 'groupLabel' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator';
9
9
  /**
10
10
  * The trigger **is** a field, so it takes the field's four emphasis levels rather than
11
11
  * the button's ten. A select that offers `danger` would be offering an intent to a
@@ -51,15 +51,17 @@ type SelectOwnProps = {
51
51
  onOpenChange?: (isOpen: boolean) => void;
52
52
  isDisabled?: boolean;
53
53
  isInvalid?: boolean;
54
+ asChild?: boolean;
54
55
  };
55
56
  /**
56
- * The root renders **no node**. It is state and resolved style around a trigger and a
57
- * list, and the trigger is the control — which is why `ref`, `style`, `testID`, the a11y
58
- * props and R14's style props are all on `Select.Trigger` rather than here. A wrapper
59
- * view would exist only to receive them, and it would put a second box around a field
60
- * that already is one.
57
+ * The root is the **column** — a `View` stacking `Select.Label`, the trigger and
58
+ * `Select.Description` / `.Error` with one `gap` — so `ref`, `style` and R14's style props
59
+ * here dress that column. The control itself is `Select.Trigger`, which keeps its own
60
+ * `ref` and its own a11y props: it is the node the panel measures and the node a screen
61
+ * reader stops on. `Select.Overlay` and `Select.Content` portal out, so they add nothing
62
+ * to the column.
61
63
  */
62
- export type SelectProps = SelectOwnProps;
64
+ export type SelectProps = SelectOwnProps & Omit<ViewProps, keyof SelectOwnProps> & Omit<ViewStyleProps, keyof SelectOwnProps | keyof ViewProps>;
63
65
  type SelectTriggerOwnProps = {
64
66
  children?: ReactNode;
65
67
  asChild?: boolean;
@@ -112,10 +114,20 @@ type SelectContentOwnProps = {
112
114
  insets?: SelectInsets;
113
115
  };
114
116
  export type SelectContentProps = SelectContentOwnProps & Omit<ViewProps, keyof SelectContentOwnProps> & Omit<ViewStyleProps, keyof SelectContentOwnProps | keyof ViewProps>;
115
- type SelectLabelOwnProps = {
117
+ type SelectTextSlotOwnProps = {
116
118
  children?: ReactNode;
117
119
  };
118
- export type SelectLabelProps = SelectLabelOwnProps & Omit<TextProps, keyof SelectLabelOwnProps> & Omit<TextStyleProps, keyof SelectLabelOwnProps | keyof TextProps>;
120
+ /**
121
+ * What the field is for — the `TextField.Label`, on a field that opens a list. The
122
+ * heading over a run of rows *inside* the panel is `Select.GroupLabel`.
123
+ */
124
+ export type SelectLabelProps = SelectTextSlotOwnProps & Omit<TextProps, keyof SelectTextSlotOwnProps> & Omit<TextStyleProps, keyof SelectTextSlotOwnProps | keyof TextProps>;
125
+ /** The hint under the field — the `TextField.Description`. */
126
+ export type SelectDescriptionProps = SelectLabelProps;
127
+ /** What is wrong with the chosen value — the `TextField.Error`. */
128
+ export type SelectErrorProps = SelectLabelProps;
129
+ /** A heading over a run of rows, inside the panel. */
130
+ export type SelectGroupLabelProps = SelectLabelProps;
119
131
  /** What an item's render function is handed, so it can paint its own selected state. */
120
132
  export type SelectItemRenderState = {
121
133
  isSelected: boolean;
@@ -160,7 +172,16 @@ export type SelectContextValue = {
160
172
  indicatorStyle: StyleProp<ViewStyle>;
161
173
  overlayStyle: StyleProp<ViewStyle>;
162
174
  contentStyle: StyleProp<ViewStyle>;
175
+ /** The panel's section heading. The field's own label is `labelStyle`. */
176
+ groupLabelStyle: StyleProp<TextStyle>;
177
+ /**
178
+ * The column's three text slots, resolved through `textFieldRecipe` rather than this
179
+ * component's own: a select and a text field stacked in one form read as one control,
180
+ * and a second table here would be two to keep in step.
181
+ */
163
182
  labelStyle: StyleProp<TextStyle>;
183
+ descriptionStyle: StyleProp<TextStyle>;
184
+ errorStyle: StyleProp<TextStyle>;
164
185
  itemStyle: StyleProp<ViewStyle>;
165
186
  /** The same split as the trigger's, for the row a finger happens to be on. */
166
187
  itemPressedStyle: StyleProp<ViewStyle>;
@@ -188,6 +209,9 @@ export type SelectContextValue = {
188
209
  /** Labels registered by the items, so `Select.Value` can name the chosen one. */
189
210
  labelFor: (value: string) => string | undefined;
190
211
  registerLabel: (value: string, label: string) => void;
212
+ /** The ids the trigger points at with `aria-labelledby` / `aria-describedby`. */
213
+ labelId: string;
214
+ descriptionId: string;
191
215
  };
192
216
  /** The trigger's rectangle in window coordinates. */
193
217
  export type SelectAnchor = Anchor;
@@ -51,7 +51,7 @@ type SkeletonOwnProps = {
51
51
  /**
52
52
  * `false` freezes the block at full opacity and mounts no worklet.
53
53
  *
54
- * A boolean rather than HeroUI's `'shimmer' | 'pulse' | 'none'`: a shimmer is a
54
+ * A boolean rather than the reference implementation's `'shimmer' | 'pulse' | 'none'`: a shimmer is a
55
55
  * gradient sweeping across the block, a gradient needs `react-native-svg`, and that is
56
56
  * an optional peer a component in the core cannot require. One animation, so there is
57
57
  * nothing for a name to choose between.
@@ -51,7 +51,7 @@ type SkeletonOwnProps = {
51
51
  /**
52
52
  * `false` freezes the block at full opacity and mounts no worklet.
53
53
  *
54
- * A boolean rather than HeroUI's `'shimmer' | 'pulse' | 'none'`: a shimmer is a
54
+ * A boolean rather than the reference implementation's `'shimmer' | 'pulse' | 'none'`: a shimmer is a
55
55
  * gradient sweeping across the block, a gradient needs `react-native-svg`, and that is
56
56
  * an optional peer a component in the core cannot require. One animation, so there is
57
57
  * nothing for a name to choose between.
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ var _chunkC6JO2RTVcjs = require('../../chunk-C6JO2RTV.cjs');
11
+ require('../../chunk-7EIHHOHP.cjs');
12
+ require('../../chunk-GSZDN6EZ.cjs');
13
+ require('../../chunk-FHNIGHN5.cjs');
14
+ require('../../chunk-SL3V7R2Y.cjs');
15
+ require('../../chunk-TVJXC4HY.cjs');
16
+ require('../../chunk-CDRGTUYF.cjs');
17
+ require('../../chunk-H4E4HDEP.cjs');
18
+ require('../../chunk-EJQCQPET.cjs');
19
+ require('../../chunk-IIAQISBG.cjs');
20
+ require('../../chunk-TK44VBIE.cjs');
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ exports.SlideButton = _chunkC6JO2RTVcjs.SlideButton; exports.SlideButtonFill = _chunkC6JO2RTVcjs.SlideButtonFill; exports.SlideButtonIcon = _chunkC6JO2RTVcjs.SlideButtonIcon; exports.SlideButtonLabel = _chunkC6JO2RTVcjs.SlideButtonLabel; exports.SlideButtonRoot = _chunkC6JO2RTVcjs.SlideButtonRoot; exports.SlideButtonThumb = _chunkC6JO2RTVcjs.SlideButtonThumb; exports.slideButtonRecipe = _chunkC6JO2RTVcjs.slideButtonRecipe; exports.useSlideButton = _chunkC6JO2RTVcjs.useSlideButton;
@@ -0,0 +1,44 @@
1
+ import { SlideButtonIcon } from './slide-button-icon';
2
+ import { SlideButtonThumb } from './slide-button-thumb';
3
+ export declare const SlideButton: import("react").ForwardRefExoticComponent<{
4
+ children?: import("react").ReactNode;
5
+ variant?: import("./slide-button.type").SlideButtonVariant;
6
+ size?: import("./slide-button.type").SlideButtonSize;
7
+ radius?: import("../..").RadiusKey;
8
+ color?: string;
9
+ threshold?: number;
10
+ isConfirmed?: boolean;
11
+ defaultConfirmed?: boolean;
12
+ onConfirm?: () => void;
13
+ isDisabled?: boolean;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, keyof {
16
+ children?: import("react").ReactNode;
17
+ variant?: import("./slide-button.type").SlideButtonVariant;
18
+ size?: import("./slide-button.type").SlideButtonSize;
19
+ radius?: import("../..").RadiusKey;
20
+ color?: string;
21
+ threshold?: number;
22
+ isConfirmed?: boolean;
23
+ defaultConfirmed?: boolean;
24
+ onConfirm?: () => void;
25
+ isDisabled?: boolean;
26
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
27
+ }> & 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<import("react-native").View>> & {
28
+ Fill: import("react").ForwardRefExoticComponent<{
29
+ children?: never;
30
+ } & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<import("react-native").View>>;
31
+ Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").Text>>;
34
+ Thumb: typeof SlideButtonThumb;
35
+ Icon: typeof SlideButtonIcon;
36
+ };
37
+ export { SlideButtonRoot } from './slide-button';
38
+ export { SlideButtonFill } from './slide-button-fill';
39
+ export { SlideButtonLabel } from './slide-button-label';
40
+ export { SlideButtonThumb } from './slide-button-thumb';
41
+ export { SlideButtonIcon } from './slide-button-icon';
42
+ export { useSlideButton } from './slide-button.context';
43
+ export { slideButtonRecipe } from './slide-button.recipe';
44
+ export type { SlideButtonContextValue, SlideButtonFillProps, SlideButtonIconProps, SlideButtonLabelProps, SlideButtonProps, SlideButtonSize, SlideButtonSlot, SlideButtonThumbProps, SlideButtonVariant, } from './slide-button.type';
@@ -0,0 +1,44 @@
1
+ import { SlideButtonIcon } from './slide-button-icon';
2
+ import { SlideButtonThumb } from './slide-button-thumb';
3
+ export declare const SlideButton: import("react").ForwardRefExoticComponent<{
4
+ children?: import("react").ReactNode;
5
+ variant?: import("./slide-button.type").SlideButtonVariant;
6
+ size?: import("./slide-button.type").SlideButtonSize;
7
+ radius?: import("../..").RadiusKey;
8
+ color?: string;
9
+ threshold?: number;
10
+ isConfirmed?: boolean;
11
+ defaultConfirmed?: boolean;
12
+ onConfirm?: () => void;
13
+ isDisabled?: boolean;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, keyof {
16
+ children?: import("react").ReactNode;
17
+ variant?: import("./slide-button.type").SlideButtonVariant;
18
+ size?: import("./slide-button.type").SlideButtonSize;
19
+ radius?: import("../..").RadiusKey;
20
+ color?: string;
21
+ threshold?: number;
22
+ isConfirmed?: boolean;
23
+ defaultConfirmed?: boolean;
24
+ onConfirm?: () => void;
25
+ isDisabled?: boolean;
26
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
27
+ }> & 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<import("react-native").View>> & {
28
+ Fill: import("react").ForwardRefExoticComponent<{
29
+ children?: never;
30
+ } & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<import("react-native").View>>;
31
+ Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").Text>>;
34
+ Thumb: typeof SlideButtonThumb;
35
+ Icon: typeof SlideButtonIcon;
36
+ };
37
+ export { SlideButtonRoot } from './slide-button';
38
+ export { SlideButtonFill } from './slide-button-fill';
39
+ export { SlideButtonLabel } from './slide-button-label';
40
+ export { SlideButtonThumb } from './slide-button-thumb';
41
+ export { SlideButtonIcon } from './slide-button-icon';
42
+ export { useSlideButton } from './slide-button.context';
43
+ export { slideButtonRecipe } from './slide-button.recipe';
44
+ export type { SlideButtonContextValue, SlideButtonFillProps, SlideButtonIconProps, SlideButtonLabelProps, SlideButtonProps, SlideButtonSize, SlideButtonSlot, SlideButtonThumbProps, SlideButtonVariant, } from './slide-button.type';
@@ -0,0 +1,30 @@
1
+ import {
2
+ SlideButton,
3
+ SlideButtonFill,
4
+ SlideButtonIcon,
5
+ SlideButtonLabel,
6
+ SlideButtonRoot,
7
+ SlideButtonThumb,
8
+ slideButtonRecipe,
9
+ useSlideButton
10
+ } from "../../chunk-SVS726BW.js";
11
+ import "../../chunk-F6W3JQ7K.js";
12
+ import "../../chunk-JN6IRT2M.js";
13
+ import "../../chunk-WFZDAXDI.js";
14
+ import "../../chunk-DKVXTMIJ.js";
15
+ import "../../chunk-3Q42X6EQ.js";
16
+ import "../../chunk-TTZOIXKE.js";
17
+ import "../../chunk-36PRYGAM.js";
18
+ import "../../chunk-EGLLDKN6.js";
19
+ import "../../chunk-Z6JBWRPL.js";
20
+ import "../../chunk-M63GFNKV.js";
21
+ export {
22
+ SlideButton,
23
+ SlideButtonFill,
24
+ SlideButtonIcon,
25
+ SlideButtonLabel,
26
+ SlideButtonRoot,
27
+ SlideButtonThumb,
28
+ slideButtonRecipe,
29
+ useSlideButton
30
+ };
@@ -0,0 +1,29 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * The trail behind the handle — how far the slide has come, not a state.
4
+ *
5
+ * Optional: compose it for the affordance, leave it out for a bare pill.
6
+ *
7
+ * **Its width is the fraction of the travel the handle has covered, laid over the whole
8
+ * pill — not the handle's raw offset.** The two agree at rest, where both are nothing.
9
+ * They part at the end, and that is the point: the handle comes to rest a handle's width
10
+ * short of the trailing cap, because that is where the handle physically *is*, and a trail
11
+ * that stopped with it left a confirmed slide showing sixty-odd points of unswept pill —
12
+ * reading as almost done at the moment it is done. Spread over the pill, the trail lands
13
+ * full.
14
+ *
15
+ * In between, the trail's leading edge sits under the handle for all but the first and last
16
+ * few points of the drag, so there is no seam to see while the finger is down.
17
+ *
18
+ * It is drawn inside a window cut to the pill's shape, because its own corner cannot be:
19
+ * `radius.full` is clamped to half the shorter side, so while the trail is narrower than
20
+ * the pill is tall it draws a squarer corner than the pill's and shows outside it. The
21
+ * window is here rather than on the root so that the cut lands on the trail alone and not
22
+ * on the handle's shadow.
23
+ *
24
+ * Driven on the UI thread; a spring here would let the trail and the handle come apart
25
+ * under the finger.
26
+ */
27
+ export declare const SlideButtonFill: import("react").ForwardRefExoticComponent<{
28
+ children?: never;
29
+ } & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<View>>;
@@ -0,0 +1,29 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * The trail behind the handle — how far the slide has come, not a state.
4
+ *
5
+ * Optional: compose it for the affordance, leave it out for a bare pill.
6
+ *
7
+ * **Its width is the fraction of the travel the handle has covered, laid over the whole
8
+ * pill — not the handle's raw offset.** The two agree at rest, where both are nothing.
9
+ * They part at the end, and that is the point: the handle comes to rest a handle's width
10
+ * short of the trailing cap, because that is where the handle physically *is*, and a trail
11
+ * that stopped with it left a confirmed slide showing sixty-odd points of unswept pill —
12
+ * reading as almost done at the moment it is done. Spread over the pill, the trail lands
13
+ * full.
14
+ *
15
+ * In between, the trail's leading edge sits under the handle for all but the first and last
16
+ * few points of the drag, so there is no seam to see while the finger is down.
17
+ *
18
+ * It is drawn inside a window cut to the pill's shape, because its own corner cannot be:
19
+ * `radius.full` is clamped to half the shorter side, so while the trail is narrower than
20
+ * the pill is tall it draws a squarer corner than the pill's and shows outside it. The
21
+ * window is here rather than on the root so that the cut lands on the trail alone and not
22
+ * on the handle's shadow.
23
+ *
24
+ * Driven on the UI thread; a spring here would let the trail and the handle come apart
25
+ * under the finger.
26
+ */
27
+ export declare const SlideButtonFill: import("react").ForwardRefExoticComponent<{
28
+ children?: never;
29
+ } & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<View>>;
@@ -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;