@wordpress/components 19.4.1-next.f435e9e01b.0 → 19.6.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 +37 -4
- package/CONTRIBUTING.md +69 -2
- package/build/alignment-matrix-control/utils.js +1 -1
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +1 -1
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/animation/index.js +0 -6
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +3 -3
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/base-field/hook.js +1 -1
- package/build/base-field/hook.js.map +1 -1
- package/build/box-control/icon.js +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/unit-control.js +2 -2
- package/build/box-control/unit-control.js.map +1 -1
- package/build/box-control/utils.js +12 -8
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.js +5 -5
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js +7 -7
- package/build/button/index.native.js.map +1 -1
- package/build/card/card/component.js +2 -2
- package/build/card/card/component.js.map +1 -1
- package/build/card/card-body/component.js +1 -1
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-divider/component.js +1 -1
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-footer/component.js +1 -1
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-header/component.js +1 -1
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-media/component.js +1 -1
- package/build/card/card-media/component.js.map +1 -1
- package/build/color-palette/index.native.js +35 -30
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-display.js +1 -1
- package/build/color-picker/color-display.js.map +1 -1
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +6 -9
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- 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/confirm-dialog/component.js +4 -2
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/date-time/time.js +7 -4
- package/build/date-time/time.js.map +1 -1
- package/build/divider/component.js +5 -4
- package/build/divider/component.js.map +1 -1
- package/build/draggable/index.js +3 -3
- package/build/draggable/index.js.map +1 -1
- package/build/elevation/component.js +1 -1
- package/build/elevation/component.js.map +1 -1
- package/build/flex/flex/component.js +1 -1
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex-block/component.js +1 -1
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-item/component.js +1 -1
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/flyout/flyout/component.js +1 -1
- package/build/flyout/flyout/component.js.map +1 -1
- package/build/flyout/flyout-content/component.js +1 -1
- package/build/flyout/flyout-content/component.js.map +1 -1
- package/build/focal-point-picker/index.js +18 -12
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +7 -7
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +1 -1
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/font-size-picker/index.js +1 -2
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +6 -6
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +2 -2
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/grid/component.js +1 -1
- package/build/grid/component.js.map +1 -1
- package/build/h-stack/component.js +1 -1
- package/build/h-stack/component.js.map +1 -1
- package/build/heading/component.js +6 -5
- package/build/heading/component.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/higher-order/with-notices/index.js +1 -1
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/index.js +14 -2
- package/build/index.js.map +1 -1
- package/build/index.native.js +15 -1
- package/build/index.native.js.map +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +1 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js +19 -17
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/reducer/reducer.js +3 -0
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +25 -25
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/isolated-event-container/index.js +1 -1
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +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 +1 -1
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +11 -11
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +26 -9
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +73 -19
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +2 -2
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/html-text-input/container.ios.js +3 -3
- package/build/mobile/html-text-input/container.ios.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js +1 -1
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +1 -1
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/inserter-button/index.native.js +3 -3
- package/build/mobile/inserter-button/index.native.js.map +1 -1
- package/build/mobile/inserter-button/sparkles.js +25 -0
- package/build/mobile/inserter-button/sparkles.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +3 -3
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +8 -8
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +1 -1
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/modal/aria-helper.js +1 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +2 -2
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +2 -2
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/tabbable.js +1 -1
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigation/item/index.js +1 -1
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/menu/index.js +1 -1
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigator/index.js +16 -0
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +72 -0
- package/build/navigator/navigator-back-button/component.js.map +1 -0
- package/build/navigator/navigator-back-button/hook.js +49 -0
- package/build/navigator/navigator-back-button/hook.js.map +1 -0
- package/build/navigator/navigator-back-button/index.js +16 -0
- package/build/navigator/navigator-back-button/index.js.map +1 -0
- package/build/navigator/navigator-button/component.js +71 -0
- package/build/navigator/navigator-button/component.js.map +1 -0
- package/build/navigator/navigator-button/hook.js +59 -0
- package/build/navigator/navigator-button/hook.js.map +1 -0
- package/build/navigator/navigator-button/index.js +16 -0
- package/build/navigator/navigator-button/index.js.map +1 -0
- package/build/navigator/navigator-provider/component.js +12 -22
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +14 -22
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/number-control/index.js +1 -1
- package/build/number-control/index.js.map +1 -1
- package/build/panel/body.js +2 -2
- package/build/panel/body.js.map +1 -1
- package/build/popover/index.js +3 -3
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +6 -6
- package/build/popover/utils.js.map +1 -1
- package/build/radio-group/index.js +1 -1
- package/build/radio-group/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +29 -29
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/sandbox/index.js +5 -5
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scrollable/component.js +1 -1
- package/build/scrollable/component.js.map +1 -1
- package/build/select-control/index.js +1 -1
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +5 -5
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/fill.js +1 -1
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/provider.js +1 -1
- package/build/slot-fill/provider.js.map +1 -1
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +1 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js.map +1 -1
- package/build/style-provider/index.js +2 -2
- package/build/style-provider/index.js.map +1 -1
- package/build/surface/component.js +1 -1
- package/build/surface/component.js.map +1 -1
- package/build/text/component.js +1 -1
- package/build/text/component.js.map +1 -1
- package/build/text-control/index.js +2 -2
- package/build/text-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +2 -2
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +1 -4
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/styles.js +12 -19
- package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build/toolbar/index.js +1 -1
- package/build/toolbar/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tooltip/index.js +3 -3
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +7 -7
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tree-grid/index.js +54 -7
- package/build/tree-grid/index.js.map +1 -1
- package/build/truncate/component.js +1 -1
- package/build/truncate/component.js.map +1 -1
- package/build/truncate/utils.js +1 -1
- package/build/truncate/utils.js.map +1 -1
- package/build/ui/context/context-connect.js +8 -15
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/ui/context/context-system-provider.js +2 -2
- package/build/ui/context/context-system-provider.js.map +1 -1
- package/build/ui/context/index.js.map +1 -1
- package/build/ui/control-group/component.js +1 -1
- package/build/ui/control-group/component.js.map +1 -1
- package/build/ui/control-label/component.js +1 -1
- package/build/ui/control-label/component.js.map +1 -1
- package/build/ui/form-group/form-group.js +1 -1
- package/build/ui/form-group/form-group.js.map +1 -1
- package/build/ui/shortcut/component.js.map +1 -1
- package/build/ui/spinner/component.js +1 -1
- package/build/ui/spinner/component.js.map +1 -1
- package/build/ui/tooltip/component.js +1 -1
- package/build/ui/tooltip/component.js.map +1 -1
- package/build/ui/tooltip/content.js +1 -1
- package/build/ui/tooltip/content.js.map +1 -1
- package/build/ui/utils/colors.js +2 -2
- package/build/ui/utils/colors.js.map +1 -1
- package/build/ui/utils/space.js +2 -2
- package/build/ui/utils/space.js.map +1 -1
- package/build/unit-control/index.js +38 -29
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +4 -2
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/unit-select-control.js +1 -1
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +96 -104
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/breakpoint-values.js +1 -1
- package/build/utils/breakpoint-values.js.map +1 -1
- package/build/utils/colors-values.js +1 -1
- package/build/utils/colors-values.js.map +1 -1
- package/build/v-stack/component.js +1 -1
- package/build/v-stack/component.js.map +1 -1
- package/build/visually-hidden/component.js +1 -1
- package/build/visually-hidden/component.js.map +1 -1
- package/build/z-stack/component.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +1 -1
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +1 -1
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/animation/index.js +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +3 -3
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/base-field/hook.js +1 -1
- package/build-module/base-field/hook.js.map +1 -1
- package/build-module/box-control/icon.js +1 -1
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +5 -5
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/unit-control.js +1 -1
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/box-control/utils.js +13 -9
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.js +5 -5
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +7 -7
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/card/card/component.js +2 -2
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card-body/component.js +1 -1
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-divider/component.js +1 -1
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-footer/component.js +1 -1
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-header/component.js +1 -1
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-media/component.js +1 -1
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/color-palette/index.native.js +36 -31
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-display.js +1 -1
- package/build-module/color-picker/color-display.js.map +1 -1
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +6 -9
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +1 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/confirm-dialog/component.js +4 -5
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/date-time/time.js +7 -4
- package/build-module/date-time/time.js.map +1 -1
- package/build-module/divider/component.js +3 -3
- package/build-module/divider/component.js.map +1 -1
- package/build-module/draggable/index.js +3 -3
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/elevation/component.js +1 -1
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/flex/flex/component.js +1 -1
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex-block/component.js +1 -1
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-item/component.js +1 -1
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/flyout/flyout/component.js +1 -1
- package/build-module/flyout/flyout/component.js.map +1 -1
- package/build-module/flyout/flyout-content/component.js +1 -1
- package/build-module/flyout/flyout-content/component.js.map +1 -1
- package/build-module/focal-point-picker/index.js +18 -12
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +7 -7
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
- 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/form-token-field/index.js +6 -6
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +2 -2
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/grid/component.js +1 -1
- package/build-module/grid/component.js.map +1 -1
- package/build-module/h-stack/component.js +1 -1
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/heading/component.js +4 -4
- package/build-module/heading/component.js.map +1 -1
- package/build-module/heading/hook.js +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +1 -1
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/index.js +5 -5
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +5 -5
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -1
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +19 -16
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +3 -0
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +25 -25
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/isolated-event-container/index.js +1 -1
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- 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 +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +11 -11
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- 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 -1
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +70 -20
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +2 -2
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/container.ios.js +3 -3
- package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +1 -1
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +1 -1
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/index.native.js +1 -1
- package/build-module/mobile/inserter-button/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/sparkles.js +16 -0
- package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +3 -3
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +1 -1
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/modal/aria-helper.js +1 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +2 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +2 -2
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +1 -1
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigation/item/index.js +1 -1
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +1 -1
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigator/index.js +2 -0
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +59 -0
- package/build-module/navigator/navigator-back-button/component.js.map +1 -0
- package/build-module/navigator/navigator-back-button/hook.js +36 -0
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
- package/build-module/navigator/navigator-back-button/index.js +2 -0
- package/build-module/navigator/navigator-back-button/index.js.map +1 -0
- package/build-module/navigator/navigator-button/component.js +58 -0
- package/build-module/navigator/navigator-button/component.js.map +1 -0
- package/build-module/navigator/navigator-button/hook.js +46 -0
- package/build-module/navigator/navigator-button/hook.js.map +1 -0
- package/build-module/navigator/navigator-button/index.js +2 -0
- package/build-module/navigator/navigator-button/index.js.map +1 -0
- package/build-module/navigator/navigator-provider/component.js +12 -22
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +13 -22
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/number-control/index.js +1 -1
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/panel/body.js +2 -2
- package/build-module/panel/body.js.map +1 -1
- package/build-module/popover/index.js +3 -3
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +6 -6
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/radio-group/index.js +1 -1
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +29 -29
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/index.js.map +1 -1
- 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/sandbox/index.js +5 -5
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scrollable/component.js +1 -1
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/select-control/index.js +2 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +5 -5
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +1 -1
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/provider.js +1 -1
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +1 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/style-provider/index.js +2 -2
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/surface/component.js +1 -1
- package/build-module/surface/component.js.map +1 -1
- package/build-module/text/component.js +1 -1
- package/build-module/text/component.js.map +1 -1
- package/build-module/text-control/index.js +2 -2
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -4
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js +11 -17
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build-module/toolbar/index.js +1 -1
- package/build-module/toolbar/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tooltip/index.js +3 -3
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +7 -7
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/index.js +55 -8
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/truncate/component.js +1 -1
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/truncate/utils.js +1 -1
- package/build-module/truncate/utils.js.map +1 -1
- package/build-module/ui/context/context-connect.js +9 -16
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/ui/context/context-system-provider.js +2 -2
- package/build-module/ui/context/context-system-provider.js.map +1 -1
- package/build-module/ui/context/index.js.map +1 -1
- package/build-module/ui/control-group/component.js +1 -1
- package/build-module/ui/control-group/component.js.map +1 -1
- package/build-module/ui/control-label/component.js +1 -1
- package/build-module/ui/control-label/component.js.map +1 -1
- package/build-module/ui/form-group/form-group.js +1 -1
- package/build-module/ui/form-group/form-group.js.map +1 -1
- package/build-module/ui/shortcut/component.js.map +1 -1
- package/build-module/ui/spinner/component.js +1 -1
- package/build-module/ui/spinner/component.js.map +1 -1
- package/build-module/ui/tooltip/component.js +1 -1
- package/build-module/ui/tooltip/component.js.map +1 -1
- package/build-module/ui/tooltip/content.js +1 -1
- package/build-module/ui/tooltip/content.js.map +1 -1
- package/build-module/ui/utils/colors.js +2 -2
- package/build-module/ui/utils/colors.js.map +1 -1
- package/build-module/ui/utils/space.js +2 -2
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/unit-control/index.js +39 -30
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +5 -3
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +1 -1
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js +92 -100
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/breakpoint-values.js +1 -1
- package/build-module/utils/breakpoint-values.js.map +1 -1
- package/build-module/utils/colors-values.js +1 -1
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/v-stack/component.js +1 -1
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/visually-hidden/component.js +1 -1
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +8 -0
- package/build-style/style.css +8 -0
- package/build-types/base-field/hook.d.ts +2 -1
- package/build-types/base-field/hook.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +2 -1
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +2 -1
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +2 -3
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +2 -1
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +2 -1
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +2 -1
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -4
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts +10 -6
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/types.d.ts +2 -0
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +2 -2
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/stories/index.d.ts +10 -0
- package/build-types/divider/stories/index.d.ts.map +1 -0
- package/build-types/divider/types.d.ts +1 -1
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +2 -1
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +2 -1
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +2 -1
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +2 -1
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/flyout/flyout/hook.d.ts +2 -2
- package/build-types/grid/hook.d.ts +2 -1
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +3 -2
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +3 -3
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +2 -1
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/heading/stories/index.d.ts +12 -0
- package/build-types/heading/stories/index.d.ts.map +1 -0
- package/build-types/input-control/index.d.ts +3 -3
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +2 -2
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -3
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +1 -1
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +2 -1
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +2 -1
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/navigator/index.d.ts +2 -0
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts +283 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
- package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/component.d.ts +37 -0
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/hook.d.ts +283 -0
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/index.d.ts +2 -0
- package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-provider/component.d.ts +10 -20
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +10 -20
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +21 -0
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/resizable-box/index.d.ts +2 -2
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +2 -1
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -3
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +2 -1
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +2 -1
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +2 -1
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/types.d.ts +1 -2
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +0 -4
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +2 -1
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/ui/context/context-connect.d.ts +18 -16
- package/build-types/ui/context/context-connect.d.ts.map +1 -1
- package/build-types/ui/context/index.d.ts +4 -4
- package/build-types/ui/context/index.d.ts.map +1 -1
- package/build-types/ui/context/wordpress-component.d.ts +3 -6
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +2 -1
- package/build-types/ui/control-group/hook.d.ts.map +1 -1
- package/build-types/ui/control-label/hook.d.ts +2 -1
- package/build-types/ui/control-label/hook.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +6 -4
- package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +3 -5
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +4 -6
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts +47 -38
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +2 -1
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/alignment-matrix-control/README.md +4 -0
- package/src/alignment-matrix-control/stories/index.js +1 -1
- package/src/alignment-matrix-control/utils.js +1 -1
- package/src/angle-picker-control/angle-circle.js +1 -1
- package/src/animation/index.js +0 -1
- package/src/autocomplete/get-default-use-items.js +3 -3
- package/src/base-control/stories/index.js +65 -22
- package/src/base-field/hook.js +1 -1
- package/src/box-control/icon.js +1 -1
- package/src/box-control/index.js +5 -5
- package/src/box-control/stories/index.js +4 -1
- package/src/box-control/test/index.js +27 -7
- package/src/box-control/unit-control.js +1 -1
- package/src/box-control/utils.js +13 -9
- package/src/button/index.js +5 -5
- package/src/button/index.native.js +7 -7
- package/src/button/style.scss +1 -0
- package/src/card/card/component.js +1 -1
- package/src/card/card-body/component.js +1 -1
- package/src/card/card-divider/component.js +1 -1
- package/src/card/card-footer/component.js +1 -1
- package/src/card/card-header/component.js +1 -1
- package/src/card/card-media/component.js +1 -1
- package/src/color-palette/index.native.js +92 -75
- package/src/color-palette/style.native.scss +10 -5
- package/src/color-palette/style.scss +1 -0
- package/src/color-picker/color-display.tsx +1 -1
- package/src/color-picker/component.tsx +2 -2
- package/src/color-picker/hex-input.tsx +9 -9
- package/src/color-picker/styles.ts +1 -1
- package/src/color-picker/test/index.js +1 -1
- package/src/combobox-control/index.js +1 -1
- package/src/combobox-control/style.scss +1 -0
- package/src/confirm-dialog/README.md +56 -45
- package/src/confirm-dialog/component.tsx +6 -4
- package/src/confirm-dialog/stories/index.js +19 -0
- package/src/confirm-dialog/test/index.js +28 -0
- package/src/confirm-dialog/types.ts +2 -0
- package/src/date-time/style.scss +4 -0
- package/src/date-time/time.js +16 -5
- package/src/dimension-control/test/index.test.js +1 -1
- package/src/disabled/test/index.js +1 -1
- package/src/divider/component.tsx +5 -5
- package/src/divider/stories/index.tsx +70 -0
- package/src/divider/types.ts +3 -1
- package/src/draggable/index.js +3 -3
- package/src/draggable/stories/index.js +1 -1
- package/src/elevation/component.js +1 -1
- package/src/flex/flex/component.js +1 -1
- package/src/flex/flex-block/component.js +1 -1
- package/src/flex/flex-item/component.js +1 -1
- package/src/flyout/flyout/README.md +1 -1
- package/src/flyout/flyout/component.js +1 -1
- package/src/flyout/flyout-content/component.js +1 -1
- package/src/flyout/test/index.js +1 -1
- package/src/focal-point-picker/README.md +7 -0
- package/src/focal-point-picker/index.js +12 -7
- package/src/focal-point-picker/index.native.js +7 -7
- package/src/focal-point-picker/stories/index.js +30 -0
- package/src/focal-point-picker/test/index.js +44 -0
- package/src/focal-point-picker/tooltip/index.native.js +1 -1
- package/src/font-size-picker/README.md +1 -2
- package/src/font-size-picker/index.js +1 -2
- package/src/font-size-picker/stories/index.js +87 -108
- package/src/font-size-picker/test/index.js +0 -2
- package/src/form-file-upload/README.md +1 -1
- package/src/form-file-upload/stories/index.js +51 -0
- package/src/form-token-field/index.js +6 -6
- package/src/form-token-field/style.scss +1 -0
- package/src/form-token-field/suggestions-list.js +2 -2
- package/src/form-token-field/test/index.js +6 -6
- package/src/grid/component.js +1 -1
- package/src/h-stack/component.js +1 -1
- package/src/heading/component.tsx +6 -6
- package/src/heading/hook.ts +1 -1
- package/src/heading/stories/index.tsx +37 -0
- package/src/higher-order/with-filters/test/index.js +1 -1
- package/src/higher-order/with-focus-outside/test/index.js +1 -1
- package/src/higher-order/with-notices/index.js +1 -1
- package/src/higher-order/with-notices/test/index.js +3 -3
- package/src/index.js +6 -4
- package/src/index.native.js +9 -5
- package/src/input-control/index.tsx +2 -2
- package/src/input-control/input-base.tsx +3 -3
- package/src/input-control/input-field.tsx +16 -15
- package/src/input-control/reducer/reducer.ts +3 -0
- package/src/input-control/stories/index.js +1 -1
- package/src/input-control/styles/input-control-styles.tsx +1 -0
- package/src/input-control/test/index.js +4 -4
- package/src/input-control/types.ts +1 -1
- package/src/isolated-event-container/index.js +1 -1
- package/src/item-group/item/component.tsx +2 -2
- package/src/item-group/item-group/component.tsx +2 -2
- package/src/item-group/test/index.js +0 -1
- package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
- package/src/mobile/bottom-sheet/cell.native.js +1 -1
- package/src/mobile/bottom-sheet/index.native.js +11 -11
- package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
- package/src/mobile/color-settings/palette.screen.native.js +39 -9
- package/src/mobile/color-settings/style.native.scss +4 -0
- package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
- package/src/mobile/global-styles-context/test/utils.native.js +2 -2
- package/src/mobile/global-styles-context/utils.native.js +85 -16
- package/src/mobile/gradient/index.native.js +2 -2
- package/src/mobile/html-text-input/container.ios.js +3 -3
- package/src/mobile/html-text-input/index.native.js +1 -1
- package/src/mobile/html-text-input/test/index.native.js +14 -14
- package/src/mobile/image/index.native.js +1 -1
- package/src/mobile/image/style.native.scss +1 -0
- package/src/mobile/inserter-button/index.native.js +1 -2
- package/src/mobile/inserter-button/sparkles.js +15 -0
- package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/src/mobile/link-picker/index.native.js +3 -3
- package/src/mobile/link-picker/link-picker-results.native.js +8 -8
- package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/src/mobile/link-settings/index.native.js +1 -2
- package/src/mobile/link-settings/test/edit.native.js +15 -15
- package/src/modal/aria-helper.js +1 -1
- package/src/modal/index.js +2 -2
- package/src/navigable-container/container.js +2 -2
- package/src/navigable-container/tabbable.js +1 -1
- package/src/navigable-container/test/menu.js +5 -5
- package/src/navigable-container/test/tabbable.js +2 -2
- package/src/navigation/item/index.js +1 -1
- package/src/navigation/menu/index.js +1 -1
- package/src/navigation/stories/controlled-state.js +2 -2
- package/src/navigation/stories/index.js +1 -1
- package/src/navigator/index.ts +2 -0
- package/src/navigator/navigator-back-button/README.md +31 -0
- package/src/navigator/navigator-back-button/component.tsx +62 -0
- package/src/navigator/navigator-back-button/hook.ts +40 -0
- package/src/navigator/navigator-back-button/index.ts +1 -0
- package/src/navigator/navigator-button/README.md +38 -0
- package/src/navigator/navigator-button/component.tsx +61 -0
- package/src/navigator/navigator-button/hook.ts +55 -0
- package/src/navigator/navigator-button/index.ts +1 -0
- package/src/navigator/navigator-provider/README.md +20 -33
- package/src/navigator/navigator-provider/component.tsx +13 -23
- package/src/navigator/navigator-screen/README.md +1 -1
- package/src/navigator/navigator-screen/component.tsx +16 -25
- package/src/navigator/stories/index.js +24 -37
- package/src/navigator/test/index.js +105 -51
- package/src/navigator/types.ts +27 -1
- package/src/number-control/index.js +1 -1
- package/src/number-control/stories/index.js +1 -1
- package/src/panel/body.js +2 -2
- package/src/popover/index.js +3 -3
- package/src/popover/utils.js +6 -6
- package/src/radio/stories/index.js +1 -1
- package/src/radio-group/index.js +1 -1
- package/src/radio-group/stories/index.js +4 -1
- package/src/range-control/stories/index.js +1 -1
- package/src/range-control/styles/range-control-styles.js +1 -1
- package/src/range-control/test/index.js +2 -2
- package/src/resizable-box/index.tsx +2 -2
- package/src/resizable-box/resize-tooltip/index.tsx +2 -2
- package/src/resizable-box/resize-tooltip/label.tsx +2 -2
- package/src/sandbox/index.js +5 -5
- package/src/sandbox/index.native.js +1 -1
- package/src/scrollable/component.js +1 -1
- package/src/select-control/index.tsx +3 -4
- package/src/select-control/styles/select-control-styles.ts +1 -0
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/src/slot-fill/bubbles-virtually/slot.js +1 -2
- package/src/slot-fill/fill.js +1 -1
- package/src/slot-fill/provider.js +1 -1
- package/src/snackbar/index.js +1 -1
- package/src/snackbar/list.js +1 -1
- package/src/spacer/component.tsx +2 -2
- package/src/style-provider/index.js +2 -2
- package/src/surface/component.js +1 -1
- package/src/tab-panel/test/index.js +1 -1
- package/src/text/component.js +1 -1
- package/src/text/test/index.js +2 -2
- package/src/text/types.ts +6 -8
- package/src/text-control/index.js +2 -2
- package/src/text-highlight/test/index.js +4 -4
- package/src/toggle-control/test/index.js +3 -3
- package/src/toggle-group-control/stories/index.js +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -27
- package/src/toggle-group-control/toggle-group-control/component.tsx +4 -4
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +3 -6
- package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -12
- package/src/toolbar/index.js +1 -1
- package/src/toolbar-group/test/index.js +2 -2
- package/src/tools-panel/stories/index.js +0 -1
- package/src/tools-panel/tools-panel/component.tsx +2 -2
- package/src/tools-panel/tools-panel-header/component.tsx +2 -2
- package/src/tools-panel/tools-panel-item/component.tsx +2 -2
- package/src/tooltip/index.js +3 -3
- package/src/tooltip/index.native.js +7 -7
- package/src/tooltip/test/index.js +2 -2
- package/src/tooltip/test/index.native.js +2 -2
- package/src/tree-grid/README.md +24 -1
- package/src/tree-grid/index.js +70 -7
- package/src/tree-grid/stories/index.js +4 -1
- package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
- package/src/tree-grid/test/index.js +303 -8
- package/src/truncate/component.js +1 -1
- package/src/truncate/utils.js +1 -1
- package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
- package/src/ui/context/context-system-provider.js +2 -2
- package/src/ui/context/{index.js → index.ts} +0 -0
- package/src/ui/context/wordpress-component.ts +3 -2
- package/src/ui/control-group/component.js +1 -1
- package/src/ui/control-label/component.js +1 -1
- package/src/ui/form-group/form-group.js +1 -1
- package/src/ui/shortcut/component.tsx +2 -2
- package/src/ui/spinner/component.js +1 -1
- package/src/ui/tooltip/component.js +1 -1
- package/src/ui/tooltip/content.js +1 -1
- package/src/ui/tooltip/test/index.js +4 -4
- package/src/ui/utils/colors.js +2 -2
- package/src/ui/utils/space.ts +2 -2
- package/src/unit-control/README.md +1 -1
- package/src/unit-control/index.native.js +5 -3
- package/src/unit-control/index.tsx +66 -37
- package/src/unit-control/stories/index.js +1 -1
- package/src/unit-control/test/index.js +102 -3
- package/src/unit-control/test/utils.js +56 -15
- package/src/unit-control/types.ts +5 -8
- package/src/unit-control/unit-select-control.tsx +1 -1
- package/src/unit-control/utils.ts +128 -125
- package/src/utils/breakpoint-values.js +1 -1
- package/src/utils/colors-values.js +1 -1
- package/src/utils/hooks/test/use-controlled-state.js +1 -1
- package/src/utils/hooks/test/use-controlled-value.js +3 -3
- package/src/utils/hooks/test/use-latest-ref.js +1 -1
- package/src/utils/test/math.js +2 -2
- package/src/utils/test/rtl.js +12 -12
- package/src/v-stack/component.js +1 -1
- package/src/visually-hidden/component.js +1 -1
- package/src/z-stack/component.tsx +2 -2
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/divider/stories/index.js +0 -64
- package/src/heading/stories/index.js +0 -24
- package/src/tools-panel/stories/typography-panel.js +0 -215
|
@@ -6,7 +6,12 @@ import { render, screen, fireEvent } from '@testing-library/react';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
NavigatorProvider,
|
|
11
|
+
NavigatorScreen,
|
|
12
|
+
NavigatorButton,
|
|
13
|
+
NavigatorBackButton,
|
|
14
|
+
} from '../';
|
|
10
15
|
|
|
11
16
|
jest.mock( 'framer-motion', () => {
|
|
12
17
|
const actual = jest.requireActual( 'framer-motion' );
|
|
@@ -23,58 +28,54 @@ jest.mock( 'framer-motion', () => {
|
|
|
23
28
|
};
|
|
24
29
|
} );
|
|
25
30
|
|
|
31
|
+
const INVALID_HTML_ATTRIBUTE = {
|
|
32
|
+
raw: ' "\'><=invalid_path',
|
|
33
|
+
escaped: " "'><=invalid_path",
|
|
34
|
+
};
|
|
35
|
+
|
|
26
36
|
const PATHS = {
|
|
27
37
|
HOME: '/',
|
|
28
38
|
CHILD: '/child',
|
|
29
39
|
NESTED: '/child/nested',
|
|
40
|
+
INVALID_HTML_ATTRIBUTE: INVALID_HTML_ATTRIBUTE.raw,
|
|
30
41
|
NOT_FOUND: '/not-found',
|
|
31
42
|
};
|
|
32
43
|
|
|
33
|
-
function
|
|
34
|
-
const { goTo } = useNavigator();
|
|
44
|
+
function CustomNavigatorButton( { path, onClick, ...props } ) {
|
|
35
45
|
return (
|
|
36
|
-
<
|
|
46
|
+
<NavigatorButton
|
|
37
47
|
onClick={ () => {
|
|
38
|
-
|
|
39
|
-
// Used to spy on the values passed to `navigator.goTo`
|
|
48
|
+
// Used to spy on the values passed to `navigator.goTo`.
|
|
40
49
|
onClick?.( { type: 'goTo', path } );
|
|
41
50
|
} }
|
|
51
|
+
path={ path }
|
|
42
52
|
{ ...props }
|
|
43
53
|
/>
|
|
44
54
|
);
|
|
45
55
|
}
|
|
46
56
|
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const dataAttrCssSelector = `[${ dataAttrName }="${ dataAttrValue }"]`;
|
|
53
|
-
|
|
54
|
-
const buttonProps = {
|
|
55
|
-
...props,
|
|
56
|
-
[ dataAttrName ]: dataAttrValue,
|
|
57
|
-
};
|
|
58
|
-
|
|
57
|
+
function CustomNavigatorButtonWithFocusRestoration( {
|
|
58
|
+
path,
|
|
59
|
+
onClick,
|
|
60
|
+
...props
|
|
61
|
+
} ) {
|
|
59
62
|
return (
|
|
60
|
-
<
|
|
63
|
+
<NavigatorButton
|
|
61
64
|
onClick={ () => {
|
|
62
|
-
|
|
63
|
-
// Used to spy on the values passed to `navigator.goTo`
|
|
65
|
+
// Used to spy on the values passed to `navigator.goTo`.
|
|
64
66
|
onClick?.( { type: 'goTo', path } );
|
|
65
67
|
} }
|
|
66
|
-
{
|
|
68
|
+
path={ path }
|
|
69
|
+
{ ...props }
|
|
67
70
|
/>
|
|
68
71
|
);
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
function
|
|
72
|
-
const { goBack } = useNavigator();
|
|
74
|
+
function CustomNavigatorBackButton( { onClick, ...props } ) {
|
|
73
75
|
return (
|
|
74
|
-
<
|
|
76
|
+
<NavigatorBackButton
|
|
75
77
|
onClick={ () => {
|
|
76
|
-
goBack
|
|
77
|
-
// Used to spy on the values passed to `navigator.goBack`
|
|
78
|
+
// Used to spy on the values passed to `navigator.goBack`.
|
|
78
79
|
onClick?.( { type: 'goBack' } );
|
|
79
80
|
} }
|
|
80
81
|
{ ...props }
|
|
@@ -89,41 +90,54 @@ const MyNavigation = ( {
|
|
|
89
90
|
<NavigatorProvider initialPath={ initialPath }>
|
|
90
91
|
<NavigatorScreen path={ PATHS.HOME }>
|
|
91
92
|
<p>This is the home screen.</p>
|
|
92
|
-
<
|
|
93
|
+
<CustomNavigatorButton
|
|
93
94
|
path={ PATHS.NOT_FOUND }
|
|
94
95
|
onClick={ onNavigatorButtonClick }
|
|
95
96
|
>
|
|
96
97
|
Navigate to non-existing screen.
|
|
97
|
-
</
|
|
98
|
-
<
|
|
98
|
+
</CustomNavigatorButton>
|
|
99
|
+
<CustomNavigatorButton
|
|
99
100
|
path={ PATHS.CHILD }
|
|
100
101
|
onClick={ onNavigatorButtonClick }
|
|
101
102
|
>
|
|
102
103
|
Navigate to child screen.
|
|
103
|
-
</
|
|
104
|
+
</CustomNavigatorButton>
|
|
105
|
+
<CustomNavigatorButton
|
|
106
|
+
path={ PATHS.INVALID_HTML_ATTRIBUTE }
|
|
107
|
+
onClick={ onNavigatorButtonClick }
|
|
108
|
+
>
|
|
109
|
+
Navigate to screen with an invalid HTML value as a path.
|
|
110
|
+
</CustomNavigatorButton>
|
|
104
111
|
</NavigatorScreen>
|
|
105
112
|
|
|
106
113
|
<NavigatorScreen path={ PATHS.CHILD }>
|
|
107
114
|
<p>This is the child screen.</p>
|
|
108
|
-
<
|
|
115
|
+
<CustomNavigatorButtonWithFocusRestoration
|
|
109
116
|
path={ PATHS.NESTED }
|
|
110
117
|
onClick={ onNavigatorButtonClick }
|
|
111
118
|
>
|
|
112
119
|
Navigate to nested screen.
|
|
113
|
-
</
|
|
114
|
-
<
|
|
120
|
+
</CustomNavigatorButtonWithFocusRestoration>
|
|
121
|
+
<CustomNavigatorBackButton onClick={ onNavigatorButtonClick }>
|
|
115
122
|
Go back
|
|
116
|
-
</
|
|
123
|
+
</CustomNavigatorBackButton>
|
|
117
124
|
</NavigatorScreen>
|
|
118
125
|
|
|
119
126
|
<NavigatorScreen path={ PATHS.NESTED }>
|
|
120
127
|
<p>This is the nested screen.</p>
|
|
121
|
-
<
|
|
128
|
+
<CustomNavigatorBackButton onClick={ onNavigatorButtonClick }>
|
|
122
129
|
Go back
|
|
123
|
-
</
|
|
130
|
+
</CustomNavigatorBackButton>
|
|
124
131
|
</NavigatorScreen>
|
|
125
132
|
|
|
126
|
-
|
|
133
|
+
<NavigatorScreen path={ PATHS.INVALID_HTML_ATTRIBUTE }>
|
|
134
|
+
<p>This is the screen with an invalid HTML value as a path.</p>
|
|
135
|
+
<CustomNavigatorBackButton onClick={ onNavigatorButtonClick }>
|
|
136
|
+
Go back
|
|
137
|
+
</CustomNavigatorBackButton>
|
|
138
|
+
</NavigatorScreen>
|
|
139
|
+
|
|
140
|
+
{ /* A `NavigatorScreen` with `path={ PATHS.NOT_FOUND }` is purposefully not included. */ }
|
|
127
141
|
</NavigatorProvider>
|
|
128
142
|
);
|
|
129
143
|
|
|
@@ -143,6 +157,13 @@ const getNestedScreen = ( { throwIfNotFound } = {} ) =>
|
|
|
143
157
|
getNavigationScreenByText( 'This is the nested screen.', {
|
|
144
158
|
throwIfNotFound,
|
|
145
159
|
} );
|
|
160
|
+
const getInvalidHTMLPathScreen = ( { throwIfNotFound } = {} ) =>
|
|
161
|
+
getNavigationScreenByText(
|
|
162
|
+
'This is the screen with an invalid HTML value as a path.',
|
|
163
|
+
{
|
|
164
|
+
throwIfNotFound,
|
|
165
|
+
}
|
|
166
|
+
);
|
|
146
167
|
|
|
147
168
|
const getNavigationButtonByText = ( text, { throwIfNotFound = true } = {} ) => {
|
|
148
169
|
const fnName = throwIfNotFound ? 'getByRole' : 'queryByRole';
|
|
@@ -160,6 +181,13 @@ const getToNestedScreenButton = ( { throwIfNotFound } = {} ) =>
|
|
|
160
181
|
getNavigationButtonByText( 'Navigate to nested screen.', {
|
|
161
182
|
throwIfNotFound,
|
|
162
183
|
} );
|
|
184
|
+
const getToInvalidHTMLPathScreenButton = ( { throwIfNotFound } = {} ) =>
|
|
185
|
+
getNavigationButtonByText(
|
|
186
|
+
'Navigate to screen with an invalid HTML value as a path.',
|
|
187
|
+
{
|
|
188
|
+
throwIfNotFound,
|
|
189
|
+
}
|
|
190
|
+
);
|
|
163
191
|
const getBackButton = ( { throwIfNotFound } = {} ) =>
|
|
164
192
|
getNavigationButtonByText( 'Go back', {
|
|
165
193
|
throwIfNotFound,
|
|
@@ -234,43 +262,42 @@ describe( 'Navigator', () => {
|
|
|
234
262
|
expect( getHomeScreen() ).toBeInTheDocument();
|
|
235
263
|
expect( getToChildScreenButton() ).toBeInTheDocument();
|
|
236
264
|
|
|
237
|
-
// Navigate to child screen
|
|
265
|
+
// Navigate to child screen.
|
|
238
266
|
fireEvent.click( getToChildScreenButton() );
|
|
239
267
|
|
|
240
268
|
expect( getChildScreen() ).toBeInTheDocument();
|
|
241
269
|
expect( getBackButton() ).toBeInTheDocument();
|
|
242
270
|
|
|
243
|
-
// Navigate back to home screen
|
|
271
|
+
// Navigate back to home screen.
|
|
244
272
|
fireEvent.click( getBackButton() );
|
|
245
|
-
|
|
246
273
|
expect( getHomeScreen() ).toBeInTheDocument();
|
|
247
274
|
expect( getToChildScreenButton() ).toBeInTheDocument();
|
|
248
275
|
|
|
249
|
-
// Navigate again to child screen
|
|
276
|
+
// Navigate again to child screen.
|
|
250
277
|
fireEvent.click( getToChildScreenButton() );
|
|
251
278
|
|
|
252
279
|
expect( getChildScreen() ).toBeInTheDocument();
|
|
253
280
|
expect( getToNestedScreenButton() ).toBeInTheDocument();
|
|
254
281
|
|
|
255
|
-
// Navigate to nested screen
|
|
282
|
+
// Navigate to nested screen.
|
|
256
283
|
fireEvent.click( getToNestedScreenButton() );
|
|
257
284
|
|
|
258
285
|
expect( getNestedScreen() ).toBeInTheDocument();
|
|
259
286
|
expect( getBackButton() ).toBeInTheDocument();
|
|
260
287
|
|
|
261
|
-
// Navigate back to child screen
|
|
288
|
+
// Navigate back to child screen.
|
|
262
289
|
fireEvent.click( getBackButton() );
|
|
263
290
|
|
|
264
291
|
expect( getChildScreen() ).toBeInTheDocument();
|
|
265
292
|
expect( getToNestedScreenButton() ).toBeInTheDocument();
|
|
266
293
|
|
|
267
|
-
// Navigate back to home screen
|
|
294
|
+
// Navigate back to home screen.
|
|
268
295
|
fireEvent.click( getBackButton() );
|
|
269
296
|
|
|
270
297
|
expect( getHomeScreen() ).toBeInTheDocument();
|
|
271
298
|
expect( getToChildScreenButton() ).toBeInTheDocument();
|
|
272
299
|
|
|
273
|
-
// Check the values passed to `navigator.goTo()
|
|
300
|
+
// Check the values passed to `navigator.goTo()`.
|
|
274
301
|
expect( spy ).toHaveBeenCalledTimes( 6 );
|
|
275
302
|
expect( spy ).toHaveBeenNthCalledWith( 1, {
|
|
276
303
|
path: PATHS.CHILD,
|
|
@@ -315,7 +342,7 @@ describe( 'Navigator', () => {
|
|
|
315
342
|
getNestedScreen( { throwIfNotFound: false } )
|
|
316
343
|
).not.toBeInTheDocument();
|
|
317
344
|
|
|
318
|
-
// Check the values passed to `navigator.goTo()
|
|
345
|
+
// Check the values passed to `navigator.goTo()`.
|
|
319
346
|
expect( spy ).toHaveBeenCalledTimes( 1 );
|
|
320
347
|
expect( spy ).toHaveBeenNthCalledWith( 1, {
|
|
321
348
|
path: PATHS.NOT_FOUND,
|
|
@@ -328,26 +355,53 @@ describe( 'Navigator', () => {
|
|
|
328
355
|
|
|
329
356
|
expect( getHomeScreen() ).toBeInTheDocument();
|
|
330
357
|
|
|
331
|
-
// Navigate to child screen
|
|
358
|
+
// Navigate to child screen.
|
|
332
359
|
fireEvent.click( getToChildScreenButton() );
|
|
333
360
|
|
|
334
361
|
expect( getChildScreen() ).toBeInTheDocument();
|
|
335
362
|
|
|
336
|
-
// Navigate to nested screen
|
|
363
|
+
// Navigate to nested screen.
|
|
337
364
|
fireEvent.click( getToNestedScreenButton() );
|
|
338
365
|
|
|
339
366
|
expect( getNestedScreen() ).toBeInTheDocument();
|
|
340
367
|
|
|
341
|
-
// Navigate back to child screen, check that focus was correctly restored
|
|
368
|
+
// Navigate back to child screen, check that focus was correctly restored.
|
|
342
369
|
fireEvent.click( getBackButton() );
|
|
343
370
|
|
|
344
371
|
expect( getChildScreen() ).toBeInTheDocument();
|
|
345
372
|
expect( getToNestedScreenButton() ).toHaveFocus();
|
|
346
373
|
|
|
347
|
-
// Navigate back to home screen, check that focus was correctly restored
|
|
374
|
+
// Navigate back to home screen, check that focus was correctly restored.
|
|
348
375
|
fireEvent.click( getBackButton() );
|
|
349
376
|
|
|
350
377
|
expect( getHomeScreen() ).toBeInTheDocument();
|
|
351
378
|
expect( getToChildScreenButton() ).toHaveFocus();
|
|
352
379
|
} );
|
|
380
|
+
|
|
381
|
+
it( 'should escape the value of the `path` prop', () => {
|
|
382
|
+
render( <MyNavigation /> );
|
|
383
|
+
|
|
384
|
+
expect( getHomeScreen() ).toBeInTheDocument();
|
|
385
|
+
expect( getToInvalidHTMLPathScreenButton() ).toBeInTheDocument();
|
|
386
|
+
|
|
387
|
+
// The following line tests the implementation details, but it's necessary
|
|
388
|
+
// as this would be otherwise transparent to the user.
|
|
389
|
+
expect( getToInvalidHTMLPathScreenButton() ).toHaveAttribute(
|
|
390
|
+
'id',
|
|
391
|
+
INVALID_HTML_ATTRIBUTE.escaped
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
// Navigate to screen with an invalid HTML value for its `path`.
|
|
395
|
+
fireEvent.click( getToInvalidHTMLPathScreenButton() );
|
|
396
|
+
|
|
397
|
+
expect( getInvalidHTMLPathScreen() ).toBeInTheDocument();
|
|
398
|
+
expect( getBackButton() ).toBeInTheDocument();
|
|
399
|
+
|
|
400
|
+
// Navigate back to home screen, check that the focus restoration selector
|
|
401
|
+
// worked correctly despite the escaping.
|
|
402
|
+
fireEvent.click( getBackButton() );
|
|
403
|
+
|
|
404
|
+
expect( getHomeScreen() ).toBeInTheDocument();
|
|
405
|
+
expect( getToInvalidHTMLPathScreenButton() ).toHaveFocus();
|
|
406
|
+
} );
|
|
353
407
|
} );
|
package/src/navigator/types.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type NavigatorContext = {
|
|
|
19
19
|
goBack: () => void;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
// Returned by the `useNavigator` hook
|
|
22
|
+
// Returned by the `useNavigator` hook.
|
|
23
23
|
export type Navigator = NavigatorContext;
|
|
24
24
|
|
|
25
25
|
export type NavigatorProviderProps = {
|
|
@@ -43,3 +43,29 @@ export type NavigatorScreenProps = {
|
|
|
43
43
|
*/
|
|
44
44
|
children: ReactNode;
|
|
45
45
|
};
|
|
46
|
+
|
|
47
|
+
type ButtonProps = {
|
|
48
|
+
// TODO: should also extend `Button` prop types once the `Button` component
|
|
49
|
+
// is refactored to TypeScript.
|
|
50
|
+
};
|
|
51
|
+
export type NavigatorBackButtonProps = Omit< ButtonProps, 'href' > & {
|
|
52
|
+
/**
|
|
53
|
+
* The children elements.
|
|
54
|
+
*/
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type NavigatorButtonProps = NavigatorBackButtonProps & {
|
|
59
|
+
/**
|
|
60
|
+
* The path of the screen to navigate to. The value of this prop needs to be
|
|
61
|
+
* a valid value for an HTML attribute.
|
|
62
|
+
*/
|
|
63
|
+
path: string;
|
|
64
|
+
/**
|
|
65
|
+
* The HTML attribute used to identify the `NavigatorButton`, which is used
|
|
66
|
+
* by `Navigator` to restore focus.
|
|
67
|
+
*
|
|
68
|
+
* @default 'id'
|
|
69
|
+
*/
|
|
70
|
+
attributeName?: string;
|
|
71
|
+
};
|
|
@@ -43,7 +43,7 @@ export function NumberControl(
|
|
|
43
43
|
const baseStep = isStepAny ? 1 : parseFloat( step );
|
|
44
44
|
const baseValue = roundClamp( 0, min, max, baseStep );
|
|
45
45
|
const constrainValue = ( value, stepOverride ) => {
|
|
46
|
-
// When step is "any" clamp the value, otherwise round and clamp it
|
|
46
|
+
// When step is "any" clamp the value, otherwise round and clamp it.
|
|
47
47
|
return isStepAny
|
|
48
48
|
? Math.min( max, Math.max( min, value ) )
|
|
49
49
|
: roundClamp( value, min, max, stepOverride ?? baseStep );
|
|
@@ -14,7 +14,7 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import NumberControl from '../';
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
title: 'Components/NumberControl',
|
|
17
|
+
title: 'Components (Experimental)/NumberControl',
|
|
18
18
|
component: NumberControl,
|
|
19
19
|
parameters: {
|
|
20
20
|
knobs: { disable: false },
|
package/src/panel/body.js
CHANGED
|
@@ -48,10 +48,10 @@ export function PanelBody(
|
|
|
48
48
|
onToggle( next );
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value
|
|
51
|
+
// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.
|
|
52
52
|
const scrollAfterOpenRef = useRef();
|
|
53
53
|
scrollAfterOpenRef.current = scrollAfterOpen;
|
|
54
|
-
// Runs after initial render
|
|
54
|
+
// Runs after initial render.
|
|
55
55
|
useUpdateEffect( () => {
|
|
56
56
|
if (
|
|
57
57
|
isOpened &&
|
package/src/popover/index.js
CHANGED
|
@@ -79,7 +79,7 @@ function computeAnchorRect(
|
|
|
79
79
|
|
|
80
80
|
// Duck-type to check if `anchorRef` is an instance of Range
|
|
81
81
|
// `anchorRef instanceof window.Range` checks will break across document boundaries
|
|
82
|
-
// such as in an iframe
|
|
82
|
+
// such as in an iframe.
|
|
83
83
|
if ( typeof anchorRef?.cloneRange === 'function' ) {
|
|
84
84
|
return offsetIframe(
|
|
85
85
|
getRectangleFromRange( anchorRef ),
|
|
@@ -90,7 +90,7 @@ function computeAnchorRect(
|
|
|
90
90
|
|
|
91
91
|
// Duck-type to check if `anchorRef` is an instance of Element
|
|
92
92
|
// `anchorRef instanceof window.Element` checks will break across document boundaries
|
|
93
|
-
// such as in an iframe
|
|
93
|
+
// such as in an iframe.
|
|
94
94
|
if ( typeof anchorRef?.getBoundingClientRect === 'function' ) {
|
|
95
95
|
const rect = offsetIframe(
|
|
96
96
|
anchorRef.getBoundingClientRect(),
|
|
@@ -389,7 +389,7 @@ const Popover = (
|
|
|
389
389
|
typeof contentWidth === 'number' ? contentWidth + 'px' : ''
|
|
390
390
|
);
|
|
391
391
|
|
|
392
|
-
// Compute the animation position
|
|
392
|
+
// Compute the animation position.
|
|
393
393
|
const yAxisMapping = {
|
|
394
394
|
top: 'bottom',
|
|
395
395
|
bottom: 'top',
|
package/src/popover/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ import { isRTL } from '@wordpress/i18n';
|
|
|
7
7
|
/**
|
|
8
8
|
* Module constants
|
|
9
9
|
*/
|
|
10
|
-
const HEIGHT_OFFSET = 10; //
|
|
10
|
+
const HEIGHT_OFFSET = 10; // Used by the arrow and a bit of empty space.
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Utility used to compute the popover position over the xAxis
|
|
@@ -39,7 +39,7 @@ export function computePopoverXAxisPosition(
|
|
|
39
39
|
) {
|
|
40
40
|
const { width } = contentSize;
|
|
41
41
|
|
|
42
|
-
// Correct xAxis for RTL support
|
|
42
|
+
// Correct xAxis for RTL support.
|
|
43
43
|
if ( xAxis === 'left' && isRTL() ) {
|
|
44
44
|
xAxis = 'right';
|
|
45
45
|
} else if ( xAxis === 'right' && isRTL() ) {
|
|
@@ -52,7 +52,7 @@ export function computePopoverXAxisPosition(
|
|
|
52
52
|
corner = 'left';
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// X axis alignment choices.
|
|
56
56
|
const anchorMidPoint = Math.round( anchorRect.left + anchorRect.width / 2 );
|
|
57
57
|
const centerAlignment = {
|
|
58
58
|
popoverLeft: anchorMidPoint,
|
|
@@ -91,7 +91,7 @@ export function computePopoverXAxisPosition(
|
|
|
91
91
|
: width,
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
// Choosing the x axis
|
|
94
|
+
// Choosing the x axis.
|
|
95
95
|
let chosenXAxis = xAxis;
|
|
96
96
|
let contentWidth = null;
|
|
97
97
|
|
|
@@ -228,7 +228,7 @@ export function computePopoverYAxisPosition(
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
//
|
|
231
|
+
// Y axis alignment choices.
|
|
232
232
|
let anchorMidPoint = anchorRect.top + anchorRect.height / 2;
|
|
233
233
|
|
|
234
234
|
if ( corner === 'bottom' ) {
|
|
@@ -261,7 +261,7 @@ export function computePopoverYAxisPosition(
|
|
|
261
261
|
: height,
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
// Choosing the y axis
|
|
264
|
+
// Choosing the y axis.
|
|
265
265
|
let chosenYAxis = yAxis;
|
|
266
266
|
let contentHeight = null;
|
|
267
267
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import RadioGroup from '../../radio-group';
|
|
5
5
|
import Radio from '../';
|
|
6
6
|
|
|
7
|
-
export default { title: 'Components/Radio', component: Radio };
|
|
7
|
+
export default { title: 'Components (Experimental)/Radio', component: Radio };
|
|
8
8
|
|
|
9
9
|
export const _default = () => {
|
|
10
10
|
// Radio components must be a descendent of a RadioGroup component.
|
package/src/radio-group/index.js
CHANGED
|
@@ -9,7 +9,10 @@ import { useState } from '@wordpress/element';
|
|
|
9
9
|
import Radio from '../../radio';
|
|
10
10
|
import RadioGroup from '../';
|
|
11
11
|
|
|
12
|
-
export default {
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Components (Experimental)/RadioGroup',
|
|
14
|
+
component: RadioGroup,
|
|
15
|
+
};
|
|
13
16
|
|
|
14
17
|
export const _default = () => {
|
|
15
18
|
/* eslint-disable no-restricted-syntax */
|
|
@@ -164,7 +164,7 @@ export const marks = () => {
|
|
|
164
164
|
const minNegative = { min: -10, max: 10, step: 1 };
|
|
165
165
|
const rangeNegative = { min: -10, max: -1, step: 1 };
|
|
166
166
|
|
|
167
|
-
//
|
|
167
|
+
// Use a short alias to keep formatting to fewer lines.
|
|
168
168
|
const Range = RangeControlLabeledByMarksType;
|
|
169
169
|
|
|
170
170
|
return (
|
|
@@ -292,7 +292,7 @@ export const Tooltip = styled.span`
|
|
|
292
292
|
`;
|
|
293
293
|
|
|
294
294
|
// @todo: Refactor RangeControl with latest HStack configuration
|
|
295
|
-
// @wordpress/components/ui/hstack
|
|
295
|
+
// @wordpress/components/ui/hstack.
|
|
296
296
|
export const InputNumber = styled( NumberControl )`
|
|
297
297
|
box-sizing: border-box;
|
|
298
298
|
display: inline-block;
|
|
@@ -266,9 +266,9 @@ describe( 'RangeControl', () => {
|
|
|
266
266
|
fireEvent.change( numberInput, { target: { value: '' } } );
|
|
267
267
|
fireEvent.blur( numberInput );
|
|
268
268
|
|
|
269
|
-
// Reset to 50. Median value of min: 0, max: 100
|
|
269
|
+
// Reset to 50. Median value of min: 0, max: 100.
|
|
270
270
|
expect( rangeInput.value ).toBe( '50' );
|
|
271
|
-
// Input field should be blank
|
|
271
|
+
// Input field should be blank.
|
|
272
272
|
expect( numberInput.value ).toBe( '' );
|
|
273
273
|
} );
|
|
274
274
|
} );
|
|
@@ -9,7 +9,7 @@ import { forwardRef } from '@wordpress/element';
|
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
import { Resizable } from 're-resizable';
|
|
11
11
|
import type { ResizableProps } from 're-resizable';
|
|
12
|
-
import type { ReactNode,
|
|
12
|
+
import type { ReactNode, ForwardedRef } from 'react';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -104,7 +104,7 @@ function ResizableBox(
|
|
|
104
104
|
__experimentalTooltipProps: tooltipProps = {},
|
|
105
105
|
...props
|
|
106
106
|
}: ResizableBoxProps,
|
|
107
|
-
ref:
|
|
107
|
+
ref: ForwardedRef< Resizable >
|
|
108
108
|
): JSX.Element {
|
|
109
109
|
return (
|
|
110
110
|
<Resizable
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { noop } from 'lodash';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
-
import type { Ref } from 'react';
|
|
6
|
+
import type { Ref, ForwardedRef } from 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* WordPress dependencies
|
|
@@ -43,7 +43,7 @@ function ResizeTooltip(
|
|
|
43
43
|
zIndex = 1000,
|
|
44
44
|
...props
|
|
45
45
|
}: ResizeTooltipProps,
|
|
46
|
-
ref:
|
|
46
|
+
ref: ForwardedRef< HTMLDivElement >
|
|
47
47
|
): JSX.Element | null {
|
|
48
48
|
const { label, resizeListener } = useResizeLabel( {
|
|
49
49
|
axis,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -33,7 +33,7 @@ type LabelProps = React.DetailedHTMLProps<
|
|
|
33
33
|
|
|
34
34
|
function Label(
|
|
35
35
|
{ label, position = POSITIONS.corner, zIndex = 1000, ...props }: LabelProps,
|
|
36
|
-
ref:
|
|
36
|
+
ref: ForwardedRef< HTMLDivElement >
|
|
37
37
|
): JSX.Element | null {
|
|
38
38
|
const showLabel = !! label;
|
|
39
39
|
|
package/src/sandbox/index.js
CHANGED
|
@@ -126,7 +126,7 @@ export default function Sandbox( {
|
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
//
|
|
129
|
+
// Put the html snippet into a html document, and then write it to the iframe's document
|
|
130
130
|
// we can use this in the future to inject custom styles or scripts.
|
|
131
131
|
// Scripts go into the body rather than the head, to support embedded content such as Instagram
|
|
132
132
|
// that expect the scripts to be part of the body.
|
|
@@ -163,9 +163,9 @@ export default function Sandbox( {
|
|
|
163
163
|
</html>
|
|
164
164
|
);
|
|
165
165
|
|
|
166
|
-
//
|
|
166
|
+
// Writing the document like this makes it act in the same way as if it was
|
|
167
167
|
// loaded over the network, so DOM creation and mutation, script execution, etc.
|
|
168
|
-
// all work as expected
|
|
168
|
+
// all work as expected.
|
|
169
169
|
contentDocument.open();
|
|
170
170
|
contentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );
|
|
171
171
|
contentDocument.close();
|
|
@@ -181,12 +181,12 @@ export default function Sandbox( {
|
|
|
181
181
|
function checkMessageForResize( event ) {
|
|
182
182
|
const iframe = ref.current;
|
|
183
183
|
|
|
184
|
-
// Verify that the mounted element is the source of the message
|
|
184
|
+
// Verify that the mounted element is the source of the message.
|
|
185
185
|
if ( ! iframe || iframe.contentWindow !== event.source ) {
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
// Attempt to parse the message data as JSON if passed as string
|
|
189
|
+
// Attempt to parse the message data as JSON if passed as string.
|
|
190
190
|
let data = event.data || {};
|
|
191
191
|
|
|
192
192
|
if ( 'string' === typeof data ) {
|
|
@@ -241,7 +241,7 @@ function Sandbox( {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
function checkMessageForResize( event ) {
|
|
244
|
-
// Attempt to parse the message data as JSON if passed as string
|
|
244
|
+
// Attempt to parse the message data as JSON if passed as string.
|
|
245
245
|
let data = event.nativeEvent.data || {};
|
|
246
246
|
|
|
247
247
|
if ( 'string' === typeof data ) {
|
|
@@ -7,7 +7,7 @@ import { useScrollable } from './hook';
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
|
|
10
|
-
* @param {import('react').
|
|
10
|
+
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
11
11
|
*/
|
|
12
12
|
function Scrollable( props, forwardedRef ) {
|
|
13
13
|
const scrollableProps = useScrollable( props );
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { isEmpty, noop } from 'lodash';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
import type { ChangeEvent, FocusEvent, ReactNode, Ref } from 'react';
|
|
6
|
+
import type { ChangeEvent, FocusEvent, ReactNode, ForwardedRef } from 'react';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* WordPress dependencies
|
|
@@ -74,13 +73,13 @@ function SelectControl(
|
|
|
74
73
|
suffix,
|
|
75
74
|
...props
|
|
76
75
|
}: WordPressComponentProps< SelectControlProps, 'select', false >,
|
|
77
|
-
ref:
|
|
76
|
+
ref: ForwardedRef< HTMLSelectElement >
|
|
78
77
|
) {
|
|
79
78
|
const [ isFocused, setIsFocused ] = useState( false );
|
|
80
79
|
const id = useUniqueId( idProp );
|
|
81
80
|
const helpId = help ? `${ id }__help` : undefined;
|
|
82
81
|
|
|
83
|
-
// Disable reason: A select with an onchange throws a warning
|
|
82
|
+
// Disable reason: A select with an onchange throws a warning.
|
|
84
83
|
if ( isEmpty( options ) && ! children ) return null;
|
|
85
84
|
|
|
86
85
|
const handleOnBlur = ( event: FocusEvent< HTMLSelectElement > ) => {
|