@astryxdesign/core 0.7.17 → 0.7.18-canary.g170df15

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 (457) hide show
  1. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  2. package/dist/AlertDialog/AlertDialog.js +7 -0
  3. package/dist/AppShell/AppShell.d.ts.map +1 -1
  4. package/dist/AppShell/AppShell.js +5 -3
  5. package/dist/AppShell/observeMainOverflow.d.ts +5 -0
  6. package/dist/AppShell/observeMainOverflow.d.ts.map +1 -1
  7. package/dist/AppShell/observeMainOverflow.js +39 -9
  8. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  9. package/dist/BottomSheet/BottomSheet.js +8 -0
  10. package/dist/BottomSheet/useSheetGestures.d.ts +8 -0
  11. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  12. package/dist/BottomSheet/useSheetGestures.js +16 -1
  13. package/dist/Button/Button.d.ts.map +1 -1
  14. package/dist/Button/Button.js +3 -16
  15. package/dist/Card/Card.d.ts.map +1 -1
  16. package/dist/Card/Card.js +5 -1
  17. package/dist/Citation/Citation.d.ts.map +1 -1
  18. package/dist/Citation/Citation.js +2 -2
  19. package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
  20. package/dist/ClickableCard/ClickableCard.js +7 -2
  21. package/dist/DateInput/DateInput.d.ts +0 -3
  22. package/dist/DateInput/DateInput.d.ts.map +1 -1
  23. package/dist/DateInput/DateInput.js +3 -5
  24. package/dist/DateInput/NativeDateField.d.ts.map +1 -1
  25. package/dist/DateInput/NativeDateField.js +3 -5
  26. package/dist/DateInput/TouchDateField.d.ts.map +1 -1
  27. package/dist/DateInput/TouchDateField.js +2 -4
  28. package/dist/DateInput/useTypedDate.d.ts.map +1 -1
  29. package/dist/DateInput/useTypedDate.js +9 -6
  30. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  31. package/dist/DateRangeInput/DateRangeInput.js +13 -9
  32. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  33. package/dist/DateTimeInput/DateTimeInput.js +3 -15
  34. package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
  35. package/dist/DateTimeInput/TouchDateTimeField.js +2 -14
  36. package/dist/Dialog/Dialog.d.ts.map +1 -1
  37. package/dist/Dialog/Dialog.js +7 -1
  38. package/dist/Drawer/Drawer.d.ts.map +1 -1
  39. package/dist/Drawer/Drawer.js +7 -0
  40. package/dist/Field/Field.d.ts.map +1 -1
  41. package/dist/Field/Field.js +2 -1
  42. package/dist/Field/FieldLabel.d.ts.map +1 -1
  43. package/dist/Field/FieldLabel.js +9 -2
  44. package/dist/Field/InputClearButton.d.ts.map +1 -1
  45. package/dist/Field/InputClearButton.js +23 -0
  46. package/dist/Field/inputStyles.stylex.d.ts +22 -6
  47. package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
  48. package/dist/Field/inputStyles.stylex.js +32 -0
  49. package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
  50. package/dist/FieldStatus/FieldStatus.js +7 -2
  51. package/dist/FileInput/FileInput.d.ts.map +1 -1
  52. package/dist/FileInput/FileInput.js +4 -4
  53. package/dist/InputGroup/InputGroup.d.ts.map +1 -1
  54. package/dist/InputGroup/InputGroup.js +6 -16
  55. package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
  56. package/dist/InputGroup/InputGroupText.js +2 -8
  57. package/dist/Item/Item.d.ts.map +1 -1
  58. package/dist/Item/Item.js +8 -2
  59. package/dist/Kbd/Kbd.d.ts +3 -2
  60. package/dist/Kbd/Kbd.d.ts.map +1 -1
  61. package/dist/Kbd/Kbd.js +3 -2
  62. package/dist/Layer/gestureCounter.d.ts +5 -0
  63. package/dist/Layer/gestureCounter.d.ts.map +1 -1
  64. package/dist/Layer/gestureCounter.js +40 -4
  65. package/dist/Layer/inputHold.d.ts +13 -0
  66. package/dist/Layer/inputHold.d.ts.map +1 -1
  67. package/dist/Layer/inputHold.js +203 -14
  68. package/dist/Layer/layerHost.d.ts +3 -2
  69. package/dist/Layer/layerHost.d.ts.map +1 -1
  70. package/dist/Layer/layerHost.js +3 -2
  71. package/dist/Layer/outsidePanClaim.d.ts +17 -0
  72. package/dist/Layer/outsidePanClaim.d.ts.map +1 -1
  73. package/dist/Layer/outsidePanClaim.js +36 -8
  74. package/dist/Layer/outsidePress.d.ts +7 -1
  75. package/dist/Layer/outsidePress.d.ts.map +1 -1
  76. package/dist/Layer/outsidePress.js +9 -2
  77. package/dist/Layer/useLayer.d.ts +21 -5
  78. package/dist/Layer/useLayer.d.ts.map +1 -1
  79. package/dist/Layer/useLayer.js +63 -40
  80. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  81. package/dist/Lightbox/Lightbox.js +7 -0
  82. package/dist/MetadataList/MetadataList.d.ts +1 -1
  83. package/dist/MetadataList/MetadataList.d.ts.map +1 -1
  84. package/dist/MetadataList/MetadataList.js +8 -0
  85. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  86. package/dist/MultiSelector/MultiSelector.js +37 -17
  87. package/dist/NavIcon/NavIcon.d.ts +2 -2
  88. package/dist/NavIcon/NavIcon.d.ts.map +1 -1
  89. package/dist/NavIcon/NavIcon.js +2 -2
  90. package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
  91. package/dist/NavMenu/NavHeadingMenuItem.js +4 -3
  92. package/dist/NumberInput/NumberInput.d.ts +13 -5
  93. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  94. package/dist/NumberInput/NumberInput.js +6 -17
  95. package/dist/NumberInput/numberParser.d.ts +9 -2
  96. package/dist/NumberInput/numberParser.d.ts.map +1 -1
  97. package/dist/NumberInput/numberParser.js +15 -2
  98. package/dist/Overlay/OverlayScrim.d.ts.map +1 -1
  99. package/dist/Overlay/OverlayScrim.js +13 -4
  100. package/dist/Overlay/useOverlay.d.ts +1 -1
  101. package/dist/Pagination/Pagination.d.ts +3 -2
  102. package/dist/Pagination/Pagination.d.ts.map +1 -1
  103. package/dist/Pagination/Pagination.js +9 -2
  104. package/dist/Popover/usePopover.d.ts +37 -6
  105. package/dist/Popover/usePopover.d.ts.map +1 -1
  106. package/dist/Popover/usePopover.js +103 -20
  107. package/dist/PowerSearch/PowerSearch.d.ts +4 -1
  108. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  109. package/dist/PowerSearch/PowerSearch.js +3 -4
  110. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +1 -2
  111. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
  112. package/dist/PowerSearch/PowerSearchBottomSheet.js +173 -185
  113. package/dist/PowerSearch/PowerSearchValueEditor.d.ts +0 -12
  114. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  115. package/dist/PowerSearch/PowerSearchValueEditor.js +1 -51
  116. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  117. package/dist/PowerSearch/formatFilterValue.js +6 -8
  118. package/dist/PowerSearch/formatTokenValue.d.ts +5 -10
  119. package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -1
  120. package/dist/PowerSearch/formatTokenValue.js +21 -38
  121. package/dist/PowerSearch/relativeDateOptions.d.ts +30 -0
  122. package/dist/PowerSearch/relativeDateOptions.d.ts.map +1 -0
  123. package/dist/PowerSearch/relativeDateOptions.js +74 -0
  124. package/dist/ProgressBar/ProgressBar.d.ts +1 -1
  125. package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
  126. package/dist/ProgressBar/ProgressBar.js +20 -14
  127. package/dist/Resizable/createResizable.d.ts.map +1 -1
  128. package/dist/Resizable/createResizable.js +38 -4
  129. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  130. package/dist/SegmentedControl/SegmentedControlItem.js +5 -3
  131. package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
  132. package/dist/SelectableCard/SelectableCard.js +6 -2
  133. package/dist/Selector/Selector.d.ts.map +1 -1
  134. package/dist/Selector/Selector.js +2 -1
  135. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  136. package/dist/SideNav/SideNavItem.js +1 -1
  137. package/dist/Slider/Slider.d.ts.map +1 -1
  138. package/dist/Slider/Slider.js +53 -8
  139. package/dist/Stepper/Step.d.ts.map +1 -1
  140. package/dist/Stepper/Step.js +2 -2
  141. package/dist/TabList/Tab.d.ts.map +1 -1
  142. package/dist/TabList/Tab.js +2 -0
  143. package/dist/TabList/TabMenu.d.ts.map +1 -1
  144. package/dist/TabList/TabMenu.js +2 -0
  145. package/dist/Table/BaseTable.d.ts.map +1 -1
  146. package/dist/Table/BaseTable.js +30 -8
  147. package/dist/Table/Table.d.ts +9 -4
  148. package/dist/Table/Table.d.ts.map +1 -1
  149. package/dist/Table/Table.js +9 -4
  150. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  151. package/dist/Table/TableHeaderCell.js +3 -7
  152. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
  153. package/dist/Table/plugins/rowIndex/useTableRowIndex.js +4 -1
  154. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
  155. package/dist/Table/plugins/rowStatus/useTableRowStatus.js +2 -0
  156. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  157. package/dist/Table/plugins/sortable/useTableSortable.js +18 -1
  158. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  159. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +34 -24
  160. package/dist/Table/tableColumnAdmission.d.ts +7 -0
  161. package/dist/Table/tableColumnAdmission.d.ts.map +1 -1
  162. package/dist/Table/tableColumnAdmission.js +15 -0
  163. package/dist/Table/types.d.ts +5 -5
  164. package/dist/Text/Text.d.ts.map +1 -1
  165. package/dist/Text/Text.js +13 -8
  166. package/dist/Text/TruncationTooltip.d.ts +7 -39
  167. package/dist/Text/TruncationTooltip.d.ts.map +1 -1
  168. package/dist/Text/TruncationTooltip.js +47 -128
  169. package/dist/Text/cutText.d.ts +22 -0
  170. package/dist/Text/cutText.d.ts.map +1 -0
  171. package/dist/Text/cutText.js +92 -0
  172. package/dist/Text/cutTextOnKeyboardFocus.d.ts +41 -0
  173. package/dist/Text/cutTextOnKeyboardFocus.d.ts.map +1 -0
  174. package/dist/Text/cutTextOnKeyboardFocus.js +112 -0
  175. package/dist/Text/textClampContext.d.ts +1 -0
  176. package/dist/Text/textClampContext.d.ts.map +1 -1
  177. package/dist/Text/textClampContext.js +10 -5
  178. package/dist/Text/useTruncation.d.ts +23 -1
  179. package/dist/Text/useTruncation.d.ts.map +1 -1
  180. package/dist/Text/useTruncation.js +74 -28
  181. package/dist/TextInput/TextInput.d.ts +6 -6
  182. package/dist/Thumbnail/Thumbnail.js +4 -1
  183. package/dist/TimeInput/TimeInput.d.ts +0 -3
  184. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  185. package/dist/TimeInput/TimeInput.js +3 -5
  186. package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
  187. package/dist/TimeInput/TouchTimeField.js +3 -5
  188. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  189. package/dist/Timestamp/Timestamp.js +22 -16
  190. package/dist/Timestamp/TimestampHoverCard.d.ts +6 -3
  191. package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
  192. package/dist/Timestamp/TimestampHoverCard.js +30 -19
  193. package/dist/Timestamp/formatInstant.d.ts.map +1 -1
  194. package/dist/Timestamp/formatInstant.js +3 -3
  195. package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
  196. package/dist/Timestamp/tooltipEntries.js +4 -2
  197. package/dist/Toast/Toast.d.ts.map +1 -1
  198. package/dist/Toast/Toast.js +62 -31
  199. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  200. package/dist/Toast/ToastViewport.js +35 -13
  201. package/dist/Toast/useToast.d.ts.map +1 -1
  202. package/dist/Toast/useToast.js +35 -14
  203. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  204. package/dist/Tooltip/useTooltip.js +3 -3
  205. package/dist/astryx.css +38 -8
  206. package/dist/hooks/useAnnounceRenderedText.d.ts +10 -3
  207. package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
  208. package/dist/hooks/useAnnounceRenderedText.js +11 -3
  209. package/dist/hooks/useFocusTrap.d.ts +12 -0
  210. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  211. package/dist/hooks/useFocusTrap.js +13 -6
  212. package/dist/hooks/useHotkeys.d.ts +9 -1
  213. package/dist/hooks/useHotkeys.d.ts.map +1 -1
  214. package/dist/hooks/useHotkeys.js +52 -2
  215. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
  216. package/dist/hooks/useInputStatusIcon.js +2 -1
  217. package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
  218. package/dist/hooks/useKeyboardHint.js +4 -3
  219. package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts.map +1 -1
  220. package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.js +2 -0
  221. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
  222. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
  223. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
  224. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +0 -6
  225. package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.d.ts +8 -0
  226. package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.d.ts.map +1 -0
  227. package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.js +17 -0
  228. package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
  229. package/dist/i18n/generated-english/Slider/Slider.generated.js +1 -0
  230. package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts.map +1 -1
  231. package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.js +1 -0
  232. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  233. package/dist/i18n/generated-locales/en.generated.js +5 -0
  234. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  235. package/dist/i18n/generated-locales/pseudo.generated.js +5 -0
  236. package/dist/i18n/getLocaleDirection.d.ts +0 -16
  237. package/dist/i18n/getLocaleDirection.d.ts.map +1 -1
  238. package/dist/i18n/getLocaleDirection.js +16 -6
  239. package/dist/i18n/listFormat.d.ts +34 -0
  240. package/dist/i18n/listFormat.d.ts.map +1 -0
  241. package/dist/i18n/listFormat.js +45 -0
  242. package/dist/i18n/useListFormatter.d.ts +7 -3
  243. package/dist/i18n/useListFormatter.d.ts.map +1 -1
  244. package/dist/i18n/useListFormatter.js +16 -13
  245. package/dist/internal/module-loader.d.ts +15 -0
  246. package/dist/internal/module-loader.d.ts.map +1 -0
  247. package/dist/internal/module-loader.js +15 -0
  248. package/dist/motion/animatedLayout.d.ts +6 -0
  249. package/dist/motion/animatedLayout.d.ts.map +1 -1
  250. package/dist/motion/animatedLayout.js +201 -27
  251. package/dist/palette/color.d.ts +16 -0
  252. package/dist/palette/color.d.ts.map +1 -1
  253. package/dist/palette/color.js +37 -1
  254. package/dist/palette/derive-look.d.ts +235 -0
  255. package/dist/palette/derive-look.d.ts.map +1 -0
  256. package/dist/palette/derive-look.js +879 -0
  257. package/dist/palette/editor-look.d.ts +41 -0
  258. package/dist/palette/editor-look.d.ts.map +1 -0
  259. package/dist/palette/editor-look.js +401 -0
  260. package/dist/palette/mapping.d.ts +99 -6
  261. package/dist/palette/mapping.d.ts.map +1 -1
  262. package/dist/palette/mapping.js +68 -11
  263. package/dist/theme/tokens.d.ts +1 -1
  264. package/dist/theme/tokens.d.ts.map +1 -1
  265. package/dist/theme/tokens.js +1 -1
  266. package/dist/utils/characters.d.ts.map +1 -1
  267. package/dist/utils/characters.js +7 -0
  268. package/dist/utils/devWarning.d.ts +18 -0
  269. package/dist/utils/devWarning.d.ts.map +1 -1
  270. package/dist/utils/devWarning.js +30 -0
  271. package/dist/utils/focusReturn.d.ts +2 -0
  272. package/dist/utils/focusReturn.d.ts.map +1 -1
  273. package/dist/utils/focusReturn.js +3 -8
  274. package/dist/utils/hitArea.d.ts +4 -1
  275. package/dist/utils/hitArea.d.ts.map +1 -1
  276. package/dist/utils/hitArea.js +72 -9
  277. package/dist/utils/mergeProps.d.ts.map +1 -1
  278. package/dist/utils/mergeProps.js +53 -38
  279. package/dist/utils/scrollView.d.ts +2 -2
  280. package/dist/utils/scrollView.d.ts.map +1 -1
  281. package/dist/utils/scrollView.js +3 -3
  282. package/dist/utils/textDirection.d.ts +29 -5
  283. package/dist/utils/textDirection.d.ts.map +1 -1
  284. package/dist/utils/textDirection.js +56 -4
  285. package/dist/utils/touchHitArea.d.ts.map +1 -1
  286. package/dist/utils/touchHitArea.js +4 -2
  287. package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
  288. package/dist/virtualization/useInlineListWindow.js +63 -4
  289. package/locales/en.json +26 -6
  290. package/locales/pseudo.json +15 -0
  291. package/package.json +10 -5
  292. package/src/AlertDialog/AlertDialog.tsx +15 -0
  293. package/src/AlertDialog/useImperativeAlertDialog.doc.mjs +7 -4
  294. package/src/AppShell/AppShell.tsx +6 -3
  295. package/src/AppShell/observeMainOverflow.ts +39 -9
  296. package/src/Badge/Badge.doc.mjs +3 -3
  297. package/src/BottomSheet/BottomSheet.tsx +15 -0
  298. package/src/BottomSheet/useSheetGestures.ts +26 -1
  299. package/src/Button/Button.tsx +3 -23
  300. package/src/Card/Card.doc.mjs +3 -3
  301. package/src/Card/Card.tsx +11 -6
  302. package/src/Chat/ChatSendButton.doc.mjs +6 -6
  303. package/src/Chat/ChatToolCalls.doc.mjs +1 -1
  304. package/src/CheckboxInput/CheckboxInput.doc.mjs +3 -3
  305. package/src/Citation/Citation.tsx +8 -2
  306. package/src/ClickableCard/ClickableCard.tsx +9 -2
  307. package/src/ComplexSelector/ComplexSelector.doc.mjs +3 -3
  308. package/src/ContextMenu/ContextMenuItem.doc.mjs +3 -3
  309. package/src/DateInput/DateInput.tsx +2 -4
  310. package/src/DateInput/NativeDateField.tsx +5 -4
  311. package/src/DateInput/TouchDateField.tsx +2 -3
  312. package/src/DateInput/useTypedDate.ts +13 -6
  313. package/src/DateRangeInput/DateRangeInput.tsx +14 -10
  314. package/src/DateTimeInput/DateTimeInput.tsx +2 -12
  315. package/src/DateTimeInput/TouchDateTimeField.tsx +2 -11
  316. package/src/Dialog/Dialog.tsx +15 -1
  317. package/src/Dialog/useImperativeDialog.doc.mjs +7 -4
  318. package/src/Drawer/Drawer.tsx +15 -0
  319. package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -1
  320. package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +3 -3
  321. package/src/DropdownMenu/DropdownMenuItem.doc.mjs +3 -3
  322. package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +3 -3
  323. package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +2 -2
  324. package/src/Field/Field.doc.mjs +1 -1
  325. package/src/Field/Field.tsx +2 -1
  326. package/src/Field/FieldLabel.doc.mjs +3 -3
  327. package/src/Field/FieldLabel.tsx +11 -3
  328. package/src/Field/InputClearButton.tsx +27 -0
  329. package/src/Field/inputStyles.stylex.ts +53 -6
  330. package/src/FieldStatus/FieldStatus.tsx +7 -2
  331. package/src/FileInput/FileInput.tsx +12 -2
  332. package/src/Icon/Icon.doc.mjs +17 -14
  333. package/src/Icon/useIcon.doc.mjs +6 -6
  334. package/src/IconButton/IconButton.doc.mjs +2 -2
  335. package/src/InfoTip/InfoTip.doc.mjs +1 -1
  336. package/src/InputGroup/InputGroup.tsx +5 -12
  337. package/src/InputGroup/InputGroupText.tsx +2 -3
  338. package/src/Item/Item.tsx +10 -1
  339. package/src/Kbd/Kbd.doc.mjs +5 -5
  340. package/src/Kbd/Kbd.tsx +3 -2
  341. package/src/Layer/gestureCounter.ts +39 -3
  342. package/src/Layer/inputHold.ts +241 -18
  343. package/src/Layer/layerHost.ts +3 -2
  344. package/src/Layer/outsidePanClaim.ts +50 -8
  345. package/src/Layer/outsidePress.ts +18 -4
  346. package/src/Layer/useLayer.tsx +128 -76
  347. package/src/Lightbox/Lightbox.tsx +15 -0
  348. package/src/MetadataList/MetadataList.tsx +8 -0
  349. package/src/MoreMenu/MoreMenu.doc.mjs +1 -1
  350. package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
  351. package/src/MultiSelector/MultiSelector.tsx +45 -15
  352. package/src/NavIcon/NavIcon.doc.mjs +19 -10
  353. package/src/NavIcon/NavIcon.tsx +3 -2
  354. package/src/NavMenu/NavHeadingMenuItem.tsx +9 -3
  355. package/src/NumberInput/NumberInput.doc.mjs +12 -12
  356. package/src/NumberInput/NumberInput.tsx +12 -15
  357. package/src/NumberInput/numberParser.ts +15 -2
  358. package/src/Overlay/Overlay.doc.mjs +13 -1
  359. package/src/Overlay/OverlayScrim.tsx +45 -15
  360. package/src/Overlay/useOverlay.doc.mjs +7 -7
  361. package/src/Overlay/useOverlay.tsx +1 -1
  362. package/src/Pagination/Pagination.doc.mjs +9 -6
  363. package/src/Pagination/Pagination.tsx +15 -3
  364. package/src/Popover/usePopover.doc.mjs +14 -4
  365. package/src/Popover/usePopover.tsx +180 -23
  366. package/src/PowerSearch/PowerSearch.doc.mjs +165 -15
  367. package/src/PowerSearch/PowerSearch.tsx +6 -8
  368. package/src/PowerSearch/PowerSearchBottomSheet.tsx +182 -223
  369. package/src/PowerSearch/PowerSearchValueEditor.tsx +1 -51
  370. package/src/PowerSearch/formatFilterValue.ts +8 -9
  371. package/src/PowerSearch/formatTokenValue.ts +24 -42
  372. package/src/PowerSearch/relativeDateOptions.ts +84 -0
  373. package/src/ProgressBar/ProgressBar.doc.mjs +24 -5
  374. package/src/ProgressBar/ProgressBar.tsx +28 -18
  375. package/src/Resizable/createResizable.ts +46 -5
  376. package/src/SegmentedControl/SegmentedControlItem.tsx +4 -3
  377. package/src/SelectableCard/SelectableCard.tsx +8 -2
  378. package/src/Selector/Selector.doc.mjs +3 -3
  379. package/src/Selector/Selector.tsx +3 -1
  380. package/src/Selector/SelectorOption.doc.mjs +3 -3
  381. package/src/SideNav/SideNavItem.doc.mjs +6 -6
  382. package/src/SideNav/SideNavItem.tsx +3 -0
  383. package/src/Slider/Slider.tsx +48 -6
  384. package/src/Stepper/Step.tsx +7 -1
  385. package/src/Switch/Switch.doc.mjs +3 -3
  386. package/src/TabList/Tab.tsx +4 -0
  387. package/src/TabList/TabMenu.tsx +4 -0
  388. package/src/Table/BaseTable.tsx +35 -7
  389. package/src/Table/Table.doc.mjs +56 -6
  390. package/src/Table/Table.tsx +9 -4
  391. package/src/Table/TableHeaderCell.tsx +2 -8
  392. package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +10 -1
  393. package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +5 -0
  394. package/src/Table/plugins/sortable/useTableSortable.tsx +41 -2
  395. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +49 -20
  396. package/src/Table/tableColumnAdmission.ts +23 -0
  397. package/src/Table/types.ts +5 -5
  398. package/src/Table/useTableRowsVirtualization.doc.mjs +2 -2
  399. package/src/Text/Text.tsx +21 -7
  400. package/src/Text/TruncationTooltip.tsx +51 -184
  401. package/src/Text/cutText.tsx +126 -0
  402. package/src/Text/cutTextOnKeyboardFocus.tsx +158 -0
  403. package/src/Text/textClampContext.ts +14 -4
  404. package/src/Text/useTruncation.ts +85 -27
  405. package/src/TextArea/TextArea.doc.mjs +4 -4
  406. package/src/TextInput/TextInput.doc.mjs +3 -3
  407. package/src/Thumbnail/Thumbnail.tsx +1 -1
  408. package/src/TimeInput/TimeInput.tsx +3 -9
  409. package/src/TimeInput/TouchTimeField.tsx +6 -4
  410. package/src/Timestamp/Timestamp.tsx +29 -21
  411. package/src/Timestamp/TimestampHoverCard.tsx +44 -31
  412. package/src/Timestamp/formatInstant.ts +7 -3
  413. package/src/Timestamp/tooltipEntries.ts +4 -2
  414. package/src/Toast/Toast.doc.mjs +24 -37
  415. package/src/Toast/Toast.tsx +77 -29
  416. package/src/Toast/ToastViewport.tsx +33 -13
  417. package/src/Toast/useToast.tsx +42 -15
  418. package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
  419. package/src/Tooltip/useTooltip.tsx +2 -1
  420. package/src/TopNav/TopNavMegaMenu.doc.mjs +13 -0
  421. package/src/TopNav/TopNavMenu.doc.mjs +2 -0
  422. package/src/Typeahead/Typeahead.doc.mjs +2 -2
  423. package/src/hooks/useAnnounceRenderedText.ts +15 -2
  424. package/src/hooks/useFocusTrap.ts +27 -4
  425. package/src/hooks/useHotkeys.doc.mjs +54 -11
  426. package/src/hooks/useHotkeys.ts +72 -3
  427. package/src/hooks/useInputStatusIcon.tsx +2 -1
  428. package/src/hooks/useKeyboardHint.tsx +3 -2
  429. package/src/i18n/generated-english/DateRangeInput/DateRangeInput.generated.ts +2 -0
  430. package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
  431. package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +0 -6
  432. package/src/i18n/generated-english/PowerSearch/relativeDateOptions.generated.ts +18 -0
  433. package/src/i18n/generated-english/Slider/Slider.generated.ts +1 -0
  434. package/src/i18n/generated-english/Thumbnail/Thumbnail.generated.ts +1 -0
  435. package/src/i18n/generated-locales/en.generated.ts +5 -0
  436. package/src/i18n/generated-locales/pseudo.generated.ts +5 -0
  437. package/src/i18n/getLocaleDirection.ts +57 -7
  438. package/src/i18n/listFormat.ts +55 -0
  439. package/src/i18n/useListFormatter.ts +22 -13
  440. package/src/internal/module-loader.ts +15 -0
  441. package/src/motion/animatedLayout.ts +215 -28
  442. package/src/palette/color.ts +41 -1
  443. package/src/palette/derive-look.ts +1186 -0
  444. package/src/palette/editor-look.ts +480 -0
  445. package/src/palette/mapping.ts +129 -15
  446. package/src/theme/SyntaxTheme.doc.mjs +1 -1
  447. package/src/theme/tokens.ts +2 -1
  448. package/src/theme/useThemeName.doc.mjs +1 -1
  449. package/src/utils/characters.ts +11 -0
  450. package/src/utils/devWarning.ts +35 -0
  451. package/src/utils/focusReturn.ts +3 -11
  452. package/src/utils/hitArea.ts +87 -18
  453. package/src/utils/mergeProps.ts +57 -34
  454. package/src/utils/scrollView.ts +3 -2
  455. package/src/utils/textDirection.ts +65 -5
  456. package/src/utils/touchHitArea.ts +3 -2
  457. package/src/virtualization/useInlineListWindow.ts +102 -11
