@astryxdesign/core 0.7.5 → 0.7.6-canary.0ef60dd
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.
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +5 -5
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +12 -3
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +7 -1
- package/dist/BottomSheet/BottomSheet.js +1 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +2 -1
- package/dist/BottomSheet/useSheetGestures.d.ts +12 -0
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +30 -3
- package/dist/Button/Button.js +4 -4
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +6 -5
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +37 -4
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +12 -4
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +101 -15
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +8 -3
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts +5 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +23 -12
- package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -1
- package/dist/DateTimeInput/NativeTimeSegment.js +5 -4
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +4 -3
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +34 -9
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +5 -4
- package/dist/Divider/Divider.d.ts.map +1 -1
- package/dist/Divider/Divider.js +2 -1
- package/dist/Drawer/Drawer.d.ts +1 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +7 -2
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +7 -3
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -1
- package/dist/DropdownMenu/MenuBottomSheetActionList.js +6 -5
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +20 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -3
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
- package/dist/DropdownMenu/renderDropdownItems.js +21 -16
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -1
- package/dist/Field/FieldLabel.d.ts +1 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +4 -4
- package/dist/Field/InputClearButton.js +3 -3
- package/dist/Field/PanelSearchInput.js +2 -2
- package/dist/FieldStatus/FieldStatus.js +2 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +7 -1
- package/dist/Heading/Heading.js +1 -1
- package/dist/Icon/Icon.js +1 -1
- package/dist/Indicator/CheckIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckIndicator.js +2 -1
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +3 -1
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +3 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +2 -1
- package/dist/Item/ItemSwipeLayer.js +1 -1
- package/dist/Layer/popoverOperations.d.ts +27 -0
- package/dist/Layer/popoverOperations.d.ts.map +1 -0
- package/dist/Layer/popoverOperations.js +159 -0
- package/dist/Layer/useLayer.d.ts +1 -1
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +93 -59
- package/dist/Layout/Layout.js +1 -1
- package/dist/Layout/LayoutContent.js +1 -1
- package/dist/Layout/LayoutFooter.js +1 -1
- package/dist/Layout/LayoutHeader.js +1 -1
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +5 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.js +5 -4
- package/dist/List/List.js +1 -1
- package/dist/List/ListItem.js +3 -3
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +7 -2
- package/dist/MultiSelector/CreateRow.a11y.chromium.spec.js +7 -6
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +26 -10
- package/dist/NumberInput/NumberInput.d.ts +3 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +3 -3
- package/dist/NumberInput/numberParser.d.ts +3 -0
- package/dist/NumberInput/numberParser.d.ts.map +1 -1
- package/dist/NumberInput/numberParser.js +7 -44
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +16 -12
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +28 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +4 -1
- package/dist/Selector/useSelectorPresentation.d.ts +8 -1
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +20 -4
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +10 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/Stack/Stack.js +1 -1
- package/dist/Stack/StackItem.js +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +16 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +9 -1
- package/dist/Text/Text.js +1 -1
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -5
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +13 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +3 -3
- package/dist/TimeInput/TimeInput.d.ts +6 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +21 -14
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +5 -4
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +2 -2
- package/dist/Timestamp/TimestampHoverCard.js +4 -4
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +60 -20
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +82 -51
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +13 -2
- package/dist/Tokenizer/TokenizerBottomSheet.js +3 -3
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +2 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +3 -0
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +1 -0
- package/dist/Typeahead/Typeahead.d.ts +1 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +9 -1
- package/dist/astryx.css +20 -4
- package/dist/gestures/GestureArena.d.ts +6 -0
- package/dist/gestures/GestureArena.d.ts.map +1 -1
- package/dist/gestures/GestureArena.js +39 -0
- package/dist/gestures/GestureHost.d.ts +352 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -0
- package/dist/gestures/GestureHost.js +1773 -0
- package/dist/gestures/GestureRecognizer.d.ts +10 -0
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/GestureRecognizer.js +16 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts +1 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/LongPressGestureRecognizer.js +3 -0
- package/dist/gestures/PanGestureRecognizer.d.ts +1 -0
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/PanGestureRecognizer.js +3 -0
- package/dist/gestures/PinchGestureRecognizer.d.ts +31 -0
- package/dist/gestures/PinchGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/PinchGestureRecognizer.js +128 -0
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts +71 -0
- package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/ScreenEdgePanGestureRecognizer.js +223 -0
- package/dist/gestures/SwipeGestureRecognizer.d.ts +37 -0
- package/dist/gestures/SwipeGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/SwipeGestureRecognizer.js +148 -0
- package/dist/gestures/TapGestureRecognizer.d.ts +1 -0
- package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/TapGestureRecognizer.js +3 -0
- package/dist/gestures/VelocityTracker.d.ts +6 -2
- package/dist/gestures/VelocityTracker.d.ts.map +1 -1
- package/dist/gestures/VelocityTracker.js +7 -3
- package/dist/gestures/haptics.d.ts +65 -0
- package/dist/gestures/haptics.d.ts.map +1 -0
- package/dist/gestures/haptics.js +182 -0
- package/dist/gestures/nativeScroll.d.ts +42 -0
- package/dist/gestures/nativeScroll.d.ts.map +1 -0
- package/dist/gestures/nativeScroll.js +228 -0
- package/dist/gestures/touchAction.d.ts +60 -0
- package/dist/gestures/touchAction.d.ts.map +1 -0
- package/dist/gestures/touchAction.js +157 -0
- package/dist/gestures/touchActionRule.d.ts +34 -0
- package/dist/gestures/touchActionRule.d.ts.map +1 -0
- package/dist/gestures/touchActionRule.js +140 -0
- package/dist/gestures/types.d.ts +18 -7
- package/dist/gestures/types.d.ts.map +1 -1
- package/dist/gestures/types.js +22 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/modalAnnounce.d.ts.map +1 -1
- package/dist/hooks/modalAnnounce.js +107 -61
- package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -1
- package/dist/hooks/useAdaptivePresentation.js +4 -1
- package/dist/hooks/useAnnounce.d.ts +101 -42
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +161 -75
- package/dist/hooks/useAnnounceRenderedText.d.ts +11 -3
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +5 -3
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +6 -12
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +12 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +5 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +5 -0
- package/dist/motion/animator.d.ts +7 -1
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +119 -27
- package/dist/theme/defineTheme.d.ts +19 -5
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +64 -4
- package/dist/theme/domainTokens/domainTokenDefaults.d.ts +3 -0
- package/dist/theme/domainTokens/domainTokenDefaults.d.ts.map +1 -0
- package/dist/theme/domainTokens/domainTokenDefaults.js +19 -0
- package/dist/theme/domainTokens/index.d.ts +5 -4
- package/dist/theme/domainTokens/index.d.ts.map +1 -1
- package/dist/theme/domainTokens/index.js +5 -9
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/motionKnobs.d.ts +56 -0
- package/dist/theme/motionKnobs.d.ts.map +1 -0
- package/dist/theme/motionKnobs.js +48 -0
- package/dist/theme/resolveThemeValues.d.ts +11 -4
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +40 -4
- package/dist/theme/themeAdaptations.d.ts +7 -3
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +36 -7
- package/dist/theme/themeMotion.d.ts +96 -0
- package/dist/theme/themeMotion.d.ts.map +1 -0
- package/dist/theme/themeMotion.js +177 -0
- package/dist/theme/tokenReferences.d.ts +31 -0
- package/dist/theme/tokenReferences.d.ts.map +1 -0
- package/dist/theme/tokenReferences.js +132 -0
- package/dist/theme/tokens.d.ts +1 -0
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +9 -129
- package/dist/theme/tokens.stylex.d.ts +12 -0
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +12 -0
- package/dist/utils/focusReturn.d.ts +17 -1
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +11 -4
- package/dist/utils/getNodeText.d.ts +8 -0
- package/dist/utils/getNodeText.d.ts.map +1 -0
- package/dist/utils/getNodeText.js +37 -0
- package/dist/utils/interactionModality.d.ts +11 -2
- package/dist/utils/interactionModality.d.ts.map +1 -1
- package/dist/utils/interactionModality.js +58 -5
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +17 -8
- package/dist/utils/plainDate.d.ts +2 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +46 -3
- package/dist/utils/presentation.d.ts +50 -0
- package/dist/utils/presentation.d.ts.map +1 -0
- package/dist/utils/presentation.js +125 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +20 -1
- package/dist/utils/primaryClick.d.ts +11 -0
- package/dist/utils/primaryClick.d.ts.map +1 -0
- package/dist/utils/primaryClick.js +25 -0
- package/dist/utils/timeFormat.d.ts +47 -0
- package/dist/utils/timeFormat.d.ts.map +1 -0
- package/dist/utils/timeFormat.js +240 -0
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +5 -3
- package/dist/utils/touchPresentation.stylex.d.ts +15 -0
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -0
- package/dist/utils/touchPresentation.stylex.js +33 -0
- package/dist/utils/unicodeDigits.d.ts +20 -0
- package/dist/utils/unicodeDigits.d.ts.map +1 -0
- package/dist/utils/unicodeDigits.js +70 -0
- package/locales/en.json +23 -3
- package/locales/pseudo.json +15 -0
- package/package.json +5 -4
- package/src/AlertDialog/AlertDialog.tsx +6 -5
- package/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts +18 -6
- package/src/Avatar/Avatar.spec.md +22 -22
- package/src/Avatar/Avatar.tsx +18 -1
- package/src/Avatar/__tests__/AvatarForcedColors.a11y.chromium.spec.ts +126 -0
- package/src/Badge/Badge.doc.mjs +1 -1
- package/src/Badge/Badge.tsx +19 -2
- package/src/Badge/__tests__/BadgeLargerText.a11y.chromium.spec.ts +260 -0
- package/src/BottomSheet/BottomSheet.test.tsx +46 -0
- package/src/BottomSheet/BottomSheet.tsx +1 -1
- package/src/BottomSheet/BottomSheetPanel.tsx +2 -1
- package/src/BottomSheet/useSheetGestures.test.ts +52 -0
- package/src/BottomSheet/useSheetGestures.ts +37 -6
- package/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts +18 -6
- package/src/Button/Button.tsx +4 -4
- package/src/Calendar/Calendar.spec.md +87 -48
- package/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts +21 -7
- package/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts +21 -7
- package/src/CheckboxInput/CheckboxInput.tsx +6 -5
- package/src/ClickableCard/ClickableCard.test.tsx +96 -0
- package/src/ClickableCard/ClickableCard.tsx +48 -4
- package/src/Collapsible/Collapsible.spec.md +2 -0
- package/src/Collapsible/CollapsibleGroup.spec.md +57 -29
- package/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts +18 -7
- package/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts +18 -6
- package/src/ComplexSelector/ComplexSelector.test.tsx +37 -0
- package/src/ContextMenu/ContextMenu.test.tsx +35 -0
- package/src/DateInput/DateInput.test.tsx +115 -3
- package/src/DateInput/DateInput.tsx +29 -14
- package/src/DateInput/DateInputTouch.test.tsx +76 -0
- package/src/DateInput/MonthScroller.tsx +106 -20
- package/src/DateInput/MonthScrollerSettle.test.tsx +165 -0
- package/src/DateInput/TouchDateField.tsx +14 -3
- package/src/DateInput/__tests__/MonthScrollerSteps.interaction.browser.spec.ts +312 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +46 -3
- package/src/DateRangeInput/DateRangeInput.tsx +16 -12
- package/src/DateTimeInput/DateTimeInput.doc.mjs +10 -8
- package/src/DateTimeInput/DateTimeInput.spec.md +75 -51
- package/src/DateTimeInput/DateTimeInput.test.tsx +81 -0
- package/src/DateTimeInput/DateTimeInput.tsx +46 -24
- package/src/DateTimeInput/NativeTimeSegment.tsx +4 -6
- package/src/DateTimeInput/TouchDateTimeField.tsx +3 -7
- package/src/Dialog/Dialog.test.tsx +216 -2
- package/src/Dialog/Dialog.tsx +42 -9
- package/src/Dialog/DialogHeader.tsx +5 -4
- package/src/Dialog/__tests__/DialogSecondDocument.a11y.browser.spec.ts +202 -0
- package/src/Divider/Divider.tsx +2 -1
- package/src/Drawer/Drawer.spec.md +111 -80
- package/src/Drawer/Drawer.test.tsx +35 -0
- package/src/Drawer/Drawer.tsx +13 -2
- package/src/Drawer/DrawerHeader.spec.md +181 -0
- package/src/Drawer/__tests__/DrawerNonModalPageScroll.a11y.chromium.spec.ts +267 -0
- package/src/DropdownMenu/DropdownMenu.test.tsx +41 -0
- package/src/DropdownMenu/DropdownMenu.tsx +10 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +34 -0
- package/src/DropdownMenu/MenuBottomSheetActionList.tsx +6 -5
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +19 -7
- package/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts +21 -9
- package/src/DropdownMenu/lazyMenuBottomSheet.test.ts +60 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +36 -7
- package/src/DropdownMenu/renderDropdownItems.tsx +24 -19
- package/src/EmptyState/EmptyState.tsx +2 -1
- package/src/Field/FieldLabel.tsx +5 -4
- package/src/Field/InputClearButton.tsx +3 -3
- package/src/Field/PanelSearchInput.tsx +2 -2
- package/src/FieldStatus/FieldStatus.tsx +2 -2
- package/src/FileInput/FileInput.test.tsx +21 -0
- package/src/FileInput/FileInput.tsx +4 -1
- package/src/FormLayout/FormLayout.spec.md +7 -8
- package/src/Heading/Heading.tsx +1 -1
- package/src/Icon/Icon.tsx +1 -1
- package/src/Indicator/CheckIndicator.spec.md +47 -42
- package/src/Indicator/CheckIndicator.tsx +2 -1
- package/src/Indicator/CheckboxIndicator.spec.md +40 -37
- package/src/Indicator/CheckboxIndicator.tsx +3 -1
- package/src/Indicator/Indicator.spec.md +188 -0
- package/src/Indicator/RadioIndicator.tsx +3 -1
- package/src/Item/Item.tsx +2 -1
- package/src/Item/ItemSwipeLayer.tsx +1 -1
- package/src/Kbd/Kbd.spec.md +81 -38
- package/src/Layer/__tests__/LayerBrowserHide.a11y.chromium.spec.ts +126 -0
- package/src/Layer/popoverOperations.test.ts +205 -0
- package/src/Layer/popoverOperations.ts +172 -0
- package/src/Layer/useLayer.test.tsx +348 -1
- package/src/Layer/useLayer.tsx +118 -71
- package/src/Layout/Layout.spec.md +127 -131
- package/src/Layout/Layout.tsx +1 -1
- package/src/Layout/LayoutContent.spec.md +205 -0
- package/src/Layout/LayoutContent.tsx +1 -1
- package/src/Layout/LayoutFooter.spec.md +190 -0
- package/src/Layout/LayoutFooter.tsx +1 -1
- package/src/Layout/LayoutHeader.spec.md +193 -0
- package/src/Layout/LayoutHeader.tsx +1 -1
- package/src/Layout/LayoutPanel.spec.md +194 -0
- package/src/Layout/__tests__/Layout.a11y.chromium.spec.ts +18 -6
- package/src/Lightbox/Lightbox.test.tsx +18 -0
- package/src/Lightbox/Lightbox.tsx +5 -0
- package/src/Lightbox/LightboxViewport.a11y.browser.spec.ts +8 -4
- package/src/Link/__tests__/Link.a11y.chromium.spec.ts +18 -8
- package/src/List/List.tsx +1 -1
- package/src/List/ListItem.spec.md +205 -0
- package/src/List/ListItem.tsx +3 -3
- package/src/MetadataList/MetadataList.spec.md +187 -0
- package/src/MetadataList/MetadataListItem.spec.md +165 -0
- package/src/MobileNav/MobileNav.test.tsx +15 -0
- package/src/MobileNav/MobileNav.tsx +9 -1
- package/src/MobileNav/__tests__/MobileNavHeader.a11y.chromium.spec.ts +89 -0
- package/src/MoreMenu/MoreMenu.test.tsx +11 -0
- package/src/MultiSelector/CreateRow.a11y.chromium.spec.ts +7 -8
- package/src/MultiSelector/MultiSelector.spec.md +7 -4
- package/src/MultiSelector/MultiSelector.test.tsx +270 -1
- package/src/MultiSelector/MultiSelector.tsx +25 -10
- package/src/MultiSelector/__tests__/MultiSelector.listbox.a11y.test.tsx +8 -1
- package/src/NavMenu/NavHeadingMenu.spec.md +1 -5
- package/src/NumberInput/NumberInput.doc.mjs +13 -7
- package/src/NumberInput/NumberInput.spec.md +59 -37
- package/src/NumberInput/NumberInput.tsx +13 -3
- package/src/NumberInput/__tests__/NumberInput.coarse-pointer.a11y.chromium.spec.ts +102 -0
- package/src/NumberInput/numberParser.ts +7 -45
- package/src/ProgressBar/ProgressBar.test.tsx +108 -32
- package/src/ProgressBar/ProgressBar.tsx +58 -10
- package/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts +21 -9
- package/src/ProgressBar/__tests__/ProgressBarMotion.a11y.chromium.spec.ts +831 -0
- package/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts +21 -14
- package/src/Resizable/useResizable.test.ts +43 -0
- package/src/Resizable/useResizable.ts +32 -9
- package/src/SegmentedControl/SegmentedControl.test.tsx +84 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +11 -5
- package/src/Selector/Selector.test.tsx +90 -1
- package/src/Selector/__tests__/Selector.combobox.a11y.test.tsx +8 -1
- package/src/Selector/__tests__/Selector.listbox.a11y.test.tsx +8 -1
- package/src/Selector/useSelectorPresentation.ts +31 -3
- package/src/SideNav/SideNav.test.tsx +27 -0
- package/src/SideNav/__tests__/SideNavRailMotion.interaction.browser.spec.ts +176 -51
- package/src/Skeleton/Skeleton.tsx +3 -1
- package/src/Slider/Slider.test.tsx +31 -0
- package/src/Slider/Slider.tsx +8 -3
- package/src/Slider/__tests__/Slider.a11y.chromium.spec.ts +19 -7
- package/src/Spinner/Spinner.tsx +5 -3
- package/src/Stack/Stack.tsx +1 -1
- package/src/Stack/StackItem.tsx +1 -1
- package/src/TabList/TabList.test.tsx +58 -4
- package/src/TabList/TabList.tsx +16 -1
- package/src/TabList/__tests__/TabPressPointer.interaction.browser.spec.ts +163 -0
- package/src/Table/__tests__/Table.a11y.chromium.spec.ts +18 -6
- package/src/Table/plugins/columnResize/useTableColumnResize.test.tsx +22 -0
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +8 -4
- package/src/Text/Text.tsx +1 -1
- package/src/Text/useTruncation.test.tsx +128 -1
- package/src/Text/useTruncation.ts +23 -5
- package/src/TextArea/TextArea.spec.md +10 -13
- package/src/TextArea/TextArea.test.tsx +60 -0
- package/src/TextArea/TextArea.tsx +15 -1
- package/src/TextInput/TextInput.test.tsx +21 -0
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/TimeInput/NativeTimeInput.test.tsx +17 -0
- package/src/TimeInput/Presentation.test.tsx +21 -0
- package/src/TimeInput/TimeInput.doc.mjs +8 -8
- package/src/TimeInput/TimeInput.spec.md +45 -48
- package/src/TimeInput/TimeInput.test.tsx +76 -0
- package/src/TimeInput/TimeInput.tsx +36 -18
- package/src/TimeInput/TouchTimeField.tsx +4 -6
- package/src/Timestamp/Timestamp.spec.md +6 -12
- package/src/Timestamp/Timestamp.test.tsx +30 -5
- package/src/Timestamp/Timestamp.tsx +6 -2
- package/src/Timestamp/TimestampHoverCard.tsx +4 -4
- package/src/Toast/Toast.spec.md +14 -20
- package/src/Toast/Toast.tsx +104 -36
- package/src/Toast/ToastViewport.test.tsx +719 -1
- package/src/Toast/ToastViewport.tsx +100 -50
- package/src/Tokenizer/Tokenizer.spec.md +5 -3
- package/src/Tokenizer/Tokenizer.test.tsx +68 -0
- package/src/Tokenizer/Tokenizer.tsx +14 -2
- package/src/Tokenizer/TokenizerBottomSheet.test.tsx +15 -4
- package/src/Tokenizer/TokenizerBottomSheet.tsx +3 -3
- package/src/Toolbar/Toolbar.spec.md +5 -6
- package/src/Toolbar/Toolbar.test.tsx +30 -0
- package/src/Toolbar/Toolbar.tsx +2 -1
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +18 -6
- package/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts +18 -7
- package/src/TopNav/TopNav.test.tsx +27 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +21 -0
- package/src/TopNav/TopNavMegaMenu.tsx +4 -1
- package/src/TopNav/TopNavMenu.test.tsx +17 -0
- package/src/TopNav/TopNavMenu.tsx +1 -0
- package/src/Typeahead/Typeahead.test.tsx +40 -0
- package/src/Typeahead/Typeahead.tsx +12 -1
- package/src/__tests__/pressState.ts +8 -4
- package/src/gestures/GestureArena.ts +35 -0
- package/src/gestures/GestureHost.ts +2065 -0
- package/src/gestures/GestureRecognizer.ts +18 -0
- package/src/gestures/LongPressGestureRecognizer.ts +4 -0
- package/src/gestures/PanGestureRecognizer.ts +4 -0
- package/src/gestures/PinchGestureRecognizer.ts +148 -0
- package/src/gestures/ScreenEdgePanGestureRecognizer.ts +256 -0
- package/src/gestures/SwipeGestureRecognizer.ts +197 -0
- package/src/gestures/TapGestureRecognizer.ts +4 -0
- package/src/gestures/VelocityTracker.ts +10 -3
- package/src/gestures/__tests__/GestureHost.test.ts +2087 -0
- package/src/gestures/__tests__/PanGestureRecognizer.test.ts +4 -4
- package/src/gestures/__tests__/PinchGestureRecognizer.test.ts +74 -0
- package/src/gestures/__tests__/ScreenEdgePanGestureRecognizer.test.ts +498 -0
- package/src/gestures/__tests__/SwipeGestureRecognizer.test.ts +108 -0
- package/src/gestures/__tests__/arena.test.ts +5 -0
- package/src/gestures/__tests__/arenaPinchSwipeEdge.test.ts +193 -0
- package/src/gestures/__tests__/browser/build-fixture.mjs +46 -0
- package/src/gestures/__tests__/browser/fixture.ts +307 -0
- package/src/gestures/__tests__/browser/gestures.interaction.browser.spec.ts +1137 -0
- package/src/gestures/__tests__/browserNegotiation.test.ts +293 -0
- package/src/gestures/__tests__/haptics.test.ts +187 -0
- package/src/gestures/__tests__/harness.ts +21 -2
- package/src/gestures/__tests__/recognizerKind.test.ts +78 -0
- package/src/gestures/__tests__/touchActionRule.test.ts +54 -0
- package/src/gestures/haptics.ts +203 -0
- package/src/gestures/nativeScroll.ts +277 -0
- package/src/gestures/touchAction.ts +191 -0
- package/src/gestures/touchActionRule.ts +157 -0
- package/src/gestures/types.ts +30 -9
- package/src/hooks/index.ts +5 -1
- package/src/hooks/modalAnnounce.ts +129 -72
- package/src/hooks/useAdaptivePresentation.ts +4 -1
- package/src/hooks/useAnnounce.doc.mjs +35 -3
- package/src/hooks/useAnnounce.replace.test.tsx +516 -0
- package/src/hooks/useAnnounce.ts +209 -102
- package/src/hooks/useAnnounceRenderedText.adopters.test.tsx +10 -1
- package/src/hooks/useAnnounceRenderedText.ts +17 -3
- package/src/hooks/useBusyAnnouncement.ts +7 -10
- package/src/hooks/useMenuHover.ts +15 -1
- package/src/i18n/generated-locales/en.generated.ts +6 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +6 -0
- package/src/motion/README.md +11 -1
- package/src/motion/animator.test.ts +151 -3
- package/src/motion/animator.ts +149 -33
- package/src/theme/Theme.doc.mjs +1 -1
- package/src/theme/defineTheme.ts +117 -8
- package/src/theme/derivedVarRegistry.test.ts +4 -0
- package/src/theme/domainTokens/domainTokenDefaults.ts +19 -0
- package/src/theme/domainTokens/index.ts +6 -10
- package/src/theme/expandMotionScale.test.ts +1 -1
- package/src/theme/index.ts +5 -0
- package/src/theme/motionKnobs.ts +82 -0
- package/src/theme/resolveThemeValues.ts +68 -6
- package/src/theme/themeAdaptations.ts +52 -12
- package/src/theme/themeMotion.test.ts +620 -0
- package/src/theme/themeMotion.ts +221 -0
- package/src/theme/tokenReferences.ts +149 -0
- package/src/theme/tokens.stylex.ts +10 -0
- package/src/theme/tokens.ts +15 -158
- package/src/utils/focusReturn.ts +17 -6
- package/src/utils/getNodeText.test.ts +24 -0
- package/src/utils/getNodeText.ts +37 -0
- package/src/utils/interactionModality.test.ts +45 -1
- package/src/utils/interactionModality.ts +64 -5
- package/src/utils/interactionOverlay.stylex.ts +12 -3
- package/src/utils/plainDate.test.ts +90 -0
- package/src/utils/plainDate.ts +58 -3
- package/src/utils/presentation.test.ts +380 -0
- package/src/utils/presentation.ts +180 -0
- package/src/utils/pressFeedback.test.ts +138 -0
- package/src/utils/pressFeedback.ts +34 -11
- package/src/utils/pressPaintPriority.test.ts +80 -0
- package/src/utils/primaryClick.test.ts +38 -0
- package/src/utils/primaryClick.ts +28 -0
- package/src/utils/timeFormat.test.ts +204 -0
- package/src/utils/timeFormat.ts +314 -0
- package/src/utils/touchPresentation.stylex.ts +43 -0
- package/src/utils/touchPresentation.test.ts +140 -1
- package/src/utils/touchPresentation.ts +5 -3
- package/src/utils/unicodeDigits.test.ts +44 -0
- package/src/utils/unicodeDigits.ts +71 -0
|
@@ -3,11 +3,11 @@ schema_version: 3
|
|
|
3
3
|
template_version: 7
|
|
4
4
|
kind: component
|
|
5
5
|
id: component:DateTimeInput
|
|
6
|
-
authority:
|
|
6
|
+
authority: current
|
|
7
7
|
archive_reason: null
|
|
8
8
|
superseded_by: null
|
|
9
|
-
approved_by:
|
|
10
|
-
approved_at:
|
|
9
|
+
approved_by: cixzhang
|
|
10
|
+
approved_at: 2026-10-30
|
|
11
11
|
owners: [cixzhang]
|
|
12
12
|
review_triggers: [public-api, behavior, layout, theming, accessibility]
|
|
13
13
|
verified_by:
|
|
@@ -16,30 +16,37 @@ verified_by:
|
|
|
16
16
|
packages/core/src/DateTimeInput/DateTimeInputTouch.test.tsx,
|
|
17
17
|
packages/core/src/DateTimeInput/NativePickerSegments.test.tsx,
|
|
18
18
|
packages/core/src/DateTimeInput/Presentation.test.tsx,
|
|
19
|
+
packages/core/src/DateTimeInput/DateTimeInput.fr10.test.tsx,
|
|
20
|
+
packages/core/src/__tests__/BusyOwnerAnnouncement.test.tsx,
|
|
19
21
|
packages/core/src/theme/themingTargets.test.ts,
|
|
20
22
|
scripts/check-knowledge.mjs,
|
|
21
23
|
]
|
|
22
24
|
modules: []
|
|
23
25
|
families: [family:input-fields, family:overlay-dismissal]
|
|
24
26
|
design_specs: []
|
|
25
|
-
architecture:
|
|
27
|
+
architecture:
|
|
28
|
+
[
|
|
29
|
+
architecture:component-theming-surface,
|
|
30
|
+
architecture:internationalization,
|
|
31
|
+
architecture:public-component-api,
|
|
32
|
+
]
|
|
26
33
|
contributing: []
|
|
27
|
-
system_specs: [spec:AST-043]
|
|
34
|
+
system_specs: [spec:AST-043, spec:AST-085, spec:AST-086, spec:AST-102]
|
|
28
35
|
---
|
|
29
36
|
|
|
30
37
|
# DateTimeInput component contract
|
|
31
38
|
|
|
32
39
|
## Contract at a glance
|
|
33
40
|
|
|
34
|
-
| Area | Contract
|
|
35
|
-
| ----------------------- |
|
|
36
|
-
| Public contract | One controlled ISO date-time value presented through coordinated date and time segments; `presentation` selects Astryx, native, or adaptive picker surfaces.
|
|
37
|
-
| Behavior | Date and time changes emit one combined value; clear emits `undefined`; controlled empty state remains empty in every rendered picker.
|
|
38
|
-
| End-user impact | People selecting a date and time see one value reflected consistently in the closed field and the active picker, including after clearing.
|
|
39
|
-
| Builder impact |
|
|
40
|
-
| Compatibility/readiness |
|
|
41
|
-
| Review checks | Reject competing picker selection, date/time output that is not one valid combined value, presentation precedence drift, lost per-segment fallback, or broken segment accessibility.
|
|
42
|
-
| Governing rules | `spec:AST-043`, `family:input-fields`, `family:overlay-dismissal`, and objective platform accessibility standards.
|
|
41
|
+
| Area | Contract |
|
|
42
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| Public contract | One controlled ISO date-time value presented through coordinated date and time segments; `presentation` selects Astryx, native, or adaptive picker surfaces. |
|
|
44
|
+
| Behavior | Date and time changes emit one combined value; clear emits `undefined`; controlled empty state remains empty in every rendered picker. |
|
|
45
|
+
| End-user impact | People selecting a date and time see one value reflected consistently in the closed field and the active picker, including after clearing. |
|
|
46
|
+
| Builder impact | A caller that relied on the `12h` hour-format default under a 24-hour locale passes `hourFormat="12h"` to keep twelve-hour time text. A per-user 12/24-hour preference goes on the provider locale as a `-u-hc-` extension (`en-US-u-hc-h23`). |
|
|
47
|
+
| Compatibility/readiness | The `hourFormat` default is the provider locale's hour cycle (`12h` for `en`/`en-US` and with no provider); every other released default, API, and DOM shape holds. The presentation matrix and deprecated `nativePicker` mapping follow `spec:AST-043`. Fixed segment height, typed-time prefix commits, busy paint, and caller handlers while disabled are listed under Current-state impact. |
|
|
48
|
+
| Review checks | Reject competing picker selection, date/time output that is not one valid combined value, presentation precedence drift, lost per-segment fallback, or broken segment accessibility. |
|
|
49
|
+
| Governing rules | `spec:AST-043`, `family:input-fields`, `family:overlay-dismissal`, `spec:AST-085`, `spec:AST-086` FR8, and objective platform accessibility standards. |
|
|
43
50
|
|
|
44
51
|
This table is a review projection; the body below is authoritative.
|
|
45
52
|
|
|
@@ -52,9 +59,11 @@ or pointer-adaptive combinations of those surfaces.
|
|
|
52
59
|
|
|
53
60
|
## Compatibility and migration
|
|
54
61
|
|
|
55
|
-
- Released default preserved: `yes`
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
- Released default preserved: `yes`, except `hourFormat`, which follows the
|
|
63
|
+
provider locale's hour cycle (`12h` for `en` and `en-US`, the released
|
|
64
|
+
default with no provider) and shares TimeInput's locale time text
|
|
65
|
+
- Compatibility class: default change for non-English-US locales; existing
|
|
66
|
+
types, callbacks, roles, and exports remain stable
|
|
58
67
|
- Controlled/uncontrolled behavior: DateTimeInput remains controlled; `undefined`
|
|
59
68
|
represents no committed date-time value
|
|
60
69
|
- Migration decision: none; picker presentation and deprecated `nativePicker`
|
|
@@ -71,13 +80,16 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
71
80
|
- Applying component-local date-time bounds, date constraints, time precision,
|
|
72
81
|
typed-time stepping, and optional preset-time behavior.
|
|
73
82
|
- Emitting `onChange` before an optional optimistic `changeAction`.
|
|
83
|
+
- The disabled-reason Tooltip composition, which `family:input-fields` assigns
|
|
84
|
+
to the member.
|
|
74
85
|
|
|
75
86
|
**Does not own / non-goals**
|
|
76
87
|
|
|
77
|
-
- Field label, description, status,
|
|
78
|
-
owned by `
|
|
88
|
+
- Field label, description, status, and clear-button presentation —
|
|
89
|
+
owned by Field under `family:input-fields` (shared owner section) and
|
|
90
|
+
`component:FieldStatus`.
|
|
79
91
|
- Calendar-grid rendering and date-cell interaction — owned by
|
|
80
|
-
|
|
92
|
+
Calendar.
|
|
81
93
|
- Popover and sheet hosting or dismissal — owned by the composed layer components
|
|
82
94
|
and `family:overlay-dismissal`.
|
|
83
95
|
- Cross-component picker-presentation vocabulary and deprecated-prop mapping —
|
|
@@ -95,18 +107,17 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
95
107
|
|
|
96
108
|
## Behavioral and layout contract
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
| FR7 | A preset-time listbox MUST remain optional, preserve typed entry, expose one selected option independently from keyboard highlight, and limit offered values to the selected date's effective minimum and maximum. | Public docs, current source, focused interaction tests | Verified observation; owner approval pending |
|
|
110
|
+
| ID | Invariant | Basis |
|
|
111
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| FR1 | DateTimeInput MUST reflect one controlled date-time value across its visible segments and active picker, and MUST NOT reveal a competing selected date after the parent accepts a clear. | Public docs, controlled component seam, current source, focused tests |
|
|
113
|
+
| FR2 | Every committed date or time change MUST emit one valid combined ISO date-time value; clearing MUST emit `undefined`; changing time while no date is committed MUST emit nothing. | Public types, docs, current source, focused tests |
|
|
114
|
+
| FR3 | `presentation`, deprecated `nativePicker`, precedence, pointer adaptation, forced surfaces, and per-segment native fallbacks MUST follow `spec:AST-043` FR1–FR4. | `spec:AST-043` |
|
|
115
|
+
| FR4 | When `changeAction` is present, every value-change path MUST call `onChange` first, show the proposed controlled value optimistically, and contribute to one busy state until the controlled value accepts or replaces it. | `family:input-fields/FR6` |
|
|
116
|
+
| FR5 | The two pointer segments share one row while each retains its intrinsic basis; when the container is narrower, flex wrapping moves them into separate full-width rows. Each segment is the shared element height for its size, as a minimum that grows with a set text size under `spec:AST-102` FR4. Implementation gap: the height is fixed at that size. | Public docs, current source, focused layout tests; `spec:AST-102` FR4 |
|
|
117
|
+
| FR6 | Date-time bounds and date constraints MUST prevent invalid commits. Native controls MAY receive platform hints, but JavaScript validation remains the final commit boundary; calendar-only options MAY be unavailable on native surfaces. | Public docs, current source, focused presentation tests |
|
|
118
|
+
| FR7 | A preset-time listbox MUST remain optional, preserve typed entry, expose one selected option independently from keyboard highlight, and limit offered values to the selected date's effective minimum and maximum. Time text and typed times MUST follow the active locale's digits, separator, and day-period words (`architecture:internationalization` INV1a, INV8). The hour format is `hourFormat` when set, else the provider locale's hour cycle; time text, preset options, and the stepped-time announcement come from the shared time formatter, and typed times parse the locale's digits, separators, and day-period words as well as English. Implementation gap: the typed time field commits as soon as a prefix parses. | Public docs, current source, focused interaction tests; `architecture:internationalization` INV1a, INV8 |
|
|
119
|
+
| FR8 | Base props and `ref` MUST reach the date segment's input; a caller `aria-describedby` joins the component's own descriptions, and a caller DOM handler runs after the field's own handler. `container*` reaches the Field box and `control*` the segment row; root `xstyle`, `className`, and `style` are not accepted. | `family:input-fields` FR10; `DateTimeInput.fr10.test.tsx` |
|
|
120
|
+
| FR9 | A disabled field MUST keep both segments focusable with `aria-disabled` and no native `disabled`, block every value-changing path, keep the calendar button's tab stop, and paint the keyboard focus ring. Explicit `isLoading` makes every surface inert the same way; a pending `changeAction` does so only on the popover surface, and the bottom sheet and any field with a native date segment keep accepting edits. The busy start is announced once. Implementation gap: a caller `onKeyDown` and other DOM handlers on the date segment still run while disabled (`spec:AST-085` FR2). Implementation gap: a busy field that is not disabled takes the disabled paint (half opacity), on every surface while `isLoading` and on the popover while a `changeAction` is pending, against `spec:AST-085` FR6. | `spec:AST-085` FR1, FR2, FR6; `spec:AST-086` FR8; current source and tests |
|
|
110
121
|
|
|
111
122
|
### Allowed variation
|
|
112
123
|
|
|
@@ -119,13 +130,13 @@ intentional decision.
|
|
|
119
130
|
|
|
120
131
|
### Representative states
|
|
121
132
|
|
|
122
|
-
| State | Required invariant
|
|
123
|
-
| --------------------------- |
|
|
124
|
-
| Empty | Both segments and every active picker expose no committed selection.
|
|
125
|
-
| Date-time value | Date segment, time segment, and active picker reflect the same committed value.
|
|
126
|
-
| Cleared after picker change | Closed field is empty and reopening the picker reveals no selected date or retained committed time.
|
|
127
|
-
| Busy | Proposed value remains visible; mutation paths are unavailable;
|
|
128
|
-
| Focusable disabled | Both segments
|
|
133
|
+
| State | Required invariant | Allowed variation |
|
|
134
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
135
|
+
| Empty | Both segments and every active picker expose no committed selection. | Placeholder and selected surface. |
|
|
136
|
+
| Date-time value | Date segment, time segment, and active picker reflect the same committed value. | Locale, hour format, and time precision. |
|
|
137
|
+
| Cleared after picker change | Closed field is empty and reopening the picker reveals no selected date or retained committed time. | Picker focus date may remain navigational. |
|
|
138
|
+
| Busy | Proposed value remains visible; both editable segments expose busy. With explicit `isLoading`, mutation paths are unavailable on every surface; with a pending `changeAction`, only on the popover surface. | Explicit loading or pending action source. |
|
|
139
|
+
| Focusable disabled | Both segments stay focusable with `aria-disabled` while every value-changing path stays blocked. | Disabled-reason text. |
|
|
129
140
|
|
|
130
141
|
### Transformation and precedence order
|
|
131
142
|
|
|
@@ -220,24 +231,37 @@ leading clock glyph uses `date-time-input-clock-icon`.
|
|
|
220
231
|
|
|
221
232
|
## Verification map
|
|
222
233
|
|
|
223
|
-
| Contract | Verification
|
|
224
|
-
| ------------------- |
|
|
225
|
-
| FR1–FR2 | `DateTimeInput.test.tsx`
|
|
226
|
-
| FR3, FR6 | `Presentation.test.tsx`, `NativePickerSegments.test.tsx`, `DateTimeInputTouch.test.tsx`
|
|
227
|
-
| FR4, AR4
|
|
228
|
-
| FR5 | `DateTimeInput.test.tsx`
|
|
229
|
-
| FR7, AR1–AR3 | `DateTimeInput.test.tsx`, `DateTimeInputTouch.test.tsx`
|
|
230
|
-
|
|
|
234
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
235
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
|
|
236
|
+
| FR1–FR2 | `DateTimeInput.test.tsx` | empty, calendar selection, typed date/time, clear | A stale Calendar selection, partial output, or invalid mutation makes a public-state test fail. | `audit:DateTimeInput/behavior` |
|
|
237
|
+
| FR3, FR6 | `Presentation.test.tsx`, `NativePickerSegments.test.tsx`, `DateTimeInputTouch.test.tsx` | forced, adaptive, legacy, native fallback, constrained commit | A substituted surface, precedence drift, or invalid commit makes a presentation test fail. | `audit:DateTimeInput/surfaces` |
|
|
238
|
+
| FR4, FR9, AR4 | `DateTimeInput.test.tsx`, `DateTimeInputTouch.test.tsx`; `BusyOwnerAnnouncement.test.tsx` DateTimeInput case | pending, loading, disabled reason | Mutation during busy/disabled state or stale optimistic output makes a state test fail. Evidence gap: no test asserts that caller handlers still run while disabled. | `audit:DateTimeInput/state` |
|
|
239
|
+
| FR5 | `DateTimeInput.test.tsx` | intrinsic row, narrow-container wrap classes | Removing the intrinsic basis or wrap styles makes the class-level layout assertions fail; rendered geometry remains review evidence. Evidence gap: no test asserts segment heights or text growth. | `audit:DateTimeInput/layout` |
|
|
240
|
+
| FR7, AR1–AR3 | `DateTimeInput.test.tsx`, `DateTimeInputTouch.test.tsx` | popovers, time options, keyboard/focus | Wrong role, name, state, keyboard behavior, or focus behavior makes a focused interaction test fail. A provider-locale test asserts the closed time text follows the locale's hour cycle and day period; the shared formatter's tests cover parsing. | `audit:DateTimeInput/interaction` |
|
|
241
|
+
| FR8 | `DateTimeInput.fr10.test.tsx` | each surface; caller id, describedby, onClick, onKeyDown | A base prop off the date input, a dropped caller description, or styling on the wrong part fails. | `audit:DateTimeInput/api` |
|
|
242
|
+
| Theming anatomy map | `scripts/check-knowledge.mjs`, `themingTargets.test.ts` | root, segments, icons, listbox, options | Missing, undocumented, or wrongly placed targets fail knowledge or target checks. | `audit:DateTimeInput/theming` |
|
|
243
|
+
|
|
244
|
+
## Current-state impact
|
|
245
|
+
|
|
246
|
+
- **Fixed height (FR5).** Segments hold the fixed shared element height instead
|
|
247
|
+
of growing with a set text size, against `spec:AST-102` FR4.
|
|
248
|
+
- **Typed-time prefix commits (FR7).** The typed time field commits a parsed
|
|
249
|
+
prefix, so a typed time can commit a different time, against
|
|
250
|
+
`architecture:internationalization` INV8.
|
|
251
|
+
- **Busy paint (FR9).** A busy field that is not disabled takes the disabled
|
|
252
|
+
half-opacity paint, against `spec:AST-085` FR6.
|
|
253
|
+
- **Caller handlers while disabled (FR9).** Caller DOM handlers on the date
|
|
254
|
+
segment, such as `onKeyDown`, still run while disabled, against
|
|
255
|
+
`spec:AST-085` FR2.
|
|
231
256
|
|
|
232
257
|
## Decision log
|
|
233
258
|
|
|
234
|
-
No component-local decision
|
|
235
|
-
|
|
259
|
+
No component-local decision. Cross-component picker decisions live in
|
|
260
|
+
`spec:AST-043`.
|
|
236
261
|
|
|
237
262
|
## Open questions
|
|
238
263
|
|
|
239
|
-
None.
|
|
240
|
-
rows without changing inherited current authority.
|
|
264
|
+
None.
|
|
241
265
|
|
|
242
266
|
## Content boundary
|
|
243
267
|
|
|
@@ -239,6 +239,26 @@ describe('DateTimeInput', () => {
|
|
|
239
239
|
expect(screen.getByDisplayValue('2:30 PM')).toBeInTheDocument();
|
|
240
240
|
});
|
|
241
241
|
|
|
242
|
+
it("follows the provider locale's hour cycle when hourFormat is unset", () => {
|
|
243
|
+
const renderIn = (locale: string) => (
|
|
244
|
+
<InternationalizationProvider locale={locale}>
|
|
245
|
+
<DateTimeInput
|
|
246
|
+
label="Meeting"
|
|
247
|
+
value={'2026-03-15T14:30' as ISODateTimeString}
|
|
248
|
+
onChange={() => {}}
|
|
249
|
+
/>
|
|
250
|
+
</InternationalizationProvider>
|
|
251
|
+
);
|
|
252
|
+
const {rerender} = render(renderIn('en-US'));
|
|
253
|
+
expect(screen.getByDisplayValue('2:30 PM')).toBeInTheDocument();
|
|
254
|
+
|
|
255
|
+
rerender(renderIn('de-DE'));
|
|
256
|
+
expect(screen.getByDisplayValue('14:30')).toBeInTheDocument();
|
|
257
|
+
|
|
258
|
+
rerender(renderIn('ko-KR'));
|
|
259
|
+
expect(screen.getByDisplayValue('오후 2:30')).toBeInTheDocument();
|
|
260
|
+
});
|
|
261
|
+
|
|
242
262
|
it('displays formatted time in 24h format', () => {
|
|
243
263
|
render(
|
|
244
264
|
<DateTimeInput
|
|
@@ -2293,6 +2313,67 @@ describe('DateTimeInput', () => {
|
|
|
2293
2313
|
});
|
|
2294
2314
|
});
|
|
2295
2315
|
|
|
2316
|
+
describe('calendar while the popover is closed', () => {
|
|
2317
|
+
const calendarGrid = () => document.querySelector('[role="grid"]');
|
|
2318
|
+
|
|
2319
|
+
it('renders no calendar until the popover opens, and none after it closes', () => {
|
|
2320
|
+
render(
|
|
2321
|
+
<DateTimeInput
|
|
2322
|
+
label="Meeting"
|
|
2323
|
+
value={'2026-01-15T10:00' as ISODateTimeString}
|
|
2324
|
+
onChange={() => {}}
|
|
2325
|
+
/>,
|
|
2326
|
+
);
|
|
2327
|
+
const toggle = getButton('Open calendar');
|
|
2328
|
+
expect(calendarGrid()).toBeNull();
|
|
2329
|
+
|
|
2330
|
+
fireEvent.click(toggle);
|
|
2331
|
+
expect(calendarGrid()).not.toBeNull();
|
|
2332
|
+
|
|
2333
|
+
fireEvent.click(toggle);
|
|
2334
|
+
expect(calendarGrid()).toBeNull();
|
|
2335
|
+
});
|
|
2336
|
+
|
|
2337
|
+
it('opens on the month of a date typed while closed', () => {
|
|
2338
|
+
function Controlled() {
|
|
2339
|
+
const [value, setValue] = useState<ISODateTimeString | undefined>(
|
|
2340
|
+
'2026-01-15T10:00' as ISODateTimeString,
|
|
2341
|
+
);
|
|
2342
|
+
return (
|
|
2343
|
+
<DateTimeInput label="Meeting" value={value} onChange={setValue} />
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
render(<Controlled />);
|
|
2347
|
+
const dateInput = screen.getAllByRole('combobox')[0];
|
|
2348
|
+
|
|
2349
|
+
fireEvent.change(dateInput, {target: {value: 'March 5, 2027'}});
|
|
2350
|
+
fireEvent.keyDown(dateInput, {key: 'ArrowDown'});
|
|
2351
|
+
|
|
2352
|
+
expect(calendarGrid()).toHaveAccessibleName('March 2027');
|
|
2353
|
+
});
|
|
2354
|
+
|
|
2355
|
+
it('moves focus into the calendar on each open from the toggle', async () => {
|
|
2356
|
+
render(
|
|
2357
|
+
<DateTimeInput
|
|
2358
|
+
label="Meeting"
|
|
2359
|
+
value={'2026-01-15T10:00' as ISODateTimeString}
|
|
2360
|
+
onChange={() => {}}
|
|
2361
|
+
/>,
|
|
2362
|
+
);
|
|
2363
|
+
const toggle = getButton('Open calendar');
|
|
2364
|
+
|
|
2365
|
+
for (let i = 0; i < 2; i++) {
|
|
2366
|
+
fireEvent.click(toggle);
|
|
2367
|
+
// The first calendar control takes focus, not the dialog surface.
|
|
2368
|
+
await waitFor(() => {
|
|
2369
|
+
expect(getButton('Previous month')).toHaveFocus();
|
|
2370
|
+
});
|
|
2371
|
+
fireEvent.click(toggle);
|
|
2372
|
+
expect(calendarGrid()).toBeNull();
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
});
|
|
2376
|
+
|
|
2296
2377
|
describe('weekStartsOn', () => {
|
|
2297
2378
|
// The calendar popover renders in the top layer; jsdom keeps the content in
|
|
2298
2379
|
// the DOM but role queries skip it, so read the columnheaders directly.
|
|
@@ -71,9 +71,6 @@ import {
|
|
|
71
71
|
type ISOTimeString,
|
|
72
72
|
parseDateInput,
|
|
73
73
|
parseISOTime,
|
|
74
|
-
parseTimeInput,
|
|
75
|
-
formatDisplayTime12h,
|
|
76
|
-
formatDisplayTime24h,
|
|
77
74
|
formatISOTime,
|
|
78
75
|
isTimeInRange,
|
|
79
76
|
adjustTime,
|
|
@@ -102,6 +99,11 @@ import {useSize} from '../SizeContext/SizeContext';
|
|
|
102
99
|
import {themeProps} from '../utils/themeProps';
|
|
103
100
|
import {focusOutlineStyles} from '../utils/focusOutline.stylex';
|
|
104
101
|
import {useLocale, useTranslator} from '../i18n';
|
|
102
|
+
import {
|
|
103
|
+
formatLocaleTime,
|
|
104
|
+
parseLocaleTime,
|
|
105
|
+
resolveHourFormat,
|
|
106
|
+
} from '../utils/timeFormat';
|
|
105
107
|
|
|
106
108
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
107
109
|
import {useHighlightedOptionScroll} from '../hooks/useHighlightedOptionScroll';
|
|
@@ -412,8 +414,11 @@ export interface DateTimeInputProps extends Omit<
|
|
|
412
414
|
hasSeconds?: boolean;
|
|
413
415
|
|
|
414
416
|
/**
|
|
415
|
-
* Hour display format.
|
|
416
|
-
*
|
|
417
|
+
* Hour display format: '12h' with the locale's day period, or '24h'.
|
|
418
|
+
* When unset, follows the `InternationalizationProvider` locale's hour
|
|
419
|
+
* cycle (`en-US` 12-hour, `en-GB` 24-hour); a per-user preference rides on
|
|
420
|
+
* the locale tag (`en-US-u-hc-h23`).
|
|
421
|
+
* @default the locale's hour cycle
|
|
417
422
|
*/
|
|
418
423
|
hourFormat?: DateTimeInputHourFormat;
|
|
419
424
|
|
|
@@ -836,8 +841,11 @@ function PointerDateTimeField({
|
|
|
836
841
|
}
|
|
837
842
|
const nativeTimeValue = nativeTimeDraft ?? valueParts.time;
|
|
838
843
|
|
|
839
|
-
const formatDisplayTime =
|
|
840
|
-
|
|
844
|
+
const formatDisplayTime = useCallback(
|
|
845
|
+
(time: ISOTimeString, includeSeconds: boolean) =>
|
|
846
|
+
formatLocaleTime(time, locale, hourFormat, includeSeconds),
|
|
847
|
+
[locale, hourFormat],
|
|
848
|
+
);
|
|
841
849
|
|
|
842
850
|
const timeDisplayValue = useMemo(() => {
|
|
843
851
|
if (timePendingInput !== null) {
|
|
@@ -852,12 +860,12 @@ function PointerDateTimeField({
|
|
|
852
860
|
if (timePendingInput === null || !timePendingInput.trim()) {
|
|
853
861
|
return true;
|
|
854
862
|
}
|
|
855
|
-
const parsed =
|
|
863
|
+
const parsed = parseLocaleTime(timePendingInput, locale, hasSeconds);
|
|
856
864
|
if (!parsed) {
|
|
857
865
|
return false;
|
|
858
866
|
}
|
|
859
867
|
return isTimeInRange(parsed, timeMin, timeMax);
|
|
860
|
-
}, [timePendingInput, hasSeconds, timeMin, timeMax]);
|
|
868
|
+
}, [timePendingInput, locale, hasSeconds, timeMin, timeMax]);
|
|
861
869
|
|
|
862
870
|
const resolvedTimePlaceholder = useMemo(() => {
|
|
863
871
|
if (isTimeFocused && !timeDisplayValue) {
|
|
@@ -1362,7 +1370,7 @@ function PointerDateTimeField({
|
|
|
1362
1370
|
const text = e.target.value;
|
|
1363
1371
|
setTimePendingInput(text);
|
|
1364
1372
|
|
|
1365
|
-
const parsed =
|
|
1373
|
+
const parsed = parseLocaleTime(text, locale, hasSeconds);
|
|
1366
1374
|
|
|
1367
1375
|
// Typing narrows nothing — free-form entry is the contract, and a time
|
|
1368
1376
|
// between two options must stay reachable. The list instead follows the
|
|
@@ -1386,6 +1394,7 @@ function PointerDateTimeField({
|
|
|
1386
1394
|
}
|
|
1387
1395
|
},
|
|
1388
1396
|
[
|
|
1397
|
+
locale,
|
|
1389
1398
|
hasSeconds,
|
|
1390
1399
|
timeMin,
|
|
1391
1400
|
timeMax,
|
|
@@ -1440,7 +1449,7 @@ function PointerDateTimeField({
|
|
|
1440
1449
|
return;
|
|
1441
1450
|
}
|
|
1442
1451
|
|
|
1443
|
-
const parsed =
|
|
1452
|
+
const parsed = parseLocaleTime(timePendingInput, locale, hasSeconds);
|
|
1444
1453
|
if (parsed && isTimeInRange(parsed, timeMin, timeMax)) {
|
|
1445
1454
|
if (parsed !== valueParts.time && valueParts.date) {
|
|
1446
1455
|
const combined = combineDateTime(valueParts.date, parsed);
|
|
@@ -1453,6 +1462,7 @@ function PointerDateTimeField({
|
|
|
1453
1462
|
},
|
|
1454
1463
|
[
|
|
1455
1464
|
timePendingInput,
|
|
1465
|
+
locale,
|
|
1456
1466
|
hasSeconds,
|
|
1457
1467
|
timeMin,
|
|
1458
1468
|
timeMax,
|
|
@@ -1530,7 +1540,7 @@ function PointerDateTimeField({
|
|
|
1530
1540
|
const typed =
|
|
1531
1541
|
timeHighlightFollowsTypingRef.current &&
|
|
1532
1542
|
timePendingInput !== null
|
|
1533
|
-
?
|
|
1543
|
+
? parseLocaleTime(timePendingInput, locale, hasSeconds)
|
|
1534
1544
|
: null;
|
|
1535
1545
|
const option = timeOptions[activeTimeIndex];
|
|
1536
1546
|
if (typed) {
|
|
@@ -1582,6 +1592,7 @@ function PointerDateTimeField({
|
|
|
1582
1592
|
},
|
|
1583
1593
|
[
|
|
1584
1594
|
valueParts,
|
|
1595
|
+
locale,
|
|
1585
1596
|
hasSeconds,
|
|
1586
1597
|
timeIncrement,
|
|
1587
1598
|
timeMin,
|
|
@@ -1937,17 +1948,21 @@ function PointerDateTimeField({
|
|
|
1937
1948
|
|
|
1938
1949
|
{!usesNativePicker &&
|
|
1939
1950
|
popover.render(
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
+
// Mounted only while open, like the time list below; the calendar
|
|
1952
|
+
// opens on the current value.
|
|
1953
|
+
!popover.isOpen ? null : (
|
|
1954
|
+
<Calendar
|
|
1955
|
+
handleRef={calendarRef}
|
|
1956
|
+
mode="single"
|
|
1957
|
+
value={valueParts.date ?? null}
|
|
1958
|
+
onChange={(d: ISODateString) => handleDateChange(d, 'calendar')}
|
|
1959
|
+
min={calendarMin}
|
|
1960
|
+
max={calendarMax}
|
|
1961
|
+
dateConstraints={dateConstraints}
|
|
1962
|
+
numberOfMonths={numberOfMonths}
|
|
1963
|
+
weekStartsOn={weekStartsOn}
|
|
1964
|
+
/>
|
|
1965
|
+
),
|
|
1951
1966
|
{placement: 'below', alignment: 'start'},
|
|
1952
1967
|
)}
|
|
1953
1968
|
|
|
@@ -2030,11 +2045,18 @@ export function DateTimeInput(props: DateTimeInputProps) {
|
|
|
2030
2045
|
props.presentation,
|
|
2031
2046
|
props.nativePicker,
|
|
2032
2047
|
);
|
|
2048
|
+
const locale = useLocale();
|
|
2033
2049
|
const {
|
|
2034
2050
|
presentation: _presentation,
|
|
2035
2051
|
nativePicker: _nativePicker,
|
|
2036
|
-
...
|
|
2052
|
+
...surfaceProps
|
|
2037
2053
|
} = props;
|
|
2054
|
+
// Every surface gets the resolved hour format, so typed text, the native
|
|
2055
|
+
// field's resting text, preset times, and the sheet wheels agree.
|
|
2056
|
+
const rest = {
|
|
2057
|
+
...surfaceProps,
|
|
2058
|
+
hourFormat: resolveHourFormat(locale, props.hourFormat),
|
|
2059
|
+
};
|
|
2038
2060
|
if (effective === 'native') {
|
|
2039
2061
|
return (
|
|
2040
2062
|
<PointerDateTimeField
|
|
@@ -34,13 +34,12 @@ import type {InputStatusType} from '../Field';
|
|
|
34
34
|
import {useMediaQuery} from '../hooks/useMediaQuery';
|
|
35
35
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
36
36
|
import {Icon} from '../Icon';
|
|
37
|
-
import {useTranslator} from '../i18n';
|
|
37
|
+
import {useLocale, useTranslator} from '../i18n';
|
|
38
|
+
import {formatLocaleTime} from '../utils/timeFormat';
|
|
38
39
|
import type {ThemeProps} from '../utils/themeProps';
|
|
39
40
|
import {VisuallyHidden} from '../VisuallyHidden';
|
|
40
41
|
import {
|
|
41
42
|
focusOutlineStyles,
|
|
42
|
-
formatDisplayTime12h,
|
|
43
|
-
formatDisplayTime24h,
|
|
44
43
|
formatISOTime,
|
|
45
44
|
isTimeInRange,
|
|
46
45
|
parseISOTime,
|
|
@@ -126,6 +125,7 @@ export function NativeTimeSegment({
|
|
|
126
125
|
...inputProps
|
|
127
126
|
} = controlProps ?? {};
|
|
128
127
|
const t = useTranslator();
|
|
128
|
+
const locale = useLocale();
|
|
129
129
|
const isTouchPointer = useMediaQuery('(pointer: coarse)');
|
|
130
130
|
const internalInputRef = useRef<HTMLInputElement | null>(null);
|
|
131
131
|
const mergedInputRef = useMergedRefs(inputRef, internalInputRef);
|
|
@@ -151,10 +151,8 @@ export function NativeTimeSegment({
|
|
|
151
151
|
|
|
152
152
|
const nativeValue = normalizeNativeTime(value) ?? '';
|
|
153
153
|
const isInputValid = rejectedValue === null;
|
|
154
|
-
const formatDisplayTime =
|
|
155
|
-
hourFormat === '12h' ? formatDisplayTime12h : formatDisplayTime24h;
|
|
156
154
|
const overlayText = nativeValue
|
|
157
|
-
?
|
|
155
|
+
? formatLocaleTime(nativeValue, locale, hourFormat, false)
|
|
158
156
|
: placeholder;
|
|
159
157
|
const showsOverlay = !!overlayText && !(isFocused && isSegmentEditable);
|
|
160
158
|
|
|
@@ -69,9 +69,8 @@ import {focusOutlineStyles} from '../utils/focusOutline.stylex';
|
|
|
69
69
|
import {rtlStyles} from '../utils/rtlStyles';
|
|
70
70
|
import {themeProps} from '../utils/themeProps';
|
|
71
71
|
import {normalizeDayOfWeek} from '../utils/dateTypes';
|
|
72
|
+
import {formatLocaleTime} from '../utils/timeFormat';
|
|
72
73
|
import {
|
|
73
|
-
formatDisplayTime12h,
|
|
74
|
-
formatDisplayTime24h,
|
|
75
74
|
formatISOTime,
|
|
76
75
|
isImeKeyEvent,
|
|
77
76
|
isRenderable,
|
|
@@ -689,12 +688,9 @@ export function TouchDateTimeField({
|
|
|
689
688
|
const timeDisplayValue = useMemo(() => {
|
|
690
689
|
const displayTime = normalizedValueTime ?? draftTime;
|
|
691
690
|
return displayTime
|
|
692
|
-
? (
|
|
693
|
-
displayTime,
|
|
694
|
-
hasSeconds,
|
|
695
|
-
)
|
|
691
|
+
? formatLocaleTime(displayTime, locale, hourFormat, hasSeconds)
|
|
696
692
|
: '';
|
|
697
|
-
}, [draftTime, normalizedValueTime, hourFormat, hasSeconds]);
|
|
693
|
+
}, [draftTime, normalizedValueTime, locale, hourFormat, hasSeconds]);
|
|
698
694
|
|
|
699
695
|
const timeBoundsForDate = useCallback(
|
|
700
696
|
(date: ISODateString | undefined) => ({
|