@wordpress/customize-widgets 4.35.0 → 5.0.1

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/components/block-appender/index.js +2 -2
  3. package/build/components/block-appender/index.js.map +1 -1
  4. package/build/components/block-inspector-button/index.js +5 -4
  5. package/build/components/block-inspector-button/index.js.map +1 -1
  6. package/build/components/customize-widgets/index.js +24 -18
  7. package/build/components/customize-widgets/index.js.map +1 -1
  8. package/build/components/error-boundary/index.js +12 -10
  9. package/build/components/error-boundary/index.js.map +1 -1
  10. package/build/components/focus-control/index.js +5 -4
  11. package/build/components/focus-control/index.js.map +1 -1
  12. package/build/components/header/index.js +48 -44
  13. package/build/components/header/index.js.map +1 -1
  14. package/build/components/inserter/index.js +25 -21
  15. package/build/components/inserter/index.js.map +1 -1
  16. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  17. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/index.js +50 -45
  19. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  20. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  21. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  22. package/build/components/more-menu/index.js +65 -54
  23. package/build/components/more-menu/index.js.map +1 -1
  24. package/build/components/sidebar-block-editor/index.js +42 -34
  25. package/build/components/sidebar-block-editor/index.js.map +1 -1
  26. package/build/components/sidebar-block-editor/sidebar-editor-provider.js +5 -4
  27. package/build/components/sidebar-block-editor/sidebar-editor-provider.js.map +1 -1
  28. package/build/components/sidebar-controls/index.js +5 -4
  29. package/build/components/sidebar-controls/index.js.map +1 -1
  30. package/build/components/welcome-guide/index.js +44 -33
  31. package/build/components/welcome-guide/index.js.map +1 -1
  32. package/build/filters/move-to-sidebar.js +16 -12
  33. package/build/filters/move-to-sidebar.js.map +1 -1
  34. package/build/filters/wide-widget-display.js +2 -2
  35. package/build/filters/wide-widget-display.js.map +1 -1
  36. package/build/index.js +3 -3
  37. package/build/index.js.map +1 -1
  38. package/build-module/components/block-appender/index.js +2 -2
  39. package/build-module/components/block-appender/index.js.map +1 -1
  40. package/build-module/components/block-inspector-button/index.js +5 -4
  41. package/build-module/components/block-inspector-button/index.js.map +1 -1
  42. package/build-module/components/customize-widgets/index.js +25 -18
  43. package/build-module/components/customize-widgets/index.js.map +1 -1
  44. package/build-module/components/error-boundary/index.js +12 -10
  45. package/build-module/components/error-boundary/index.js.map +1 -1
  46. package/build-module/components/focus-control/index.js +5 -4
  47. package/build-module/components/focus-control/index.js.map +1 -1
  48. package/build-module/components/header/index.js +50 -44
  49. package/build-module/components/header/index.js.map +1 -1
  50. package/build-module/components/inserter/index.js +26 -21
  51. package/build-module/components/inserter/index.js.map +1 -1
  52. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  53. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  54. package/build-module/components/keyboard-shortcut-help-modal/index.js +51 -45
  55. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  56. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  57. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  58. package/build-module/components/more-menu/index.js +67 -54
  59. package/build-module/components/more-menu/index.js.map +1 -1
  60. package/build-module/components/sidebar-block-editor/index.js +44 -34
  61. package/build-module/components/sidebar-block-editor/index.js.map +1 -1
  62. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js +5 -4
  63. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js.map +1 -1
  64. package/build-module/components/sidebar-controls/index.js +5 -4
  65. package/build-module/components/sidebar-controls/index.js.map +1 -1
  66. package/build-module/components/welcome-guide/index.js +45 -33
  67. package/build-module/components/welcome-guide/index.js.map +1 -1
  68. package/build-module/filters/move-to-sidebar.js +18 -12
  69. package/build-module/filters/move-to-sidebar.js.map +1 -1
  70. package/build-module/filters/wide-widget-display.js +2 -2
  71. package/build-module/filters/wide-widget-display.js.map +1 -1
  72. package/build-module/index.js +3 -3
  73. package/build-module/index.js.map +1 -1
  74. package/package.json +24 -23
  75. package/src/index.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_keyboardShortcuts","_shortcut","_interopRequireDefault","DynamicShortcut","name","keyCombination","description","aliases","useSelect","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore","_react","createElement","default","_default","exports"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASI,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EACvDC,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEI,wBAAuB,CAAC;IAEpC,OAAO;MACNR,cAAc,EAAEK,yBAAyB,CAAEN,IAAK,CAAC;MACjDG,OAAO,EAAEK,kBAAkB,CAAER,IAAK,CAAC;MACnCE,WAAW,EAAEK,sBAAsB,CAAEP,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAS,MAAA,CAAAC,aAAA,EAACd,SAAA,CAAAe,OAAQ;IACRX,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcb,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_keyboardShortcuts","_shortcut","_interopRequireDefault","_jsxRuntime","DynamicShortcut","name","keyCombination","description","aliases","useSelect","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore","jsx","default","_default","exports"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAkC,IAAAI,WAAA,GAAAJ,OAAA;AATlC;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASK,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EACvDC,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEI,wBAAuB,CAAC;IAEpC,OAAO;MACNR,cAAc,EAAEK,yBAAyB,CAAEN,IAAK,CAAC;MACjDG,OAAO,EAAEK,kBAAkB,CAAER,IAAK,CAAC;MACnCE,WAAW,EAAEK,sBAAsB,CAAEP,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAH,WAAA,CAAAY,GAAA,EAACd,SAAA,CAAAe,OAAQ;IACRV,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcZ,eAAe","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = KeyboardShortcutHelpModal;