@@ -5,7 +5,9 @@
5
5
  /**
6
6
  * @file useTruncation.ts
7
7
  * @input Uses React hooks, sharedResizeObserver, sharedMutationObserver
8
- * @output Exports useTruncation hook for detecting text overflow
8
+ * @output Exports useTruncation hook for detecting text overflow, and
9
+ * useTruncationMeasure, its internal form with Core's measure-on-interest
10
+ * mode
9
11
  * @position Hook; consumed by Text.tsx, Heading.tsx and Lightbox.tsx
10
12
  *
11
13
  * SYNC: When modified, update:
@@ -47,6 +49,28 @@ export interface UseTruncationReturn {
47
49
  fullText: string;
48
50
  }
49
51
 
52
+ /**
53
+ * Whether an element's text overflows its line clamp. Single-line text
54
+ * overflows horizontally. Multi-line text compares the content's real
55
+ * height: with -webkit-line-clamp, browsers may report the clamped size as
56
+ * scrollHeight, so Range.getBoundingClientRect() measures the content.
57
+ */
58
+ function measureTruncation(element: HTMLElement, maxLines: number): boolean {
59
+ if (maxLines === 1) {
60
+ return element.scrollWidth > element.offsetWidth;
61
+ }
62
+ let contentHeight = element.scrollHeight;
63
+ try {
64
+ const range = document.createRange();
65
+ range.selectNodeContents(element);
66
+ contentHeight = range.getBoundingClientRect().height;
67
+ range.detach();
68
+ } catch {
69
+ // Fallback to scrollHeight (e.g. jsdom in tests)
70
+ }
71
+ return contentHeight > element.offsetHeight;
72
+ }
73
+
50
74
  /**
51
75
  * Hook for detecting text overflow/truncation.
52
76
  *
@@ -75,7 +99,35 @@ export interface UseTruncationReturn {
75
99
  export function useTruncation(
76
100
  options: UseTruncationOptions,
77
101
  ): UseTruncationReturn {
78
- const {maxLines, isExpanded = false} = options;
102
+ const {ref, isTruncated, fullText} = useTruncationMeasure(options);
103
+ return {ref, isTruncated, fullText};
104
+ }
105
+
106
+ /** @internal */
107
+ export interface TruncationMeasureOptions extends UseTruncationOptions {
108
+ /**
109
+ * Measures at each hover, tap or focus (`measure`), not at mount, for
110
+ * text that mounts many times at once, such as a Table's default cells.
111
+ * After the first measurement, a content change measures again.
112
+ */
113
+ measuresOnInterest?: boolean;
114
+ }
115
+
116
+ /** @internal */
117
+ export interface TruncationMeasureReturn extends UseTruncationReturn {
118
+ /** With `measuresOnInterest`: measures now and returns the answer. */
119
+ measure: (() => boolean) | undefined;
120
+ }
121
+
122
+ /**
123
+ * useTruncation with Core's internal modes. Text calls this; the public hook
124
+ * calls it without them.
125
+ * @internal
126
+ */
127
+ export function useTruncationMeasure(
128
+ options: TruncationMeasureOptions,
129
+ ): TruncationMeasureReturn {
130
+ const {maxLines, isExpanded = false, measuresOnInterest = false} = options;
79
131
  const [isTruncated, setTruncatedState] = useState(false);
80
132
  const [fullText, setFullTextState] = useState('');
81
133
  // The values last set as state. A measurement that finds the same values
@@ -113,30 +165,8 @@ export function useTruncation(
113
165
  answerRef.current.fullText = element.textContent ?? '';
114
166
  setFullText(answerRef.current.fullText);
115
167
 
116
- // Check for overflow
117
- if (maxLines === 1) {
118
- // Single-line: check horizontal overflow
119
- answerRef.current.isTruncated =
120
- element.scrollWidth > element.offsetWidth;
121
- setIsTruncated(answerRef.current.isTruncated);
122
- } else {
123
- // Multi-line: use Range to measure actual content height.
124
- // When -webkit-line-clamp is active, browsers may report
125
- // scrollHeight === offsetHeight (the clamped size), so the
126
- // naive scrollHeight check fails. Range.getBoundingClientRect()
127
- // measures the real text content regardless of clamping.
128
- let contentHeight = element.scrollHeight;
129
- try {
130
- const range = document.createRange();
131
- range.selectNodeContents(element);
132
- contentHeight = range.getBoundingClientRect().height;
133
- range.detach();
134
- } catch {
135
- // Fallback to scrollHeight (e.g. jsdom in tests)
136
- }
137
- answerRef.current.isTruncated = contentHeight > element.offsetHeight;
138
- setIsTruncated(answerRef.current.isTruncated);
139
- }
168
+ answerRef.current.isTruncated = measureTruncation(element, maxLines);
169
+ setIsTruncated(answerRef.current.isTruncated);
140
170
  },
141
171
  [maxLines, setIsTruncated, setFullText],
142
172
  );
