@astryxdesign/core 0.7.15 → 0.7.16-canary.g3aa244b

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 (373) hide show
  1. package/dist/AppShell/AppShell.d.ts.map +1 -1
  2. package/dist/AppShell/AppShell.js +8 -2
  3. package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +2 -1
  4. package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -1
  5. package/dist/AppShell/useCloseMobileDrawerOnActivate.js +15 -2
  6. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  7. package/dist/BottomSheet/BottomSheet.js +11 -6
  8. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  9. package/dist/BottomSheet/BottomSheetPanel.js +52 -35
  10. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  11. package/dist/BottomSheet/useSheetGestures.js +4 -7
  12. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  13. package/dist/Chat/ChatComposerInput.js +1 -1
  14. package/dist/DateInput/DateInput.d.ts +27 -3
  15. package/dist/DateInput/DateInput.d.ts.map +1 -1
  16. package/dist/DateInput/DateInput.js +24 -6
  17. package/dist/DateInput/NativeDateField.d.ts +1 -1
  18. package/dist/DateInput/NativeDateField.d.ts.map +1 -1
  19. package/dist/DateInput/NativeDateField.js +48 -31
  20. package/dist/DateInput/index.d.ts +1 -1
  21. package/dist/DateInput/index.d.ts.map +1 -1
  22. package/dist/DateInput/useTypedDate.d.ts +75 -8
  23. package/dist/DateInput/useTypedDate.d.ts.map +1 -1
  24. package/dist/DateInput/useTypedDate.js +188 -133
  25. package/dist/DateTimeInput/DateTimeInput.d.ts +32 -3
  26. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  27. package/dist/DateTimeInput/DateTimeInput.js +99 -62
  28. package/dist/DateTimeInput/NativeDateSegment.d.ts +8 -1
  29. package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -1
  30. package/dist/DateTimeInput/NativeDateSegment.js +20 -14
  31. package/dist/DateTimeInput/NativeTimeSegment.d.ts +13 -1
  32. package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -1
  33. package/dist/DateTimeInput/NativeTimeSegment.js +21 -18
  34. package/dist/DateTimeInput/index.d.ts +1 -1
  35. package/dist/DateTimeInput/index.d.ts.map +1 -1
  36. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  37. package/dist/DropdownMenu/DropdownMenu.js +10 -3
  38. package/dist/Field/InputClearButton.d.ts.map +1 -1
  39. package/dist/Field/InputClearButton.js +4 -2
  40. package/dist/Field/useEntryErrorBehavior.d.ts +8 -0
  41. package/dist/Field/useEntryErrorBehavior.d.ts.map +1 -0
  42. package/dist/Field/useEntryErrorBehavior.js +30 -0
  43. package/dist/Field/useEntryErrorReport.d.ts +40 -0
  44. package/dist/Field/useEntryErrorReport.d.ts.map +1 -0
  45. package/dist/Field/useEntryErrorReport.js +157 -0
  46. package/dist/Field/useValueReplacesEntry.d.ts +11 -0
  47. package/dist/Field/useValueReplacesEntry.d.ts.map +1 -0
  48. package/dist/Field/useValueReplacesEntry.js +46 -0
  49. package/dist/FormLayout/FormLayout.d.ts +21 -2
  50. package/dist/FormLayout/FormLayout.d.ts.map +1 -1
  51. package/dist/FormLayout/FormLayout.js +5 -2
  52. package/dist/FormLayout/FormLayoutContext.d.ts +18 -2
  53. package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
  54. package/dist/FormLayout/FormLayoutContext.js +22 -4
  55. package/dist/FormLayout/index.d.ts +1 -1
  56. package/dist/FormLayout/index.d.ts.map +1 -1
  57. package/dist/InfoTip/InfoTip.d.ts +1 -1
  58. package/dist/InfoTip/InfoTip.d.ts.map +1 -1
  59. package/dist/InfoTip/InfoTip.js +4 -1
  60. package/dist/Layer/gestureCounter.d.ts +14 -0
  61. package/dist/Layer/gestureCounter.d.ts.map +1 -1
  62. package/dist/Layer/gestureCounter.js +123 -4
  63. package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
  64. package/dist/Layer/layerAnimations.stylex.js +17 -13
  65. package/dist/Layer/layerEntranceSide.d.ts +24 -10
  66. package/dist/Layer/layerEntranceSide.d.ts.map +1 -1
  67. package/dist/Layer/layerEntranceSide.js +28 -13
  68. package/dist/Layer/useLayer.d.ts.map +1 -1
  69. package/dist/Layer/useLayer.js +76 -15
  70. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  71. package/dist/Layer/useTouchTrigger.js +14 -20
  72. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  73. package/dist/Lightbox/Lightbox.js +625 -180
  74. package/dist/List/ListItem.d.ts +3 -2
  75. package/dist/List/ListItem.d.ts.map +1 -1
  76. package/dist/List/ListReorderHandle.d.ts +7 -0
  77. package/dist/List/ListReorderHandle.d.ts.map +1 -1
  78. package/dist/List/ListReorderHandle.js +42 -58
  79. package/dist/List/listReorderContext.d.ts.map +1 -1
  80. package/dist/List/listReorderContext.js +4 -4
  81. package/dist/List/listReorderEngine.d.ts +50 -2
  82. package/dist/List/listReorderEngine.d.ts.map +1 -1
  83. package/dist/List/listReorderEngine.js +205 -10
  84. package/dist/Markdown/plugins/textTransform.d.ts.map +1 -1
  85. package/dist/Markdown/plugins/textTransform.js +31 -10
  86. package/dist/MoreMenu/MoreMenu.d.ts +1 -1
  87. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  88. package/dist/MoreMenu/MoreMenu.js +4 -1
  89. package/dist/NumberInput/NumberInput.d.ts +60 -2
  90. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  91. package/dist/NumberInput/NumberInput.js +141 -40
  92. package/dist/NumberInput/index.d.ts +2 -2
  93. package/dist/NumberInput/index.d.ts.map +1 -1
  94. package/dist/NumberInput/index.js +1 -1
  95. package/dist/NumberInput/numberInputCommit.d.ts +18 -1
  96. package/dist/NumberInput/numberInputCommit.d.ts.map +1 -1
  97. package/dist/NumberInput/numberInputCommit.js +57 -3
  98. package/dist/Pagination/Pagination.d.ts.map +1 -1
  99. package/dist/Pagination/Pagination.js +12 -3
  100. package/dist/Popover/usePopover.d.ts.map +1 -1
  101. package/dist/Popover/usePopover.js +23 -15
  102. package/dist/PowerSearch/PowerSearch.d.ts +1 -1
  103. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  104. package/dist/PowerSearch/PowerSearch.js +8 -4
  105. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +4 -1
  106. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  107. package/dist/PowerSearch/PowerSearchEditPopover.js +4 -1
  108. package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
  109. package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
  110. package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -3
  111. package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
  112. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  113. package/dist/PowerSearch/PowerSearchToken.js +4 -1
  114. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  115. package/dist/PowerSearch/PowerSearchValueEditor.js +4 -0
  116. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
  117. package/dist/Selector/useSelectorPresentation.js +13 -12
  118. package/dist/Slider/Slider.d.ts.map +1 -1
  119. package/dist/Slider/Slider.js +6 -8
  120. package/dist/Table/BaseTable.d.ts +1 -1
  121. package/dist/Table/BaseTable.d.ts.map +1 -1
  122. package/dist/Table/BaseTable.js +276 -198
  123. package/dist/Table/Table.d.ts +5 -1
  124. package/dist/Table/Table.d.ts.map +1 -1
  125. package/dist/Table/index.d.ts +5 -3
  126. package/dist/Table/index.d.ts.map +1 -1
  127. package/dist/Table/index.js +2 -1
  128. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  129. package/dist/Table/plugins/filtering/useTableFiltering.js +2 -0
  130. package/dist/Table/plugins/infiniteScroll/TableInfiniteScrollWide.a11y.chromium.spec.d.ts.map +1 -0
  131. package/dist/Table/plugins/infiniteScroll/index.d.ts +9 -0
  132. package/dist/Table/plugins/infiniteScroll/index.d.ts.map +1 -0
  133. package/dist/Table/plugins/infiniteScroll/index.js +9 -0
  134. package/dist/Table/plugins/infiniteScroll/useTableInfiniteScroll.d.ts +29 -0
  135. package/dist/Table/plugins/infiniteScroll/useTableInfiniteScroll.d.ts.map +1 -0
  136. package/dist/Table/plugins/infiniteScroll/useTableInfiniteScroll.js +394 -0
  137. package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
  138. package/dist/Table/plugins/sortable/useTableSortableState.js +4 -4
  139. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  140. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +21 -1
  141. package/dist/Table/plugins/virtualization/TableColumnWindow.d.ts +4 -0
  142. package/dist/Table/plugins/virtualization/TableColumnWindow.d.ts.map +1 -0
  143. package/dist/Table/plugins/virtualization/TableColumnWindow.js +114 -0
  144. package/dist/Table/plugins/virtualization/index.d.ts +3 -1
  145. package/dist/Table/plugins/virtualization/index.d.ts.map +1 -1
  146. package/dist/Table/plugins/virtualization/index.js +3 -2
  147. package/dist/Table/plugins/virtualization/useTableColumnWindow.d.ts +39 -0
  148. package/dist/Table/plugins/virtualization/useTableColumnWindow.d.ts.map +1 -0
  149. package/dist/Table/plugins/virtualization/useTableColumnWindow.js +215 -0
  150. package/dist/Table/plugins/virtualization/useTableColumnsVirtualization.d.ts +23 -0
  151. package/dist/Table/plugins/virtualization/useTableColumnsVirtualization.d.ts.map +1 -0
  152. package/dist/Table/plugins/virtualization/useTableColumnsVirtualization.js +37 -0
  153. package/dist/Table/plugins/virtualization/useTableWindow.d.ts +2 -1
  154. package/dist/Table/plugins/virtualization/useTableWindow.d.ts.map +1 -1
  155. package/dist/Table/plugins/virtualization/useTableWindow.js +43 -13
  156. package/dist/Table/tableColumnWindowing.d.ts +107 -0
  157. package/dist/Table/tableColumnWindowing.d.ts.map +1 -0
  158. package/dist/Table/tableColumnWindowing.js +72 -0
  159. package/dist/Table/tablePinnedColumnRuns.d.ts +23 -0
  160. package/dist/Table/tablePinnedColumnRuns.d.ts.map +1 -0
  161. package/dist/Table/tablePinnedColumnRuns.js +41 -0
  162. package/dist/Table/tableRuntime.d.ts +14 -2
  163. package/dist/Table/tableRuntime.d.ts.map +1 -1
  164. package/dist/Table/tableRuntime.js +32 -11
  165. package/dist/Table/types.d.ts +28 -2
  166. package/dist/Table/types.d.ts.map +1 -1
  167. package/dist/Table/useBaseTablePlugins.js +2 -2
  168. package/dist/Text/useTruncation.d.ts +6 -1
  169. package/dist/Text/useTruncation.d.ts.map +1 -1
  170. package/dist/Text/useTruncation.js +53 -35
  171. package/dist/TextArea/TextArea.d.ts +10 -1
  172. package/dist/TextArea/TextArea.d.ts.map +1 -1
  173. package/dist/TextArea/TextArea.js +2 -0
  174. package/dist/TimeInput/TimeInput.d.ts +61 -0
  175. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  176. package/dist/TimeInput/TimeInput.js +97 -84
  177. package/dist/TimeInput/index.d.ts +1 -1
  178. package/dist/TimeInput/index.d.ts.map +1 -1
  179. package/dist/TimeInput/useTypedTime.d.ts +76 -0
  180. package/dist/TimeInput/useTypedTime.d.ts.map +1 -0
  181. package/dist/TimeInput/useTypedTime.js +258 -0
  182. package/dist/Toast/Toast.d.ts +1 -1
  183. package/dist/Toast/Toast.d.ts.map +1 -1
  184. package/dist/Toast/Toast.js +4 -2
  185. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  186. package/dist/Tooltip/useTooltip.js +46 -53
  187. package/dist/astryx.css +22 -11
  188. package/dist/dragToSnapPoints/createDragToSnapPoints.d.ts +156 -0
  189. package/dist/dragToSnapPoints/createDragToSnapPoints.d.ts.map +1 -1
  190. package/dist/dragToSnapPoints/createDragToSnapPoints.js +313 -97
  191. package/dist/gestures/createPanGesture.d.ts +41 -0
  192. package/dist/gestures/createPanGesture.d.ts.map +1 -1
  193. package/dist/gestures/createPanGesture.js +66 -22
  194. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  195. package/dist/hooks/useMenuPress.js +36 -2
  196. package/dist/i18n/generated-english/DateInput/NativeDateField.generated.d.ts.map +1 -1
  197. package/dist/i18n/generated-english/DateInput/NativeDateField.generated.js +0 -1
  198. package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.d.ts.map +1 -1
  199. package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.js +0 -1
  200. package/dist/i18n/generated-english/Lightbox/Lightbox.generated.d.ts.map +1 -1
  201. package/dist/i18n/generated-english/Lightbox/Lightbox.generated.js +2 -0
  202. package/dist/i18n/generated-english/{DateTimeInput/NativeTimeSegment.generated.d.ts → Table/plugins/infiniteScroll/useTableInfiniteScroll.generated.d.ts} +2 -2
  203. package/dist/i18n/generated-english/Table/plugins/infiniteScroll/useTableInfiniteScroll.generated.d.ts.map +1 -0
  204. package/dist/i18n/generated-english/{DateTimeInput/NativeTimeSegment.generated.js → Table/plugins/infiniteScroll/useTableInfiniteScroll.generated.js} +2 -2
  205. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  206. package/dist/i18n/generated-locales/en.generated.js +32 -0
  207. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  208. package/dist/i18n/generated-locales/pseudo.generated.js +32 -0
  209. package/dist/internal/touch.d.ts +1 -1
  210. package/dist/internal/touch.d.ts.map +1 -1
  211. package/dist/internal/touch.js +1 -1
  212. package/dist/motion/animator.d.ts +28 -1
  213. package/dist/motion/animator.d.ts.map +1 -1
  214. package/dist/motion/animator.js +99 -19
  215. package/dist/theme/generateThemeRules.d.ts.map +1 -1
  216. package/dist/theme/generateThemeRules.js +14 -3
  217. package/dist/theme/tokenReferences.d.ts +7 -15
  218. package/dist/theme/tokenReferences.d.ts.map +1 -1
  219. package/dist/theme/tokenReferences.js +49 -7
  220. package/dist/utils/clickGuard.d.ts +8 -1
  221. package/dist/utils/clickGuard.d.ts.map +1 -1
  222. package/dist/utils/clickGuard.js +27 -4
  223. package/dist/utils/sharedResizeObserver.d.ts +18 -2
  224. package/dist/utils/sharedResizeObserver.d.ts.map +1 -1
  225. package/dist/utils/sharedResizeObserver.js +43 -2
  226. package/dist/utils/themeProps.d.ts +8 -0
  227. package/dist/utils/themeProps.d.ts.map +1 -1
  228. package/dist/utils/themeProps.js +17 -0
  229. package/dist/utils/timeFormat.d.ts +9 -1
  230. package/dist/utils/timeFormat.d.ts.map +1 -1
  231. package/dist/utils/timeFormat.js +46 -6
  232. package/dist/utils/timeParser.d.ts +3 -1
  233. package/dist/utils/timeParser.d.ts.map +1 -1
  234. package/dist/utils/timeParser.js +7 -3
  235. package/dist/utils/touchEndMark.d.ts +7 -0
  236. package/dist/utils/touchEndMark.d.ts.map +1 -0
  237. package/dist/utils/touchEndMark.js +33 -0
  238. package/dist/virtualization/listWindow.d.ts +28 -2
  239. package/dist/virtualization/listWindow.d.ts.map +1 -1
  240. package/dist/virtualization/listWindow.js +71 -3
  241. package/dist/virtualization/useInlineListWindow.d.ts +64 -0
  242. package/dist/virtualization/useInlineListWindow.d.ts.map +1 -0
  243. package/dist/virtualization/useInlineListWindow.js +135 -0
  244. package/dist/virtualization/useListFocusIsland.d.ts +28 -0
  245. package/dist/virtualization/useListFocusIsland.d.ts.map +1 -0
  246. package/dist/virtualization/useListFocusIsland.js +53 -0
  247. package/dist/virtualization/useListWindow.d.ts +6 -4
  248. package/dist/virtualization/useListWindow.d.ts.map +1 -1
  249. package/dist/virtualization/useListWindow.js +17 -29
  250. package/locales/en.json +131 -3
  251. package/locales/pseudo.json +96 -0
  252. package/package.json +5 -5
  253. package/src/AppShell/AppShell.tsx +12 -3
  254. package/src/AppShell/useCloseMobileDrawerOnActivate.ts +19 -2
  255. package/src/BottomSheet/BottomSheet.tsx +12 -8
  256. package/src/BottomSheet/BottomSheetPanel.tsx +53 -40
  257. package/src/BottomSheet/useSheetGestures.ts +18 -18
  258. package/src/ButtonGroup/ButtonGroup.doc.mjs +5 -0
  259. package/src/Chat/ChatComposerInput.tsx +4 -0
  260. package/src/CheckboxInput/CheckboxInput.doc.mjs +3 -0
  261. package/src/DateInput/DateInput.doc.mjs +21 -3
  262. package/src/DateInput/DateInput.tsx +61 -7
  263. package/src/DateInput/NativeDateField.tsx +58 -36
  264. package/src/DateInput/index.ts +1 -0
  265. package/src/DateInput/useTypedDate.ts +293 -196
  266. package/src/DateTimeInput/DateTimeInput.doc.mjs +21 -3
  267. package/src/DateTimeInput/DateTimeInput.tsx +158 -86
  268. package/src/DateTimeInput/NativeDateSegment.tsx +35 -13
  269. package/src/DateTimeInput/NativeTimeSegment.tsx +45 -22
  270. package/src/DateTimeInput/index.ts +1 -0
  271. package/src/DropdownMenu/DropdownMenu.tsx +10 -3
  272. package/src/Field/InputClearButton.tsx +3 -1
  273. package/src/Field/useEntryErrorBehavior.ts +34 -0
  274. package/src/Field/useEntryErrorReport.ts +210 -0
  275. package/src/Field/useValueReplacesEntry.ts +44 -0
  276. package/src/FormLayout/FormLayout.doc.mjs +14 -0
  277. package/src/FormLayout/FormLayout.tsx +24 -2
  278. package/src/FormLayout/FormLayoutContext.ts +24 -4
  279. package/src/FormLayout/index.ts +5 -1
  280. package/src/InfoTip/InfoTip.doc.mjs +2 -2
  281. package/src/InfoTip/InfoTip.tsx +3 -0
  282. package/src/Layer/gestureCounter.ts +136 -4
  283. package/src/Layer/layerAnimations.stylex.ts +13 -9
  284. package/src/Layer/layerEntranceSide.ts +48 -11
  285. package/src/Layer/useLayer.tsx +89 -15
  286. package/src/Layer/useTouchTrigger.ts +21 -21
  287. package/src/Lightbox/Lightbox.doc.mjs +2 -1
  288. package/src/Lightbox/Lightbox.tsx +864 -257
  289. package/src/List/ListItem.tsx +3 -2
  290. package/src/List/ListReorderHandle.tsx +59 -77
  291. package/src/List/listReorderContext.ts +3 -4
  292. package/src/List/listReorderEngine.tsx +246 -11
  293. package/src/Markdown/plugins/textTransform.ts +46 -12
  294. package/src/MoreMenu/MoreMenu.doc.mjs +2 -2
  295. package/src/MoreMenu/MoreMenu.tsx +3 -0
  296. package/src/NumberInput/NumberInput.doc.mjs +29 -6
  297. package/src/NumberInput/NumberInput.tsx +224 -52
  298. package/src/NumberInput/index.ts +2 -1
  299. package/src/NumberInput/numberInputCommit.ts +57 -13
  300. package/src/Pagination/Pagination.tsx +14 -4
  301. package/src/Popover/usePopover.tsx +30 -22
  302. package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
  303. package/src/PowerSearch/PowerSearch.tsx +7 -3
  304. package/src/PowerSearch/PowerSearchEditPopover.tsx +12 -2
  305. package/src/PowerSearch/PowerSearchFilterEditor.tsx +3 -0
  306. package/src/PowerSearch/PowerSearchToken.tsx +3 -0
  307. package/src/PowerSearch/PowerSearchValueEditor.tsx +4 -0
  308. package/src/ProgressBar/ProgressBar.doc.mjs +3 -0
  309. package/src/SegmentedControl/SegmentedControl.doc.mjs +5 -0
  310. package/src/Selector/useSelectorPresentation.ts +16 -12
  311. package/src/Slider/Slider.tsx +6 -8
  312. package/src/StatusDot/StatusDot.doc.mjs +3 -0
  313. package/src/Switch/Switch.doc.mjs +3 -0
  314. package/src/TabList/TabList.doc.mjs +4 -0
  315. package/src/Table/BaseTable.tsx +440 -289
  316. package/src/Table/Table.doc.mjs +2 -2
  317. package/src/Table/Table.tsx +5 -1
  318. package/src/Table/index.ts +8 -1
  319. package/src/Table/plugins/filtering/useTableFiltering.tsx +2 -0
  320. package/src/Table/plugins/infiniteScroll/index.ts +10 -0
  321. package/src/Table/plugins/infiniteScroll/useTableInfiniteScroll.tsx +523 -0
  322. package/src/Table/plugins/sortable/useTableSortableState.tsx +4 -4
  323. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +31 -1
  324. package/src/Table/plugins/virtualization/TableColumnWindow.tsx +160 -0
  325. package/src/Table/plugins/virtualization/index.ts +3 -1
  326. package/src/Table/plugins/virtualization/useTableColumnWindow.ts +284 -0
  327. package/src/Table/plugins/virtualization/useTableColumnsVirtualization.ts +53 -0
  328. package/src/Table/plugins/virtualization/useTableWindow.ts +49 -17
  329. package/src/Table/tableColumnWindowing.ts +181 -0
  330. package/src/Table/tablePinnedColumnRuns.ts +55 -0
  331. package/src/Table/tableRuntime.ts +44 -11
  332. package/src/Table/types.ts +25 -2
  333. package/src/Table/useBaseTablePlugins.ts +2 -2
  334. package/src/Table/useTableColumnsVirtualization.doc.mjs +29 -0
  335. package/src/Table/useTableInfiniteScroll.doc.mjs +58 -0
  336. package/src/Text/Heading.doc.mjs +3 -0
  337. package/src/Text/useTruncation.doc.mjs +10 -0
  338. package/src/Text/useTruncation.ts +53 -35
  339. package/src/TextArea/TextArea.doc.mjs +15 -0
  340. package/src/TextArea/TextArea.tsx +11 -0
  341. package/src/TextInput/TextInput.doc.mjs +3 -0
  342. package/src/TimeInput/TimeInput.doc.mjs +38 -4
  343. package/src/TimeInput/TimeInput.tsx +176 -99
  344. package/src/TimeInput/index.ts +2 -0
  345. package/src/TimeInput/useTypedTime.ts +341 -0
  346. package/src/Toast/Toast.doc.mjs +2 -2
  347. package/src/Toast/Toast.tsx +3 -1
  348. package/src/Tooltip/useTooltip.tsx +147 -136
  349. package/src/TopNav/TopNav.doc.mjs +4 -0
  350. package/src/dragToSnapPoints/createDragToSnapPoints.ts +437 -119
  351. package/src/gestures/createPanGesture.ts +112 -39
  352. package/src/hooks/useMenuPress.ts +39 -0
  353. package/src/i18n/generated-english/DateInput/NativeDateField.generated.ts +0 -1
  354. package/src/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.ts +0 -1
  355. package/src/i18n/generated-english/Lightbox/Lightbox.generated.ts +2 -0
  356. package/src/i18n/generated-english/{DateTimeInput/NativeTimeSegment.generated.ts → Table/plugins/infiniteScroll/useTableInfiniteScroll.generated.ts} +2 -2
  357. package/src/i18n/generated-locales/en.generated.ts +34 -0
  358. package/src/i18n/generated-locales/pseudo.generated.ts +34 -0
  359. package/src/internal/touch.ts +5 -1
  360. package/src/motion/animator.ts +181 -23
  361. package/src/theme/generateThemeRules.ts +14 -3
  362. package/src/theme/tokenReferences.ts +48 -7
  363. package/src/utils/clickGuard.ts +33 -3
  364. package/src/utils/sharedResizeObserver.ts +46 -2
  365. package/src/utils/themeProps.ts +17 -0
  366. package/src/utils/timeFormat.ts +55 -10
  367. package/src/utils/timeParser.ts +7 -9
  368. package/src/utils/touchEndMark.ts +33 -0
  369. package/src/virtualization/listWindow.ts +105 -3
  370. package/src/virtualization/useInlineListWindow.ts +261 -0
  371. package/src/virtualization/useListFocusIsland.ts +87 -0
  372. package/src/virtualization/useListWindow.ts +14 -51
  373. package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.d.ts.map +0 -1
