@wordpress/components 19.5.0 → 19.6.1-next.a55ed9455a.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 +21 -5
- 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/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/color-picker/color-display.js +1 -1
- package/build/color-picker/color-display.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/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 -1
- 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/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 +2 -2
- package/build/index.js.map +1 -1
- package/build/index.native.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 +12 -10
- package/build/input-control/input-field.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/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/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/global-styles-context/utils.native.js +10 -10
- 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/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/navigator-provider/component.js +2 -2
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +1 -1
- 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/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/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/style-provider/index.js +2 -2
- package/build/style-provider/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/styles.js +8 -8
- 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/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/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/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-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/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/color-picker/color-display.js +1 -1
- package/build-module/color-picker/color-display.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/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 -1
- 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/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 +4 -4
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +4 -4
- package/build-module/index.native.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 +13 -10
- package/build-module/input-control/input-field.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/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/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/global-styles-context/utils.native.js +10 -10
- 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/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/navigator-provider/component.js +2 -2
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +1 -1
- 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/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/select-control/index.js +1 -1
- 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/style-provider/index.js +2 -2
- package/build-module/style-provider/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/styles.js +8 -8
- 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/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/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/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-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 -2
- 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 -2
- package/build-types/confirm-dialog/component.d.ts +8 -0
- 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 -1
- package/build-types/flyout/flyout/hook.d.ts.map +1 -1
- 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 +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.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/navigator-back-button/hook.d.ts +2 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +2 -1
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +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 -1
- 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/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 +1 -0
- 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 -3
- 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/package.json +18 -18
- 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-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/test/index.js +27 -7
- 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/color-palette/style.scss +1 -0
- package/src/color-picker/color-display.tsx +1 -1
- 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 +4 -2
- 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 +3 -3
- 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/flyout/flyout/README.md +1 -1
- package/src/flyout/test/index.js +1 -1
- package/src/focal-point-picker/index.native.js +7 -7
- 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 -1
- package/src/font-size-picker/stories/index.js +87 -108
- 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/heading/component.tsx +4 -4
- 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 +4 -4
- package/src/index.native.js +4 -4
- package/src/input-control/input-base.tsx +1 -1
- package/src/input-control/input-field.tsx +12 -9
- package/src/input-control/styles/input-control-styles.tsx +1 -0
- package/src/input-control/test/index.js +4 -4
- package/src/isolated-event-container/index.js +1 -1
- 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/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/global-styles-context/utils.native.js +10 -10
- 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/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/navigator/navigator-provider/component.tsx +1 -1
- package/src/navigator/navigator-screen/component.tsx +2 -2
- package/src/navigator/test/index.js +18 -19
- package/src/navigator/types.ts +1 -1
- package/src/number-control/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-group/index.js +1 -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/sandbox/index.js +5 -5
- package/src/sandbox/index.native.js +1 -1
- package/src/select-control/index.tsx +1 -1
- 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/style-provider/index.js +2 -2
- package/src/tab-panel/test/index.js +1 -1
- package/src/text/test/index.js +2 -2
- package/src/text/types.ts +6 -8
- package/src/text-highlight/test/index.js +4 -4
- package/src/toggle-control/test/index.js +3 -3
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -0
- package/src/toggle-group-control/toggle-group-control/component.tsx +2 -2
- package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -0
- package/src/toolbar/index.js +1 -1
- package/src/toolbar-group/test/index.js +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/test/__snapshots__/index.js.snap +1 -1
- package/src/tree-grid/test/index.js +71 -39
- 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 +1 -0
- 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 +64 -35
- 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/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/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
|
|
package/src/radio-group/index.js
CHANGED
|
@@ -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
|
} );
|
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 ) {
|
|
@@ -79,7 +79,7 @@ function SelectControl(
|
|
|
79
79
|
const id = useUniqueId( idProp );
|
|
80
80
|
const helpId = help ? `${ id }__help` : undefined;
|
|
81
81
|
|
|
82
|
-
// Disable reason: A select with an onchange throws a warning
|
|
82
|
+
// Disable reason: A select with an onchange throws a warning.
|
|
83
83
|
if ( isEmpty( options ) && ! children ) return null;
|
|
84
84
|
|
|
85
85
|
const handleOnBlur = ( event: FocusEvent< HTMLSelectElement > ) => {
|
|
@@ -32,9 +32,8 @@ function Slot(
|
|
|
32
32
|
// cause the fill to be re-mounted. We are only considering the initial value
|
|
33
33
|
// of fillProps.
|
|
34
34
|
}, [ registry.registerSlot, registry.unregisterSlot, name ] );
|
|
35
|
-
|
|
36
35
|
// fillProps may be an update that interacts with the layout, so we
|
|
37
|
-
// useLayoutEffect
|
|
36
|
+
// useLayoutEffect.
|
|
38
37
|
useLayoutEffect( () => {
|
|
39
38
|
registry.updateSlot( name, fillProps );
|
|
40
39
|
} );
|
package/src/slot-fill/fill.js
CHANGED
|
@@ -37,7 +37,7 @@ function FillComponent( { name, children, registerFill, unregisterFill } ) {
|
|
|
37
37
|
|
|
38
38
|
useLayoutEffect( () => {
|
|
39
39
|
if ( name === ref.current.name ) {
|
|
40
|
-
//
|
|
40
|
+
// Ignore initial effect.
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
unregisterFill( ref.current.name, ref.current );
|
|
@@ -48,7 +48,7 @@ export default class SlotFillProvider extends Component {
|
|
|
48
48
|
this.triggerListeners();
|
|
49
49
|
|
|
50
50
|
// Sometimes the fills are registered after the initial render of slot
|
|
51
|
-
// But before the registerSlot call, we need to rerender the slot
|
|
51
|
+
// But before the registerSlot call, we need to rerender the slot.
|
|
52
52
|
this.forceUpdateSlot( name );
|
|
53
53
|
|
|
54
54
|
// If a new instance of a slot is being mounted while another with the
|
package/src/snackbar/index.js
CHANGED
|
@@ -99,7 +99,7 @@ function Snackbar(
|
|
|
99
99
|
'components-snackbar-explicit-dismiss': !! explicitDismiss,
|
|
100
100
|
} );
|
|
101
101
|
if ( actions && actions.length > 1 ) {
|
|
102
|
-
//
|
|
102
|
+
// We need to inform developers that snackbar only accepts 1 action.
|
|
103
103
|
warning(
|
|
104
104
|
'Snackbar can only have 1 action, use Notice if your message require many messages'
|
|
105
105
|
);
|
package/src/snackbar/list.js
CHANGED
|
@@ -68,7 +68,7 @@ function SnackbarList( { notices, className, children, onRemove = noop } ) {
|
|
|
68
68
|
{ notices.map( ( notice ) => {
|
|
69
69
|
return (
|
|
70
70
|
<motion.div
|
|
71
|
-
layout={ ! isReducedMotion } //
|
|
71
|
+
layout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations
|
|
72
72
|
initial={ 'init' }
|
|
73
73
|
animate={ 'open' }
|
|
74
74
|
exit={ 'exit' }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* External dependencies
|
|
@@ -11,7 +11,7 @@ import * as uuid from 'uuid';
|
|
|
11
11
|
const uuidCache = new Set();
|
|
12
12
|
|
|
13
13
|
const memoizedCreateCacheWithContainer = memoize( ( container ) => {
|
|
14
|
-
//
|
|
14
|
+
// Emotion only accepts alphabetical and hyphenated keys so we just strip the numbers from the UUID. It _should_ be fine.
|
|
15
15
|
let key = uuid.v4().replace( /[0-9]/g, '' );
|
|
16
16
|
while ( uuidCache.has( key ) ) {
|
|
17
17
|
key = uuid.v4().replace( /[0-9]/g, '' );
|
|
@@ -32,7 +32,7 @@ describe( 'TabPanel', () => {
|
|
|
32
32
|
TestUtils.Simulate.click( element );
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// This is needed because TestUtils does not accept a stateless component.
|
|
36
36
|
// anything run through a HOC ends up as a stateless component.
|
|
37
37
|
const getTestComponent = ( WrappedComponent, props ) => {
|
|
38
38
|
class TestComponent extends Component {
|
package/src/text/test/index.js
CHANGED
|
@@ -99,7 +99,7 @@ describe( 'Text', () => {
|
|
|
99
99
|
const { container } = render(
|
|
100
100
|
<Text highlightWords={ undefined }>Lorem ipsum.</Text>
|
|
101
101
|
);
|
|
102
|
-
// It'll have a length of 1 because there shouldn't be anything but the single span being rendered
|
|
102
|
+
// It'll have a length of 1 because there shouldn't be anything but the single span being rendered.
|
|
103
103
|
expect( container.firstChild.childNodes ).toHaveLength( 1 );
|
|
104
104
|
} );
|
|
105
105
|
|
|
@@ -111,7 +111,7 @@ describe( 'Text', () => {
|
|
|
111
111
|
);
|
|
112
112
|
|
|
113
113
|
expect( container.firstChild ).toMatchSnapshot();
|
|
114
|
-
// It'll have a length of 1 because there shouldn't be anything but the single span being rendered
|
|
114
|
+
// It'll have a length of 1 because there shouldn't be anything but the single span being rendered.
|
|
115
115
|
expect( container.firstChild.childNodes ).toHaveLength( 1 );
|
|
116
116
|
} );
|
|
117
117
|
|
package/src/text/types.ts
CHANGED
|
@@ -8,13 +8,6 @@ import type { Props as TruncateProps } from '../truncate/types';
|
|
|
8
8
|
*/
|
|
9
9
|
import type { CSSProperties } from 'react';
|
|
10
10
|
|
|
11
|
-
type TextAdjustLineHeightForInnerControls =
|
|
12
|
-
| boolean
|
|
13
|
-
| 'large'
|
|
14
|
-
| 'medium'
|
|
15
|
-
| 'small'
|
|
16
|
-
| 'xSmall';
|
|
17
|
-
|
|
18
11
|
export type TextSize =
|
|
19
12
|
| 'body'
|
|
20
13
|
| 'caption'
|
|
@@ -35,7 +28,12 @@ export interface Props extends TruncateProps {
|
|
|
35
28
|
/**
|
|
36
29
|
* Automatically calculate the appropriate line-height value for contents that render text and Control elements (e.g. `TextInput`).
|
|
37
30
|
*/
|
|
38
|
-
adjustLineHeightForInnerControls?:
|
|
31
|
+
adjustLineHeightForInnerControls?:
|
|
32
|
+
| boolean
|
|
33
|
+
| 'large'
|
|
34
|
+
| 'medium'
|
|
35
|
+
| 'small'
|
|
36
|
+
| 'xSmall';
|
|
39
37
|
/**
|
|
40
38
|
* Adjusts the text color.
|
|
41
39
|
*/
|
|
@@ -12,13 +12,13 @@ import TextHighlight from '../index';
|
|
|
12
12
|
let container = null;
|
|
13
13
|
|
|
14
14
|
beforeEach( () => {
|
|
15
|
-
//
|
|
15
|
+
// Setup a DOM element as a render target.
|
|
16
16
|
container = document.createElement( 'div' );
|
|
17
17
|
document.body.appendChild( container );
|
|
18
18
|
} );
|
|
19
19
|
|
|
20
20
|
afterEach( () => {
|
|
21
|
-
//
|
|
21
|
+
// Cleanup on exiting.
|
|
22
22
|
unmountComponentAtNode( container );
|
|
23
23
|
container.remove();
|
|
24
24
|
container = null;
|
|
@@ -77,7 +77,7 @@ describe( 'Basic rendering', () => {
|
|
|
77
77
|
} );
|
|
78
78
|
|
|
79
79
|
it( 'should highlight occurances of a string regardless of capitalisation', () => {
|
|
80
|
-
const highlight = 'The'; //
|
|
80
|
+
const highlight = 'The'; // Note this occurs in both sentance of lowercase forms.
|
|
81
81
|
|
|
82
82
|
act( () => {
|
|
83
83
|
render(
|
|
@@ -91,7 +91,7 @@ describe( 'Basic rendering', () => {
|
|
|
91
91
|
);
|
|
92
92
|
|
|
93
93
|
// Our component matcher is case insensitive so string.Containing will
|
|
94
|
-
// return a false failure
|
|
94
|
+
// return a false failure.
|
|
95
95
|
const regex = new RegExp( highlight, 'i' );
|
|
96
96
|
|
|
97
97
|
expect( highlightedEls ).toHaveLength( 2 );
|
|
@@ -10,7 +10,7 @@ import ToggleControl from '../';
|
|
|
10
10
|
|
|
11
11
|
describe( 'ToggleControl', () => {
|
|
12
12
|
it( 'triggers change callback with numeric value', () => {
|
|
13
|
-
// Mount: With shallow, cannot find input child of BaseControl
|
|
13
|
+
// Mount: With shallow, cannot find input child of BaseControl.
|
|
14
14
|
const onChange = jest.fn();
|
|
15
15
|
const wrapper = renderer.create(
|
|
16
16
|
<ToggleControl onChange={ onChange } />
|
|
@@ -24,7 +24,7 @@ describe( 'ToggleControl', () => {
|
|
|
24
24
|
|
|
25
25
|
describe( 'help', () => {
|
|
26
26
|
it( 'does not render input with describedby if no help prop', () => {
|
|
27
|
-
// Mount: With shallow, cannot find input child of BaseControl
|
|
27
|
+
// Mount: With shallow, cannot find input child of BaseControl.
|
|
28
28
|
const onChange = jest.fn();
|
|
29
29
|
const wrapper = renderer.create(
|
|
30
30
|
<ToggleControl onChange={ onChange } />
|
|
@@ -36,7 +36,7 @@ describe( 'ToggleControl', () => {
|
|
|
36
36
|
} );
|
|
37
37
|
|
|
38
38
|
it( 'renders input with describedby if help prop', () => {
|
|
39
|
-
// Mount: With shallow, cannot find input child of BaseControl
|
|
39
|
+
// Mount: With shallow, cannot find input child of BaseControl.
|
|
40
40
|
const onChange = jest.fn();
|
|
41
41
|
const wrapper = renderer.create(
|
|
42
42
|
<ToggleControl onChange={ onChange } help={ true } />
|
|
@@ -57,7 +57,7 @@ function ToggleGroupControl(
|
|
|
57
57
|
} );
|
|
58
58
|
const previousValue = usePrevious( value );
|
|
59
59
|
|
|
60
|
-
// Propagate radio.state change
|
|
60
|
+
// Propagate radio.state change.
|
|
61
61
|
useUpdateEffect( () => {
|
|
62
62
|
// Avoid calling onChange if radio state changed
|
|
63
63
|
// from incoming value.
|
|
@@ -66,7 +66,7 @@ function ToggleGroupControl(
|
|
|
66
66
|
}
|
|
67
67
|
}, [ radio.state ] );
|
|
68
68
|
|
|
69
|
-
// Sync incoming value with radio.state
|
|
69
|
+
// Sync incoming value with radio.state.
|
|
70
70
|
useUpdateEffect( () => {
|
|
71
71
|
if ( value !== radio.state ) {
|
|
72
72
|
radio.setState( value );
|
package/src/toolbar/index.js
CHANGED
|
@@ -35,7 +35,7 @@ function Toolbar( { className, label, ...props }, ref ) {
|
|
|
35
35
|
} );
|
|
36
36
|
return <ToolbarGroup { ...props } className={ className } />;
|
|
37
37
|
}
|
|
38
|
-
// `ToolbarGroup` already uses components-toolbar for compatibility reasons
|
|
38
|
+
// `ToolbarGroup` already uses components-toolbar for compatibility reasons.
|
|
39
39
|
const finalClassName = classnames(
|
|
40
40
|
'components-accessible-toolbar',
|
|
41
41
|
className
|
|
@@ -69,14 +69,14 @@ describe( 'ToolbarGroup', () => {
|
|
|
69
69
|
it( 'should render a nested list of controls with separator between', () => {
|
|
70
70
|
const controls = [
|
|
71
71
|
[
|
|
72
|
-
// First set
|
|
72
|
+
// First set.
|
|
73
73
|
{
|
|
74
74
|
icon: 'wordpress',
|
|
75
75
|
title: 'WordPress',
|
|
76
76
|
},
|
|
77
77
|
],
|
|
78
78
|
[
|
|
79
|
-
// Second set
|
|
79
|
+
// Second set.
|
|
80
80
|
{
|
|
81
81
|
icon: 'wordpress',
|
|
82
82
|
title: 'WordPress',
|
package/src/tooltip/index.js
CHANGED
|
@@ -105,7 +105,7 @@ function Tooltip( props ) {
|
|
|
105
105
|
const delayedSetIsOver = useDebounce( setIsOver, delay );
|
|
106
106
|
|
|
107
107
|
const createMouseDown = ( event ) => {
|
|
108
|
-
// Preserve original child callback behavior
|
|
108
|
+
// Preserve original child callback behavior.
|
|
109
109
|
emitToChild( children, 'onMouseDown', event );
|
|
110
110
|
|
|
111
111
|
// On mouse down, the next `mouseup` should revert the value of the
|
|
@@ -137,7 +137,7 @@ function Tooltip( props ) {
|
|
|
137
137
|
|
|
138
138
|
const createToggleIsOver = ( eventName, isDelayed ) => {
|
|
139
139
|
return ( event ) => {
|
|
140
|
-
// Preserve original child callback behavior
|
|
140
|
+
// Preserve original child callback behavior.
|
|
141
141
|
emitToChild( children, eventName, event );
|
|
142
142
|
|
|
143
143
|
// Mouse events behave unreliably in React for disabled elements,
|
|
@@ -158,7 +158,7 @@ function Tooltip( props ) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// Needed in case unsetting is over while delayed set pending, i.e.
|
|
161
|
-
// quickly blur/mouseleave before delayedSetIsOver is called
|
|
161
|
+
// quickly blur/mouseleave before delayedSetIsOver is called.
|
|
162
162
|
delayedSetIsOver.cancel();
|
|
163
163
|
|
|
164
164
|
const _isOver = includes( [ 'focus', 'mouseenter' ], event.type );
|
|
@@ -93,7 +93,7 @@ const Tooltip = ( {
|
|
|
93
93
|
const { onHandleScreenTouch } = useContext( TooltipContext );
|
|
94
94
|
const keyboardVisible = useKeyboardVisibility();
|
|
95
95
|
|
|
96
|
-
// Register callback to dismiss the tooltip whenever the screen is touched
|
|
96
|
+
// Register callback to dismiss the tooltip whenever the screen is touched.
|
|
97
97
|
useEffect( () => {
|
|
98
98
|
if ( visible ) {
|
|
99
99
|
onHandleScreenTouch( () => {
|
|
@@ -104,10 +104,10 @@ const Tooltip = ( {
|
|
|
104
104
|
return () => onHandleScreenTouch( null );
|
|
105
105
|
}, [ visible ] );
|
|
106
106
|
|
|
107
|
-
// Manage visibility animation
|
|
107
|
+
// Manage visibility animation.
|
|
108
108
|
useEffect( () => {
|
|
109
109
|
if (
|
|
110
|
-
// Initial render and visibility enabled, animate show
|
|
110
|
+
// Initial render and visibility enabled, animate show.
|
|
111
111
|
( typeof previousVisible === 'undefined' && visible ) ||
|
|
112
112
|
// Previously visible, animate hide
|
|
113
113
|
( previousVisible && previousVisible !== visible )
|
|
@@ -117,13 +117,13 @@ const Tooltip = ( {
|
|
|
117
117
|
}
|
|
118
118
|
}, [ visible ] );
|
|
119
119
|
|
|
120
|
-
// Manage tooltip visibility and position in relation to keyboard
|
|
120
|
+
// Manage tooltip visibility and position in relation to keyboard.
|
|
121
121
|
useEffect( () => {
|
|
122
122
|
if ( ! visible ) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
// Update tooltip position if keyboard is visible
|
|
126
|
+
// Update tooltip position if keyboard is visible.
|
|
127
127
|
if ( keyboardVisible ) {
|
|
128
128
|
getReferenceElementPosition();
|
|
129
129
|
}
|
|
@@ -135,7 +135,7 @@ const Tooltip = ( {
|
|
|
135
135
|
}
|
|
136
136
|
}, [ visible, keyboardVisible ] );
|
|
137
137
|
|
|
138
|
-
// Manage tooltip position during keyboard frame changes
|
|
138
|
+
// Manage tooltip position during keyboard frame changes.
|
|
139
139
|
useEffect( () => {
|
|
140
140
|
const frameListener = Keyboard.addListener(
|
|
141
141
|
'keyboardWillChangeFrame',
|
|
@@ -253,7 +253,7 @@ const Tooltip = ( {
|
|
|
253
253
|
const TooltipSlot = ( { children, ...rest } ) => {
|
|
254
254
|
const [ handleScreenTouch, setHandleScreenTouch ] = useState( null );
|
|
255
255
|
const onHandleScreenTouch = ( callback ) => {
|
|
256
|
-
// Must use function to set state below as `callback` is a function itself
|
|
256
|
+
// Must use function to set state below as `callback` is a function itself.
|
|
257
257
|
setHandleScreenTouch( () => callback );
|
|
258
258
|
};
|
|
259
259
|
const handleTouchStart = () => {
|
|
@@ -16,7 +16,7 @@ import { act } from '@testing-library/react';
|
|
|
16
16
|
describe( 'Tooltip', () => {
|
|
17
17
|
describe( '#render()', () => {
|
|
18
18
|
it( 'should render children (abort) if multiple children passed', () => {
|
|
19
|
-
// Mount: Enzyme shallow does not support wrapping multiple nodes
|
|
19
|
+
// Mount: Enzyme shallow does not support wrapping multiple nodes.
|
|
20
20
|
const wrapper = mount(
|
|
21
21
|
<Tooltip>
|
|
22
22
|
<div />
|
|
@@ -145,7 +145,7 @@ describe( 'Tooltip', () => {
|
|
|
145
145
|
expect( popoverBeforeTimeout ).toHaveLength( 0 );
|
|
146
146
|
expect( originalMouseEnter ).toHaveBeenCalledTimes( 1 );
|
|
147
147
|
|
|
148
|
-
// Force delayedSetIsOver to be called
|
|
148
|
+
// Force delayedSetIsOver to be called.
|
|
149
149
|
setTimeout( () => {
|
|
150
150
|
const popoverAfterTimeout = wrapper.find( 'Popover' );
|
|
151
151
|
expect( popoverAfterTimeout ).toHaveLength( 1 );
|
|
@@ -15,7 +15,7 @@ import { SlotFillProvider } from '@wordpress/components';
|
|
|
15
15
|
*/
|
|
16
16
|
import Tooltip from '../index';
|
|
17
17
|
|
|
18
|
-
// Minimal tree to render tooltip
|
|
18
|
+
// Minimal tree to render tooltip.
|
|
19
19
|
const TooltipSlot = ( { children } ) => (
|
|
20
20
|
<SlotFillProvider>
|
|
21
21
|
<Tooltip.Slot>{ children }</Tooltip.Slot>
|
|
@@ -81,7 +81,7 @@ it( 'dismisses when the keyboard closes', () => {
|
|
|
81
81
|
</TooltipSlot>
|
|
82
82
|
);
|
|
83
83
|
|
|
84
|
-
// Show keyboard
|
|
84
|
+
// Show keyboard.
|
|
85
85
|
act( () => {
|
|
86
86
|
keyboardHandlers.forEach( ( [ event, handler ] ) => {
|
|
87
87
|
if ( event === 'keyboardDidShow' ) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`TreeGrid simple rendering renders a table, tbody and any child elements 1`] = `"<table role=\\"treegrid\\"><tbody><tr><td>Test</td></tr></tbody></table>"`;
|
|
3
|
+
exports[`TreeGrid simple rendering renders a table, tbody and any child elements 1`] = `"<table role=\\"treegrid\\"><tbody><tr role=\\"row\\" aria-level=\\"1\\" aria-posinset=\\"1\\" aria-setsize=\\"1\\"><td role=\\"gridcell\\">Test</td></tr></tbody></table>"`;
|