8
- var _react = require("react");
9
8
  var _clsx = _interopRequireDefault(require("clsx"));
10
9
  var _components = require("@wordpress/components");
11
10
  var _i18n = require("@wordpress/i18n");
@@ -14,6 +13,7 @@ var _data = require("@wordpress/data");
14
13
  var _config = require("./config");
15
14
  var _shortcut = _interopRequireDefault(require("./shortcut"));
16
15
  var _dynamicShortcut = _interopRequireDefault(require("./dynamic-shortcut"));
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
17
  /**
18
18
  * External dependencies
19
19
  */
@@ -29,34 +29,38 @@ var _dynamicShortcut = _interopRequireDefault(require("./dynamic-shortcut"));
29
29
  const ShortcutList = ({
30
30
  shortcuts
31
31
  }) =>
32
+ /*#__PURE__*/
32
33
  /*
33
34
  * Disable reason: The `list` ARIA role is redundant but
34
35
  * Safari+VoiceOver won't announce the list otherwise.
35
36
  */
36
37
  /* eslint-disable jsx-a11y/no-redundant-roles */
37
- (0, _react.createElement)("ul", {
38
+ (0, _jsxRuntime.jsx)("ul", {
38
39
  className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
39
- role: "list"
40
- }, shortcuts.map((shortcut, index) => (0, _react.createElement)("li", {
41
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
42
- key: index
43
- }, typeof shortcut === 'string' ? (0, _react.createElement)(_dynamicShortcut.default, {
44
- name: shortcut
45
- }) : (0, _react.createElement)(_shortcut.default, {
46
- ...shortcut
47
- }))))
40
+ role: "list",
41
+ children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
42
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
43
+ children: typeof shortcut === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dynamicShortcut.default, {
44
+ name: shortcut
45
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_shortcut.default, {
46
+ ...shortcut
47
+ })
48
+ }, index))
49
+ })
48
50
  /* eslint-enable jsx-a11y/no-redundant-roles */;
