@astryxdesign/core 0.7.4 → 0.7.5-canary.0418c47
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/README.md +12 -9
- package/dist/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/AlertDialog/AlertDialog.js +1 -1
- package/dist/AlertDialog/index.d.ts +4 -4
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +1 -1
- package/dist/AppShell/AppShell.d.ts +4 -4
- package/dist/AppShell/index.d.ts +4 -4
- package/dist/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/AspectRatio/index.d.ts +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.js +2 -2
- package/dist/Avatar/index.d.ts +4 -4
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/dist/AvatarGroup/AvatarGroupContext.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/index.d.ts +6 -6
- package/dist/Badge/Badge.d.ts +2 -2
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +18 -2
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Banner/Banner.d.ts +5 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +64 -9
- package/dist/Banner/index.d.ts +2 -2
- package/dist/Blockquote/Blockquote.d.ts +1 -1
- package/dist/Blockquote/index.d.ts +2 -2
- package/dist/BottomSheet/BottomSheet.d.ts +58 -10
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +435 -198
- package/dist/BottomSheet/BottomSheetHostContext.d.ts +8 -0
- package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -0
- package/dist/BottomSheet/BottomSheetHostContext.js +35 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +12 -4
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +76 -22
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +54 -15
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +229 -27
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +8 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetEscape.d.ts +3 -0
- package/dist/BottomSheet/bottomSheetEscape.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetEscape.js +20 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts +262 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetStack.js +1652 -0
- package/dist/BottomSheet/index.d.ts +4 -4
- package/dist/BottomSheet/useSheetGestures.d.ts +19 -3
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +43 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +4 -4
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/Breadcrumbs/index.d.ts +12 -12
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +18 -7
- package/dist/Button/index.d.ts +2 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/dist/ButtonGroup/index.d.ts +4 -4
- package/dist/Calendar/Calendar.d.ts +3 -3
- package/dist/Calendar/dayCellUtils.d.ts +1 -1
- package/dist/Calendar/getInitialFocusDate.d.ts +2 -2
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +1 -1
- package/dist/Calendar/hooks/index.d.ts +6 -6
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +2 -2
- package/dist/Calendar/index.d.ts +5 -5
- package/dist/Calendar/utils.d.ts +1 -1
- package/dist/Card/Card.d.ts +4 -4
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/index.d.ts +2 -2
- package/dist/Center/Center.d.ts +2 -2
- package/dist/Center/index.d.ts +2 -2
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +25 -32
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts +4 -4
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +55 -16
- package/dist/Chat/ChatDictationButton.d.ts +2 -2
- package/dist/Chat/ChatLayout.d.ts +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts +2 -2
- package/dist/Chat/ChatMessageBubble.d.ts +2 -2
- package/dist/Chat/ChatMessageList.d.ts +3 -3
- package/dist/Chat/ChatMessageMetadata.d.ts +1 -1
- package/dist/Chat/ChatMessageMetadata.js +2 -2
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +7 -6
- package/dist/Chat/ChatSendButton.d.ts +1 -1
- package/dist/Chat/ChatSystemMessage.d.ts +1 -1
- package/dist/Chat/ChatTokenizedText.d.ts +2 -2
- package/dist/Chat/ChatToolCalls.d.ts +1 -1
- package/dist/Chat/ChatToolCalls.js +4 -4
- package/dist/Chat/index.d.ts +43 -43
- package/dist/Chat/useChatComposerTokens.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatPasteAsToken.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +4 -4
- package/dist/CheckboxInput/index.d.ts +2 -2
- package/dist/CheckboxList/CheckboxList.d.ts +4 -4
- package/dist/CheckboxList/CheckboxListItem.d.ts +2 -2
- package/dist/CheckboxList/index.d.ts +4 -4
- package/dist/Citation/Citation.d.ts +1 -1
- package/dist/Citation/index.d.ts +2 -2
- package/dist/ClickableCard/ClickableCard.d.ts +3 -3
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +10 -6
- package/dist/ClickableCard/index.d.ts +2 -2
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts +27 -4
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +58 -19
- package/dist/CodeBlock/grammar.d.ts +134 -0
- package/dist/CodeBlock/grammar.d.ts.map +1 -0
- package/dist/CodeBlock/grammar.js +219 -0
- package/dist/CodeBlock/highlightRanges.d.ts +1 -1
- package/dist/CodeBlock/index.d.ts +10 -8
- package/dist/CodeBlock/index.d.ts.map +1 -1
- package/dist/CodeBlock/index.js +1 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts +3 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts.map +1 -0
- package/dist/CodeBlock/languages/dockerfile.js +45 -0
- package/dist/CodeBlock/languages/graphql.d.ts +3 -0
- package/dist/CodeBlock/languages/graphql.d.ts.map +1 -0
- package/dist/CodeBlock/languages/graphql.js +27 -0
- package/dist/CodeBlock/languages/java.d.ts +3 -0
- package/dist/CodeBlock/languages/java.d.ts.map +1 -0
- package/dist/CodeBlock/languages/java.js +24 -0
- package/dist/CodeBlock/languages/lua.d.ts +3 -0
- package/dist/CodeBlock/languages/lua.d.ts.map +1 -0
- package/dist/CodeBlock/languages/lua.js +21 -0
- package/dist/CodeBlock/languages/objective-c.d.ts +3 -0
- package/dist/CodeBlock/languages/objective-c.d.ts.map +1 -0
- package/dist/CodeBlock/languages/objective-c.js +27 -0
- package/dist/CodeBlock/languages/powershell.d.ts +3 -0
- package/dist/CodeBlock/languages/powershell.d.ts.map +1 -0
- package/dist/CodeBlock/languages/powershell.js +30 -0
- package/dist/CodeBlock/languages/ruby.d.ts +3 -0
- package/dist/CodeBlock/languages/ruby.d.ts.map +1 -0
- package/dist/CodeBlock/languages/ruby.js +24 -0
- package/dist/CodeBlock/languages/thrift.d.ts +3 -0
- package/dist/CodeBlock/languages/thrift.d.ts.map +1 -0
- package/dist/CodeBlock/languages/thrift.js +18 -0
- package/dist/CodeBlock/languages/toml.d.ts +3 -0
- package/dist/CodeBlock/languages/toml.d.ts.map +1 -0
- package/dist/CodeBlock/languages/toml.js +53 -0
- package/dist/CodeBlock/tokenizer.d.ts +8 -4
- package/dist/CodeBlock/tokenizer.d.ts.map +1 -1
- package/dist/CodeBlock/tokenizer.js +158 -8
- package/dist/Collapsible/Collapsible.d.ts +10 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +84 -2
- package/dist/Collapsible/CollapsibleGroup.d.ts +2 -2
- package/dist/Collapsible/index.d.ts +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +2 -2
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +15 -1
- package/dist/CommandPalette/CommandPaletteContext.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
- package/dist/CommandPalette/CommandPaletteFooter.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteGroup.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +14 -2
- package/dist/CommandPalette/CommandPaletteItem.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/busyStartSettle.d.ts +4 -0
- package/dist/CommandPalette/busyStartSettle.d.ts.map +1 -0
- package/dist/CommandPalette/busyStartSettle.js +23 -0
- package/dist/CommandPalette/index.d.ts +16 -16
- package/dist/ComplexSelector/ComplexSelector.d.ts +25 -7
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +42 -7
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +48 -13
- package/dist/ContextMenu/index.d.ts +9 -9
- package/dist/DateInput/DateInput.d.ts +7 -7
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +12 -5
- package/dist/DateInput/MonthScroller.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +2 -1
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +1 -1
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/monthGeometry.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +6 -6
- package/dist/DateRangeInput/index.d.ts +2 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts +6 -6
- package/dist/DateTimeInput/NativeDateSegment.d.ts +3 -3
- package/dist/DateTimeInput/NativeTimeSegment.d.ts +4 -4
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts +7 -3
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/index.d.ts +6 -6
- package/dist/Dialog/useImperativeDialog.d.ts +1 -1
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/index.d.ts +2 -2
- package/dist/Drawer/Drawer.d.ts +3 -3
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +18 -13
- package/dist/Drawer/DrawerHeader.d.ts +1 -1
- package/dist/Drawer/index.d.ts +4 -4
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +32 -20
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +12 -7
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +13 -5
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +8 -8
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +0 -3
- package/dist/DropdownMenu/MenuBottomSheet.d.ts +11 -4
- package/dist/DropdownMenu/MenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/MenuBottomSheet.js +35 -9
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +1 -1
- package/dist/DropdownMenu/MenuBottomSheetActionList.js +3 -3
- package/dist/DropdownMenu/index.d.ts +10 -10
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +4 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +25 -3
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts +23 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.js +29 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +3 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemHover.js +14 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.js +7 -5
- package/dist/EmptyState/EmptyState.d.ts +5 -3
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +6 -4
- package/dist/EmptyState/index.d.ts +2 -2
- package/dist/Field/Field.d.ts +5 -5
- package/dist/Field/Field.js +1 -1
- package/dist/Field/FieldLabel.d.ts +2 -2
- package/dist/Field/FieldLabel.js +1 -1
- package/dist/Field/PanelSearchInput.d.ts +10 -2
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +31 -22
- package/dist/Field/fieldInputFamily.testing.d.ts +1 -1
- package/dist/Field/fieldParts.d.ts +1 -1
- package/dist/Field/index.d.ts +10 -10
- package/dist/Field/inputDisabledFocus.d.ts +14 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -0
- package/dist/Field/inputDisabledFocus.js +19 -0
- package/dist/Field/inputStyles.stylex.d.ts +9 -9
- package/dist/Field/inputStyles.stylex.js +9 -9
- package/dist/FieldStatus/FieldStatus.d.ts +3 -3
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +7 -3
- package/dist/FieldStatus/index.d.ts +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts +4 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +15 -9
- package/dist/FileInput/index.d.ts +2 -2
- package/dist/FormLayout/FormLayout.d.ts +2 -2
- package/dist/FormLayout/index.d.ts +4 -4
- package/dist/Grid/Grid.d.ts +3 -3
- package/dist/Grid/GridSpan.d.ts +1 -1
- package/dist/Grid/index.d.ts +4 -4
- package/dist/HStack/HStack.d.ts +2 -2
- package/dist/HStack/index.d.ts +1 -1
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -4
- package/dist/HoverCard/index.d.ts +4 -4
- package/dist/HoverCard/useHoverCard.d.ts +2 -2
- package/dist/Icon/Icon.d.ts +18 -6
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +55 -9
- package/dist/Icon/IconDefaultSizeContext.d.ts +1 -1
- package/dist/Icon/IconSize.stylex.d.ts +16 -11
- package/dist/Icon/IconSize.stylex.d.ts.map +1 -1
- package/dist/Icon/IconSize.stylex.js +27 -11
- package/dist/Icon/defaultIcons.d.ts +1 -1
- package/dist/Icon/globalIconRegistry.d.ts +69 -5
- package/dist/Icon/globalIconRegistry.d.ts.map +1 -1
- package/dist/Icon/globalIconRegistry.js +108 -24
- package/dist/Icon/index.d.ts +30 -6
- package/dist/Icon/index.d.ts.map +1 -1
- package/dist/Icon/index.js +24 -1
- package/dist/Icon/useIcon.d.ts +6 -2
- package/dist/Icon/useIcon.d.ts.map +1 -1
- package/dist/Icon/useIcon.js +5 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/index.d.ts +2 -2
- package/dist/Indicator/CheckIndicator.d.ts +1 -1
- package/dist/Indicator/CheckboxIndicator.d.ts +1 -1
- package/dist/Indicator/RadioIndicator.d.ts +1 -1
- package/dist/Indicator/index.d.ts +8 -8
- package/dist/Indicator/indicatorRegistry.d.ts +2 -2
- package/dist/Indicator/types.d.ts +1 -1
- package/dist/Indicator/useIndicator.d.ts +2 -2
- package/dist/InputGroup/InputGroup.d.ts +3 -3
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +46 -36
- package/dist/InputGroup/InputGroupInternalContext.d.ts +4 -0
- package/dist/InputGroup/InputGroupInternalContext.d.ts.map +1 -0
- package/dist/InputGroup/InputGroupInternalContext.js +15 -0
- package/dist/InputGroup/InputGroupText.d.ts +1 -1
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -0
- package/dist/InputGroup/groupStyles.d.ts +9 -0
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +28 -14
- package/dist/InputGroup/index.d.ts +6 -6
- package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts +1 -1
- package/dist/InteractiveRoleContext/index.d.ts +1 -1
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +1 -1
- package/dist/Item/ItemSwipeLayer.d.ts +2 -2
- package/dist/Item/ItemSwipeLayer.d.ts.map +1 -1
- package/dist/Item/ItemSwipeLayer.js +3 -0
- package/dist/Item/index.d.ts +2 -2
- package/dist/Item/useSwipeAction.d.ts.map +1 -1
- package/dist/Item/useSwipeAction.js +60 -5
- package/dist/Kbd/Kbd.d.ts +3 -3
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +18 -11
- package/dist/Kbd/index.d.ts +2 -2
- package/dist/Layer/LayerProvider.d.ts +1 -1
- package/dist/Layer/index.d.ts +18 -18
- package/dist/Layer/layerAnimations.stylex.d.ts +9 -5
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +23 -10
- package/dist/Layer/layerInset.d.ts +1 -1
- package/dist/Layer/layerSlideRules.d.ts +63 -3
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +124 -3
- package/dist/Layer/layerStack.d.ts +12 -9
- package/dist/Layer/layerStack.d.ts.map +1 -1
- package/dist/Layer/layerStack.js +116 -53
- package/dist/Layer/modalOutlet.d.ts +44 -6
- package/dist/Layer/modalOutlet.d.ts.map +1 -1
- package/dist/Layer/modalOutlet.js +150 -14
- package/dist/Layer/preserveAnimations.d.ts +11 -0
- package/dist/Layer/preserveAnimations.d.ts.map +1 -0
- package/dist/Layer/preserveAnimations.js +245 -0
- package/dist/Layer/useLayer.d.ts +19 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +500 -43
- package/dist/Layer/useLayerDismissal.d.ts +11 -8
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +8 -8
- package/dist/Layer/useTouchTrigger.d.ts +14 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +72 -17
- package/dist/Layout/Layout.d.ts +2 -2
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +4 -0
- package/dist/Layout/LayoutContent.d.ts +2 -2
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +2 -2
- package/dist/Layout/LayoutFooter.d.ts +2 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +2 -1
- package/dist/Layout/LayoutHeader.d.ts +2 -2
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +2 -1
- package/dist/Layout/LayoutPanel.d.ts +3 -3
- package/dist/Layout/index.d.ts +29 -29
- package/dist/Layout/layoutEdges.stylex.d.ts +20 -0
- package/dist/Layout/layoutEdges.stylex.d.ts.map +1 -0
- package/dist/Layout/layoutEdges.stylex.js +28 -0
- package/dist/Layout/padding.stylex.d.ts +1 -1
- package/dist/Lightbox/Lightbox.d.ts +6 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +111 -89
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.js +78 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.js +65 -0
- package/dist/Lightbox/index.d.ts +4 -4
- package/dist/Lightbox/useLightbox.d.ts +1 -1
- package/dist/Link/Link.d.ts +3 -3
- package/dist/Link/LinkContext.d.ts +1 -1
- package/dist/Link/LinkProvider.d.ts +1 -1
- package/dist/Link/index.d.ts +8 -8
- package/dist/Link/useLinkComponent.d.ts +1 -1
- package/dist/List/List.d.ts +3 -3
- package/dist/List/ListItem.d.ts +2 -2
- package/dist/List/index.d.ts +4 -4
- package/dist/Markdown/Markdown.d.ts +15 -5
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.bench.js +3 -1
- package/dist/Markdown/Markdown.fr23.sampling.d.ts +16 -0
- package/dist/Markdown/Markdown.fr23.sampling.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.sampling.js +13 -4
- package/dist/Markdown/Markdown.js +23 -9
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.js +1 -0
- package/dist/Markdown/headingProjection.d.ts +3 -3
- package/dist/Markdown/index.d.ts +7 -7
- package/dist/Markdown/parser/index.d.ts +3 -3
- package/dist/Markdown/parser.d.ts +3 -3
- package/dist/Markdown/plugin-renderer/MarkdownPluginNodeRenderer.d.ts +1 -1
- package/dist/Markdown/plugin-renderer/index.d.ts +2 -2
- package/dist/Markdown/plugins/frontmatter.d.ts +2 -2
- package/dist/Markdown/plugins/headingLinks.d.ts +2 -2
- package/dist/Markdown/plugins/index.d.ts +14 -14
- package/dist/Markdown/plugins/protocol.d.ts +1 -1
- package/dist/Markdown/plugins/semanticFence.d.ts +2 -2
- package/dist/Markdown/plugins/softBreaks.d.ts +1 -1
- package/dist/Markdown/plugins/sourceDecoration.d.ts +2 -2
- package/dist/Markdown/plugins/sourceLines.d.ts +1 -1
- package/dist/Markdown/plugins/textTransform.d.ts +2 -2
- package/dist/Markdown/remark.d.ts +1 -1
- package/dist/Markdown/utils.d.ts +4 -4
- package/dist/MetadataList/MetadataList.d.ts +2 -2
- package/dist/MetadataList/MetadataListItem.d.ts +1 -1
- package/dist/MetadataList/index.d.ts +5 -5
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +46 -37
- package/dist/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.js +1 -0
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/index.d.ts +4 -4
- package/dist/MoreMenu/MoreMenu.d.ts +4 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/CreateRow.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.d.ts +8 -8
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.js +21 -5
- package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/hooks.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +3 -3
- package/dist/MultiSelector/types.d.ts +1 -1
- package/dist/NavIcon/NavIcon.d.ts +1 -1
- package/dist/NavIcon/index.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenu.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +46 -7
- package/dist/NavMenu/index.d.ts +6 -6
- package/dist/NumberInput/NumberInput.d.ts +9 -9
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +61 -24
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/numberInputCommit.d.ts +1 -1
- package/dist/NumberInput/numberParser.d.ts +1 -1
- package/dist/Outline/Outline.d.ts +3 -3
- package/dist/Outline/index.d.ts +7 -7
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -2
- package/dist/Outline/useOutlineFromDOM.d.ts +1 -1
- package/dist/Outline/useOutlineFromMarkdown.d.ts +3 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/OverflowList/OverflowList.d.ts +2 -2
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/Overlay/Overlay.d.ts +2 -2
- package/dist/Overlay/index.d.ts +5 -5
- package/dist/Overlay/useOverlay.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts +2 -2
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Popover/Popover.d.ts +44 -5
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +276 -44
- package/dist/Popover/index.d.ts +4 -4
- package/dist/Popover/index.d.ts.map +1 -1
- package/dist/Popover/lazyPopoverBottomSheet.d.ts +23 -0
- package/dist/Popover/lazyPopoverBottomSheet.d.ts.map +1 -0
- package/dist/Popover/lazyPopoverBottomSheet.js +40 -0
- package/dist/Popover/usePopover.d.ts +2 -2
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -5
- package/dist/PowerSearch/PowerSearch.d.ts +5 -5
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +7 -5
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +2 -2
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -2
- package/dist/PowerSearch/formatFilterValue.d.ts +3 -3
- package/dist/PowerSearch/index.d.ts +8 -8
- package/dist/PowerSearch/resolveDateTimeRangePart.d.ts +1 -1
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +2 -2
- package/dist/PowerSearch/types.d.ts +1 -1
- package/dist/PowerSearch/useInternalConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchSource.d.ts +3 -3
- package/dist/PowerSearch/utils.d.ts +3 -3
- package/dist/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +8 -0
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/RadioList/RadioList.d.ts +3 -3
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +10 -2
- package/dist/RadioList/index.d.ts +4 -4
- package/dist/Resizable/ResizeHandle.d.ts +2 -2
- package/dist/Resizable/index.d.ts +6 -6
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/utils.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
- package/dist/ScrollableArea/ScrollableArea.js +1 -1
- package/dist/ScrollableArea/index.d.ts +4 -4
- package/dist/Section/Section.d.ts +3 -3
- package/dist/Section/index.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +5 -5
- package/dist/SelectableCard/SelectableCard.d.ts +8 -8
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +15 -11
- package/dist/SelectableCard/index.d.ts +2 -2
- package/dist/Selector/Selector.d.ts +8 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +16 -5
- package/dist/Selector/SelectorOption.d.ts +1 -1
- package/dist/Selector/hooks.d.ts +1 -1
- package/dist/Selector/index.d.ts +4 -4
- package/dist/Selector/types.d.ts +1 -1
- package/dist/Selector/useSelectorPresentation.d.ts +2 -2
- package/dist/Selector/utils.d.ts +1 -1
- package/dist/SideNav/SideNav.d.ts +3 -3
- package/dist/SideNav/SideNavCollapseButton.d.ts +3 -3
- package/dist/SideNav/SideNavHeading.d.ts +2 -2
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +34 -0
- package/dist/SideNav/SideNavItem.d.ts +9 -5
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +36 -13
- package/dist/SideNav/SideNavSection.d.ts +1 -1
- package/dist/SideNav/index.d.ts +14 -14
- package/dist/SizeContext/index.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +12 -3
- package/dist/Skeleton/index.d.ts +2 -2
- package/dist/Slider/Slider.d.ts +3 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +45 -12
- package/dist/Slider/index.d.ts +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Stack/Stack.d.ts +3 -3
- package/dist/Stack/StackItem.d.ts +2 -2
- package/dist/Stack/index.d.ts +6 -6
- package/dist/Stack/stack.stylex.d.ts +1 -1
- package/dist/StatusDot/StatusDot.d.ts +2 -2
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +12 -0
- package/dist/StatusDot/index.d.ts +2 -2
- package/dist/Stepper/Step.d.ts +2 -2
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +10 -6
- package/dist/Stepper/Stepper.d.ts +2 -2
- package/dist/Stepper/index.d.ts +7 -7
- package/dist/Switch/Switch.d.ts +4 -4
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +5 -5
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/switch.markers.stylex.d.ts +7 -2
- package/dist/Switch/switch.markers.stylex.d.ts.map +1 -1
- package/dist/Switch/switch.markers.stylex.js +8 -3
- package/dist/TabList/Tab.d.ts +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/dist/TabList/TabList.d.ts +3 -3
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +1 -0
- package/dist/TabList/index.d.ts +8 -8
- package/dist/Table/BaseTable.d.ts +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/TableBody.d.ts +1 -1
- package/dist/Table/TableCell.d.ts +3 -3
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +1 -0
- package/dist/Table/TableContext.d.ts +1 -1
- package/dist/Table/TableFooter.d.ts +1 -1
- package/dist/Table/TableHeader.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -3
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -0
- package/dist/Table/TableRow.d.ts +2 -2
- package/dist/Table/TableSelectionToolbar.d.ts +2 -2
- package/dist/Table/columnUtils.d.ts +1 -1
- package/dist/Table/index.d.ts +54 -54
- package/dist/Table/plugins/columnResize/index.d.ts +2 -2
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +11 -2
- package/dist/Table/plugins/columnSettings/index.d.ts +4 -4
- package/dist/Table/plugins/columnSettings/useTableColumnSettings.d.ts +2 -2
- package/dist/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts +1 -1
- package/dist/Table/plugins/filtering/index.d.ts +4 -4
- package/dist/Table/plugins/filtering/useTableFilterState.d.ts +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/index.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/pagination/index.d.ts +3 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/index.d.ts +2 -2
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +103 -4
- package/dist/Table/plugins/rowIndex/index.d.ts +2 -2
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
- package/dist/Table/plugins/rowStatus/index.d.ts +2 -2
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +2 -2
- package/dist/Table/plugins/selection/index.d.ts +4 -4
- package/dist/Table/plugins/selection/useTableSelection.d.ts +1 -1
- package/dist/Table/plugins/selection/useTableSelectionState.d.ts +1 -1
- package/dist/Table/plugins/sortable/index.d.ts +4 -4
- package/dist/Table/plugins/sortable/useTableSortable.d.ts +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/index.d.ts +2 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +233 -6
- package/dist/Table/plugins/tree/index.d.ts +4 -4
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +1 -1
- package/dist/Table/plugins/tree/useTableTreeState.d.ts +1 -1
- package/dist/Table/rowDivider.d.ts +34 -0
- package/dist/Table/rowDivider.d.ts.map +1 -0
- package/dist/Table/rowDivider.js +118 -0
- package/dist/Table/tableContextMenu.d.ts +2 -2
- package/dist/Table/types.d.ts +3 -3
- package/dist/Table/useBaseTablePlugins.d.ts +1 -1
- package/dist/Table/useTableCellStyles.d.ts +2 -2
- package/dist/Table/utils.d.ts +2 -2
- package/dist/Text/Text.d.ts +3 -3
- package/dist/Text/index.d.ts +4 -4
- package/dist/TextArea/TextArea.d.ts +10 -8
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -12
- package/dist/TextArea/index.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts +12 -10
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +35 -21
- package/dist/TextInput/index.d.ts +2 -2
- package/dist/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +45 -11
- package/dist/Thumbnail/index.d.ts +2 -2
- package/dist/TimeInput/TimeInput.d.ts +6 -6
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +12 -4
- package/dist/TimeInput/TouchTimeField.d.ts +1 -1
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +2 -1
- package/dist/TimeInput/index.d.ts +3 -3
- package/dist/Timer/Timer.d.ts +2 -2
- package/dist/Timer/index.d.ts +2 -2
- package/dist/Timestamp/Timestamp.d.ts +3 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts +1 -1
- package/dist/Timestamp/formatInstant.d.ts +2 -2
- package/dist/Timestamp/formatRelativeTime.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +3 -3
- package/dist/Timestamp/tooltipEntries.d.ts +2 -2
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/ToastContext.d.ts +1 -1
- package/dist/Toast/ToastViewport.d.ts +2 -2
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +28 -2
- package/dist/Toast/index.d.ts +6 -6
- package/dist/Toast/useToast.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/ToggleButton/index.d.ts +4 -4
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/index.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts +77 -10
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +474 -85
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +98 -0
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerBottomSheet.js +721 -0
- package/dist/Tokenizer/index.d.ts +2 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts +3 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -1
- package/dist/Tokenizer/useEndLaneReserve.js +3 -2
- package/dist/Toolbar/Toolbar.d.ts +4 -4
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/index.d.ts +4 -4
- package/dist/Tooltip/useTooltip.d.ts +2 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +9 -3
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNavHeading.d.ts +2 -2
- package/dist/TopNav/TopNavItem.d.ts +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +4 -4
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +2 -2
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/index.d.ts +16 -16
- package/dist/TreeList/TreeList.d.ts +11 -26
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +175 -3
- package/dist/TreeList/TreeListItem.d.ts +8 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +3 -1
- package/dist/TreeList/TreeListTypes.d.ts +1 -1
- package/dist/TreeList/index.d.ts +3 -3
- package/dist/Typeahead/BaseTypeahead.d.ts +2 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +16 -4
- package/dist/Typeahead/Typeahead.d.ts +7 -7
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +31 -14
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -2
- package/dist/Typeahead/createStaticSource.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +9 -9
- package/dist/Typeahead/utils.d.ts +3 -3
- package/dist/VStack/VStack.d.ts +2 -2
- package/dist/VStack/index.d.ts +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +24 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +24 -5
- package/dist/VisuallyHidden/index.d.ts +2 -2
- package/dist/astryx.css +138 -51
- package/dist/gestures/GestureArena.d.ts +175 -0
- package/dist/gestures/GestureArena.d.ts.map +1 -0
- package/dist/gestures/GestureArena.js +816 -0
- package/dist/gestures/GestureRecognizer.d.ts +239 -0
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/GestureRecognizer.js +487 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts +32 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/LongPressGestureRecognizer.js +135 -0
- package/dist/gestures/PanGestureRecognizer.d.ts +117 -0
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/PanGestureRecognizer.js +349 -0
- package/dist/gestures/TapGestureRecognizer.d.ts +39 -0
- package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/TapGestureRecognizer.js +151 -0
- package/dist/gestures/VelocityTracker.d.ts +51 -0
- package/dist/gestures/VelocityTracker.d.ts.map +1 -0
- package/dist/gestures/VelocityTracker.js +186 -0
- package/dist/gestures/geometry.d.ts +17 -0
- package/dist/gestures/geometry.d.ts.map +1 -0
- package/dist/gestures/geometry.js +55 -0
- package/dist/gestures/types.d.ts +139 -0
- package/dist/gestures/types.d.ts.map +1 -0
- package/dist/gestures/types.js +67 -0
- package/dist/hooks/AnnounceRenderedText.d.ts +17 -0
- package/dist/hooks/AnnounceRenderedText.d.ts.map +1 -0
- package/dist/hooks/AnnounceRenderedText.js +32 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts +41 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -0
- package/dist/hooks/ModalAnnounceProvider.js +133 -0
- package/dist/hooks/actionGroupTracker.d.ts +98 -0
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -0
- package/dist/hooks/actionGroupTracker.js +338 -0
- package/dist/hooks/index.d.ts +54 -52
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/modalAnnounce.d.ts +18 -0
- package/dist/hooks/modalAnnounce.d.ts.map +1 -0
- package/dist/hooks/modalAnnounce.js +382 -0
- package/dist/hooks/useAdaptivePresentation.d.ts +9 -1
- package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -1
- package/dist/hooks/useAdaptivePresentation.js +33 -8
- package/dist/hooks/useAnimatedLayout.d.ts +42 -0
- package/dist/hooks/useAnimatedLayout.d.ts.map +1 -0
- package/dist/hooks/useAnimatedLayout.js +46 -0
- package/dist/hooks/useAnnounce.d.ts +132 -1
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +356 -27
- package/dist/hooks/useAnnounceRenderedText.d.ts +19 -2
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +52 -11
- package/dist/hooks/useAutoMediaMode.d.ts +1 -1
- package/dist/hooks/useBusyAnnouncement.d.ts +9 -5
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +58 -46
- package/dist/hooks/useFocusTrap.d.ts +1 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +57 -26
- package/dist/hooks/useInputContainer.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts +3 -3
- package/dist/hooks/useMenuPress.d.ts +5 -3
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +58 -33
- package/dist/hooks/usePressFeedback.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +37 -5
- package/dist/i18n/InternationalizationContext.d.ts +2 -2
- package/dist/i18n/InternationalizationProvider.d.ts +1 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -0
- package/dist/i18n/index.d.ts +12 -12
- package/dist/i18n/resolve.d.ts +1 -1
- package/dist/i18n/useLocale.d.ts +1 -1
- package/dist/index.d.ts +111 -111
- package/dist/internal/tokenizer-presentation.d.ts +21 -0
- package/dist/internal/tokenizer-presentation.d.ts.map +1 -0
- package/dist/internal/tokenizer-presentation.js +21 -0
- package/dist/internal/touch.d.ts +26 -0
- package/dist/internal/touch.d.ts.map +1 -0
- package/dist/internal/touch.js +28 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts +33 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts.map +1 -0
- package/dist/motion/LayoutChangeSnapshot.js +37 -0
- package/dist/motion/animatedLayout.d.ts +94 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -0
- package/dist/motion/animatedLayout.js +1096 -0
- package/dist/motion/animator.d.ts +240 -0
- package/dist/motion/animator.d.ts.map +1 -0
- package/dist/motion/animator.js +2203 -0
- package/dist/motion/bezier.d.ts +18 -0
- package/dist/motion/bezier.d.ts.map +1 -0
- package/dist/motion/bezier.js +60 -0
- package/dist/motion/coast.d.ts +61 -0
- package/dist/motion/coast.d.ts.map +1 -0
- package/dist/motion/coast.js +107 -0
- package/dist/motion/decay.d.ts +41 -0
- package/dist/motion/decay.d.ts.map +1 -0
- package/dist/motion/decay.js +90 -0
- package/dist/motion/projection.d.ts +36 -0
- package/dist/motion/projection.d.ts.map +1 -0
- package/dist/motion/projection.js +92 -0
- package/dist/motion/reducedMotion.d.ts +25 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -0
- package/dist/motion/reducedMotion.js +85 -0
- package/dist/motion/reducedMotion.stylex.d.ts +19 -0
- package/dist/motion/reducedMotion.stylex.d.ts.map +1 -0
- package/dist/motion/reducedMotion.stylex.js +37 -0
- package/dist/motion/reducedMotionPlan.d.ts +89 -0
- package/dist/motion/reducedMotionPlan.d.ts.map +1 -0
- package/dist/motion/reducedMotionPlan.js +194 -0
- package/dist/motion/resolveSnapPoint.d.ts +52 -0
- package/dist/motion/resolveSnapPoint.d.ts.map +1 -0
- package/dist/motion/resolveSnapPoint.js +135 -0
- package/dist/motion/roleValue.d.ts +33 -0
- package/dist/motion/roleValue.d.ts.map +1 -0
- package/dist/motion/roleValue.js +84 -0
- package/dist/motion/roles.d.ts +79 -0
- package/dist/motion/roles.d.ts.map +1 -0
- package/dist/motion/roles.js +199 -0
- package/dist/motion/rubberBand.d.ts +20 -0
- package/dist/motion/rubberBand.d.ts.map +1 -0
- package/dist/motion/rubberBand.js +91 -0
- package/dist/motion/selectPage.d.ts +26 -0
- package/dist/motion/selectPage.d.ts.map +1 -0
- package/dist/motion/selectPage.js +55 -0
- package/dist/motion/spring.d.ts +193 -0
- package/dist/motion/spring.d.ts.map +1 -0
- package/dist/motion/spring.js +442 -0
- package/dist/motion/uikit/gestures.d.ts +642 -0
- package/dist/motion/uikit/gestures.d.ts.map +1 -0
- package/dist/motion/uikit/gestures.js +428 -0
- package/dist/motion/uikit/index.d.ts +24 -0
- package/dist/motion/uikit/index.d.ts.map +1 -0
- package/dist/motion/uikit/index.js +26 -0
- package/dist/motion/uikit/navigation.d.ts +54 -0
- package/dist/motion/uikit/navigation.d.ts.map +1 -0
- package/dist/motion/uikit/navigation.js +83 -0
- package/dist/motion/uikit/scroll.d.ts +116 -0
- package/dist/motion/uikit/scroll.d.ts.map +1 -0
- package/dist/motion/uikit/scroll.js +146 -0
- package/dist/motion/uikit/springs.d.ts +545 -0
- package/dist/motion/uikit/springs.d.ts.map +1 -0
- package/dist/motion/uikit/springs.js +548 -0
- package/dist/motion/uikit/timing.d.ts +202 -0
- package/dist/motion/uikit/timing.d.ts.map +1 -0
- package/dist/motion/uikit/timing.js +201 -0
- package/dist/reset.a11y.chromium.spec.js +1 -0
- package/dist/reset.until-found.a11y.browser.spec.js +1 -0
- package/dist/theme/Theme.d.ts +2 -2
- package/dist/theme/contrast.d.ts +1 -1
- package/dist/theme/declarationBoundary.d.ts +13 -0
- package/dist/theme/declarationBoundary.d.ts.map +1 -1
- package/dist/theme/declarationBoundary.js +264 -1
- package/dist/theme/defineTheme.d.ts +113 -22
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +66 -7
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +9 -0
- package/dist/theme/domainTokens/index.d.ts +6 -6
- package/dist/theme/generateThemeRules.d.ts +7 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +468 -24
- package/dist/theme/index.d.ts +31 -31
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/localTokens.d.ts +1 -1
- package/dist/theme/mergeComponents.d.ts +1 -1
- package/dist/theme/onMediaTokens.d.ts +1 -1
- package/dist/theme/resolveThemeValues.d.ts +7 -7
- package/dist/theme/statusColor.d.ts +48 -0
- package/dist/theme/statusColor.d.ts.map +1 -0
- package/dist/theme/statusColor.js +203 -0
- package/dist/theme/statusRoleDerivation.d.ts +11 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -0
- package/dist/theme/statusRoleDerivation.js +236 -0
- package/dist/theme/syntax/SyntaxTheme.d.ts +1 -1
- package/dist/theme/syntax/index.d.ts +7 -7
- package/dist/theme/syntax/presets.d.ts +1 -1
- package/dist/theme/themeAdaptations.d.ts +30 -6
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +30 -1
- package/dist/theme/themeRegistry.d.ts +1 -1
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +16 -1
- package/dist/theme/tokens.stylex.d.ts +40 -2
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +47 -2
- package/dist/theme/types.d.ts +1 -1
- package/dist/theme/useTheme.d.ts +6 -4
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +10 -4
- package/dist/utils/dateParser.d.ts +3 -3
- package/dist/utils/edgeAutoscroll.d.ts +53 -0
- package/dist/utils/edgeAutoscroll.d.ts.map +1 -0
- package/dist/utils/edgeAutoscroll.js +81 -0
- package/dist/utils/groupItems.d.ts +1 -1
- package/dist/utils/hitArea.d.ts +72 -0
- package/dist/utils/hitArea.d.ts.map +1 -0
- package/dist/utils/hitArea.js +681 -0
- package/dist/utils/index.d.ts +29 -29
- package/dist/utils/plainDate.d.ts +3 -3
- package/dist/utils/touchPresentation.d.ts +48 -0
- package/dist/utils/touchPresentation.d.ts.map +1 -0
- package/dist/utils/touchPresentation.js +133 -0
- package/locales/af-ZA.json +1 -1
- package/locales/ar-SA.json +1 -1
- package/locales/ca-ES.json +1 -1
- package/locales/cs-CZ.json +1 -1
- package/locales/da-DK.json +1 -1
- package/locales/de-DE.json +1 -1
- package/locales/el-GR.json +1 -1
- package/locales/en.json +132 -0
- package/locales/es-ES.json +1 -1
- package/locales/fi-FI.json +1 -1
- package/locales/fr-FR.json +1 -1
- package/locales/he-IL.json +1 -1
- package/locales/hu-HU.json +1 -1
- package/locales/it-IT.json +1 -1
- package/locales/ja-JP.json +1 -1
- package/locales/ko-KR.json +1 -1
- package/locales/nl-NL.json +1 -1
- package/locales/no-NO.json +1 -1
- package/locales/pl-PL.json +1 -1
- package/locales/pseudo.json +99 -0
- package/locales/pt-BR.json +1 -1
- package/locales/pt-PT.json +1 -1
- package/locales/ro-RO.json +1 -1
- package/locales/ru-RU.json +1 -1
- package/locales/sr-SP.json +1 -1
- package/locales/sv-SE.json +1 -1
- package/locales/tr-TR.json +1 -1
- package/locales/uk-UA.json +1 -1
- package/locales/vi-VN.json +1 -1
- package/locales/zh-CN.json +1 -1
- package/locales/zh-TW.json +1 -1
- package/package.json +61 -6
- package/src/AlertDialog/AlertDialog.tsx +1 -1
- package/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts +1 -0
- package/src/AppShell/AppShell.spec.md +337 -0
- package/src/AspectRatio/AspectRatio.spec.md +179 -0
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +1 -0
- package/src/Avatar/Avatar.spec.md +253 -0
- package/src/Avatar/AvatarStatusDot.spec.md +93 -79
- package/src/Avatar/AvatarStatusDot.test.tsx +22 -0
- package/src/Avatar/AvatarStatusDot.tsx +2 -2
- package/src/AvatarGroup/AvatarGroup.spec.md +205 -0
- package/src/AvatarGroup/AvatarGroupOverflow.spec.md +123 -120
- package/src/Badge/Badge.doc.mjs +2 -1
- package/src/Badge/Badge.spec.md +207 -0
- package/src/Badge/Badge.test.tsx +13 -0
- package/src/Badge/Badge.tsx +38 -2
- package/src/Banner/Banner.spec.md +38 -27
- package/src/Banner/Banner.test.tsx +118 -16
- package/src/Banner/Banner.tsx +94 -7
- package/src/Blockquote/Blockquote.spec.md +171 -0
- package/src/BottomSheet/BottomSheet.doc.mjs +106 -24
- package/src/BottomSheet/BottomSheet.spec.md +269 -40
- package/src/BottomSheet/BottomSheet.test.tsx +491 -5
- package/src/BottomSheet/BottomSheet.tsx +544 -145
- package/src/BottomSheet/BottomSheetHostContext.ts +44 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +21 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +166 -57
- package/src/BottomSheet/BottomSheetReplace.test.tsx +1526 -0
- package/src/BottomSheet/BottomSheetStacking.announce.test.tsx +246 -0
- package/src/BottomSheet/BottomSheetStacking.test.tsx +3184 -0
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +27 -31
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +138 -43
- package/src/BottomSheet/BottomSheetSwitcher.tsx +275 -26
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +6 -0
- package/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts +83 -0
- package/src/BottomSheet/bottomSheetEscape.ts +21 -0
- package/src/BottomSheet/bottomSheetStack.ts +2031 -0
- package/src/BottomSheet/useSheetGestures.ts +68 -12
- package/src/Breadcrumbs/BreadcrumbItem.spec.md +96 -59
- package/src/Breadcrumbs/BreadcrumbItem.tsx +5 -0
- package/src/Breadcrumbs/Breadcrumbs.spec.md +165 -0
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +22 -0
- package/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts +1 -0
- package/src/Button/Button.spec.md +322 -0
- package/src/Button/Button.test.tsx +8 -1
- package/src/Button/Button.tsx +36 -7
- package/src/Button/__tests__/Button.a11y.chromium.spec.ts +1 -0
- package/src/ButtonGroup/ButtonGroup.spec.md +218 -0
- package/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts +1 -0
- package/src/Card/Card.spec.md +205 -0
- package/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts +1 -0
- package/src/Chat/ChatComposer.test.tsx +54 -0
- package/src/Chat/ChatComposer.tsx +41 -27
- package/src/Chat/ChatComposerInput.test.tsx +165 -21
- package/src/Chat/ChatComposerInput.tsx +73 -16
- package/src/Chat/ChatMessageMetadata.tsx +1 -1
- package/src/Chat/ChatPastedTextToken.test.tsx +71 -0
- package/src/Chat/ChatPastedTextToken.tsx +8 -7
- package/src/Chat/ChatToolCalls.tsx +5 -5
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxInput/CheckboxInput.spec.md +97 -66
- package/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxList/CheckboxList.spec.md +92 -78
- package/src/CheckboxList/CheckboxListItem.spec.md +86 -60
- package/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts +1 -0
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -2
- package/src/ClickableCard/ClickableCard.test.tsx +14 -3
- package/src/ClickableCard/ClickableCard.tsx +44 -28
- package/src/Code/Code.spec.md +30 -32
- package/src/CodeBlock/CodeBlock.doc.mjs +21 -4
- package/src/CodeBlock/CodeBlock.spec.md +96 -61
- package/src/CodeBlock/CodeBlock.test.tsx +97 -1
- package/src/CodeBlock/CodeBlock.tsx +132 -22
- package/src/CodeBlock/CodeLanguage.test.tsx +173 -0
- package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +290 -0
- package/src/CodeBlock/__tests__/CodeBlockLanguages.a11y.chromium.spec.ts +64 -0
- package/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/grammar.ts +291 -0
- package/src/CodeBlock/index.ts +7 -0
- package/src/CodeBlock/languages/dockerfile.ts +43 -0
- package/src/CodeBlock/languages/graphql.ts +30 -0
- package/src/CodeBlock/languages/java.ts +28 -0
- package/src/CodeBlock/languages/lua.ts +21 -0
- package/src/CodeBlock/languages/objective-c.ts +26 -0
- package/src/CodeBlock/languages/powershell.ts +31 -0
- package/src/CodeBlock/languages/ruby.ts +29 -0
- package/src/CodeBlock/languages/thrift.ts +32 -0
- package/src/CodeBlock/languages/toml.ts +36 -0
- package/src/CodeBlock/languages.test.ts +402 -0
- package/src/CodeBlock/tokenizer.ts +176 -16
- package/src/CodeBlock/tokenizerBudget.test.ts +112 -0
- package/src/Collapsible/Collapsible.doc.mjs +6 -0
- package/src/Collapsible/Collapsible.spec.md +26 -23
- package/src/Collapsible/Collapsible.tsx +121 -2
- package/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/CommandPalette.perf.test.ts +8 -4
- package/src/CommandPalette/CommandPalette.tsx +17 -1
- package/src/CommandPalette/CommandPaletteEmpty.doc.mjs +6 -3
- package/src/CommandPalette/CommandPaletteEmpty.spec.md +190 -0
- package/src/CommandPalette/CommandPaletteEmpty.tsx +4 -0
- package/src/CommandPalette/CommandPaletteInput.tsx +21 -2
- package/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteEmptyAudit.a11y.chromium.spec.ts +715 -0
- package/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/busyStartSettle.ts +26 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +1 -1
- package/src/ComplexSelector/ComplexSelector.focusableDisabled.test.tsx +1 -1
- package/src/ComplexSelector/ComplexSelector.fr10.test.tsx +9 -9
- package/src/ComplexSelector/ComplexSelector.spec.md +161 -107
- package/src/ComplexSelector/ComplexSelector.test.tsx +236 -17
- package/src/ComplexSelector/ComplexSelector.tsx +69 -4
- package/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts +965 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +1 -1
- package/src/ContextMenu/ContextMenu.spec.md +38 -30
- package/src/ContextMenu/ContextMenu.test.tsx +189 -11
- package/src/ContextMenu/ContextMenu.tsx +75 -17
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts +117 -0
- package/src/DateInput/DateInput.tsx +9 -4
- package/src/DateInput/DateInputTouch.test.tsx +10 -1
- package/src/DateInput/NativeDateField.tsx +2 -1
- package/src/DateInput/TouchDateField.tsx +2 -1
- package/src/DateInput/Wheel.tsx +4 -1
- package/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts +171 -0
- package/src/Dialog/Dialog.doc.mjs +201 -47
- package/src/Dialog/Dialog.tsx +37 -10
- package/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts +191 -0
- package/src/Divider/Divider.spec.md +79 -70
- package/src/Drawer/Drawer.tsx +38 -35
- package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +1 -0
- package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/DropdownMenu.spec.md +14 -6
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +44 -8
- package/src/DropdownMenu/DropdownMenu.test.tsx +64 -5
- package/src/DropdownMenu/DropdownMenu.tsx +47 -21
- package/src/DropdownMenu/DropdownMenuItem.tsx +5 -5
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +226 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +32 -16
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +158 -0
- package/src/DropdownMenu/DropdownMenuSheetFirstOpen.test.tsx +72 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +9 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +225 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +105 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +6 -6
- package/src/DropdownMenu/MenuBottomSheet.tsx +42 -7
- package/src/DropdownMenu/MenuBottomSheetActionList.tsx +3 -3
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts +540 -0
- package/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts +671 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts +238 -0
- package/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +28 -2
- package/src/DropdownMenu/menuBottomSheet.stylex.ts +33 -0
- package/src/DropdownMenu/menuItemHover.ts +13 -1
- package/src/DropdownMenu/modules/useMenuPress.spec.md +90 -62
- package/src/DropdownMenu/useMenuDrillIn.tsx +7 -5
- package/src/EmptyState/EmptyState.announce.test.tsx +227 -0
- package/src/EmptyState/EmptyState.doc.mjs +1 -1
- package/src/EmptyState/EmptyState.spec.md +22 -14
- package/src/EmptyState/EmptyState.test.tsx +8 -8
- package/src/EmptyState/EmptyState.tsx +7 -5
- package/src/Field/Field.tsx +1 -1
- package/src/Field/FieldLabel.tsx +1 -1
- package/src/Field/PanelSearchInput.tsx +23 -13
- package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +1 -0
- package/src/Field/inputDisabledFocus.ts +28 -0
- package/src/Field/inputStyles.stylex.ts +15 -15
- package/src/FieldStatus/FieldStatus.test.tsx +12 -0
- package/src/FieldStatus/FieldStatus.tsx +12 -3
- package/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts +1 -0
- package/src/FileInput/FileInput.test.tsx +78 -0
- package/src/FileInput/FileInput.tsx +11 -9
- package/src/Heading/Heading.spec.md +198 -0
- package/src/HoverCard/HoverCard.test.tsx +93 -3
- package/src/Icon/Icon.doc.mjs +53 -5
- package/src/Icon/Icon.spec.md +40 -29
- package/src/Icon/Icon.test.tsx +266 -9
- package/src/Icon/Icon.tsx +51 -13
- package/src/Icon/IconSize.stylex.ts +27 -11
- package/src/Icon/globalIconRegistry.test.tsx +326 -3
- package/src/Icon/globalIconRegistry.tsx +137 -36
- package/src/Icon/index.ts +29 -1
- package/src/Icon/useIcon.ts +5 -1
- package/src/IconButton/IconButton.spec.md +197 -0
- package/src/IconButton/IconButton.test.tsx +5 -2
- package/src/InputGroup/InputGroup.spec.md +199 -0
- package/src/InputGroup/InputGroup.test.tsx +120 -0
- package/src/InputGroup/InputGroup.tsx +59 -52
- package/src/InputGroup/InputGroupInternalContext.ts +15 -0
- package/src/InputGroup/InputGroupText.spec.md +139 -0
- package/src/InputGroup/InputGroupText.tsx +2 -0
- package/src/InputGroup/groupStyles.ts +22 -11
- package/src/Item/Item.test.tsx +118 -0
- package/src/Item/Item.tsx +5 -3
- package/src/Item/ItemSwipeLayer.tsx +9 -0
- package/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts +1 -0
- package/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts +186 -0
- package/src/Item/useSwipeAction.ts +71 -5
- package/src/Kbd/Kbd.test.tsx +95 -0
- package/src/Kbd/Kbd.tsx +30 -23
- package/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts +176 -0
- package/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts +200 -0
- package/src/Layer/layerAnimations.stylex.ts +22 -2
- package/src/Layer/layerDismissalInvariants.test.tsx +9 -0
- package/src/Layer/layerSlideRules.ts +141 -8
- package/src/Layer/layerStack.ts +129 -62
- package/src/Layer/modalOutlet.ts +156 -15
- package/src/Layer/preserveAnimations.ts +304 -0
- package/src/Layer/useLayer.doc.mjs +1 -1
- package/src/Layer/useLayer.test.tsx +743 -0
- package/src/Layer/useLayer.tsx +592 -53
- package/src/Layer/useLayerDismissal.test.tsx +85 -2
- package/src/Layer/useLayerDismissal.ts +12 -9
- package/src/Layer/useTouchTrigger.ts +95 -41
- package/src/Layout/Layout.tsx +18 -0
- package/src/Layout/LayoutContent.tsx +5 -14
- package/src/Layout/LayoutFooter.tsx +2 -0
- package/src/Layout/LayoutHeader.tsx +2 -0
- package/src/Layout/__tests__/Layout.a11y.chromium.spec.ts +1 -0
- package/src/Layout/layoutEdges.stylex.ts +25 -0
- package/src/Lightbox/Lightbox.test.tsx +83 -0
- package/src/Lightbox/Lightbox.tsx +149 -125
- package/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts +78 -0
- package/src/Lightbox/LightboxViewport.a11y.browser.spec.ts +70 -0
- package/src/Link/Link.spec.md +229 -0
- package/src/Link/LinkProvider.spec.md +167 -0
- package/src/Link/__tests__/Link.a11y.chromium.spec.ts +1 -0
- package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +1 -0
- package/src/List/List.spec.md +90 -33
- package/src/List/ListItem.doc.mjs +3 -3
- package/src/Markdown/Markdown.codeLanguages.test.tsx +137 -0
- package/src/Markdown/Markdown.doc.mjs +12 -0
- package/src/Markdown/Markdown.fr23.bench.ts +3 -1
- package/src/Markdown/Markdown.fr23.perf.test.ts +45 -3
- package/src/Markdown/Markdown.fr23.sampling.ts +13 -4
- package/src/Markdown/Markdown.spec.md +71 -59
- package/src/Markdown/Markdown.tsx +32 -2
- package/src/Markdown/MarkdownTable.a11y.chromium.spec.ts +1 -0
- package/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/MobileNav.spec.md +161 -64
- package/src/MobileNav/MobileNav.test.tsx +27 -10
- package/src/MobileNav/MobileNav.tsx +51 -38
- package/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts +103 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -2
- package/src/MoreMenu/MoreMenu.spec.md +88 -53
- package/src/MultiSelector/CreateRow.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.test.tsx +122 -10
- package/src/MultiSelector/MultiSelector.tsx +24 -4
- package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts +1 -0
- package/src/NavIcon/NavIcon.spec.md +66 -38
- package/src/NavMenu/NavHeadingMenu.spec.md +100 -44
- package/src/NavMenu/NavHeadingMenu.test.tsx +199 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +54 -6
- package/src/NumberInput/NumberInput.doc.mjs +6 -6
- package/src/NumberInput/NumberInput.spec.md +248 -0
- package/src/NumberInput/NumberInput.test.tsx +187 -14
- package/src/NumberInput/NumberInput.tsx +86 -24
- package/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts +1 -0
- package/src/Pagination/Pagination.test.tsx +2 -2
- package/src/Popover/Popover.doc.mjs +38 -2
- package/src/Popover/Popover.spec.md +89 -10
- package/src/Popover/Popover.test.tsx +340 -2
- package/src/Popover/Popover.tsx +401 -35
- package/src/Popover/PopoverPresentation.test.tsx +952 -0
- package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +205 -0
- package/src/Popover/index.ts +5 -1
- package/src/Popover/lazyPopoverBottomSheet.ts +57 -0
- package/src/Popover/usePopover.tsx +11 -5
- package/src/PowerSearch/PowerSearch.spec.md +423 -53
- package/src/PowerSearch/PowerSearch.test.tsx +77 -1
- package/src/PowerSearch/PowerSearch.tsx +7 -5
- package/src/ProgressBar/ProgressBar.test.tsx +12 -0
- package/src/ProgressBar/ProgressBar.tsx +18 -0
- package/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts +1 -0
- package/src/RadioList/RadioList.test.tsx +34 -7
- package/src/RadioList/RadioListItem.press.source-build.test.mjs +80 -0
- package/src/RadioList/RadioListItem.tsx +26 -12
- package/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts +1 -0
- package/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts +1 -0
- package/src/ScrollableArea/ScrollableArea.spec.md +6 -5
- package/src/ScrollableArea/ScrollableArea.test.tsx +5 -0
- package/src/ScrollableArea/ScrollableArea.tsx +4 -0
- package/src/SelectableCard/SelectableCard.doc.mjs +7 -6
- package/src/SelectableCard/SelectableCard.test.tsx +11 -1
- package/src/SelectableCard/SelectableCard.tsx +49 -33
- package/src/Selector/Selector.spec.md +12 -4
- package/src/Selector/Selector.test.tsx +114 -8
- package/src/Selector/Selector.tsx +19 -4
- package/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts +1 -0
- package/src/SideNav/SideNav.spec.md +51 -30
- package/src/SideNav/SideNav.test.tsx +290 -25
- package/src/SideNav/SideNavCollapseButton.spec.md +161 -0
- package/src/SideNav/SideNavHeading.spec.md +219 -0
- package/src/SideNav/SideNavHeading.tsx +41 -0
- package/src/SideNav/SideNavItem.spec.md +246 -0
- package/src/SideNav/SideNavItem.tsx +40 -9
- package/src/SideNav/SideNavSection.spec.md +153 -0
- package/src/Skeleton/Skeleton.spec.md +99 -42
- package/src/Skeleton/Skeleton.test.tsx +108 -1
- package/src/Skeleton/Skeleton.tsx +30 -2
- package/src/Slider/Slider.test.tsx +172 -0
- package/src/Slider/Slider.tsx +60 -12
- package/src/Slider/__tests__/Slider.a11y.chromium.spec.ts +1 -0
- package/src/Spinner/Spinner.spec.md +231 -0
- package/src/StatusDot/StatusDot.spec.md +139 -51
- package/src/StatusDot/StatusDot.test.tsx +13 -0
- package/src/StatusDot/StatusDot.tsx +27 -0
- package/src/Stepper/Step.spec.md +206 -0
- package/src/Stepper/Step.tsx +19 -3
- package/src/Stepper/Stepper.test.tsx +50 -0
- package/src/Switch/Switch.focusRing.source-build.test.mjs +81 -0
- package/src/Switch/Switch.tsx +11 -9
- package/src/Switch/__tests__/Switch.a11y.chromium.spec.ts +1 -0
- package/src/Switch/switch.markers.stylex.ts +7 -2
- package/src/TabList/Tab.spec.md +201 -0
- package/src/TabList/Tab.tsx +7 -1
- package/src/TabList/TabList.doc.mjs +3 -3
- package/src/TabList/TabMenu.spec.md +196 -0
- package/src/TabList/TabMenu.tsx +2 -0
- package/src/TabList/__tests__/TabListOverflow.interaction.browser.spec.ts +99 -0
- package/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts +1 -0
- package/src/Table/Table.spec.md +54 -30
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +2 -0
- package/src/Table/__tests__/Table.a11y.chromium.spec.ts +129 -0
- package/src/Table/__tests__/Table.a11y.contracts.ts +35 -0
- package/src/Table/__tests__/Table.a11y.renders.tsx +112 -0
- package/src/Table/__tests__/Table.a11y.states.ts +140 -0
- package/src/Table/__tests__/Table.a11y.test.tsx +198 -0
- package/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableStickyDividers.a11y.browser.spec.ts +560 -0
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +23 -8
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +91 -9
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +120 -5
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.test.tsx +174 -0
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.ts +86 -0
- package/src/Table/plugins/sortable/useTableSortable.test.tsx +0 -12
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.test.tsx +51 -1
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +291 -12
- package/src/Table/rowDivider.ts +154 -0
- package/src/Text/Text.spec.md +114 -127
- package/src/TextArea/TextArea.doc.mjs +6 -6
- package/src/TextArea/TextArea.spec.md +164 -64
- package/src/TextArea/TextArea.test.tsx +65 -6
- package/src/TextArea/TextArea.tsx +27 -15
- package/src/TextInput/TextInput.doc.mjs +8 -8
- package/src/TextInput/TextInput.spec.md +258 -0
- package/src/TextInput/TextInput.test.tsx +83 -10
- package/src/TextInput/TextInput.tsx +46 -22
- package/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts +1 -0
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -2
- package/src/Thumbnail/Thumbnail.spec.md +244 -0
- package/src/Thumbnail/Thumbnail.test.tsx +120 -7
- package/src/Thumbnail/Thumbnail.tsx +77 -31
- package/src/TimeInput/TimeInput.spec.md +273 -0
- package/src/TimeInput/TimeInput.tsx +12 -4
- package/src/TimeInput/TouchTimeField.tsx +2 -1
- package/src/Timestamp/Timestamp.spec.md +252 -0
- package/src/Toast/ToastViewport.modalHost.test.tsx +630 -5
- package/src/Toast/ToastViewport.tsx +27 -2
- package/src/ToggleButton/ToggleButton.spec.md +256 -0
- package/src/ToggleButton/ToggleButtonGroup.spec.md +194 -0
- package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +1 -0
- package/src/Token/Token.spec.md +271 -0
- package/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts +1 -0
- package/src/Tokenizer/Tokenizer.props-type.test.tsx +126 -0
- package/src/Tokenizer/Tokenizer.spec.md +312 -71
- package/src/Tokenizer/Tokenizer.ssr.test.tsx +196 -0
- package/src/Tokenizer/Tokenizer.test.tsx +70 -16
- package/src/Tokenizer/Tokenizer.tsx +651 -113
- package/src/Tokenizer/TokenizerBottomSheet.test.tsx +2719 -0
- package/src/Tokenizer/TokenizerBottomSheet.tsx +957 -0
- package/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts +505 -0
- package/src/Tokenizer/useEndLaneReserve.ts +3 -2
- package/src/Toolbar/Toolbar.spec.md +101 -48
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/Tooltip.test.tsx +171 -3
- package/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/Tooltip.a11y.states.ts +2 -2
- package/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipTallContent.a11y.browser.spec.ts +646 -0
- package/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.ts +1162 -0
- package/src/Tooltip/useTooltip.tsx +7 -2
- package/src/TopNav/TopNav.spec.md +190 -0
- package/src/TopNav/TopNavHeading.spec.md +204 -0
- package/src/TopNav/TopNavItem.spec.md +189 -0
- package/src/TopNav/TopNavMegaMenu.reduced-motion.source-build.test.mjs +83 -0
- package/src/TopNav/TopNavMegaMenu.spec.md +190 -0
- package/src/TopNav/TopNavMegaMenu.tsx +21 -4
- package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +150 -0
- package/src/TopNav/TopNavMegaMenuItem.spec.md +155 -0
- package/src/TopNav/TopNavMenu.spec.md +195 -0
- package/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/TreeList.doc.mjs +13 -0
- package/src/TreeList/TreeList.spec.md +51 -35
- package/src/TreeList/TreeList.tsx +234 -2
- package/src/TreeList/TreeListItem.tsx +12 -2
- package/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts +1 -0
- package/src/Typeahead/BaseTypeahead.tsx +14 -2
- package/src/Typeahead/Typeahead.test.tsx +114 -1
- package/src/Typeahead/Typeahead.tsx +34 -16
- package/src/VisuallyHidden/VisuallyHidden.doc.mjs +1 -1
- package/src/VisuallyHidden/VisuallyHidden.spec.md +170 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +39 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +38 -5
- package/src/__tests__/BusyOwnerAnnouncement.test.tsx +66 -5
- package/src/__tests__/CardPress.a11y.chromium.spec.ts +353 -0
- package/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts +2 -1
- package/src/__tests__/PressedState.a11y.chromium.spec.ts +1 -0
- package/src/__tests__/pressState.ts +43 -1
- package/src/__tests__/unthemedLength.ts +34 -0
- package/src/gestures/GestureArena.ts +966 -0
- package/src/gestures/GestureRecognizer.ts +626 -0
- package/src/gestures/LongPressGestureRecognizer.ts +186 -0
- package/src/gestures/PanGestureRecognizer.ts +410 -0
- package/src/gestures/TapGestureRecognizer.ts +192 -0
- package/src/gestures/VelocityTracker.ts +194 -0
- package/src/gestures/__tests__/LongPressGestureRecognizer.test.ts +141 -0
- package/src/gestures/__tests__/PanGestureRecognizer.test.ts +327 -0
- package/src/gestures/__tests__/TapGestureRecognizer.test.ts +154 -0
- package/src/gestures/__tests__/VelocityTracker.test.ts +261 -0
- package/src/gestures/__tests__/arena.test.ts +824 -0
- package/src/gestures/__tests__/arenaContinuous.test.ts +207 -0
- package/src/gestures/__tests__/arenaTapLongPress.test.ts +211 -0
- package/src/gestures/__tests__/harness.ts +204 -0
- package/src/gestures/geometry.ts +55 -0
- package/src/gestures/types.ts +161 -0
- package/src/hooks/AnnounceRenderedText.tsx +27 -0
- package/src/hooks/ModalAnnounceProvider.tsx +155 -0
- package/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts +98 -4
- package/src/hooks/actionGroupTracker.exports.test.ts +28 -0
- package/src/hooks/actionGroupTracker.test.ts +510 -0
- package/src/hooks/actionGroupTracker.ts +449 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/modalAnnounce.ts +439 -0
- package/src/hooks/useAdaptivePresentation.ts +46 -9
- package/src/hooks/useAnimatedLayout.doc.mjs +101 -0
- package/src/hooks/useAnimatedLayout.ts +61 -0
- package/src/hooks/useAnnounce.doc.mjs +4 -4
- package/src/hooks/useAnnounce.modal.test.tsx +1291 -0
- package/src/hooks/useAnnounce.test.tsx +64 -4
- package/src/hooks/useAnnounce.ts +452 -28
- package/src/hooks/useAnnounceRenderedText.adopters.test.tsx +226 -0
- package/src/hooks/useAnnounceRenderedText.ts +81 -11
- package/src/hooks/useBusyAnnouncement.adopters.test.tsx +69 -0
- package/src/hooks/useBusyAnnouncement.test.tsx +112 -0
- package/src/hooks/useBusyAnnouncement.ts +64 -54
- package/src/hooks/useFocusTrap.doc.mjs +3 -3
- package/src/hooks/useFocusTrap.test.tsx +135 -2
- package/src/hooks/useFocusTrap.ts +59 -27
- package/src/hooks/useMenuPress.doc.mjs +2 -2
- package/src/hooks/useMenuPress.test.tsx +5 -2
- package/src/hooks/useMenuPress.ts +72 -37
- package/src/hooks/useScrollableArea.test.tsx +159 -0
- package/src/hooks/useScrollableArea.ts +39 -5
- package/src/i18n/generated-locales/en.generated.ts +35 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +37 -0
- package/src/internal/tokenizer-presentation.test.ts +29 -0
- package/src/internal/tokenizer-presentation.ts +25 -0
- package/src/internal/touch.test.ts +44 -0
- package/src/internal/touch.ts +41 -0
- package/src/motion/LayoutChangeSnapshot.tsx +50 -0
- package/src/motion/MEASUREMENTS.md +271 -0
- package/src/motion/README.md +218 -0
- package/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts +1507 -0
- package/src/motion/__tests__/animatedLayoutAdopters.interaction.browser.spec.ts +217 -0
- package/src/motion/__tests__/animatedLayoutBundle.ts +17 -0
- package/src/motion/animatedLayout.boundary.test.ts +139 -0
- package/src/motion/animatedLayout.test.ts +965 -0
- package/src/motion/animatedLayout.ts +1322 -0
- package/src/motion/animatedLayoutAdopters.test.tsx +500 -0
- package/src/motion/animator.test.ts +2653 -0
- package/src/motion/animator.ts +2794 -0
- package/src/motion/bezier.test.ts +52 -0
- package/src/motion/bezier.ts +64 -0
- package/src/motion/coast.test.ts +99 -0
- package/src/motion/coast.ts +150 -0
- package/src/motion/decay.test.ts +120 -0
- package/src/motion/decay.ts +126 -0
- package/src/motion/projection.test.ts +107 -0
- package/src/motion/projection.ts +116 -0
- package/src/motion/reducedMotion.stylex.ts +41 -0
- package/src/motion/reducedMotion.test.ts +129 -0
- package/src/motion/reducedMotion.ts +94 -0
- package/src/motion/reducedMotionPlan.test.ts +182 -0
- package/src/motion/reducedMotionPlan.ts +263 -0
- package/src/motion/resolveSnapPoint.test.ts +189 -0
- package/src/motion/resolveSnapPoint.ts +169 -0
- package/src/motion/roleValue.ts +105 -0
- package/src/motion/roles.test.ts +256 -0
- package/src/motion/roles.ts +262 -0
- package/src/motion/rubberBand.test.ts +88 -0
- package/src/motion/rubberBand.ts +115 -0
- package/src/motion/selectPage.test.ts +31 -0
- package/src/motion/selectPage.ts +55 -0
- package/src/motion/spring.test.ts +650 -0
- package/src/motion/spring.ts +551 -0
- package/src/motion/uikit/gestures.test.ts +89 -0
- package/src/motion/uikit/gestures.ts +359 -0
- package/src/motion/uikit/index.ts +80 -0
- package/src/motion/uikit/navigation.ts +83 -0
- package/src/motion/uikit/scroll.ts +141 -0
- package/src/motion/uikit/springRows.test.ts +71 -0
- package/src/motion/uikit/springs.ts +514 -0
- package/src/motion/uikit/timing.ts +210 -0
- package/src/motion/uikit/uikit.test.ts +364 -0
- package/src/motion/uikit/values.test.ts +110 -0
- package/src/reset.a11y.chromium.spec.ts +1 -0
- package/src/reset.until-found.a11y.browser.spec.ts +1 -0
- package/src/serverSafeComponents.test.ts +10 -0
- package/src/tailwind-theme.css +51 -1
- package/src/tailwind-theme.test.ts +51 -0
- package/src/theme/Theme.test.tsx +28 -0
- package/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts +1 -0
- package/src/theme/declarationBoundary.ts +282 -1
- package/src/theme/defineTheme.test.ts +529 -12
- package/src/theme/defineTheme.ts +175 -19
- package/src/theme/derivedVarRegistry.test.ts +28 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/expandMotionScale.test.ts +17 -0
- package/src/theme/generateThemeRules.ts +772 -35
- package/src/theme/index.ts +3 -0
- package/src/theme/onMediaTokens.test.ts +186 -0
- package/src/theme/statusColor.ts +189 -0
- package/src/theme/statusRoleDerivation.ts +289 -0
- package/src/theme/themeAdaptations.test.ts +412 -0
- package/src/theme/themeAdaptations.ts +43 -1
- package/src/theme/tokens.stylex.ts +31 -2
- package/src/theme/tokens.test.ts +96 -1
- package/src/theme/tokens.ts +23 -1
- package/src/theme/useTheme.ts +10 -4
- package/src/utils/customPropertyArmLayering.test.ts +131 -0
- package/src/utils/edgeAutoscroll.test.ts +192 -0
- package/src/utils/edgeAutoscroll.ts +111 -0
- package/src/utils/hitArea.test.ts +628 -0
- package/src/utils/hitArea.ts +770 -0
- package/src/utils/touchPresentation.test.ts +323 -0
- package/src/utils/touchPresentation.ts +153 -0
|
@@ -0,0 +1,1507 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file animatedLayout.interaction.browser.spec.ts
|
|
5
|
+
* @input The animated-layout module bundled with esbuild onto fixture pages
|
|
6
|
+
* written inline, real Chromium and WebKit (the interaction projects: a
|
|
7
|
+
* phone with a coarse pointer) plus a fine-pointer describe
|
|
8
|
+
* @output One proof per `spec:AST-105` Coverage row, and FR2–FR4: which
|
|
9
|
+
* elements glide after a reported size change, by how much, on one shared
|
|
10
|
+
* start and spring, never past the area and never scrolling it; nothing
|
|
11
|
+
* without a handle; Reduce Motion by pointer
|
|
12
|
+
* @position Real-browser verification of `spec:AST-105` and
|
|
13
|
+
* `architecture:react-component-runtime` INV12
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import {fileURLToPath} from 'node:url';
|
|
17
|
+
import {expect, test, type Page} from '@playwright/test';
|
|
18
|
+
import {build} from 'esbuild';
|
|
19
|
+
import type * as Bundle from './animatedLayoutBundle';
|
|
20
|
+
|
|
21
|
+
/** One animation on an element: its first frame and its timing. */
|
|
22
|
+
interface MotionRead {
|
|
23
|
+
first: string | null;
|
|
24
|
+
opacity: string | null;
|
|
25
|
+
composite: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
startTime: number | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare global {
|
|
31
|
+
interface Window {
|
|
32
|
+
AnimatedLayout: typeof Bundle;
|
|
33
|
+
/** Runs one reported change; resolves after the glide is set up. */
|
|
34
|
+
change: (options: {
|
|
35
|
+
changed: string;
|
|
36
|
+
mutate: string;
|
|
37
|
+
area?: string;
|
|
38
|
+
handle?: boolean;
|
|
39
|
+
}) => Promise<void>;
|
|
40
|
+
/** Animations on an element: their first transform and timing. */
|
|
41
|
+
motionOf: (selector: string) => MotionRead[];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let script = '';
|
|
46
|
+
|
|
47
|
+
test.beforeAll(async () => {
|
|
48
|
+
const result = await build({
|
|
49
|
+
entryPoints: [
|
|
50
|
+
fileURLToPath(new URL('./animatedLayoutBundle.ts', import.meta.url)),
|
|
51
|
+
],
|
|
52
|
+
bundle: true,
|
|
53
|
+
write: false,
|
|
54
|
+
format: 'iife',
|
|
55
|
+
globalName: 'AnimatedLayout',
|
|
56
|
+
target: 'es2022',
|
|
57
|
+
});
|
|
58
|
+
script = result.outputFiles[0].text;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const BASE_STYLE = `
|
|
62
|
+
html, body { margin: 0; font: 14px sans-serif; background: #fff; }
|
|
63
|
+
.area { position: relative; height: 560px; overflow: auto; }
|
|
64
|
+
.row { height: 40px; margin: 0 0 4px; background: #eef; }
|
|
65
|
+
.grow { height: 0; overflow: hidden; background: #fd9; }
|
|
66
|
+
.grow.open { height: 80px; }
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
const HELPERS = `
|
|
70
|
+
window.change = async ({changed, mutate, area = '#area', handle = true}) => {
|
|
71
|
+
const container = document.querySelector(area);
|
|
72
|
+
const target = document.querySelector(changed);
|
|
73
|
+
const layout = handle
|
|
74
|
+
? AnimatedLayout.createAnimatedLayout(() => container)
|
|
75
|
+
: null;
|
|
76
|
+
const report = AnimatedLayout.reportLayoutChange(layout, () => target);
|
|
77
|
+
report.measureBefore();
|
|
78
|
+
new Function(mutate)();
|
|
79
|
+
report.animate();
|
|
80
|
+
AnimatedLayout.playLayoutChange(layout, target);
|
|
81
|
+
await new Promise(resolve => queueMicrotask(resolve));
|
|
82
|
+
};
|
|
83
|
+
window.motionOf = selector => {
|
|
84
|
+
const element = document.querySelector(selector);
|
|
85
|
+
return element.getAnimations({subtree: false}).map(animation => {
|
|
86
|
+
const effect = animation.effect;
|
|
87
|
+
const frames = effect.getKeyframes();
|
|
88
|
+
const timing = effect.getTiming();
|
|
89
|
+
return {
|
|
90
|
+
first: frames[0].translate ?? frames[0].transform ?? null,
|
|
91
|
+
opacity: frames[0].opacity == null ? null : String(frames[0].opacity),
|
|
92
|
+
composite: effect.composite,
|
|
93
|
+
duration: Number(timing.duration),
|
|
94
|
+
startTime: animation.startTime == null ? null : Number(animation.startTime),
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
async function open(page: Page, body: string, style = '') {
|
|
101
|
+
const html = `<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
102
|
+
<style>${BASE_STYLE}${style}</style>
|
|
103
|
+
${body}
|
|
104
|
+
<script>${script}</script>
|
|
105
|
+
<script>${HELPERS}</script>`;
|
|
106
|
+
await page.route('http://layout.test/', async route =>
|
|
107
|
+
route.fulfill({contentType: 'text/html', body: html}),
|
|
108
|
+
);
|
|
109
|
+
await page.goto('http://layout.test/');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const OPEN_GROW = `document.querySelector('#grow').classList.add('open')`;
|
|
113
|
+
|
|
114
|
+
/** Reports one change from the test (its options cross into the page). */
|
|
115
|
+
async function change(
|
|
116
|
+
page: Page,
|
|
117
|
+
options: {
|
|
118
|
+
changed?: string;
|
|
119
|
+
mutate?: string;
|
|
120
|
+
area?: string;
|
|
121
|
+
handle?: boolean;
|
|
122
|
+
} = {},
|
|
123
|
+
) {
|
|
124
|
+
await page.evaluate(async o => window.change(o), {
|
|
125
|
+
changed: '#grow',
|
|
126
|
+
mutate: OPEN_GROW,
|
|
127
|
+
...options,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Until every animation on the page has finished. */
|
|
132
|
+
async function settle(page: Page) {
|
|
133
|
+
await expect
|
|
134
|
+
.poll(async () => page.evaluate(() => document.getAnimations().length), {
|
|
135
|
+
timeout: 5000,
|
|
136
|
+
})
|
|
137
|
+
.toBe(0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** The translate an animation starts from, in px. */
|
|
141
|
+
function startOffset(first: string | null): {x: number; y: number} {
|
|
142
|
+
// The browser shortens `-80px 0px` to `-80px`.
|
|
143
|
+
const match = /^(-?[\d.e+-]+)px(?:\s+(-?[\d.e+-]+)px)?/.exec(first ?? '');
|
|
144
|
+
return match == null
|
|
145
|
+
? {x: 0, y: 0}
|
|
146
|
+
: {x: Number(match[1]), y: match[2] == null ? 0 : Number(match[2])};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
test.describe('spec:AST-105 Coverage', () => {
|
|
150
|
+
test('normal-flow siblings at each ancestor level glide, and nothing past the area moves', async ({
|
|
151
|
+
page,
|
|
152
|
+
}) => {
|
|
153
|
+
await open(
|
|
154
|
+
page,
|
|
155
|
+
`<div id="area" class="area">
|
|
156
|
+
<section id="l1">
|
|
157
|
+
<div id="l2">
|
|
158
|
+
<div id="l3"><div id="grow" class="grow"></div><div id="s3" class="row"></div></div>
|
|
159
|
+
<div id="s2" class="row"></div>
|
|
160
|
+
</div>
|
|
161
|
+
<div id="s1" class="row"></div>
|
|
162
|
+
</section>
|
|
163
|
+
<div id="s0" class="row"></div>
|
|
164
|
+
</div>
|
|
165
|
+
<div id="outside" class="row"></div>`,
|
|
166
|
+
);
|
|
167
|
+
await change(page);
|
|
168
|
+
for (const id of ['#s3', '#s2', '#s1', '#s0']) {
|
|
169
|
+
const [motion] = await page.evaluate(s => window.motionOf(s), id);
|
|
170
|
+
expect(motion, id).toBeDefined();
|
|
171
|
+
expect(startOffset(motion.first).y, id).toBeCloseTo(-80, 0);
|
|
172
|
+
expect(motion.composite, id).toBe('replace');
|
|
173
|
+
}
|
|
174
|
+
expect(await page.evaluate(() => window.motionOf('#outside'))).toEqual([]);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('a display: contents wrapper has no box: its children glide in its place', async ({
|
|
178
|
+
page,
|
|
179
|
+
}) => {
|
|
180
|
+
await open(
|
|
181
|
+
page,
|
|
182
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
183
|
+
<div id="wrap" style="display: contents"><div id="c1" class="row"></div><div id="c2" class="row"></div></div></div>`,
|
|
184
|
+
);
|
|
185
|
+
await change(page);
|
|
186
|
+
expect(await page.evaluate(() => window.motionOf('#wrap'))).toEqual([]);
|
|
187
|
+
for (const id of ['#c1', '#c2']) {
|
|
188
|
+
expect(await page.evaluate(s => window.motionOf(s), id)).toHaveLength(1);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
test('absolute and fixed elements take their final place; an absolute badge rides with its row', async ({
|
|
193
|
+
page,
|
|
194
|
+
}) => {
|
|
195
|
+
await open(
|
|
196
|
+
page,
|
|
197
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
198
|
+
<div id="row" class="row" style="position: relative"><span id="badge" style="position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; background: #c00"></span></div>
|
|
199
|
+
<div id="abs" style="position: absolute; top: 200px; left: 0; width: 40px; height: 40px; background: #0c0"></div>
|
|
200
|
+
<div id="fixed" style="position: fixed; bottom: 0; right: 0; width: 40px; height: 40px; background: #00c"></div></div>`,
|
|
201
|
+
);
|
|
202
|
+
const before = await page.locator('#badge').boundingBox();
|
|
203
|
+
await change(page);
|
|
204
|
+
expect(await page.evaluate(() => window.motionOf('#abs'))).toEqual([]);
|
|
205
|
+
expect(await page.evaluate(() => window.motionOf('#fixed'))).toEqual([]);
|
|
206
|
+
expect(await page.evaluate(() => window.motionOf('#badge'))).toEqual([]);
|
|
207
|
+
// Halfway through, the row and its badge are between the two places.
|
|
208
|
+
await page.evaluate(() => {
|
|
209
|
+
for (const animation of document
|
|
210
|
+
.querySelector<HTMLElement>('#row')
|
|
211
|
+
?.getAnimations() ?? []) {
|
|
212
|
+
animation.pause();
|
|
213
|
+
animation.currentTime = 60;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
const mid = await page.locator('#badge').boundingBox();
|
|
217
|
+
expect(mid?.y ?? 0).toBeGreaterThan(before?.y ?? 0);
|
|
218
|
+
expect(mid?.y ?? 0).toBeLessThan((before?.y ?? 0) + 80);
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
test('a sticky element glides while unstuck and stays put while stuck', async ({
|
|
222
|
+
page,
|
|
223
|
+
}) => {
|
|
224
|
+
// Both headers come after the change; the first is stuck at the area's
|
|
225
|
+
// top, the second is still in flow below. No scroll anchoring, so content
|
|
226
|
+
// after a change above the fold moves.
|
|
227
|
+
await open(
|
|
228
|
+
page,
|
|
229
|
+
`<div id="area" class="area" style="overflow-anchor: none">
|
|
230
|
+
<div id="grow" class="grow"></div>
|
|
231
|
+
${'<div class="row"></div>'.repeat(2)}
|
|
232
|
+
<div id="stuck" style="position: sticky; top: 0; height: 30px; background: #ccf"></div>
|
|
233
|
+
${'<div class="row"></div>'.repeat(10)}
|
|
234
|
+
<div id="unstuck" style="position: sticky; top: 0; height: 30px; background: #fcc"></div>
|
|
235
|
+
${'<div class="row"></div>'.repeat(20)}
|
|
236
|
+
</div>`,
|
|
237
|
+
);
|
|
238
|
+
const stuckTop = await page.evaluate(() => {
|
|
239
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
240
|
+
area.scrollTop = 300;
|
|
241
|
+
const top = area.getBoundingClientRect().top;
|
|
242
|
+
return (
|
|
243
|
+
(document.querySelector('#stuck')?.getBoundingClientRect().top ?? 0) -
|
|
244
|
+
top
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
// Precondition: the first header is stuck at the top.
|
|
248
|
+
expect(stuckTop).toBeCloseTo(0, 0);
|
|
249
|
+
await change(page);
|
|
250
|
+
expect(await page.evaluate(() => window.motionOf('#stuck'))).toEqual([]);
|
|
251
|
+
const [unstuck] = await page.evaluate(() => window.motionOf('#unstuck'));
|
|
252
|
+
expect(startOffset(unstuck.first).y).toBeCloseTo(-80, 0);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
test('a float after the change glides', async ({page}) => {
|
|
256
|
+
await open(
|
|
257
|
+
page,
|
|
258
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
259
|
+
<div id="float" style="float: left; width: 60px; height: 60px; background: #9c9"></div></div>`,
|
|
260
|
+
);
|
|
261
|
+
await change(page);
|
|
262
|
+
expect(await page.evaluate(() => window.motionOf('#float'))).toHaveLength(
|
|
263
|
+
1,
|
|
264
|
+
);
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
test('flex items: an item that wraps glides, a row-direction neighbor whose rectangle does not change stays', async ({
|
|
268
|
+
page,
|
|
269
|
+
}) => {
|
|
270
|
+
await open(
|
|
271
|
+
page,
|
|
272
|
+
`<div id="area" class="area">
|
|
273
|
+
<div style="display: flex; flex-wrap: wrap; gap: 4px; width: 200px">
|
|
274
|
+
<div id="chip" style="width: 40px; height: 24px; background: #fd9"></div>
|
|
275
|
+
<div id="t1" style="width: 60px; height: 24px; background: #ddd"></div>
|
|
276
|
+
<div id="t2" style="width: 60px; height: 24px; background: #ddd"></div>
|
|
277
|
+
</div>
|
|
278
|
+
<div style="display: flex; align-items: flex-start; gap: 8px">
|
|
279
|
+
<div id="tall" style="width: 40px; height: 30px; background: #fd9"></div>
|
|
280
|
+
<div id="neighbor" style="width: 40px; height: 30px; background: #9cf"></div>
|
|
281
|
+
</div>
|
|
282
|
+
<div id="below" class="row"></div>
|
|
283
|
+
</div>`,
|
|
284
|
+
);
|
|
285
|
+
// The first chip widens: the last item wraps to a new line and glides.
|
|
286
|
+
const t2Before = await page.evaluate(
|
|
287
|
+
() => document.querySelector('#t2')?.getBoundingClientRect().top ?? 0,
|
|
288
|
+
);
|
|
289
|
+
await change(page, {
|
|
290
|
+
changed: '#chip',
|
|
291
|
+
mutate: `document.querySelector('#chip').style.width = '120px'`,
|
|
292
|
+
});
|
|
293
|
+
const t2After = await page.evaluate(
|
|
294
|
+
() => document.querySelector('#t2')?.getBoundingClientRect().top ?? 0,
|
|
295
|
+
);
|
|
296
|
+
const [wrapped] = await page.evaluate(() => window.motionOf('#t2'));
|
|
297
|
+
expect(wrapped).toBeDefined();
|
|
298
|
+
// It wrapped: its layout moved down a line, and it starts where it was.
|
|
299
|
+
expect(startOffset(wrapped.first).y).toBeLessThan(-20);
|
|
300
|
+
// A round trip after the change: it has barely left its old place.
|
|
301
|
+
expect(Math.abs(t2After - t2Before)).toBeLessThan(4);
|
|
302
|
+
await settle(page);
|
|
303
|
+
// An item grows taller: its row-direction neighbor keeps its rectangle and
|
|
304
|
+
// stays; the content after the row glides.
|
|
305
|
+
await change(page, {
|
|
306
|
+
changed: '#tall',
|
|
307
|
+
mutate: `document.querySelector('#tall').style.height = '110px'`,
|
|
308
|
+
});
|
|
309
|
+
expect(await page.evaluate(() => window.motionOf('#neighbor'))).toEqual([]);
|
|
310
|
+
const [below] = await page.evaluate(() => window.motionOf('#below'));
|
|
311
|
+
expect(startOffset(below.first).y).toBeCloseTo(-80, 0);
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
test('hidden, display: none and zero-size elements are skipped', async ({
|
|
315
|
+
page,
|
|
316
|
+
}) => {
|
|
317
|
+
await open(
|
|
318
|
+
page,
|
|
319
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
320
|
+
<div id="hidden" class="row" style="visibility: hidden"></div>
|
|
321
|
+
<div id="none" class="row" style="display: none"></div>
|
|
322
|
+
<div id="empty" style="height: 0"></div>
|
|
323
|
+
<div id="after" class="row"></div></div>`,
|
|
324
|
+
);
|
|
325
|
+
await change(page);
|
|
326
|
+
for (const id of ['#hidden', '#none', '#empty']) {
|
|
327
|
+
expect(await page.evaluate(s => window.motionOf(s), id), id).toEqual([]);
|
|
328
|
+
}
|
|
329
|
+
expect(await page.evaluate(() => window.motionOf('#after'))).toHaveLength(
|
|
330
|
+
1,
|
|
331
|
+
);
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
test('elements outside the visible part land without animation', async ({
|
|
335
|
+
page,
|
|
336
|
+
}) => {
|
|
337
|
+
await open(
|
|
338
|
+
page,
|
|
339
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
340
|
+
${Array.from({length: 40}, (_, i) => `<div id="r${i}" class="row"></div>`).join('')}</div>`,
|
|
341
|
+
);
|
|
342
|
+
await change(page);
|
|
343
|
+
expect(await page.evaluate(() => window.motionOf('#r0'))).toHaveLength(1);
|
|
344
|
+
// Far below the fold before and after.
|
|
345
|
+
expect(await page.evaluate(() => window.motionOf('#r39'))).toEqual([]);
|
|
346
|
+
// A change above the fold, out of sight: the changed element plays nothing.
|
|
347
|
+
await settle(page);
|
|
348
|
+
await page.evaluate(() => {
|
|
349
|
+
(document.querySelector('#area') as HTMLElement).scrollTop = 1200;
|
|
350
|
+
});
|
|
351
|
+
await change(page, {
|
|
352
|
+
changed: '#r2',
|
|
353
|
+
mutate: `document.querySelector('#r2').style.height = '120px'`,
|
|
354
|
+
});
|
|
355
|
+
expect(await page.evaluate(() => window.motionOf('#r2'))).toEqual([]);
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
test('a row under a scaled panel moves by its layout change, corrected for the scale', async ({
|
|
359
|
+
page,
|
|
360
|
+
}) => {
|
|
361
|
+
await open(
|
|
362
|
+
page,
|
|
363
|
+
`<div id="area" class="area"><div style="transform: scale(0.5); transform-origin: 0 0">
|
|
364
|
+
<div id="grow" class="grow"></div><div id="scaled" class="row"></div></div></div>`,
|
|
365
|
+
);
|
|
366
|
+
await change(page);
|
|
367
|
+
const [motion] = await page.evaluate(() => window.motionOf('#scaled'));
|
|
368
|
+
// 80 px of layout: 40 px on screen, translated in the panel's own space.
|
|
369
|
+
expect(startOffset(motion.first).y).toBeCloseTo(-80, 0);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
test('top-layer content is never moved', async ({page}) => {
|
|
373
|
+
await open(
|
|
374
|
+
page,
|
|
375
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
376
|
+
<div class="row"></div><div id="pop" popover>menu</div></div>`,
|
|
377
|
+
);
|
|
378
|
+
await page.evaluate(() =>
|
|
379
|
+
(document.querySelector('#pop') as HTMLElement).showPopover(),
|
|
380
|
+
);
|
|
381
|
+
await change(page);
|
|
382
|
+
expect(await page.evaluate(() => window.motionOf('#pop'))).toEqual([]);
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
test('an element already moving keeps its motion and adds the new move: no jump, no lost speed', async ({
|
|
386
|
+
page,
|
|
387
|
+
}) => {
|
|
388
|
+
await open(
|
|
389
|
+
page,
|
|
390
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
391
|
+
<div id="second" class="grow"></div><div id="after" class="row"></div></div>`,
|
|
392
|
+
);
|
|
393
|
+
await change(page);
|
|
394
|
+
await page.waitForTimeout(100);
|
|
395
|
+
const [first] = await page.evaluate(() => window.motionOf('#after'));
|
|
396
|
+
// The row's on-screen speed over the frame before the second change and
|
|
397
|
+
// the frame after it, and its place either side of the change.
|
|
398
|
+
const run = await page.evaluate(async mutate => {
|
|
399
|
+
const row = document.querySelector('#after') as HTMLElement;
|
|
400
|
+
const frame = async () =>
|
|
401
|
+
new Promise<number>(resolve => requestAnimationFrame(resolve));
|
|
402
|
+
const t0 = await frame();
|
|
403
|
+
const y0 = row.getBoundingClientRect().top;
|
|
404
|
+
const t1 = await frame();
|
|
405
|
+
const y1 = row.getBoundingClientRect().top;
|
|
406
|
+
await window.change({changed: '#second', mutate});
|
|
407
|
+
const y1After = row.getBoundingClientRect().top;
|
|
408
|
+
const t2 = await frame();
|
|
409
|
+
const y2 = row.getBoundingClientRect().top;
|
|
410
|
+
return {
|
|
411
|
+
before: (y1 - y0) / (t1 - t0),
|
|
412
|
+
after: (y2 - y1After) / (t2 - t1),
|
|
413
|
+
y1,
|
|
414
|
+
y1After,
|
|
415
|
+
};
|
|
416
|
+
}, `document.querySelector('#second').classList.add('open')`);
|
|
417
|
+
const motions = await page.evaluate(() => window.motionOf('#after'));
|
|
418
|
+
expect(motions).toHaveLength(1);
|
|
419
|
+
expect(motions[0].composite).toBe('replace');
|
|
420
|
+
expect(motions[0].startTime).not.toBe(first.startTime);
|
|
421
|
+
expect(run.y1After).toBeCloseTo(run.y1, 0);
|
|
422
|
+
// Still gliding down at least as fast: the new move adds to the motion.
|
|
423
|
+
expect(run.before).toBeGreaterThan(0);
|
|
424
|
+
expect(run.after).toBeGreaterThan(run.before * 0.9);
|
|
425
|
+
// It still lands where layout put it: 160 px below where it began.
|
|
426
|
+
await settle(page);
|
|
427
|
+
const landed = await page.evaluate(() => {
|
|
428
|
+
const area = document.querySelector('#area')?.getBoundingClientRect();
|
|
429
|
+
const row = document.querySelector('#after')?.getBoundingClientRect();
|
|
430
|
+
return (row?.top ?? 0) - (area?.top ?? 0);
|
|
431
|
+
});
|
|
432
|
+
expect(landed).toBeCloseTo(160, 0);
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
test('nested areas: motion stops at the inner area; an inner area moves as one unit', async ({
|
|
436
|
+
page,
|
|
437
|
+
}) => {
|
|
438
|
+
await open(
|
|
439
|
+
page,
|
|
440
|
+
`<div id="area" class="area"><div id="outerGrow" class="grow"></div>
|
|
441
|
+
<div id="inner" style="height: 200px; overflow: auto"><div id="grow" class="grow"></div><div id="innerAfter" class="row"></div></div>
|
|
442
|
+
<div id="outerAfter" class="row"></div></div>`,
|
|
443
|
+
);
|
|
444
|
+
await change(page, {area: '#inner'});
|
|
445
|
+
expect(
|
|
446
|
+
await page.evaluate(() => window.motionOf('#innerAfter')),
|
|
447
|
+
).toHaveLength(1);
|
|
448
|
+
expect(await page.evaluate(() => window.motionOf('#outerAfter'))).toEqual(
|
|
449
|
+
[],
|
|
450
|
+
);
|
|
451
|
+
await settle(page);
|
|
452
|
+
await change(page, {
|
|
453
|
+
changed: '#outerGrow',
|
|
454
|
+
mutate: `document.querySelector('#outerGrow').classList.add('open')`,
|
|
455
|
+
});
|
|
456
|
+
expect(await page.evaluate(() => window.motionOf('#inner'))).toHaveLength(
|
|
457
|
+
1,
|
|
458
|
+
);
|
|
459
|
+
expect(
|
|
460
|
+
(await page.evaluate(() => window.motionOf('#innerAfter'))).length,
|
|
461
|
+
).toBe(0);
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
test.describe('architecture:react-component-runtime INV12', () => {
|
|
466
|
+
test('a 10-level by 50-sibling tree on a throttled phone: one move per follower, none inside a subtree, none past the area, no height', async ({
|
|
467
|
+
page,
|
|
468
|
+
browserName,
|
|
469
|
+
}) => {
|
|
470
|
+
if (browserName === 'chromium') {
|
|
471
|
+
const cdp = await page.context().newCDPSession(page);
|
|
472
|
+
await cdp.send('Emulation.setCPUThrottlingRate', {rate: 4});
|
|
473
|
+
}
|
|
474
|
+
// Level k holds the path to the changed element plus 49 rows, each with
|
|
475
|
+
// a child of its own (a subtree the walk must not enter).
|
|
476
|
+
const level = (depth: number): string => {
|
|
477
|
+
const rows = Array.from(
|
|
478
|
+
{length: 49},
|
|
479
|
+
() =>
|
|
480
|
+
`<div class="sib" data-depth="${depth}" style="height: 2px"><i class="inner" style="display: block; height: 1px"></i></div>`,
|
|
481
|
+
).join('');
|
|
482
|
+
const inner =
|
|
483
|
+
depth === 9
|
|
484
|
+
? '<div id="g1" class="grow"></div><div id="g2" class="grow"></div>'
|
|
485
|
+
: level(depth + 1);
|
|
486
|
+
return `<div class="lvl">${inner}</div>${rows}`;
|
|
487
|
+
};
|
|
488
|
+
await open(
|
|
489
|
+
page,
|
|
490
|
+
`<div id="area" class="area" style="height: 700px">${level(0)}</div>
|
|
491
|
+
<div id="outside" class="row"></div>`,
|
|
492
|
+
);
|
|
493
|
+
// Two changes in one frame, read in the same task: on a throttled page a
|
|
494
|
+
// second round trip can outlast the glide.
|
|
495
|
+
const report = await page.evaluate(async () => {
|
|
496
|
+
const area = document.querySelector('#area');
|
|
497
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
498
|
+
const one = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
499
|
+
document.querySelector('#g1'),
|
|
500
|
+
);
|
|
501
|
+
const two = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
502
|
+
document.querySelector('#g2'),
|
|
503
|
+
);
|
|
504
|
+
one.measureBefore();
|
|
505
|
+
two.measureBefore();
|
|
506
|
+
document.querySelector('#g1')?.classList.add('open');
|
|
507
|
+
document.querySelector('#g2')?.classList.add('open');
|
|
508
|
+
one.animate();
|
|
509
|
+
two.animate();
|
|
510
|
+
await new Promise<void>(resolve => {
|
|
511
|
+
queueMicrotask(resolve);
|
|
512
|
+
});
|
|
513
|
+
const animations = document.getAnimations();
|
|
514
|
+
const targets = animations.map(
|
|
515
|
+
a => (a.effect as KeyframeEffect).target as Element,
|
|
516
|
+
);
|
|
517
|
+
return {
|
|
518
|
+
total: animations.length,
|
|
519
|
+
distinct: new Set(targets).size,
|
|
520
|
+
intoSubtree: targets.filter(t => t.classList.contains('inner')).length,
|
|
521
|
+
pastArea: targets.filter(t => t.id === 'outside').length,
|
|
522
|
+
animatesHeight: animations.some(a =>
|
|
523
|
+
(a.effect as KeyframeEffect)
|
|
524
|
+
.getKeyframes()
|
|
525
|
+
.some(f => 'height' in f || 'top' in f),
|
|
526
|
+
),
|
|
527
|
+
followers: targets.filter(t => t.classList.contains('sib')).length,
|
|
528
|
+
};
|
|
529
|
+
});
|
|
530
|
+
expect(report.followers).toBeGreaterThan(0);
|
|
531
|
+
expect(report.distinct).toBe(report.total);
|
|
532
|
+
expect(report.intoSubtree).toBe(0);
|
|
533
|
+
expect(report.pastArea).toBe(0);
|
|
534
|
+
expect(report.animatesHeight).toBe(false);
|
|
535
|
+
});
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
test.describe('spec:AST-105 FR2–FR4', () => {
|
|
539
|
+
const PAGE = `<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
540
|
+
<div id="a" class="row"></div><div id="b" class="row"></div>
|
|
541
|
+
${'<div class="row"></div>'.repeat(30)}</div>`;
|
|
542
|
+
|
|
543
|
+
test('without a handle nothing animates (FR2)', async ({page}) => {
|
|
544
|
+
await open(page, PAGE);
|
|
545
|
+
await change(page, {handle: false});
|
|
546
|
+
for (const id of ['#grow', '#a', '#b']) {
|
|
547
|
+
expect(await page.evaluate(s => window.motionOf(s), id), id).toEqual([]);
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
test('two changes in one frame move each element once, by its total change (FR3)', async ({
|
|
552
|
+
page,
|
|
553
|
+
}) => {
|
|
554
|
+
await open(
|
|
555
|
+
page,
|
|
556
|
+
`<div id="area" class="area"><div id="g1" class="grow"></div><div id="g2" class="grow"></div><div id="after" class="row"></div></div>`,
|
|
557
|
+
);
|
|
558
|
+
await page.evaluate(async () => {
|
|
559
|
+
const area = document.querySelector('#area');
|
|
560
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
561
|
+
const one = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
562
|
+
document.querySelector('#g1'),
|
|
563
|
+
);
|
|
564
|
+
const two = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
565
|
+
document.querySelector('#g2'),
|
|
566
|
+
);
|
|
567
|
+
one.measureBefore();
|
|
568
|
+
two.measureBefore();
|
|
569
|
+
document.querySelector<HTMLElement>('#g1')?.classList.add('open');
|
|
570
|
+
document.querySelector<HTMLElement>('#g2')?.classList.add('open');
|
|
571
|
+
one.animate();
|
|
572
|
+
two.animate();
|
|
573
|
+
await new Promise<void>(resolve => {
|
|
574
|
+
queueMicrotask(resolve);
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
const motions = await page.evaluate(() => window.motionOf('#after'));
|
|
578
|
+
expect(motions).toHaveLength(1);
|
|
579
|
+
expect(startOffset(motions[0].first).y).toBeCloseTo(-160, 0);
|
|
580
|
+
// The second changed element, pushed down by the first, moves with its
|
|
581
|
+
// row from its old place.
|
|
582
|
+
const [second] = await page.evaluate(() => window.motionOf('#g2'));
|
|
583
|
+
expect(startOffset(second.first).y).toBeCloseTo(-80, 0);
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
test('nested changes compose whichever is reported first: a row inside a moving folder moves only by its own change (FR3)', async ({
|
|
587
|
+
page,
|
|
588
|
+
}) => {
|
|
589
|
+
await open(
|
|
590
|
+
page,
|
|
591
|
+
`<div id="area" class="area"><div id="a" class="grow"></div>
|
|
592
|
+
<div id="folder"><div id="inner" class="grow"></div><div id="row" class="row"></div></div>
|
|
593
|
+
<div id="after" class="row"></div></div>`,
|
|
594
|
+
);
|
|
595
|
+
await page.evaluate(async () => {
|
|
596
|
+
const area = document.querySelector('#area');
|
|
597
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
598
|
+
// The inner change is reported first.
|
|
599
|
+
const inner = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
600
|
+
document.querySelector('#inner'),
|
|
601
|
+
);
|
|
602
|
+
const outer = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
603
|
+
document.querySelector('#a'),
|
|
604
|
+
);
|
|
605
|
+
inner.measureBefore();
|
|
606
|
+
outer.measureBefore();
|
|
607
|
+
document.querySelector<HTMLElement>('#inner')?.classList.add('open');
|
|
608
|
+
document.querySelector<HTMLElement>('#a')?.classList.add('open');
|
|
609
|
+
inner.animate();
|
|
610
|
+
outer.animate();
|
|
611
|
+
await new Promise<void>(resolve => {
|
|
612
|
+
queueMicrotask(resolve);
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
const [folder] = await page.evaluate(() => window.motionOf('#folder'));
|
|
616
|
+
const [row] = await page.evaluate(() => window.motionOf('#row'));
|
|
617
|
+
const [after] = await page.evaluate(() => window.motionOf('#after'));
|
|
618
|
+
// The folder moves by the first change; the row inside it by the inner
|
|
619
|
+
// one alone; what follows by both.
|
|
620
|
+
expect(startOffset(folder.first).y).toBeCloseTo(-80, 0);
|
|
621
|
+
expect(startOffset(row.first).y).toBeCloseTo(-80, 0);
|
|
622
|
+
expect(startOffset(after.first).y).toBeCloseTo(-160, 0);
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
for (const row of [
|
|
626
|
+
{
|
|
627
|
+
name: 'a centered row',
|
|
628
|
+
justify: 'center',
|
|
629
|
+
items: ['before', 'changed', 'after'],
|
|
630
|
+
// The row grows by 80 px: an item before moves left by half of it.
|
|
631
|
+
expectX: 40,
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: 'a space-between row',
|
|
635
|
+
justify: 'space-between',
|
|
636
|
+
items: ['first', 'before', 'changed', 'last'],
|
|
637
|
+
// Four items: the gaps shrink by a third of the growth each.
|
|
638
|
+
expectX: 80 / 3,
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
name: 'an end-aligned row',
|
|
642
|
+
justify: 'flex-end',
|
|
643
|
+
items: ['before', 'changed'],
|
|
644
|
+
expectX: 80,
|
|
645
|
+
},
|
|
646
|
+
]) {
|
|
647
|
+
test(`an earlier sibling ${row.name} moves glides from its old place (spec:AST-105 Coverage)`, async ({
|
|
648
|
+
page,
|
|
649
|
+
}) => {
|
|
650
|
+
await open(
|
|
651
|
+
page,
|
|
652
|
+
`<div id="area" class="area"><div style="display: flex; justify-content: ${row.justify}; gap: 8px">
|
|
653
|
+
${row.items
|
|
654
|
+
.map(
|
|
655
|
+
id =>
|
|
656
|
+
`<div id="${id}" style="width: 60px; height: 24px; flex: none; background: #ddd"></div>`,
|
|
657
|
+
)
|
|
658
|
+
.join('')}
|
|
659
|
+
</div></div>`,
|
|
660
|
+
);
|
|
661
|
+
await change(page, {
|
|
662
|
+
changed: '#changed',
|
|
663
|
+
mutate: `document.querySelector('#changed').style.width = '140px'`,
|
|
664
|
+
});
|
|
665
|
+
const [motion] = await page.evaluate(() => window.motionOf('#before'));
|
|
666
|
+
expect(motion).toBeDefined();
|
|
667
|
+
expect(startOffset(motion.first).x).toBeCloseTo(row.expectX, 0);
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
test('an earlier sibling that order places after the change glides from its old place (spec:AST-105 Coverage)', async ({
|
|
672
|
+
page,
|
|
673
|
+
}) => {
|
|
674
|
+
await open(
|
|
675
|
+
page,
|
|
676
|
+
`<div id="area" class="area"><div style="display: flex; gap: 8px">
|
|
677
|
+
<div id="ordered" style="order: 1; width: 60px; height: 24px; flex: none; background: #ddd"></div>
|
|
678
|
+
<div id="changed" style="width: 60px; height: 24px; flex: none; background: #ddd"></div>
|
|
679
|
+
</div></div>`,
|
|
680
|
+
);
|
|
681
|
+
await change(page, {
|
|
682
|
+
changed: '#changed',
|
|
683
|
+
mutate: `document.querySelector('#changed').style.width = '140px'`,
|
|
684
|
+
});
|
|
685
|
+
const [motion] = await page.evaluate(() => window.motionOf('#ordered'));
|
|
686
|
+
expect(motion).toBeDefined();
|
|
687
|
+
// First in the DOM, laid out after the change: it starts 80 px back.
|
|
688
|
+
expect(startOffset(motion.first).x).toBeCloseTo(-80, 0);
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
for (const position of ['absolute', 'fixed']) {
|
|
692
|
+
test(`a ${position} ancestor of the change takes its final place (spec:AST-105 Coverage)`, async ({
|
|
693
|
+
page,
|
|
694
|
+
}) => {
|
|
695
|
+
await open(
|
|
696
|
+
page,
|
|
697
|
+
`<div id="area" class="area">
|
|
698
|
+
<div id="anchored" style="position: ${position}; left: 0; bottom: 0; width: 300px">
|
|
699
|
+
<div id="grow" class="grow"></div><div class="row"></div>
|
|
700
|
+
</div>
|
|
701
|
+
</div>`,
|
|
702
|
+
);
|
|
703
|
+
await change(page);
|
|
704
|
+
// Anchored at its bottom, it grows upward: its top moves, yet it never
|
|
705
|
+
// glides.
|
|
706
|
+
expect(await page.evaluate(() => window.motionOf('#anchored'))).toEqual(
|
|
707
|
+
[],
|
|
708
|
+
);
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
test('inside a positioned ancestor only the content after the change moves: the header before it and the card around it take their final place (spec:AST-105 Coverage)', async ({
|
|
713
|
+
page,
|
|
714
|
+
}) => {
|
|
715
|
+
await open(
|
|
716
|
+
page,
|
|
717
|
+
`<div id="area" class="area">
|
|
718
|
+
<div style="position: absolute; left: 0; right: 0; bottom: 0">
|
|
719
|
+
<div id="header" class="row"></div>
|
|
720
|
+
<div id="card" style="padding: 8px; background: #eee"><div id="trigger" class="row"></div><div id="grow" class="grow"></div></div>
|
|
721
|
+
<div id="footer" class="row"></div>
|
|
722
|
+
</div>
|
|
723
|
+
</div>`,
|
|
724
|
+
);
|
|
725
|
+
await change(page);
|
|
726
|
+
// Docked at the bottom, the panel rises as the content opens, and
|
|
727
|
+
// everything around the change takes its place at once with it, so no
|
|
728
|
+
// gap opens and the revealing content never covers what is above it.
|
|
729
|
+
for (const id of ['#header', '#card', '#trigger']) {
|
|
730
|
+
expect(await page.evaluate(s => window.motionOf(s), id), id).toEqual([]);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
test('a stuck sticky footer around the change stays at the area edge (spec:AST-105 Coverage, FR7)', async ({
|
|
735
|
+
page,
|
|
736
|
+
}) => {
|
|
737
|
+
await open(
|
|
738
|
+
page,
|
|
739
|
+
`<div id="area" class="area">${Array.from(
|
|
740
|
+
{length: 30},
|
|
741
|
+
() => '<div class="row"></div>',
|
|
742
|
+
).join(
|
|
743
|
+
'',
|
|
744
|
+
)}<div id="footer" style="position: sticky; bottom: 0; background: #ccc"><div id="grow" class="grow"></div><div class="row"></div></div></div>`,
|
|
745
|
+
);
|
|
746
|
+
await change(page);
|
|
747
|
+
expect(await page.evaluate(() => window.motionOf('#footer'))).toEqual([]);
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
for (const reduce of [false, true]) {
|
|
751
|
+
test(`a change above the visible part inside a wrapper: with scroll anchoring the rows in view and their wrapper stay put${reduce ? ' under Reduce Motion' : ''} (FR3)`, async ({
|
|
752
|
+
page,
|
|
753
|
+
}) => {
|
|
754
|
+
if (reduce) {
|
|
755
|
+
await page.emulateMedia({reducedMotion: 'reduce'});
|
|
756
|
+
}
|
|
757
|
+
await open(
|
|
758
|
+
page,
|
|
759
|
+
`<div id="area" class="area"><div id="wrapper"><div id="grow" class="grow"></div>${Array.from(
|
|
760
|
+
{length: 1000},
|
|
761
|
+
(_, i) => `<div id="r${i}" class="row"></div>`,
|
|
762
|
+
).join('')}</div></div>`,
|
|
763
|
+
);
|
|
764
|
+
const result = await page.evaluate(async () => {
|
|
765
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
766
|
+
area.scrollTop = 4200;
|
|
767
|
+
const inView = document.querySelector('#r95') as HTMLElement;
|
|
768
|
+
const before = inView.getBoundingClientRect().top;
|
|
769
|
+
await window.change({
|
|
770
|
+
changed: '#grow',
|
|
771
|
+
mutate: `document.querySelector('#grow').classList.add('open')`,
|
|
772
|
+
});
|
|
773
|
+
const wrapper = document.querySelector('#wrapper') as HTMLElement;
|
|
774
|
+
const moving = [wrapper, ...wrapper.children].filter(
|
|
775
|
+
element => element.getAnimations().length > 0,
|
|
776
|
+
).length;
|
|
777
|
+
const shown = inView.getBoundingClientRect().top;
|
|
778
|
+
document.getAnimations().forEach(animation => animation.finish());
|
|
779
|
+
return {moving, before, shown};
|
|
780
|
+
});
|
|
781
|
+
// The browser keeps the rows in view where they were; nothing glides
|
|
782
|
+
// or fades, the wrapper around them included.
|
|
783
|
+
expect(result.moving).toBe(0);
|
|
784
|
+
expect(Math.abs(result.shown - result.before)).toBeLessThan(1);
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
test('a change above the view in a panel the page scrolls: with the page anchoring its scroll, the rows in view and their wrapper stay put (FR3)', async ({
|
|
789
|
+
page,
|
|
790
|
+
}) => {
|
|
791
|
+
await open(
|
|
792
|
+
page,
|
|
793
|
+
`<div id="area"><div id="wrapper"><div id="grow" class="grow"></div>${Array.from(
|
|
794
|
+
{length: 1000},
|
|
795
|
+
(_, i) => `<div id="r${i}" class="row"></div>`,
|
|
796
|
+
).join('')}</div></div>`,
|
|
797
|
+
);
|
|
798
|
+
const result = await page.evaluate(async () => {
|
|
799
|
+
window.scrollTo(0, 4200);
|
|
800
|
+
const inView = document.querySelector('#r95') as HTMLElement;
|
|
801
|
+
const before = inView.getBoundingClientRect().top;
|
|
802
|
+
await window.change({
|
|
803
|
+
changed: '#grow',
|
|
804
|
+
mutate: `document.querySelector('#grow').classList.add('open')`,
|
|
805
|
+
});
|
|
806
|
+
const wrapper = document.querySelector('#wrapper') as HTMLElement;
|
|
807
|
+
const moving = [wrapper, ...wrapper.children].filter(
|
|
808
|
+
element => element.getAnimations().length > 0,
|
|
809
|
+
).length;
|
|
810
|
+
const shown = inView.getBoundingClientRect().top;
|
|
811
|
+
document.getAnimations().forEach(animation => animation.finish());
|
|
812
|
+
return {moving, before, shown};
|
|
813
|
+
});
|
|
814
|
+
expect(result.moving).toBe(0);
|
|
815
|
+
expect(Math.abs(result.shown - result.before)).toBeLessThan(1);
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
test('a sticky footer stuck to the viewport in a panel the page scrolls stays at the edge (FR7)', async ({
|
|
819
|
+
page,
|
|
820
|
+
}) => {
|
|
821
|
+
await open(
|
|
822
|
+
page,
|
|
823
|
+
`<div id="area">${Array.from(
|
|
824
|
+
{length: 60},
|
|
825
|
+
() => '<div class="row"></div>',
|
|
826
|
+
).join(
|
|
827
|
+
'',
|
|
828
|
+
)}<div id="footer" style="position: sticky; bottom: 0; background: #ccc"><div id="grow" class="grow"></div><div class="row"></div></div>${Array.from(
|
|
829
|
+
{length: 60},
|
|
830
|
+
() => '<div class="row"></div>',
|
|
831
|
+
).join('')}</div>`,
|
|
832
|
+
);
|
|
833
|
+
await page.evaluate(() => window.scrollTo(0, 200));
|
|
834
|
+
await change(page);
|
|
835
|
+
expect(await page.evaluate(() => window.motionOf('#footer'))).toEqual([]);
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
test('in a multi-column list the rows of a later column glide too (spec:AST-105 Coverage)', async ({
|
|
839
|
+
page,
|
|
840
|
+
}) => {
|
|
841
|
+
await open(
|
|
842
|
+
page,
|
|
843
|
+
`<div id="area" class="area"><div id="list" style="columns: 2; column-gap: 8px">${[
|
|
844
|
+
'<div id="grow" class="grow"></div>',
|
|
845
|
+
...Array.from(
|
|
846
|
+
{length: 120},
|
|
847
|
+
(_, i) =>
|
|
848
|
+
`<div id="c${i}" class="row" style="break-inside: avoid"></div>`,
|
|
849
|
+
),
|
|
850
|
+
].join('')}</div></div>`,
|
|
851
|
+
);
|
|
852
|
+
await change(page);
|
|
853
|
+
const moving = await page.evaluate(
|
|
854
|
+
() =>
|
|
855
|
+
[...document.querySelectorAll('#list > .row')].filter(
|
|
856
|
+
row => row.getAnimations().length > 0,
|
|
857
|
+
).length,
|
|
858
|
+
);
|
|
859
|
+
// Every row shifts one slot along the columns; the rows in view glide,
|
|
860
|
+
// the second column's included, though they come past the band in DOM
|
|
861
|
+
// order.
|
|
862
|
+
expect(moving).toBeGreaterThanOrEqual(20);
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
test('in a dialog re-centered as it grows, the header and trigger before the change stay with their card (FR3)', async ({
|
|
866
|
+
page,
|
|
867
|
+
}) => {
|
|
868
|
+
await open(
|
|
869
|
+
page,
|
|
870
|
+
`<div style="position: fixed; inset: 0; display: flex; align-items: center; justify-content: center">
|
|
871
|
+
<div id="area" style="width: 320px; background: #fff; border: 1px solid #999">
|
|
872
|
+
<div id="header" class="row"></div>
|
|
873
|
+
<div id="card" style="padding: 8px; background: #eee"><div id="trigger" class="row"></div><div id="grow" class="grow"></div></div>
|
|
874
|
+
</div>
|
|
875
|
+
</div>`,
|
|
876
|
+
);
|
|
877
|
+
await change(page);
|
|
878
|
+
// The dialog rises by half the opening at once; what is before the
|
|
879
|
+
// change in it rises with it, never over the opening content.
|
|
880
|
+
for (const id of ['#header', '#card', '#trigger']) {
|
|
881
|
+
expect(await page.evaluate(s => window.motionOf(s), id), id).toEqual([]);
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
test('a sticky footer stuck to the viewport stays at the edge when the body sets an overflow (FR7)', async ({
|
|
886
|
+
page,
|
|
887
|
+
}) => {
|
|
888
|
+
await open(
|
|
889
|
+
page,
|
|
890
|
+
`<div id="area">${Array.from(
|
|
891
|
+
{length: 60},
|
|
892
|
+
() => '<div class="row"></div>',
|
|
893
|
+
).join(
|
|
894
|
+
'',
|
|
895
|
+
)}<div id="footer" style="position: sticky; bottom: 0; background: #ccc"><div id="grow" class="grow"></div><div class="row"></div></div>${Array.from(
|
|
896
|
+
{length: 60},
|
|
897
|
+
() => '<div class="row"></div>',
|
|
898
|
+
).join('')}</div>`,
|
|
899
|
+
'body { overflow-x: hidden; }',
|
|
900
|
+
);
|
|
901
|
+
await page.evaluate(() => window.scrollTo(0, 200));
|
|
902
|
+
await change(page);
|
|
903
|
+
expect(await page.evaluate(() => window.motionOf('#footer'))).toEqual([]);
|
|
904
|
+
});
|
|
905
|
+
|
|
906
|
+
test('closing an item above the view while opening one in view, in one frame: the rows the browser keeps in place stay put (FR3)', async ({
|
|
907
|
+
page,
|
|
908
|
+
}) => {
|
|
909
|
+
await open(
|
|
910
|
+
page,
|
|
911
|
+
`<div id="area" class="area"><div id="shut" style="height: 344px; overflow: hidden; background: #fd9"></div>${Array.from(
|
|
912
|
+
{length: 30},
|
|
913
|
+
(_, i) =>
|
|
914
|
+
i === 14
|
|
915
|
+
? '<div id="grow" class="grow"></div>'
|
|
916
|
+
: `<div id="q${i}" class="row"></div>`,
|
|
917
|
+
).join('')}</div>`,
|
|
918
|
+
);
|
|
919
|
+
const result = await page.evaluate(async () => {
|
|
920
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
921
|
+
area.scrollTop = 395;
|
|
922
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
923
|
+
const shut = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
924
|
+
document.querySelector('#shut'),
|
|
925
|
+
);
|
|
926
|
+
const grow = window.AnimatedLayout.reportLayoutChange(layout, () =>
|
|
927
|
+
document.querySelector('#grow'),
|
|
928
|
+
);
|
|
929
|
+
shut.measureBefore();
|
|
930
|
+
grow.measureBefore();
|
|
931
|
+
(document.querySelector('#shut') as HTMLElement).style.height = '0px';
|
|
932
|
+
document.querySelector('#grow')?.classList.add('open');
|
|
933
|
+
shut.animate();
|
|
934
|
+
grow.animate();
|
|
935
|
+
await new Promise<void>(resolve => {
|
|
936
|
+
queueMicrotask(resolve);
|
|
937
|
+
});
|
|
938
|
+
// The rows in view before the opening one: anchoring keeps them still.
|
|
939
|
+
return [5, 6, 7, 8, 9].map(
|
|
940
|
+
i => document.querySelector(`#q${i}`)?.getAnimations().length ?? -1,
|
|
941
|
+
);
|
|
942
|
+
});
|
|
943
|
+
expect(result).toEqual([0, 0, 0, 0, 0]);
|
|
944
|
+
});
|
|
945
|
+
|
|
946
|
+
for (const anchoring of ['auto', 'none']) {
|
|
947
|
+
test(`a change above the band with scroll anchoring ${anchoring === 'auto' ? 'on' : 'off'}: ${anchoring === 'auto' ? 'the rows in view stay put and the walk stops' : 'the rows in view glide'} (FR3)`, async ({
|
|
948
|
+
page,
|
|
949
|
+
}) => {
|
|
950
|
+
await open(
|
|
951
|
+
page,
|
|
952
|
+
`<div id="area" class="area" style="overflow-anchor: ${anchoring}"><div id="grow" class="grow"></div>${Array.from(
|
|
953
|
+
{length: 1000},
|
|
954
|
+
(_, i) => `<div id="r${i}" class="row"></div>`,
|
|
955
|
+
).join('')}</div>`,
|
|
956
|
+
);
|
|
957
|
+
const result = await page.evaluate(async () => {
|
|
958
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
959
|
+
area.scrollTop = 3600 + 600;
|
|
960
|
+
const firstInView = document.querySelector('#r95') as HTMLElement;
|
|
961
|
+
const before = firstInView.getBoundingClientRect().top;
|
|
962
|
+
await window.change({
|
|
963
|
+
changed: '#grow',
|
|
964
|
+
mutate: `document.querySelector('#grow').classList.add('open')`,
|
|
965
|
+
});
|
|
966
|
+
const moving = [...area.children].filter(
|
|
967
|
+
row => row.getAnimations().length > 0,
|
|
968
|
+
).length;
|
|
969
|
+
document.getAnimations().forEach(animation => animation.finish());
|
|
970
|
+
return {moving, before, after: firstInView.getBoundingClientRect().top};
|
|
971
|
+
});
|
|
972
|
+
if (anchoring === 'auto') {
|
|
973
|
+
// The browser keeps the rows in view where they were: nothing moves.
|
|
974
|
+
expect(result.moving).toBe(0);
|
|
975
|
+
expect(Math.abs(result.after - result.before)).toBeLessThan(1);
|
|
976
|
+
} else {
|
|
977
|
+
// They shift down 80 px, and glide there.
|
|
978
|
+
expect(result.moving).toBeGreaterThanOrEqual(12);
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
test('in a centered column an unstuck sticky card around the change glides with the content before it (spec:AST-105 Coverage)', async ({
|
|
984
|
+
page,
|
|
985
|
+
}) => {
|
|
986
|
+
await open(
|
|
987
|
+
page,
|
|
988
|
+
`<div id="area" class="area"><div style="display: flex; flex-direction: column; justify-content: center; min-height: 400px">
|
|
989
|
+
<div id="above" class="row"></div>
|
|
990
|
+
<div id="card" style="position: sticky; top: 0; background: #eee"><div id="grow" class="grow"></div><div class="row"></div></div>
|
|
991
|
+
<div class="row"></div>
|
|
992
|
+
</div></div>`,
|
|
993
|
+
);
|
|
994
|
+
await change(page);
|
|
995
|
+
const [above] = await page.evaluate(() => window.motionOf('#above'));
|
|
996
|
+
const [card] = await page.evaluate(() => window.motionOf('#card'));
|
|
997
|
+
// Not stuck, the card is in flow: it rises with the row above it, so
|
|
998
|
+
// that row never crosses it.
|
|
999
|
+
expect(above).toBeDefined();
|
|
1000
|
+
expect(card).toBeDefined();
|
|
1001
|
+
expect(startOffset(card.first).y).toBeCloseTo(
|
|
1002
|
+
startOffset(above.first).y,
|
|
1003
|
+
0,
|
|
1004
|
+
);
|
|
1005
|
+
});
|
|
1006
|
+
|
|
1007
|
+
test('in a centered column the card around the change glides with the content before it, so nothing slides over the opening content (spec:AST-105 Coverage)', async ({
|
|
1008
|
+
page,
|
|
1009
|
+
}) => {
|
|
1010
|
+
await open(
|
|
1011
|
+
page,
|
|
1012
|
+
`<div id="area" class="area"><div style="display: flex; flex-direction: column; justify-content: center; min-height: 400px">
|
|
1013
|
+
<div id="before" class="row" style="margin: 0"></div>
|
|
1014
|
+
<div id="card" style="padding: 8px; background: #eef"><div id="title" style="height: 24px">Title</div><div id="changed" style="height: 0"></div></div>
|
|
1015
|
+
<div id="after" class="row" style="margin: 0"></div></div></div>`,
|
|
1016
|
+
);
|
|
1017
|
+
await change(page, {
|
|
1018
|
+
changed: '#changed',
|
|
1019
|
+
mutate: `document.querySelector('#changed').style.height = '120px'`,
|
|
1020
|
+
});
|
|
1021
|
+
const card = await page.evaluate(() => window.motionOf('#card'));
|
|
1022
|
+
const before = await page.evaluate(() => window.motionOf('#before'));
|
|
1023
|
+
const title = await page.evaluate(() => window.motionOf('#title'));
|
|
1024
|
+
// The card and the row above it glide up together from their old place;
|
|
1025
|
+
// the title inside the card rides with it.
|
|
1026
|
+
expect(startOffset(card[0].first).y).toBeCloseTo(60, 0);
|
|
1027
|
+
expect(startOffset(before[0].first).y).toBeCloseTo(60, 0);
|
|
1028
|
+
expect(title).toEqual([]);
|
|
1029
|
+
});
|
|
1030
|
+
|
|
1031
|
+
test('in a long list the walk reads only the rows near the visible part, and rows a tall collapse pulls up into view glide in (FR3)', async ({
|
|
1032
|
+
page,
|
|
1033
|
+
}) => {
|
|
1034
|
+
await open(
|
|
1035
|
+
page,
|
|
1036
|
+
`<div id="area" class="area" style="overflow-anchor: none">
|
|
1037
|
+
${'<div class="row" style="margin: 0"></div>'.repeat(1000)}
|
|
1038
|
+
<div id="tall" style="height: 1200px; background: #fd9"></div>
|
|
1039
|
+
${Array.from({length: 1000}, (_, i) => `<div id="r${i}" class="row" style="margin: 0"></div>`).join('')}
|
|
1040
|
+
</div>`,
|
|
1041
|
+
);
|
|
1042
|
+
const result = await page.evaluate(async () => {
|
|
1043
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
1044
|
+
const tall = document.querySelector('#tall') as HTMLElement;
|
|
1045
|
+
// The tall item's bottom part in view.
|
|
1046
|
+
area.scrollTop = tall.offsetTop + 1000 - area.clientHeight / 2;
|
|
1047
|
+
const prototype = Element.prototype;
|
|
1048
|
+
const original = prototype.getBoundingClientRect;
|
|
1049
|
+
let reads = 0;
|
|
1050
|
+
prototype.getBoundingClientRect = function getBoundingClientRect(
|
|
1051
|
+
this: Element,
|
|
1052
|
+
) {
|
|
1053
|
+
reads += 1;
|
|
1054
|
+
return original.call(this);
|
|
1055
|
+
};
|
|
1056
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
1057
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1058
|
+
layout,
|
|
1059
|
+
() => tall,
|
|
1060
|
+
);
|
|
1061
|
+
report.measureBefore();
|
|
1062
|
+
tall.style.height = '0px';
|
|
1063
|
+
report.animate();
|
|
1064
|
+
await new Promise<void>(resolve => {
|
|
1065
|
+
queueMicrotask(resolve);
|
|
1066
|
+
});
|
|
1067
|
+
prototype.getBoundingClientRect = original;
|
|
1068
|
+
// Rows now in view that were below the area's visible part plus one
|
|
1069
|
+
// viewport before the collapse: the band reached them because the
|
|
1070
|
+
// collapsing item is taller than a viewport.
|
|
1071
|
+
const areaRect = area.getBoundingClientRect();
|
|
1072
|
+
const inView = [
|
|
1073
|
+
...area.querySelectorAll<HTMLElement>('[id^="r"]'),
|
|
1074
|
+
].filter(row => {
|
|
1075
|
+
const rect = row.getBoundingClientRect();
|
|
1076
|
+
return rect.bottom > areaRect.top && rect.top < areaRect.bottom;
|
|
1077
|
+
});
|
|
1078
|
+
const lowest = inView.at(-1);
|
|
1079
|
+
return {
|
|
1080
|
+
reads,
|
|
1081
|
+
rows: inView.length,
|
|
1082
|
+
lowestGlides: lowest?.getAnimations().length ?? 0,
|
|
1083
|
+
};
|
|
1084
|
+
});
|
|
1085
|
+
// Two thousand rows, but only those near the visible part are read.
|
|
1086
|
+
expect(result.reads).toBeLessThan(200);
|
|
1087
|
+
expect(result.rows).toBeGreaterThan(0);
|
|
1088
|
+
expect(result.lowestGlides).toBe(1);
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1091
|
+
test('the glide never scrolls the area (FR3)', async ({page}) => {
|
|
1092
|
+
// The same change with and without a handle, from the same scroll
|
|
1093
|
+
// position: the area's scroll (the browser's own scroll anchoring
|
|
1094
|
+
// included) is identical, frame by frame, so the glide adds none.
|
|
1095
|
+
const scrollsOf = async (handle: boolean) => {
|
|
1096
|
+
await open(page, PAGE);
|
|
1097
|
+
return page.evaluate(
|
|
1098
|
+
async ({mutate, withHandle}) => {
|
|
1099
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
1100
|
+
area.scrollTop = 40;
|
|
1101
|
+
const frame = async () =>
|
|
1102
|
+
new Promise(resolve => requestAnimationFrame(resolve));
|
|
1103
|
+
await frame();
|
|
1104
|
+
await frame();
|
|
1105
|
+
await window.change({changed: '#grow', mutate, handle: withHandle});
|
|
1106
|
+
const tops: number[] = [];
|
|
1107
|
+
for (let i = 0; i < 40; i++) {
|
|
1108
|
+
tops.push(area.scrollTop);
|
|
1109
|
+
await frame();
|
|
1110
|
+
}
|
|
1111
|
+
return tops;
|
|
1112
|
+
},
|
|
1113
|
+
{mutate: OPEN_GROW, withHandle: handle},
|
|
1114
|
+
);
|
|
1115
|
+
};
|
|
1116
|
+
const without = await scrollsOf(false);
|
|
1117
|
+
const withHandle = await scrollsOf(true);
|
|
1118
|
+
expect(withHandle).toEqual(without);
|
|
1119
|
+
});
|
|
1120
|
+
|
|
1121
|
+
test('the changed element and its followers start on one frame on springs.settle (FR4)', async ({
|
|
1122
|
+
page,
|
|
1123
|
+
}) => {
|
|
1124
|
+
await open(page, PAGE);
|
|
1125
|
+
await change(page);
|
|
1126
|
+
await page.waitForTimeout(50);
|
|
1127
|
+
const grow = await page.evaluate(() => window.motionOf('#grow'));
|
|
1128
|
+
const follower = await page.evaluate(() => window.motionOf('#a'));
|
|
1129
|
+
expect(grow).toHaveLength(1);
|
|
1130
|
+
expect(follower).toHaveLength(1);
|
|
1131
|
+
expect(grow[0].startTime).toBe(follower[0].startTime);
|
|
1132
|
+
expect(grow[0].duration).toBeCloseTo(follower[0].duration, 3);
|
|
1133
|
+
// springs.settle is SwiftUI's smooth spring (duration 0.5 s, no bounce):
|
|
1134
|
+
// it settles within a second.
|
|
1135
|
+
expect(follower[0].duration).toBeGreaterThan(300);
|
|
1136
|
+
expect(follower[0].duration).toBeLessThan(1200);
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
test('a closing element exits on the same motion while the content after it glides up at once (FR4)', async ({
|
|
1140
|
+
page,
|
|
1141
|
+
}) => {
|
|
1142
|
+
await open(
|
|
1143
|
+
page,
|
|
1144
|
+
`<div id="area" class="area"><div id="content" style="height: 80px; background: #fd9">Details</div>
|
|
1145
|
+
<div id="a" class="row"></div><div id="b" class="row"></div></div>`,
|
|
1146
|
+
);
|
|
1147
|
+
const result = await page.evaluate(async () => {
|
|
1148
|
+
const area = document.querySelector('#area');
|
|
1149
|
+
const content = document.querySelector('#content') as HTMLElement;
|
|
1150
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
1151
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1152
|
+
layout,
|
|
1153
|
+
() => content,
|
|
1154
|
+
);
|
|
1155
|
+
report.measureBefore();
|
|
1156
|
+
// The component closes it but keeps it rendered for the exit, holding
|
|
1157
|
+
// it once the change reports it measured.
|
|
1158
|
+
report.animate();
|
|
1159
|
+
let finished = false;
|
|
1160
|
+
const held = window.AnimatedLayout.holdLayoutExit(layout, content, () => {
|
|
1161
|
+
finished = true;
|
|
1162
|
+
});
|
|
1163
|
+
await new Promise<void>(resolve => {
|
|
1164
|
+
queueMicrotask(resolve);
|
|
1165
|
+
});
|
|
1166
|
+
const exit = content.getAnimations()[0];
|
|
1167
|
+
const timing = exit?.effect?.getTiming();
|
|
1168
|
+
const followerStart = window.motionOf('#a')[0]?.first ?? null;
|
|
1169
|
+
const visible = getComputedStyle(content).display !== 'none';
|
|
1170
|
+
await exit?.finished;
|
|
1171
|
+
// The finish event follows the finished promise.
|
|
1172
|
+
await new Promise(resolve => {
|
|
1173
|
+
setTimeout(resolve, 50);
|
|
1174
|
+
});
|
|
1175
|
+
return {
|
|
1176
|
+
held,
|
|
1177
|
+
visible,
|
|
1178
|
+
position: getComputedStyle(content).position,
|
|
1179
|
+
marginEnd: content.style.getPropertyValue('margin-block-end'),
|
|
1180
|
+
followerStart,
|
|
1181
|
+
exitDuration: Number(timing?.duration),
|
|
1182
|
+
followerDuration: window.motionOf('#a')[0]?.duration ?? null,
|
|
1183
|
+
finished,
|
|
1184
|
+
};
|
|
1185
|
+
});
|
|
1186
|
+
expect(result.held).toBe(true);
|
|
1187
|
+
expect(result.visible).toBe(true);
|
|
1188
|
+
// In flow, where it was, giving up its space.
|
|
1189
|
+
expect(result.position).toBe('static');
|
|
1190
|
+
expect(result.marginEnd).toBe('-80px');
|
|
1191
|
+
// The row below starts 80 px lower, where it was, and glides up.
|
|
1192
|
+
expect(startOffset(result.followerStart).y).toBeCloseTo(80, 0);
|
|
1193
|
+
expect(result.finished).toBe(true);
|
|
1194
|
+
});
|
|
1195
|
+
|
|
1196
|
+
test('an exiting element in a scrolled area stays where it is, scrolls with the area and keeps its width (FR4)', async ({
|
|
1197
|
+
page,
|
|
1198
|
+
}) => {
|
|
1199
|
+
await open(
|
|
1200
|
+
page,
|
|
1201
|
+
`<div id="area" class="area" style="overflow-anchor: none">
|
|
1202
|
+
${'<div class="row"></div>'.repeat(3)}
|
|
1203
|
+
<div id="content" style="box-sizing: content-box; padding: 12px 18px; border: 2px solid #c90; height: 80px">Details</div>
|
|
1204
|
+
${'<div class="row"></div>'.repeat(30)}
|
|
1205
|
+
</div>`,
|
|
1206
|
+
);
|
|
1207
|
+
const result = await page.evaluate(async () => {
|
|
1208
|
+
const area = document.querySelector('#area') as HTMLElement;
|
|
1209
|
+
const content = document.querySelector('#content') as HTMLElement;
|
|
1210
|
+
area.scrollTop = 60;
|
|
1211
|
+
const before = content.getBoundingClientRect();
|
|
1212
|
+
const layout = window.AnimatedLayout.createAnimatedLayout(() => area);
|
|
1213
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1214
|
+
layout,
|
|
1215
|
+
() => content,
|
|
1216
|
+
);
|
|
1217
|
+
report.measureBefore();
|
|
1218
|
+
report.animate();
|
|
1219
|
+
window.AnimatedLayout.holdLayoutExit(layout, content, () => {});
|
|
1220
|
+
await new Promise<void>(resolve => {
|
|
1221
|
+
queueMicrotask(resolve);
|
|
1222
|
+
});
|
|
1223
|
+
const held = content.getBoundingClientRect();
|
|
1224
|
+
area.scrollTop = 80;
|
|
1225
|
+
const scrolled = content.getBoundingClientRect();
|
|
1226
|
+
return {before, held, scrolled};
|
|
1227
|
+
});
|
|
1228
|
+
expect(result.held.top).toBeCloseTo(result.before.top, 0);
|
|
1229
|
+
expect(result.held.width).toBeCloseTo(result.before.width, 0);
|
|
1230
|
+
// It scrolls with the area (so the area still clips it).
|
|
1231
|
+
expect(result.scrolled.top).toBeCloseTo(result.before.top - 20, 0);
|
|
1232
|
+
});
|
|
1233
|
+
|
|
1234
|
+
for (const layout of [
|
|
1235
|
+
{
|
|
1236
|
+
name: 'a flex column with a gap',
|
|
1237
|
+
html: `<div style="display: flex; flex-direction: column; gap: 8px">
|
|
1238
|
+
<div class="row" style="margin: 0"></div>
|
|
1239
|
+
<div id="content" style="height: 80px; background: #fd9">Details</div>
|
|
1240
|
+
<div id="after" class="row" style="margin: 0"></div>
|
|
1241
|
+
</div>`,
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
name: 'collapsing margins',
|
|
1245
|
+
html: `<div>
|
|
1246
|
+
<div class="row" style="margin: 0"></div>
|
|
1247
|
+
<div id="content" style="height: 80px; margin: 10px 0 20px; background: #fd9">Details</div>
|
|
1248
|
+
<div id="after" class="row" style="margin: 0"></div>
|
|
1249
|
+
</div>`,
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
// What follows is inside a `display: contents` wrapper, as Tooltip and
|
|
1253
|
+
// Theme render one.
|
|
1254
|
+
name: 'a flex column whose next item is a display: contents wrapper',
|
|
1255
|
+
html: `<div style="display: flex; flex-direction: column; gap: 8px">
|
|
1256
|
+
<div class="row" style="margin: 0"></div>
|
|
1257
|
+
<div id="content" style="height: 80px; background: #fd9">Details</div>
|
|
1258
|
+
<div style="display: contents"><div id="after" class="row" style="margin: 0"></div></div>
|
|
1259
|
+
</div>`,
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
// Under a scaled ancestor: the correction is read in screen px.
|
|
1263
|
+
name: 'a gap stack under a scaled ancestor',
|
|
1264
|
+
html: `<div style="transform: scale(0.5); transform-origin: 0 0">
|
|
1265
|
+
<div style="display: flex; flex-direction: column; gap: 8px">
|
|
1266
|
+
<div class="row" style="margin: 0"></div>
|
|
1267
|
+
<div id="content" style="height: 80px; background: #fd9">Details</div>
|
|
1268
|
+
<div id="after" class="row" style="margin: 0"></div>
|
|
1269
|
+
</div>
|
|
1270
|
+
</div>`,
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
// Collapsible's shape: the content is the last child of a plain block
|
|
1274
|
+
// wrapper, and what follows sits after the wrapper.
|
|
1275
|
+
name: 'a plain wrapper, as its last child',
|
|
1276
|
+
html: `<div>
|
|
1277
|
+
<div class="row" style="margin: 0"></div>
|
|
1278
|
+
<div id="content" style="height: 80px; background: #fd9">Details</div>
|
|
1279
|
+
</div>
|
|
1280
|
+
<p id="after" style="margin: 0; height: 40px">Next</p>`,
|
|
1281
|
+
},
|
|
1282
|
+
]) {
|
|
1283
|
+
test(`an exiting element frees exactly its space in ${layout.name}: the content after it does not jump when it hides (FR3, FR4)`, async ({
|
|
1284
|
+
page,
|
|
1285
|
+
}) => {
|
|
1286
|
+
await open(page, `<div id="area" class="area">${layout.html}</div>`);
|
|
1287
|
+
const result = await page.evaluate(async () => {
|
|
1288
|
+
const area = document.querySelector('#area');
|
|
1289
|
+
const content = document.querySelector('#content') as HTMLElement;
|
|
1290
|
+
const after = document.querySelector('#after') as HTMLElement;
|
|
1291
|
+
const layoutHandle = window.AnimatedLayout.createAnimatedLayout(
|
|
1292
|
+
() => area,
|
|
1293
|
+
);
|
|
1294
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1295
|
+
layoutHandle,
|
|
1296
|
+
() => content,
|
|
1297
|
+
);
|
|
1298
|
+
report.measureBefore();
|
|
1299
|
+
const measured = report.animate();
|
|
1300
|
+
const held = window.AnimatedLayout.holdLayoutExit(
|
|
1301
|
+
layoutHandle,
|
|
1302
|
+
content,
|
|
1303
|
+
() => {},
|
|
1304
|
+
);
|
|
1305
|
+
const inert = content.hasAttribute('inert');
|
|
1306
|
+
await new Promise<void>(resolve => {
|
|
1307
|
+
queueMicrotask(resolve);
|
|
1308
|
+
});
|
|
1309
|
+
const glides = after.getAnimations().length;
|
|
1310
|
+
for (const animation of document.getAnimations()) {
|
|
1311
|
+
animation.finish();
|
|
1312
|
+
}
|
|
1313
|
+
const settled = after.getBoundingClientRect().top;
|
|
1314
|
+
// The component hides it once its exit ends.
|
|
1315
|
+
content.style.display = 'none';
|
|
1316
|
+
window.AnimatedLayout.releaseLayoutExit(content);
|
|
1317
|
+
const hidden = after.getBoundingClientRect().top;
|
|
1318
|
+
return {measured, held, inert, glides, settled, hidden};
|
|
1319
|
+
});
|
|
1320
|
+
expect(result.measured).toBe(true);
|
|
1321
|
+
expect(result.held).toBe(true);
|
|
1322
|
+
expect(result.inert).toBe(true);
|
|
1323
|
+
expect(result.glides).toBe(1);
|
|
1324
|
+
expect(result.settled).toBeCloseTo(result.hidden, 0);
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
test("a closing flex-row item that sets its row's height hides at once, and the content after the row takes its final place at once", async ({
|
|
1329
|
+
page,
|
|
1330
|
+
}) => {
|
|
1331
|
+
await open(
|
|
1332
|
+
page,
|
|
1333
|
+
`<div id="area" class="area">
|
|
1334
|
+
<div style="display: flex; align-items: flex-start; gap: 8px">
|
|
1335
|
+
<div id="content" style="width: 80px; height: 120px; background: #fd9"></div>
|
|
1336
|
+
<div style="width: 80px; height: 40px; background: #9cf"></div>
|
|
1337
|
+
</div>
|
|
1338
|
+
<div id="after" class="row" style="margin: 0"></div>
|
|
1339
|
+
</div>`,
|
|
1340
|
+
);
|
|
1341
|
+
const result = await page.evaluate(async () => {
|
|
1342
|
+
const area = document.querySelector('#area');
|
|
1343
|
+
const content = document.querySelector('#content') as HTMLElement;
|
|
1344
|
+
const after = document.querySelector('#after') as HTMLElement;
|
|
1345
|
+
const layoutHandle = window.AnimatedLayout.createAnimatedLayout(
|
|
1346
|
+
() => area,
|
|
1347
|
+
);
|
|
1348
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1349
|
+
layoutHandle,
|
|
1350
|
+
() => content,
|
|
1351
|
+
);
|
|
1352
|
+
report.measureBefore();
|
|
1353
|
+
report.animate();
|
|
1354
|
+
const held = window.AnimatedLayout.holdLayoutExit(
|
|
1355
|
+
layoutHandle,
|
|
1356
|
+
content,
|
|
1357
|
+
() => {},
|
|
1358
|
+
);
|
|
1359
|
+
// The component hides it in the same commit.
|
|
1360
|
+
content.style.display = 'none';
|
|
1361
|
+
await new Promise<void>(resolve => {
|
|
1362
|
+
queueMicrotask(resolve);
|
|
1363
|
+
});
|
|
1364
|
+
return {
|
|
1365
|
+
held,
|
|
1366
|
+
margin: content.style.getPropertyValue('margin-inline-end'),
|
|
1367
|
+
glides: after.getAnimations().length,
|
|
1368
|
+
};
|
|
1369
|
+
});
|
|
1370
|
+
expect(result).toEqual({held: false, margin: '', glides: 0});
|
|
1371
|
+
});
|
|
1372
|
+
|
|
1373
|
+
test('holding the exit keeps the CSS animations inside the element running (FR4)', async ({
|
|
1374
|
+
page,
|
|
1375
|
+
}) => {
|
|
1376
|
+
await open(
|
|
1377
|
+
page,
|
|
1378
|
+
`<style>@keyframes spin { to { rotate: 360deg; } }</style>
|
|
1379
|
+
<div id="area" class="area">
|
|
1380
|
+
<div id="content" style="height: 80px"><div id="spinner" style="width: 20px; height: 20px; background: #36c; animation: spin 2s linear infinite"></div></div>
|
|
1381
|
+
<div id="after" class="row"></div>
|
|
1382
|
+
</div>`,
|
|
1383
|
+
);
|
|
1384
|
+
const result = await page.evaluate(async () => {
|
|
1385
|
+
const area = document.querySelector('#area');
|
|
1386
|
+
const content = document.querySelector('#content') as HTMLElement;
|
|
1387
|
+
const spinner = document.querySelector('#spinner') as HTMLElement;
|
|
1388
|
+
await new Promise(resolve => {
|
|
1389
|
+
setTimeout(resolve, 300);
|
|
1390
|
+
});
|
|
1391
|
+
let restarts = 0;
|
|
1392
|
+
spinner.addEventListener('animationstart', () => {
|
|
1393
|
+
restarts += 1;
|
|
1394
|
+
});
|
|
1395
|
+
const before = Number(spinner.getAnimations()[0]?.currentTime);
|
|
1396
|
+
const layoutHandle = window.AnimatedLayout.createAnimatedLayout(
|
|
1397
|
+
() => area,
|
|
1398
|
+
);
|
|
1399
|
+
const report = window.AnimatedLayout.reportLayoutChange(
|
|
1400
|
+
layoutHandle,
|
|
1401
|
+
() => content,
|
|
1402
|
+
);
|
|
1403
|
+
report.measureBefore();
|
|
1404
|
+
report.animate();
|
|
1405
|
+
const held = window.AnimatedLayout.holdLayoutExit(
|
|
1406
|
+
layoutHandle,
|
|
1407
|
+
content,
|
|
1408
|
+
() => {},
|
|
1409
|
+
);
|
|
1410
|
+
const after = Number(spinner.getAnimations()[0]?.currentTime);
|
|
1411
|
+
await new Promise(resolve => {
|
|
1412
|
+
setTimeout(resolve, 100);
|
|
1413
|
+
});
|
|
1414
|
+
return {held, before, after, restarts};
|
|
1415
|
+
});
|
|
1416
|
+
expect(result.held).toBe(true);
|
|
1417
|
+
// The spinner kept its time: no restart from 0.
|
|
1418
|
+
expect(result.after).toBeGreaterThanOrEqual(result.before);
|
|
1419
|
+
expect(result.restarts).toBe(0);
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
test('a follower the app moves with its own transform takes its final place at once', async ({
|
|
1423
|
+
page,
|
|
1424
|
+
}) => {
|
|
1425
|
+
await open(
|
|
1426
|
+
page,
|
|
1427
|
+
`<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
1428
|
+
<div id="moved" class="row" style="transform: translateX(4px)"></div>
|
|
1429
|
+
<div id="spun" class="row"></div>
|
|
1430
|
+
<div id="plain" class="row"></div></div>`,
|
|
1431
|
+
);
|
|
1432
|
+
await page.evaluate(() => {
|
|
1433
|
+
document
|
|
1434
|
+
.querySelector('#spun')
|
|
1435
|
+
?.animate([{rotate: '0deg'}, {rotate: '3deg'}], {
|
|
1436
|
+
duration: 5000,
|
|
1437
|
+
iterations: Infinity,
|
|
1438
|
+
});
|
|
1439
|
+
});
|
|
1440
|
+
await change(page);
|
|
1441
|
+
expect(await page.evaluate(() => window.motionOf('#moved'))).toEqual([]);
|
|
1442
|
+
const spun = await page.evaluate(() => window.motionOf('#spun'));
|
|
1443
|
+
expect(spun.filter(m => m.first?.includes('px') === true)).toEqual([]);
|
|
1444
|
+
expect(await page.evaluate(() => window.motionOf('#plain'))).toHaveLength(
|
|
1445
|
+
1,
|
|
1446
|
+
);
|
|
1447
|
+
});
|
|
1448
|
+
|
|
1449
|
+
test("a scope's --motion-springs-settle changes nothing: the role is internal (FR4)", async ({
|
|
1450
|
+
page,
|
|
1451
|
+
}) => {
|
|
1452
|
+
await open(page, PAGE);
|
|
1453
|
+
await change(page);
|
|
1454
|
+
const [shared] = await page.evaluate(() => window.motionOf('#a'));
|
|
1455
|
+
await open(page, PAGE, '#area { --motion-springs-settle: 0.2s 0; }');
|
|
1456
|
+
await change(page);
|
|
1457
|
+
const [scoped] = await page.evaluate(() => window.motionOf('#a'));
|
|
1458
|
+
expect(scoped.duration).toBeCloseTo(shared.duration, 3);
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1461
|
+
test('under Reduce Motion with a coarse pointer, both cross-fade with no travel (FR4)', async ({
|
|
1462
|
+
page,
|
|
1463
|
+
}) => {
|
|
1464
|
+
await page.emulateMedia({reducedMotion: 'reduce'});
|
|
1465
|
+
await open(page, PAGE);
|
|
1466
|
+
expect(
|
|
1467
|
+
await page.evaluate(() => matchMedia('(pointer: coarse)').matches),
|
|
1468
|
+
).toBe(true);
|
|
1469
|
+
await change(page);
|
|
1470
|
+
for (const id of ['#grow', '#a']) {
|
|
1471
|
+
const [motion] = await page.evaluate(s => window.motionOf(s), id);
|
|
1472
|
+
expect(motion.first, id).toBeNull();
|
|
1473
|
+
expect(motion.opacity, id).toBe('0');
|
|
1474
|
+
expect(motion.duration, id).toBeLessThanOrEqual(200);
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1479
|
+
test.describe('spec:AST-105 FR5 and FR4 under a fine pointer', () => {
|
|
1480
|
+
test.use({
|
|
1481
|
+
isMobile: false,
|
|
1482
|
+
hasTouch: false,
|
|
1483
|
+
viewport: {width: 1280, height: 800},
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
const PAGE = `<div id="area" class="area"><div id="grow" class="grow"></div>
|
|
1487
|
+
<div id="a" class="row"></div></div>`;
|
|
1488
|
+
|
|
1489
|
+
test('the glide applies under a mouse (FR5)', async ({page}) => {
|
|
1490
|
+
await open(page, PAGE);
|
|
1491
|
+
expect(
|
|
1492
|
+
await page.evaluate(() => matchMedia('(pointer: fine)').matches),
|
|
1493
|
+
).toBe(true);
|
|
1494
|
+
await change(page);
|
|
1495
|
+
expect(await page.evaluate(() => window.motionOf('#a'))).toHaveLength(1);
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
test('under Reduce Motion with a fine pointer the change is immediate (FR4)', async ({
|
|
1499
|
+
page,
|
|
1500
|
+
}) => {
|
|
1501
|
+
await page.emulateMedia({reducedMotion: 'reduce'});
|
|
1502
|
+
await open(page, PAGE);
|
|
1503
|
+
await change(page);
|
|
1504
|
+
expect(await page.evaluate(() => window.motionOf('#grow'))).toEqual([]);
|
|
1505
|
+
expect(await page.evaluate(() => window.motionOf('#a'))).toEqual([]);
|
|
1506
|
+
});
|
|
1507
|
+
});
|