@astryxdesign/core 0.7.7 → 0.7.8-canary.30b1896

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 (540) 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 +46 -6
  4. package/dist/AppShell/AppShell.d.ts.map +1 -1
  5. package/dist/AppShell/AppShell.js +5 -0
  6. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  7. package/dist/BottomSheet/BottomSheet.js +1 -0
  8. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  9. package/dist/BottomSheet/BottomSheetPanel.js +25 -4
  10. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  11. package/dist/BottomSheet/BottomSheetSwitcher.js +5 -0
  12. package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
  13. package/dist/BottomSheet/useMobileKeyboard.js +6 -0
  14. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  15. package/dist/BottomSheet/useSheetGestures.js +12 -1
  16. package/dist/Button/Button.d.ts.map +1 -1
  17. package/dist/Button/Button.js +17 -1
  18. package/dist/Calendar/Calendar.d.ts.map +1 -1
  19. package/dist/Calendar/Calendar.js +15 -16
  20. package/dist/Carousel/Carousel.d.ts.map +1 -1
  21. package/dist/Carousel/Carousel.js +2 -0
  22. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  23. package/dist/Chat/ChatComposerInput.js +4 -0
  24. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  25. package/dist/Chat/ChatMessageList.js +2 -1
  26. package/dist/Chat/useChatDictation.d.ts.map +1 -1
  27. package/dist/Chat/useChatDictation.js +2 -0
  28. package/dist/Chat/useChatNewMessages.js +1 -1
  29. package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
  30. package/dist/Chat/useChatStreamScroll.js +2 -0
  31. package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
  32. package/dist/Chat/useSpeechRecognition.js +3 -0
  33. package/dist/Chat/useTriggerMenu.js +1 -1
  34. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  35. package/dist/CheckboxInput/CheckboxInput.js +17 -12
  36. package/dist/CodeBlock/CodeBlock.d.ts +10 -1
  37. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  38. package/dist/CodeBlock/CodeBlock.js +28 -11
  39. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  40. package/dist/CommandPalette/CommandPalette.js +2 -0
  41. package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
  42. package/dist/CommandPalette/CommandPaletteItem.js +2 -0
  43. package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
  44. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  45. package/dist/ComplexSelector/ComplexSelector.js +14 -4
  46. package/dist/ContextMenu/ContextMenu.js +2 -2
  47. package/dist/DateInput/MonthScroller.d.ts.map +1 -1
  48. package/dist/DateInput/MonthScroller.js +5 -2
  49. package/dist/DateInput/TouchDateField.d.ts.map +1 -1
  50. package/dist/DateInput/TouchDateField.js +1 -0
  51. package/dist/DateInput/Wheel.d.ts.map +1 -1
  52. package/dist/DateInput/Wheel.js +4 -0
  53. package/dist/DateInput/useOwnScrollGesture.d.ts.map +1 -1
  54. package/dist/DateInput/useOwnScrollGesture.js +3 -0
  55. package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
  56. package/dist/DateInput/usePointerDragScroll.js +2 -0
  57. package/dist/DateInput/useScrollSettle.d.ts.map +1 -1
  58. package/dist/DateInput/useScrollSettle.js +3 -0
  59. package/dist/Dialog/Dialog.d.ts.map +1 -1
  60. package/dist/Dialog/Dialog.js +9 -32
  61. package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
  62. package/dist/Drawer/useDrawerDialogPresence.js +3 -0
  63. package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -1
  64. package/dist/DropdownMenu/useMenuOverflow.js +5 -0
  65. package/dist/Field/Field.js +2 -2
  66. package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts.map +1 -1
  67. package/dist/FieldStatus/useFieldStatusAnnouncement.js +1 -0
  68. package/dist/FormLayout/FormLayout.d.ts +5 -1
  69. package/dist/FormLayout/FormLayout.d.ts.map +1 -1
  70. package/dist/HoverCard/HoverCard.d.ts +6 -4
  71. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  72. package/dist/HoverCard/HoverCard.js +48 -3
  73. package/dist/HoverCard/useHoverCard.d.ts +5 -4
  74. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  75. package/dist/HoverCard/useHoverCard.js +20 -33
  76. package/dist/Icon/Icon.d.ts +5 -1
  77. package/dist/Icon/Icon.d.ts.map +1 -1
  78. package/dist/Icon/Icon.js +5 -2
  79. package/dist/Item/useSwipeAction.d.ts.map +1 -1
  80. package/dist/Item/useSwipeAction.js +3 -0
  81. package/dist/Layer/modalOutlet.d.ts.map +1 -1
  82. package/dist/Layer/modalOutlet.js +2 -0
  83. package/dist/Layer/outsidePress.d.ts.map +1 -1
  84. package/dist/Layer/outsidePress.js +1 -0
  85. package/dist/Layer/useLayer.d.ts.map +1 -1
  86. package/dist/Layer/useLayer.js +3 -0
  87. package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
  88. package/dist/Layer/useLayerDismissal.js +3 -0
  89. package/dist/Layer/usePressPin.d.ts +17 -5
  90. package/dist/Layer/usePressPin.d.ts.map +1 -1
  91. package/dist/Layer/usePressPin.js +62 -12
  92. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  93. package/dist/Layer/useTouchTrigger.js +3 -0
  94. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  95. package/dist/Lightbox/Lightbox.js +19 -0
  96. package/dist/MobileNav/MobileNav.d.ts +3 -2
  97. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  98. package/dist/MobileNav/MobileNav.js +9 -25
  99. package/dist/Outline/useOutlineFromDOM.d.ts.map +1 -1
  100. package/dist/Outline/useOutlineFromDOM.js +3 -0
  101. package/dist/Outline/useScrollSpy.d.ts.map +1 -1
  102. package/dist/Outline/useScrollSpy.js +3 -0
  103. package/dist/OverflowList/OverflowList.d.ts.map +1 -1
  104. package/dist/OverflowList/OverflowList.js +3 -0
  105. package/dist/Popover/Popover.d.ts.map +1 -1
  106. package/dist/Popover/Popover.js +6 -0
  107. package/dist/PowerSearch/PowerSearch.d.ts +43 -4
  108. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  109. package/dist/PowerSearch/PowerSearch.js +445 -134
  110. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +102 -0
  111. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
  112. package/dist/PowerSearch/PowerSearchBottomSheet.js +1919 -0
  113. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +35 -2
  114. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  115. package/dist/PowerSearch/PowerSearchEditPopover.js +25 -6
  116. package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
  117. package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
  118. package/dist/PowerSearch/PowerSearchFilterEditor.js +4 -2
  119. package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
  120. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  121. package/dist/PowerSearch/PowerSearchToken.js +7 -2
  122. package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
  123. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  124. package/dist/PowerSearch/PowerSearchValueEditor.js +193 -83
  125. package/dist/PowerSearch/formatFilterValue.d.ts +18 -6
  126. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  127. package/dist/PowerSearch/formatFilterValue.js +33 -12
  128. package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
  129. package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
  130. package/dist/PowerSearch/formatTokenValue.js +162 -0
  131. package/dist/PowerSearch/powerSearchDateZone.d.ts +21 -0
  132. package/dist/PowerSearch/powerSearchDateZone.d.ts.map +1 -0
  133. package/dist/PowerSearch/powerSearchDateZone.js +37 -0
  134. package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
  135. package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
  136. package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
  137. package/dist/PowerSearch/types.d.ts +2 -0
  138. package/dist/PowerSearch/types.d.ts.map +1 -1
  139. package/dist/ProgressBar/ProgressBarTouch.d.ts.map +1 -1
  140. package/dist/ProgressBar/ProgressBarTouch.js +2 -0
  141. package/dist/RadioList/RadioList.d.ts.map +1 -1
  142. package/dist/RadioList/RadioList.js +3 -2
  143. package/dist/RadioList/RadioListItem.d.ts +1 -1
  144. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  145. package/dist/RadioList/RadioListItem.js +5 -3
  146. package/dist/Resizable/ResizeHandle.d.ts +2 -1
  147. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  148. package/dist/Resizable/ResizeHandle.js +101 -77
  149. package/dist/Resizable/createResizable.d.ts +145 -0
  150. package/dist/Resizable/createResizable.d.ts.map +1 -0
  151. package/dist/Resizable/createResizable.js +575 -0
  152. package/dist/Resizable/useResizable.d.ts +3 -3
  153. package/dist/Resizable/useResizable.d.ts.map +1 -1
  154. package/dist/Resizable/useResizable.js +252 -459
  155. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
  156. package/dist/SegmentedControl/useSegmentedSelectionMotion.js +3 -3
  157. package/dist/SelectableCard/SelectableCard.d.ts +2 -0
  158. package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
  159. package/dist/SelectableCard/SelectableCard.js +36 -11
  160. package/dist/SelectableCard/selectableCardInput.d.ts +12 -0
  161. package/dist/SelectableCard/selectableCardInput.d.ts.map +1 -0
  162. package/dist/SelectableCard/selectableCardInput.js +20 -0
  163. package/dist/Selector/Selector.d.ts.map +1 -1
  164. package/dist/Selector/Selector.js +5 -8
  165. package/dist/Slider/sliderTouchController.js +2 -2
  166. package/dist/Spinner/Spinner.d.ts +1 -1
  167. package/dist/Spinner/Spinner.d.ts.map +1 -1
  168. package/dist/Spinner/Spinner.js +60 -58
  169. package/dist/Switch/Switch.d.ts.map +1 -1
  170. package/dist/Switch/Switch.js +4 -10
  171. package/dist/Switch/useSwitchTouch.js +4 -4
  172. package/dist/Table/BaseTable.d.ts.map +1 -1
  173. package/dist/Table/BaseTable.js +29 -8
  174. package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
  175. package/dist/Table/plugins/columnResize/useTableColumnResize.js +3 -1
  176. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  177. package/dist/Table/plugins/filtering/useTableFiltering.js +2 -1
  178. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  179. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +4 -0
  180. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  181. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -0
  182. package/dist/TextInput/TextInput.d.ts +2 -2
  183. package/dist/TextInput/TextInput.d.ts.map +1 -1
  184. package/dist/TextInput/TextInput.js +10 -7
  185. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  186. package/dist/TimeInput/TimeInput.js +2 -0
  187. package/dist/Timer/Timer.d.ts.map +1 -1
  188. package/dist/Timer/Timer.js +2 -0
  189. package/dist/Timestamp/Timestamp.js +1 -1
  190. package/dist/Toast/Toast.d.ts +11 -1
  191. package/dist/Toast/Toast.d.ts.map +1 -1
  192. package/dist/Toast/Toast.js +25 -15
  193. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  194. package/dist/Toast/ToastViewport.js +97 -34
  195. package/dist/Toast/types.d.ts +9 -3
  196. package/dist/Toast/types.d.ts.map +1 -1
  197. package/dist/Toast/useToast.d.ts.map +1 -1
  198. package/dist/Toast/useToast.js +1 -0
  199. package/dist/Tokenizer/Tokenizer.d.ts +49 -37
  200. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  201. package/dist/Tokenizer/Tokenizer.js +22 -19
  202. package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
  203. package/dist/Tokenizer/TokenizerBottomSheet.js +1 -1
  204. package/dist/Tokenizer/index.d.ts +1 -1
  205. package/dist/Tokenizer/index.d.ts.map +1 -1
  206. package/dist/Tooltip/useTooltip.d.ts +19 -1
  207. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  208. package/dist/Tooltip/useTooltip.js +34 -53
  209. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  210. package/dist/Typeahead/BaseTypeahead.js +27 -18
  211. package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
  212. package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
  213. package/dist/animator/createAnimator.d.ts +98 -0
  214. package/dist/animator/createAnimator.d.ts.map +1 -0
  215. package/dist/animator/createAnimator.js +259 -0
  216. package/dist/astryx.css +36 -6
  217. package/dist/gestures/PressTracker.d.ts.map +1 -1
  218. package/dist/gestures/PressTracker.js +4 -3
  219. package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
  220. package/dist/hooks/ModalAnnounceProvider.js +1 -0
  221. package/dist/hooks/actionGroupTracker.d.ts +4 -1
  222. package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
  223. package/dist/hooks/actionGroupTracker.js +13 -3
  224. package/dist/hooks/index.d.ts +1 -0
  225. package/dist/hooks/index.d.ts.map +1 -1
  226. package/dist/hooks/index.js +1 -0
  227. package/dist/hooks/longPressDetector.d.ts +66 -0
  228. package/dist/hooks/longPressDetector.d.ts.map +1 -0
  229. package/dist/hooks/longPressDetector.js +200 -0
  230. package/dist/hooks/pressGroupContext.d.ts +6 -0
  231. package/dist/hooks/pressGroupContext.d.ts.map +1 -0
  232. package/dist/hooks/pressGroupContext.js +20 -0
  233. package/dist/hooks/rootScrollStyles.d.ts +48 -0
  234. package/dist/hooks/rootScrollStyles.d.ts.map +1 -0
  235. package/dist/hooks/rootScrollStyles.js +207 -0
  236. package/dist/hooks/scrollLockTouchGuard.d.ts +13 -0
  237. package/dist/hooks/scrollLockTouchGuard.d.ts.map +1 -0
  238. package/dist/hooks/scrollLockTouchGuard.js +134 -0
  239. package/dist/hooks/scrollbarGutter.d.ts +4 -4
  240. package/dist/hooks/scrollbarGutter.d.ts.map +1 -1
  241. package/dist/hooks/scrollbarGutter.js +36 -23
  242. package/dist/hooks/useActionGroupTracking.d.ts +53 -0
  243. package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
  244. package/dist/hooks/useActionGroupTracking.js +174 -0
  245. package/dist/hooks/useAnimator.d.ts +41 -0
  246. package/dist/hooks/useAnimator.d.ts.map +1 -0
  247. package/dist/hooks/useAnimator.js +70 -0
  248. package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
  249. package/dist/hooks/useAnnounceRenderedText.js +1 -0
  250. package/dist/hooks/useAttachment.d.ts +1 -1
  251. package/dist/hooks/useAttachment.js +1 -1
  252. package/dist/hooks/useAutoMediaMode.d.ts.map +1 -1
  253. package/dist/hooks/useAutoMediaMode.js +1 -0
  254. package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
  255. package/dist/hooks/useBusyAnnouncement.js +2 -0
  256. package/dist/hooks/useDevWarning.d.ts.map +1 -1
  257. package/dist/hooks/useDevWarning.js +2 -0
  258. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  259. package/dist/hooks/useFocusTrap.js +2 -0
  260. package/dist/hooks/useGridFocus.d.ts +8 -5
  261. package/dist/hooks/useGridFocus.d.ts.map +1 -1
  262. package/dist/hooks/useGridFocus.js +4 -3
  263. package/dist/hooks/useHotkeys.d.ts.map +1 -1
  264. package/dist/hooks/useHotkeys.js +3 -0
  265. package/dist/hooks/useImageMode.d.ts.map +1 -1
  266. package/dist/hooks/useImageMode.js +3 -0
  267. package/dist/hooks/useInputStatusIcon.d.ts +1 -1
  268. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
  269. package/dist/hooks/useInputStatusIcon.js +2 -2
  270. package/dist/hooks/useKeyboardHint.js +1 -1
  271. package/dist/hooks/useLongPress.d.ts +8 -9
  272. package/dist/hooks/useLongPress.d.ts.map +1 -1
  273. package/dist/hooks/useLongPress.js +23 -106
  274. package/dist/hooks/useMenuHover.d.ts.map +1 -1
  275. package/dist/hooks/useMenuHover.js +2 -0
  276. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  277. package/dist/hooks/useMenuPress.js +3 -0
  278. package/dist/hooks/useOverflow.d.ts.map +1 -1
  279. package/dist/hooks/useOverflow.js +2 -1
  280. package/dist/hooks/usePressFeedback.d.ts.map +1 -1
  281. package/dist/hooks/usePressFeedback.js +1 -0
  282. package/dist/hooks/useResolvedRequired.d.ts +3 -0
  283. package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
  284. package/dist/hooks/useResolvedRequired.js +3 -0
  285. package/dist/hooks/useScrollLock.d.ts +7 -9
  286. package/dist/hooks/useScrollLock.d.ts.map +1 -1
  287. package/dist/hooks/useScrollLock.js +55 -48
  288. package/dist/hooks/useScrollableArea.d.ts.map +1 -1
  289. package/dist/hooks/useScrollableArea.js +5 -0
  290. package/dist/hooks/useStreamingText.d.ts.map +1 -1
  291. package/dist/hooks/useStreamingText.js +3 -0
  292. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
  293. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
  294. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
  295. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
  296. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
  297. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
  298. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
  299. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
  300. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  301. package/dist/i18n/generated-locales/en.generated.js +30 -0
  302. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  303. package/dist/i18n/generated-locales/pseudo.generated.js +30 -0
  304. package/dist/index.d.ts +1 -0
  305. package/dist/index.d.ts.map +1 -1
  306. package/dist/index.js +4 -0
  307. package/dist/internal/indicatorPress.stylex.d.ts +20 -0
  308. package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
  309. package/dist/internal/indicatorPress.stylex.js +26 -0
  310. package/dist/internal/selectable-card.d.ts +21 -0
  311. package/dist/internal/selectable-card.d.ts.map +1 -0
  312. package/dist/internal/selectable-card.js +20 -0
  313. package/dist/internal/sheetDraft.d.ts +2 -2
  314. package/dist/internal/sheetDraft.js +2 -2
  315. package/dist/motion/animatedLayout.d.ts.map +1 -1
  316. package/dist/motion/animatedLayout.js +7 -7
  317. package/dist/motion/animator.d.ts +14 -14
  318. package/dist/motion/animator.d.ts.map +1 -1
  319. package/dist/motion/animator.js +45 -20
  320. package/dist/motion/progress.d.ts +88 -0
  321. package/dist/motion/progress.d.ts.map +1 -0
  322. package/dist/motion/progress.js +128 -0
  323. package/dist/motion/reducedMotion.d.ts.map +1 -1
  324. package/dist/motion/reducedMotion.js +3 -1
  325. package/dist/motion/uikit/alert.d.ts +41 -0
  326. package/dist/motion/uikit/alert.d.ts.map +1 -0
  327. package/dist/motion/uikit/alert.js +43 -0
  328. package/dist/privateAttributes/pressGroupItem.stylex.d.ts +22 -0
  329. package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
  330. package/dist/privateAttributes/pressGroupItem.stylex.js +36 -0
  331. package/dist/privateAttributes/reducedMotion.stylex.d.ts +23 -0
  332. package/dist/privateAttributes/reducedMotion.stylex.d.ts.map +1 -0
  333. package/dist/privateAttributes/reducedMotion.stylex.js +40 -0
  334. package/dist/theme/Theme.d.ts.map +1 -1
  335. package/dist/theme/Theme.js +29 -4
  336. package/dist/theme/motionKnobs.d.ts +4 -3
  337. package/dist/theme/motionKnobs.d.ts.map +1 -1
  338. package/dist/theme/motionKnobs.js +3 -2
  339. package/dist/theme/themeMotion.d.ts +6 -0
  340. package/dist/theme/themeMotion.d.ts.map +1 -1
  341. package/dist/theme/themeMotion.js +7 -0
  342. package/dist/utils/dateParser.d.ts.map +1 -1
  343. package/dist/utils/dateParser.js +12 -0
  344. package/dist/utils/focusReturn.d.ts +15 -0
  345. package/dist/utils/focusReturn.d.ts.map +1 -1
  346. package/dist/utils/focusReturn.js +28 -0
  347. package/dist/utils/interactionModality.d.ts.map +1 -1
  348. package/dist/utils/interactionModality.js +4 -0
  349. package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
  350. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  351. package/dist/utils/interactionOverlay.stylex.js +3 -2
  352. package/dist/utils/plainDate.d.ts +8 -0
  353. package/dist/utils/plainDate.d.ts.map +1 -1
  354. package/dist/utils/plainDate.js +19 -0
  355. package/dist/utils/pressFeedback.d.ts.map +1 -1
  356. package/dist/utils/pressFeedback.js +20 -6
  357. package/dist/utils/triggerFocus.d.ts +36 -0
  358. package/dist/utils/triggerFocus.d.ts.map +1 -0
  359. package/dist/utils/triggerFocus.js +65 -0
  360. package/locales/en.json +120 -0
  361. package/locales/pseudo.json +90 -0
  362. package/package.json +14 -9
  363. package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
  364. package/src/AlertDialog/AlertDialog.tsx +46 -5
  365. package/src/AppShell/AppShell.tsx +4 -0
  366. package/src/BottomSheet/BottomSheet.tsx +1 -0
  367. package/src/BottomSheet/BottomSheetPanel.tsx +39 -3
  368. package/src/BottomSheet/BottomSheetSwitcher.tsx +5 -0
  369. package/src/BottomSheet/useMobileKeyboard.ts +4 -0
  370. package/src/BottomSheet/useSheetGestures.ts +10 -1
  371. package/src/Button/Button.tsx +26 -4
  372. package/src/Calendar/Calendar.tsx +36 -25
  373. package/src/Carousel/Carousel.tsx +1 -0
  374. package/src/Chat/ChatComposerInput.tsx +2 -0
  375. package/src/Chat/ChatMessageList.tsx +2 -1
  376. package/src/Chat/useChatDictation.ts +1 -0
  377. package/src/Chat/useChatNewMessages.ts +1 -1
  378. package/src/Chat/useChatStreamScroll.ts +2 -0
  379. package/src/Chat/useSpeechRecognition.ts +2 -0
  380. package/src/Chat/useTriggerMenu.tsx +1 -1
  381. package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
  382. package/src/CheckboxInput/CheckboxInput.tsx +38 -15
  383. package/src/CodeBlock/CodeBlock.doc.mjs +9 -1
  384. package/src/CodeBlock/CodeBlock.tsx +41 -4
  385. package/src/CommandPalette/CommandPalette.tsx +1 -0
  386. package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
  387. package/src/ComplexSelector/ComplexSelector.tsx +20 -5
  388. package/src/ContextMenu/ContextMenu.tsx +2 -2
  389. package/src/DateInput/MonthScroller.tsx +8 -2
  390. package/src/DateInput/TouchDateField.tsx +1 -0
  391. package/src/DateInput/Wheel.tsx +4 -0
  392. package/src/DateInput/useOwnScrollGesture.ts +2 -0
  393. package/src/DateInput/usePointerDragScroll.ts +1 -0
  394. package/src/DateInput/useScrollSettle.ts +2 -0
  395. package/src/Dialog/Dialog.tsx +12 -32
  396. package/src/Drawer/useDrawerDialogPresence.ts +2 -0
  397. package/src/DropdownMenu/useMenuOverflow.ts +3 -0
  398. package/src/Field/Field.tsx +2 -2
  399. package/src/FieldStatus/useFieldStatusAnnouncement.ts +1 -0
  400. package/src/FormLayout/FormLayout.doc.mjs +181 -46
  401. package/src/FormLayout/FormLayout.tsx +5 -1
  402. package/src/HoverCard/HoverCard.doc.mjs +10 -8
  403. package/src/HoverCard/HoverCard.tsx +58 -6
  404. package/src/HoverCard/useHoverCard.doc.mjs +178 -36
  405. package/src/HoverCard/useHoverCard.tsx +49 -54
  406. package/src/Icon/Icon.doc.mjs +49 -8
  407. package/src/Icon/Icon.tsx +15 -7
  408. package/src/IconButton/IconButton.doc.mjs +141 -21
  409. package/src/Item/useSwipeAction.ts +2 -0
  410. package/src/Layer/modalOutlet.ts +2 -0
  411. package/src/Layer/outsidePress.ts +1 -0
  412. package/src/Layer/useLayer.tsx +2 -0
  413. package/src/Layer/useLayerDismissal.ts +2 -0
  414. package/src/Layer/usePressPin.ts +81 -15
  415. package/src/Layer/useTouchTrigger.ts +2 -0
  416. package/src/Lightbox/Lightbox.tsx +19 -0
  417. package/src/MobileNav/MobileNav.tsx +9 -30
  418. package/src/Outline/useOutlineFromDOM.ts +2 -0
  419. package/src/Outline/useScrollSpy.ts +2 -0
  420. package/src/OverflowList/OverflowList.tsx +2 -0
  421. package/src/Popover/Popover.tsx +4 -0
  422. package/src/PowerSearch/PowerSearch.doc.mjs +60 -8
  423. package/src/PowerSearch/PowerSearch.tsx +627 -157
  424. package/src/PowerSearch/PowerSearchBottomSheet.tsx +2525 -0
  425. package/src/PowerSearch/PowerSearchEditPopover.tsx +39 -6
  426. package/src/PowerSearch/PowerSearchFilterEditor.tsx +2 -0
  427. package/src/PowerSearch/PowerSearchToken.tsx +7 -0
  428. package/src/PowerSearch/PowerSearchValueEditor.tsx +244 -58
  429. package/src/PowerSearch/formatFilterValue.ts +55 -17
  430. package/src/PowerSearch/formatTokenValue.ts +222 -0
  431. package/src/PowerSearch/powerSearchDateZone.ts +64 -0
  432. package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
  433. package/src/PowerSearch/types.ts +2 -0
  434. package/src/ProgressBar/ProgressBarTouch.ts +2 -0
  435. package/src/RadioList/RadioList.tsx +3 -2
  436. package/src/RadioList/RadioListItem.tsx +5 -3
  437. package/src/Resizable/Resizable.doc.mjs +5 -4
  438. package/src/Resizable/ResizeHandle.tsx +169 -109
  439. package/src/Resizable/createResizable.ts +831 -0
  440. package/src/Resizable/useResizable.ts +292 -623
  441. package/src/SegmentedControl/useSegmentedSelectionMotion.ts +6 -3
  442. package/src/SelectableCard/SelectableCard.tsx +39 -10
  443. package/src/SelectableCard/selectableCardInput.ts +30 -0
  444. package/src/Selector/Selector.tsx +5 -12
  445. package/src/Slider/sliderTouchController.ts +2 -2
  446. package/src/Spinner/Spinner.tsx +77 -63
  447. package/src/Switch/Switch.tsx +2 -6
  448. package/src/Switch/useSwitchTouch.ts +4 -4
  449. package/src/Table/BaseTable.tsx +46 -12
  450. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +2 -1
  451. package/src/Table/plugins/filtering/useTableFiltering.tsx +1 -0
  452. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +4 -0
  453. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +2 -0
  454. package/src/TextInput/TextInput.tsx +11 -10
  455. package/src/TimeInput/TimeInput.tsx +2 -0
  456. package/src/Timer/Timer.tsx +1 -0
  457. package/src/Timestamp/Timestamp.tsx +1 -1
  458. package/src/Toast/Toast.doc.mjs +4 -3
  459. package/src/Toast/Toast.tsx +52 -32
  460. package/src/Toast/ToastViewport.tsx +123 -35
  461. package/src/Toast/types.ts +9 -3
  462. package/src/Toast/useToast.tsx +1 -0
  463. package/src/Tokenizer/Tokenizer.doc.mjs +19 -3
  464. package/src/Tokenizer/Tokenizer.tsx +73 -51
  465. package/src/Tokenizer/TokenizerBottomSheet.tsx +1 -1
  466. package/src/Tokenizer/index.ts +1 -0
  467. package/src/Tooltip/useTooltip.doc.mjs +24 -0
  468. package/src/Tooltip/useTooltip.tsx +61 -56
  469. package/src/Typeahead/BaseTypeahead.tsx +27 -17
  470. package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
  471. package/src/Typeahead/TypeaheadItem.tsx +2 -1
  472. package/src/animator/createAnimator.doc.mjs +153 -0
  473. package/src/animator/createAnimator.ts +324 -0
  474. package/src/gestures/PressTracker.ts +4 -3
  475. package/src/gestures/README.md +10 -4
  476. package/src/hooks/ModalAnnounceProvider.tsx +1 -0
  477. package/src/hooks/actionGroupTracker.ts +20 -5
  478. package/src/hooks/index.ts +2 -0
  479. package/src/hooks/longPressDetector.ts +273 -0
  480. package/src/hooks/pressGroupContext.ts +21 -0
  481. package/src/hooks/rootScrollStyles.ts +247 -0
  482. package/src/hooks/scrollLockTouchGuard.ts +182 -0
  483. package/src/hooks/scrollbarGutter.ts +41 -26
  484. package/src/hooks/useActionGroupTracking.ts +224 -0
  485. package/src/hooks/useAnimator.doc.mjs +109 -0
  486. package/src/hooks/useAnimator.ts +67 -0
  487. package/src/hooks/useAnnounceRenderedText.ts +1 -0
  488. package/src/hooks/useAttachment.ts +1 -1
  489. package/src/hooks/useAutoMediaMode.ts +1 -0
  490. package/src/hooks/useBusyAnnouncement.ts +2 -0
  491. package/src/hooks/useDevWarning.ts +2 -0
  492. package/src/hooks/useFocusTrap.ts +2 -0
  493. package/src/hooks/useGridFocus.doc.mjs +6 -6
  494. package/src/hooks/useGridFocus.ts +10 -7
  495. package/src/hooks/useHotkeys.ts +2 -0
  496. package/src/hooks/useImageMode.ts +2 -0
  497. package/src/hooks/useInputStatusIcon.tsx +3 -2
  498. package/src/hooks/useKeyboardHint.tsx +1 -1
  499. package/src/hooks/useLongPress.doc.mjs +2 -2
  500. package/src/hooks/useLongPress.ts +32 -122
  501. package/src/hooks/useMenuHover.ts +1 -0
  502. package/src/hooks/useMenuPress.ts +2 -0
  503. package/src/hooks/useOverflow.ts +2 -1
  504. package/src/hooks/usePressFeedback.ts +1 -0
  505. package/src/hooks/useResolvedRequired.ts +3 -0
  506. package/src/hooks/useScrollLock.doc.mjs +51 -12
  507. package/src/hooks/useScrollLock.ts +57 -60
  508. package/src/hooks/useScrollableArea.ts +4 -0
  509. package/src/hooks/useStreamingText.ts +2 -0
  510. package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
  511. package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
  512. package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
  513. package/src/i18n/generated-locales/en.generated.ts +41 -0
  514. package/src/i18n/generated-locales/pseudo.generated.ts +42 -0
  515. package/src/index.ts +13 -0
  516. package/src/internal/indicatorPress.stylex.ts +24 -0
  517. package/src/internal/selectable-card.ts +21 -0
  518. package/src/internal/sheetDraft.ts +2 -2
  519. package/src/motion/README.md +9 -5
  520. package/src/motion/animatedLayout.ts +10 -5
  521. package/src/motion/animator.ts +66 -31
  522. package/src/motion/progress.ts +155 -0
  523. package/src/motion/reducedMotion.ts +3 -1
  524. package/src/motion/uikit/alert.ts +43 -0
  525. package/src/privateAttributes/pressGroupItem.stylex.ts +44 -0
  526. package/src/privateAttributes/reducedMotion.stylex.ts +45 -0
  527. package/src/theme/Theme.tsx +37 -3
  528. package/src/theme/motionKnobs.ts +4 -3
  529. package/src/theme/themeMotion.ts +7 -0
  530. package/src/utils/dateParser.ts +16 -0
  531. package/src/utils/focusReturn.ts +30 -0
  532. package/src/utils/interactionModality.ts +4 -0
  533. package/src/utils/interactionOverlay.stylex.ts +3 -2
  534. package/src/utils/plainDate.ts +21 -0
  535. package/src/utils/pressFeedback.ts +24 -6
  536. package/src/utils/triggerFocus.ts +80 -0
  537. package/dist/internal/touch-sheet.d.ts +0 -21
  538. package/dist/internal/touch-sheet.d.ts.map +0 -1
  539. package/dist/internal/touch-sheet.js +0 -19
  540. package/src/internal/touch-sheet.ts +0 -21