@@ -6,14 +6,14 @@
6
6
  * @file useTruncation.ts
7
7
  * @input Uses React hooks, sharedResizeObserver, sharedMutationObserver
8
8
  * @output Exports useTruncation hook for detecting text overflow
9
- * @position Hook; consumed by Text.tsx, Heading.tsx
9
+ * @position Hook; consumed by Text.tsx, Heading.tsx and Lightbox.tsx
10
10
  *
11
11
  * SYNC: When modified, update:
12
12
  * - /packages/core/src/Text/Text.doc.mjs
13
13
  */
14
14
 
15
15
  import {useCallback, useRef, useState, type RefCallback} from 'react';
16
- import {isResizeObserved, observeResize} from '../utils/sharedResizeObserver';
16
+ import {observeResizeAfterLayout} from '../utils/sharedResizeObserver';
17
17
  import {observeContent} from '../utils/sharedMutationObserver';
18
18
 
19
19
  export interface UseTruncationOptions {
@@ -22,6 +22,12 @@ export interface UseTruncationOptions {
22
22
  * 0 = no truncation, hook returns isTruncated: false
23
23
  */
24
24
  maxLines: number;
25
+
26
+ /**
27
+ * Pass true while the text is shown in full; the hook keeps reporting
28
+ * whether it is cut off when clamped.
29
+ */
30
+ isExpanded?: boolean;
25
31
  }
26
32
 
27
33
  export interface UseTruncationReturn {
@@ -69,12 +75,16 @@ export interface UseTruncationReturn {
69
75
  export function useTruncation(
70
76
  options: UseTruncationOptions,
71
77
  ): UseTruncationReturn {
72
- const {maxLines} = options;
78
+ const {maxLines, isExpanded = false} = options;
73
79
  const [isTruncated, setIsTruncated] = useState(false);
74
80
  const [fullText, setFullText] = useState('');
75
81
  const elementRef = useRef<HTMLElement | null>(null);
76
82
  const unobserveRef = useRef<(() => void) | null>(null);
77
83
  const unobserveContentRef = useRef<(() => void) | null>(null);
84
+ // The last measured answer, which the text keeps while it is expanded.
85
+ const answerRef = useRef({isTruncated: false, fullText: ''});
86
+ // The text an expanded element kept its answer for when it went.
87
+ const keptForRef = useRef<HTMLElement | null>(null);
78
88
 
79
89
  const checkTruncation = useCallback(
80
90
  (element: HTMLElement) => {
@@ -84,12 +94,15 @@ export function useTruncation(
84
94
  }
85
95
 
86
96
  // Capture full text content
87
- setFullText(element.textContent ?? '');
97
+ answerRef.current.fullText = element.textContent ?? '';
98
+ setFullText(answerRef.current.fullText);
88
99
 
89
100
  // Check for overflow
90
101
  if (maxLines === 1) {
91
102
  // Single-line: check horizontal overflow
92
- setIsTruncated(element.scrollWidth > element.offsetWidth);
103
+ answerRef.current.isTruncated =
104
+ element.scrollWidth > element.offsetWidth;
105
+ setIsTruncated(answerRef.current.isTruncated);
93
106
  } else {
94
107
  // Multi-line: use Range to measure actual content height.
95
108
  // When -webkit-line-clamp is active, browsers may report
@@ -105,7 +118,8 @@ export function useTruncation(
105
118
  } catch {
106
119
  // Fallback to scrollHeight (e.g. jsdom in tests)
107
120
  }
108
- setIsTruncated(contentHeight > element.offsetHeight);
121
+ answerRef.current.isTruncated = contentHeight > element.offsetHeight;
122
+ setIsTruncated(answerRef.current.isTruncated);
109
123
  }
110
124
  },
111
125
  [maxLines],
@@ -120,39 +134,43 @@ export function useTruncation(
120
134
  unobserveContentRef.current?.();
121
135
  unobserveContentRef.current = null;
122
136
 
137
+ const previous = elementRef.current;
123
138
  elementRef.current = element;
124
139
 
125
- if (element && maxLines > 0) {
126
- // Observe via the shared singleton, if available. The call that
127
- // observeResize makes on registration runs inside React's commit, so
128
- // it measures nothing. The observer's first notification measures a
129
- // new element. The browser sends it after its own layout, so mounting
130
- // text forces no layout pass. An element another subscriber already
131
- // observes gets no new first notification, so a microtask after the
132
- // commit measures it. The truncated state only decides whether to
133
- // compose the tooltip, so nothing paints differently.
134
- if (typeof ResizeObserver !== 'undefined') {
135
- let registered = false;
136
- const wasObserved = isResizeObserved(element);
137
- const unobserve = observeResize(element, () => {
138
- if (registered) {
139
- checkTruncation(element);
140
- }
141
- });
142
- registered = true;
143
- unobserveRef.current = unobserve;
144
- // Skipped when this registration has ended by then (measuring
145
- // turned off, or the element replaced, in the same task).
146
- if (wasObserved) {
147
- queueMicrotask(() => {
148
- if (unobserveRef.current === unobserve) {
149
- checkTruncation(element);
150
- }
151
- });
152
- }
140
+ // Shown in full, the text keeps the answer it had when clamped.
141
+ if (isExpanded) {
142
+ if (element != null) {
143
+ setIsTruncated(answerRef.current.isTruncated);
144
+ setFullText(answerRef.current.fullText);
153
145
  } else {
146
+ keptForRef.current = previous;
147
+ }
148
+ return;
149
+ }
150
+
151
+ // A kept answer is about the text it measured. Other text starts from
152
+ // none, as it does after its old element goes.
153
+ const keptFor = keptForRef.current;
154
+ keptForRef.current = null;
155
+ if (keptFor != null && element !== keptFor) {
156
+ answerRef.current = {isTruncated: false, fullText: ''};
157
+ setIsTruncated(false);
158
+ setFullText('');
159
+ }
160
+
161
+ if (element && maxLines > 0) {
162
+ // Observe via the shared singleton, if available. The observer's
163
+ // first notification measures a new element. The browser sends it
164
+ // after its own layout, so mounting text forces no layout pass. The
165
+ // truncated state only decides whether to compose the tooltip, so
166
+ // nothing paints differently.
167
+ const unobserve = observeResizeAfterLayout(element, () => {
168
+ checkTruncation(element);
169
+ });
170
+ if (unobserve == null) {
154
171
  checkTruncation(element);
155
172
  }
173
+ unobserveRef.current = unobserve;
156
174
  // New text in a box that keeps its size fires no resize, so the
157
175
  // captured text and truncated state would otherwise stay stale.
158
176
  unobserveContentRef.current = observeContent(element, () => {
@@ -163,7 +181,7 @@ export function useTruncation(
163
181
  setFullText('');
164
182
  }
165
183
  },
166
- [maxLines, checkTruncation],
184
+ [maxLines, isExpanded, checkTruncation],
167
185
  );
168
186
 
169
187
  return {
@@ -73,6 +73,9 @@ const anatomy = [
73
73
 
74
74
  export const docs = {
75
75
  name: 'TextArea',
76
+ playground: {
77
+ defaults: {label: 'Notes', value: 'Some notes'},
78
+ },
76
79
  displayName: 'Text Area',
77
80
  category: 'Form Controls',
78
81
  keywords: [
@@ -184,6 +187,12 @@ export const docs = {
184
187
  description:
185
188
  'Maximum number of characters allowed, counted as user-perceived characters: an emoji or flag sequence counts as one. When set, a character counter (current/max) is displayed inside the input container, anchored to the bottom-right beneath the text. Does not enforce the limit natively; when exceeded the counter turns red and shows a warning icon (a non-color cue), and screen-reader users hear the remaining/over-limit count announced. Consumers validating the limit should count with characterCount (exported from the package) so enforcement matches the displayed count.',
186
189
  },
190
+ {
191
+ name: 'htmlMaxLength',
192
+ type: 'number',
193
+ description:
194
+ 'The native `maxlength` attribute: the browser stops typing past this many UTF-16 code units (an emoji can take two or more). It is separate from `maxLength`, the soft counter of user-perceived characters: it works without the counter, and it neither shows nor changes the counter. It can stop typing before the counter reaches its limit. TextArea adds no truncation or validation of its own, so a longer controlled value stays as set. The attribute is in the server-rendered HTML, so it applies before hydration. Validate on the server too: the browser limit does not bind requests that skip the UI.',
195
+ },
187
196
  {
188
197
  name: 'status',
189
198
  type: "{ type: 'warning' | 'error' | 'success'; message?: string }",
@@ -499,6 +508,12 @@ export const docsZh = {
499
508
  description:
500
509
  '允许的最大字符数。设置后,在文本域下方显示字符计数器(当前/最大)。不原生强制限制:超出时计数器显示错误样式。',
501
510
  },
511
+ {
512
+ name: 'htmlMaxLength',
513
+ type: 'number',
514
+ description:
515
+ '原生 `maxlength` 属性:输入达到该数量的 UTF-16 码元后,浏览器不再接受输入(一个 emoji 可能占两个或更多)。它独立于 `maxLength`(按用户感知字符计数的软计数器):无需计数器即可使用,也不会显示或改变计数器。它可能在计数器到达上限之前就阻止输入。组件本身不截断、不校验,因此更长的受控值保持原样。该属性会出现在服务端渲染的 HTML 中,因此在水合之前即已生效。请同时在服务端校验:浏览器限制无法约束绕过界面的请求。',
516
+ },
502
517
  {
503
518
  name: 'status',
504
519
  type: "{ type: 'warning' | 'error' | 'success'; message?: string }",
@@ -352,6 +352,15 @@ export interface TextAreaProps
352
352
  * so enforcement matches the displayed count.
353
353
  */
354
354
  maxLength?: number;
355
+ /**
356
+ * The native `maxlength` attribute of the textarea. The browser stops typing
357
+ * past this many UTF-16 code units. An emoji can take two or more code
358
+ * units. This limit is separate from `maxLength`, which counts
359
+ * user-perceived characters. Set either one, or both. TextArea adds no
360
+ * truncation or validation of its own. A longer `value` stays as the caller
361
+ * sets it.
362
+ */
363
+ htmlMaxLength?: number;
355
364
  /**
356
365
  * Whether to automatically focus the textarea on mount.
357
366
  * @default false
@@ -420,6 +429,7 @@ export function TextArea({
420
429
  hasAutoCorrect,
421
430
  onPaste,
422
431
  maxLength,
432
+ htmlMaxLength,
423
433
  hasAutoFocus = false,
424
434
  size: sizeProp,
425
435
  htmlName,
@@ -655,6 +665,7 @@ export function TextArea({
655
665
  onBlur={onBlur}
656
666
  placeholder={placeholder}
657
667
  rows={rows}
668
+ maxLength={htmlMaxLength}
658
669
  {...textEntryTraitAttributes({
659
670
  enterKeyHint,
660
671
  inputMode,
@@ -4,6 +4,9 @@
4
4
 
5
5
  export const docs = {
6
6
  name: 'TextInput',
7
+ playground: {
8
+ defaults: {label: 'Name', value: 'Jordan'},
9
+ },
7
10
  displayName: 'Text Input',
8
11
  category: 'Form Controls',
9
12
  keywords: ["textinput","textfield","input","search","clearable","prefix","suffix","adornment","validation"],
@@ -247,7 +247,21 @@ export const docs = {
247
247
  name: 'status',
248
248
  type: "{type: 'warning' | 'error' | 'success', message?: string}",
249
249
  description:
250
- 'Status indicator that colors the border and displays an icon. When a message is provided it is rendered below the input.',
250
+ "Status indicator that colors the border and displays an icon. When a message is provided it is rendered below the input. A typed time the field rejects, and a native edit outside min or max, show the field's own error message instead; an error status with a message shows in its place, and the rejection is still announced. A warning or success never replaces a rejection.",
251
+ },
252
+ {
253
+ name: 'onEntryErrorChange',
254
+ type: "(error: {kind: 'unreadable' | 'outOfRange', text: string, value?: ISOTimeString} | null) => void",
255
+ description:
256
+ "Called each time the field's rejection of typed text changes, and with null when the rejection ends. kind is 'unreadable' (text that is not a time) or 'outOfRange' (a time before min or after max); text is the typed text; value is the ISO time the text names, for 'outOfRange'. Under entryErrorBehavior 'complete', a rejection shows once the typed time is complete (in 12-hour text, with its day period unless the hour reads 0 or 13–23), or at Enter or blur; under 'blur-or-enter', only at Enter or blur. Rejected text stays in the field. It also runs when a new min, max, or value, or disabling the field, changes the rejection, never twice for the same rejection, and with null when the field unmounts while a rejection stands. The native and bottom-sheet surfaces take no typed text, so they never report.",
257
+ },
258
+ {
259
+ name: 'entryErrorBehavior',
260
+ type: "'complete' | 'blur-or-enter'",
261
+ description:
262
+ "When the field shows its own entry error: a typed time it rejects, as onEntryErrorChange reports it, or a native edit outside min or max. It sets when the error shows, not when validation runs, so it is not React Aria's validationBehavior (native versus ARIA validation), and it never changes a caller status. 'complete' shows a complete typed time outside min or max, and a native edit outside them, at once, and other rejected text at Enter or blur. 'blur-or-enter' holds every rejection until Enter or blur: the message, aria-invalid, the invalid styling, the announcement, and the onEntryErrorChange report then appear together. Under both values, an edit the field accepts or empties clears the error at once; under 'blur-or-enter', an edit that leaves the entry wrong keeps the shown error until the next Enter or blur. The field's own value wins over the nearest FormLayout's defaultEntryErrorBehavior.",
263
+ default:
264
+ "the nearest FormLayout's defaultEntryErrorBehavior, else 'complete'",
251
265
  },
252
266
  {
253
267
  name: 'statusVariant',
@@ -330,7 +344,8 @@ export const docsZh = {
330
344
  {
331
345
  name: 'isDisabled',
332
346
  type: 'boolean',
333
- description: '禁用输入框并抑制交互。输入框仍可聚焦并暴露 `aria-disabled`。',
347
+ description:
348
+ '禁用输入框并抑制交互。输入框仍可聚焦并暴露 `aria-disabled`。',
334
349
  default: 'false',
335
350
  },
336
351
  {
@@ -428,7 +443,21 @@ export const docsZh = {
428
443
  name: 'status',
429
444
  type: "{type: 'warning' | 'error' | 'success', message?: string}",
430
445
  description:
431
- '为边框着色并显示图标的状态指示器。当提供消息时,消息渲染在输入框下方。',
446
+ '为边框着色并显示图标的状态指示器。当提供消息时,消息渲染在输入框下方。字段拒绝的输入时间,以及超出 min 或 max 的原生编辑,会显示字段自身的错误消息;带消息的 error 状态会显示在其位置,拒绝仍会被播报。warning 或 success 状态不会替代拒绝消息。',
447
+ },
448
+ {
449
+ name: 'onEntryErrorChange',
450
+ type: "(error: {kind: 'unreadable' | 'outOfRange', text: string, value?: ISOTimeString} | null) => void",
451
+ description:
452
+ "每当字段对输入文本的拒绝发生变化时调用,拒绝结束时传入 null。kind 为 'unreadable'(不是时间的文本)或 'outOfRange'(早于 min 或晚于 max 的时间);text 为输入的文本;value 为文本所指的 ISO 时间,用于 'outOfRange'。在 entryErrorBehavior 为 'complete' 时,输入的时间完整后(12 小时制文本需带上午/下午,除非小时为 0 或 13–23),或按 Enter、失焦时,拒绝才会显示;为 'blur-or-enter' 时仅在按 Enter 或失焦时显示;被拒绝的文本保留在字段中。新的 min、max 或 value,或禁用字段改变拒绝时也会调用;同一拒绝不会重复调用;拒绝仍存在时字段卸载会传入 null。原生和底部面板界面不接受输入文本,因此不会报告。",
453
+ },
454
+ {
455
+ name: 'entryErrorBehavior',
456
+ type: "'complete' | 'blur-or-enter'",
457
+ description:
458
+ "字段何时显示自身的输入错误:即字段拒绝的输入时间(也就是 onEntryErrorChange 报告的拒绝),或超出 min 或 max 的原生编辑。它设定错误何时显示,而不是何时校验,因此不同于 React Aria 的 validationBehavior(原生校验与 ARIA 校验之分),也不会改变调用方的 status。'complete' 立即显示完整输入但超出 min 或 max 的时间,以及超出范围的原生编辑;其他被拒绝的文本在按 Enter 或失焦时显示。'blur-or-enter' 将每个拒绝保留到按 Enter 或失焦:届时消息、aria-invalid、无效样式、播报和 onEntryErrorChange 报告一起出现。两种取值下,字段接受的编辑或清空输入的编辑都会立即清除错误;在 'blur-or-enter' 下,输入仍然错误的编辑会保留已显示的错误,直到下一次按 Enter 或失焦。字段自身的取值优先于最近的 FormLayout 的 defaultEntryErrorBehavior。",
459
+ default:
460
+ "最近的 FormLayout 的 defaultEntryErrorBehavior,否则为 'complete'",
432
461
  },
433
462
  {
434
463
  name: 'statusVariant',
@@ -633,7 +662,12 @@ export const docsDense = {
633
662
  "deprecated, use presentation: 'touch'='adaptive-native', 'always'='native', 'never'='text-input'. still works as released; presentation wins if both set.",
634
663
  placeholder: 'Placeholder when empty. Focused+empty shows format hint.',
635
664
  size: 'Input element height.',
636
- status: 'Colored border+icon. Message rendered below input.',
665
+ status:
666
+ 'Colored border+icon. Message rendered below input. A rejected typed time or native edit outside min/max shows its own error instead; an error status w/ message wins (rejection still announced); warning/success never hide a rejection.',
667
+ onEntryErrorChange:
668
+ "(error|null) on each typed-rejection change: kind 'unreadable'|'outOfRange' (min/max), text, value (ISO time, outOfRange); shows when the typed time is complete (12h: day period unless hour 0/13-23) or at Enter/blur under complete, only at Enter/blur under blur-or-enter, text kept; also on new min/max/value, disable; never twice for one rejection; null on unmount mid-rejection; never on native/sheet",
669
+ entryErrorBehavior:
670
+ "'complete'|'blur-or-enter': when the field's own rejection shows (not when validation runs; not React Aria validationBehavior; never changes status). complete: complete out-of-range typed time and native out-of-range edit at once, other text at Enter/blur. blur-or-enter: message, aria-invalid, styling, announcement and onEntryErrorChange report all wait for Enter/blur. Accepted or emptied entry clears at once; still-wrong edit keeps a shown error (blur-or-enter). Default: nearest FormLayout defaultEntryErrorBehavior, else complete",
637
671
  statusVariant:
638
672
  'How status message is placed: attached overlaps below input; detached floats below w/ spacing; tooltip hides the box and shows it on the status icon.',
639
673
  labelTooltip: 'Tooltip as info icon at label row end.',