@@ -174,6 +204,12 @@ export function useTruncation(
174
204
  setFullText('');
175
205
  }
176
206
 
207
+ // Text that measures on interest waits for its first hover, tap or
208
+ // focus: it measures and observes nothing at mount.
209
+ if (element && maxLines > 0 && measuresOnInterest) {
210
+ return;
211
+ }
212
+
177
213
  if (element && maxLines > 0) {
178
214
  // Observe via the shared singleton, if available. The observer's
179
215
  // first notification measures a new element. The browser sends it
@@ -197,12 +233,34 @@ export function useTruncation(
197
233
  setFullText('');
198
234
  }
199
235
  },
200
- [maxLines, isExpanded, checkTruncation, setIsTruncated, setFullText],
236
+ [
237
+ maxLines,
238
+ isExpanded,
239
+ measuresOnInterest,
240
+ checkTruncation,
241
+ setIsTruncated,
242
+ setFullText,
243
+ ],
201
244
  );
202
245
 
246
+ // Measures the attached text at a hover, tap or focus. The first call also
247
+ // follows content changes from then on, so an open tooltip follows the text.
248
+ const measureNow = useCallback((): boolean => {
249
+ const element = elementRef.current;
250
+ if (element == null || maxLines === 0) {
251
+ return false;
252
+ }
253
+ checkTruncation(element);
254
+ unobserveContentRef.current ??= observeContent(element, () => {
255
+ checkTruncation(element);
256
+ });
257
+ return answerRef.current.isTruncated;
258
+ }, [maxLines, checkTruncation]);
259
+
203
260
  return {
204
261
  ref,
205
262
  isTruncated,
206
263
  fullText,
264
+ measure: measuresOnInterest ? measureNow : undefined,
207
265
  };