@@ -4,9 +4,12 @@
4
4
 
5
5
  /**
6
6
  * @file PowerSearchValueEditor.tsx
7
- * @input OperatorValue, FilterValue, onChange callback
7
+ * @input OperatorValue, FilterValue, onChange callback, and the presentation
8
+ * the editor renders in
8
9
  * @output Renders the appropriate editor for a filter value type
9
- * @position Sub-component; consumed by PowerSearchEditPopover
10
+ * @position Sub-component; consumed by PowerSearchEditPopover (popover
11
+ * presentation) and PowerSearchBottomSheet (sheet presentation, which
12
+ * renders the closed vocabularies as rows itself)
10
13
  *
11
14
  * SYNC: When modified, update:
12
15
  * - /packages/core/src/PowerSearch/index.ts
@@ -39,13 +42,19 @@ import {
39
42
  type NumberInputCommitDecision,
40
43
  } from '../NumberInput/numberInputCommit';
41
44
  import {DateInput} from '../DateInput';
45
+ import {
46
+ isoDateToUnixSeconds,
47
+ resolveDateZone,
48
+ unixSecondsToISODate,
49
+ } from './powerSearchDateZone';
42
50
  import {DateRangeInput, type DateRange} from '../DateRangeInput';
43
51
  import {resolveDateTimeRangePart} from './resolveDateTimeRangePart';
44
52
  import {TimeInput} from '../TimeInput';
45
53
  import {Selector} from '../Selector';
46
- import {Tokenizer} from '../Tokenizer';
54
+ import {Tokenizer} from '../Tokenizer/Tokenizer';
47
55
  import {Typeahead} from '../Typeahead';
48
56
  import {useLocale} from '../i18n';
57
+ import type {TranslatorFn} from '../i18n';
49
58
  import {
50
59
  registerEnglishFallback,
51
60
  useComponentTranslator,
@@ -64,8 +73,30 @@ export interface PowerSearchValueEditorProps {
64
73
  maxMenuItems?: number;
65
74
  isDisabled?: boolean;
66
75
  timezoneID?: string;
76
+ /**
77
+ * Called when a staged value no longer stands — the number input's draft is
78
+ * empty or does not parse — so the sheet presentation's confirm action
79
+ * disables again. Only the `bottom-sheet` presentation stages as typed; the
80
+ * popover commits on blur or Enter and never calls this.
81
+ */
82
+ onUnstage?: () => void;
83
+ /**
84
+ * Where the editor renders. In the `bottom-sheet` presentation the inputs
85
+ * fill the sheet's width, number inputs stage every parseable keystroke
86
+ * (the sheet's footer confirms; there is no Enter-to-save), the date range
87
+ * shows one month, and list values open the Tokenizer's own sheet titled
88
+ * with `fieldLabel`.
89
+ * @default 'popover'
90
+ */
91
+ presentation?: 'popover' | 'bottom-sheet';
92
+ /** The field's label; names the Tokenizer sheet in the sheet presentation. */
93
+ fieldLabel?: string;
67
94
  }