49
51
  const ShortcutSection = ({
50
52
  title,
51
53
  shortcuts,
52
54
  className
53
- }) => (0, _react.createElement)("section", {
54
- className: (0, _clsx.default)('customize-widgets-keyboard-shortcut-help-modal__section', className)
55
- }, !!title && (0, _react.createElement)("h2", {
56
- className: "customize-widgets-keyboard-shortcut-help-modal__section-title"
57
- }, title), (0, _react.createElement)(ShortcutList, {
58
- shortcuts: shortcuts
59
- }));
55
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("section", {
56
+ className: (0, _clsx.default)('customize-widgets-keyboard-shortcut-help-modal__section', className),
57
+ children: [!!title && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
58
+ className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
59
+ children: title
60
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutList, {
61
+ shortcuts: shortcuts
62
+ })]
63
+ });
60
64
  const ShortcutCategorySection = ({
61
65
  title,
62
66
  categoryName,
@@ -65,7 +69,7 @@ const ShortcutCategorySection = ({
65
69
  const categoryShortcuts = (0, _data.useSelect)(select => {
66
70
  return select(_keyboardShortcuts.store).getCategoryShortcuts(categoryName);
67
71
  }, [categoryName]);
68
- return (0, _react.createElement)(ShortcutSection, {
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
69
73
  title: title,
70
74
  shortcuts: categoryShortcuts.concat(additionalShortcuts)
71
75
  });
@@ -90,33 +94,34 @@ function KeyboardShortcutHelpModal({
90
94
  if (!isModalActive) {
91
95
  return null;
92
96
  }
93
- return (0, _react.createElement)(_components.Modal, {
97
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Modal, {
94
98
  className: "customize-widgets-keyboard-shortcut-help-modal",
95
99
  title: (0, _i18n.__)('Keyboard shortcuts'),
96
- onRequestClose: toggleModal
97
- }, (0, _react.createElement)(ShortcutSection, {
98
- className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
99
- shortcuts: ['core/customize-widgets/keyboard-shortcuts']
100
- }), (0, _react.createElement)(ShortcutCategorySection, {
101
- title: (0, _i18n.__)('Global shortcuts'),
102
- categoryName: "global"
103
- }), (0, _react.createElement)(ShortcutCategorySection, {
104
- title: (0, _i18n.__)('Selection shortcuts'),
105
- categoryName: "selection"
106
- }), (0, _react.createElement)(ShortcutCategorySection, {
107
- title: (0, _i18n.__)('Block shortcuts'),
108
- categoryName: "block",
109
- additionalShortcuts: [{
110
- keyCombination: {
111
- character: '/'
112
- },
113
- description: (0, _i18n.__)('Change the block type after adding a new paragraph.'),
114
- /* translators: The forward-slash character. e.g. '/'. */
115
- ariaLabel: (0, _i18n.__)('Forward-slash')
116
- }]
117
- }), (0, _react.createElement)(ShortcutSection, {
118
- title: (0, _i18n.__)('Text formatting'),
119
- shortcuts: _config.textFormattingShortcuts
120
- }));
100
+ onRequestClose: toggleModal,
101
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
102
+ className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
103
+ shortcuts: ['core/customize-widgets/keyboard-shortcuts']
104
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
105
+ title: (0, _i18n.__)('Global shortcuts'),
106
+ categoryName: "global"
107
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
108
+ title: (0, _i18n.__)('Selection shortcuts'),
109
+ categoryName: "selection"
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
111
+ title: (0, _i18n.__)('Block shortcuts'),
112
+ categoryName: "block",
113
+ additionalShortcuts: [{
114
+ keyCombination: {
115
+ character: '/'
116
+ },
117
+ description: (0, _i18n.__)('Change the block type after adding a new paragraph.'),
118
+ /* translators: The forward-slash character. e.g. '/'. */
119
+ ariaLabel: (0, _i18n.__)('Forward-slash')
120
+ }]
121
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
122
+ title: (0, _i18n.__)('Text formatting'),
123
+ shortcuts: _config.textFormattingShortcuts
124
+ })]
125
+ });
121
126
  }
122
127
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_config","_shortcut","_dynamicShortcut","ShortcutList","shortcuts","_react","createElement","className","role","map","shortcut","index","key","default","name","ShortcutSection","title","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","registerShortcut","useDispatch","category","description","__","keyCombination","modifier","character","useShortcut","Modal","onRequestClose","ariaLabel","textFormattingShortcuts"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tregisterShortcut( {\n\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\tcategory: 'main',\n\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'h',\n\t\t},\n\t} );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,O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,KAAK,EAAG,IAAAkB,QAAE,EAAE,qBAAsB,CAAG;IACrCf,YAAY,EAAC;EAAW,CACxB,CAAC,EAEF,IAAAd,MAAA,CAAAC,aAAA,EAACY,uBAAuB;IACvBF,KAAK,EAAG,IAAAkB,QAAE,EAAE,iBAAkB,CAAG;IACjCf,YAAY,EAAC,OAAO;IACpBC,mBAAmB,EAAG,CACrB;MACCe,cAAc,EAAE;QAAEE,SAAS,EAAE;MAAI,CAAC;MAClCJ,WAAW,EAAE,IAAAC,QAAE,EACd,qDACD,CAAC;MACD;MACAO,SAAS,EAAE,IAAAP,QAAE,EAAE,eAAgB;IAChC,CAAC;EACC,CACH,CAAC,EACF,IAAA7B,MAAA,CAAAC,aAAA,EAACS,eAAe;IACfC,KAAK,EAAG,IAAAkB,QAAE,EAAE,iBAAkB,CAAG;IACjC9B,SAAS,EAAGsC;EAAyB,CACrC,CACK,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_config","_shortcut","_dynamicShortcut","_jsxRuntime","ShortcutList","shortcuts","jsx","className","role","children","map","shortcut","index","default","name","ShortcutSection","title","jsxs","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","registerShortcut","useDispatch","category","description","__","keyCombination","modifier","character","useShortcut","Modal","onRequestClose","ariaLabel","textFormattingShortcuts"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tregisterShortcut( {\n\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\tcategory: 'main',\n\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'h',\n\t\t},\n\t} );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection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IACLjC,SAAS,EAAC,gDAAgD;IAC1DS,KAAK,EAAG,IAAAmB,QAAE,EAAE,oBAAqB,CAAG;IACpCM,cAAc,EAAGX,WAAa;IAAArB,QAAA,gBAE9B,IAAAN,WAAA,CAAAG,GAAA,EAACS,eAAe;MACfR,SAAS,EAAC,gEAAgE;MAC1EF,SAAS,EAAG,CAAE,2CAA2C;IAAI,CAC7D,CAAC,eACF,IAAAF,WAAA,CAAAG,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAmB,QAAE,EAAE,kBAAmB,CAAG;MAClCf,YAAY,EAAC;IAAQ,CACrB,CAAC,eAEF,IAAAjB,WAAA,CAAAG,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAmB,QAAE,EAAE,qBAAsB,CAAG;MACrCf,YAAY,EAAC;IAAW,CACxB,CAAC,eAEF,IAAAjB,WAAA,CAAAG,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAmB,QAAE,EAAE,iBAAkB,CAAG;MACjCf,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCe,cAAc,EAAE;UAAEE,SAAS,EAAE;QAAI,CAAC;QAClCJ,WAAW,EAAE,IAAAC,QAAE,EACd,qDACD,CAAC;QACD;QACAO,SAAS,EAAE,IAAAP,QAAE,EAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACF,IAAAhC,WAAA,CAAAG,GAAA,EAACS,eAAe;MACfC,KAAK,EAAG,IAAAmB,QAAE,EAAE,iBAAkB,CAAG;MACjC9B,SAAS,EAAGsC;IAAyB,CACrC,CAAC;EAAA,CACI,CAAC;AAEV","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = require("react");
8
7
  var _element = require("@wordpress/element");
