diff options
Diffstat (limited to 'wp-includes/js/dist/block-editor.js')
-rw-r--r-- | wp-includes/js/dist/block-editor.js | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 3adcd41..ab7f119 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -32883,7 +32883,8 @@ function layout_addAttribute(settings) { } function BlockWithLayoutStyles({ block: BlockListBlock, - props + props, + layoutClasses }) { const { name, @@ -32900,7 +32901,6 @@ function BlockWithLayoutStyles({ ...layout, type: 'constrained' } : layout || defaultBlockLayout || {}; - const layoutClasses = useLayoutClasses(attributes, name); const { kebabCase } = unlock(external_wp_components_namespaceObject.privateApis); @@ -32942,7 +32942,12 @@ function BlockWithLayoutStyles({ * @return {Function} Wrapped component. */ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => { + const { + name, + attributes + } = props; const blockSupportsLayout = hasLayoutBlockSupport(props.name); + const layoutClasses = useLayoutClasses(attributes, name); const shouldRenderLayoutStyles = (0,external_wp_data_namespaceObject.useSelect)(select => { // The callback returns early to avoid block editor subscription. if (!blockSupportsLayout) { @@ -32952,12 +32957,14 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde }, [blockSupportsLayout]); if (!shouldRenderLayoutStyles) { return (0,external_React_.createElement)(BlockListBlock, { - ...props + ...props, + __unstableLayoutClassNames: blockSupportsLayout ? layoutClasses : undefined }); } return (0,external_React_.createElement)(BlockWithLayoutStyles, { block: BlockListBlock, - props: props + props: props, + layoutClasses: layoutClasses }); }, 'withLayoutStyles'); (0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/layout/addAttribute', layout_addAttribute); @@ -41962,12 +41969,14 @@ function Pagination({ variant: "tertiary", onClick: () => changePage(1), disabled: currentPage === 1, - "aria-label": (0,external_wp_i18n_namespaceObject.__)('First page') + "aria-label": (0,external_wp_i18n_namespaceObject.__)('First page'), + __experimentalIsFocusable: true }, (0,external_React_.createElement)("span", null, "\xAB")), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: () => changePage(currentPage - 1), disabled: currentPage === 1, - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page') + "aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page'), + __experimentalIsFocusable: true }, (0,external_React_.createElement)("span", null, "\u2039"))), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalText, { variant: "muted" }, (0,external_wp_i18n_namespaceObject.sprintf)( @@ -41980,13 +41989,15 @@ function Pagination({ variant: "tertiary", onClick: () => changePage(currentPage + 1), disabled: currentPage === numPages, - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page') + "aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page'), + __experimentalIsFocusable: true }, (0,external_React_.createElement)("span", null, "\u203A")), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: () => changePage(numPages), disabled: currentPage === numPages, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Last page'), - size: "default" + size: "default", + __experimentalIsFocusable: true }, (0,external_React_.createElement)("span", null, "\xBB"))))); } @@ -54048,9 +54059,14 @@ function useListViewDropZone({ const ref = (0,external_wp_compose_namespaceObject.__experimentalUseDropZone)({ dropZoneElement, onDrop(event) { + throttled.cancel(); if (target) { onBlockDrop(event); } + // Use `undefined` value to indicate that the drag has concluded. + // This allows styling rules that are active only when a user is + // dragging to be removed. + setTarget(undefined); }, onDragLeave() { throttled.cancel(); |