@wordpress/customize-widgets 4.29.0 → 4.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/more-menu/index.js +11 -3
- package/build/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +12 -4
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-style/style-rtl.css +5 -0
- package/build-style/style.css +5 -0
- package/package.json +22 -22
- package/src/components/more-menu/index.js +14 -4
- package/src/components/more-menu/style.scss +3 -0
- package/src/style.scss +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -12,7 +12,6 @@ var _i18n = require("@wordpress/i18n");
|
|
|
12
12
|
var _icons = require("@wordpress/icons");
|
|
13
13
|
var _keycodes = require("@wordpress/keycodes");
|
|
14
14
|
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
15
|
-
var _interface = require("@wordpress/interface");
|
|
16
15
|
var _preferences = require("@wordpress/preferences");
|
|
17
16
|
var _keyboardShortcutHelpModal = _interopRequireDefault(require("../keyboard-shortcut-help-modal"));
|
|
18
17
|
/**
|
|
@@ -27,8 +26,17 @@ function MoreMenu() {
|
|
|
27
26
|
const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0, _element.useState)(false);
|
|
28
27
|
const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
|
|
29
28
|
(0, _keyboardShortcuts.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
|
|
30
|
-
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(
|
|
31
|
-
|
|
29
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.ToolbarDropdownMenu, {
|
|
30
|
+
icon: _icons.moreVertical,
|
|
31
|
+
label: (0, _i18n.__)('Options'),
|
|
32
|
+
popoverProps: {
|
|
33
|
+
placement: 'bottom-end',
|
|
34
|
+
className: 'more-menu-dropdown__content'
|
|
35
|
+
},
|
|
36
|
+
toggleProps: {
|
|
37
|
+
tooltipPosition: 'bottom',
|
|
38
|
+
size: 'compact'
|
|
39
|
+
}
|
|
32
40
|
}, () => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, {
|
|
33
41
|
label: (0, _i18n._x)('View', 'noun')
|
|
34
42
|
}, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_element","_i18n","_icons","_keycodes","_keyboardShortcuts","
|
|
1
|
+
{"version":3,"names":["_components","require","_element","_i18n","_icons","_keycodes","_keyboardShortcuts","_preferences","_keyboardShortcutHelpModal","_interopRequireDefault","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","_react","createElement","Fragment","ToolbarDropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","tooltipPosition","size","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","info","messageActivated","messageDeactivated","MenuItem","onClick","shortcut","displayShortcut","access","role","external","href","target","rel","VisuallyHidden","as","default","isModalActive","toggleModal"],"sources":["@wordpress/customize-widgets/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tToolbarDropdownMenu,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/customize-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarDropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ () => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</ToolbarDropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAKA,IAAAO,0BAAA,GAAAC,sBAAA,CAAAR,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGe,SAASS,QAAQA,CAAA,EAAG;EAClC,MAAM,CACLC,8BAA8B,EAC9BC,kCAAkC,CAClC,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrB,MAAMC,4BAA4B,GAAGA,CAAA,KACpCF,kCAAkC,CAAE,CAAED,8BAA+B,CAAC;EAEvE,IAAAI,8BAAW,EACV,2CAA2C,EAC3CD,4BACD,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAmB,mBAAmB;IACnBC,IA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AC,QAAE,EAAE,eAAgB;EAAG,CAC/B,CAAC,EACF,IAAAP,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAsC,QAAQ;IACRK,IAAI,EAAC,UAAU;IACfvB,IAAI,EAAGwB,eAAU;IACjBC,IAAI,EAAG,IAAAtB,QAAE,EACR,yEACD,CAAG;IACHuB,MAAM,EAAC,QAAQ;IACfC,GAAG,EAAC;EAAqB,GAEvB,IAAAxB,QAAE,EAAE,MAAO,CAAC,EACd,IAAAP,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAgD,cAAc;IAACC,EAAE,EAAC;EAAM,GAEvB;EACA,IAAA1B,QAAE,EAAE,sBAAuB,CAEb,CACP,CACA,CAAC,EACZ,IAAAP,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAA8B,SAAS;IAACR,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc;EAAG,GACvC,IAAAP,MAAA,CAAAC,aAAA,EAACV,YAAA,CAAAyB,wBAAwB;IACxBC,KAAK,EAAC,wBAAwB;IAC9BC,IAAI,EAAC,sBAAsB;IAC3BZ,KAAK,EAAG,IAAAC,QAAE,EACT,kCACD,CAAG;IACHY,IAAI,EAAG,IAAAZ,QAAE,EACR,iEACD,CAAG;IACHa,gBAAgB,EAAG,IAAAb,QAAE,EACpB,4CACD,CAAG;IACHc,kBAAkB,EAAG,IAAAd,QAAE,EACtB,8CACD;EAAG,CACH,CACS,CACV,CAEiB,CAAC,EACtB,IAAAP,MAAA,CAAAC,aAAA,EAACT,0BAAA,CAAA0C,OAAyB;IACzBC,aAAa,EAAGxC,8BAAgC;IAChDyC,WAAW,EAAGtC;EAA8B,CAC5C,CACA,CAAC;AAEL"}
|
|
@@ -5,10 +5,9 @@ import { createElement, Fragment } from "react";
|
|
|
5
5
|
import { MenuGroup, MenuItem, ToolbarDropdownMenu, VisuallyHidden } from '@wordpress/components';
|
|
6
6
|
import { useState } from '@wordpress/element';
|
|
7
7
|
import { __, _x } from '@wordpress/i18n';
|
|
8
|
-
import { external } from '@wordpress/icons';
|
|
8
|
+
import { external, moreVertical } from '@wordpress/icons';
|
|
9
9
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
10
10
|
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
11
|
-
import { MoreMenuDropdown } from '@wordpress/interface';
|
|
12
11
|
import { PreferenceToggleMenuItem } from '@wordpress/preferences';
|
|
13
12
|
|
|
14
13
|
/**
|
|
@@ -19,8 +18,17 @@ export default function MoreMenu() {
|
|
|
19
18
|
const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = useState(false);
|
|
20
19
|
const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
|
|
21
20
|
useShortcut('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
|
|
22
|
-
return createElement(Fragment, null, createElement(
|
|
23
|
-
|
|
21
|
+
return createElement(Fragment, null, createElement(ToolbarDropdownMenu, {
|
|
22
|
+
icon: moreVertical,
|
|
23
|
+
label: __('Options'),
|
|
24
|
+
popoverProps: {
|
|
25
|
+
placement: 'bottom-end',
|
|
26
|
+
className: 'more-menu-dropdown__content'
|
|
27
|
+
},
|
|
28
|
+
toggleProps: {
|
|
29
|
+
tooltipPosition: 'bottom',
|
|
30
|
+
size: 'compact'
|
|
31
|
+
}
|
|
24
32
|
}, () => createElement(Fragment, null, createElement(MenuGroup, {
|
|
25
33
|
label: _x('View', 'noun')
|
|
26
34
|
}, createElement(PreferenceToggleMenuItem, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MenuGroup","MenuItem","ToolbarDropdownMenu","VisuallyHidden","useState","__","_x","external","
|
|
1
|
+
{"version":3,"names":["MenuGroup","MenuItem","ToolbarDropdownMenu","VisuallyHidden","useState","__","_x","external","moreVertical","displayShortcut","useShortcut","PreferenceToggleMenuItem","KeyboardShortcutHelpModal","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","toggleKeyboardShortcutsModal","createElement","Fragment","icon","label","popoverProps","placement","className","toggleProps","tooltipPosition","size","scope","name","info","messageActivated","messageDeactivated","onClick","shortcut","access","role","href","target","rel","as","isModalActive","toggleModal"],"sources":["@wordpress/customize-widgets/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tToolbarDropdownMenu,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/customize-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarDropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ () => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</ToolbarDropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,QAAQ,EACRC,mBAAmB,EACnBC,cAAc,QACR,uBAAuB;AAC9B,SA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p-admin-border-width-focus: 2px;
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
|
+
--wp-bound-block-color: #9747ff;
|
|
99
100
|
}
|
|
100
101
|
@media (min-resolution: 192dpi) {
|
|
101
102
|
:root {
|
|
@@ -243,6 +244,10 @@
|
|
|
243
244
|
margin: 0 0.2rem 0 0;
|
|
244
245
|
}
|
|
245
246
|
|
|
247
|
+
.components-popover.more-menu-dropdown__content {
|
|
248
|
+
z-index: 99998;
|
|
249
|
+
}
|
|
250
|
+
|
|
246
251
|
.customize-control-sidebar_block_editor .block-editor-block-list__block-popover {
|
|
247
252
|
position: fixed !important;
|
|
248
253
|
z-index: 7;
|
package/build-style/style.css
CHANGED
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
--wp-admin-border-width-focus: 2px;
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
|
+
--wp-bound-block-color: #9747ff;
|
|
99
100
|
}
|
|
100
101
|
@media (min-resolution: 192dpi) {
|
|
101
102
|
:root {
|
|
@@ -243,6 +244,10 @@
|
|
|
243
244
|
margin: 0 0 0 0.2rem;
|
|
244
245
|
}
|
|
245
246
|
|
|
247
|
+
.components-popover.more-menu-dropdown__content {
|
|
248
|
+
z-index: 99998;
|
|
249
|
+
}
|
|
250
|
+
|
|
246
251
|
.customize-control-sidebar_block_editor .block-editor-block-list__block-popover {
|
|
247
252
|
position: fixed !important;
|
|
248
253
|
z-index: 7;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/customize-widgets",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.30.0",
|
|
4
4
|
"description": "Widgets blocks in Customizer Module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -24,26 +24,26 @@
|
|
|
24
24
|
"react-native": "src/index",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.16.0",
|
|
27
|
-
"@wordpress/block-editor": "^12.
|
|
28
|
-
"@wordpress/block-library": "^8.
|
|
29
|
-
"@wordpress/blocks": "^12.
|
|
30
|
-
"@wordpress/components": "^27.
|
|
31
|
-
"@wordpress/compose": "^6.
|
|
32
|
-
"@wordpress/core-data": "^6.
|
|
33
|
-
"@wordpress/data": "^9.
|
|
34
|
-
"@wordpress/dom": "^3.
|
|
35
|
-
"@wordpress/element": "^5.
|
|
36
|
-
"@wordpress/hooks": "^3.
|
|
37
|
-
"@wordpress/i18n": "^4.
|
|
38
|
-
"@wordpress/icons": "^9.
|
|
39
|
-
"@wordpress/interface": "^5.
|
|
40
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
41
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
42
|
-
"@wordpress/keycodes": "^3.
|
|
43
|
-
"@wordpress/media-utils": "^4.
|
|
44
|
-
"@wordpress/preferences": "^3.
|
|
45
|
-
"@wordpress/private-apis": "^0.
|
|
46
|
-
"@wordpress/widgets": "^3.
|
|
27
|
+
"@wordpress/block-editor": "^12.21.0",
|
|
28
|
+
"@wordpress/block-library": "^8.30.0",
|
|
29
|
+
"@wordpress/blocks": "^12.30.0",
|
|
30
|
+
"@wordpress/components": "^27.1.0",
|
|
31
|
+
"@wordpress/compose": "^6.30.0",
|
|
32
|
+
"@wordpress/core-data": "^6.30.0",
|
|
33
|
+
"@wordpress/data": "^9.23.0",
|
|
34
|
+
"@wordpress/dom": "^3.53.0",
|
|
35
|
+
"@wordpress/element": "^5.30.0",
|
|
36
|
+
"@wordpress/hooks": "^3.53.0",
|
|
37
|
+
"@wordpress/i18n": "^4.53.0",
|
|
38
|
+
"@wordpress/icons": "^9.44.0",
|
|
39
|
+
"@wordpress/interface": "^5.30.0",
|
|
40
|
+
"@wordpress/is-shallow-equal": "^4.53.0",
|
|
41
|
+
"@wordpress/keyboard-shortcuts": "^4.30.0",
|
|
42
|
+
"@wordpress/keycodes": "^3.53.0",
|
|
43
|
+
"@wordpress/media-utils": "^4.44.0",
|
|
44
|
+
"@wordpress/preferences": "^3.30.0",
|
|
45
|
+
"@wordpress/private-apis": "^0.35.0",
|
|
46
|
+
"@wordpress/widgets": "^3.30.0",
|
|
47
47
|
"classnames": "^2.3.1",
|
|
48
48
|
"fast-deep-equal": "^3.1.3"
|
|
49
49
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "ac3c3e465a083081a86a4da6ee6fb817b41e5130"
|
|
58
58
|
}
|
|
@@ -9,10 +9,9 @@ import {
|
|
|
9
9
|
} from '@wordpress/components';
|
|
10
10
|
import { useState } from '@wordpress/element';
|
|
11
11
|
import { __, _x } from '@wordpress/i18n';
|
|
12
|
-
import { external } from '@wordpress/icons';
|
|
12
|
+
import { external, moreVertical } from '@wordpress/icons';
|
|
13
13
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
14
14
|
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
15
|
-
import { MoreMenuDropdown } from '@wordpress/interface';
|
|
16
15
|
import { PreferenceToggleMenuItem } from '@wordpress/preferences';
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -35,7 +34,18 @@ export default function MoreMenu() {
|
|
|
35
34
|
|
|
36
35
|
return (
|
|
37
36
|
<>
|
|
38
|
-
<
|
|
37
|
+
<ToolbarDropdownMenu
|
|
38
|
+
icon={ moreVertical }
|
|
39
|
+
label={ __( 'Options' ) }
|
|
40
|
+
popoverProps={ {
|
|
41
|
+
placement: 'bottom-end',
|
|
42
|
+
className: 'more-menu-dropdown__content',
|
|
43
|
+
} }
|
|
44
|
+
toggleProps={ {
|
|
45
|
+
tooltipPosition: 'bottom',
|
|
46
|
+
size: 'compact',
|
|
47
|
+
} }
|
|
48
|
+
>
|
|
39
49
|
{ () => (
|
|
40
50
|
<>
|
|
41
51
|
<MenuGroup label={ _x( 'View', 'noun' ) }>
|
|
@@ -106,7 +116,7 @@ export default function MoreMenu() {
|
|
|
106
116
|
</MenuGroup>
|
|
107
117
|
</>
|
|
108
118
|
) }
|
|
109
|
-
</
|
|
119
|
+
</ToolbarDropdownMenu>
|
|
110
120
|
<KeyboardShortcutHelpModal
|
|
111
121
|
isModalActive={ isKeyboardShortcutsModalActive }
|
|
112
122
|
toggleModal={ toggleKeyboardShortcutsModal }
|
package/src/style.scss
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import "./components/header/style.scss";
|
|
3
3
|
@import "./components/inserter/style.scss";
|
|
4
4
|
@import "./components/keyboard-shortcut-help-modal/style.scss";
|
|
5
|
+
@import "./components/more-menu/style.scss";
|
|
5
6
|
@import "./components/sidebar-block-editor/style.scss";
|
|
6
7
|
@import "./components/welcome-guide/style.scss";
|
|
7
8
|
@import "./controls/style.scss";
|