@astryxdesign/core 0.7.7-canary.c0929c8 → 0.7.7-canary.c19ca12

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 (472) hide show
  1. package/dist/AlertDialog/AlertDialog.d.ts +4 -1
  2. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  3. package/dist/AlertDialog/AlertDialog.js +36 -6
  4. package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +13 -0
  5. package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -0
  6. package/dist/AppShell/useCloseMobileDrawerOnActivate.js +45 -0
  7. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  8. package/dist/BottomSheet/BottomSheet.js +79 -9
  9. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  10. package/dist/BottomSheet/BottomSheetPanel.js +23 -4
  11. package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
  12. package/dist/BottomSheet/bottomSheetStack.js +5 -4
  13. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  14. package/dist/BottomSheet/useSheetGestures.js +3 -1
  15. package/dist/Breadcrumbs/BreadcrumbItem.d.ts +2 -1
  16. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  17. package/dist/Breadcrumbs/BreadcrumbItem.js +7 -3
  18. package/dist/Button/Button.d.ts.map +1 -1
  19. package/dist/Button/Button.js +47 -3
  20. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  21. package/dist/CheckboxInput/CheckboxInput.js +13 -2
  22. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  23. package/dist/CheckboxList/CheckboxList.js +7 -1
  24. package/dist/CheckboxList/CheckboxListContext.d.ts +6 -0
  25. package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
  26. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  27. package/dist/CheckboxList/CheckboxListItem.js +10 -2
  28. package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
  29. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  30. package/dist/ComplexSelector/ComplexSelector.js +14 -4
  31. package/dist/ContextMenu/ContextMenu.js +2 -2
  32. package/dist/DateInput/DateInput.d.ts.map +1 -1
  33. package/dist/DateInput/DateInput.js +5 -2
  34. package/dist/DateInput/MonthScroller.d.ts.map +1 -1
  35. package/dist/DateInput/MonthScroller.js +13 -27
  36. package/dist/DateInput/Wheel.d.ts.map +1 -1
  37. package/dist/DateInput/Wheel.js +22 -41
  38. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  39. package/dist/DateTimeInput/DateTimeInput.js +5 -2
  40. package/dist/Dialog/Dialog.d.ts.map +1 -1
  41. package/dist/Dialog/Dialog.js +23 -45
  42. package/dist/Drawer/Drawer.d.ts.map +1 -1
  43. package/dist/Drawer/Drawer.js +15 -11
  44. package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
  45. package/dist/Drawer/useDrawerDialogPresence.js +5 -1
  46. package/dist/Field/Field.js +2 -2
  47. package/dist/Field/PanelSearchInput.d.ts +9 -1
  48. package/dist/Field/PanelSearchInput.d.ts.map +1 -1
  49. package/dist/Field/PanelSearchInput.js +3 -1
  50. package/dist/HoverCard/HoverCard.d.ts +4 -3
  51. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  52. package/dist/HoverCard/HoverCard.js +27 -2
  53. package/dist/HoverCard/useHoverCard.d.ts +5 -4
  54. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  55. package/dist/HoverCard/useHoverCard.js +17 -31
  56. package/dist/Icon/Icon.d.ts +5 -1
  57. package/dist/Icon/Icon.d.ts.map +1 -1
  58. package/dist/Icon/Icon.js +5 -2
  59. package/dist/InfoTip/InfoTip.d.ts +63 -0
  60. package/dist/InfoTip/InfoTip.d.ts.map +1 -0
  61. package/dist/InfoTip/InfoTip.js +126 -0
  62. package/dist/InfoTip/index.d.ts +10 -0
  63. package/dist/InfoTip/index.d.ts.map +1 -0
  64. package/dist/InfoTip/index.js +12 -0
  65. package/dist/Layer/layerAnimations.stylex.d.ts +7 -8
  66. package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
  67. package/dist/Layer/layerAnimations.stylex.js +25 -20
  68. package/dist/Layer/useBackdropPress.d.ts +27 -0
  69. package/dist/Layer/useBackdropPress.d.ts.map +1 -0
  70. package/dist/Layer/useBackdropPress.js +53 -0
  71. package/dist/Layer/usePressPin.d.ts +20 -10
  72. package/dist/Layer/usePressPin.d.ts.map +1 -1
  73. package/dist/Layer/usePressPin.js +66 -18
  74. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  75. package/dist/Lightbox/Lightbox.js +18 -0
  76. package/dist/MobileNav/MobileNav.js +0 -1
  77. package/dist/MultiSelector/hooks.d.ts.map +1 -1
  78. package/dist/MultiSelector/hooks.js +2 -4
  79. package/dist/Outline/Outline.d.ts +2 -4
  80. package/dist/Outline/Outline.d.ts.map +1 -1
  81. package/dist/Outline/Outline.js +4 -52
  82. package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
  83. package/dist/Outline/useOutlineFromMarkdown.js +1 -0
  84. package/dist/Outline/useScrollSpy.js +3 -3
  85. package/dist/PowerSearch/PowerSearch.d.ts +36 -3
  86. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  87. package/dist/PowerSearch/PowerSearch.js +571 -302
  88. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +100 -0
  89. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
  90. package/dist/PowerSearch/PowerSearchBottomSheet.js +1913 -0
  91. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +32 -1
  92. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  93. package/dist/PowerSearch/PowerSearchEditPopover.js +17 -6
  94. package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
  95. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  96. package/dist/PowerSearch/PowerSearchValueEditor.js +170 -61
  97. package/dist/PowerSearch/formatFilterValue.d.ts +7 -0
  98. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  99. package/dist/PowerSearch/formatFilterValue.js +11 -1
  100. package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
  101. package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
  102. package/dist/PowerSearch/formatTokenValue.js +160 -0
  103. package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
  104. package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
  105. package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
  106. package/dist/RadioList/RadioList.d.ts.map +1 -1
  107. package/dist/RadioList/RadioList.js +8 -2
  108. package/dist/RadioList/RadioListItem.d.ts +1 -1
  109. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  110. package/dist/RadioList/RadioListItem.js +5 -3
  111. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  112. package/dist/Resizable/ResizeHandle.js +118 -260
  113. package/dist/Resizable/resizeGesture.d.ts +91 -0
  114. package/dist/Resizable/resizeGesture.d.ts.map +1 -0
  115. package/dist/Resizable/resizeGesture.js +251 -0
  116. package/dist/SegmentedControl/SegmentedControl.d.ts +3 -1
  117. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  118. package/dist/SegmentedControl/SegmentedControl.js +115 -8
  119. package/dist/SegmentedControl/SegmentedControlContext.d.ts +6 -0
  120. package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  121. package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -0
  122. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  123. package/dist/SegmentedControl/SegmentedControlItem.js +8 -1
  124. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts +357 -0
  125. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -0
  126. package/dist/SegmentedControl/useSegmentedSelectionMotion.js +1349 -0
  127. package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +70 -0
  128. package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -0
  129. package/dist/SegmentedControl/useSegmentedTouchTracking.js +264 -0
  130. package/dist/Selector/Selector.d.ts.map +1 -1
  131. package/dist/Selector/Selector.js +96 -67
  132. package/dist/Selector/optionShape.d.ts +24 -0
  133. package/dist/Selector/optionShape.d.ts.map +1 -0
  134. package/dist/Selector/optionShape.js +48 -0
  135. package/dist/Selector/selectableOptionEntries.d.ts +20 -0
  136. package/dist/Selector/selectableOptionEntries.d.ts.map +1 -0
  137. package/dist/Selector/selectableOptionEntries.js +38 -0
  138. package/dist/Selector/utils.d.ts +2 -17
  139. package/dist/Selector/utils.d.ts.map +1 -1
  140. package/dist/Selector/utils.js +3 -51
  141. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  142. package/dist/SideNav/SideNavItem.js +3 -9
  143. package/dist/Slider/sliderTouchController.js +2 -2
  144. package/dist/Spinner/Spinner.d.ts +1 -1
  145. package/dist/Spinner/Spinner.d.ts.map +1 -1
  146. package/dist/Spinner/Spinner.js +60 -58
  147. package/dist/Switch/switchTouch.d.ts +0 -7
  148. package/dist/Switch/switchTouch.d.ts.map +1 -1
  149. package/dist/Switch/switchTouch.js +2 -10
  150. package/dist/Switch/useSwitchTouch.d.ts +2 -11
  151. package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
  152. package/dist/Switch/useSwitchTouch.js +35 -93
  153. package/dist/Table/BaseTable.d.ts.map +1 -1
  154. package/dist/Table/BaseTable.js +29 -8
  155. package/dist/TextInput/TextInput.d.ts +2 -2
  156. package/dist/TextInput/TextInput.d.ts.map +1 -1
  157. package/dist/TextInput/TextInput.js +10 -7
  158. package/dist/Toast/Toast.d.ts +11 -1
  159. package/dist/Toast/Toast.d.ts.map +1 -1
  160. package/dist/Toast/Toast.js +30 -15
  161. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  162. package/dist/Toast/ToastViewport.js +94 -34
  163. package/dist/Toast/types.d.ts +9 -3
  164. package/dist/Toast/types.d.ts.map +1 -1
  165. package/dist/Token/Token.d.ts +2 -2
  166. package/dist/Token/Token.d.ts.map +1 -1
  167. package/dist/Token/Token.js +13 -4
  168. package/dist/Token/TokenNamingContext.d.ts +14 -0
  169. package/dist/Token/TokenNamingContext.d.ts.map +1 -0
  170. package/dist/Token/TokenNamingContext.js +23 -0
  171. package/dist/Tokenizer/Tokenizer.d.ts +46 -59
  172. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  173. package/dist/Tokenizer/Tokenizer.js +40 -57
  174. package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
  175. package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
  176. package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
  177. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +3 -0
  178. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -0
  179. package/dist/Tokenizer/TokenizerItemRemovableContext.js +19 -0
  180. package/dist/Tooltip/Tooltip.d.ts +25 -30
  181. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  182. package/dist/Tooltip/Tooltip.js +24 -5
  183. package/dist/Tooltip/index.d.ts +1 -1
  184. package/dist/Tooltip/index.d.ts.map +1 -1
  185. package/dist/Tooltip/useTooltip.d.ts +45 -28
  186. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  187. package/dist/Tooltip/useTooltip.js +52 -59
  188. package/dist/TopNav/TopNavItem.d.ts.map +1 -1
  189. package/dist/TopNav/TopNavItem.js +4 -7
  190. package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
  191. package/dist/TopNav/TopNavMegaMenuItem.js +4 -7
  192. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  193. package/dist/TopNav/TopNavMenu.js +4 -7
  194. package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
  195. package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
  196. package/dist/animator/createAnimator.d.ts +98 -0
  197. package/dist/animator/createAnimator.d.ts.map +1 -0
  198. package/dist/animator/createAnimator.js +259 -0
  199. package/dist/astryx.css +96 -7
  200. package/dist/gestures/GestureHost.d.ts +27 -1
  201. package/dist/gestures/GestureHost.d.ts.map +1 -1
  202. package/dist/gestures/GestureHost.js +157 -21
  203. package/dist/gestures/PressTracker.d.ts.map +1 -1
  204. package/dist/gestures/PressTracker.js +4 -3
  205. package/dist/hooks/actionGroupTracker.d.ts +7 -4
  206. package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
  207. package/dist/hooks/actionGroupTracker.js +19 -56
  208. package/dist/hooks/index.d.ts +1 -0
  209. package/dist/hooks/index.d.ts.map +1 -1
  210. package/dist/hooks/index.js +1 -0
  211. package/dist/hooks/pressGroupContext.d.ts +6 -0
  212. package/dist/hooks/pressGroupContext.d.ts.map +1 -0
  213. package/dist/hooks/pressGroupContext.js +20 -0
  214. package/dist/hooks/useActionGroupTracking.d.ts +53 -0
  215. package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
  216. package/dist/hooks/useActionGroupTracking.js +174 -0
  217. package/dist/hooks/useAnimator.d.ts +41 -0
  218. package/dist/hooks/useAnimator.d.ts.map +1 -0
  219. package/dist/hooks/useAnimator.js +70 -0
  220. package/dist/hooks/useAttachment.d.ts +1 -1
  221. package/dist/hooks/useAttachment.js +1 -1
  222. package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
  223. package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
  224. package/dist/hooks/useHighlightedOptionScroll.js +112 -11
  225. package/dist/hooks/useInputStatusIcon.d.ts +1 -1
  226. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
  227. package/dist/hooks/useInputStatusIcon.js +2 -2
  228. package/dist/hooks/useLongPress.d.ts +6 -2
  229. package/dist/hooks/useLongPress.d.ts.map +1 -1
  230. package/dist/hooks/useLongPress.js +95 -15
  231. package/dist/hooks/useMediaQuery.d.ts +2 -1
  232. package/dist/hooks/useMediaQuery.d.ts.map +1 -1
  233. package/dist/hooks/useMediaQuery.js +7 -4
  234. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  235. package/dist/hooks/useMenuPress.js +4 -2
  236. package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts +8 -0
  237. package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts.map +1 -0
  238. package/dist/i18n/generated-english/InfoTip/InfoTip.generated.js +12 -0
  239. package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -1
  240. package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +1 -0
  241. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
  242. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
  243. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
  244. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
  245. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
  246. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
  247. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
  248. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
  249. package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
  250. package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
  251. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  252. package/dist/i18n/generated-locales/en.generated.js +33 -1
  253. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  254. package/dist/i18n/generated-locales/pseudo.generated.js +33 -1
  255. package/dist/index.d.ts +2 -0
  256. package/dist/index.d.ts.map +1 -1
  257. package/dist/index.js +5 -0
  258. package/dist/internal/SheetConfirmation.d.ts +11 -0
  259. package/dist/internal/SheetConfirmation.d.ts.map +1 -0
  260. package/dist/internal/SheetConfirmation.js +92 -0
  261. package/dist/internal/indicatorPress.stylex.d.ts +20 -0
  262. package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
  263. package/dist/internal/indicatorPress.stylex.js +26 -0
  264. package/dist/internal/sheetDraft.d.ts +35 -0
  265. package/dist/internal/sheetDraft.d.ts.map +1 -0
  266. package/dist/internal/sheetDraft.js +65 -0
  267. package/dist/internal/touch-sheet.d.ts +21 -0
  268. package/dist/internal/touch-sheet.d.ts.map +1 -0
  269. package/dist/internal/touch-sheet.js +19 -0
  270. package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
  271. package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
  272. package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
  273. package/dist/motion/animator.d.ts +14 -14
  274. package/dist/motion/animator.d.ts.map +1 -1
  275. package/dist/motion/animator.js +41 -18
  276. package/dist/motion/reducedMotion.d.ts +24 -0
  277. package/dist/motion/reducedMotion.d.ts.map +1 -1
  278. package/dist/motion/reducedMotion.js +78 -1
  279. package/dist/motion/roles.d.ts +7 -1
  280. package/dist/motion/roles.d.ts.map +1 -1
  281. package/dist/motion/roles.js +20 -1
  282. package/dist/motion/uikit/alert.d.ts +41 -0
  283. package/dist/motion/uikit/alert.d.ts.map +1 -0
  284. package/dist/motion/uikit/alert.js +43 -0
  285. package/dist/motion/uikit/index.d.ts +6 -5
  286. package/dist/motion/uikit/index.d.ts.map +1 -1
  287. package/dist/motion/uikit/index.js +6 -5
  288. package/dist/motion/uikit/segmented.d.ts +55 -0
  289. package/dist/motion/uikit/segmented.d.ts.map +1 -0
  290. package/dist/motion/uikit/segmented.js +77 -0
  291. package/dist/motion/uikit/springs.d.ts +0 -18
  292. package/dist/motion/uikit/springs.d.ts.map +1 -1
  293. package/dist/motion/uikit/springs.js +5 -21
  294. package/dist/privateAttributes/pressGroupItem.stylex.d.ts +15 -0
  295. package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
  296. package/dist/privateAttributes/pressGroupItem.stylex.js +23 -0
  297. package/dist/privateAttributes/segmentTitle.stylex.d.ts +5 -0
  298. package/dist/privateAttributes/segmentTitle.stylex.d.ts.map +1 -0
  299. package/dist/privateAttributes/segmentTitle.stylex.js +22 -0
  300. package/dist/utils/browserClickWait.d.ts +35 -0
  301. package/dist/utils/browserClickWait.d.ts.map +1 -0
  302. package/dist/utils/browserClickWait.js +123 -0
  303. package/dist/utils/clickGuard.d.ts +14 -1
  304. package/dist/utils/clickGuard.d.ts.map +1 -1
  305. package/dist/utils/clickGuard.js +46 -1
  306. package/dist/utils/dateParser.d.ts.map +1 -1
  307. package/dist/utils/dateParser.js +12 -0
  308. package/dist/utils/focusReturn.d.ts +15 -0
  309. package/dist/utils/focusReturn.d.ts.map +1 -1
  310. package/dist/utils/focusReturn.js +28 -0
  311. package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
  312. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  313. package/dist/utils/interactionOverlay.stylex.js +3 -2
  314. package/dist/utils/pressFeedback.d.ts.map +1 -1
  315. package/dist/utils/pressFeedback.js +19 -6
  316. package/dist/utils/triggerFocus.d.ts +36 -0
  317. package/dist/utils/triggerFocus.d.ts.map +1 -0
  318. package/dist/utils/triggerFocus.js +65 -0
  319. package/locales/en.json +128 -0
  320. package/locales/pseudo.json +96 -0
  321. package/package.json +18 -8
  322. package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
  323. package/src/AlertDialog/AlertDialog.tsx +37 -5
  324. package/src/AppShell/useCloseMobileDrawerOnActivate.ts +52 -0
  325. package/src/BottomSheet/BottomSheet.tsx +95 -10
  326. package/src/BottomSheet/BottomSheetPanel.tsx +40 -5
  327. package/src/BottomSheet/bottomSheetStack.ts +8 -4
  328. package/src/BottomSheet/useSheetGestures.ts +3 -1
  329. package/src/Breadcrumbs/BreadcrumbItem.tsx +13 -3
  330. package/src/Button/Button.tsx +63 -5
  331. package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
  332. package/src/CheckboxInput/CheckboxInput.tsx +36 -9
  333. package/src/CheckboxList/CheckboxList.doc.mjs +4 -2
  334. package/src/CheckboxList/CheckboxList.tsx +6 -0
  335. package/src/CheckboxList/CheckboxListContext.tsx +6 -0
  336. package/src/CheckboxList/CheckboxListItem.tsx +11 -2
  337. package/src/ComplexSelector/ComplexSelector.tsx +20 -5
  338. package/src/ContextMenu/ContextMenu.tsx +2 -2
  339. package/src/DateInput/DateInput.tsx +8 -2
  340. package/src/DateInput/MonthScroller.tsx +18 -22
  341. package/src/DateInput/Wheel.tsx +30 -32
  342. package/src/DateTimeInput/DateTimeInput.tsx +8 -2
  343. package/src/Dialog/Dialog.tsx +54 -45
  344. package/src/Drawer/Drawer.tsx +28 -11
  345. package/src/Drawer/useDrawerDialogPresence.ts +5 -1
  346. package/src/Field/Field.tsx +2 -2
  347. package/src/Field/PanelSearchInput.tsx +11 -0
  348. package/src/HoverCard/HoverCard.doc.mjs +4 -2
  349. package/src/HoverCard/HoverCard.tsx +35 -4
  350. package/src/HoverCard/useHoverCard.doc.mjs +178 -36
  351. package/src/HoverCard/useHoverCard.tsx +46 -52
  352. package/src/Icon/Icon.doc.mjs +49 -8
  353. package/src/Icon/Icon.tsx +15 -7
  354. package/src/InfoTip/InfoTip.doc.mjs +192 -0
  355. package/src/InfoTip/InfoTip.tsx +186 -0
  356. package/src/InfoTip/index.ts +14 -0
  357. package/src/Layer/layerAnimations.stylex.ts +24 -16
  358. package/src/Layer/useBackdropPress.ts +81 -0
  359. package/src/Layer/usePressPin.ts +86 -26
  360. package/src/Lightbox/Lightbox.tsx +18 -0
  361. package/src/MobileNav/MobileNav.tsx +1 -1
  362. package/src/MultiSelector/hooks.ts +2 -4
  363. package/src/Outline/Outline.doc.mjs +177 -51
  364. package/src/Outline/Outline.tsx +5 -57
  365. package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
  366. package/src/Outline/useOutlineFromMarkdown.ts +1 -0
  367. package/src/Outline/useScrollSpy.ts +3 -3
  368. package/src/PowerSearch/PowerSearch.doc.mjs +55 -6
  369. package/src/PowerSearch/PowerSearch.tsx +798 -324
  370. package/src/PowerSearch/PowerSearchBottomSheet.tsx +2515 -0
  371. package/src/PowerSearch/PowerSearchEditPopover.tsx +28 -6
  372. package/src/PowerSearch/PowerSearchValueEditor.tsx +203 -38
  373. package/src/PowerSearch/formatFilterValue.ts +18 -1
  374. package/src/PowerSearch/formatTokenValue.ts +215 -0
  375. package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
  376. package/src/RadioList/RadioList.doc.mjs +4 -2
  377. package/src/RadioList/RadioList.tsx +7 -2
  378. package/src/RadioList/RadioListItem.tsx +5 -3
  379. package/src/Resizable/ResizeHandle.tsx +133 -328
  380. package/src/Resizable/resizeGesture.ts +368 -0
  381. package/src/SegmentedControl/SegmentedControl.doc.mjs +3 -3
  382. package/src/SegmentedControl/SegmentedControl.tsx +179 -5
  383. package/src/SegmentedControl/SegmentedControlContext.ts +6 -0
  384. package/src/SegmentedControl/SegmentedControlItem.tsx +12 -1
  385. package/src/SegmentedControl/useSegmentedSelectionMotion.ts +1640 -0
  386. package/src/SegmentedControl/useSegmentedTouchTracking.ts +308 -0
  387. package/src/Selector/Selector.tsx +136 -89
  388. package/src/Selector/optionShape.ts +64 -0
  389. package/src/Selector/selectableOptionEntries.ts +39 -0
  390. package/src/Selector/utils.ts +9 -68
  391. package/src/SideNav/SideNavItem.tsx +3 -7
  392. package/src/Slider/sliderTouchController.ts +2 -2
  393. package/src/Spinner/Spinner.tsx +77 -63
  394. package/src/Switch/switchTouch.ts +2 -10
  395. package/src/Switch/useSwitchTouch.ts +38 -104
  396. package/src/Table/BaseTable.tsx +46 -12
  397. package/src/TextInput/TextInput.tsx +11 -10
  398. package/src/Toast/Toast.doc.mjs +4 -3
  399. package/src/Toast/Toast.tsx +57 -32
  400. package/src/Toast/ToastViewport.tsx +121 -35
  401. package/src/Toast/types.ts +9 -3
  402. package/src/Token/Token.tsx +15 -4
  403. package/src/Token/TokenNamingContext.ts +28 -0
  404. package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
  405. package/src/Tokenizer/Tokenizer.tsx +89 -85
  406. package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
  407. package/src/Tokenizer/TokenizerItemRemovableContext.ts +24 -0
  408. package/src/Tooltip/Tooltip.doc.mjs +123 -54
  409. package/src/Tooltip/Tooltip.tsx +36 -39
  410. package/src/Tooltip/index.ts +0 -1
  411. package/src/Tooltip/useTooltip.doc.mjs +171 -33
  412. package/src/Tooltip/useTooltip.tsx +98 -86
  413. package/src/TopNav/TopNavItem.tsx +6 -5
  414. package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
  415. package/src/TopNav/TopNavMenu.tsx +6 -5
  416. package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
  417. package/src/Typeahead/TypeaheadItem.tsx +2 -1
  418. package/src/animator/createAnimator.doc.mjs +153 -0
  419. package/src/animator/createAnimator.ts +324 -0
  420. package/src/gestures/GestureHost.ts +198 -20
  421. package/src/gestures/PressTracker.ts +4 -3
  422. package/src/gestures/README.md +7 -1
  423. package/src/hooks/actionGroupTracker.ts +32 -61
  424. package/src/hooks/index.ts +2 -0
  425. package/src/hooks/pressGroupContext.ts +21 -0
  426. package/src/hooks/useActionGroupTracking.ts +224 -0
  427. package/src/hooks/useAnimator.doc.mjs +109 -0
  428. package/src/hooks/useAnimator.ts +67 -0
  429. package/src/hooks/useAttachment.ts +1 -1
  430. package/src/hooks/useHighlightedOptionScroll.ts +123 -15
  431. package/src/hooks/useInputStatusIcon.tsx +3 -2
  432. package/src/hooks/useLongPress.doc.mjs +2 -2
  433. package/src/hooks/useLongPress.ts +136 -15
  434. package/src/hooks/useMediaQuery.doc.mjs +2 -2
  435. package/src/hooks/useMediaQuery.ts +13 -4
  436. package/src/hooks/useMenuPress.ts +8 -2
  437. package/src/i18n/generated-english/InfoTip/InfoTip.generated.ts +13 -0
  438. package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +1 -0
  439. package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
  440. package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
  441. package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
  442. package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
  443. package/src/i18n/generated-locales/en.generated.ts +43 -0
  444. package/src/i18n/generated-locales/pseudo.generated.ts +44 -0
  445. package/src/index.ts +14 -0
  446. package/src/internal/SheetConfirmation.tsx +101 -0
  447. package/src/internal/indicatorPress.stylex.ts +24 -0
  448. package/src/internal/sheetDraft.ts +80 -0
  449. package/src/internal/touch-sheet.ts +21 -0
  450. package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
  451. package/src/motion/MEASUREMENTS.md +7 -0
  452. package/src/motion/README.md +9 -5
  453. package/src/motion/animator.ts +61 -29
  454. package/src/motion/reducedMotion.ts +79 -1
  455. package/src/motion/roles.ts +20 -1
  456. package/src/motion/uikit/alert.ts +43 -0
  457. package/src/motion/uikit/index.ts +5 -5
  458. package/src/motion/uikit/segmented.ts +74 -0
  459. package/src/motion/uikit/springs.ts +5 -21
  460. package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
  461. package/src/privateAttributes/segmentTitle.stylex.ts +22 -0
  462. package/src/utils/browserClickWait.ts +133 -0
  463. package/src/utils/clickGuard.ts +64 -1
  464. package/src/utils/dateParser.ts +16 -0
  465. package/src/utils/focusReturn.ts +30 -0
  466. package/src/utils/interactionOverlay.stylex.ts +3 -2
  467. package/src/utils/pressFeedback.ts +19 -6
  468. package/src/utils/triggerFocus.ts +80 -0
  469. package/dist/internal/tokenizer-presentation.d.ts +0 -21
  470. package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
  471. package/dist/internal/tokenizer-presentation.js +0 -21
  472. package/src/internal/tokenizer-presentation.ts +0 -25
