@wordpress/components 28.8.6 → 28.10.0
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/CHANGELOG.md +44 -5
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/types.js.map +1 -1
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +3 -3
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +5 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/hooks.js.map +1 -1
- package/build/base-control/index.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +3 -14
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-box-control/styles.js.map +1 -1
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control/component.js +1 -2
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +2 -14
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/styles.js +13 -13
- package/build/border-control/styles.js.map +1 -1
- package/build/border-control/types.js.map +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js +4 -4
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/types.js.map +1 -1
- package/build/button/index.native.js +1 -1
- package/build/button/index.native.js.map +1 -1
- package/build/card/card/component.js +1 -1
- package/build/card/card/component.js.map +1 -1
- package/build/card/styles.js.map +1 -1
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +2 -1
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +1 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/composite/legacy/index.js.map +1 -1
- package/build/context/context-connect.js +1 -0
- package/build/context/context-connect.js.map +1 -1
- package/build/context/context-system-provider.js +1 -1
- package/build/context/context-system-provider.js.map +1 -1
- package/build/context/get-styled-class-name-from-key.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/dashicon/index.js.map +1 -1
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/time/timezone.js.map +1 -1
- package/build/draggable/index.js.map +1 -1
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/elevation/hook.js.map +1 -1
- package/build/external-link/index.js +20 -23
- package/build/external-link/index.js.map +1 -1
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +2 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/form-token-field/token.js +1 -1
- package/build/form-token-field/token.js.map +1 -1
- package/build/gradient-picker/index.js.map +1 -1
- package/build/grid/hook.js.map +1 -1
- package/build/guide/page-control.js +1 -1
- package/build/guide/page-control.js.map +1 -1
- package/build/h-stack/hook.js.map +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/index.js +36 -5
- package/build/index.js.map +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/item-group/styles.js.map +1 -1
- package/build/menu-group/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +4 -4
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +1 -1
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/modal/aria-helper.js +2 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +2 -1
- package/build/modal/index.js.map +1 -1
- package/build/modal/use-modal-exit-animation.js.map +1 -1
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +2 -2
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigator/index.js +128 -32
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/legacy.js +179 -0
- package/build/navigator/legacy.js.map +1 -0
- package/build/navigator/{navigator-provider → navigator}/component.js +5 -40
- package/build/navigator/navigator/component.js.map +1 -0
- package/build/navigator/navigator-back-button/component.js +2 -38
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-back-button/hook.js +1 -1
- package/build/navigator/navigator-back-button/hook.js.map +1 -1
- package/build/navigator/navigator-button/component.js +2 -37
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-button/hook.js +1 -1
- package/build/navigator/navigator-button/hook.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +40 -62
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-screen/use-screen-animate-presence.js +114 -0
- package/build/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
- package/build/navigator/navigator-to-parent-button/component.js +3 -7
- package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build/navigator/styles.js +78 -35
- package/build/navigator/styles.js.map +1 -1
- package/build/navigator/types.js.map +1 -1
- package/build/navigator/use-navigator.js +4 -1
- package/build/navigator/use-navigator.js.map +1 -1
- package/build/number-control/styles/number-control-styles.js.map +1 -1
- package/build/palette-edit/index.js +1 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +1 -1
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/popover/utils.js.map +1 -1
- package/build/progress-bar/index.js.map +1 -1
- package/build/progress-bar/styles.js.map +1 -1
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/index.native.js.map +1 -1
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js.map +1 -1
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/index.native.js.map +1 -1
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +32 -32
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js +1 -1
- package/build/range-control/tooltip.js.map +1 -1
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.js +11 -2
- package/build/search-control/index.js.map +1 -1
- package/build/search-control/index.native.js.map +1 -1
- package/build/search-control/types.js.map +1 -1
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/index.native.js.map +1 -1
- package/build/slot-fill/index.js.map +1 -1
- package/build/spinner/styles.js.map +1 -1
- package/build/style-provider/index.js +1 -0
- package/build/style-provider/index.js.map +1 -1
- package/build/surface/hook.js.map +1 -1
- package/build/surface/styles.js.map +1 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +30 -12
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tab.js +7 -2
- package/build/tabs/tab.js.map +1 -1
- package/build/tabs/tablist.js +71 -39
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/tabpanel.js.map +1 -1
- package/build/tabs/use-track-overflow.js +73 -0
- package/build/tabs/use-track-overflow.js.map +1 -0
- package/build/text/get-line-height.js.map +1 -1
- package/build/text/styles/text-mixins.native.js.map +1 -1
- package/build/text/utils.js.map +1 -1
- package/build/text-control/index.native.js.map +1 -1
- package/build/text-highlight/index.js.map +1 -1
- package/build/textarea-control/index.js.map +1 -1
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/theme/styles.js.map +1 -1
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
- package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +13 -2
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +15 -8
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +13 -20
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toggle-group-control/types.js.map +1 -1
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/tools-panel/styles.js.map +1 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/breakpoint.js.map +1 -1
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/element-rect.js +22 -13
- package/build/utils/element-rect.js.map +1 -1
- package/build/utils/font-size.js.map +1 -1
- package/build/utils/hooks/use-animated-offset-rect.js +80 -0
- package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/utils/hooks/use-on-value-update.js +3 -7
- package/build/utils/hooks/use-on-value-update.js.map +1 -1
- package/build/utils/math.js +2 -2
- package/build/utils/math.js.map +1 -1
- package/build/utils/space.js.map +1 -1
- package/build/utils/unit-values.js.map +1 -1
- package/build/utils/use-responsive-value.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js +1 -2
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/types.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -2
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +4 -6
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +1 -2
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +6 -4
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/hooks.js.map +1 -1
- package/build-module/base-control/index.js +1 -2
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/index.native.js +1 -2
- package/build-module/base-control/index.native.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +4 -16
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/styles.js.map +1 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control/component.js +2 -4
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +3 -17
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/styles.js +13 -13
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/border-control/types.js.map +1 -1
- package/build-module/box-control/all-input-control.js +1 -3
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -3
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/icon.js +1 -2
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +5 -6
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +1 -3
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/button/index.js +1 -3
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +2 -3
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/card/card/component.js +2 -3
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/styles.js.map +1 -1
- package/build-module/checkbox-control/index.js +1 -2
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js +1 -2
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/color-indicator/index.native.js +1 -2
- package/build-module/color-indicator/index.native.js.map +1 -1
- package/build-module/color-palette/index.js +1 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +3 -4
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/component.js +1 -2
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hsl-input.js +1 -3
- package/build-module/color-picker/hsl-input.js.map +1 -1
- package/build-module/color-picker/hsv-color-picker.native.js +1 -2
- package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
- package/build-module/color-picker/hue-picker.native.js +1 -2
- package/build-module/color-picker/hue-picker.native.js.map +1 -1
- package/build-module/color-picker/index.native.js +1 -3
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +1 -2
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/rgb-input.js +1 -3
- package/build-module/color-picker/rgb-input.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +1 -2
- package/build-module/color-picker/saturation-picker.native.js.map +1 -1
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +2 -3
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/confirm-dialog/component.js +1 -3
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/context/context-connect.js +1 -0
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/context/context-system-provider.js +1 -1
- package/build-module/context/context-system-provider.js.map +1 -1
- package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -3
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +1 -2
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.native.js +1 -3
- package/build-module/custom-gradient-picker/index.native.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js +1 -3
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js +1 -2
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/custom-select-control-v2/item.js +1 -2
- package/build-module/custom-select-control-v2/item.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/date-time/date/index.js +1 -2
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +1 -3
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js +1 -2
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time/time-input/index.js +1 -2
- package/build-module/date-time/time/time-input/index.js.map +1 -1
- package/build-module/date-time/time/timezone.js.map +1 -1
- package/build-module/dimension-control/index.js +1 -3
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/draggable/index.js +1 -3
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/drop-zone/index.js +1 -2
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/index.js +1 -2
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown/index.native.js +1 -2
- package/build-module/dropdown/index.native.js.map +1 -1
- package/build-module/dropdown-menu/index.js +1 -2
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +1 -2
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/dropdown-menu-v2/checkbox-item.js +1 -2
- package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -1
- package/build-module/dropdown-menu-v2/index.js +1 -3
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/item.js +1 -2
- package/build-module/dropdown-menu-v2/item.js.map +1 -1
- package/build-module/dropdown-menu-v2/radio-item.js +1 -2
- package/build-module/dropdown-menu-v2/radio-item.js.map +1 -1
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js +1 -3
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +1 -2
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/external-link/index.js +21 -25
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/external-link/index.native.js +1 -2
- package/build-module/external-link/index.native.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +1 -2
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.native.js +1 -2
- package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +1 -2
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.js +1 -2
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +1 -2
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/font-size-picker/index.js +1 -2
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +1 -3
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js +1 -2
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-toggle/index.js +1 -2
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-token-field/index.js +3 -3
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +1 -2
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/form-token-field/token.js +2 -3
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/gradient-picker/index.js +1 -2
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/guide/index.js +1 -2
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js +1 -1
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +3 -4
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/index.js +14 -4
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -2
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js +1 -3
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/menu-group/index.js +1 -2
- package/build-module/menu-group/index.js.map +1 -1
- package/build-module/menu-item/index.js +1 -2
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/menu-items-choice/index.js +1 -2
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/badge/index.native.js +1 -3
- package/build-module/mobile/badge/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -2
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
- package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +1 -3
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
- package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -3
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +1 -2
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +1 -2
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +1 -2
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/image/icon-retry.native.js +1 -2
- package/build-module/mobile/image/icon-retry.native.js.map +1 -1
- package/build-module/mobile/image/image-editing-button.native.js +1 -2
- package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +1 -3
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -2
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +2 -3
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +1 -3
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
- package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +1 -2
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +1 -2
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/modal/aria-helper.js +2 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +3 -4
- package/build-module/modal/index.js.map +1 -1
- package/build-module/modal/use-modal-exit-animation.js.map +1 -1
- package/build-module/navigation/back-button/index.js +1 -2
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/group/index.js +1 -2
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/item/base-content.js +1 -3
- package/build-module/navigation/item/base-content.js.map +1 -1
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +1 -2
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +1 -2
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +2 -2
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js +1 -2
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js +1 -2
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigator/index.js +130 -5
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/legacy.js +167 -0
- package/build-module/navigator/legacy.js.map +1 -0
- package/build-module/navigator/{navigator-provider → navigator}/component.js +4 -39
- package/build-module/navigator/navigator/component.js.map +1 -0
- package/build-module/navigator/navigator-back-button/component.js +1 -37
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-back-button/hook.js +1 -1
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js +1 -36
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/hook.js +1 -1
- package/build-module/navigator/navigator-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +39 -61
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/use-screen-animate-presence.js +106 -0
- package/build-module/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
- package/build-module/navigator/navigator-to-parent-button/component.js +2 -6
- package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build-module/navigator/styles.js +77 -33
- package/build-module/navigator/styles.js.map +1 -1
- package/build-module/navigator/types.js.map +1 -1
- package/build-module/navigator/use-navigator.js +4 -1
- package/build-module/navigator/use-navigator.js.map +1 -1
- package/build-module/notice/index.js +1 -2
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/index.native.js +1 -3
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/number-control/index.js +1 -3
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/styles/number-control-styles.js.map +1 -1
- package/build-module/palette-edit/index.js +2 -4
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/actions.native.js +1 -2
- package/build-module/panel/actions.native.js.map +1 -1
- package/build-module/panel/body.js +1 -2
- package/build-module/panel/body.js.map +1 -1
- package/build-module/panel/body.native.js +1 -2
- package/build-module/panel/body.native.js.map +1 -1
- package/build-module/panel/header.js +1 -2
- package/build-module/panel/header.js.map +1 -1
- package/build-module/panel/index.js +1 -2
- package/build-module/panel/index.js.map +1 -1
- package/build-module/placeholder/index.js +1 -2
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/popover/index.js +2 -4
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/progress-bar/index.js +1 -2
- package/build-module/progress-bar/index.js.map +1 -1
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/index.native.js +1 -3
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/radio-control/index.js +1 -2
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js +1 -2
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/range-control/index.js +1 -2
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/range-control/mark.js +1 -3
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +1 -3
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +32 -32
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js +1 -1
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/index.js +1 -2
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +1 -2
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/sandbox/index.js +1 -2
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -2
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.js +11 -2
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js +1 -2
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/search-control/types.js.map +1 -1
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/index.native.js.map +1 -1
- package/build-module/slot-fill/index.js +1 -3
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/slot.js +1 -2
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/snackbar/index.js +1 -2
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +1 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spinner/index.js +1 -2
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/styles.js.map +1 -1
- package/build-module/style-provider/index.js +1 -0
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/surface/styles.js.map +1 -1
- package/build-module/tab-panel/index.js +1 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +28 -6
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tab.js +9 -4
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/tabs/tablist.js +72 -40
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/tabpanel.js.map +1 -1
- package/build-module/tabs/use-track-overflow.js +67 -0
- package/build-module/tabs/use-track-overflow.js.map +1 -0
- package/build-module/text/get-line-height.js.map +1 -1
- package/build-module/text/styles/text-mixins.native.js.map +1 -1
- package/build-module/text/utils.js.map +1 -1
- package/build-module/text-control/index.native.js.map +1 -1
- package/build-module/text-highlight/index.js +1 -2
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/theme/styles.js.map +1 -1
- package/build-module/tip/index.js +1 -2
- package/build-module/tip/index.js.map +1 -1
- package/build-module/toggle-control/index.js +1 -2
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +14 -3
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +17 -12
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +16 -25
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -8
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toggle-group-control/types.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +1 -2
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +1 -2
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -3
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tooltip/index.js +1 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +1 -3
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/cell.js +1 -2
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +1 -3
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/breakpoint.js.map +1 -1
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/element-rect.js +22 -12
- package/build-module/utils/element-rect.js.map +1 -1
- package/build-module/utils/font-size.js.map +1 -1
- package/build-module/utils/hooks/use-animated-offset-rect.js +74 -0
- package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/utils/hooks/use-on-value-update.js +3 -6
- package/build-module/utils/hooks/use-on-value-update.js.map +1 -1
- package/build-module/utils/math.js +2 -2
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/space.js.map +1 -1
- package/build-module/utils/unit-values.js.map +1 -1
- package/build-module/utils/use-responsive-value.js.map +1 -1
- package/build-style/style-rtl.css +30 -14
- package/build-style/style.css +30 -14
- package/build-types/alignment-matrix-control/types.d.ts +2 -0
- package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +5 -15
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +2 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +3 -2
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +3 -2
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts +2 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +15 -30
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +12 -7
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +4 -4
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +3 -3
- package/build-types/composite/stories/index.story.d.ts +22 -0
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/index.d.ts +23 -4
- package/build-types/index.d.ts.map +1 -1
- package/build-types/modal/aria-helper.d.ts.map +1 -1
- package/build-types/navigator/index.d.ts +171 -5
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/legacy.d.ts +226 -0
- package/build-types/navigator/legacy.d.ts.map +1 -0
- package/build-types/navigator/navigator/component.d.ts +3 -0
- package/build-types/navigator/navigator/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/component.d.ts +0 -35
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +0 -34
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +0 -35
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts +16 -0
- package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts.map +1 -0
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +0 -4
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +5 -5
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/navigator/styles.d.ts +20 -7
- package/build-types/navigator/styles.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +19 -1
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/navigator/use-navigator.d.ts +4 -1
- package/build-types/navigator/use-navigator.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +0 -8
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/types.d.ts +3 -0
- package/build-types/search-control/types.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +7 -0
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +2 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts +7 -0
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/tabs/use-track-overflow.d.ts +17 -0
- package/build-types/tabs/use-track-overflow.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +2 -1
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/utils/element-rect.d.ts +8 -0
- package/build-types/utils/element-rect.d.ts.map +1 -1
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts +62 -0
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
- package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -1
- package/package.json +20 -20
- package/schemas/docs-manifest.json +38 -0
- package/src/alignment-matrix-control/README.md +46 -36
- package/src/alignment-matrix-control/docs-manifest.json +12 -0
- package/src/alignment-matrix-control/types.ts +2 -0
- package/src/angle-picker-control/README.md +36 -23
- package/src/angle-picker-control/docs-manifest.json +5 -0
- package/src/autocomplete/index.tsx +4 -1
- package/src/border-box-control/border-box-control/README.md +22 -26
- package/src/border-box-control/border-box-control/component.tsx +3 -14
- package/src/border-box-control/stories/index.story.tsx +2 -1
- package/src/border-control/border-control/README.md +26 -36
- package/src/border-control/border-control/component.tsx +1 -2
- package/src/border-control/border-control-dropdown/component.tsx +1 -15
- package/src/border-control/stories/index.story.tsx +4 -10
- package/src/border-control/styles.ts +0 -1
- package/src/border-control/test/index.js +2 -15
- package/src/border-control/types.ts +12 -7
- package/src/box-control/README.md +9 -12
- package/src/box-control/index.tsx +4 -4
- package/src/box-control/stories/index.story.tsx +1 -1
- package/src/box-control/types.ts +3 -3
- package/src/button/style.scss +5 -1
- package/src/composite/legacy/test/index.tsx +22 -21
- package/src/composite/stories/index.story.tsx +42 -0
- package/src/composite/test/index.tsx +629 -38
- package/src/dropdown/stories/index.story.tsx +1 -0
- package/src/dropdown/style.scss +10 -13
- package/src/dropdown-menu/stories/index.story.tsx +3 -0
- package/src/index.ts +19 -1
- package/src/menu-group/style.scss +4 -1
- package/src/menu-items-choice/style.scss +2 -0
- package/src/modal/aria-helper.ts +1 -0
- package/src/navigator/README.md +176 -0
- package/src/navigator/index.tsx +131 -0
- package/src/navigator/legacy.ts +169 -0
- package/src/navigator/{navigator-provider → navigator}/component.tsx +6 -44
- package/src/navigator/navigator-back-button/component.tsx +1 -37
- package/src/navigator/navigator-back-button/hook.ts +1 -1
- package/src/navigator/navigator-button/component.tsx +1 -36
- package/src/navigator/navigator-button/hook.ts +1 -1
- package/src/navigator/navigator-screen/component.tsx +48 -76
- package/src/navigator/navigator-screen/use-screen-animate-presence.ts +177 -0
- package/src/navigator/navigator-to-parent-button/component.tsx +2 -7
- package/src/navigator/stories/index.story.tsx +55 -54
- package/src/navigator/styles.ts +112 -41
- package/src/navigator/test/index.tsx +47 -47
- package/src/navigator/types.ts +19 -1
- package/src/navigator/use-navigator.ts +4 -1
- package/src/range-control/styles/range-control-styles.ts +19 -10
- package/src/range-control/tooltip.tsx +1 -1
- package/src/search-control/README.md +2 -0
- package/src/search-control/index.tsx +9 -2
- package/src/search-control/stories/index.story.tsx +0 -15
- package/src/search-control/test/index.tsx +4 -1
- package/src/search-control/types.ts +3 -0
- package/src/select-control/stories/index.story.tsx +14 -1
- package/src/tabs/stories/index.story.tsx +106 -0
- package/src/tabs/styles.ts +161 -58
- package/src/tabs/tab.tsx +8 -2
- package/src/tabs/tablist.tsx +72 -39
- package/src/tabs/use-track-overflow.ts +76 -0
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +208 -44
- package/src/toggle-group-control/test/index.tsx +26 -0
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +18 -10
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +30 -12
- package/src/toggle-group-control/toggle-group-control/component.tsx +19 -6
- package/src/toggle-group-control/toggle-group-control/styles.ts +41 -0
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -28
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -11
- package/src/toggle-group-control/types.ts +3 -1
- package/src/tools-panel/tools-panel/README.md +10 -10
- package/src/utils/element-rect.ts +32 -15
- package/src/utils/hooks/use-animated-offset-rect.ts +107 -0
- package/src/utils/hooks/use-on-value-update.ts +3 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/build/navigator/navigator-provider/component.js.map +0 -1
- package/build/utils/hooks/use-event.js +0 -41
- package/build/utils/hooks/use-event.js.map +0 -1
- package/build-module/navigator/navigator-provider/component.js.map +0 -1
- package/build-module/utils/hooks/use-event.js +0 -35
- package/build-module/utils/hooks/use-event.js.map +0 -1
- package/build-types/navigator/navigator-provider/component.d.ts +0 -37
- package/build-types/navigator/navigator-provider/component.d.ts.map +0 -1
- package/build-types/utils/hooks/use-event.d.ts +0 -20
- package/build-types/utils/hooks/use-event.d.ts.map +0 -1
- package/src/navigator/index.ts +0 -6
- package/src/navigator/navigator-back-button/README.md +0 -15
- package/src/navigator/navigator-button/README.md +0 -38
- package/src/navigator/navigator-provider/README.md +0 -94
- package/src/navigator/navigator-screen/README.md +0 -33
- package/src/navigator/navigator-to-parent-button/README.md +0 -17
- package/src/utils/hooks/use-event.ts +0 -38
|
@@ -15,29 +15,6 @@ import { useState } from '@wordpress/element';
|
|
|
15
15
|
*/
|
|
16
16
|
import { Composite } from '..';
|
|
17
17
|
|
|
18
|
-
// This is necessary because of how Ariakit calculates page up and
|
|
19
|
-
// page down. Without this, nothing has a height, and so paging up
|
|
20
|
-
// and down doesn't behave as expected in tests.
|
|
21
|
-
|
|
22
|
-
let clientHeightSpy: jest.SpiedGetter<
|
|
23
|
-
typeof HTMLElement.prototype.clientHeight
|
|
24
|
-
>;
|
|
25
|
-
|
|
26
|
-
beforeAll( () => {
|
|
27
|
-
clientHeightSpy = jest
|
|
28
|
-
.spyOn( HTMLElement.prototype, 'clientHeight', 'get' )
|
|
29
|
-
.mockImplementation( function getClientHeight( this: HTMLElement ) {
|
|
30
|
-
if ( this.tagName === 'BODY' ) {
|
|
31
|
-
return window.outerHeight;
|
|
32
|
-
}
|
|
33
|
-
return 50;
|
|
34
|
-
} );
|
|
35
|
-
} );
|
|
36
|
-
|
|
37
|
-
afterAll( () => {
|
|
38
|
-
clientHeightSpy?.mockRestore();
|
|
39
|
-
} );
|
|
40
|
-
|
|
41
18
|
async function renderAndValidate( ...args: Parameters< typeof render > ) {
|
|
42
19
|
const view = render( ...args );
|
|
43
20
|
await waitFor( () => {
|
|
@@ -51,25 +28,148 @@ async function renderAndValidate( ...args: Parameters< typeof render > ) {
|
|
|
51
28
|
return view;
|
|
52
29
|
}
|
|
53
30
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
31
|
+
describe( 'Composite', () => {
|
|
32
|
+
let clientHeightSpy: jest.SpiedGetter<
|
|
33
|
+
typeof HTMLElement.prototype.clientHeight
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
beforeAll( () => {
|
|
37
|
+
// This is necessary because of how Ariakit calculates page up and
|
|
38
|
+
// page down. Without this, nothing has a height, and so paging up
|
|
39
|
+
// and down doesn't behave as expected in tests.
|
|
40
|
+
clientHeightSpy = jest
|
|
41
|
+
.spyOn( HTMLElement.prototype, 'clientHeight', 'get' )
|
|
42
|
+
.mockImplementation( function getClientHeight( this: HTMLElement ) {
|
|
43
|
+
if ( this.tagName === 'BODY' ) {
|
|
44
|
+
return window.outerHeight;
|
|
45
|
+
}
|
|
46
|
+
return 50;
|
|
47
|
+
} );
|
|
48
|
+
} );
|
|
49
|
+
|
|
50
|
+
afterAll( () => {
|
|
51
|
+
clientHeightSpy?.mockRestore();
|
|
52
|
+
} );
|
|
53
|
+
|
|
54
|
+
test( 'Renders as a single tab stop', async () => {
|
|
55
|
+
await renderAndValidate(
|
|
56
|
+
<>
|
|
57
|
+
<button>Before</button>
|
|
58
|
+
<Composite>
|
|
59
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
60
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
61
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
62
|
+
</Composite>
|
|
63
|
+
<button>After</button>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
await press.Tab();
|
|
68
|
+
expect(
|
|
69
|
+
screen.getByRole( 'button', { name: 'Before' } )
|
|
70
|
+
).toHaveFocus();
|
|
71
|
+
await press.Tab();
|
|
72
|
+
expect(
|
|
73
|
+
screen.getByRole( 'button', { name: 'Item 1' } )
|
|
74
|
+
).toHaveFocus();
|
|
75
|
+
await press.Tab();
|
|
76
|
+
expect( screen.getByRole( 'button', { name: 'After' } ) ).toHaveFocus();
|
|
77
|
+
await press.ShiftTab();
|
|
78
|
+
expect(
|
|
79
|
+
screen.getByRole( 'button', { name: 'Item 1' } )
|
|
80
|
+
).toHaveFocus();
|
|
81
|
+
} );
|
|
82
|
+
|
|
83
|
+
test( 'Excludes disabled items', async () => {
|
|
84
|
+
await renderAndValidate(
|
|
85
|
+
<Composite>
|
|
60
86
|
<Composite.Item>Item 1</Composite.Item>
|
|
61
|
-
<Composite.Item>Item 2</Composite.Item>
|
|
62
|
-
|
|
87
|
+
<Composite.Item disabled>Item 2</Composite.Item>
|
|
88
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
63
89
|
</Composite>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
93
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
94
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
95
|
+
|
|
96
|
+
expect( item2 ).toBeDisabled();
|
|
97
|
+
|
|
98
|
+
await press.Tab();
|
|
99
|
+
expect( item1 ).toHaveFocus();
|
|
100
|
+
await press.ArrowDown();
|
|
101
|
+
expect( item2 ).not.toHaveFocus();
|
|
102
|
+
expect( item3 ).toHaveFocus();
|
|
103
|
+
} );
|
|
104
|
+
|
|
105
|
+
test( 'Includes focusable disabled items', async () => {
|
|
106
|
+
await renderAndValidate(
|
|
107
|
+
<Composite>
|
|
108
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
109
|
+
<Composite.Item disabled accessibleWhenDisabled>
|
|
110
|
+
Item 2
|
|
111
|
+
</Composite.Item>
|
|
112
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
113
|
+
</Composite>
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
117
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
118
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
119
|
+
|
|
120
|
+
expect( item2 ).toBeEnabled();
|
|
121
|
+
expect( item2 ).toHaveAttribute( 'aria-disabled', 'true' );
|
|
122
|
+
|
|
123
|
+
await press.Tab();
|
|
124
|
+
expect( item1 ).toHaveFocus();
|
|
125
|
+
await press.ArrowDown();
|
|
126
|
+
expect( item2 ).toHaveFocus();
|
|
127
|
+
expect( item3 ).not.toHaveFocus();
|
|
128
|
+
} );
|
|
129
|
+
|
|
130
|
+
test( 'Supports `activeId`', async () => {
|
|
131
|
+
/* eslint-disable no-restricted-syntax */
|
|
132
|
+
await renderAndValidate(
|
|
133
|
+
<Composite activeId="item-2">
|
|
134
|
+
<Composite.Item id="item-1">Item 1</Composite.Item>
|
|
135
|
+
<Composite.Item id="item-2">Item 2</Composite.Item>
|
|
136
|
+
<Composite.Item id="item-3">Item 3</Composite.Item>
|
|
137
|
+
</Composite>
|
|
138
|
+
);
|
|
139
|
+
/* eslint-enable no-restricted-syntax */
|
|
140
|
+
|
|
141
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
142
|
+
|
|
143
|
+
await press.Tab();
|
|
144
|
+
await waitFor( () => expect( item2 ).toHaveFocus() );
|
|
145
|
+
} );
|
|
70
146
|
|
|
71
|
-
describe( 'Composite', () => {
|
|
72
147
|
it( 'should remain focusable even when there are no elements in the DOM associated with the currently active ID', async () => {
|
|
148
|
+
const RemoveItemTest = (
|
|
149
|
+
props: ComponentProps< typeof Composite >
|
|
150
|
+
) => {
|
|
151
|
+
const [ showThirdItem, setShowThirdItem ] = useState( true );
|
|
152
|
+
return (
|
|
153
|
+
<>
|
|
154
|
+
<button>Focus trap before composite</button>
|
|
155
|
+
<Composite { ...props }>
|
|
156
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
157
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
158
|
+
{ showThirdItem && (
|
|
159
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
160
|
+
) }
|
|
161
|
+
</Composite>
|
|
162
|
+
<button
|
|
163
|
+
onClick={ () =>
|
|
164
|
+
setShowThirdItem( ( value ) => ! value )
|
|
165
|
+
}
|
|
166
|
+
>
|
|
167
|
+
Toggle third item
|
|
168
|
+
</button>
|
|
169
|
+
</>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
73
173
|
await renderAndValidate( <RemoveItemTest /> );
|
|
74
174
|
|
|
75
175
|
const toggleButton = screen.getByRole( 'button', {
|
|
@@ -120,4 +220,495 @@ describe( 'Composite', () => {
|
|
|
120
220
|
screen.getByRole( 'button', { name: 'Item 3' } )
|
|
121
221
|
).toHaveFocus();
|
|
122
222
|
} );
|
|
223
|
+
|
|
224
|
+
describe.each( [
|
|
225
|
+
[ 'When LTR', false ],
|
|
226
|
+
[ 'When RTL', true ],
|
|
227
|
+
] )( '%s', ( _when, rtl ) => {
|
|
228
|
+
const previousArrowKey = rtl ? 'ArrowRight' : 'ArrowLeft';
|
|
229
|
+
const nextArrowKey = rtl ? 'ArrowLeft' : 'ArrowRight';
|
|
230
|
+
const firstArrowKey = rtl ? 'End' : 'Home';
|
|
231
|
+
const lastArrowKey = rtl ? 'Home' : 'End';
|
|
232
|
+
|
|
233
|
+
describe( 'In one dimension', () => {
|
|
234
|
+
test( 'All directions work with no orientation', async () => {
|
|
235
|
+
await renderAndValidate(
|
|
236
|
+
<Composite rtl={ rtl }>
|
|
237
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
238
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
239
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
240
|
+
</Composite>
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
244
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
245
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
246
|
+
|
|
247
|
+
await press.Tab();
|
|
248
|
+
expect( item1 ).toHaveFocus();
|
|
249
|
+
await press.ArrowDown();
|
|
250
|
+
expect( item2 ).toHaveFocus();
|
|
251
|
+
await press.ArrowDown();
|
|
252
|
+
expect( item3 ).toHaveFocus();
|
|
253
|
+
await press.ArrowDown();
|
|
254
|
+
expect( item3 ).toHaveFocus();
|
|
255
|
+
await press.ArrowUp();
|
|
256
|
+
expect( item2 ).toHaveFocus();
|
|
257
|
+
await press.ArrowUp();
|
|
258
|
+
expect( item1 ).toHaveFocus();
|
|
259
|
+
await press.ArrowUp();
|
|
260
|
+
expect( item1 ).toHaveFocus();
|
|
261
|
+
await press( nextArrowKey );
|
|
262
|
+
expect( item2 ).toHaveFocus();
|
|
263
|
+
await press( nextArrowKey );
|
|
264
|
+
expect( item3 ).toHaveFocus();
|
|
265
|
+
await press( previousArrowKey );
|
|
266
|
+
expect( item2 ).toHaveFocus();
|
|
267
|
+
await press( previousArrowKey );
|
|
268
|
+
expect( item1 ).toHaveFocus();
|
|
269
|
+
await press.End();
|
|
270
|
+
expect( item3 ).toHaveFocus();
|
|
271
|
+
await press.Home();
|
|
272
|
+
expect( item1 ).toHaveFocus();
|
|
273
|
+
await press.PageDown();
|
|
274
|
+
expect( item3 ).toHaveFocus();
|
|
275
|
+
await press.PageUp();
|
|
276
|
+
expect( item1 ).toHaveFocus();
|
|
277
|
+
} );
|
|
278
|
+
|
|
279
|
+
test( 'Only left/right work with horizontal orientation', async () => {
|
|
280
|
+
await renderAndValidate(
|
|
281
|
+
<Composite rtl={ rtl } orientation="horizontal">
|
|
282
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
283
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
284
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
285
|
+
</Composite>
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
289
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
290
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
291
|
+
|
|
292
|
+
await press.Tab();
|
|
293
|
+
expect( item1 ).toHaveFocus();
|
|
294
|
+
await press.ArrowDown();
|
|
295
|
+
expect( item1 ).toHaveFocus();
|
|
296
|
+
await press( nextArrowKey );
|
|
297
|
+
expect( item2 ).toHaveFocus();
|
|
298
|
+
await press( nextArrowKey );
|
|
299
|
+
expect( item3 ).toHaveFocus();
|
|
300
|
+
await press.ArrowUp();
|
|
301
|
+
expect( item3 ).toHaveFocus();
|
|
302
|
+
await press( previousArrowKey );
|
|
303
|
+
expect( item2 ).toHaveFocus();
|
|
304
|
+
await press( previousArrowKey );
|
|
305
|
+
expect( item1 ).toHaveFocus();
|
|
306
|
+
await press.End();
|
|
307
|
+
expect( item3 ).toHaveFocus();
|
|
308
|
+
await press.Home();
|
|
309
|
+
expect( item1 ).toHaveFocus();
|
|
310
|
+
await press.PageDown();
|
|
311
|
+
expect( item3 ).toHaveFocus();
|
|
312
|
+
await press.PageUp();
|
|
313
|
+
expect( item1 ).toHaveFocus();
|
|
314
|
+
} );
|
|
315
|
+
|
|
316
|
+
test( 'Only up/down work with vertical orientation', async () => {
|
|
317
|
+
await renderAndValidate(
|
|
318
|
+
<Composite rtl={ rtl } orientation="vertical">
|
|
319
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
320
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
321
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
322
|
+
</Composite>
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
326
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
327
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
328
|
+
|
|
329
|
+
await press.Tab();
|
|
330
|
+
expect( item1 ).toHaveFocus();
|
|
331
|
+
await press( nextArrowKey );
|
|
332
|
+
expect( item1 ).toHaveFocus();
|
|
333
|
+
await press.ArrowDown();
|
|
334
|
+
expect( item2 ).toHaveFocus();
|
|
335
|
+
await press.ArrowDown();
|
|
336
|
+
expect( item3 ).toHaveFocus();
|
|
337
|
+
await press( previousArrowKey );
|
|
338
|
+
expect( item3 ).toHaveFocus();
|
|
339
|
+
await press.ArrowUp();
|
|
340
|
+
expect( item2 ).toHaveFocus();
|
|
341
|
+
await press.ArrowUp();
|
|
342
|
+
expect( item1 ).toHaveFocus();
|
|
343
|
+
await press.End();
|
|
344
|
+
expect( item3 ).toHaveFocus();
|
|
345
|
+
await press.Home();
|
|
346
|
+
expect( item1 ).toHaveFocus();
|
|
347
|
+
await press.PageDown();
|
|
348
|
+
expect( item3 ).toHaveFocus();
|
|
349
|
+
await press.PageUp();
|
|
350
|
+
expect( item1 ).toHaveFocus();
|
|
351
|
+
} );
|
|
352
|
+
|
|
353
|
+
test( 'Focus wraps with loop enabled', async () => {
|
|
354
|
+
await renderAndValidate(
|
|
355
|
+
<Composite rtl={ rtl } focusLoop>
|
|
356
|
+
<Composite.Item>Item 1</Composite.Item>
|
|
357
|
+
<Composite.Item>Item 2</Composite.Item>
|
|
358
|
+
<Composite.Item>Item 3</Composite.Item>
|
|
359
|
+
</Composite>
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
const item1 = screen.getByRole( 'button', { name: 'Item 1' } );
|
|
363
|
+
const item2 = screen.getByRole( 'button', { name: 'Item 2' } );
|
|
364
|
+
const item3 = screen.getByRole( 'button', { name: 'Item 3' } );
|
|
365
|
+
|
|
366
|
+
await press.Tab();
|
|
367
|
+
expect( item1 ).toHaveFocus();
|
|
368
|
+
await press.ArrowDown();
|
|
369
|
+
expect( item2 ).toHaveFocus();
|
|
370
|
+
await press.ArrowDown();
|
|
371
|
+
expect( item3 ).toHaveFocus();
|
|
372
|
+
await press.ArrowDown();
|
|
373
|
+
expect( item1 ).toHaveFocus();
|
|
374
|
+
await press.ArrowUp();
|
|
375
|
+
expect( item3 ).toHaveFocus();
|
|
376
|
+
await press( nextArrowKey );
|
|
377
|
+
expect( item1 ).toHaveFocus();
|
|
378
|
+
await press( previousArrowKey );
|
|
379
|
+
expect( item3 ).toHaveFocus();
|
|
380
|
+
} );
|
|
381
|
+
} );
|
|
382
|
+
|
|
383
|
+
describe( 'In two dimensions', () => {
|
|
384
|
+
test( 'All directions work as standard', async () => {
|
|
385
|
+
await renderAndValidate(
|
|
386
|
+
<Composite rtl={ rtl }>
|
|
387
|
+
<Composite.Row>
|
|
388
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
389
|
+
<Composite.Item>Item A2</Composite.Item>
|
|
390
|
+
<Composite.Item>Item A3</Composite.Item>
|
|
391
|
+
</Composite.Row>
|
|
392
|
+
<Composite.Row>
|
|
393
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
394
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
395
|
+
<Composite.Item>Item B3</Composite.Item>
|
|
396
|
+
</Composite.Row>
|
|
397
|
+
<Composite.Row>
|
|
398
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
399
|
+
<Composite.Item>Item C2</Composite.Item>
|
|
400
|
+
<Composite.Item>Item C3</Composite.Item>
|
|
401
|
+
</Composite.Row>
|
|
402
|
+
</Composite>
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
406
|
+
name: 'Item A1',
|
|
407
|
+
} );
|
|
408
|
+
const itemA2 = screen.getByRole( 'button', {
|
|
409
|
+
name: 'Item A2',
|
|
410
|
+
} );
|
|
411
|
+
const itemA3 = screen.getByRole( 'button', {
|
|
412
|
+
name: 'Item A3',
|
|
413
|
+
} );
|
|
414
|
+
const itemB1 = screen.getByRole( 'button', {
|
|
415
|
+
name: 'Item B1',
|
|
416
|
+
} );
|
|
417
|
+
const itemB2 = screen.getByRole( 'button', {
|
|
418
|
+
name: 'Item B2',
|
|
419
|
+
} );
|
|
420
|
+
const itemC1 = screen.getByRole( 'button', {
|
|
421
|
+
name: 'Item C1',
|
|
422
|
+
} );
|
|
423
|
+
const itemC3 = screen.getByRole( 'button', {
|
|
424
|
+
name: 'Item C3',
|
|
425
|
+
} );
|
|
426
|
+
|
|
427
|
+
await press.Tab();
|
|
428
|
+
expect( itemA1 ).toHaveFocus();
|
|
429
|
+
await press.ArrowUp();
|
|
430
|
+
expect( itemA1 ).toHaveFocus();
|
|
431
|
+
await press( previousArrowKey );
|
|
432
|
+
expect( itemA1 ).toHaveFocus();
|
|
433
|
+
await press.ArrowDown();
|
|
434
|
+
expect( itemB1 ).toHaveFocus();
|
|
435
|
+
await press( nextArrowKey );
|
|
436
|
+
expect( itemB2 ).toHaveFocus();
|
|
437
|
+
await press.ArrowUp();
|
|
438
|
+
expect( itemA2 ).toHaveFocus();
|
|
439
|
+
await press( previousArrowKey );
|
|
440
|
+
expect( itemA1 ).toHaveFocus();
|
|
441
|
+
await press( lastArrowKey );
|
|
442
|
+
expect( itemA3 ).toHaveFocus();
|
|
443
|
+
await press.PageDown();
|
|
444
|
+
expect( itemC3 ).toHaveFocus();
|
|
445
|
+
await press( nextArrowKey );
|
|
446
|
+
expect( itemC3 ).toHaveFocus();
|
|
447
|
+
await press.ArrowDown();
|
|
448
|
+
expect( itemC3 ).toHaveFocus();
|
|
449
|
+
await press( firstArrowKey );
|
|
450
|
+
expect( itemC1 ).toHaveFocus();
|
|
451
|
+
await press.PageUp();
|
|
452
|
+
expect( itemA1 ).toHaveFocus();
|
|
453
|
+
await press.End( null, { ctrlKey: true } );
|
|
454
|
+
expect( itemC3 ).toHaveFocus();
|
|
455
|
+
await press.Home( null, { ctrlKey: true } );
|
|
456
|
+
expect( itemA1 ).toHaveFocus();
|
|
457
|
+
} );
|
|
458
|
+
|
|
459
|
+
test( 'Focus wraps around rows/columns with loop enabled', async () => {
|
|
460
|
+
await renderAndValidate(
|
|
461
|
+
<Composite rtl={ rtl } focusLoop>
|
|
462
|
+
<Composite.Row>
|
|
463
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
464
|
+
<Composite.Item>Item A2</Composite.Item>
|
|
465
|
+
<Composite.Item>Item A3</Composite.Item>
|
|
466
|
+
</Composite.Row>
|
|
467
|
+
<Composite.Row>
|
|
468
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
469
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
470
|
+
<Composite.Item>Item B3</Composite.Item>
|
|
471
|
+
</Composite.Row>
|
|
472
|
+
<Composite.Row>
|
|
473
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
474
|
+
<Composite.Item>Item C2</Composite.Item>
|
|
475
|
+
<Composite.Item>Item C3</Composite.Item>
|
|
476
|
+
</Composite.Row>
|
|
477
|
+
</Composite>
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
481
|
+
name: 'Item A1',
|
|
482
|
+
} );
|
|
483
|
+
const itemA2 = screen.getByRole( 'button', {
|
|
484
|
+
name: 'Item A2',
|
|
485
|
+
} );
|
|
486
|
+
const itemA3 = screen.getByRole( 'button', {
|
|
487
|
+
name: 'Item A3',
|
|
488
|
+
} );
|
|
489
|
+
const itemB1 = screen.getByRole( 'button', {
|
|
490
|
+
name: 'Item B1',
|
|
491
|
+
} );
|
|
492
|
+
const itemC1 = screen.getByRole( 'button', {
|
|
493
|
+
name: 'Item C1',
|
|
494
|
+
} );
|
|
495
|
+
const itemC3 = screen.getByRole( 'button', {
|
|
496
|
+
name: 'Item C3',
|
|
497
|
+
} );
|
|
498
|
+
|
|
499
|
+
await press.Tab();
|
|
500
|
+
expect( itemA1 ).toHaveFocus();
|
|
501
|
+
await press( nextArrowKey );
|
|
502
|
+
expect( itemA2 ).toHaveFocus();
|
|
503
|
+
await press( nextArrowKey );
|
|
504
|
+
expect( itemA3 ).toHaveFocus();
|
|
505
|
+
await press( nextArrowKey );
|
|
506
|
+
expect( itemA1 ).toHaveFocus();
|
|
507
|
+
await press.ArrowDown();
|
|
508
|
+
expect( itemB1 ).toHaveFocus();
|
|
509
|
+
await press.ArrowDown();
|
|
510
|
+
expect( itemC1 ).toHaveFocus();
|
|
511
|
+
await press.ArrowDown();
|
|
512
|
+
expect( itemA1 ).toHaveFocus();
|
|
513
|
+
await press( previousArrowKey );
|
|
514
|
+
expect( itemA3 ).toHaveFocus();
|
|
515
|
+
await press.ArrowUp();
|
|
516
|
+
expect( itemC3 ).toHaveFocus();
|
|
517
|
+
} );
|
|
518
|
+
|
|
519
|
+
test( 'Focus moves between rows/columns with wrap enabled', async () => {
|
|
520
|
+
await renderAndValidate(
|
|
521
|
+
<Composite rtl={ rtl } focusWrap>
|
|
522
|
+
<Composite.Row>
|
|
523
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
524
|
+
<Composite.Item>Item A2</Composite.Item>
|
|
525
|
+
<Composite.Item>Item A3</Composite.Item>
|
|
526
|
+
</Composite.Row>
|
|
527
|
+
<Composite.Row>
|
|
528
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
529
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
530
|
+
<Composite.Item>Item B3</Composite.Item>
|
|
531
|
+
</Composite.Row>
|
|
532
|
+
<Composite.Row>
|
|
533
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
534
|
+
<Composite.Item>Item C2</Composite.Item>
|
|
535
|
+
<Composite.Item>Item C3</Composite.Item>
|
|
536
|
+
</Composite.Row>
|
|
537
|
+
</Composite>
|
|
538
|
+
);
|
|
539
|
+
|
|
540
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
541
|
+
name: 'Item A1',
|
|
542
|
+
} );
|
|
543
|
+
const itemA2 = screen.getByRole( 'button', {
|
|
544
|
+
name: 'Item A2',
|
|
545
|
+
} );
|
|
546
|
+
const itemA3 = screen.getByRole( 'button', {
|
|
547
|
+
name: 'Item A3',
|
|
548
|
+
} );
|
|
549
|
+
const itemB1 = screen.getByRole( 'button', {
|
|
550
|
+
name: 'Item B1',
|
|
551
|
+
} );
|
|
552
|
+
const itemC1 = screen.getByRole( 'button', {
|
|
553
|
+
name: 'Item C1',
|
|
554
|
+
} );
|
|
555
|
+
const itemC3 = screen.getByRole( 'button', {
|
|
556
|
+
name: 'Item C3',
|
|
557
|
+
} );
|
|
558
|
+
await press.Tab();
|
|
559
|
+
expect( itemA1 ).toHaveFocus();
|
|
560
|
+
await press( nextArrowKey );
|
|
561
|
+
expect( itemA2 ).toHaveFocus();
|
|
562
|
+
await press( nextArrowKey );
|
|
563
|
+
expect( itemA3 ).toHaveFocus();
|
|
564
|
+
await press( nextArrowKey );
|
|
565
|
+
expect( itemB1 ).toHaveFocus();
|
|
566
|
+
await press.ArrowDown();
|
|
567
|
+
expect( itemC1 ).toHaveFocus();
|
|
568
|
+
await press.ArrowDown();
|
|
569
|
+
expect( itemA2 ).toHaveFocus();
|
|
570
|
+
await press( previousArrowKey );
|
|
571
|
+
expect( itemA1 ).toHaveFocus();
|
|
572
|
+
await press( previousArrowKey );
|
|
573
|
+
expect( itemA1 ).toHaveFocus();
|
|
574
|
+
await press.ArrowUp();
|
|
575
|
+
expect( itemA1 ).toHaveFocus();
|
|
576
|
+
await press.End( itemA1, { ctrlKey: true } );
|
|
577
|
+
expect( itemC3 ).toHaveFocus();
|
|
578
|
+
await press( nextArrowKey );
|
|
579
|
+
expect( itemC3 ).toHaveFocus();
|
|
580
|
+
await press.ArrowDown();
|
|
581
|
+
expect( itemC3 ).toHaveFocus();
|
|
582
|
+
} );
|
|
583
|
+
|
|
584
|
+
test( 'Focus wraps around start/end with loop and wrap enabled', async () => {
|
|
585
|
+
await renderAndValidate(
|
|
586
|
+
<Composite rtl={ rtl } focusLoop focusWrap>
|
|
587
|
+
<Composite.Row>
|
|
588
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
589
|
+
<Composite.Item>Item A2</Composite.Item>
|
|
590
|
+
<Composite.Item>Item A3</Composite.Item>
|
|
591
|
+
</Composite.Row>
|
|
592
|
+
<Composite.Row>
|
|
593
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
594
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
595
|
+
<Composite.Item>Item B3</Composite.Item>
|
|
596
|
+
</Composite.Row>
|
|
597
|
+
<Composite.Row>
|
|
598
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
599
|
+
<Composite.Item>Item C2</Composite.Item>
|
|
600
|
+
<Composite.Item>Item C3</Composite.Item>
|
|
601
|
+
</Composite.Row>
|
|
602
|
+
</Composite>
|
|
603
|
+
);
|
|
604
|
+
|
|
605
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
606
|
+
name: 'Item A1',
|
|
607
|
+
} );
|
|
608
|
+
const itemC3 = screen.getByRole( 'button', {
|
|
609
|
+
name: 'Item C3',
|
|
610
|
+
} );
|
|
611
|
+
|
|
612
|
+
await press.Tab();
|
|
613
|
+
expect( itemA1 ).toHaveFocus();
|
|
614
|
+
await press( previousArrowKey );
|
|
615
|
+
expect( itemC3 ).toHaveFocus();
|
|
616
|
+
await press.ArrowDown();
|
|
617
|
+
expect( itemA1 ).toHaveFocus();
|
|
618
|
+
await press.ArrowUp();
|
|
619
|
+
expect( itemC3 ).toHaveFocus();
|
|
620
|
+
await press( nextArrowKey );
|
|
621
|
+
expect( itemA1 ).toHaveFocus();
|
|
622
|
+
} );
|
|
623
|
+
|
|
624
|
+
test( 'Focus shifts if vertical neighbor unavailable when shift enabled', async () => {
|
|
625
|
+
await renderAndValidate(
|
|
626
|
+
<Composite rtl={ rtl } focusShift>
|
|
627
|
+
<Composite.Row>
|
|
628
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
629
|
+
</Composite.Row>
|
|
630
|
+
<Composite.Row>
|
|
631
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
632
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
633
|
+
</Composite.Row>
|
|
634
|
+
<Composite.Row>
|
|
635
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
636
|
+
<Composite.Item disabled>Item C2</Composite.Item>
|
|
637
|
+
</Composite.Row>
|
|
638
|
+
</Composite>
|
|
639
|
+
);
|
|
640
|
+
|
|
641
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
642
|
+
name: 'Item A1',
|
|
643
|
+
} );
|
|
644
|
+
const itemB1 = screen.getByRole( 'button', {
|
|
645
|
+
name: 'Item B1',
|
|
646
|
+
} );
|
|
647
|
+
const itemB2 = screen.getByRole( 'button', {
|
|
648
|
+
name: 'Item B2',
|
|
649
|
+
} );
|
|
650
|
+
const itemC1 = screen.getByRole( 'button', {
|
|
651
|
+
name: 'Item C1',
|
|
652
|
+
} );
|
|
653
|
+
|
|
654
|
+
await press.Tab();
|
|
655
|
+
expect( itemA1 ).toHaveFocus();
|
|
656
|
+
await press.ArrowDown();
|
|
657
|
+
expect( itemB1 ).toHaveFocus();
|
|
658
|
+
await press( nextArrowKey );
|
|
659
|
+
expect( itemB2 ).toHaveFocus();
|
|
660
|
+
await press.ArrowUp();
|
|
661
|
+
// A2 doesn't exist
|
|
662
|
+
expect( itemA1 ).toHaveFocus();
|
|
663
|
+
await press.ArrowDown();
|
|
664
|
+
expect( itemB1 ).toHaveFocus();
|
|
665
|
+
await press( nextArrowKey );
|
|
666
|
+
expect( itemB2 ).toHaveFocus();
|
|
667
|
+
await press.ArrowDown();
|
|
668
|
+
// C2 is disabled
|
|
669
|
+
expect( itemC1 ).toHaveFocus();
|
|
670
|
+
} );
|
|
671
|
+
|
|
672
|
+
test( 'Focus does not shift if vertical neighbor unavailable when shift not enabled', async () => {
|
|
673
|
+
await renderAndValidate(
|
|
674
|
+
<Composite rtl={ rtl }>
|
|
675
|
+
<Composite.Row>
|
|
676
|
+
<Composite.Item>Item A1</Composite.Item>
|
|
677
|
+
</Composite.Row>
|
|
678
|
+
<Composite.Row>
|
|
679
|
+
<Composite.Item>Item B1</Composite.Item>
|
|
680
|
+
<Composite.Item>Item B2</Composite.Item>
|
|
681
|
+
</Composite.Row>
|
|
682
|
+
<Composite.Row>
|
|
683
|
+
<Composite.Item>Item C1</Composite.Item>
|
|
684
|
+
<Composite.Item disabled>Item C2</Composite.Item>
|
|
685
|
+
</Composite.Row>
|
|
686
|
+
</Composite>
|
|
687
|
+
);
|
|
688
|
+
|
|
689
|
+
const itemA1 = screen.getByRole( 'button', {
|
|
690
|
+
name: 'Item A1',
|
|
691
|
+
} );
|
|
692
|
+
const itemB1 = screen.getByRole( 'button', {
|
|
693
|
+
name: 'Item B1',
|
|
694
|
+
} );
|
|
695
|
+
const itemB2 = screen.getByRole( 'button', {
|
|
696
|
+
name: 'Item B2',
|
|
697
|
+
} );
|
|
698
|
+
|
|
699
|
+
await press.Tab();
|
|
700
|
+
expect( itemA1 ).toHaveFocus();
|
|
701
|
+
await press.ArrowDown();
|
|
702
|
+
expect( itemB1 ).toHaveFocus();
|
|
703
|
+
await press( nextArrowKey );
|
|
704
|
+
expect( itemB2 ).toHaveFocus();
|
|
705
|
+
await press.ArrowUp();
|
|
706
|
+
// A2 doesn't exist
|
|
707
|
+
expect( itemB2 ).toHaveFocus();
|
|
708
|
+
await press.ArrowDown();
|
|
709
|
+
// C2 is disabled
|
|
710
|
+
expect( itemB2 ).toHaveFocus();
|
|
711
|
+
} );
|
|
712
|
+
} );
|
|
713
|
+
} );
|
|
123
714
|
} );
|