@wordpress/block-editor 10.3.0 → 10.5.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 +13 -0
- package/README.md +0 -1
- package/build/components/alignment-control/ui.js +1 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/constants.js +1 -1
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +1 -1
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-compare/index.js +1 -3
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-edit/index.js +4 -2
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-list/block.js +3 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-lock/menu-item.js +1 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +16 -9
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-popover/inbetween.js +2 -1
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +2 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/index.js +2 -4
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +2 -8
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/utils.js +3 -3
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/index.js +21 -12
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +1 -1
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +12 -2
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +27 -4
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +1 -1
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js +2 -1
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js +2 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +2 -1
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/colors/with-colors.js +4 -3
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/duotone-control/index.js +1 -1
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +24 -40
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +8 -6
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/iframe/index.js +1 -1
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/constants.js +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/index.js +9 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +10 -4
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +2 -7
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.js +4 -1
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/inserter/search-items.js +23 -2
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/line-height-control/index.js +2 -1
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/index.js +18 -34
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-input.js +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/use-internal-input-value.js +26 -0
- package/build/components/link-control/use-internal-input-value.js.map +1 -0
- package/build/components/list-view/block.js +5 -3
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +9 -3
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +2 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/media-replace-flow/index.js +1 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/off-canvas-editor/block-contents.js +100 -0
- package/build/components/off-canvas-editor/block-contents.js.map +1 -0
- package/build/components/off-canvas-editor/block-select-button.js +119 -0
- package/build/components/off-canvas-editor/block-select-button.js.map +1 -0
- package/build/components/off-canvas-editor/block.js +292 -0
- package/build/components/off-canvas-editor/block.js.map +1 -0
- package/build/components/off-canvas-editor/branch.js +181 -0
- package/build/components/off-canvas-editor/branch.js.map +1 -0
- package/build/components/off-canvas-editor/context.js +19 -0
- package/build/components/off-canvas-editor/context.js.map +1 -0
- package/build/components/off-canvas-editor/drop-indicator.js +118 -0
- package/build/components/off-canvas-editor/drop-indicator.js.map +1 -0
- package/build/components/off-canvas-editor/expander.js +41 -0
- package/build/components/off-canvas-editor/expander.js.map +1 -0
- package/build/components/off-canvas-editor/index.js +204 -0
- package/build/components/off-canvas-editor/index.js.map +1 -0
- package/build/components/off-canvas-editor/leaf.js +60 -0
- package/build/components/off-canvas-editor/leaf.js.map +1 -0
- package/build/components/off-canvas-editor/use-block-selection.js +139 -0
- package/build/components/off-canvas-editor/use-block-selection.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-client-ids.js +33 -0
- package/build/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js +235 -0
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js +60 -0
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
- package/build/components/off-canvas-editor/utils.js +60 -0
- package/build/components/off-canvas-editor/utils.js.map +1 -0
- package/build/components/rich-text/format-toolbar/index.js +1 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +1 -1
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +1 -1
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/spacing-sizes-control/all-input-control.js +6 -2
- package/build/components/spacing-sizes-control/all-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/axial-input-controls.js +6 -2
- package/build/components/spacing-sizes-control/axial-input-controls.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +6 -2
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls.js +6 -2
- package/build/components/spacing-sizes-control/input-controls.js.map +1 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js +12 -5
- package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build/components/url-input/index.js +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/index.js +31 -2
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/use-setting/index.js +1 -1
- package/build/components/use-setting/index.js.map +1 -1
- package/build/hooks/border.js +1 -0
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color-panel.js +17 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +13 -6
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/dimensions.js +72 -13
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/font-size.js +1 -0
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/layout.js +5 -4
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/margin.js +26 -18
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/min-height.js +145 -0
- package/build/hooks/min-height.js.map +1 -0
- package/build/hooks/padding.js +22 -13
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/style.js +3 -2
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/utils.js +7 -6
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +0 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +23 -22
- package/build/layouts/flex.js.map +1 -1
- package/build/store/actions.js +30 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js +1 -7
- package/build/store/array.js.map +1 -1
- package/build/store/reducer.js +46 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +62 -31
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +1 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-compare/index.js +2 -3
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-edit/index.js +4 -2
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-list/block.js +3 -1
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +2 -2
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +17 -10
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +2 -1
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +2 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/index.js +2 -3
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -7
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/utils.js +3 -3
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/index.js +21 -11
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +12 -2
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +27 -5
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js +2 -1
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +2 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +2 -1
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/colors/with-colors.js +5 -4
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/duotone-control/index.js +1 -1
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +24 -40
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +9 -7
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/iframe/index.js +1 -1
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/constants.js +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/index.js +1 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +10 -4
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +2 -6
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.js +3 -1
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/inserter/search-items.js +23 -3
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/line-height-control/index.js +2 -1
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/index.js +17 -34
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-input.js +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/use-internal-input-value.js +18 -0
- package/build-module/components/link-control/use-internal-input-value.js.map +1 -0
- package/build-module/components/list-view/block.js +5 -3
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +9 -3
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +2 -1
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +1 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-contents.js +85 -0
- package/build-module/components/off-canvas-editor/block-contents.js.map +1 -0
- package/build-module/components/off-canvas-editor/block-select-button.js +101 -0
- package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -0
- package/build-module/components/off-canvas-editor/block.js +268 -0
- package/build-module/components/off-canvas-editor/block.js.map +1 -0
- package/build-module/components/off-canvas-editor/branch.js +165 -0
- package/build-module/components/off-canvas-editor/branch.js.map +1 -0
- package/build-module/components/off-canvas-editor/context.js +7 -0
- package/build-module/components/off-canvas-editor/context.js.map +1 -0
- package/build-module/components/off-canvas-editor/drop-indicator.js +111 -0
- package/build-module/components/off-canvas-editor/drop-indicator.js.map +1 -0
- package/build-module/components/off-canvas-editor/expander.js +32 -0
- package/build-module/components/off-canvas-editor/expander.js.map +1 -0
- package/build-module/components/off-canvas-editor/index.js +181 -0
- package/build-module/components/off-canvas-editor/index.js.map +1 -0
- package/build-module/components/off-canvas-editor/leaf.js +45 -0
- package/build-module/components/off-canvas-editor/leaf.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-block-selection.js +124 -0
- package/build-module/components/off-canvas-editor/use-block-selection.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js +24 -0
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +220 -0
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js +50 -0
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
- package/build-module/components/off-canvas-editor/utils.js +44 -0
- package/build-module/components/off-canvas-editor/utils.js.map +1 -0
- package/build-module/components/rich-text/format-toolbar/index.js +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +1 -1
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/spacing-sizes-control/all-input-control.js +6 -2
- package/build-module/components/spacing-sizes-control/all-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/axial-input-controls.js +6 -2
- package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +6 -2
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls.js +6 -2
- package/build-module/components/spacing-sizes-control/input-controls.js.map +1 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js +12 -5
- package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build-module/components/url-input/index.js +1 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/index.js +30 -3
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/use-setting/index.js +1 -1
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/hooks/border.js +1 -0
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color-panel.js +17 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +15 -8
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/dimensions.js +67 -12
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/font-size.js +1 -0
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/layout.js +6 -5
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/margin.js +27 -19
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/min-height.js +122 -0
- package/build-module/hooks/min-height.js.map +1 -0
- package/build-module/hooks/padding.js +23 -14
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/style.js +4 -3
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/utils.js +7 -7
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +0 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +24 -23
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/store/actions.js +26 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js +1 -6
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/reducer.js +44 -14
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +59 -31
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +88 -88
- package/build-style/style.css +84 -84
- package/package.json +29 -28
- package/src/components/alignment-control/README.md +1 -1
- package/src/components/alignment-control/ui.js +1 -1
- package/src/components/block-alignment-control/constants.js +1 -1
- package/src/components/block-alignment-control/test/index.native.js +4 -4
- package/src/components/block-alignment-matrix-control/index.js +1 -1
- package/src/components/block-breadcrumb/test/__snapshots__/index.js.snap +13 -11
- package/src/components/block-breadcrumb/test/index.js +1 -1
- package/src/components/block-compare/index.js +3 -2
- package/src/components/block-draggable/test/helpers.native.js +3 -3
- package/src/components/block-draggable/test/index.native.js +27 -27
- package/src/components/block-edit/index.js +2 -1
- package/src/components/block-list/block.js +2 -0
- package/src/components/block-list/style.scss +11 -6
- package/src/components/block-lock/menu-item.js +5 -2
- package/src/components/block-lock/modal.js +19 -36
- package/src/components/block-lock/style.scss +8 -17
- package/src/components/block-mover/stories/index.js +1 -1
- package/src/components/block-mover/style.scss +35 -1
- package/src/components/block-popover/inbetween.js +1 -0
- package/src/components/block-popover/index.js +1 -0
- package/src/components/block-popover/style.scss +1 -5
- package/src/components/block-preview/index.js +8 -3
- package/src/components/block-settings-menu/block-settings-dropdown.js +4 -7
- package/src/components/block-styles/utils.js +3 -3
- package/src/components/block-switcher/index.js +21 -11
- package/src/components/block-switcher/preview-block-popover.js +1 -1
- package/src/components/block-tools/insertion-point.js +10 -1
- package/src/components/block-tools/selected-block-popover.js +80 -34
- package/src/components/block-tools/style.scss +15 -0
- package/src/components/block-variation-picker/README.md +1 -1
- package/src/components/block-vertical-alignment-control/ui.js +1 -1
- package/src/components/border-radius-control/all-input-control.js +1 -0
- package/src/components/border-radius-control/index.js +1 -0
- package/src/components/border-radius-control/input-controls.js +1 -0
- package/src/components/border-radius-control/style.scss +15 -24
- package/src/components/color-palette/test/__snapshots__/control.js.snap +85 -83
- package/src/components/color-palette/test/control.js +1 -1
- package/src/components/colors/with-colors.js +13 -23
- package/src/components/default-block-appender/style.scss +1 -0
- package/src/components/duotone-control/index.js +1 -1
- package/src/components/font-sizes/fluid-utils.js +37 -64
- package/src/components/font-sizes/test/fluid-utils.js +5 -5
- package/src/components/font-sizes/with-font-sizes.js +15 -13
- package/src/components/iframe/index.js +1 -1
- package/src/components/image-editor/constants.js +1 -1
- package/src/components/index.js +1 -0
- package/src/components/inner-blocks/index.js +11 -4
- package/src/components/inner-blocks/test/index.js +4 -0
- package/src/components/inserter/hooks/use-insertion-point.js +3 -11
- package/src/components/inserter/reusable-blocks-tab.js +4 -2
- package/src/components/inserter/search-items.js +23 -3
- package/src/components/inserter/style.scss +8 -7
- package/src/components/inserter/test/reusable-blocks-tab.js +14 -57
- package/src/components/inserter/test/search-items.js +6 -0
- package/src/components/inserter-list-item/style.scss +2 -0
- package/src/components/letter-spacing-control/README.md +55 -0
- package/src/components/line-height-control/index.js +1 -0
- package/src/components/link-control/README.md +3 -3
- package/src/components/link-control/index.js +23 -39
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/link-control/test/index.js +272 -241
- package/src/components/link-control/use-internal-input-value.js +22 -0
- package/src/components/list-view/block.js +4 -3
- package/src/components/list-view/branch.js +11 -6
- package/src/components/list-view/drop-indicator.js +1 -0
- package/src/components/list-view/style.scss +1 -36
- package/src/components/media-replace-flow/index.js +1 -1
- package/src/components/media-replace-flow/test/index.js +69 -51
- package/src/components/off-canvas-editor/README.md +5 -0
- package/src/components/off-canvas-editor/block-contents.js +89 -0
- package/src/components/off-canvas-editor/block-select-button.js +113 -0
- package/src/components/off-canvas-editor/block.js +335 -0
- package/src/components/off-canvas-editor/branch.js +210 -0
- package/src/components/off-canvas-editor/context.js +8 -0
- package/src/components/off-canvas-editor/drop-indicator.js +126 -0
- package/src/components/off-canvas-editor/expander.js +26 -0
- package/src/components/off-canvas-editor/index.js +216 -0
- package/src/components/off-canvas-editor/leaf.js +48 -0
- package/src/components/off-canvas-editor/style.scss +397 -0
- package/src/components/off-canvas-editor/test/utils.js +50 -0
- package/src/components/off-canvas-editor/use-block-selection.js +169 -0
- package/src/components/off-canvas-editor/use-list-view-client-ids.js +29 -0
- package/src/components/off-canvas-editor/use-list-view-drop-zone.js +260 -0
- package/src/components/off-canvas-editor/use-list-view-expand-selected-item.js +58 -0
- package/src/components/off-canvas-editor/utils.js +58 -0
- package/src/components/responsive-block-control/test/index.js +69 -92
- package/src/components/rich-text/format-toolbar/index.js +1 -1
- package/src/components/rich-text/format-toolbar-container.js +1 -1
- package/src/components/rich-text/use-paste-handler.js +1 -1
- package/src/components/spacing-sizes-control/all-input-control.js +4 -0
- package/src/components/spacing-sizes-control/axial-input-controls.js +4 -0
- package/src/components/spacing-sizes-control/index.js +4 -0
- package/src/components/spacing-sizes-control/input-controls.js +4 -0
- package/src/components/spacing-sizes-control/spacing-input-control.js +10 -1
- package/src/components/spacing-sizes-control/style.scss +1 -0
- package/src/components/url-input/index.js +1 -1
- package/src/components/url-popover/README.md +12 -3
- package/src/components/url-popover/index.js +33 -3
- package/src/components/use-setting/index.js +7 -1
- package/src/hooks/border.js +1 -0
- package/src/hooks/color-panel.js +13 -1
- package/src/hooks/color.js +2 -0
- package/src/hooks/content-lock-ui.js +46 -34
- package/src/hooks/dimensions.js +106 -19
- package/src/hooks/font-size.js +1 -0
- package/src/hooks/layout.js +8 -11
- package/src/hooks/margin.js +23 -17
- package/src/hooks/min-height.js +121 -0
- package/src/hooks/padding.js +23 -19
- package/src/hooks/style.js +10 -2
- package/src/hooks/test/align.js +96 -72
- package/src/hooks/test/style.js +4 -0
- package/src/hooks/test/use-typography-props.js +1 -1
- package/src/hooks/utils.js +5 -6
- package/src/layouts/constrained.js +0 -1
- package/src/layouts/flex.js +44 -39
- package/src/store/actions.js +26 -0
- package/src/store/array.js +1 -6
- package/src/store/reducer.js +50 -40
- package/src/store/selectors.js +43 -29
- package/src/store/test/actions.js +18 -0
- package/src/store/test/reducer.js +40 -0
- package/src/store/test/selectors.js +20 -1
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
// Focus style.
|
|
16
16
|
&::before {
|
|
17
17
|
height: calc(100% - 4px);
|
|
18
|
-
width: calc(100% - 4px);
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
|
|
@@ -61,3 +60,38 @@
|
|
|
61
60
|
overflow: hidden;
|
|
62
61
|
}
|
|
63
62
|
}
|
|
63
|
+
|
|
64
|
+
// Specificity is necessary to override block toolbar button styles.
|
|
65
|
+
.components-button.block-editor-block-mover-button {
|
|
66
|
+
// Focus and toggle pseudo elements.
|
|
67
|
+
&::before {
|
|
68
|
+
content: "";
|
|
69
|
+
position: absolute;
|
|
70
|
+
display: block;
|
|
71
|
+
border-radius: $radius-block-ui;
|
|
72
|
+
height: $grid-unit-40;
|
|
73
|
+
|
|
74
|
+
// Position the focus rectangle.
|
|
75
|
+
left: $grid-unit-10;
|
|
76
|
+
right: $grid-unit-10;
|
|
77
|
+
z-index: -1;
|
|
78
|
+
|
|
79
|
+
// Animate in.
|
|
80
|
+
animation: components-button__appear-animation 0.1s ease;
|
|
81
|
+
animation-fill-mode: forwards;
|
|
82
|
+
@include reduce-motion("animation");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Don't show the focus inherited by the Button component.
|
|
86
|
+
&:focus,
|
|
87
|
+
&:focus:enabled,
|
|
88
|
+
// Override focus styles from the block toolbar
|
|
89
|
+
&:focus::before {
|
|
90
|
+
box-shadow: none;
|
|
91
|
+
outline: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:focus-visible::before {
|
|
95
|
+
@include block-toolbar-button-style__focus();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -13,15 +13,11 @@
|
|
|
13
13
|
margin: 0 !important;
|
|
14
14
|
min-width: auto;
|
|
15
15
|
width: max-content;
|
|
16
|
-
background: none;
|
|
17
|
-
border: none;
|
|
18
|
-
outline: none;
|
|
19
|
-
box-shadow: none;
|
|
20
16
|
overflow-y: visible;
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
// Enable pointer events for the toolbar's content.
|
|
24
|
-
&:not(.block-editor-block-popover__inbetween, .block-editor-block-popover__drop-zone) .components-popover__content {
|
|
20
|
+
&:not(.block-editor-block-popover__inbetween, .block-editor-block-popover__drop-zone, .block-editor-block-list__block-side-inserter-popover) .components-popover__content {
|
|
25
21
|
* {
|
|
26
22
|
pointer-events: all;
|
|
27
23
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { castArray } from 'lodash';
|
|
5
4
|
import classnames from 'classnames';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -36,7 +35,10 @@ export function BlockPreview( {
|
|
|
36
35
|
() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),
|
|
37
36
|
[ originalSettings ]
|
|
38
37
|
);
|
|
39
|
-
const renderedBlocks = useMemo(
|
|
38
|
+
const renderedBlocks = useMemo(
|
|
39
|
+
() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),
|
|
40
|
+
[ blocks ]
|
|
41
|
+
);
|
|
40
42
|
if ( ! blocks || blocks.length === 0 ) {
|
|
41
43
|
return null;
|
|
42
44
|
}
|
|
@@ -99,7 +101,10 @@ export function useBlockPreview( {
|
|
|
99
101
|
);
|
|
100
102
|
const disabledRef = useDisabled();
|
|
101
103
|
const ref = useMergeRefs( [ props.ref, disabledRef ] );
|
|
102
|
-
const renderedBlocks = useMemo(
|
|
104
|
+
const renderedBlocks = useMemo(
|
|
105
|
+
() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),
|
|
106
|
+
[ blocks ]
|
|
107
|
+
);
|
|
103
108
|
|
|
104
109
|
const children = (
|
|
105
110
|
<BlockEditorProvider value={ renderedBlocks } settings={ settings }>
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { castArray } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -41,7 +36,7 @@ const noop = () => {};
|
|
|
41
36
|
const POPOVER_PROPS = {
|
|
42
37
|
className: 'block-editor-block-settings-menu__popover',
|
|
43
38
|
position: 'bottom right',
|
|
44
|
-
|
|
39
|
+
variant: 'toolbar',
|
|
45
40
|
};
|
|
46
41
|
|
|
47
42
|
function CopyMenuItem( { blocks, onCopy } ) {
|
|
@@ -58,7 +53,9 @@ export function BlockSettingsDropdown( {
|
|
|
58
53
|
__unstableDisplayLocation,
|
|
59
54
|
...props
|
|
60
55
|
} ) {
|
|
61
|
-
const blockClientIds =
|
|
56
|
+
const blockClientIds = Array.isArray( clientIds )
|
|
57
|
+
? clientIds
|
|
58
|
+
: [ clientIds ];
|
|
62
59
|
const count = blockClientIds.length;
|
|
63
60
|
const firstBlockClientId = blockClientIds[ 0 ];
|
|
64
61
|
const {
|
|
@@ -11,7 +11,7 @@ import { _x } from '@wordpress/i18n';
|
|
|
11
11
|
/**
|
|
12
12
|
* Returns the active style from the given className.
|
|
13
13
|
*
|
|
14
|
-
* @param {Array} styles Block
|
|
14
|
+
* @param {Array} styles Block styles.
|
|
15
15
|
* @param {string} className Class name
|
|
16
16
|
*
|
|
17
17
|
* @return {Object?} The active style.
|
|
@@ -59,7 +59,7 @@ export function replaceActiveStyle( className, activeStyle, newStyle ) {
|
|
|
59
59
|
* act as a fallback for when there is no active style applied to a block. The default item also serves
|
|
60
60
|
* as a switch on the frontend to deactivate non-default styles.
|
|
61
61
|
*
|
|
62
|
-
* @param {Array} styles Block
|
|
62
|
+
* @param {Array} styles Block styles.
|
|
63
63
|
*
|
|
64
64
|
* @return {Array<Object?>} The style collection.
|
|
65
65
|
*/
|
|
@@ -83,7 +83,7 @@ export function getRenderedStyles( styles ) {
|
|
|
83
83
|
/**
|
|
84
84
|
* Returns a style object from a collection of styles where that style object is the default block style.
|
|
85
85
|
*
|
|
86
|
-
* @param {Array} styles Block
|
|
86
|
+
* @param {Array} styles Block styles.
|
|
87
87
|
*
|
|
88
88
|
* @return {Object?} The default style object, if found.
|
|
89
89
|
*/
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { castArray } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -34,7 +29,7 @@ import PatternTransformationsMenu from './pattern-transformations-menu';
|
|
|
34
29
|
import useBlockDisplayTitle from '../block-title/use-block-display-title';
|
|
35
30
|
|
|
36
31
|
export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
37
|
-
const { replaceBlocks } = useDispatch( blockEditorStore );
|
|
32
|
+
const { replaceBlocks, multiSelect } = useDispatch( blockEditorStore );
|
|
38
33
|
const blockInformation = useBlockDisplayInformation( blocks[ 0 ].clientId );
|
|
39
34
|
const {
|
|
40
35
|
possibleBlockTransformations,
|
|
@@ -52,7 +47,7 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
52
47
|
const { getBlockStyles, getBlockType } = select( blocksStore );
|
|
53
48
|
const { canRemoveBlocks } = select( blockEditorStore );
|
|
54
49
|
const rootClientId = getBlockRootClientId(
|
|
55
|
-
|
|
50
|
+
Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds
|
|
56
51
|
);
|
|
57
52
|
const [ { name: firstBlockName } ] = blocks;
|
|
58
53
|
const _isSingleBlockSelected = blocks.length === 1;
|
|
@@ -94,12 +89,27 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
94
89
|
const isReusable = blocks.length === 1 && isReusableBlock( blocks[ 0 ] );
|
|
95
90
|
const isTemplate = blocks.length === 1 && isTemplatePart( blocks[ 0 ] );
|
|
96
91
|
|
|
92
|
+
function selectForMultipleBlocks( insertedBlocks ) {
|
|
93
|
+
if ( insertedBlocks.length > 1 ) {
|
|
94
|
+
multiSelect(
|
|
95
|
+
insertedBlocks[ 0 ].clientId,
|
|
96
|
+
insertedBlocks[ insertedBlocks.length - 1 ].clientId
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
97
101
|
// Simple block tranformation based on the `Block Transforms` API.
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
function onBlockTransform( name ) {
|
|
103
|
+
const newBlocks = switchToBlockType( blocks, name );
|
|
104
|
+
replaceBlocks( clientIds, newBlocks );
|
|
105
|
+
selectForMultipleBlocks( newBlocks );
|
|
106
|
+
}
|
|
107
|
+
|
|
100
108
|
// Pattern transformation through the `Patterns` API.
|
|
101
|
-
|
|
109
|
+
function onPatternTransform( transformedBlocks ) {
|
|
102
110
|
replaceBlocks( clientIds, transformedBlocks );
|
|
111
|
+
selectForMultipleBlocks( transformedBlocks );
|
|
112
|
+
}
|
|
103
113
|
|
|
104
114
|
/**
|
|
105
115
|
* The `isTemplate` check is a stopgap solution here.
|
|
@@ -163,7 +173,7 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
163
173
|
label={ blockSwitcherLabel }
|
|
164
174
|
popoverProps={ {
|
|
165
175
|
position: 'bottom right',
|
|
166
|
-
|
|
176
|
+
variant: 'toolbar',
|
|
167
177
|
className: 'block-editor-block-switcher__popover',
|
|
168
178
|
} }
|
|
169
179
|
icon={
|
|
@@ -15,7 +15,7 @@ export default function PreviewBlockPopover( { blocks } ) {
|
|
|
15
15
|
<div className="block-editor-block-switcher__popover__preview__container">
|
|
16
16
|
<Popover
|
|
17
17
|
className="block-editor-block-switcher__preview__popover"
|
|
18
|
-
|
|
18
|
+
placement="bottom-start"
|
|
19
19
|
focusOnMount={ false }
|
|
20
20
|
>
|
|
21
21
|
<div className="block-editor-block-switcher__preview">
|
|
@@ -25,7 +25,7 @@ function InbetweenInsertionPointPopover( {
|
|
|
25
25
|
__unstablePopoverSlot,
|
|
26
26
|
__unstableContentRef,
|
|
27
27
|
} ) {
|
|
28
|
-
const { selectBlock } = useDispatch( blockEditorStore );
|
|
28
|
+
const { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );
|
|
29
29
|
const openRef = useContext( InsertionPointOpenRef );
|
|
30
30
|
const ref = useRef();
|
|
31
31
|
const {
|
|
@@ -89,6 +89,14 @@ function InbetweenInsertionPointPopover( {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function maybeHideInserterPoint( event ) {
|
|
93
|
+
// Only hide the inserter if it's triggered on the wrapper,
|
|
94
|
+
// and the inserter is not open.
|
|
95
|
+
if ( event.target === ref.current && ! openRef.current ) {
|
|
96
|
+
hideInsertionPoint();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
92
100
|
function onFocus( event ) {
|
|
93
101
|
// Only handle click on the wrapper specifically, and not an event
|
|
94
102
|
// bubbled from the inserter itself.
|
|
@@ -200,6 +208,7 @@ function InbetweenInsertionPointPopover( {
|
|
|
200
208
|
className={ classnames( className, {
|
|
201
209
|
'is-with-inserter': isInserterShown,
|
|
202
210
|
} ) }
|
|
211
|
+
onHoverEnd={ maybeHideInserterPoint }
|
|
203
212
|
>
|
|
204
213
|
<motion.div
|
|
205
214
|
variants={ lineVariants }
|
|
@@ -21,6 +21,7 @@ import BlockContextualToolbar from './block-contextual-toolbar';
|
|
|
21
21
|
import { store as blockEditorStore } from '../../store';
|
|
22
22
|
import BlockPopover from '../block-popover';
|
|
23
23
|
import useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';
|
|
24
|
+
import Inserter from '../inserter';
|
|
24
25
|
|
|
25
26
|
function selector( select ) {
|
|
26
27
|
const {
|
|
@@ -28,13 +29,16 @@ function selector( select ) {
|
|
|
28
29
|
isMultiSelecting,
|
|
29
30
|
hasMultiSelection,
|
|
30
31
|
isTyping,
|
|
32
|
+
__experimentalIsBlockInterfaceHidden: isBlockInterfaceHidden,
|
|
31
33
|
getSettings,
|
|
32
34
|
getLastMultiSelectedBlockClientId,
|
|
33
35
|
} = select( blockEditorStore );
|
|
36
|
+
|
|
34
37
|
return {
|
|
35
38
|
editorMode: __unstableGetEditorMode(),
|
|
36
39
|
isMultiSelecting: isMultiSelecting(),
|
|
37
40
|
isTyping: isTyping(),
|
|
41
|
+
isBlockInterfaceHidden: isBlockInterfaceHidden(),
|
|
38
42
|
hasFixedToolbar: getSettings().hasFixedToolbar,
|
|
39
43
|
isDistractionFree: getSettings().isDistractionFree,
|
|
40
44
|
lastClientId: hasMultiSelection()
|
|
@@ -56,6 +60,7 @@ function SelectedBlockPopover( {
|
|
|
56
60
|
editorMode,
|
|
57
61
|
isMultiSelecting,
|
|
58
62
|
isTyping,
|
|
63
|
+
isBlockInterfaceHidden,
|
|
59
64
|
hasFixedToolbar,
|
|
60
65
|
isDistractionFree,
|
|
61
66
|
lastClientId,
|
|
@@ -92,7 +97,8 @@ function SelectedBlockPopover( {
|
|
|
92
97
|
isLargeViewport &&
|
|
93
98
|
! isMultiSelecting &&
|
|
94
99
|
! showEmptyBlockSideInserter &&
|
|
95
|
-
! isTyping
|
|
100
|
+
! isTyping &&
|
|
101
|
+
! isBlockInterfaceHidden;
|
|
96
102
|
const canFocusHiddenToolbar =
|
|
97
103
|
editorMode === 'edit' &&
|
|
98
104
|
! shouldShowContextualToolbar &&
|
|
@@ -124,45 +130,85 @@ function SelectedBlockPopover( {
|
|
|
124
130
|
clientId,
|
|
125
131
|
} );
|
|
126
132
|
|
|
127
|
-
if (
|
|
133
|
+
if (
|
|
134
|
+
! shouldShowBreadcrumb &&
|
|
135
|
+
! shouldShowContextualToolbar &&
|
|
136
|
+
! showEmptyBlockSideInserter
|
|
137
|
+
) {
|
|
128
138
|
return null;
|
|
129
139
|
}
|
|
130
140
|
|
|
131
141
|
return (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
142
|
+
<>
|
|
143
|
+
{ showEmptyBlockSideInserter && (
|
|
144
|
+
<BlockPopover
|
|
145
|
+
clientId={ capturingClientId || clientId }
|
|
146
|
+
__unstableCoverTarget
|
|
147
|
+
bottomClientId={ lastClientId }
|
|
148
|
+
className={ classnames(
|
|
149
|
+
'block-editor-block-list__block-side-inserter-popover',
|
|
150
|
+
{
|
|
151
|
+
'is-insertion-point-visible':
|
|
152
|
+
isInsertionPointVisible,
|
|
153
|
+
}
|
|
154
|
+
) }
|
|
155
|
+
__unstablePopoverSlot={ __unstablePopoverSlot }
|
|
156
|
+
__unstableContentRef={ __unstableContentRef }
|
|
157
|
+
resize={ false }
|
|
158
|
+
shift={ false }
|
|
159
|
+
{ ...popoverProps }
|
|
160
|
+
>
|
|
161
|
+
<div className="block-editor-block-list__empty-block-inserter">
|
|
162
|
+
<Inserter
|
|
163
|
+
position="bottom right"
|
|
164
|
+
rootClientId={ rootClientId }
|
|
165
|
+
clientId={ clientId }
|
|
166
|
+
__experimentalIsQuick
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
</BlockPopover>
|
|
158
170
|
) }
|
|
159
|
-
{ shouldShowBreadcrumb && (
|
|
160
|
-
<
|
|
161
|
-
clientId={ clientId }
|
|
162
|
-
|
|
163
|
-
|
|
171
|
+
{ ( shouldShowBreadcrumb || shouldShowContextualToolbar ) && (
|
|
172
|
+
<BlockPopover
|
|
173
|
+
clientId={ capturingClientId || clientId }
|
|
174
|
+
bottomClientId={ lastClientId }
|
|
175
|
+
className={ classnames(
|
|
176
|
+
'block-editor-block-list__block-popover',
|
|
177
|
+
{
|
|
178
|
+
'is-insertion-point-visible':
|
|
179
|
+
isInsertionPointVisible,
|
|
180
|
+
}
|
|
181
|
+
) }
|
|
182
|
+
__unstablePopoverSlot={ __unstablePopoverSlot }
|
|
183
|
+
__unstableContentRef={ __unstableContentRef }
|
|
184
|
+
resize={ false }
|
|
185
|
+
{ ...popoverProps }
|
|
186
|
+
>
|
|
187
|
+
{ shouldShowContextualToolbar && showContents && (
|
|
188
|
+
<BlockContextualToolbar
|
|
189
|
+
// If the toolbar is being shown because of being forced
|
|
190
|
+
// it should focus the toolbar right after the mount.
|
|
191
|
+
focusOnMount={ isToolbarForced.current }
|
|
192
|
+
__experimentalInitialIndex={
|
|
193
|
+
initialToolbarItemIndexRef.current
|
|
194
|
+
}
|
|
195
|
+
__experimentalOnIndexChange={ ( index ) => {
|
|
196
|
+
initialToolbarItemIndexRef.current = index;
|
|
197
|
+
} }
|
|
198
|
+
// Resets the index whenever the active block changes so
|
|
199
|
+
// this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
|
|
200
|
+
key={ clientId }
|
|
201
|
+
/>
|
|
202
|
+
) }
|
|
203
|
+
{ shouldShowBreadcrumb && (
|
|
204
|
+
<BlockSelectionButton
|
|
205
|
+
clientId={ clientId }
|
|
206
|
+
rootClientId={ rootClientId }
|
|
207
|
+
/>
|
|
208
|
+
) }
|
|
209
|
+
</BlockPopover>
|
|
164
210
|
) }
|
|
165
|
-
|
|
211
|
+
</>
|
|
166
212
|
);
|
|
167
213
|
}
|
|
168
214
|
|
|
@@ -42,7 +42,16 @@
|
|
|
42
42
|
left: calc(50% - #{$button-size-small * 0.5});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.block-editor-block-list__block-side-inserter-popover .components-popover__content > div {
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
|
|
48
|
+
> * {
|
|
49
|
+
pointer-events: all;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
// Sibling inserter / "inbetweenserter".
|
|
54
|
+
.block-editor-block-list__empty-block-inserter,
|
|
46
55
|
.block-editor-default-block-appender,
|
|
47
56
|
.block-editor-block-list__insertion-point-inserter {
|
|
48
57
|
.block-editor-inserter__toggle.components-button.has-icon {
|
|
@@ -166,6 +175,12 @@
|
|
|
166
175
|
&:active {
|
|
167
176
|
color: $white;
|
|
168
177
|
}
|
|
178
|
+
|
|
179
|
+
// Make sure the button has no hover style when it's disabled.
|
|
180
|
+
&[aria-disabled="true"]:hover {
|
|
181
|
+
color: $white;
|
|
182
|
+
}
|
|
183
|
+
|
|
169
184
|
display: flex;
|
|
170
185
|
}
|
|
171
186
|
.block-selection-button_select-button.components-button {
|
|
@@ -68,7 +68,7 @@ The different variations of the block.
|
|
|
68
68
|
|
|
69
69
|
- Type: `Function`
|
|
70
70
|
|
|
71
|
-
Callback called when a block variation is selected. It
|
|
71
|
+
Callback called when a block variation is selected. It receives the selected variation as a parameter.
|
|
72
72
|
|
|
73
73
|
#### `icon`
|
|
74
74
|
|
|
@@ -10,24 +10,21 @@
|
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
align-items: flex-start;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
width:
|
|
13
|
+
.components-border-radius-control__unit-control {
|
|
14
|
+
width: calc((100% - #{$grid-unit-20}) / 2);
|
|
15
15
|
margin-bottom: 0;
|
|
16
|
-
margin-right:
|
|
16
|
+
margin-right: $grid-unit-20;
|
|
17
17
|
flex-shrink: 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.components-
|
|
20
|
+
.components-border-radius-control__range-control {
|
|
21
21
|
flex: 1;
|
|
22
|
-
margin-
|
|
23
|
-
|
|
24
|
-
.components-base-control__field {
|
|
25
|
-
margin-bottom: 0;
|
|
26
|
-
height: 30px;
|
|
27
|
-
}
|
|
22
|
+
margin-right: $grid-unit-15;
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
> div {
|
|
25
|
+
height: 40px;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
|
|
@@ -37,22 +34,16 @@
|
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
.components-border-radius-control__input-controls-wrapper {
|
|
40
|
-
display:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.components-border-radius-control__tooltip-wrapper {
|
|
45
|
-
width: calc(50% - #{ $grid-unit-10 });
|
|
46
|
-
margin-bottom: $grid-unit-10;
|
|
47
|
-
margin-right: $grid-unit-10;
|
|
48
|
-
}
|
|
37
|
+
display: grid;
|
|
38
|
+
gap: $grid-unit-20;
|
|
39
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
40
|
+
margin-right: $grid-unit-15;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
|
-
.component-border-radius-control__linked-button
|
|
43
|
+
.component-border-radius-control__linked-button {
|
|
52
44
|
display: flex;
|
|
53
45
|
justify-content: center;
|
|
54
|
-
margin-
|
|
55
|
-
margin-top: 3px;
|
|
46
|
+
margin-top: $grid-unit-10;
|
|
56
47
|
|
|
57
48
|
svg {
|
|
58
49
|
margin-right: 0;
|