@@ -0,0 +1,357 @@
1
+ /**
2
+ * @file useSegmentedSelectionMotion.ts
3
+ * @input The radiogroup, the selected value, the presentation and tracking
4
+ * flags; the animator, the UIKit table and the touch tracking
5
+ * @output Exports `useSegmentedSelectionMotion`, `SegmentedSelectionMotion`,
6
+ * the layer custom properties and the segment and title selectors
7
+ * @position SegmentedControl's touch layer
8
+ *
9
+ * SYNC: When modified, update:
10
+ * - /packages/core/src/SegmentedControl/SegmentedControl.tsx (the pseudo-elements)
11
+ * - /packages/core/src/SegmentedControl/SegmentedControlItem.tsx (the title marker)
12
+ * - /packages/core/src/SegmentedControl/useSegmentedTouchTracking.ts
13
+ */
14
+ import { type RefCallback, type RefObject } from 'react';
15
+ import { type Animator } from '../motion/animator.js';
16
+ /** The segments, in DOM order. */
17
+ export declare const SEGMENT_SELECTOR = "[role=\"radio\"][data-value]";
18
+ /** The selected surface's paint, copied into a layer's custom properties. */
19
+ export declare const SURFACE_PROPERTIES: ReadonlyArray<string>;
20
+ /**
21
+ * The radiogroup's two pseudo-element layers: the lens (::before) and the
22
+ * ::after, which under Reduced Motion shows the surface that fades out where
23
+ * it is.
24
+ */
25
+ export type Layer = 'lens' | 'after';
26
+ /** Box and visibility of a layer, besides its paint. */
27
+ export declare const LAYER_GEOMETRY: ReadonlyArray<string>;
28
+ /** The custom property on the radiogroup that sets `property` of `layer`. */
29
+ export declare function layerVariable(layer: Layer, property: string): string;
30
+ /** What the control reads of its selection motion. */
31
+ export interface SegmentedSelection {
32
+ /**
33
+ * A press is down on the control (any pointer's), or its tap's click has
34
+ * not run yet. The press commits through that click, so a focus move it
35
+ * causes selects nothing.
36
+ */
37
+ readonly isPressing: () => boolean;
38
+ /** A key went down: a focus move it causes is the keyboard's, and selects. */
39
+ readonly keyPressed: () => void;
40
+ }
41
+ export interface SegmentedSelectionMotionOptions {
42
+ /** The animator's clock (ms, document timeline); `performance.now()` by default. */
43
+ readonly now?: () => number;
44
+ /**
45
+ * The animator for the radiogroup's ::after (the surface that fades out
46
+ * under Reduced Motion); one of its own by default.
47
+ */
48
+ readonly afterAnimator?: Animator;
49
+ }
50
+ /**
51
+ * The selection motion of one SegmentedControl, as UIKit's segmented control
52
+ * moves it. It lives outside React's render cycle. Nothing here sets state,
53
+ * so a slide never re-renders anything.
54
+ *
55
+ * At rest, the selected segment paints its own surface, so themes style it
56
+ * as before. For a slide, the lens takes over. The lens is the radiogroup's
57
+ * ::before, painted from custom properties copied from the segment's
58
+ * computed surface. The segment hides its own surface inline, so a theme
59
+ * rule cannot keep it painted. The lens moves with `translate` and `scale`
60
+ * on the compositor animator. Nothing lays out or paints per frame, and the
61
+ * slide keeps moving while JavaScript is busy. The lens lays out on the
62
+ * destination's box. It lands at translate 0 and scale 1 and hands the
63
+ * surface back pixel for pixel. Its position and its size run on separate
64
+ * springs, as UIKit's do. A change mid-flight starts from the presented
65
+ * geometry and its velocities. The titles change with the selection, at
66
+ * once.
67
+ *
68
+ * Under a finger:
69
+ * - A theme role owns a pressed thumb's lift, so a press on the selected
70
+ * segment lifts nothing here.
71
+ * - A drag from the selected segment carries the lens at its resting size.
72
+ * Its center chases the finger, at most `dragOvershoot` past the end
73
+ * segments.
74
+ * - The selected title's color follows the lens's center. It moves to a
75
+ * neighbor only once the center is a quarter of that segment past the
76
+ * boundary. Every title keeps its weight until the lift.
77
+ * - The lift commits the segment nearest the finger, through that segment's
78
+ * click. A lift outside the control commits nothing, and the lens settles
79
+ * back.
80
+ * - A press on another segment leaves the lens in place until the lift.
81
+ * Meanwhile that segment shows the shared pressed overlay.
82
+ * - A click that the item cancels sends the lens back at once. Otherwise the
83
+ * lens waits for the new value, which a parent can adopt later. It goes
84
+ * back only if the slide settles without the new value.
85
+ * - A cancelled touch puts the lens back.
86
+ *
87
+ * Under a mouse or a pen, the same press commits the same segment, but the
88
+ * theme owns the timing. A click, a key or a new value slides the lens on the
89
+ * theme's duration and easing, as the segments' own transition does. A drag
90
+ * from the selected segment carries the lens on the pointer itself.
91
+ *
92
+ * Under Reduced Motion, a held lens still follows the pointer: that is direct
93
+ * movement, not a transition. Nothing else chases, travels or scales. The lens
94
+ * fades in at the new segment while ::after, painted with the old surface,
95
+ * fades out in place. With a fine pointer under Reduce Motion, a change shows
96
+ * through the theme's transition.
97
+ */
98
+ export declare class SegmentedSelectionMotion {
99
+ private readonly animator;
100
+ private track;
101
+ private carried;
102
+ /**
103
+ * Segments whose surface the lens carried until a change turned it
104
+ * elsewhere. They keep their surface hidden until the lens lands. A tap's
105
+ * press paint can still fade on such a segment. That paint would cover the
106
+ * lens, which sits under the segments' backgrounds, while the lens crosses
107
+ * it.
108
+ */
109
+ private readonly abandoned;
110
+ /** The segment showing the selected face under a dragging finger. */
111
+ private facedSegment;
112
+ /** The frame request that keeps the face on the lens while it is carried. */
113
+ private lensFrame;
114
+ /** Titles wearing the other face's color during a drag. */
115
+ private readonly faceOverrides;
116
+ /** The motions the hand-back waits for. */
117
+ private readonly running;
118
+ /** A finger holds the lens: a drag from the selected segment carries it. */
119
+ private isHeld;
120
+ /**
121
+ * The touch presentation applies (a coarse primary pointer), so every
122
+ * change slides on UIKit's springs. When it is off, a change slides on the
123
+ * theme's duration and easing, as the segments' transition does. A drag from
124
+ * the selected segment carries the lens on the pointer itself.
125
+ */
126
+ private isPresenting;
127
+ /**
128
+ * Segments whose own transitions are off while a fine pointer's carry is
129
+ * on screen, with their own inline values to give back.
130
+ */
131
+ private readonly stilled;
132
+ /** The frame request that gives the stilled segments their transitions back. */
133
+ private thawFrame;
134
+ private touch;
135
+ /**
136
+ * The value a touch already moved the lens to: the selection change that
137
+ * follows (the controlled value coming back) re-aims the lens.
138
+ */
139
+ private committed;
140
+ /**
141
+ * The commit's click ran without a veto: the lens waits for the value
142
+ * until the slide settles.
143
+ */
144
+ private isAwaitingValue;
145
+ /** The motion a release starts once its commit's click has run. */
146
+ private pending;
147
+ /** The last release was a finger's (decline and re-aim follow it). */
148
+ private releasedByFinger;
149
+ /** The ::after shows the leaving surface (Reduced Motion). */
150
+ private isLeavingShown;
151
+ /** Bumped by every leaving fade; a finished fade clears only its own. */
152
+ private leaving;
153
+ private readonly now;
154
+ /** The ::after: the surface fading out under Reduced Motion. */
155
+ private readonly after;
156
+ constructor(animator?: Animator, options?: SegmentedSelectionMotionOptions);
157
+ /** Attaches the radiogroup whose pseudo-elements are the lens (null detaches). */
158
+ attachTrack(element: HTMLElement | null): void;
159
+ /** True while the lens carries the selected surface. */
160
+ get isSliding(): boolean;
161
+ /** A press (any pointer's) is down on the control, from landing to letting go. */
162
+ get isPressed(): boolean;
163
+ /**
164
+ * Whether the touch presentation applies. Off, under a fine primary
165
+ * pointer, a change slides on the theme's timing, and a drag from the
166
+ * selected segment still carries the lens. A change of presentation hands
167
+ * anything in flight back.
168
+ */
169
+ present(isPresenting: boolean): void;
170
+ /** The segment that commits `value`, if the track has one. */
171
+ segmentFor(track: HTMLElement, value: string): HTMLElement | null;
172
+ /** The selection moved from `from` to `to`; the DOM already shows `to`. */
173
+ select(track: HTMLElement, from: string, to: string): void;
174
+ /**
175
+ * Whether a change of value slides the lens. A fine pointer under Reduce
176
+ * Motion leaves the change to the theme's transition.
177
+ */
178
+ private slidesChanges;
179
+ /**
180
+ * A press landed on `origin`, the segment the action-group tracker resolved
181
+ * for it (null: none). It reads the track's geometry and title faces once.
182
+ * Under Reduced Motion a finger's release cross-fades.
183
+ */
184
+ begin(track: HTMLElement, origin: HTMLElement | null, isFinger?: boolean): void;
185
+ /**
186
+ * The finger moved to `clientX`. A drag from the selected segment carries
187
+ * the lens at its resting size. A touch elsewhere leaves the lens alone,
188
+ * and that segment shows the shared pressed overlay.
189
+ */
190
+ drag(clientX: number): void;
191
+ /**
192
+ * The first move of a drag from the selected segment binds the lens there,
193
+ * at its resting size. Under Reduced Motion too: the lens follows the hand,
194
+ * and only the release cross-fades.
195
+ */
196
+ private hold;
197
+ /**
198
+ * The selected face follows the held lens: it goes to the segment under the
199
+ * lens's presented center. Hysteresis around each boundary keeps a finger
200
+ * that rests on a boundary from flipping it. This runs every frame while
201
+ * the lens is held, so the face keeps up as the lens settles under a still
202
+ * finger.
203
+ */
204
+ private followLens;
205
+ /** The held lens's center chases the finger at `clientX`. */
206
+ private chase;
207
+ /**
208
+ * The finger let go on `target`, the segment the tracker resolved for it
209
+ * (null: none, or a disabled one). Moves the lens there and returns its
210
+ * value when it is not the selected one (the tracker's lift commits it
211
+ * through its click), else null.
212
+ */
213
+ release(target: HTMLElement | null): string | null;
214
+ /**
215
+ * The commit's click for `value` has run. A click that the item's
216
+ * `onClick` cancels sends the lens back at once. Otherwise the lens waits
217
+ * for the value, which a parent can adopt later.
218
+ */
219
+ clicked(track: HTMLElement, value: string, isCancelled: boolean): void;
220
+ /**
221
+ * The value the finger let go on was not adopted. The item's `onClick`
222
+ * cancelled it, or a controlled parent kept its value. The lens goes back
223
+ * to the selected segment. The next change to that value slides as any
224
+ * change does.
225
+ */
226
+ decline(track: HTMLElement, value: string): void;
227
+ /** The touch was taken away (the page scrolled): the lens goes back. */
228
+ cancel(): void;
229
+ /** Hands the surface back to its segment now and hides the lens. */
230
+ settle(): void;
231
+ /**
232
+ * The control resized. The lens aims at boxes measured when its motion
233
+ * began, so it hands the surface back rather than land somewhere stale.
234
+ * Two cases keep the motion. In the first, the track keeps its measured
235
+ * size: a new title weight resized a content-sized control before the box
236
+ * was measured. In the second, a finger holds the lens.
237
+ */
238
+ resized(track: HTMLElement): void;
239
+ /**
240
+ * Ends everything in flight (unmount). The controller stays usable, so an
241
+ * effect cleanup followed by a setup (StrictMode's extra mount) loses
242
+ * nothing.
243
+ */
244
+ stop(): void;
245
+ /**
246
+ * A fine pointer's carry. The segments' own transitions go off while the
247
+ * lens is on screen, so the borrowed surface does not fade out and back in.
248
+ * Under a finger, the touch presentation already turns them off.
249
+ */
250
+ private stillTransitions;
251
+ /**
252
+ * Gives the stilled segments their transitions back two frames after the
253
+ * hand-back, once the surfaces it gave back have been on screen.
254
+ */
255
+ private thawTransitions;
256
+ private cancelThaw;
257
+ private restoreTransitions;
258
+ /** The selected segment, as the DOM shows it now. */
259
+ private selectedIn;
260
+ /**
261
+ * Starts the motion the release left pending: on `box` (the destination's
262
+ * box now) or the box measured at landing, showing `paint`'s surface (the
263
+ * selected segment's).
264
+ */
265
+ private startPending;
266
+ /**
267
+ * Aims the lens at `destination`'s box as it is now: a value adopted
268
+ * after its click (mid-flight) moves the segments with its titles' new
269
+ * weights.
270
+ */
271
+ private reaim;
272
+ /**
273
+ * Binds the lens for `segment`, with `box` as its layout box and `paint`'s
274
+ * surface, the selected segment's. It keeps what is on screen. With nothing
275
+ * carried, it starts from `from`, a segment's resting box. Otherwise it
276
+ * starts from the presented geometry, re-based onto the new box with its
277
+ * velocities.
278
+ */
279
+ private carry;
280
+ /** Velocities captured by the last `carry`, in the new box's units. */
281
+ private velocity;
282
+ /** A spring transition that keeps the captured velocities of `values`. */
283
+ private springFrom;
284
+ /**
285
+ * The lens settles at its resting place on `segment`. Under a finger it
286
+ * springs on the slide spring. Under a fine pointer it takes the theme's
287
+ * duration and easing, as the segments' own transition does.
288
+ */
289
+ private settleLens;
290
+ /** Springs the lens toward `values`. */
291
+ private springLens;
292
+ /** The lens's presented center and size, from the animator. */
293
+ private presented;
294
+ /**
295
+ * The lens settles on `segment`, at its resting size. Under Reduced Motion
296
+ * a finger's release (`touchRelease`) cross-fades on any primary pointer. A
297
+ * mouse's or a pen's lands at once under a fine one.
298
+ */
299
+ private moveLensTo;
300
+ /**
301
+ * A tap's slide: from `from` to `segment` on the slide spring. Under Reduced
302
+ * Motion there is no travel, and a finger's tap (`touchRelease`) fades.
303
+ */
304
+ private slideTo;
305
+ /**
306
+ * Under Reduced Motion, the lens lands on `segment` and fades in there, as
307
+ * an animator entrance. The surface on screen fades out in place on the
308
+ * same clock. That surface is the lens when it was carried, else `from`'s
309
+ * resting surface. The animator decides whether anything fades. On a fine
310
+ * pointer, both change at once unless a touch released the change
311
+ * (`touchRelease`).
312
+ */
313
+ private crossFadeTo;
314
+ /**
315
+ * Paints the ::after with the surface on screen (the lens's paint, or
316
+ * `paint`'s resting surface) where it is (`from`, at `opacity`).
317
+ */
318
+ private leave;
319
+ /**
320
+ * The ::after fades out in place while the lens fades in on `box`. As a
321
+ * leaving travel, it fades on the animator's Reduce Motion clock. It lands
322
+ * only once it is invisible.
323
+ */
324
+ private fadeLeaving;
325
+ private endLeaving;
326
+ /**
327
+ * Waits for `handle`; the surface goes back when nothing is left. A
328
+ * touch's value still waiting to come back when the motion settles goes
329
+ * back instead: the settled slide bounds the wait.
330
+ */
331
+ private trackHandle;
332
+ /**
333
+ * Gives `segment`'s title the selected face and the selected segment's
334
+ * title an unselected one (none for null or the selected segment), at once.
335
+ */
336
+ private showFaceAt;
337
+ /**
338
+ * Mid-drag, the face is the color alone. A weight swap changes the titles'
339
+ * widths, which moves the segments under the finger and shakes the
340
+ * boundary. The commit's own styles give the new weight at the lift.
341
+ */
342
+ private wearFace;
343
+ /** Every title back to its own face. */
344
+ private clearFaces;
345
+ }
346
+ /**
347
+ * Wires `SegmentedSelectionMotion` to a SegmentedControl. While enabled,
348
+ * every change of `value` slides the selection in the commit that shows the
349
+ * new value, so no frame shows it unanimated. A press drives the lens while
350
+ * `isTracking`.
351
+ */
352
+ export declare function useSegmentedSelectionMotion(trackRef: RefObject<HTMLElement | null>, value: string, isPresenting: boolean, isTracking: boolean): {
353
+ readonly selection: SegmentedSelection;
354
+ /** The radiogroup's callback ref: it attaches the animators to the node. */
355
+ readonly attachTrack: RefCallback<HTMLElement>;
356
+ };
357
+ //# sourceMappingURL=useSegmentedSelectionMotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSegmentedSelectionMotion.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/useSegmentedSelectionMotion.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAKL,KAAK,WAAW,EA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