208
266
  }
@@ -31,7 +31,7 @@ const anatomy = [
31
31
  name: 'Start icon',
32
32
  required: false,
33
33
  description:
34
- 'Astryx Icon rendered at the start when startIcon is a semantic name or icon component.',
34
+ 'Astryx Icon rendered at the start when startIcon is a built-in meaning or icon component.',
35
35
  },
36
36
  {
37
37
  name: 'Custom start content',
@@ -216,7 +216,7 @@ export const docs = {
216
216
  name: 'startIcon',
217
217
  type: 'ReactNode | IconType',
218
218
  description:
219
- 'Icon rendered inside the leading edge of the textarea wrapper; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
219
+ 'Icon rendered inside the leading edge of the textarea wrapper; pass a built-in meaning such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
220
220
  },
221
221
  {
222
222
  name: 'hasSpellCheck',
@@ -535,7 +535,7 @@ export const docsZh = {
535
535
  {
536
536
  name: 'startIcon',
537
537
  type: 'ReactNode | IconType',
538
- description: '在文本域包装器前端内部渲染的图标;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
538
+ description: '在文本域包装器前端内部渲染的图标;可传内置含义(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
539
539
  },
540
540
  {
541
541
  name: 'hasSpellCheck',
@@ -802,7 +802,7 @@ export const docsDense = {
802
802
  statusVariant:
803
803
  '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.',
804
804
  labelTooltip: 'Tooltip in info icon at label end.',
805
- startIcon: 'Icon inside leading edge of textarea wrapper; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
805
+ startIcon: 'Icon inside leading edge of textarea wrapper; built-in meaning OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
806
806
  hasSpellCheck: 'Enables/disables browser spell checking.',
807
807
  hasAutoFocus: 'Auto-focus textarea on mount.',
808
808
  size: 'Textarea size; affects internal padding. Height controlled by rows.',
@@ -127,7 +127,7 @@ export const docs = {
127
127
  name: 'startIcon',
128
128
  type: 'ReactNode | IconType',
129
129
  description:
130
- 'Icon displayed at the start of the input; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
130
+ 'Icon displayed at the start of the input; pass a built-in meaning such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
131
131
  },
132
132
  {
133
133
  name: 'status',
@@ -377,7 +377,7 @@ export const docsZh = {
377
377
  name: 'startIcon',
378
378
  type: 'ReactNode | IconType',
379
379
  description:
380
- '显示在输入框起始位置的图标;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
380
+ '显示在输入框起始位置的图标;可传内置含义(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
381
381
  },
382
382
  {
383
383
  name: 'status',
@@ -562,7 +562,7 @@ export const docsDense = {
562
562
  isLoading: 'Loading state w/ spinner+aria-busy.',
563
563
  placeholder: 'Placeholder when input empty.',
564
564
  labelTooltip: 'Tooltip in info icon at label end.',
565
- startIcon: 'Icon at input start; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
565
+ startIcon: 'Icon at input start; built-in meaning OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
566
566
  status: 'Validation status; colored border+icon. Message floats below. Error sets aria-invalid.',
567
567
  statusVariant: '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.',
568
568
  hasClear: 'Shows clear button when input has value. Clears value on click.',
@@ -413,7 +413,7 @@ export function Thumbnail({
413
413
  });
414
414
  const accessibleName =
415
415
  label && alt
416
- ? `${label} — ${alt}`
416
+ ? t('@astryx.thumbnail.nameWithAlt', {label, alt})
417
417
  : (label ?? alt ?? t('@astryx.thumbnail.fallbackName'));
418
418
 
419
419
  // Without `alt`, the image is explicitly decorative rather than silently
@@ -32,15 +32,11 @@ import {
32
32
  type FocusEvent,
33
33
  } from 'react';
34
34
  import * as stylex from '@stylexjs/stylex';
35
+ import {inputRowSizeStyles} from '../Field/inputStyles.stylex';
35
36
  import {inputDisabledFocusStyles} from '../Field/inputDisabledFocus';
36
37
  import {useEntryErrorBehavior} from '../Field/useEntryErrorBehavior';
37
38
  import type {EntryErrorBehavior} from '../FormLayout/FormLayoutContext';
38
- import {
39
- colorVars,
40
- sizeVars,
41
- typographyVars,
42
- typeScaleVars,
43
- } from '../theme/tokens.stylex';
39
+ import {colorVars, typographyVars, typeScaleVars} from '../theme/tokens.stylex';
44
40
  import {
45
41
  Field,
46
42
  InputClearButton,
@@ -147,15 +143,12 @@ const styles = stylex.create({
147
143
 
148
144
  const sizeStyles = stylex.create({
149
145
  sm: {
150
- height: sizeVars['--size-element-sm'],
151
146
  minWidth: 120,
152
147
  },
153
148
  md: {
154
- height: sizeVars['--size-element-md'],
155
149
  minWidth: 120,
156
150
  },
157
151
  lg: {
158
- height: sizeVars['--size-element-lg'],
159
152
  minWidth: 120,
160
153
  },
161
154
  });
@@ -835,6 +828,7 @@ function TimeField({
835
828
  inputWrapperStyles.base,
836
829
  inputWrapperStyles.textField,
837
830
  sizeStyles[size],
831
+ inputRowSizeStyles[size],
838
832
  isDisabled && inputWrapperStyles.disabled,
839
833
  isDisabled && inputDisabledFocusStyles.withinRing,
840
834
  fieldStatus && inputStatusBorderStyles[fieldStatus.type],
@@ -27,6 +27,7 @@ import {
27
27
  type KeyboardEvent,
28
28
  } from 'react';
29
29
  import * as stylex from '@stylexjs/stylex';
30
+ import {inputRowSizeStyles} from '../Field/inputStyles.stylex';
30
31
  import {inputDisabledFocusStyles} from '../Field/inputDisabledFocus';
31
32
  import {BottomSheet} from '../BottomSheet';
32
33
  import {Button} from '../Button';
@@ -49,7 +50,7 @@ import {useResolvedRequired} from '../hooks/useResolvedRequired';
49
50
  import {Icon} from '../Icon';
50
51
  import {useLocale} from '../i18n';
51
52
  import {formatLocaleTime} from '../utils/timeFormat';
52
- import {sizeVars, spacingVars} from '../theme/tokens.stylex';
53
+ import {spacingVars} from '../theme/tokens.stylex';
53
54
  import {useSize} from '../SizeContext/SizeContext';
54
55
  import {Spinner} from '../Spinner';
55
56
  import {useTooltip} from '../Tooltip';
@@ -88,9 +89,9 @@ import english from '../i18n/generated-english/TimeInput/TouchTimeField.generate
88
89
  registerEnglishFallback(english);
89
90
 
90
91
  const sizeStyles = stylex.create({
91
- sm: {height: sizeVars['--size-element-sm'], minWidth: 120},
92
- md: {height: sizeVars['--size-element-md'], minWidth: 120},
93
- lg: {height: sizeVars['--size-element-lg'], minWidth: 120},
92
+ sm: {minWidth: 120},
93
+ md: {minWidth: 120},
94
+ lg: {minWidth: 120},
94
95
  });
95
96
 
96
97
  const styles = stylex.create({
@@ -384,6 +385,7 @@ export function TouchTimeField({
384
385
  inputWrapperStyles.base,
385
386
  inputWrapperStyles.textField,
386
387
  sizeStyles[size],
388
+ inputRowSizeStyles[size],
387
389
  isDisabled && inputWrapperStyles.disabled,
388
390
  isDisabled && inputDisabledFocusStyles.withinRing,
389
391
  status && inputStatusBorderStyles[status.type],
@@ -414,21 +414,18 @@ export function Timestamp({
414
414
  )
415
415
  : '';
416
416
 
417
- // Full absolute text for the tooltip (visible — keeps the compact timezone
418
- // abbreviation) and for the AT-facing aria-label, which spells the timezone
419
- // out in full: abbreviations like "PST" or "GMT+2" are unexpanded
420
- // abbreviations to a screen-reader user (WCAG 3.1.4). Both stay in the
421
- // viewer's zone: the default hover-card row and the relative accessible name.
422
- const fullAbsoluteText = isValidDate
423
- ? formatInstant(date, 'full', locale, {timeZone: undefined, calendar})
424
- : '';
425
- const fullAbsoluteSpokenText = isValidDate
426
- ? formatInstant(date, 'full', locale, {
427
- timeZone: undefined,
428
- timeZoneNameStyle: 'long',
429
- calendar,
430
- })
431
- : '';
417
+ // The AT-facing aria-label of a relative timestamp spells the timezone out
418
+ // in full. Abbreviations like "PST" or "GMT+2" are unexpanded abbreviations
419
+ // to a screen-reader user (WCAG 3.1.4). It stays in the viewer's zone. Only
420
+ // a relative timestamp carries the name, so no other format builds it.
421
+ const fullAbsoluteSpokenText =
422
+ isValidDate && isRelativeFormat(effectiveFormat)
423
+ ? formatInstant(date, 'full', locale, {
424
+ timeZone: undefined,
425
+ timeZoneNameStyle: 'long',
426
+ calendar,
427
+ })
428
+ : '';
432
429
  // A relative name starts with the words the timestamp shows, then the full
433
430
  // date. A control named from its content then keeps its visible words in its
434
431
  // name, so voice control can find it (WCAG 2.5.3).
@@ -519,16 +516,27 @@ export function Timestamp({
519
516
  return null;
520
517
  }
521
518
 
519
+ // An unknown zone in an entry warns as the timestamp renders, before its
520
+ // card shows.
521
+ for (const entry of entries ?? []) {
522
+ resolveTimezoneID(entry.timezoneID);
523
+ }
524
+
522
525
  // The rows the hover card renders: the configured entries, or the single
523
526
  // default absolute line shown when none are set. Either way the surface is
524
- // the same copyable card — the default line is a one-row card carrying the
525
- // full absolute time, itself copyable, just like a configured entry.
526
- const lines: ReadonlyArray<TimestampTooltipLine> =
527
+ // the same copyable card. The default line is a one-row card with the full
528
+ // absolute time in the viewer's zone and its compact abbreviation. It is
529
+ // copyable, just like a configured entry. The card reads them only while it
530
+ // shows, so a closed card formats nothing.
531
+ const getLines = (): ReadonlyArray<TimestampTooltipLine> =>
527
532
  entries === undefined
528
533
  ? [
529
534
  {
530
- value: fullAbsoluteText,
531
- zoneName: isValidDate ? formatZoneName(date, locale) : '',
535
+ value: formatInstant(date, 'full', locale, {
536
+ timeZone: undefined,
537
+ calendar,
538
+ }),
539
+ zoneName: formatZoneName(date, locale),
532
540
  isCopyable: true,
533
541
  },
534
542
  ]
@@ -588,7 +596,7 @@ export function Timestamp({
588
596
  {showTooltip && (
589
597
  <Suspense fallback={null}>
590
598
  <LazyTimestampHoverCard
591
- lines={lines}
599
+ getLines={getLines}
592
600
  label={t('@astryx.timestamp.detailsLabel')}
593
601
  triggerRef={timeRef}
594
602
  onCardOpenChange={setOpenCardId}
@@ -234,8 +234,11 @@ function EntryRow({
234
234
  }
235
235
 
236
236
  export interface TimestampHoverCardProps {
237
- /** The rows to render, each a labelled instant, optionally copyable. */
238
- lines: ReadonlyArray<TimestampTooltipLine>;
237
+ /**
238
+ * The rows to render, each a labelled instant, optionally copyable. The card
239
+ * reads them only while it shows, so a closed card formats nothing.
240
+ */
241
+ getLines: () => ReadonlyArray<TimestampTooltipLine>;
239
242
  /** Accessible name for the card. */
240
243
  label: string;
241
244
  /** Persistent anchor, rendered outside the lazy boundary. */
@@ -263,6 +266,43 @@ function gridTemplateFor(
263
266
  return gridTemplates.value;
264
267
  }
265
268
 
269
+ /**
270
+ * The card's rows, as a semantic `<dl>` grid. The layer renders it only while
271
+ * the card shows, so the rows are formatted then.
272
+ */
273
+ function CardLines({
274
+ getLines,
275
+ }: {
276
+ getLines: () => ReadonlyArray<TimestampTooltipLine>;
277
+ }): ReactNode {
278
+ const lines = getLines();
279
+ // A label column is only reserved when some row is labelled; otherwise the
280
+ // value sits flush at the card's leading edge. An action column is only
281
+ // reserved when some row is copyable (option B), so a fully read-only card
282
+ // has no trailing gutter.
283
+ const hasLabelColumn = lines.some(
284
+ line => line.label != null && line.label !== '',
285
+ );
286
+ const hasActionColumn = lines.some(line => line.isCopyable);
287
+ return (
288
+ <dl
289
+ {...stylex.props(
290
+ styles.dl,
291
+ gridTemplateFor(hasLabelColumn, hasActionColumn),
292
+ )}>
293
+ {lines.map((line, index) => (
294
+ <EntryRow
295
+ // eslint-disable-next-line @eslint-react/no-array-index-key -- rows are fixed positional slots and two entries may legitimately be identical
296
+ key={index}
297
+ line={line}
298
+ hasLabelColumn={hasLabelColumn}
299
+ hasActionColumn={hasActionColumn}
300
+ />
301
+ ))}
302
+ </dl>
303
+ );
304
+ }
305
+
266
306
  /**
267
307
  * The copyable hover card for Timestamp. Renders a semantic `<dl>` as a grid:
268
308
  * an optional label column, the value, and — when any row is copyable — a
@@ -273,7 +313,7 @@ function gridTemplateFor(
273
313
  * interactive.
274
314
  */
275
315
  export default function TimestampHoverCard({
276
- lines,
316
+ getLines,
277
317
  label,
278
318
  triggerRef,
279
319
  onCardOpenChange,
@@ -320,34 +360,7 @@ export default function TimestampHoverCard({
320
360
  };
321
361
  }, [triggerRef, positionRef, interactionRef, show, id]);
322
362
 
323
- // A label column is only reserved when some row is labelled; otherwise the
324
- // value sits flush at the card's leading edge. An action column is only
325
- // reserved when some row is copyable (option B), so a fully read-only card
326
- // has no trailing gutter.
327
- const hasLabelColumn = lines.some(
328
- line => line.label != null && line.label !== '',
329
- );
330
- const hasActionColumn = lines.some(line => line.isCopyable);
331
-
332
- const cardContent = (
333
- <dl
334
- {...stylex.props(
335
- styles.dl,
336
- gridTemplateFor(hasLabelColumn, hasActionColumn),
337
- )}>
338
- {lines.map((line, index) => (
339
- <EntryRow
340
- // eslint-disable-next-line @eslint-react/no-array-index-key -- rows are fixed positional slots and two entries may legitimately be identical
341
- key={index}
342
- line={line}
343
- hasLabelColumn={hasLabelColumn}
344
- hasActionColumn={hasActionColumn}
345
- />
346
- ))}
347
- </dl>
348
- );
349
-
350
- return renderHoverCard(cardContent);
363
+ return renderHoverCard(<CardLines getLines={getLines} />);
351
364
  }
352
365
 
353
366
  TimestampHoverCard.displayName = 'TimestampHoverCard';
@@ -29,7 +29,11 @@
29
29
  * - /packages/core/src/Timestamp/Timestamp.test.tsx
30
30
  */
31
31
 
32
- import {SHARED_DATE_FORMAT_OPTIONS, getWallClock} from '../utils/plainDate';
32
+ import {
33
+ SHARED_DATE_FORMAT_OPTIONS,
34
+ dateTimeFormatAtCall,
35
+ getWallClock,
36
+ } from '../utils/plainDate';
33
37
  import {
34
38
  formatCalendarInstant,
35
39
  type CalendarSystem,
@@ -147,7 +151,7 @@ export function formatZoneName(
147
151
  timeZone?: string,
148
152
  ): string {
149
153
  return (
150
- new Intl.DateTimeFormat(locale, {
154
+ dateTimeFormatAtCall(locale, {
151
155
  timeZoneName: 'long',
152
156
  ...(timeZone === undefined ? {} : {timeZone}),
153
157
  })
@@ -223,7 +227,7 @@ export function formatInstant(
223
227
  );
224
228
 
225
229
  case 'time':
226
- return new Intl.DateTimeFormat(locale, {
230
+ return dateTimeFormatAtCall(locale, {
227
231
  ...TIME_OPTIONS,
228
232
  ...zoneName,
229
233
  ...zone,
@@ -22,6 +22,7 @@
22
22
  */
23
23
 
24
24
  import {devWarn} from '../utils/devWarning';
25
+ import {dateTimeFormatFor} from '../utils/plainDate';
25
26
  import {formatInstant, formatZoneName} from './formatInstant';
26
27
  import type {InstantFormat} from './formatInstant';
27
28
  import type {Locale} from '../i18n/types';
@@ -139,8 +140,9 @@ export function resolveTimezoneID(
139
140
  // `value` is handled in Timestamp.tsx.
140
141
  try {
141
142
  // Locale does not affect time-zone identifier validity; pin one so this
142
- // validation path stays explicit and deterministic.
143
- new Intl.DateTimeFormat('en-US', {timeZone: timezoneID});
143
+ // validation path stays explicit and deterministic. A valid zone's
144
+ // formatter is kept, so a later render checks it without building one.
145
+ dateTimeFormatFor('en-US', {timeZone: timezoneID});
144
146
  } catch {
145
147
  const report = `${context}: ${timezoneID}`;
146
148
  if (!warnedTimezoneIDs.has(report)) {