@wordpress/block-editor 13.3.0 → 14.0.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 +11 -5
- package/build/components/alignment-control/ui.js +2 -2
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +1 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +3 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-draggable/index.js +2 -2
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-inspector/index.js +6 -3
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +3 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +26 -27
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +25 -9
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +3 -2
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/modal.js +2 -0
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mover/index.js +1 -2
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-popover/cover.js +1 -1
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/inbetween.js +2 -2
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +2 -2
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +2 -0
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-switcher/index.js +1 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +11 -12
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +20 -17
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +5 -2
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +1 -2
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +1 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +7 -8
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +45 -0
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
- package/build/components/block-tools/zoom-out-mode-inserters.js +35 -36
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-popover.js +2 -1
- package/build/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build/components/block-tools/zoom-out-toolbar.js +1 -2
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build/components/child-layout-control/index.js +3 -1
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +2 -11
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +7 -4
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +1 -0
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/font-appearance-control/index.js +2 -7
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +12 -0
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +63 -52
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +5 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js +1 -0
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/theme-file-uri-utils.js +0 -59
- package/build/components/global-styles/theme-file-uri-utils.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +26 -44
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +78 -7
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +82 -44
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +96 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-item-movers.js +93 -44
- package/build/components/grid/grid-item-movers.js.map +1 -1
- package/build/components/grid/grid-item-resizer.js +14 -15
- package/build/components/grid/grid-item-resizer.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +2 -2
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/grid/use-grid-layout-sync.js +93 -45
- package/build/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build/components/iframe/index.js +4 -8
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/index.js +1 -9
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +1 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +29 -2
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +1 -0
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/menu.js +3 -3
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/preview-panel.js +20 -3
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +10 -3
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/line-height-control/index.js +0 -15
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/search-input.js +0 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/block-select-button.js +2 -6
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +2 -2
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/utils.js +3 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-replace-flow/index.js +3 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/resolution-tool/index.js +1 -0
- package/build/components/resolution-tool/index.js.map +1 -1
- 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/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +4 -2
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +8 -8
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/url-input/button.js +0 -1
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +1 -11
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +3 -3
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/link-editor.js +0 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +30 -4
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +3 -6
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +1 -3
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-settings/index.js +2 -1
- package/build/components/use-settings/index.js.map +1 -1
- package/build/hooks/block-bindings.js +248 -36
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/block-hooks.js +1 -0
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +2 -2
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/contrast-checker.js +6 -6
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/duotone.js +3 -3
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/grid-visualizer.js +5 -8
- package/build/hooks/grid-visualizer.js.map +1 -1
- package/build/hooks/index.js +7 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +9 -2
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/line-height.js +0 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/position.js +3 -7
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/spacing-visualizer.js +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +85 -50
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-zoom-out.js +1 -1
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +20 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/layouts/constrained.js +6 -2
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/grid.js +2 -0
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +0 -4
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +27 -2
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +19 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +17 -5
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-editor-region.js +1 -1
- package/build/utils/get-editor-region.js.map +1 -1
- package/build/utils/get-px-from-css-unit.js +1 -1
- package/build/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +2 -2
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +1 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +4 -2
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-draggable/index.js +3 -3
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +6 -3
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +3 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +27 -30
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +26 -9
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +3 -2
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/modal.js +2 -0
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -2
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js +1 -1
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +1 -1
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +2 -0
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-switcher/index.js +1 -1
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +12 -13
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +20 -17
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +5 -2
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +1 -2
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +1 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -8
- 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 +37 -0
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +37 -38
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-popover.js +2 -1
- package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +1 -2
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +3 -1
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +4 -12
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +7 -4
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +1 -0
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +3 -6
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +11 -0
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +63 -52
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +5 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +1 -0
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/theme-file-uri-utils.js +0 -58
- package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +27 -45
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +76 -7
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +81 -43
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +92 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +96 -46
- package/build-module/components/grid/grid-item-movers.js.map +1 -1
- package/build-module/components/grid/grid-item-resizer.js +14 -15
- package/build-module/components/grid/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +2 -2
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/grid/use-grid-layout-sync.js +94 -46
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build-module/components/iframe/index.js +4 -8
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/index.js +0 -5
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +1 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +30 -3
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -0
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/menu.js +3 -3
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +20 -3
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +10 -3
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -2
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/line-height-control/index.js +0 -14
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/search-input.js +0 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +3 -7
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +2 -2
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +3 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js +1 -0
- package/build-module/components/resolution-tool/index.js.map +1 -1
- 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/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +5 -3
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +8 -8
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/url-input/button.js +0 -1
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +1 -11
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +3 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +0 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +30 -4
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +3 -6
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +1 -3
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-settings/index.js +2 -1
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/hooks/block-bindings.js +253 -40
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-hooks.js +1 -0
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +3 -3
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +7 -7
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/duotone.js +4 -4
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +5 -8
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/index.js +2 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +9 -2
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/line-height.js +0 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/position.js +3 -7
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +84 -51
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +1 -1
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +19 -0
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/layouts/constrained.js +6 -2
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/grid.js +2 -0
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +1 -5
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +24 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +18 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +14 -4
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-editor-region.js +1 -1
- package/build-module/utils/get-editor-region.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-style/content-rtl.css +11 -18
- package/build-style/content.css +11 -18
- package/build-style/default-editor-styles-rtl.css +3 -0
- package/build-style/default-editor-styles.css +3 -0
- package/build-style/style-rtl.css +242 -136
- package/build-style/style.css +242 -136
- package/build-types/components/block-context/index.d.ts +2 -2
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +31 -31
- package/src/autocompleters/style.scss +4 -0
- package/src/components/alignment-control/ui.js +2 -2
- package/src/components/block-alignment-control/ui.js +1 -1
- package/src/components/block-alignment-control/ui.native.js +1 -1
- package/src/components/block-breadcrumb/index.js +4 -2
- package/src/components/block-canvas/style.scss +1 -0
- package/src/components/block-context/README.md +4 -4
- package/src/components/block-draggable/index.js +3 -3
- package/src/components/block-inspector/index.js +8 -4
- package/src/components/block-list/content.scss +2 -16
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-list/use-block-props/use-block-refs.js +30 -30
- package/src/components/block-list/use-block-props/use-is-hovered.js +26 -11
- package/src/components/block-list/use-in-between-inserter.js +5 -1
- package/src/components/block-lock/modal.js +10 -2
- package/src/components/block-lock/style.scss +4 -8
- package/src/components/block-mover/index.js +5 -2
- package/src/components/block-patterns-paging/style.scss +0 -23
- package/src/components/block-popover/cover.js +1 -1
- package/src/components/block-popover/inbetween.js +1 -1
- package/src/components/block-popover/index.js +1 -1
- package/src/components/block-removal-warning-modal/index.js +10 -2
- package/src/components/block-switcher/index.js +1 -1
- package/src/components/block-switcher/pattern-transformations-menu.js +17 -15
- package/src/components/block-switcher/preview-block-popover.js +20 -14
- package/src/components/block-switcher/style.scss +8 -17
- package/src/components/block-toolbar/shuffle.js +8 -1
- package/src/components/block-tools/block-selection-button.js +1 -2
- package/src/components/block-tools/index.js +5 -6
- package/src/components/block-tools/style.scss +8 -0
- package/src/components/block-tools/use-block-toolbar-popover-props.js +1 -1
- package/src/components/block-tools/use-show-block-tools.js +12 -9
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +47 -0
- package/src/components/block-tools/zoom-out-mode-inserters.js +48 -42
- package/src/components/block-tools/zoom-out-popover.js +1 -0
- package/src/components/block-tools/zoom-out-toolbar.js +1 -2
- package/src/components/button-block-appender/content.scss +1 -1
- package/src/components/child-layout-control/index.js +2 -0
- package/src/components/color-palette/test/__snapshots__/control.js.snap +2 -2
- package/src/components/colors-gradients/test/control.js +3 -2
- package/src/components/date-format-picker/index.js +2 -11
- package/src/components/default-block-appender/index.js +11 -4
- package/src/components/dimensions-tool/scale-tool.js +1 -0
- package/src/components/font-appearance-control/index.js +1 -5
- package/src/components/font-family/README.md +8 -0
- package/src/components/font-family/index.js +16 -0
- package/src/components/font-family/stories/index.story.js +54 -0
- package/src/components/global-styles/background-panel.js +90 -62
- package/src/components/global-styles/hooks.js +5 -1
- package/src/components/global-styles/image-settings-panel.js +1 -0
- package/src/components/global-styles/style.scss +11 -9
- package/src/components/global-styles/test/theme-file-uri-utils.js +1 -26
- package/src/components/global-styles/test/typography-utils.js +325 -0
- package/src/components/global-styles/test/use-global-styles-output.js +52 -5
- package/src/components/global-styles/test/utils.js +120 -0
- package/src/components/global-styles/theme-file-uri-utils.js +0 -59
- package/src/components/global-styles/typography-panel.js +36 -45
- package/src/components/global-styles/typography-utils.js +103 -7
- package/src/components/global-styles/use-global-styles-output.js +89 -50
- package/src/components/global-styles/utils.js +112 -0
- package/src/components/grid/grid-item-movers.js +141 -69
- package/src/components/grid/grid-item-resizer.js +11 -17
- package/src/components/grid/grid-visualizer.js +2 -2
- package/src/components/grid/style.scss +164 -0
- package/src/components/grid/use-grid-layout-sync.js +133 -40
- package/src/components/iframe/content.scss +3 -3
- package/src/components/iframe/index.js +3 -7
- package/src/components/index.js +0 -5
- package/src/components/inner-blocks/index.js +4 -1
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +40 -44
- package/src/components/inserter/category-tabs/index.js +35 -2
- package/src/components/inserter/media-tab/media-panel.js +1 -0
- package/src/components/inserter/menu.js +3 -3
- package/src/components/inserter/preview-panel.js +27 -4
- package/src/components/inserter/style.scss +66 -47
- package/src/components/inserter-draggable-blocks/index.js +11 -3
- package/src/components/inspector-controls/README.md +5 -0
- package/src/components/inspector-controls-tabs/settings-tab.js +0 -2
- package/src/components/inspector-controls-tabs/style.scss +0 -21
- package/src/components/line-height-control/README.md +0 -8
- package/src/components/line-height-control/index.js +1 -21
- package/src/components/line-height-control/stories/index.story.js +0 -1
- package/src/components/line-height-control/test/index.js +1 -7
- package/src/components/link-control/search-input.js +0 -1
- package/src/components/list-view/block-select-button.js +3 -13
- package/src/components/list-view/block.js +10 -3
- package/src/components/list-view/style.scss +2 -1
- package/src/components/list-view/utils.js +13 -2
- package/src/components/media-replace-flow/README.md +7 -0
- package/src/components/media-replace-flow/index.js +3 -1
- package/src/components/resolution-tool/index.js +1 -0
- package/src/components/responsive-block-control/test/index.js +5 -1
- package/src/components/rich-text/format-toolbar/index.js +1 -1
- package/src/components/rich-text/index.js +1 -1
- package/src/components/skip-to-selected-block/index.js +5 -3
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -7
- package/src/components/tabbed-sidebar/style.scss +1 -19
- package/src/components/url-input/README.md +0 -5
- package/src/components/url-input/button.js +0 -1
- package/src/components/url-input/index.js +1 -15
- package/src/components/url-popover/image-url-input-ui.js +3 -3
- package/src/components/url-popover/link-editor.js +0 -1
- package/src/components/url-popover/style.scss +1 -0
- package/src/components/use-block-drop-zone/index.js +66 -14
- package/src/components/use-on-block-drop/index.js +1 -9
- package/src/components/use-resize-canvas/index.js +1 -3
- package/src/components/use-settings/index.js +2 -1
- package/src/hooks/block-bindings.js +303 -52
- package/src/hooks/block-bindings.scss +13 -2
- package/src/hooks/block-hooks.js +1 -0
- package/src/hooks/block-hooks.scss +1 -0
- package/src/hooks/block-style-variation.js +3 -3
- package/src/hooks/contrast-checker.js +7 -7
- package/src/hooks/duotone.js +4 -4
- package/src/hooks/grid-visualizer.js +5 -7
- package/src/hooks/index.js +2 -1
- package/src/hooks/layout-child.js +12 -3
- package/src/hooks/line-height.js +0 -1
- package/src/hooks/position.js +3 -13
- package/src/hooks/spacing-visualizer.js +1 -1
- package/src/hooks/use-bindings-attributes.js +93 -59
- package/src/hooks/use-editor-wrapper-styles.native.scss +1 -0
- package/src/hooks/use-zoom-out.js +1 -1
- package/src/hooks/utils.js +14 -1
- package/src/index.js +1 -0
- package/src/layouts/constrained.js +10 -2
- package/src/layouts/grid.js +2 -0
- package/src/private-apis.js +1 -8
- package/src/store/actions.js +28 -5
- package/src/store/reducer.js +18 -0
- package/src/store/selectors.js +14 -4
- package/src/style.scss +1 -1
- package/src/utils/get-editor-region.js +1 -1
- package/src/utils/get-px-from-css-unit.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -30
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +0 -1
- package/build/components/inserter/reusable-block-rename-hint.js +0 -71
- package/build/components/inserter/reusable-block-rename-hint.js.map +0 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +0 -53
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -23
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +0 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +0 -64
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +0 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +0 -47
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -25
- package/src/components/inserter/reusable-block-rename-hint.js +0 -69
- package/src/components/inspector-controls-tabs/settings-tab-hint.js +0 -52
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$block-inserter-preview-height: 350px;
|
|
2
|
-
$block-inserter-width: 350px;
|
|
2
|
+
$block-quick-inserter-width: 350px;
|
|
3
3
|
$block-inserter-tabs-height: 44px;
|
|
4
4
|
|
|
5
5
|
.block-editor-inserter {
|
|
@@ -24,6 +24,12 @@ $block-inserter-tabs-height: 44px;
|
|
|
24
24
|
&.show-as-tabs {
|
|
25
25
|
gap: 0;
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
.block-editor-tabbed-sidebar {
|
|
29
|
+
@include break-medium() {
|
|
30
|
+
width: $secondary-sidebar-width;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
.block-editor-inserter__popover.is-quick {
|
|
@@ -85,6 +91,12 @@ $block-inserter-tabs-height: 44px;
|
|
|
85
91
|
height: 100%;
|
|
86
92
|
position: relative;
|
|
87
93
|
overflow: visible;
|
|
94
|
+
|
|
95
|
+
&.show-panel {
|
|
96
|
+
@include break-medium() {
|
|
97
|
+
width: $secondary-sidebar-width + $sidebar-width;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
88
100
|
}
|
|
89
101
|
|
|
90
102
|
.block-editor-inserter__inline-elements {
|
|
@@ -228,6 +240,13 @@ $block-inserter-tabs-height: 44px;
|
|
|
228
240
|
margin-top: auto;
|
|
229
241
|
}
|
|
230
242
|
|
|
243
|
+
// Temporarily disable the component's indicator animation.
|
|
244
|
+
// TODO: remove in favor of using the native component's styles and behavior,
|
|
245
|
+
// see https://github.com/WordPress/gutenberg/pull/62879#issuecomment-2219720582
|
|
246
|
+
&[aria-orientation="vertical"]::after {
|
|
247
|
+
content: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
231
250
|
.block-editor-inserter__category-tab {
|
|
232
251
|
// Account for the icon on the right so that it's visually balanced.
|
|
233
252
|
padding: $grid-unit-10 $grid-unit-05 $grid-unit-10 $grid-unit-15;
|
|
@@ -284,34 +303,34 @@ $block-inserter-tabs-height: 44px;
|
|
|
284
303
|
}
|
|
285
304
|
|
|
286
305
|
.block-editor-inserter__category-panel {
|
|
287
|
-
background: $gray-100;
|
|
288
|
-
border-top: $border-width solid $gray-200;
|
|
289
|
-
box-shadow: $border-width $border-width 0 0 rgba($color: #000, $alpha: 0.133); // 0.133 = $gray-200 but with alpha.
|
|
290
306
|
outline: 1px solid transparent; // Shown for Windows 10 High Contrast mode.
|
|
291
|
-
position: absolute;
|
|
292
|
-
top: -$border-width;
|
|
293
|
-
left: 0;
|
|
294
|
-
height: calc(100% + #{$border-width});
|
|
295
|
-
width: 100%;
|
|
296
|
-
padding: 0 $grid-unit-20;
|
|
297
307
|
display: flex;
|
|
298
308
|
flex-direction: column;
|
|
309
|
+
padding: 0 $grid-unit-20;
|
|
299
310
|
|
|
300
311
|
@include break-medium {
|
|
301
312
|
border-left: $border-width solid $gray-200;
|
|
302
313
|
padding: 0;
|
|
303
|
-
left:
|
|
304
|
-
width:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
314
|
+
left: $secondary-sidebar-width;
|
|
315
|
+
width: $sidebar-width;
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: -$border-width;
|
|
318
|
+
height: calc(100% + #{$border-width});
|
|
319
|
+
background: $gray-100;
|
|
320
|
+
border-top: $border-width solid $gray-200;
|
|
321
|
+
|
|
322
|
+
.block-editor-inserter__media-list,
|
|
323
|
+
.block-editor-block-patterns-list {
|
|
324
|
+
padding: 0 $grid-unit-30 $grid-unit-20;
|
|
325
|
+
}
|
|
310
326
|
}
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
.block-editor-inserter__patterns-category-panel-header {
|
|
314
|
-
padding: $grid-unit-10
|
|
330
|
+
padding: $grid-unit-10 0;
|
|
331
|
+
@include break-medium {
|
|
332
|
+
padding: $grid-unit-10 $grid-unit-30;
|
|
333
|
+
}
|
|
315
334
|
}
|
|
316
335
|
|
|
317
336
|
.block-editor-inserter__patterns-category-no-results {
|
|
@@ -326,7 +345,6 @@ $block-inserter-tabs-height: 44px;
|
|
|
326
345
|
}
|
|
327
346
|
|
|
328
347
|
.block-editor-inserter__preview-content {
|
|
329
|
-
min-height: $grid-unit-60 * 3;
|
|
330
348
|
background: $gray-100;
|
|
331
349
|
display: grid;
|
|
332
350
|
flex-grow: 1;
|
|
@@ -359,7 +377,7 @@ $block-inserter-tabs-height: 44px;
|
|
|
359
377
|
max-width: 100%;
|
|
360
378
|
|
|
361
379
|
@include break-medium {
|
|
362
|
-
width: $block-inserter-width;
|
|
380
|
+
width: $block-quick-inserter-width;
|
|
363
381
|
}
|
|
364
382
|
}
|
|
365
383
|
|
|
@@ -516,10 +534,15 @@ $block-inserter-tabs-height: 44px;
|
|
|
516
534
|
}
|
|
517
535
|
|
|
518
536
|
.block-editor-inserter__media-panel-search {
|
|
519
|
-
|
|
537
|
+
margin-bottom: $grid-unit-30;
|
|
520
538
|
// TODO: Consider using the Theme component to automatically adapt to a gray background.
|
|
521
|
-
|
|
522
|
-
|
|
539
|
+
@include break-medium() {
|
|
540
|
+
margin-bottom: 0;
|
|
541
|
+
padding: $grid-unit-20 $grid-unit-30 $grid-unit-20;
|
|
542
|
+
|
|
543
|
+
&:not(:focus-within) {
|
|
544
|
+
--wp-components-color-background: #{$white};
|
|
545
|
+
}
|
|
523
546
|
}
|
|
524
547
|
}
|
|
525
548
|
}
|
|
@@ -643,30 +666,6 @@ $block-inserter-tabs-height: 44px;
|
|
|
643
666
|
margin: $grid-unit-20 $grid-unit-20 0;
|
|
644
667
|
}
|
|
645
668
|
|
|
646
|
-
.reusable-blocks-menu-items__rename-hint {
|
|
647
|
-
align-items: top;
|
|
648
|
-
background: $gray-100;
|
|
649
|
-
border-radius: $radius-block-ui;
|
|
650
|
-
color: $gray-900;
|
|
651
|
-
display: flex;
|
|
652
|
-
flex-direction: row;
|
|
653
|
-
max-width: 380px;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.reusable-blocks-menu-items__rename-hint-content {
|
|
657
|
-
margin: $grid-unit-15 0 $grid-unit-15 $grid-unit-15;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
.reusable-blocks-menu-items__rename-hint-dismiss {
|
|
661
|
-
// The dismiss button has a lot of empty space through its padding.
|
|
662
|
-
// Apply margin to visually align the icon with the top of the text to its left.
|
|
663
|
-
margin: $grid-unit-05 $grid-unit-05 $grid-unit-05 0;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
.components-menu-group .reusable-blocks-menu-items__rename-hint {
|
|
667
|
-
margin: 0;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
669
|
.block-editor-patterns__sync-status-filter {
|
|
671
670
|
.components-input-control__container {
|
|
672
671
|
select.components-select-control__input {
|
|
@@ -692,3 +691,23 @@ $block-inserter-tabs-height: 44px;
|
|
|
692
691
|
}
|
|
693
692
|
}
|
|
694
693
|
}
|
|
694
|
+
|
|
695
|
+
.show-icon-labels {
|
|
696
|
+
@media (max-width: #{ ($break-large - 1) }) {
|
|
697
|
+
.block-editor-block-patterns-explorer .block-editor-patterns__grid-pagination {
|
|
698
|
+
flex-direction: column;
|
|
699
|
+
.block-editor-patterns__grid-pagination-previous,
|
|
700
|
+
.block-editor-patterns__grid-pagination-next {
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.block-editor-inserter__category-panel .block-editor-patterns__grid-pagination {
|
|
707
|
+
flex-direction: column;
|
|
708
|
+
.block-editor-patterns__grid-pagination-previous,
|
|
709
|
+
.block-editor-patterns__grid-pagination-next {
|
|
710
|
+
flex-direction: column;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
@@ -43,6 +43,14 @@ const InserterDraggableBlocks = ( {
|
|
|
43
43
|
useDispatch( blockEditorStore )
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
+
if ( ! isEnabled ) {
|
|
47
|
+
return children( {
|
|
48
|
+
draggable: false,
|
|
49
|
+
onDragStart: undefined,
|
|
50
|
+
onDragEnd: undefined,
|
|
51
|
+
} );
|
|
52
|
+
}
|
|
53
|
+
|
|
46
54
|
return (
|
|
47
55
|
<Draggable
|
|
48
56
|
__experimentalTransferDataType="wp-blocks"
|
|
@@ -72,9 +80,9 @@ const InserterDraggableBlocks = ( {
|
|
|
72
80
|
>
|
|
73
81
|
{ ( { onDraggableStart, onDraggableEnd } ) => {
|
|
74
82
|
return children( {
|
|
75
|
-
draggable:
|
|
76
|
-
onDragStart:
|
|
77
|
-
onDragEnd:
|
|
83
|
+
draggable: true,
|
|
84
|
+
onDragStart: onDraggableStart,
|
|
85
|
+
onDragEnd: onDraggableEnd,
|
|
78
86
|
} );
|
|
79
87
|
} }
|
|
80
88
|
</Draggable>
|
|
@@ -96,6 +96,7 @@ registerBlockType( 'my-plugin/inspector-controls-example', {
|
|
|
96
96
|
<InspectorControls>
|
|
97
97
|
<PanelBody title={ __( 'Settings' ) }>
|
|
98
98
|
<CheckboxControl
|
|
99
|
+
__nextHasNoMarginBottom
|
|
99
100
|
heading="Checkbox Field"
|
|
100
101
|
label="Tick Me"
|
|
101
102
|
help="Additional help text"
|
|
@@ -114,6 +115,7 @@ registerBlockType( 'my-plugin/inspector-controls-example', {
|
|
|
114
115
|
/>
|
|
115
116
|
|
|
116
117
|
<TextControl
|
|
118
|
+
__nextHasNoMarginBottom
|
|
117
119
|
label="Text Field"
|
|
118
120
|
help="Additional help text"
|
|
119
121
|
value={ textField }
|
|
@@ -121,12 +123,14 @@ registerBlockType( 'my-plugin/inspector-controls-example', {
|
|
|
121
123
|
/>
|
|
122
124
|
|
|
123
125
|
<ToggleControl
|
|
126
|
+
__nextHasNoMarginBottom
|
|
124
127
|
label="Toggle Field"
|
|
125
128
|
checked={ toggleField }
|
|
126
129
|
onChange={ onChangeToggleField }
|
|
127
130
|
/>
|
|
128
131
|
|
|
129
132
|
<SelectControl
|
|
133
|
+
__nextHasNoMarginBottom
|
|
130
134
|
label="Select Control"
|
|
131
135
|
value={ selectField }
|
|
132
136
|
options={ [
|
|
@@ -203,6 +207,7 @@ function MyBlockEdit( { attributes, setAttributes } ) {
|
|
|
203
207
|
</InspectorControls>
|
|
204
208
|
<InspectorAdvancedControls>
|
|
205
209
|
<TextControl
|
|
210
|
+
__nextHasNoMarginBottom
|
|
206
211
|
label="HTML anchor"
|
|
207
212
|
value={ attributes.anchor }
|
|
208
213
|
onChange={ ( nextValue ) => {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import AdvancedControls from './advanced-controls-panel';
|
|
5
5
|
import PositionControls from './position-controls-panel';
|
|
6
6
|
import { default as InspectorControls } from '../inspector-controls';
|
|
7
|
-
import SettingsTabHint from './settings-tab-hint';
|
|
8
7
|
|
|
9
8
|
const SettingsTab = ( { showAdvancedControls = false } ) => (
|
|
10
9
|
<>
|
|
@@ -15,7 +14,6 @@ const SettingsTab = ( { showAdvancedControls = false } ) => (
|
|
|
15
14
|
<AdvancedControls />
|
|
16
15
|
</div>
|
|
17
16
|
) }
|
|
18
|
-
<SettingsTabHint />
|
|
19
17
|
</>
|
|
20
18
|
);
|
|
21
19
|
|
|
@@ -5,24 +5,3 @@
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
.block-editor-inspector-controls-tabs__hint {
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
background: $gray-100;
|
|
12
|
-
border-radius: $radius-block-ui;
|
|
13
|
-
color: $gray-900;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
margin: $grid-unit-20;
|
|
17
|
-
font-size: $default-font-size;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.block-editor-inspector-controls-tabs__hint-content {
|
|
21
|
-
margin: $grid-unit-15 0 $grid-unit-15 $grid-unit-15;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.block-editor-inspector-controls-tabs__hint-dismiss {
|
|
25
|
-
// The dismiss button has a lot of empty space through its padding.
|
|
26
|
-
// Apply margin to visually align the icon with the top of the text to its left.
|
|
27
|
-
margin: $grid-unit-05 $grid-unit-05 $grid-unit-05 0;
|
|
28
|
-
}
|
|
@@ -18,7 +18,6 @@ const MyLineHeightControl = () => (
|
|
|
18
18
|
<LineHeightControl
|
|
19
19
|
value={ lineHeight }
|
|
20
20
|
onChange={ onChange }
|
|
21
|
-
__nextHasNoMarginBottom={ true }
|
|
22
21
|
/>
|
|
23
22
|
);
|
|
24
23
|
```
|
|
@@ -37,13 +36,6 @@ The value of the line height.
|
|
|
37
36
|
|
|
38
37
|
A callback function that handles the application of the line height value.
|
|
39
38
|
|
|
40
|
-
#### `__nextHasNoMarginBottom`
|
|
41
|
-
|
|
42
|
-
- **Type:** `boolean`
|
|
43
|
-
- **Default:** `false`
|
|
44
|
-
|
|
45
|
-
Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4. (The prop can be safely removed once this happens.)
|
|
46
|
-
|
|
47
39
|
## Related components
|
|
48
40
|
|
|
49
41
|
Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [`BlockEditorProvider`](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/provider/README.md) in the components tree.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import deprecated from '@wordpress/deprecated';
|
|
5
4
|
import { __ } from '@wordpress/i18n';
|
|
6
5
|
import { __experimentalNumberControl as NumberControl } from '@wordpress/components';
|
|
7
6
|
|
|
@@ -19,8 +18,6 @@ import {
|
|
|
19
18
|
const LineHeightControl = ( {
|
|
20
19
|
value: lineHeight,
|
|
21
20
|
onChange,
|
|
22
|
-
/** Start opting into the new margin-free styles that will become the default in a future version. */
|
|
23
|
-
__nextHasNoMarginBottom = false,
|
|
24
21
|
__unstableInputWidth = '60px',
|
|
25
22
|
...otherProps
|
|
26
23
|
} ) => {
|
|
@@ -76,20 +73,6 @@ const LineHeightControl = ( {
|
|
|
76
73
|
|
|
77
74
|
const value = isDefined ? lineHeight : RESET_VALUE;
|
|
78
75
|
|
|
79
|
-
if ( ! __nextHasNoMarginBottom ) {
|
|
80
|
-
deprecated(
|
|
81
|
-
'Bottom margin styles for wp.blockEditor.LineHeightControl',
|
|
82
|
-
{
|
|
83
|
-
since: '6.0',
|
|
84
|
-
version: '6.4',
|
|
85
|
-
hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version',
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
const deprecatedStyles = __nextHasNoMarginBottom
|
|
90
|
-
? undefined
|
|
91
|
-
: { marginBottom: 24 };
|
|
92
|
-
|
|
93
76
|
const handleOnChange = ( nextValue, { event } ) => {
|
|
94
77
|
if ( nextValue === '' ) {
|
|
95
78
|
onChange();
|
|
@@ -105,10 +88,7 @@ const LineHeightControl = ( {
|
|
|
105
88
|
};
|
|
106
89
|
|
|
107
90
|
return (
|
|
108
|
-
<div
|
|
109
|
-
className="block-editor-line-height-control"
|
|
110
|
-
style={ deprecatedStyles }
|
|
111
|
-
>
|
|
91
|
+
<div className="block-editor-line-height-control">
|
|
112
92
|
<NumberControl
|
|
113
93
|
{ ...otherProps }
|
|
114
94
|
__unstableInputWidth={ __unstableInputWidth }
|
|
@@ -19,13 +19,7 @@ const SPIN = STEP * SPIN_FACTOR;
|
|
|
19
19
|
|
|
20
20
|
const ControlledLineHeightControl = () => {
|
|
21
21
|
const [ value, setValue ] = useState();
|
|
22
|
-
return
|
|
23
|
-
<LineHeightControl
|
|
24
|
-
value={ value }
|
|
25
|
-
onChange={ setValue }
|
|
26
|
-
__nextHasNoMarginBottom
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
22
|
+
return <LineHeightControl value={ value } onChange={ setValue } />;
|
|
29
23
|
};
|
|
30
24
|
|
|
31
25
|
describe( 'LineHeightControl', () => {
|
|
@@ -119,7 +119,6 @@ const LinkControlSearchInput = forwardRef(
|
|
|
119
119
|
<div className="block-editor-link-control__search-input-container">
|
|
120
120
|
<URLInput
|
|
121
121
|
disableSuggestions={ currentLink?.url === value }
|
|
122
|
-
__nextHasNoMarginBottom
|
|
123
122
|
label={ __( 'Link' ) }
|
|
124
123
|
hideLabelFromVision={ hideLabelFromVision }
|
|
125
124
|
className={ className }
|
|
@@ -10,12 +10,10 @@ import {
|
|
|
10
10
|
Button,
|
|
11
11
|
__experimentalHStack as HStack,
|
|
12
12
|
__experimentalTruncate as Truncate,
|
|
13
|
-
Tooltip,
|
|
14
13
|
} from '@wordpress/components';
|
|
15
14
|
import { forwardRef } from '@wordpress/element';
|
|
16
15
|
import { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons';
|
|
17
16
|
import { SPACE, ENTER } from '@wordpress/keycodes';
|
|
18
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
19
17
|
import { useSelect } from '@wordpress/data';
|
|
20
18
|
|
|
21
19
|
/**
|
|
@@ -65,14 +63,6 @@ function ListViewBlockSelectButton(
|
|
|
65
63
|
const isSticky = blockInformation?.positionType === 'sticky';
|
|
66
64
|
const images = useListViewImages( { clientId, isExpanded } );
|
|
67
65
|
|
|
68
|
-
const positionLabel = blockInformation?.positionLabel
|
|
69
|
-
? sprintf(
|
|
70
|
-
// translators: 1: Position of selected block, e.g. "Sticky" or "Fixed".
|
|
71
|
-
__( 'Position: %1$s' ),
|
|
72
|
-
blockInformation.positionLabel
|
|
73
|
-
)
|
|
74
|
-
: '';
|
|
75
|
-
|
|
76
66
|
// The `href` attribute triggers the browser's native HTML drag operations.
|
|
77
67
|
// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.
|
|
78
68
|
// We need to clear any HTML drag data to prevent `pasteHandler` from firing
|
|
@@ -136,10 +126,10 @@ function ListViewBlockSelectButton(
|
|
|
136
126
|
</Truncate>
|
|
137
127
|
</span>
|
|
138
128
|
) }
|
|
139
|
-
{
|
|
140
|
-
<
|
|
129
|
+
{ isSticky && (
|
|
130
|
+
<span className="block-editor-list-view-block-select-button__sticky">
|
|
141
131
|
<Icon icon={ pinSmall } />
|
|
142
|
-
</
|
|
132
|
+
</span>
|
|
143
133
|
) }
|
|
144
134
|
{ images.length ? (
|
|
145
135
|
<span
|
|
@@ -465,8 +465,10 @@ function ListViewBlock( {
|
|
|
465
465
|
level
|
|
466
466
|
);
|
|
467
467
|
|
|
468
|
-
const blockPropertiesDescription =
|
|
469
|
-
|
|
468
|
+
const blockPropertiesDescription = getBlockPropertiesDescription(
|
|
469
|
+
blockInformation,
|
|
470
|
+
isLocked
|
|
471
|
+
);
|
|
470
472
|
|
|
471
473
|
const hasSiblings = siblingBlockCount > 0;
|
|
472
474
|
const hasRenderedMovers = showBlockMovers && hasSiblings;
|
|
@@ -562,7 +564,12 @@ function ListViewBlock( {
|
|
|
562
564
|
ariaDescribedBy={ descriptionId }
|
|
563
565
|
/>
|
|
564
566
|
<AriaReferencedText id={ descriptionId }>
|
|
565
|
-
{
|
|
567
|
+
{ [
|
|
568
|
+
blockPositionDescription,
|
|
569
|
+
blockPropertiesDescription,
|
|
570
|
+
]
|
|
571
|
+
.filter( Boolean )
|
|
572
|
+
.join( ' ' ) }
|
|
566
573
|
</AriaReferencedText>
|
|
567
574
|
</div>
|
|
568
575
|
) }
|
|
@@ -13,8 +13,19 @@ export const getBlockPositionDescription = ( position, siblingCount, level ) =>
|
|
|
13
13
|
level
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
export const getBlockPropertiesDescription = ( isLocked ) =>
|
|
17
|
-
|
|
16
|
+
export const getBlockPropertiesDescription = ( blockInformation, isLocked ) =>
|
|
17
|
+
[
|
|
18
|
+
blockInformation?.positionLabel
|
|
19
|
+
? `${ sprintf(
|
|
20
|
+
// translators: %s: Position of selected block, e.g. "Sticky" or "Fixed".
|
|
21
|
+
__( 'Position: %s' ),
|
|
22
|
+
blockInformation.positionLabel
|
|
23
|
+
) }.`
|
|
24
|
+
: undefined,
|
|
25
|
+
isLocked ? __( 'This block is locked.' ) : undefined,
|
|
26
|
+
]
|
|
27
|
+
.filter( Boolean )
|
|
28
|
+
.join( ' ' );
|
|
18
29
|
|
|
19
30
|
/**
|
|
20
31
|
* Returns true if the client ID occurs within the block selection or multi-selection,
|
|
@@ -91,3 +91,10 @@ Removes a media replace notice.
|
|
|
91
91
|
- Required: No
|
|
92
92
|
|
|
93
93
|
If passed, children are rendered inside the dropdown.
|
|
94
|
+
|
|
95
|
+
### children
|
|
96
|
+
|
|
97
|
+
- Type: `Element | func`
|
|
98
|
+
- Required: No
|
|
99
|
+
|
|
100
|
+
If passed, children are rendered inside the dropdown. If a function is provided for this prop, it will receive an object with the `onClose` prop as an argument.
|
|
@@ -202,7 +202,9 @@ const MediaReplaceFlow = ( {
|
|
|
202
202
|
{ __( 'Use featured image' ) }
|
|
203
203
|
</MenuItem>
|
|
204
204
|
) }
|
|
205
|
-
{ children
|
|
205
|
+
{ typeof children === 'function'
|
|
206
|
+
? children( { onClose } )
|
|
207
|
+
: children }
|
|
206
208
|
</NavigableMenu>
|
|
207
209
|
{ onSelectURL && (
|
|
208
210
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
@@ -39,7 +39,11 @@ const sizeOptions = [
|
|
|
39
39
|
const renderTestDefaultControlComponent = ( labelComponent, device ) => {
|
|
40
40
|
return (
|
|
41
41
|
<>
|
|
42
|
-
<SelectControl
|
|
42
|
+
<SelectControl
|
|
43
|
+
label={ labelComponent }
|
|
44
|
+
options={ sizeOptions }
|
|
45
|
+
__nextHasNoMarginBottom
|
|
46
|
+
/>
|
|
43
47
|
<p id={ device.id }>
|
|
44
48
|
{ device.label } is used here for testing purposes to ensure we
|
|
45
49
|
have access to details about the device.
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
6
|
import { Button } from '@wordpress/components';
|
|
7
|
+
import { useRef } from '@wordpress/element';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Internal dependencies
|
|
10
11
|
*/
|
|
11
12
|
import { store as blockEditorStore } from '../../store';
|
|
12
|
-
import {
|
|
13
|
+
import { useBlockElementRef } from '../block-list/use-block-props/use-block-refs';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/skip-to-selected-block/README.md
|
|
@@ -19,9 +20,10 @@ export default function SkipToSelectedBlock() {
|
|
|
19
20
|
( select ) => select( blockEditorStore ).getBlockSelectionStart(),
|
|
20
21
|
[]
|
|
21
22
|
);
|
|
22
|
-
const ref =
|
|
23
|
+
const ref = useRef();
|
|
24
|
+
useBlockElementRef( selectedBlockClientId, ref );
|
|
23
25
|
const onClick = () => {
|
|
24
|
-
ref.current
|
|
26
|
+
ref.current?.focus();
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
return selectedBlockClientId ? (
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
__experimentalUnitControl as UnitControl,
|
|
10
10
|
__experimentalUseCustomUnits as useCustomUnits,
|
|
11
11
|
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
|
|
12
|
-
|
|
12
|
+
CustomSelectControl,
|
|
13
13
|
} from '@wordpress/components';
|
|
14
14
|
import { useSelect } from '@wordpress/data';
|
|
15
15
|
import { useState, useMemo } from '@wordpress/element';
|
|
@@ -31,11 +31,6 @@ import {
|
|
|
31
31
|
getPresetValueFromCustomValue,
|
|
32
32
|
isValueSpacingPreset,
|
|
33
33
|
} from '../utils';
|
|
34
|
-
import { unlock } from '../../../lock-unlock';
|
|
35
|
-
|
|
36
|
-
const { CustomSelectControlV2Legacy: CustomSelectControl } = unlock(
|
|
37
|
-
componentsPrivateApis
|
|
38
|
-
);
|
|
39
34
|
|
|
40
35
|
const CUSTOM_VALUE_SETTINGS = {
|
|
41
36
|
px: { max: 300, steps: 1 },
|
|
@@ -266,6 +261,8 @@ export default function SpacingInputControl( {
|
|
|
266
261
|
onChange={ handleCustomValueSliderChange }
|
|
267
262
|
className="spacing-sizes-control__custom-value-range"
|
|
268
263
|
__nextHasNoMarginBottom
|
|
264
|
+
label={ ariaLabel }
|
|
265
|
+
hideLabelFromVision
|
|
269
266
|
/>
|
|
270
267
|
</>
|
|
271
268
|
) }
|
|
@@ -303,9 +300,11 @@ export default function SpacingInputControl( {
|
|
|
303
300
|
<CustomSelectControl
|
|
304
301
|
className="spacing-sizes-control__custom-select-control"
|
|
305
302
|
value={
|
|
303
|
+
// passing empty string as a fallback to continue using the
|
|
304
|
+
// component in controlled mode
|
|
306
305
|
options.find(
|
|
307
306
|
( option ) => option.key === currentValue
|
|
308
|
-
) || ''
|
|
307
|
+
) || ''
|
|
309
308
|
}
|
|
310
309
|
onChange={ ( selection ) => {
|
|
311
310
|
onChange(
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
.block-editor-tabbed-sidebar {
|
|
2
|
+
background-color: $white;
|
|
2
3
|
height: 100%;
|
|
3
4
|
display: flex;
|
|
4
5
|
flex-direction: column;
|
|
5
6
|
flex-grow: 1;
|
|
6
7
|
overflow: hidden;
|
|
7
|
-
|
|
8
|
-
@include break-medium() {
|
|
9
|
-
width: 350px;
|
|
10
|
-
}
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
.block-editor-tabbed-sidebar__tablist-and-close-button {
|
|
@@ -26,22 +23,7 @@
|
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
.block-editor-tabbed-sidebar__tablist {
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
flex-grow: 1;
|
|
31
26
|
margin-bottom: -$border-width;
|
|
32
|
-
width: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.block-editor-tabbed-sidebar__tab {
|
|
36
|
-
flex-grow: 1;
|
|
37
|
-
margin-bottom: -$border-width;
|
|
38
|
-
|
|
39
|
-
&[id$="reusable"] {
|
|
40
|
-
flex-grow: inherit;
|
|
41
|
-
// These are to align the `reusable` icon with the search icon.
|
|
42
|
-
padding-left: $grid-unit-20;
|
|
43
|
-
padding-right: $grid-unit-20;
|
|
44
|
-
}
|
|
45
27
|
}
|
|
46
28
|
|
|
47
29
|
.block-editor-tabbed-sidebar__tabpanel {
|