9
8
  var _keycodes = require("@wordpress/keycodes");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -17,20 +17,21 @@ function KeyCombination({
17
17
  }) {
18
18
  const shortcut = keyCombination.modifier ? _keycodes.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
19
19
  const ariaLabel = keyCombination.modifier ? _keycodes.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
20
- return (0, _react.createElement)("kbd", {
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
21
21
  className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
22
- "aria-label": forceAriaLabel || ariaLabel
23
- }, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
24
- if (character === '+') {
25
- return (0, _react.createElement)(_element.Fragment, {
26
- key: index
27
- }, character);
28
- }
29
- return (0, _react.createElement)("kbd", {
30
- key: index,
31
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key"
32
- }, character);
33
- }));
22
+ "aria-label": forceAriaLabel || ariaLabel,
23
+ children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
24
+ if (character === '+') {
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.Fragment, {
26
+ children: character
27
+ }, index);
28
+ }
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
30
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
31
+ children: character
32
+ }, index);
33
+ })
34
+ });
34
35
  }
35
36
  function Shortcut({
36
37
  description,
@@ -38,18 +39,21 @@ function Shortcut({
38
39
  aliases = [],
39
40
  ariaLabel
40
41
  }) {
41
- return (0, _react.createElement)(_element.Fragment, null, (0, _react.createElement)("div", {
42
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description"
43
- }, description), (0, _react.createElement)("div", {
44
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term"
45
- }, (0, _react.createElement)(KeyCombination, {
46
- keyCombination: keyCombination,
47
- forceAriaLabel: ariaLabel
48
- }), aliases.map((alias, index) => (0, _react.createElement)(KeyCombination, {
49
- keyCombination: alias,
50
- forceAriaLabel: ariaLabel,
51
- key: index
52
- }))));
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description",
45
+ children: description
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
47
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term",
48
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
49
+ keyCombination: keyCombination,
50
+ forceAriaLabel: ariaLabel
51
+ }), aliases.map((alias, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
52
+ keyCombination: alias,
53
+ forceAriaLabel: ariaLabel
54
+ }, index))]
55
+ })]
56
+ });
53
57
  }
