@wordpress/customize-widgets 6.1.0 → 6.3.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/build/components/block-appender/index.cjs.map +1 -1
- package/build/components/customize-widgets/index.cjs +13 -11
- package/build/components/customize-widgets/index.cjs.map +1 -1
- package/build/components/customize-widgets/use-clear-selected-block.cjs.map +1 -1
- package/build/components/error-boundary/index.cjs +1 -1
- package/build/components/error-boundary/index.cjs.map +1 -1
- package/build/components/focus-control/index.cjs.map +1 -1
- package/build/components/focus-control/use-blocks-focus-control.cjs.map +1 -1
- package/build/components/header/index.cjs +23 -16
- package/build/components/header/index.cjs.map +1 -1
- package/build/components/inserter/use-inserter.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.cjs +5 -0
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +9 -7
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.cjs +12 -11
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +35 -13
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -1
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +14 -10
- package/build/components/more-menu/index.cjs.map +1 -1
- package/build/components/sidebar-block-editor/index.cjs +15 -13
- package/build/components/sidebar-block-editor/index.cjs.map +1 -1
- package/build/components/sidebar-block-editor/sidebar-adapter.cjs.map +1 -1
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs +10 -8
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs.map +1 -1
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs +9 -7
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs.map +1 -1
- package/build/controls/inserter-outer-section.cjs +2 -2
- package/build/controls/inserter-outer-section.cjs.map +1 -1
- package/build/controls/sidebar-control.cjs +10 -8
- package/build/controls/sidebar-control.cjs.map +1 -1
- package/build/controls/sidebar-section.cjs +8 -6
- package/build/controls/sidebar-section.cjs.map +1 -1
- package/build/index.cjs +12 -11
- package/build/index.cjs.map +1 -1
- package/build/store/index.cjs +11 -9
- package/build/store/index.cjs.map +1 -1
- package/build/utils.cjs.map +1 -1
- package/build-module/components/error-boundary/index.mjs +2 -2
- package/build-module/components/error-boundary/index.mjs.map +1 -1
- package/build-module/components/focus-control/use-blocks-focus-control.mjs.map +1 -1
- package/build-module/components/header/index.mjs +12 -7
- package/build-module/components/header/index.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs +5 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +1 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +35 -13
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +6 -4
- package/build-module/components/more-menu/index.mjs.map +1 -1
- package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs.map +1 -1
- package/build-module/controls/inserter-outer-section.mjs +3 -3
- package/build-module/controls/inserter-outer-section.mjs.map +1 -1
- package/build-module/index.mjs +1 -2
- package/build-module/index.mjs.map +1 -1
- package/build-module/utils.mjs.map +1 -1
- package/build-style/style-rtl.css +44 -25
- package/build-style/style.css +44 -25
- package/build-types/components/block-appender/index.d.ts +2 -0
- package/build-types/components/block-appender/index.d.ts.map +1 -0
- package/build-types/components/block-inspector-button/index.d.ts +7 -0
- package/build-types/components/block-inspector-button/index.d.ts.map +1 -0
- package/build-types/components/customize-widgets/index.d.ts +6 -0
- package/build-types/components/customize-widgets/index.d.ts.map +1 -0
- package/build-types/components/customize-widgets/use-clear-selected-block.d.ts +18 -0
- package/build-types/components/customize-widgets/use-clear-selected-block.d.ts.map +1 -0
- package/build-types/components/error-boundary/index.d.ts +14 -0
- package/build-types/components/error-boundary/index.d.ts.map +1 -0
- package/build-types/components/focus-control/index.d.ts +7 -0
- package/build-types/components/focus-control/index.d.ts.map +1 -0
- package/build-types/components/focus-control/use-blocks-focus-control.d.ts +2 -0
- package/build-types/components/focus-control/use-blocks-focus-control.d.ts.map +1 -0
- package/build-types/components/header/index.d.ts +9 -0
- package/build-types/components/header/index.d.ts.map +1 -0
- package/build-types/components/inserter/index.d.ts +5 -0
- package/build-types/components/inserter/index.d.ts.map +1 -0
- package/build-types/components/inserter/use-inserter.d.ts +2 -0
- package/build-types/components/inserter/use-inserter.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +3 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +5 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +25 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcuts/index.d.ts +11 -0
- package/build-types/components/keyboard-shortcuts/index.d.ts.map +1 -0
- package/build-types/components/more-menu/index.d.ts +2 -0
- package/build-types/components/more-menu/index.d.ts.map +1 -0
- package/build-types/components/sidebar-block-editor/index.d.ts +7 -0
- package/build-types/components/sidebar-block-editor/index.d.ts.map +1 -0
- package/build-types/components/sidebar-block-editor/sidebar-adapter.d.ts +37 -0
- package/build-types/components/sidebar-block-editor/sidebar-adapter.d.ts.map +1 -0
- package/build-types/components/sidebar-block-editor/sidebar-editor-provider.d.ts +6 -0
- package/build-types/components/sidebar-block-editor/sidebar-editor-provider.d.ts.map +1 -0
- package/build-types/components/sidebar-block-editor/use-sidebar-block-editor.d.ts +2 -0
- package/build-types/components/sidebar-block-editor/use-sidebar-block-editor.d.ts.map +1 -0
- package/build-types/components/sidebar-controls/index.d.ts +9 -0
- package/build-types/components/sidebar-controls/index.d.ts.map +1 -0
- package/build-types/components/welcome-guide/index.d.ts +4 -0
- package/build-types/components/welcome-guide/index.d.ts.map +1 -0
- package/build-types/controls/inserter-outer-section.d.ts +9 -0
- package/build-types/controls/inserter-outer-section.d.ts.map +1 -0
- package/build-types/controls/inspector-section.d.ts +17 -0
- package/build-types/controls/inspector-section.d.ts.map +1 -0
- package/build-types/controls/sidebar-control.d.ts +19 -0
- package/build-types/controls/sidebar-control.d.ts.map +1 -0
- package/build-types/controls/sidebar-section.d.ts +22 -0
- package/build-types/controls/sidebar-section.d.ts.map +1 -0
- package/build-types/filters/index.d.ts +4 -0
- package/build-types/filters/index.d.ts.map +1 -0
- package/build-types/filters/move-to-sidebar.d.ts +2 -0
- package/build-types/filters/move-to-sidebar.d.ts.map +1 -0
- package/build-types/filters/replace-media-upload.d.ts +2 -0
- package/build-types/filters/replace-media-upload.d.ts.map +1 -0
- package/build-types/filters/wide-widget-display.d.ts +2 -0
- package/build-types/filters/wide-widget-display.d.ts.map +1 -0
- package/build-types/index.d.ts +10 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/store/actions.d.ts +39 -0
- package/build-types/store/actions.d.ts.map +1 -0
- package/build-types/store/constants.d.ts +5 -0
- package/build-types/store/constants.d.ts.map +1 -0
- package/build-types/store/index.d.ts +9 -0
- package/build-types/store/index.d.ts.map +1 -0
- package/build-types/store/reducer.d.ts +14 -0
- package/build-types/store/reducer.d.ts.map +1 -0
- package/build-types/store/selectors.d.ts +35 -0
- package/build-types/store/selectors.d.ts.map +1 -0
- package/build-types/utils.d.ts +32 -0
- package/build-types/utils.d.ts.map +1 -0
- package/package.json +28 -28
- package/src/components/error-boundary/index.jsx +2 -2
- package/src/components/header/index.jsx +1 -1
- package/src/components/header/style.scss +27 -13
- package/src/components/header/test/index.jsdom.test.tsx +5 -0
- package/src/components/inserter/style.scss +14 -4
- package/src/components/keyboard-shortcut-help-modal/config.js +3 -0
- package/src/components/keyboard-shortcut-help-modal/index.jsx +0 -2
- package/src/components/keyboard-shortcut-help-modal/shortcut.jsx +39 -25
- package/src/components/keyboard-shortcut-help-modal/style.scss +1 -1
- package/src/components/more-menu/index.jsx +3 -8
- package/src/components/sidebar-block-editor/style.scss +9 -0
- package/src/controls/inserter-outer-section.js +3 -3
- package/src/index.jsx +1 -4
- package/src/utils.js +0 -1
|
@@ -15,41 +15,56 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
display: flex;
|
|
18
|
-
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: $grid-unit-10;
|
|
20
|
+
// Keep the focus ring of the options menu toggle within the customizer
|
|
21
|
+
// sidebar, which clips its overflow.
|
|
22
|
+
padding-inline-end: $grid-unit-15;
|
|
19
23
|
|
|
20
24
|
// Offset the customizer's sidebar padding.
|
|
21
25
|
// Zero bottom margin so that the fixed toolbar is right under the header.
|
|
22
26
|
margin: -15px ( -$grid-unit-15 ) ( 0 ) ( -$grid-unit-15 );
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
border-bottom: 1px solid $gray-200;
|
|
28
|
+
background: var(--wpds-color-background-surface-neutral);
|
|
29
|
+
border-bottom: 1px solid var(--wpds-color-stroke-surface-neutral);
|
|
27
30
|
|
|
28
31
|
z-index: z-index(".customize-widgets__topbar");
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
.customize-widgets-header-toolbar {
|
|
32
35
|
display: flex;
|
|
36
|
+
flex: 1;
|
|
33
37
|
border: none;
|
|
34
|
-
width: 100%;
|
|
35
38
|
align-items: center;
|
|
36
39
|
gap: $grid-unit-10;
|
|
37
|
-
// Keep the outset focus ring of the first
|
|
38
|
-
//
|
|
39
|
-
padding:
|
|
40
|
+
// Keep the outset focus ring of the first button within the customizer
|
|
41
|
+
// sidebar, which clips its overflow.
|
|
42
|
+
padding-inline-start: $grid-unit-15;
|
|
40
43
|
|
|
41
44
|
// The Toolbar component adds different styles to buttons, so we reset them
|
|
42
45
|
// here to the original button styles, consistent with the document tools
|
|
43
46
|
// of the other editors.
|
|
44
47
|
// Specificity bump needed to offset https://github.com/WordPress/gutenberg/blob/8ea29cb04412c80c9adf7c1db0e816d6a0ac1232/packages/components/src/toolbar/style.scss#L76
|
|
45
|
-
> .components-button.has-icon.has-icon.has-icon
|
|
46
|
-
> .components-dropdown > .components-button.has-icon.has-icon {
|
|
48
|
+
> .components-button.has-icon.has-icon.has-icon {
|
|
47
49
|
height: $button-size-compact;
|
|
48
50
|
min-width: $button-size-compact;
|
|
49
51
|
padding: 4px;
|
|
50
52
|
|
|
51
53
|
&.is-pressed {
|
|
52
|
-
background:
|
|
54
|
+
background: var(--wpds-color-background-interactive-neutral-strong-active);
|
|
55
|
+
|
|
56
|
+
&:is(:disabled, [aria-disabled="true"]) {
|
|
57
|
+
background: var(--wpds-color-background-interactive-neutral-strong-disabled);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (forced-colors: active) {
|
|
61
|
+
background: Highlight !important;
|
|
62
|
+
|
|
63
|
+
&:disabled,
|
|
64
|
+
&[aria-disabled="true"] {
|
|
65
|
+
background: GrayText !important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
&:focus:not(:active) {
|
|
@@ -63,8 +78,7 @@
|
|
|
63
78
|
|
|
64
79
|
.customize-widgets-header-toolbar__inserter-toggle.components-button.has-icon {
|
|
65
80
|
border-radius: $radius-small;
|
|
66
|
-
|
|
67
|
-
// Push the inserter toggle and the buttons after it to the end.
|
|
81
|
+
// Push the inserter toggle to the end.
|
|
68
82
|
margin: $grid-unit-15 0 $grid-unit-15 auto;
|
|
69
83
|
|
|
70
84
|
svg {
|
|
@@ -70,6 +70,11 @@ describe( 'Header', () => {
|
|
|
70
70
|
screen.getByRole( 'button', { name: 'Add block' } )
|
|
71
71
|
).toHaveFocus();
|
|
72
72
|
await user.keyboard( '{ArrowRight}' );
|
|
73
|
+
expect( undoButton ).toHaveFocus();
|
|
74
|
+
|
|
75
|
+
// The options menu toggle is outside the toolbar, and is the next
|
|
76
|
+
// tab stop.
|
|
77
|
+
await user.tab();
|
|
73
78
|
expect(
|
|
74
79
|
screen.getByRole( 'button', { name: 'Options' } )
|
|
75
80
|
).toHaveFocus();
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
1
|
@use "@wordpress/base-styles/variables" as *;
|
|
3
2
|
|
|
4
3
|
#customize-sidebar-outer-content {
|
|
@@ -17,7 +16,16 @@
|
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
.customize-widgets-layout__inserter-panel {
|
|
20
|
-
background:
|
|
19
|
+
background: var(--wpds-color-background-surface-neutral-strong);
|
|
20
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The panel header has its own close button, so with no tabs to show the
|
|
24
|
+
// inserter's tab list and close button row is hidden.
|
|
25
|
+
.customize-widgets-layout__inserter-panel-content .block-editor-inserter__menu.has-single-tab {
|
|
26
|
+
.block-editor-tabbed-sidebar__tablist-and-close-button {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
.customize-widgets-layout__inserter-panel-header {
|
|
@@ -28,16 +36,18 @@
|
|
|
28
36
|
// Match the "wp-full-overlay-header" height in core, plus the 1px border.
|
|
29
37
|
height: 46px;
|
|
30
38
|
box-sizing: border-box;
|
|
31
|
-
border-bottom: $border-width solid
|
|
39
|
+
border-bottom: $border-width solid var(--wpds-color-stroke-surface-neutral);
|
|
32
40
|
|
|
33
41
|
.customize-widgets-layout__inserter-panel-header-title {
|
|
34
42
|
margin: 0;
|
|
43
|
+
// Override the admin heading color.
|
|
44
|
+
color: inherit;
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
.block-editor-inserter__quick-inserter {
|
|
39
49
|
.block-editor-inserter__panel-content {
|
|
40
50
|
// To fix quick inserter doesn't have background.
|
|
41
|
-
background:
|
|
51
|
+
background: var(--wpds-color-background-surface-neutral-strong);
|
|
42
52
|
}
|
|
43
53
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __ } from '@wordpress/i18n';
|
|
2
2
|
|
|
3
|
+
/** @type {Array<import('react').ComponentProps<typeof import('./shortcut').default>>} */
|
|
3
4
|
export const textFormattingShortcuts = [
|
|
4
5
|
{
|
|
5
6
|
keyCombination: { modifier: 'primary', character: 'b' },
|
|
@@ -19,6 +20,8 @@ export const textFormattingShortcuts = [
|
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
keyCombination: { character: '[[' },
|
|
23
|
+
/* translators: The keyboard sequence [[, pressing the left bracket key twice. */
|
|
24
|
+
ariaLabel: __( 'Left bracket twice' ),
|
|
22
25
|
description: __( 'Insert a link to a post or page.' ),
|
|
23
26
|
},
|
|
24
27
|
{
|
|
@@ -128,8 +128,6 @@ export default function KeyboardShortcutHelpModal( {
|
|
|
128
128
|
description: __(
|
|
129
129
|
'Change the block type after adding a new paragraph.'
|
|
130
130
|
),
|
|
131
|
-
/* translators: The forward-slash character. e.g. '/'. */
|
|
132
|
-
ariaLabel: __( 'Forward-slash' ),
|
|
133
131
|
},
|
|
134
132
|
] }
|
|
135
133
|
/>
|
|
@@ -1,43 +1,57 @@
|
|
|
1
1
|
import { Fragment } from '@wordpress/element';
|
|
2
2
|
import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
|
|
3
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {Object} ShortcutKeyCombination
|
|
7
|
+
* @property {string} character Shortcut key.
|
|
8
|
+
* @property {import('@wordpress/keycodes').WPKeycodeModifier | null} [modifier] Optional shortcut modifier.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {Object} props Component props.
|
|
13
|
+
* @param {ShortcutKeyCombination} props.keyCombination Shortcut to display.
|
|
14
|
+
* @param {string} [props.ariaLabel] Custom readable shortcut label.
|
|
15
|
+
*/
|
|
16
|
+
function KeyCombination( { keyCombination, ariaLabel } ) {
|
|
17
|
+
const { character, modifier } = keyCombination;
|
|
18
|
+
const normalizedModifier = modifier ?? 'undefined';
|
|
19
|
+
const keys = displayShortcutList[ normalizedModifier ]( character );
|
|
15
20
|
|
|
16
21
|
return (
|
|
17
22
|
<kbd
|
|
18
23
|
className="customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination"
|
|
19
|
-
|
|
24
|
+
dir="ltr"
|
|
20
25
|
>
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
<VisuallyHidden render={ <span /> }>
|
|
27
|
+
{ ariaLabel ||
|
|
28
|
+
shortcutAriaLabel[ normalizedModifier ]( character ) }
|
|
29
|
+
</VisuallyHidden>
|
|
30
|
+
<span aria-hidden="true">
|
|
31
|
+
{ keys.map( ( key, index ) =>
|
|
32
|
+
key === '+' && index < keys.length - 1 ? (
|
|
33
|
+
<Fragment key={ index }>{ key }</Fragment>
|
|
34
|
+
) : (
|
|
28
35
|
<kbd
|
|
29
36
|
key={ index }
|
|
30
37
|
className="customize-widgets-keyboard-shortcut-help-modal__shortcut-key"
|
|
31
38
|
>
|
|
32
|
-
{
|
|
39
|
+
{ key }
|
|
33
40
|
</kbd>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
41
|
+
)
|
|
42
|
+
) }
|
|
43
|
+
</span>
|
|
37
44
|
</kbd>
|
|
38
45
|
);
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @param {Object} props Component props.
|
|
50
|
+
* @param {string} props.description Description of the shortcut action.
|
|
51
|
+
* @param {ShortcutKeyCombination} props.keyCombination Primary shortcut.
|
|
52
|
+
* @param {ShortcutKeyCombination[]} [props.aliases] Alternative shortcuts.
|
|
53
|
+
* @param {string} [props.ariaLabel] Custom readable shortcut label.
|
|
54
|
+
*/
|
|
41
55
|
function Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {
|
|
42
56
|
return (
|
|
43
57
|
<>
|
|
@@ -47,12 +61,12 @@ function Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {
|
|
|
47
61
|
<div className="customize-widgets-keyboard-shortcut-help-modal__shortcut-term">
|
|
48
62
|
<KeyCombination
|
|
49
63
|
keyCombination={ keyCombination }
|
|
50
|
-
|
|
64
|
+
ariaLabel={ ariaLabel }
|
|
51
65
|
/>
|
|
52
66
|
{ aliases.map( ( alias, index ) => (
|
|
53
67
|
<KeyCombination
|
|
54
68
|
keyCombination={ alias }
|
|
55
|
-
|
|
69
|
+
ariaLabel={ ariaLabel }
|
|
56
70
|
key={ index }
|
|
57
71
|
/>
|
|
58
72
|
) ) }
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MenuGroup,
|
|
3
|
-
MenuItem,
|
|
4
|
-
ToolbarDropdownMenu,
|
|
5
|
-
} from '@wordpress/components';
|
|
1
|
+
import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
|
|
6
2
|
import { useDispatch } from '@wordpress/data';
|
|
7
3
|
import { useState } from '@wordpress/element';
|
|
8
4
|
import { __, _x } from '@wordpress/i18n';
|
|
@@ -33,7 +29,7 @@ export default function MoreMenu() {
|
|
|
33
29
|
|
|
34
30
|
return (
|
|
35
31
|
<>
|
|
36
|
-
<
|
|
32
|
+
<DropdownMenu
|
|
37
33
|
icon={ moreVertical }
|
|
38
34
|
label={ __( 'Options' ) }
|
|
39
35
|
popoverProps={ {
|
|
@@ -89,7 +85,6 @@ export default function MoreMenu() {
|
|
|
89
85
|
'https://wordpress.org/documentation/article/block-based-widgets-editor/'
|
|
90
86
|
) }
|
|
91
87
|
target="_blank"
|
|
92
|
-
rel="noopener"
|
|
93
88
|
>
|
|
94
89
|
{ __( 'Help' ) }
|
|
95
90
|
<VisuallyHidden render={ <span /> }>
|
|
@@ -120,7 +115,7 @@ export default function MoreMenu() {
|
|
|
120
115
|
</MenuGroup>
|
|
121
116
|
</>
|
|
122
117
|
) }
|
|
123
|
-
</
|
|
118
|
+
</DropdownMenu>
|
|
124
119
|
<KeyboardShortcutHelpModal
|
|
125
120
|
isModalActive={ isKeyboardShortcutsModalActive }
|
|
126
121
|
toggleModal={ toggleKeyboardShortcutsModal }
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
@use "@wordpress/base-styles/variables" as *;
|
|
1
2
|
@use "@wordpress/base-styles/z-index" as *;
|
|
2
3
|
|
|
4
|
+
// The fixed block toolbar, rendered right after the header in top toolbar mode
|
|
5
|
+
// and on small screens.
|
|
6
|
+
.customize-widgets-header + .block-editor-block-contextual-toolbar {
|
|
7
|
+
// Offset the customizer's sidebar padding, like the header.
|
|
8
|
+
margin-inline: -$grid-unit-15;
|
|
9
|
+
width: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
// stylelint-disable selector-class-pattern -- WordPress Customizer control class names use underscores by convention.
|
|
4
13
|
.customize-control-sidebar_block_editor .block-editor-block-list__block-popover {
|
|
5
14
|
// FloatingUI library used in Popover component forces us to have an "absolute" inline style.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESCAPE } from '@wordpress/keycodes';
|
|
1
|
+
import { ESCAPE, withIgnoreIMEEvents } from '@wordpress/keycodes';
|
|
2
2
|
import { focus } from '@wordpress/dom';
|
|
3
3
|
import { dispatch } from '@wordpress/data';
|
|
4
4
|
import { store as customizeWidgetsStore } from '../store';
|
|
@@ -49,7 +49,7 @@ export default function getInserterOuterSection() {
|
|
|
49
49
|
// Handle closing the inserter when pressing the Escape key.
|
|
50
50
|
ownerWindow.addEventListener(
|
|
51
51
|
'keydown',
|
|
52
|
-
( event ) => {
|
|
52
|
+
withIgnoreIMEEvents( ( event ) => {
|
|
53
53
|
if (
|
|
54
54
|
this.expanded() &&
|
|
55
55
|
( event.keyCode === ESCAPE ||
|
|
@@ -62,7 +62,7 @@ export default function getInserterOuterSection() {
|
|
|
62
62
|
false
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
} ),
|
|
66
66
|
// Use capture mode to make this run before other event listeners.
|
|
67
67
|
true
|
|
68
68
|
);
|
package/src/index.jsx
CHANGED
|
@@ -28,7 +28,6 @@ const DISABLED_BLOCKS = [
|
|
|
28
28
|
'core/freeform',
|
|
29
29
|
'core/template-part',
|
|
30
30
|
];
|
|
31
|
-
const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* Initializes the widgets block editor in the customizer.
|
|
@@ -56,9 +55,7 @@ export function initialize( editorName, blockEditorSettings ) {
|
|
|
56
55
|
registerCoreBlocks( coreBlocks );
|
|
57
56
|
registerLegacyWidgetBlock();
|
|
58
57
|
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
|
|
59
|
-
__experimentalRegisterExperimentalCoreBlocks(
|
|
60
|
-
enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS,
|
|
61
|
-
} );
|
|
58
|
+
__experimentalRegisterExperimentalCoreBlocks();
|
|
62
59
|
}
|
|
63
60
|
registerLegacyWidgetVariations( blockEditorSettings );
|
|
64
61
|
registerWidgetGroupBlock();
|
package/src/utils.js
CHANGED