68
95
 
96
+ type EditorPresentation = NonNullable<
97
+ PowerSearchValueEditorProps['presentation']
98
+ >;
99
+
69
100
  // =============================================================================
70
101
  // Helpers
71
102
  // =============================================================================
@@ -96,10 +127,9 @@ function enumItemsToSearchableItems(
96
127
  function dateRangePartToISO(
97
128
  part: DateTimeRangePart,
98
129
  nowSeconds: number,
130
+ zone: string | undefined,
99
131
  ): ISODateString {
100
- return new Date(resolveDateTimeRangePart(part, nowSeconds) * 1000)
101
- .toISOString()
102
- .split('T')[0] as ISODateString;
132
+ return unixSecondsToISODate(resolveDateTimeRangePart(part, nowSeconds), zone);
103
133
  }
104
134
 
105
135
  // =============================================================================
@@ -113,6 +143,7 @@ function StringEditor({
113
143
  onEnter: _onEnter,
114
144
  maxMenuItems,
115
145
  isDisabled,
146
+ presentation,
116
147
  }: {
117
148
  operatorValue: OperatorValue & {type: 'string'};
118
149
  filterValue: FilterValue | undefined;
@@ -120,8 +151,10 @@ function StringEditor({
120
151
  onEnter?: () => void;
121
152
  maxMenuItems?: number;
122
153
  isDisabled?: boolean;
154
+ presentation: EditorPresentation;
123
155
  }) {
124
156
  const t = useComponentTranslator();
157
+ const width = presentation === 'bottom-sheet' ? '100%' : undefined;
125
158
  const currentValue = filterValue?.type === 'string' ? filterValue.value : '';
126
159
 
127
160
  // When a searchSource is provided, render a typeahead instead of a plain
@@ -148,6 +181,7 @@ function StringEditor({
148
181
  placeholder={t('@astryx.powersearch.valueEditor.searchPlaceholder')}
149
182
  debounceMs={150}
150
183
  maxMenuItems={maxMenuItems}
184
+ width={width}
151
185
  />
152
186
  );
153
187
  }
@@ -162,6 +196,7 @@ function StringEditor({
162
196
  onChange={(value: string) => {
163
197
  onChange({type: 'string', value});
164
198
  }}
199
+ width={width}
165
200
  />
166
201
  );
167
202
  }
@@ -172,14 +207,19 @@ function StringListEditor({
172
207
  onChange,
173
208
  maxMenuItems,
174
209
  isDisabled,
210
+ presentation,
211
+ fieldLabel,
175
212
  }: {
176
213
  operatorValue: OperatorValue & {type: 'string_list'};
177
214
  filterValue: FilterValue | undefined;
178
215
  onChange: (value: FilterValue) => void;
179
216
  maxMenuItems?: number;
180
217
  isDisabled?: boolean;
218
+ presentation: EditorPresentation;
219
+ fieldLabel?: string;
181
220
  }) {
182
221
  const t = useComponentTranslator();
222
+ const isSheet = presentation === 'bottom-sheet';
183
223
  const currentValue: SearchableItem[] = useMemo(() => {
184
224
  if (filterValue?.type !== 'string_list') {
185
225
  return [];
@@ -203,9 +243,16 @@ function StringListEditor({
203
243
  const hasCreate =
204
244
  operatorValue.isArbitraryStringAllowed || !operatorValue.searchSource;
205
245
 
246
+ // In the sheet presentation the list value edits through the Tokenizer's
247
+ // own sheet, titled with the field's label; a popover menu inside a sheet
248
+ // would stack a second anchored layer on a surface the person is already in.
206
249
  return (
207
250
  <Tokenizer
208
- label={t('@astryx.powersearch.valueEditor.values')}
251
+ label={
252
+ isSheet && fieldLabel != null
253
+ ? fieldLabel
254
+ : t('@astryx.powersearch.valueEditor.values')
255
+ }
209
256
  isLabelHidden
210
257
  isDisabled={isDisabled}
211
258
  searchSource={source}
@@ -220,6 +267,8 @@ function StringListEditor({
220
267
  debounceMs={operatorValue.searchSource ? 150 : 0}
221
268
  hasCreate={hasCreate}
222
269
  maxMenuItems={maxMenuItems}
270
+ width={isSheet ? '100%' : undefined}
271
+ presentation={isSheet ? 'bottom-sheet' : 'popover'}
223
272
  />
224
273
  );
225
274
  }
@@ -231,6 +280,8 @@ function useNumberEditorHandlers({
231
280
  isIntegerOnly,
232
281
  onChange,
233
282
  onEnter,
283
+ onUnstage,
284
+ stagesAsTyped,
234
285
  }: {
235
286
  valueType: 'integer' | 'float';
236
287
  min?: number;
@@ -238,6 +289,14 @@ function useNumberEditorHandlers({
238
289
  isIntegerOnly: boolean;
239
290
  onChange: (value: FilterValue, shouldSave?: boolean) => void;
240
291
  onEnter?: () => void;
292
+ onUnstage?: () => void;
293
+ /**
294
+ * Stage every keystroke the input would commit, and unstage when the draft
295
+ * stops parsing. The sheet presentation confirms from its footer, so the
296
+ * confirm action must enable while the person is still typing and disable
297
+ * again over an empty field; the popover commits on blur or Enter.
298
+ */
299
+ stagesAsTyped: boolean;
241
300
  }) {
242
301
  const locale = useLocale();
243
302
  const pendingDecisionRef = useRef<NumberInputCommitDecision | null>(null);
@@ -259,12 +318,30 @@ function useNumberEditorHandlers({
259
318
  }, []);
260
319
  const handleInput = useCallback(
261
320
  (event: FormEvent<HTMLElement>) => {
262
- pendingDecisionRef.current = resolveNumberInputCommit(
321
+ const decision = resolveNumberInputCommit(
263
322
  (event.currentTarget as HTMLInputElement).value,
264
323
  {min, max, isIntegerOnly, locale, hasClear: false},
265
324
  );
325
+ pendingDecisionRef.current = decision;
326
+ if (stagesAsTyped) {
327
+ if (decision.type === 'commit') {
328
+ onChange(toFilterValue(decision.value));
329
+ } else {
330
+ // Cleared, or not a number: nothing stands to confirm.
331
+ onUnstage?.();
332
+ }
333
+ }
266
334
  },
267
- [isIntegerOnly, locale, max, min],
335
+ [
336
+ isIntegerOnly,
337
+ locale,
338
+ max,
339
+ min,
340
+ onChange,
341
+ onUnstage,
342
+ stagesAsTyped,
343
+ toFilterValue,
344
+ ],
268
345
  );
269
346
  const handleEnter = useCallback(() => {
270
347
  const decision = pendingDecisionRef.current;
@@ -292,13 +369,17 @@ function IntegerEditor({
292
369
  filterValue,
293
370
  onChange,
294
371
  onEnter,
372
+ onUnstage,
295
373
  isDisabled,
374
+ presentation,
296
375
  }: {
297
376
  operatorValue: OperatorValue & {type: 'integer'};
298
377
  filterValue: FilterValue | undefined;
299
378
  onChange: (value: FilterValue, shouldSave?: boolean) => void;
300
379
  onEnter?: () => void;
380
+ onUnstage?: () => void;
301
381
  isDisabled?: boolean;
382
+ presentation: EditorPresentation;
302
383
  }) {
303
384
  const t = useComponentTranslator();
304
385
  const currentValue =
@@ -310,6 +391,8 @@ function IntegerEditor({
310
391
  isIntegerOnly: true,
311
392
  onChange,
312
393
  onEnter,
394
+ onUnstage,
395
+ stagesAsTyped: presentation === 'bottom-sheet',
313
396
  });
314
397
 
315
398
  return (
@@ -328,6 +411,7 @@ function IntegerEditor({
328
411
  units={operatorValue.units}
329
412
  isIntegerOnly
330
413
  placeholder={t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')}
414
+ width={presentation === 'bottom-sheet' ? '100%' : undefined}
331
415
  />
332
416
  );
333
417
  }
@@ -337,13 +421,17 @@ function FloatEditor({
337
421
  filterValue,
338
422
  onChange,
339
423
  onEnter,
424
+ onUnstage,
340
425
  isDisabled,
426
+ presentation,
341
427
  }: {
342
428
  operatorValue: OperatorValue & {type: 'float'};
343
429
  filterValue: FilterValue | undefined;
344
430
  onChange: (value: FilterValue, shouldSave?: boolean) => void;
345
431
  onEnter?: () => void;
432
+ onUnstage?: () => void;
346
433
  isDisabled?: boolean;
434
+ presentation: EditorPresentation;
347
435
  }) {
348
436
  const t = useComponentTranslator();
349
437
  const currentValue =
@@ -355,6 +443,8 @@ function FloatEditor({
355
443
  isIntegerOnly: false,
356
444
  onChange,
357
445
  onEnter,
446
+ onUnstage,
447
+ stagesAsTyped: presentation === 'bottom-sheet',
358
448
  });
359
449
 
360
450
  return (
@@ -372,6 +462,7 @@ function FloatEditor({
372
462
  max={operatorValue.maxValue}
373
463
  units={operatorValue.units}
374
464
  placeholder={t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')}
465
+ width={presentation === 'bottom-sheet' ? '100%' : undefined}
375
466
  />
376
467
  );
377
468
  }
@@ -381,11 +472,13 @@ function TimeEditor({
381
472
  filterValue,
382
473
  onChange,
383
474
  isDisabled,
475
+ presentation,
384
476
  }: {
385
477
  operatorValue: OperatorValue & {type: 'time'};
386
478
  filterValue: FilterValue | undefined;
387
479
  onChange: (value: FilterValue) => void;
388
480
  isDisabled?: boolean;
481
+ presentation: EditorPresentation;
389
482
  }) {
390
483
  const t = useComponentTranslator();
391
484
  const currentValue =
@@ -406,46 +499,117 @@ function TimeEditor({
406
499
  }}
407
500
  min={operatorValue.minValue as ISOTimeString | undefined}
408
501
  max={operatorValue.maxValue as ISOTimeString | undefined}
502
+ width={presentation === 'bottom-sheet' ? '100%' : undefined}
409
503
  />
410
504
  );
411
505
  }
412
506
 
413
507
  function DateAbsoluteEditor({
508
+ operatorValue,
414
509
  filterValue,
415
510
  onChange,
416
511
  isDisabled,
512
+ presentation,
513
+ timezoneID,
417
514
  }: {
418
515
  operatorValue: OperatorValue & {type: 'date_absolute'};
419
516
  filterValue: FilterValue | undefined;
420
517
  onChange: (value: FilterValue) => void;
421
518
  isDisabled?: boolean;
519
+ presentation: EditorPresentation;
520
+ timezoneID?: string;
422
521
  }) {
423
522
  const t = useComponentTranslator();
424
- // Convert unixSeconds to ISO date string for the date input
425
- const currentValue = useMemo(() => {
426
- if (filterValue?.type !== 'date_absolute') {
427
- return undefined;
428
- }
429
- const date = new Date(filterValue.unixSeconds * 1000);
430
- return date.toISOString().split('T')[0] as ISODateString;
431
- }, [filterValue]);
523
+ // A date-only value edits in the zone the token and the label use. An
524
+ // `isDateOnly: false` value edits its UTC day.
525
+ const zone =
526
+ operatorValue.isDateOnly === false
527
+ ? 'UTC'
528
+ : resolveDateZone(timezoneID, true);
529
+ const unixSeconds =
530
+ filterValue?.type === 'date_absolute' ? filterValue.unixSeconds : undefined;
432
531
 
433
532
  return (
434
533
  <DateInput
435
534
  label={t('@astryx.powersearch.valueEditor.date')}
436
535
  isLabelHidden
437
536
  isDisabled={isDisabled}
438
- value={currentValue}
537
+ value={
538
+ unixSeconds == null
539
+ ? undefined
540
+ : unixSecondsToISODate(unixSeconds, zone)
541
+ }
439
542
  onChange={value => {
440
543
  if (value != null) {
441
- const unixSeconds = Math.floor(new Date(value).getTime() / 1000);
442
- onChange({type: 'date_absolute', unixSeconds});
544
+ onChange({
545
+ type: 'date_absolute',
546
+ unixSeconds: isoDateToUnixSeconds(value, zone),
547
+ });
443
548
  }
444
549
  }}
550
+ width={presentation === 'bottom-sheet' ? '100%' : undefined}
445
551
  />
446
552
  );
447
553
  }
448
554
 
555
+ const RELATIVE_DATE_UNITS = [
556
+ {
557
+ unit: 'day',
558
+ plural: 'days',
559
+ amounts: [1, 3, 7, 14, 30],
560
+ ago: '@astryx.powersearch.sheet.relativeDaysAgo',
561
+ fromNow: '@astryx.powersearch.sheet.relativeDaysFromNow',
562
+ },
563
+ {
564
+ unit: 'week',
565
+ plural: 'weeks',
566
+ amounts: [1, 2, 4],
567
+ ago: '@astryx.powersearch.sheet.relativeWeeksAgo',
568
+ fromNow: '@astryx.powersearch.sheet.relativeWeeksFromNow',
569
+ },
570
+ {
571
+ unit: 'month',
572
+ plural: 'months',
573
+ amounts: [1, 3, 6, 12],
574
+ ago: '@astryx.powersearch.sheet.relativeMonthsAgo',
575
+ fromNow: '@astryx.powersearch.sheet.relativeMonthsFromNow',
576
+ },
577
+ ] as const;
578
+
579
+ /**
580
+ * The relative-date choices an operator offers, in display order. Shared by
581
+ * the popover's Selector and the sheet presentation's rows so both list the
582
+ * same values. With `t` the labels resolve through the catalog's ICU plural
583
+ * messages (the sheet presentation's rows); without it they are the popover
584
+ * editor's own literals. In English the two read identically.
585
+ */
586
+ export function buildRelativeDateOptions(
587
+ operatorValue: OperatorValue & {type: 'date_relative'},
588
+ t?: TranslatorFn,
589
+ ): {value: string; label: string}[] {
590
+ const result: {value: string; label: string}[] = [];
591
+ for (const {unit, plural, amounts, ago, fromNow} of RELATIVE_DATE_UNITS) {
592
+ for (const amount of amounts) {
593
+ const unitWord = amount === 1 ? unit : plural;
594
+ if (operatorValue.isPastAllowed !== false) {
595
+ result.push({
596
+ value: `${amount}${unit[0]}_ago`,
597
+ label: t ? t(ago, {count: amount}) : `${amount} ${unitWord} ago`,
598
+ });
599
+ }
600
+ if (operatorValue.isFutureAllowed !== false) {
601
+ result.push({
602
+ value: `${amount}${unit[0]}_from_now`,
603
+ label: t
604
+ ? t(fromNow, {count: amount})
605
+ : `${amount} ${unitWord} from now`,
606
+ });
607
+ }
608
+ }
609
+ }
610
+ return result;
611
+ }
612
+
449
613
  function DateRelativeEditor({
450
614
  operatorValue,
451
615
  filterValue,
@@ -461,37 +625,18 @@ function DateRelativeEditor({
461
625
  const currentValue =
462
626
  filterValue?.type === 'date_relative' ? filterValue.value : undefined;
463
627
 
464
- const options = useMemo(() => {
465
- const result: {value: string; label: string}[] = [];
466
- const units = [
467
- {unit: 'day', plural: 'days'},
468
- {unit: 'week', plural: 'weeks'},
469
- {unit: 'month', plural: 'months'},
470
- ];
471
- for (const {unit, plural} of units) {
472
- const amounts =
473
- unit === 'day'
474
- ? [1, 3, 7, 14, 30]
475
- : unit === 'week'
476
- ? [1, 2, 4]
477
- : [1, 3, 6, 12];
478
- for (const amount of amounts) {
479
- if (operatorValue.isPastAllowed !== false) {
480
- result.push({
481
- value: `${amount}${unit[0]}_ago`,
482
- label: `${amount} ${amount === 1 ? unit : plural} ago`,
483
- });
484
- }
485
- if (operatorValue.isFutureAllowed !== false) {
486
- result.push({
487
- value: `${amount}${unit[0]}_from_now`,
488
- label: `${amount} ${amount === 1 ? unit : plural} from now`,
489
- });
490
- }
491
- }
492
- }
493
- return result;
494
- }, [operatorValue.isPastAllowed, operatorValue.isFutureAllowed]);
628
+ // The choices depend on the two flags only; a config that rebuilds its
629
+ // operator objects per render keeps the same memoized list.
630
+ const {isPastAllowed, isFutureAllowed} = operatorValue;
631
+ const options = useMemo(
632
+ () =>
633
+ buildRelativeDateOptions({
634
+ type: 'date_relative',
635
+ isPastAllowed,
636
+ isFutureAllowed,
637
+ }),
638
+ [isPastAllowed, isFutureAllowed],
639
+ );
495
640
 
496
641
  return (
497
642
  <Selector
@@ -511,13 +656,19 @@ function DateRangeEditor({
511
656
  filterValue,
512
657
  onChange,
513
658
  isDisabled,
659
+ presentation,
660
+ timezoneID,
514
661
  }: {
515
662
  operatorValue: OperatorValue & {type: 'date_range'};
516
663
  filterValue: FilterValue | undefined;
517
664
  onChange: (value: FilterValue) => void;
518
665
  isDisabled?: boolean;
666
+ presentation: EditorPresentation;
667
+ timezoneID?: string;
519
668
  }) {
520
669
  const t = useComponentTranslator();
670
+ // A range part is a calendar day, read and written as a date-only value is.
671
+ const zone = resolveDateZone(timezoneID, true);
521
672
  const currentValue = useMemo<DateRange | null>(() => {
522
673
  if (filterValue?.type !== 'date_range') {
523
674
  return null;
@@ -525,10 +676,10 @@ function DateRangeEditor({
525
676
  const {start, end} = filterValue.value;
526
677
  const nowSeconds = Date.now() / 1000;
527
678
  return {
528
- start: dateRangePartToISO(start, nowSeconds),
529
- end: dateRangePartToISO(end, nowSeconds),
679
+ start: dateRangePartToISO(start, nowSeconds, zone),
680
+ end: dateRangePartToISO(end, nowSeconds, zone),
530
681
  };
531
- }, [filterValue]);
682
+ }, [filterValue, zone]);
532
683
 
533
684
  const handleChange = useCallback(
534
685
  (range: DateRange | null) => {
@@ -540,16 +691,16 @@ function DateRangeEditor({
540
691
  value: {
541
692
  start: {
542
693
  type: 'ABSOLUTE',
543
- unixSeconds: Date.parse(`${range.start}T00:00:00Z`) / 1000,
694
+ unixSeconds: isoDateToUnixSeconds(range.start, zone),
544
695
  },
545
696
  end: {
546
697
  type: 'ABSOLUTE',
547
- unixSeconds: Date.parse(`${range.end}T00:00:00Z`) / 1000,
698
+ unixSeconds: isoDateToUnixSeconds(range.end, zone),
548
699
  },
549
700
  },
550
701
  });
551
702
  },
552
- [onChange],
703
+ [onChange, zone],
553
704
  );
554
705
 
555
706
  const handleKeyDown = useCallback((event: KeyboardEvent<HTMLDivElement>) => {
@@ -569,6 +720,9 @@ function DateRangeEditor({
569
720
  value={currentValue}
570
721
  onChange={handleChange}
571
722
  hasClear={false}
723
+ // A phone-wide sheet fits one month; the popover keeps the default.
724
+ numberOfMonths={presentation === 'bottom-sheet' ? 1 : undefined}
725
+ width={presentation === 'bottom-sheet' ? '100%' : undefined}
572
726
  />
573
727
  </div>
574
728
  );
@@ -661,6 +815,7 @@ function EnumListEditor({
661
815
  // all of them instead of BaseTypeahead's 10-suggestion default, which
662
816
  // would silently drop valid choices with no way to reach them.
663
817
  maxMenuItems={items.length}
818
+ presentation="popover"
664
819
  />
665
820
  );
666
821
  }
@@ -671,14 +826,19 @@ function EntityListEditor({
671
826
  onChange,
672
827
  maxMenuItems,
673
828
  isDisabled,
829
+ presentation,
830
+ fieldLabel,
674
831
  }: {
675
832
  operatorValue: OperatorValue & {type: 'entity_list'};
676
833
  filterValue: FilterValue | undefined;
677
834
  onChange: (value: FilterValue) => void;
678
835
  maxMenuItems?: number;
679
836
  isDisabled?: boolean;
837
+ presentation: EditorPresentation;
838
+ fieldLabel?: string;
680
839
  }) {
681
840
  const t = useComponentTranslator();
841
+ const isSheet = presentation === 'bottom-sheet';
682
842
  const source = useMemo<SearchSource<SearchableItem>>(() => {
683
843
  if (operatorValue.searchSource) {
684
844
  return operatorValue.searchSource;
@@ -701,9 +861,15 @@ function EntityListEditor({
701
861
  }));
702
862
  }, [filterValue]);
703
863
 
864
+ // Sheet presentation: the Tokenizer's own sheet, titled with the field
865
+ // label, as for string_list.
704
866
  return (
705
867
  <Tokenizer
706
- label={t('@astryx.powersearch.valueEditor.entities')}
868
+ label={
869
+ isSheet && fieldLabel != null
870
+ ? fieldLabel
871
+ : t('@astryx.powersearch.valueEditor.entities')
872
+ }
707
873
  isLabelHidden
708
874
  isDisabled={isDisabled}
709
875
  searchSource={source}
@@ -726,6 +892,8 @@ function EntityListEditor({
726
892
  placeholder={t('@astryx.powersearch.valueEditor.searchPlaceholder')}
727
893
  debounceMs={operatorValue.searchSource ? 150 : 0}
728
894
  maxMenuItems={maxMenuItems}
895
+ width={isSheet ? '100%' : undefined}
896
+ presentation={isSheet ? 'bottom-sheet' : 'popover'}
729
897
  />
730
898
  );
731
899
  }
@@ -771,6 +939,10 @@ export function PowerSearchValueEditor({
771
939
  onEnter,
772
940
  maxMenuItems,
773
941
  isDisabled,
942
+ onUnstage,
943
+ presentation = 'popover',
944
+ fieldLabel,
945
+ timezoneID,
774
946
  }: PowerSearchValueEditorProps) {
775
947
  switch (operatorValue.type) {
776
948
  case 'empty':
@@ -780,6 +952,7 @@ export function PowerSearchValueEditor({
780
952
  return (
781
953
  <StringEditor
782
954
  isDisabled={isDisabled}
955
+ presentation={presentation}
783
956
  operatorValue={operatorValue}
784
957
  filterValue={filterValue}
785
958
  onChange={onChange}
@@ -792,6 +965,8 @@ export function PowerSearchValueEditor({
792
965
  return (
793
966
  <StringListEditor
794
967
  isDisabled={isDisabled}
968
+ presentation={presentation}
969
+ fieldLabel={fieldLabel}
795
970
  operatorValue={operatorValue}
796
971
  filterValue={filterValue}
797
972
  onChange={onChange}
@@ -803,6 +978,8 @@ export function PowerSearchValueEditor({
803
978
  return (
804
979
  <IntegerEditor
805
980
  isDisabled={isDisabled}
981
+ presentation={presentation}
982
+ onUnstage={onUnstage}
806
983
  operatorValue={operatorValue}
807
984
  filterValue={filterValue}
808
985
  onChange={onChange}
@@ -814,6 +991,8 @@ export function PowerSearchValueEditor({
814
991
  return (
815
992
  <FloatEditor
816
993
  isDisabled={isDisabled}
994
+ presentation={presentation}
995
+ onUnstage={onUnstage}
817
996
  operatorValue={operatorValue}
818
997
  filterValue={filterValue}
819
998
  onChange={onChange}
@@ -825,6 +1004,7 @@ export function PowerSearchValueEditor({
825
1004
  return (
826
1005
  <TimeEditor
827
1006
  isDisabled={isDisabled}
1007
+ presentation={presentation}
828
1008
  operatorValue={operatorValue}
829
1009
  filterValue={filterValue}
830
1010
  onChange={onChange}
@@ -835,9 +1015,11 @@ export function PowerSearchValueEditor({
835
1015
  return (
836
1016
  <DateAbsoluteEditor
837
1017
  isDisabled={isDisabled}
1018
+ presentation={presentation}
838
1019
  operatorValue={operatorValue}
839
1020
  filterValue={filterValue}
840
1021
  onChange={onChange}
1022
+ timezoneID={timezoneID}
841
1023
  />
842
1024
  );
843
1025
 
@@ -855,9 +1037,11 @@ export function PowerSearchValueEditor({
855
1037
  return (
856
1038
  <DateRangeEditor
857
1039
  isDisabled={isDisabled}
1040
+ presentation={presentation}
858
1041
  operatorValue={operatorValue}
859
1042
  filterValue={filterValue}
860
1043
  onChange={onChange}
1044
+ timezoneID={timezoneID}
861
1045
  />
862
1046
  );
863
1047
 
@@ -885,6 +1069,8 @@ export function PowerSearchValueEditor({
885
1069
  return (
886
1070
  <EntityListEditor
887
1071
  isDisabled={isDisabled}
1072
+ presentation={presentation}
1073
+ fieldLabel={fieldLabel}
888
1074
  operatorValue={operatorValue}
889
1075
  filterValue={filterValue}
890
1076
  onChange={onChange}