54
58
  var _default = exports.default = Shortcut;
55
59
  //# sourceMappingURL=shortcut.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","_react","createElement","className","Array","isArray","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7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C5B,CAAC,EACAa,OAAO,CAACN,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,KAC5B,IAAAN,MAAA,CAAAC,aAAA,EAACV,cAAc;IACdC,cAAc,EAAGoB,KAAO;IACxBnB,cAAc,EAAGK,SAAW;IAC5BU,GAAG,EAAGF;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_keycodes","_jsxRuntime","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","jsx","className","children","Array","isArray","map","index","Fragment","Shortcut","description","aliases","jsxs","alias","_default","exports","default"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AAJ7E;AACA;AACA;;AAIA,SAASG,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EA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AAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcP,QAAQ","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = MoreMenu;
8
- var _react = require("react");
9
8
  var _components = require("@wordpress/components");
10
9
  var _element = require("@wordpress/element");
11
10
  var _i18n = require("@wordpress/i18n");
@@ -14,6 +13,7 @@ var _keycodes = require("@wordpress/keycodes");
14
13
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
15
14
  var _preferences = require("@wordpress/preferences");
16
15
  var _keyboardShortcutHelpModal = _interopRequireDefault(require("../keyboard-shortcut-help-modal"));
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
17
  /**
18
18
  * WordPress dependencies
19
19
  */
@@ -26,58 +26,69 @@ function MoreMenu() {
26
26
  const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0, _element.useState)(false);
27
27
  const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
