@wordpress/block-editor 14.3.3 → 14.4.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 +2 -0
- package/README.md +46 -0
- package/build/autocompleters/link.js +2 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/block-actions/index.js +1 -13
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-inspector/index.js +56 -75
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block.js +5 -19
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +5 -8
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +3 -11
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +5 -3
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +14 -6
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +2 -4
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +13 -10
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +11 -13
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +2 -4
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -6
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/index.js +17 -14
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +16 -19
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +8 -11
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +1 -4
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +2 -5
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-toolbar.js +2 -12
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build/components/block-variation-picker/index.js +2 -4
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -4
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/button-block-appender/index.js +2 -4
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +2 -4
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/global-styles/border-panel.js +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -3
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -4
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +24 -29
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/inner-blocks/index.js +1 -9
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +1 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +24 -5
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +23 -10
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +35 -13
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/menu.js +2 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +5 -5
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +4 -4
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +11 -8
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +4 -8
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/link-control/index.js +5 -10
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +2 -4
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/list-view/block-contents.js +1 -25
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -4
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/media-placeholder/index.js +29 -43
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/rich-text/index.js +4 -8
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +2 -4
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/tool-selector/index.js +13 -12
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/button.js +14 -16
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +2 -4
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +0 -61
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +2 -25
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/block-bindings.js +6 -13
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/duotone.js +4 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/layout-child.js +3 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/position.js +3 -2
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +5 -4
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/layouts/flex.js +6 -38
- package/build/layouts/flex.js.map +1 -1
- package/build/private-apis.js +0 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +13 -14
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +15 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +104 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +22 -26
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +127 -56
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +4 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +50 -0
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/index.js +7 -0
- package/build/utils/index.js.map +1 -1
- package/build-module/autocompleters/link.js +2 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/block-actions/index.js +1 -13
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +57 -76
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block.js +5 -19
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/index.js +5 -8
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +3 -11
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +5 -3
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +14 -6
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +2 -4
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +13 -10
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +10 -20
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +11 -13
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +2 -4
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +79 -76
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +2 -7
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-switcher/index.js +17 -14
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +17 -20
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +8 -11
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +1 -4
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +2 -5
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +2 -12
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +2 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +3 -4
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +2 -4
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +2 -4
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +1 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -4
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +2 -4
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +25 -30
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +1 -9
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +1 -1
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +23 -10
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +35 -13
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/menu.js +2 -2
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +6 -6
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +4 -4
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +12 -9
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +4 -8
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/link-control/index.js +5 -10
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +2 -4
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +1 -25
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +2 -5
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +30 -44
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +4 -8
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +2 -4
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +13 -12
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-input/button.js +15 -17
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +1 -62
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -26
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/block-bindings.js +6 -13
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/duotone.js +4 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/layout-child.js +4 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/position.js +4 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +5 -4
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/layouts/flex.js +7 -39
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/private-apis.js +0 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +12 -12
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +14 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +98 -7
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +21 -25
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +129 -58
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -2
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +50 -0
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/index.js +1 -0
- package/build-module/utils/index.js.map +1 -1
- package/build-style/content-rtl.css +16 -70
- package/build-style/content.css +16 -70
- package/build-style/default-editor-styles-rtl.css +10 -1
- package/build-style/default-editor-styles.css +10 -1
- package/build-style/style-rtl.css +51 -149
- package/build-style/style.css +51 -149
- package/package.json +32 -32
- package/src/autocompleters/link.js +2 -1
- package/src/components/block-actions/index.js +1 -13
- package/src/components/block-draggable/style.scss +2 -2
- package/src/components/block-inspector/index.js +79 -95
- package/src/components/block-inspector/style.scss +2 -0
- package/src/components/block-list/block.js +7 -28
- package/src/components/block-list/content.scss +1 -61
- package/src/components/block-list/index.js +21 -29
- package/src/components/block-list/use-block-props/index.js +3 -10
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
- package/src/components/block-list/use-in-between-inserter.js +5 -2
- package/src/components/block-list/zoom-out-separator.js +24 -8
- package/src/components/block-navigation/dropdown.js +1 -2
- package/src/components/block-parent-selector/index.js +13 -10
- package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
- package/src/components/block-patterns-paging/index.js +8 -7
- package/src/components/block-patterns-paging/style.scss +10 -27
- package/src/components/block-quick-navigation/index.js +1 -2
- package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
- package/src/components/block-settings-menu-controls/index.js +0 -15
- package/src/components/block-switcher/index.js +37 -30
- package/src/components/block-toolbar/index.js +22 -34
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
- package/src/components/block-tools/index.js +7 -16
- package/src/components/block-tools/insertion-point.js +1 -4
- package/src/components/block-tools/style.scss +3 -88
- package/src/components/block-tools/use-show-block-tools.js +2 -12
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
- package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
- package/src/components/block-tools/zoom-out-toolbar.js +2 -13
- package/src/components/block-variation-picker/index.js +1 -2
- package/src/components/block-variation-transforms/index.js +2 -2
- package/src/components/button-block-appender/content.scss +0 -5
- package/src/components/button-block-appender/index.js +1 -2
- package/src/components/colors-gradients/dropdown.js +1 -5
- package/src/components/font-family/README.md +5 -1
- package/src/components/global-styles/border-panel.js +1 -1
- package/src/components/global-styles/color-panel.js +1 -5
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/global-styles/filters-panel.js +1 -2
- package/src/components/global-styles/shadow-panel-components.js +28 -33
- package/src/components/global-styles/style.scss +5 -0
- package/src/components/inner-blocks/index.js +1 -16
- package/src/components/inserter/block-types-tab.js +1 -1
- package/src/components/inserter/hooks/use-block-types-state.js +34 -14
- package/src/components/inserter/hooks/use-insertion-point.js +35 -13
- package/src/components/inserter/hooks/use-patterns-state.js +46 -9
- package/src/components/inserter/media-tab/media-preview.js +38 -12
- package/src/components/inserter/menu.js +2 -2
- package/src/components/inserter/mobile-tab-navigation.js +10 -13
- package/src/components/inserter/quick-inserter.js +5 -4
- package/src/components/inserter/style.scss +0 -28
- package/src/components/inspector-controls-tabs/index.js +21 -20
- package/src/components/inspector-controls-tabs/style.scss +2 -6
- package/src/components/inspector-popover-header/index.js +2 -4
- package/src/components/inspector-popover-header/style.scss +0 -13
- package/src/components/link-control/index.js +2 -5
- package/src/components/link-control/settings-drawer.js +1 -2
- package/src/components/list-view/block-contents.js +1 -28
- package/src/components/list-view/block-select-button.js +2 -5
- package/src/components/list-view/style.scss +18 -14
- package/src/components/media-placeholder/content.scss +3 -19
- package/src/components/media-placeholder/index.js +23 -29
- package/src/components/rich-text/index.js +4 -13
- package/src/components/skip-to-selected-block/index.js +1 -2
- package/src/components/skip-to-selected-block/style.scss +0 -9
- package/src/components/tool-selector/index.js +14 -9
- package/src/components/tool-selector/style.scss +5 -0
- package/src/components/url-input/button.js +16 -12
- package/src/components/url-input/index.js +1 -2
- package/src/components/url-input/style.scss +0 -6
- package/src/components/use-block-commands/index.js +0 -58
- package/src/components/writing-flow/use-tab-nav.js +4 -36
- package/src/content.scss +0 -1
- package/src/hooks/block-bindings.js +9 -10
- package/src/hooks/duotone.js +4 -1
- package/src/hooks/layout-child.js +4 -1
- package/src/hooks/position.js +4 -1
- package/src/hooks/use-bindings-attributes.js +66 -63
- package/src/layouts/flex.js +10 -53
- package/src/private-apis.js +0 -2
- package/src/store/actions.js +14 -13
- package/src/store/private-actions.js +14 -0
- package/src/store/private-selectors.js +120 -16
- package/src/store/reducer.js +22 -28
- package/src/store/selectors.js +203 -114
- package/src/store/test/private-actions.js +15 -0
- package/src/store/test/private-selectors.js +34 -0
- package/src/store/test/reducer.js +40 -4
- package/src/store/test/selectors.js +183 -20
- package/src/store/utils.js +4 -2
- package/src/utils/block-bindings.js +49 -0
- package/src/utils/index.js +1 -0
- package/build/components/block-controls/use-has-block-controls.js +0 -43
- package/build/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build/components/block-tools/block-selection-button.js +0 -259
- package/build/components/block-tools/block-selection-button.js.map +0 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build/components/inserter/tabs.js +0 -78
- package/build/components/inserter/tabs.js.map +0 -1
- package/build-module/components/block-controls/use-has-block-controls.js +0 -34
- package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build-module/components/block-tools/block-selection-button.js +0 -254
- package/build-module/components/block-tools/block-selection-button.js.map +0 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build-module/components/inserter/tabs.js +0 -72
- package/build-module/components/inserter/tabs.js.map +0 -1
- package/src/components/block-controls/use-has-block-controls.js +0 -35
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
- package/src/components/block-tools/block-selection-button.js +0 -302
- package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
- package/src/components/inner-blocks/content.scss +0 -13
- package/src/components/inserter/tabs.js +0 -78
- package/src/components/inserter/test/block-types-tab.native.js +0 -67
|
@@ -47,26 +47,17 @@ const pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();
|
|
|
47
47
|
|
|
48
48
|
function Root( { className, ...settings } ) {
|
|
49
49
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
50
|
-
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = unlock( select( blockEditorStore ) );
|
|
62
|
-
const { outlineMode, focusMode } = getSettings();
|
|
63
|
-
return {
|
|
64
|
-
isOutlineMode: outlineMode && ! isTyping(),
|
|
65
|
-
isFocusMode: focusMode,
|
|
66
|
-
editorMode: __unstableGetEditorMode(),
|
|
67
|
-
temporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks(),
|
|
68
|
-
};
|
|
69
|
-
}, [] );
|
|
50
|
+
const { isOutlineMode, isFocusMode, temporarilyEditingAsBlocks } =
|
|
51
|
+
useSelect( ( select ) => {
|
|
52
|
+
const { getSettings, getTemporarilyEditingAsBlocks, isTyping } =
|
|
53
|
+
unlock( select( blockEditorStore ) );
|
|
54
|
+
const { outlineMode, focusMode } = getSettings();
|
|
55
|
+
return {
|
|
56
|
+
isOutlineMode: outlineMode && ! isTyping(),
|
|
57
|
+
isFocusMode: focusMode,
|
|
58
|
+
temporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks(),
|
|
59
|
+
};
|
|
60
|
+
}, [] );
|
|
70
61
|
const registry = useRegistry();
|
|
71
62
|
const { setBlockVisibility } = useDispatch( blockEditorStore );
|
|
72
63
|
|
|
@@ -115,7 +106,6 @@ function Root( { className, ...settings } ) {
|
|
|
115
106
|
className: clsx( 'is-root-container', className, {
|
|
116
107
|
'is-outline-mode': isOutlineMode,
|
|
117
108
|
'is-focus-mode': isFocusMode && isLargeViewport,
|
|
118
|
-
'is-navigate-mode': editorMode === 'navigation',
|
|
119
109
|
} ),
|
|
120
110
|
},
|
|
121
111
|
settings
|
|
@@ -192,7 +182,8 @@ function Items( {
|
|
|
192
182
|
getTemplateLock,
|
|
193
183
|
getBlockEditingMode,
|
|
194
184
|
__unstableGetEditorMode,
|
|
195
|
-
|
|
185
|
+
isSectionBlock,
|
|
186
|
+
} = unlock( select( blockEditorStore ) );
|
|
196
187
|
|
|
197
188
|
const _order = getBlockOrder( rootClientId );
|
|
198
189
|
|
|
@@ -211,15 +202,16 @@ function Items( {
|
|
|
211
202
|
visibleBlocks: __unstableGetVisibleBlocks(),
|
|
212
203
|
isZoomOut: __unstableGetEditorMode() === 'zoom-out',
|
|
213
204
|
shouldRenderAppender:
|
|
205
|
+
! isSectionBlock( rootClientId ) &&
|
|
206
|
+
getBlockEditingMode( rootClientId ) !== 'disabled' &&
|
|
207
|
+
! getTemplateLock( rootClientId ) &&
|
|
214
208
|
hasAppender &&
|
|
215
209
|
__unstableGetEditorMode() !== 'zoom-out' &&
|
|
216
|
-
( hasCustomAppender
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
! selectedBlockClientId &&
|
|
222
|
-
! _order.length ) ),
|
|
210
|
+
( hasCustomAppender ||
|
|
211
|
+
rootClientId === selectedBlockClientId ||
|
|
212
|
+
( ! rootClientId &&
|
|
213
|
+
! selectedBlockClientId &&
|
|
214
|
+
! _order.length ) ),
|
|
223
215
|
};
|
|
224
216
|
},
|
|
225
217
|
[ rootClientId, hasAppender, hasCustomAppender ]
|
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
} from '../../block-edit/context';
|
|
26
26
|
import { useFocusHandler } from './use-focus-handler';
|
|
27
27
|
import { useEventHandlers } from './use-selected-block-event-handlers';
|
|
28
|
-
import { useNavModeExit } from './use-nav-mode-exit';
|
|
29
28
|
import { useZoomOutModeExit } from './use-zoom-out-mode-exit';
|
|
30
29
|
import { useBlockRefProvider } from './use-block-refs';
|
|
31
30
|
import { useIntersectionObserver } from './use-intersection-observer';
|
|
@@ -86,7 +85,6 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
86
85
|
name,
|
|
87
86
|
blockApiVersion,
|
|
88
87
|
blockTitle,
|
|
89
|
-
editorMode,
|
|
90
88
|
isSelected,
|
|
91
89
|
isSubtreeDisabled,
|
|
92
90
|
hasOverlay,
|
|
@@ -98,13 +96,11 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
98
96
|
isReusable,
|
|
99
97
|
isDragging,
|
|
100
98
|
hasChildSelected,
|
|
101
|
-
isBlockMovingMode,
|
|
102
|
-
canInsertMovingBlock,
|
|
103
99
|
isEditingDisabled,
|
|
104
100
|
hasEditableOutline,
|
|
105
101
|
isTemporarilyEditingAsBlocks,
|
|
106
102
|
defaultClassName,
|
|
107
|
-
|
|
103
|
+
isSectionBlock,
|
|
108
104
|
} = useContext( PrivateBlockContext );
|
|
109
105
|
|
|
110
106
|
// translators: %s: Type of block (i.e. Text, Image etc)
|
|
@@ -116,15 +112,14 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
116
112
|
useBlockRefProvider( clientId ),
|
|
117
113
|
useFocusHandler( clientId ),
|
|
118
114
|
useEventHandlers( { clientId, isSelected } ),
|
|
119
|
-
|
|
120
|
-
useZoomOutModeExit( { editorMode } ),
|
|
115
|
+
useZoomOutModeExit(),
|
|
121
116
|
useIsHovered( { clientId } ),
|
|
122
117
|
useIntersectionObserver(),
|
|
123
118
|
useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
|
|
124
119
|
useDisabled( { isDisabled: ! hasOverlay } ),
|
|
125
120
|
useFlashEditableBlocks( {
|
|
126
121
|
clientId,
|
|
127
|
-
isEnabled:
|
|
122
|
+
isEnabled: isSectionBlock,
|
|
128
123
|
} ),
|
|
129
124
|
useScrollIntoView( { isSelected } ),
|
|
130
125
|
] );
|
|
@@ -182,8 +177,6 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
182
177
|
'is-reusable': isReusable,
|
|
183
178
|
'is-dragging': isDragging,
|
|
184
179
|
'has-child-selected': hasChildSelected,
|
|
185
|
-
'is-block-moving-mode': isBlockMovingMode,
|
|
186
|
-
'can-insert-moving-block': canInsertMovingBlock,
|
|
187
180
|
'is-editing-disabled': isEditingDisabled,
|
|
188
181
|
'has-editable-outline': hasEditableOutline,
|
|
189
182
|
'has-negative-margin': hasNegativeMargin,
|
|
@@ -12,25 +12,27 @@ import { unlock } from '../../../lock-unlock';
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Allows Zoom Out mode to be exited by double clicking in the selected block.
|
|
15
|
-
*
|
|
16
|
-
* @param {string} clientId Block client ID.
|
|
17
15
|
*/
|
|
18
|
-
export function useZoomOutModeExit(
|
|
19
|
-
const { getSettings, isZoomOut } = unlock(
|
|
16
|
+
export function useZoomOutModeExit() {
|
|
17
|
+
const { getSettings, isZoomOut, __unstableGetEditorMode } = unlock(
|
|
18
|
+
useSelect( blockEditorStore )
|
|
19
|
+
);
|
|
20
|
+
|
|
20
21
|
const { __unstableSetEditorMode, resetZoomLevel } = unlock(
|
|
21
22
|
useDispatch( blockEditorStore )
|
|
22
23
|
);
|
|
23
24
|
|
|
24
25
|
return useRefEffect(
|
|
25
26
|
( node ) => {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
function onDoubleClick( event ) {
|
|
28
|
+
// In "compose" mode.
|
|
29
|
+
const composeMode =
|
|
30
|
+
__unstableGetEditorMode() === 'zoom-out' && isZoomOut();
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
if ( ! composeMode ) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
32
35
|
|
|
33
|
-
function onDoubleClick( event ) {
|
|
34
36
|
if ( ! event.defaultPrevented ) {
|
|
35
37
|
event.preventDefault();
|
|
36
38
|
|
|
@@ -52,6 +54,12 @@ export function useZoomOutModeExit( { editorMode } ) {
|
|
|
52
54
|
node.removeEventListener( 'dblclick', onDoubleClick );
|
|
53
55
|
};
|
|
54
56
|
},
|
|
55
|
-
[
|
|
57
|
+
[
|
|
58
|
+
getSettings,
|
|
59
|
+
__unstableSetEditorMode,
|
|
60
|
+
__unstableGetEditorMode,
|
|
61
|
+
isZoomOut,
|
|
62
|
+
resetZoomLevel,
|
|
63
|
+
]
|
|
56
64
|
);
|
|
57
65
|
}
|
|
@@ -11,6 +11,7 @@ import { isRTL } from '@wordpress/i18n';
|
|
|
11
11
|
*/
|
|
12
12
|
import { store as blockEditorStore } from '../../store';
|
|
13
13
|
import { InsertionPointOpenRef } from '../block-tools/insertion-point';
|
|
14
|
+
import { unlock } from '../../lock-unlock';
|
|
14
15
|
|
|
15
16
|
export function useInBetweenInserter() {
|
|
16
17
|
const openRef = useContext( InsertionPointOpenRef );
|
|
@@ -31,7 +32,8 @@ export function useInBetweenInserter() {
|
|
|
31
32
|
getBlockEditingMode,
|
|
32
33
|
getBlockName,
|
|
33
34
|
getBlockAttributes,
|
|
34
|
-
|
|
35
|
+
getParentSectionBlock,
|
|
36
|
+
} = unlock( useSelect( blockEditorStore ) );
|
|
35
37
|
const { showInsertionPoint, hideInsertionPoint } =
|
|
36
38
|
useDispatch( blockEditorStore );
|
|
37
39
|
|
|
@@ -133,7 +135,8 @@ export function useInBetweenInserter() {
|
|
|
133
135
|
const clientId = element.id.slice( 'block-'.length );
|
|
134
136
|
if (
|
|
135
137
|
! clientId ||
|
|
136
|
-
__unstableIsWithinBlockOverlay( clientId )
|
|
138
|
+
__unstableIsWithinBlockOverlay( clientId ) ||
|
|
139
|
+
!! getParentSectionBlock( clientId )
|
|
137
140
|
) {
|
|
138
141
|
return;
|
|
139
142
|
}
|
|
@@ -30,14 +30,16 @@ export function ZoomOutSeparator( {
|
|
|
30
30
|
const {
|
|
31
31
|
sectionRootClientId,
|
|
32
32
|
sectionClientIds,
|
|
33
|
-
|
|
33
|
+
insertionPoint,
|
|
34
34
|
blockInsertionPointVisible,
|
|
35
|
+
blockInsertionPoint,
|
|
35
36
|
} = useSelect( ( select ) => {
|
|
36
37
|
const {
|
|
37
|
-
|
|
38
|
+
getInsertionPoint,
|
|
38
39
|
getBlockOrder,
|
|
39
|
-
isBlockInsertionPointVisible,
|
|
40
40
|
getSectionRootClientId,
|
|
41
|
+
isBlockInsertionPointVisible,
|
|
42
|
+
getBlockInsertionPoint,
|
|
41
43
|
} = unlock( select( blockEditorStore ) );
|
|
42
44
|
|
|
43
45
|
const root = getSectionRootClientId();
|
|
@@ -46,6 +48,7 @@ export function ZoomOutSeparator( {
|
|
|
46
48
|
sectionRootClientId: root,
|
|
47
49
|
sectionClientIds: sectionRootClientIds,
|
|
48
50
|
blockOrder: getBlockOrder( root ),
|
|
51
|
+
insertionPoint: getInsertionPoint(),
|
|
49
52
|
blockInsertionPoint: getBlockInsertionPoint(),
|
|
50
53
|
blockInsertionPointVisible: isBlockInsertionPointVisible(),
|
|
51
54
|
};
|
|
@@ -68,17 +71,30 @@ export function ZoomOutSeparator( {
|
|
|
68
71
|
return null;
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
const hasTopInsertionPoint =
|
|
75
|
+
insertionPoint?.index === 0 &&
|
|
76
|
+
clientId === sectionClientIds[ insertionPoint.index ];
|
|
77
|
+
const hasBottomInsertionPoint =
|
|
78
|
+
insertionPoint &&
|
|
79
|
+
insertionPoint.hasOwnProperty( 'index' ) &&
|
|
80
|
+
clientId === sectionClientIds[ insertionPoint.index - 1 ];
|
|
81
|
+
// We want to show the zoom out separator in either of these conditions:
|
|
82
|
+
// 1. If the inserter has an insertion index set
|
|
83
|
+
// 2. We are dragging a pattern over an insertion point
|
|
71
84
|
if ( position === 'top' ) {
|
|
72
85
|
isVisible =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
hasTopInsertionPoint ||
|
|
87
|
+
( blockInsertionPointVisible &&
|
|
88
|
+
blockInsertionPoint.index === 0 &&
|
|
89
|
+
clientId === sectionClientIds[ blockInsertionPoint.index ] );
|
|
76
90
|
}
|
|
77
91
|
|
|
78
92
|
if ( position === 'bottom' ) {
|
|
79
93
|
isVisible =
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
hasBottomInsertionPoint ||
|
|
95
|
+
( blockInsertionPointVisible &&
|
|
96
|
+
clientId ===
|
|
97
|
+
sectionClientIds[ blockInsertionPoint.index - 1 ] );
|
|
82
98
|
}
|
|
83
99
|
|
|
84
100
|
return (
|
|
@@ -14,6 +14,7 @@ import useBlockDisplayInformation from '../use-block-display-information';
|
|
|
14
14
|
import BlockIcon from '../block-icon';
|
|
15
15
|
import { useShowHoveredOrFocusedGestures } from '../block-toolbar/utils';
|
|
16
16
|
import { store as blockEditorStore } from '../../store';
|
|
17
|
+
import { unlock } from '../../lock-unlock';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Block parent selector component, displaying the hierarchy of the
|
|
@@ -23,24 +24,26 @@ import { store as blockEditorStore } from '../../store';
|
|
|
23
24
|
*/
|
|
24
25
|
export default function BlockParentSelector() {
|
|
25
26
|
const { selectBlock } = useDispatch( blockEditorStore );
|
|
26
|
-
const {
|
|
27
|
+
const { parentClientId, isVisible } = useSelect( ( select ) => {
|
|
27
28
|
const {
|
|
28
29
|
getBlockName,
|
|
29
30
|
getBlockParents,
|
|
30
31
|
getSelectedBlockClientId,
|
|
31
32
|
getBlockEditingMode,
|
|
32
|
-
|
|
33
|
+
getParentSectionBlock,
|
|
34
|
+
} = unlock( select( blockEditorStore ) );
|
|
33
35
|
const { hasBlockSupport } = select( blocksStore );
|
|
34
36
|
const selectedBlockClientId = getSelectedBlockClientId();
|
|
37
|
+
const parentSection = getParentSectionBlock( selectedBlockClientId );
|
|
35
38
|
const parents = getBlockParents( selectedBlockClientId );
|
|
36
|
-
const
|
|
37
|
-
const parentBlockName = getBlockName(
|
|
39
|
+
const _parentClientId = parentSection ?? parents[ parents.length - 1 ];
|
|
40
|
+
const parentBlockName = getBlockName( _parentClientId );
|
|
38
41
|
const _parentBlockType = getBlockType( parentBlockName );
|
|
39
42
|
return {
|
|
40
|
-
|
|
43
|
+
parentClientId: _parentClientId,
|
|
41
44
|
isVisible:
|
|
42
|
-
|
|
43
|
-
getBlockEditingMode(
|
|
45
|
+
_parentClientId &&
|
|
46
|
+
getBlockEditingMode( _parentClientId ) !== 'disabled' &&
|
|
44
47
|
hasBlockSupport(
|
|
45
48
|
_parentBlockType,
|
|
46
49
|
'__experimentalParentSelector',
|
|
@@ -48,7 +51,7 @@ export default function BlockParentSelector() {
|
|
|
48
51
|
),
|
|
49
52
|
};
|
|
50
53
|
}, [] );
|
|
51
|
-
const blockInformation = useBlockDisplayInformation(
|
|
54
|
+
const blockInformation = useBlockDisplayInformation( parentClientId );
|
|
52
55
|
|
|
53
56
|
// Allows highlighting the parent block outline when focusing or hovering
|
|
54
57
|
// the parent block selector within the child.
|
|
@@ -65,13 +68,13 @@ export default function BlockParentSelector() {
|
|
|
65
68
|
return (
|
|
66
69
|
<div
|
|
67
70
|
className="block-editor-block-parent-selector"
|
|
68
|
-
key={
|
|
71
|
+
key={ parentClientId }
|
|
69
72
|
ref={ nodeRef }
|
|
70
73
|
{ ...showHoveredOrFocusedGestures }
|
|
71
74
|
>
|
|
72
75
|
<ToolbarButton
|
|
73
76
|
className="block-editor-block-parent-selector__button"
|
|
74
|
-
onClick={ () => selectBlock(
|
|
77
|
+
onClick={ () => selectBlock( parentClientId ) }
|
|
75
78
|
label={ sprintf(
|
|
76
79
|
/* translators: %s: Name of the block's parent. */
|
|
77
80
|
__( 'Select parent block: %s' ),
|
|
@@ -18,8 +18,7 @@ import { VIEWMODES } from './constants';
|
|
|
18
18
|
const Actions = ( { onBlockPatternSelect } ) => (
|
|
19
19
|
<div className="block-editor-block-pattern-setup__actions">
|
|
20
20
|
<Button
|
|
21
|
-
|
|
22
|
-
__next40pxDefaultSize={ false }
|
|
21
|
+
__next40pxDefaultSize
|
|
23
22
|
variant="primary"
|
|
24
23
|
onClick={ onBlockPatternSelect }
|
|
25
24
|
>
|
|
@@ -36,8 +35,7 @@ const CarouselNavigation = ( {
|
|
|
36
35
|
} ) => (
|
|
37
36
|
<div className="block-editor-block-pattern-setup__navigation">
|
|
38
37
|
<Button
|
|
39
|
-
|
|
40
|
-
__next40pxDefaultSize={ false }
|
|
38
|
+
size="compact"
|
|
41
39
|
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
42
40
|
label={ __( 'Previous pattern' ) }
|
|
43
41
|
onClick={ handlePrevious }
|
|
@@ -45,8 +43,7 @@ const CarouselNavigation = ( {
|
|
|
45
43
|
accessibleWhenDisabled
|
|
46
44
|
/>
|
|
47
45
|
<Button
|
|
48
|
-
|
|
49
|
-
__next40pxDefaultSize={ false }
|
|
46
|
+
size="compact"
|
|
50
47
|
icon={ isRTL() ? chevronLeft : chevronRight }
|
|
51
48
|
label={ __( 'Next pattern' ) }
|
|
52
49
|
onClick={ handleNext }
|
|
@@ -69,16 +66,14 @@ const SetupToolbar = ( {
|
|
|
69
66
|
const displayControls = (
|
|
70
67
|
<div className="block-editor-block-pattern-setup__display-controls">
|
|
71
68
|
<Button
|
|
72
|
-
|
|
73
|
-
__next40pxDefaultSize={ false }
|
|
69
|
+
size="compact"
|
|
74
70
|
icon={ stretchFullWidth }
|
|
75
71
|
label={ __( 'Carousel view' ) }
|
|
76
72
|
onClick={ () => setViewMode( VIEWMODES.carousel ) }
|
|
77
73
|
isPressed={ isCarouselView }
|
|
78
74
|
/>
|
|
79
75
|
<Button
|
|
80
|
-
|
|
81
|
-
__next40pxDefaultSize={ false }
|
|
76
|
+
size="compact"
|
|
82
77
|
icon={ grid }
|
|
83
78
|
label={ __( 'Grid view' ) }
|
|
84
79
|
onClick={ () => setViewMode( VIEWMODES.grid ) }
|
|
@@ -38,24 +38,24 @@ export default function Pagination( {
|
|
|
38
38
|
className="block-editor-patterns__grid-pagination-previous"
|
|
39
39
|
>
|
|
40
40
|
<Button
|
|
41
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
42
|
-
__next40pxDefaultSize={ false }
|
|
43
41
|
variant="tertiary"
|
|
44
42
|
onClick={ () => changePage( 1 ) }
|
|
45
43
|
disabled={ currentPage === 1 }
|
|
46
44
|
aria-label={ __( 'First page' ) }
|
|
45
|
+
size="compact"
|
|
47
46
|
accessibleWhenDisabled
|
|
47
|
+
className="block-editor-patterns__grid-pagination-button"
|
|
48
48
|
>
|
|
49
49
|
<span>«</span>
|
|
50
50
|
</Button>
|
|
51
51
|
<Button
|
|
52
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
53
|
-
__next40pxDefaultSize={ false }
|
|
54
52
|
variant="tertiary"
|
|
55
53
|
onClick={ () => changePage( currentPage - 1 ) }
|
|
56
54
|
disabled={ currentPage === 1 }
|
|
57
55
|
aria-label={ __( 'Previous page' ) }
|
|
56
|
+
size="compact"
|
|
58
57
|
accessibleWhenDisabled
|
|
58
|
+
className="block-editor-patterns__grid-pagination-button"
|
|
59
59
|
>
|
|
60
60
|
<span>‹</span>
|
|
61
61
|
</Button>
|
|
@@ -74,13 +74,13 @@ export default function Pagination( {
|
|
|
74
74
|
className="block-editor-patterns__grid-pagination-next"
|
|
75
75
|
>
|
|
76
76
|
<Button
|
|
77
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
78
|
-
__next40pxDefaultSize={ false }
|
|
79
77
|
variant="tertiary"
|
|
80
78
|
onClick={ () => changePage( currentPage + 1 ) }
|
|
81
79
|
disabled={ currentPage === numPages }
|
|
82
80
|
aria-label={ __( 'Next page' ) }
|
|
81
|
+
size="compact"
|
|
83
82
|
accessibleWhenDisabled
|
|
83
|
+
className="block-editor-patterns__grid-pagination-button"
|
|
84
84
|
>
|
|
85
85
|
<span>›</span>
|
|
86
86
|
</Button>
|
|
@@ -89,8 +89,9 @@ export default function Pagination( {
|
|
|
89
89
|
onClick={ () => changePage( numPages ) }
|
|
90
90
|
disabled={ currentPage === numPages }
|
|
91
91
|
aria-label={ __( 'Last page' ) }
|
|
92
|
-
size="
|
|
92
|
+
size="compact"
|
|
93
93
|
accessibleWhenDisabled
|
|
94
|
+
className="block-editor-patterns__grid-pagination-button"
|
|
94
95
|
>
|
|
95
96
|
<span>»</span>
|
|
96
97
|
</Button>
|
|
@@ -4,37 +4,20 @@
|
|
|
4
4
|
border-top: 1px solid $gray-800;
|
|
5
5
|
padding: $grid-unit-05;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
.components-button.is-tertiary {
|
|
8
|
-
width: auto;
|
|
9
|
-
height: $button-size-compact;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
|
|
12
|
-
&:disabled {
|
|
13
|
-
color: $gray-600;
|
|
14
|
-
background: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&:hover:not(:disabled) {
|
|
18
|
-
color: $white;
|
|
19
|
-
background-color: $gray-700;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
7
|
}
|
|
23
8
|
}
|
|
24
9
|
|
|
25
10
|
.show-icon-labels {
|
|
26
|
-
.block-editor-patterns__grid-pagination {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
content: attr(aria-label);
|
|
37
|
-
}
|
|
11
|
+
.block-editor-patterns__grid-pagination-button {
|
|
12
|
+
width: auto;
|
|
13
|
+
// Hide the button icons when labels are set to display...
|
|
14
|
+
span {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
// ... and display labels.
|
|
18
|
+
// Uses ::before as ::after is already used for active tab styling.
|
|
19
|
+
&::before {
|
|
20
|
+
content: attr(aria-label);
|
|
38
21
|
}
|
|
39
22
|
}
|
|
40
23
|
}
|
|
@@ -59,8 +59,7 @@ function BlockQuickNavigationItem( { clientId, onSelect } ) {
|
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<Button
|
|
62
|
-
|
|
63
|
-
__next40pxDefaultSize={ false }
|
|
62
|
+
__next40pxDefaultSize
|
|
64
63
|
isPressed={ isSelected }
|
|
65
64
|
onClick={ async () => {
|
|
66
65
|
await selectBlock( clientId );
|