28
28
  (0, _keyboardShortcuts.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
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
- }
40
- }, () => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, {
41
- label: (0, _i18n._x)('View', 'noun')
42
- }, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
43
- scope: "core/customize-widgets",
44
- name: "fixedToolbar",
45
- label: (0, _i18n.__)('Top toolbar'),
46
- info: (0, _i18n.__)('Access all block and document tools in a single place'),
47
- messageActivated: (0, _i18n.__)('Top toolbar activated'),
48
- messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
49
- })), (0, _react.createElement)(_components.MenuGroup, {
50
- label: (0, _i18n.__)('Tools')
51
- }, (0, _react.createElement)(_components.MenuItem, {
52
- onClick: () => {
53
- setIsKeyboardShortcutsModalVisible(true);
54
- },
55
- shortcut: _keycodes.displayShortcut.access('h')
56
- }, (0, _i18n.__)('Keyboard shortcuts')), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
57
- scope: "core/customize-widgets",
58
- name: "welcomeGuide",
59
- label: (0, _i18n.__)('Welcome Guide')
60
- }), (0, _react.createElement)(_components.MenuItem, {
61
- role: "menuitem",
62
- icon: _icons.external,
63
- href: (0, _i18n.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
64
- target: "_blank",
65
- rel: "noopener noreferrer"
66
- }, (0, _i18n.__)('Help'), (0, _react.createElement)(_components.VisuallyHidden, {
67
- as: "span"
68
- }, /* translators: accessibility text */
69
- (0, _i18n.__)('(opens in a new tab)')))), (0, _react.createElement)(_components.MenuGroup, {
70
- label: (0, _i18n.__)('Preferences')
71
- }, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
72
- scope: "core/customize-widgets",
73
- name: "keepCaretInsideBlock",
74
- label: (0, _i18n.__)('Contain text cursor inside block'),
75
- info: (0, _i18n.__)('Aids screen readers by stopping text caret from leaving blocks.'),
76
- messageActivated: (0, _i18n.__)('Contain text cursor inside block activated'),
77
- messageDeactivated: (0, _i18n.__)('Contain text cursor inside block deactivated')
78
- })))), (0, _react.createElement)(_keyboardShortcutHelpModal.default, {
79
- isModalActive: isKeyboardShortcutsModalActive,
80
- toggleModal: toggleKeyboardShortcutsModal
81
- }));
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarDropdownMenu, {
31
+ icon: _icons.moreVertical,
32
+ label: (0, _i18n.__)('Options'),
33
+ popoverProps: {
34
+ placement: 'bottom-end',
35
+ className: 'more-menu-dropdown__content'
36
+ },
37
+ toggleProps: {
38
+ tooltipPosition: 'bottom',
39
+ size: 'compact'
40
+ },
41
+ children: () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
42
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuGroup, {
43
+ label: (0, _i18n._x)('View', 'noun'),
44
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
45
+ scope: "core/customize-widgets",
46
+ name: "fixedToolbar",
47
+ label: (0, _i18n.__)('Top toolbar'),
48
+ info: (0, _i18n.__)('Access all block and document tools in a single place'),
49
+ messageActivated: (0, _i18n.__)('Top toolbar activated'),
50
+ messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
51
+ })
52
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuGroup, {
53
+ label: (0, _i18n.__)('Tools'),
54
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
55
+ onClick: () => {
56
+ setIsKeyboardShortcutsModalVisible(true);
57
+ },
58
+ shortcut: _keycodes.displayShortcut.access('h'),
59
+ children: (0, _i18n.__)('Keyboard shortcuts')
60
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
61
+ scope: "core/customize-widgets",
62
+ name: "welcomeGuide",
63
+ label: (0, _i18n.__)('Welcome Guide')
64
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuItem, {
65
+ role: "menuitem",
66
+ icon: _icons.external,
67
+ href: (0, _i18n.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
68
+ target: "_blank",
69
+ rel: "noopener noreferrer",
70
+ children: [(0, _i18n.__)('Help'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
71
+ as: "span",
72
+ children: /* translators: accessibility text */
73
+ (0, _i18n.__)('(opens in a new tab)')
74
+ })]
75
+ })]
76
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuGroup, {
77
+ label: (0, _i18n.__)('Preferences'),
78
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
79
+ scope: "core/customize-widgets",
80
+ name: "keepCaretInsideBlock",
81
+ label: (0, _i18n.__)('Contain text cursor inside block'),
82
+ info: (0, _i18n.__)('Aids screen readers by stopping text caret from leaving blocks.'),
83
+ messageActivated: (0, _i18n.__)('Contain text cursor inside block activated'),
84
+ messageDeactivated: (0, _i18n.__)('Contain text cursor inside block deactivated')
85
+ })
86
+ })]
87
+ })
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcutHelpModal.default, {
89
+ isModalActive: isKeyboardShortcutsModalActive,
90
+ toggleModal: toggleKeyboardShortcutsModal
91
+ })]
92
+ });
82
93
  }
83
94
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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,4BAA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8BAAgC;IAChDyC,WAAW,EAAGtC;EAA8B,CAC5C,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_element","_i18n","_icons","_keycodes","_keyboardShortcuts","_preferences","_keyboardShortcutHelpModal","_interopRequireDefault","_jsxRuntime","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","jsxs","Fragment","children","jsx","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;AAAwE,IAAAS,WAAA,GAAAT,OAAA;AAnBxE;AACA;AACA;;AAcA;AACA;AACA;;AAGe,SAASU,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,oBACC,IAAAL,WAAA,CAAAO,IAAA,EAAAP,WAAA,CAAAQ,QAAA;IAAAC,QAAA,gBACC,IAAAT,WAAA,CAAAU,GAAA,EAACpB,WAAA,CAAAqB,mBAAmB;MACnBC,IAAI,EAAGC,mBAAc;MACrBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;MACzBC,YAAY,EAAG;QACdC,SAAS,EAAE,YAAY;QACvBC,SAAS,EAAE;MACZ,CAAG;MACHC,WAAW,EAAG;QACbC,eAAe,EAAE,QAAQ;QACzBC,IAAI,EAAE;MACP,CAAG;MAAAZ,QAAA,EAEDA,CAAA,kBACD,IAA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,IAAI,EAAG,IAAAtB,QAAE,EACR,yEACD,CAAG;YACHuB,MAAM,EAAC,QAAQ;YACfC,GAAG,EAAC,qBAAqB;YAAA9B,QAAA,GAEvB,IAAAM,QAAE,EAAE,MAAO,CAAC,eACd,IAAAf,WAAA,CAAAU,GAAA,EAACpB,WAAA,CAAAkD,cAAc;cAACC,EAAE,EAAC,MAAM;cAAAhC,QAAA,EAEvB;cACA,IAAAM,QAAE,EAAE,sBAAuB;YAAC,CAEd,CAAC;UAAA,CACR,CAAC;QAAA,CACD,CAAC,eACZ,IAAAf,WAAA,CAAAU,GAAA,EAACpB,WAAA,CAAAgC,SAAS;UAACR,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;UAAAN,QAAA,eACvC,IAAAT,WAAA,CAAAU,GAAA,EAACb,YAAA,CAAA2B,wBAAwB;YACxBC,KAAK,EAAC,wBAAwB;YAC9BC,IAAI,EAAC,sBAAsB;YAC3BZ,KAAK,EAAG,IAAAC,QAAE,EACT,kCACD,CAAG;YACHY,IAAI,EAAG,IAAAZ,QAAE,EACR,iEACD,CAAG;YACHa,gBAAgB,EAAG,IAAAb,QAAE,EACpB,4CACD,CAAG;YACHc,kBAAkB,EAAG,IAAAd,QAAE,EACtB,8CACD;UAAG,CACH;QAAC,CACQ,CAAC;MAAA,CACX;IACF,CACmB,CAAC,eACtB,IAAAf,WAAA,CAAAU,GAAA,EAACZ,0BAAA,CAAA4C,OAAyB;MACzBC,aAAa,EAAGzC,8BAAgC;MAChD0C,WAAW,EAAGvC;IAA8B,CAC5C,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = SidebarBlockEditor;
8
- var _react = require("react");
9
8
  var _compose = require("@wordpress/compose");
10
9
  var _coreData = require("@wordpress/core-data");
11
10
  var _data = require("@wordpress/data");
@@ -22,6 +21,7 @@ var _welcomeGuide = _interopRequireDefault(require("../welcome-guide"));
22
21
  var _keyboardShortcuts = _interopRequireDefault(require("../keyboard-shortcuts"));
23
22
  var _blockAppender = _interopRequireDefault(require("../block-appender"));
24
23
  var _lockUnlock = require("../../lock-unlock");
24
+ var _jsxRuntime = require("react/jsx-runtime");
25
25
  /**
26
26
  * WordPress dependencies
27
27
  */
@@ -87,41 +87,49 @@ function SidebarBlockEditor({
87
87
  };
88
88
  }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isMediumViewport, keepCaretInsideBlock, setIsInserterOpened]);
89
89
  if (isWelcomeGuideActive) {
90
- return (0, _react.createElement)(_welcomeGuide.default, {
90
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_welcomeGuide.default, {
91
91
  sidebar: sidebar
92
92
  });
93
93
  }
94
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_keyboardShortcuts.default.Register, null), (0, _react.createElement)(BlockKeyboardShortcuts, null), (0, _react.createElement)(_sidebarEditorProvider.default, {
95
- sidebar: sidebar,
96
- settings: settings
97
- }, (0, _react.createElement)(_keyboardShortcuts.default, {
98
- undo: sidebar.undo,
99
- redo: sidebar.redo,
100
- save: sidebar.save
101
- }), (0, _react.createElement)(_header.default, {
102
- sidebar: sidebar,
103
- inserter: inserter,
104
- isInserterOpened: isInserterOpened,
105
- setIsInserterOpened: setIsInserterOpened,
106
- isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
107
- }), (isFixedToolbarActive || !isMediumViewport) && (0, _react.createElement)(_blockEditor.BlockToolbar, {
108
- hideDragHandle: true
109
- }), (0, _react.createElement)(BlockCanvas, {
110
- shouldIframe: false,
111
- styles: settings.defaultEditorStyles,
112
- height: "100%"
113
- }, (0, _react.createElement)(_blockEditor.BlockList, {
114
- renderAppender: _blockAppender.default
115
- })), (0, _element.createPortal)(
116
- // This is a temporary hack to prevent button component inside <BlockInspector>
117
- // from submitting form when type="button" is not specified.
118
- (0, _react.createElement)("form", {
119
- onSubmit: event => event.preventDefault()
120
- }, (0, _react.createElement)(_blockEditor.BlockInspector, null)), inspector.contentContainer[0])), (0, _react.createElement)(_blockEditor.__unstableBlockSettingsMenuFirstItem, null, ({
121
- onClose
122
- }) => (0, _react.createElement)(_blockInspectorButton.default, {
123
- inspector: inspector,
124
- closeMenu: onClose
125
- })));
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
95
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default.Register, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sidebarEditorProvider.default, {
96
+ sidebar: sidebar,
97
+ settings: settings,
98
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default, {
99
+ undo: sidebar.undo,
100
+ redo: sidebar.redo,
101
+ save: sidebar.save
102
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
103
+ sidebar: sidebar,
104
+ inserter: inserter,
105
+ isInserterOpened: isInserterOpened,
106
+ setIsInserterOpened: setIsInserterOpened,
107
+ isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
108
+ }), (isFixedToolbarActive || !isMediumViewport) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockToolbar, {
109
+ hideDragHandle: true
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockCanvas, {
111
+ shouldIframe: false,
112
+ styles: settings.defaultEditorStyles,
113
+ height: "100%",
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockList, {
115
+ renderAppender: _blockAppender.default
116
+ })
117
+ }), (0, _element.createPortal)(
118
+ /*#__PURE__*/
119
+ // This is a temporary hack to prevent button component inside <BlockInspector>
120
+ // from submitting form when type="button" is not specified.
121
+ (0, _jsxRuntime.jsx)("form", {
122
+ onSubmit: event => event.preventDefault(),
123
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockInspector, {})
124
+ }), inspector.contentContainer[0])]
125
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__unstableBlockSettingsMenuFirstItem, {
126
+ children: ({
127
+ onClose
128
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockInspectorButton.default, {
129
+ inspector: inspector,
130
+ closeMenu: onClose
131
+ })
132
+ })]
133
+ });
126
134
  }
127
135
  //# sourceMappingURL=index.js.map