@wordpress/customize-widgets 5.1.0 → 5.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.3.0 (2024-07-10)
6
+
7
+ ## 5.2.0 (2024-06-26)
8
+
5
9
  ## 5.1.0 (2024-06-15)
6
10
 
7
11
  ## 5.0.0 (2024-05-31)
@@ -127,11 +131,11 @@
127
131
 
128
132
  ## 3.0.0 (2022-02-10)
129
133
 
130
- ### Breaking Change
134
+ ### Breaking Changes
131
135
 
132
136
  - The `GUTENBERG_PHASE` environment variable has been renamed to `IS_GUTENBERG_PLUGIN` and is now a boolean ([#38202](https://github.com/WordPress/gutenberg/pull/38202)).
133
137
 
134
- ### Bug Fix
138
+ ### Bug Fixes
135
139
 
136
140
  - Removed unused `@wordpress/a11y` dependency ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
137
141
 
@@ -139,7 +143,7 @@
139
143
 
140
144
  ## 2.0.0 (2021-07-29)
141
145
 
142
- ### Breaking Change
146
+ ### Breaking Changes
143
147
 
144
148
  - Upgraded React components to work with v17.0 ([#29118](https://github.com/WordPress/gutenberg/pull/29118)). There are no new features in React v17.0 as explained in the [blog post](https://reactjs.org/blog/2020/10/20/react-v17.html).
145
149
 
@@ -53,24 +53,16 @@ function Header({
53
53
  icon: !(0, _i18n.isRTL)() ? _icons.undo : _icons.redo
54
54
  /* translators: button label text should, if possible, be under 16 characters. */,
55
55
  label: (0, _i18n.__)('Undo'),
56
- shortcut: _keycodes.displayShortcut.primary('z')
57
- // If there are no undo levels we don't want to actually disable this
58
- // button, because it will remove focus for keyboard users.
59
- // See: https://github.com/WordPress/gutenberg/issues/3486
60
- ,
61
- "aria-disabled": !hasUndo,
56
+ shortcut: _keycodes.displayShortcut.primary('z'),
57
+ disabled: !hasUndo,
62
58
  onClick: sidebar.undo,
63
59
  className: "customize-widgets-editor-history-button undo-button"
64
60
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
65
61
  icon: !(0, _i18n.isRTL)() ? _icons.redo : _icons.undo
66
62
  /* translators: button label text should, if possible, be under 16 characters. */,
67
63
  label: (0, _i18n.__)('Redo'),
68
- shortcut: shortcut
69
- // If there are no undo levels we don't want to actually disable this
70
- // button, because it will remove focus for keyboard users.
71
- // See: https://github.com/WordPress/gutenberg/issues/3486
72
- ,
73
- "aria-disabled": !hasRedo,
64
+ shortcut: shortcut,
65
+ disabled: !hasRedo,
74
66
  onClick: sidebar.redo,
75
67
  className: "customize-widgets-editor-history-button redo-button"
76
68
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blockEditor","_element","_keycodes","_i18n","_icons","_inserter","_moreMenu","_jsxRuntime","Header","sidebar","inserter","isInserterOpened","setIsInserterOpened","isFixedToolbarActive","hasUndo","hasRedo","setUndoRedo","useState","shortcut","isAppleOS","displayShortcut","primaryShift","primary","useEffect","subscribeHistory","jsxs","Fragment","children","jsx","className","clsx","NavigableToolbar","__","ToolbarButton","icon","isRTL","undoIcon","redoIcon","label","onClick","undo","redo","isPressed","variant","plus","_x","isOpen","default","createPortal","setIsOpened","contentContainer","_default","exports"],"sources":["@wordpress/customize-widgets/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { createPortal, useEffect, useState } from '@wordpress/element';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport { plus, undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport MoreMenu from '../more-menu';\n\nfunction Header( {\n\tsidebar,\n\tinserter,\n\tisInserterOpened,\n\tsetIsInserterOpened,\n\tisFixedToolbarActive,\n} ) {\n\tconst [ [ hasUndo, hasRedo ], setUndoRedo ] = useState( [\n\t\tsidebar.hasUndo(),\n\t\tsidebar.hasRedo(),\n\t] );\n\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribeHistory( () => {\n\t\t\tsetUndoRedo( [ sidebar.hasUndo(), sidebar.hasRedo() ] );\n\t\t} );\n\t}, [ sidebar ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'customize-widgets-header', {\n\t\t\t\t\t'is-fixed-toolbar-active': isFixedToolbarActive,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tclassName=\"customize-widgets-header-toolbar\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Undo' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\t\t\t\taria-disabled={ ! hasUndo }\n\t\t\t\t\t\tonClick={ sidebar.undo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button undo-button\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Redo' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\t\t\t\taria-disabled={ ! hasRedo }\n\t\t\t\t\t\tonClick={ sidebar.redo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button redo-button\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tclassName=\"customize-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsInserterOpened( ( isOpen ) => ! isOpen );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</NavigableToolbar>\n\t\t\t</div>\n\n\t\t\t{ createPortal(\n\t\t\t\t<Inserter setIsOpened={ setIsInserterOpened } />,\n\t\t\t\tinserter.contentContainer[ 0 ]\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,SAAA,GAAAT,sBAAA,CAAAC,O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gB,CAAE,CAAC,CAC7B,CAAC;EAAA,CACA,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEcvC,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blockEditor","_element","_keycodes","_i18n","_icons","_inserter","_moreMenu","_jsxRuntime","Header","sidebar","inserter","isInserterOpened","setIsInserterOpened","isFixedToolbarActive","hasUndo","hasRedo","setUndoRedo","useState","shortcut","isAppleOS","displayShortcut","primaryShift","primary","useEffect","subscribeHistory","jsxs","Fragment","children","jsx","className","clsx","NavigableToolbar","__","ToolbarButton","icon","isRTL","undoIcon","redoIcon","label","disabled","onClick","undo","redo","isPressed","variant","plus","_x","isOpen","default","createPortal","setIsOpened","contentContainer","_default","exports"],"sources":["@wordpress/customize-widgets/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { createPortal, useEffect, useState } from '@wordpress/element';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport { plus, undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport MoreMenu from '../more-menu';\n\nfunction Header( {\n\tsidebar,\n\tinserter,\n\tisInserterOpened,\n\tsetIsInserterOpened,\n\tisFixedToolbarActive,\n} ) {\n\tconst [ [ hasUndo, hasRedo ], setUndoRedo ] = useState( [\n\t\tsidebar.hasUndo(),\n\t\tsidebar.hasRedo(),\n\t] );\n\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribeHistory( () => {\n\t\t\tsetUndoRedo( [ sidebar.hasUndo(), sidebar.hasRedo() ] );\n\t\t} );\n\t}, [ sidebar ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'customize-widgets-header', {\n\t\t\t\t\t'is-fixed-toolbar-active': isFixedToolbarActive,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tclassName=\"customize-widgets-header-toolbar\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Undo' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t\t\t\tdisabled={ ! hasUndo }\n\t\t\t\t\t\tonClick={ sidebar.undo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button undo-button\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Redo' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\tdisabled={ ! hasRedo }\n\t\t\t\t\t\tonClick={ sidebar.redo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button redo-button\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tclassName=\"customize-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsInserterOpened( ( isOpen ) => ! isOpen );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</NavigableToolbar>\n\t\t\t</div>\n\n\t\t\t{ createPortal(\n\t\t\t\t<Inserter setIsOpened={ setIsInserterOpened } />,\n\t\t\t\tinserter.contentContainer[ 0 ]\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,SAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAoC,IAAAS,WAAA,GAAAT,OAAA;AAnBpC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAIA,SAASU,MAAMA,CAAE;EAChBC,OAAO;EACPC,QAAQ;EACRC,gBAAgB;EAChBC,mBAAmB;EACnBC;AACD,CAAC,EAAG;EACH,MAAM,CAAE,CAAEC,OAAO,EAAEC,OAAO,CAAE,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAE,CACvDR,OAAO,CAACK,OAAO,CAAC,CAAC,EACjBL,OAAO,CAACM,OAAO,CAAC,CAAC,CAChB,CAAC;EAEH,MAAMG,QAAQ,GAAG,IAAAC,mBAAS,EAAC,CAAC,GACzBC,yBAAe,CAACC,YAAY,CAAE,GAAI,CAAC,GACnCD,yBAAe,CAACE,OAAO,CAAE,GAAI,CAAC;EAEjC,IAAAC,kBAAS,EAAE,MAAM;IAChB,OAAOd,OAAO,CAACe,gBAAgB,CAAE,MAAM;MACtCR,WAA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AAC,eAEF,IAAAtB,WAAA,CAAAqB,GAAA,EAAC7B,WAAA,CAAAkC,aAAa;UACbJ,SAAS,EAAC,mDAAmD;UAC7Dc,SAAS,EAAGhC,gBAAkB;UAC9BiC,OAAO,EAAC,SAAS;UACjBV,IAAI,EAAGW,WAAM;UACbP,KAAK,EAAG,IAAAQ,QAAE,EACT,WAAW,EACX,yCACD,CAAG;UACHN,OAAO,EAAGA,CAAA,KAAM;YACf5B,mBAAmB,CAAImC,MAAM,IAAM,CAAEA,MAAO,CAAC;UAC9C;QAAG,CACH,CAAC,eACF,IAAAxC,WAAA,CAAAqB,GAAA,EAACtB,SAAA,CAAA0C,OAAQ,IAAE,CAAC;MAAA,CACK;IAAC,CACf,CAAC,EAEJ,IAAAC,qBAAY,gBACb,IAAA1C,WAAA,CAAAqB,GAAA,EAACvB,SAAA,CAAA2C,OAAQ;MAACE,WAAW,EAAGtC;IAAqB,CAAE,CAAC,EAChDF,QAAQ,CAACyC,gBAAgB,CAAE,CAAC,CAC7B,CAAC;EAAA,CACA,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEcxC,MAAM","ignoreList":[]}
@@ -12,7 +12,7 @@ var _privateApis = require("@wordpress/private-apis");
12
12
  const {
13
13
  lock,
14
14
  unlock
15
- } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/customize-widgets');
15
+ } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/customize-widgets');
16
16
  exports.unlock = unlock;
17
17
  exports.lock = lock;
18
18
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/customize-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/customize-widgets'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,8BACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/customize-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/customize-widgets'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,+HAA+H,EAC/H,8BACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -47,24 +47,16 @@ function Header({
47
47
  icon: !isRTL() ? undoIcon : redoIcon
48
48
  /* translators: button label text should, if possible, be under 16 characters. */,
49
49
  label: __('Undo'),
50
- shortcut: displayShortcut.primary('z')
51
- // If there are no undo levels we don't want to actually disable this
52
- // button, because it will remove focus for keyboard users.
53
- // See: https://github.com/WordPress/gutenberg/issues/3486
54
- ,
55
- "aria-disabled": !hasUndo,
50
+ shortcut: displayShortcut.primary('z'),
51
+ disabled: !hasUndo,
56
52
  onClick: sidebar.undo,
57
53
  className: "customize-widgets-editor-history-button undo-button"
58
54
  }), /*#__PURE__*/_jsx(ToolbarButton, {
59
55
  icon: !isRTL() ? redoIcon : undoIcon
60
56
  /* translators: button label text should, if possible, be under 16 characters. */,
61
57
  label: __('Redo'),
62
- shortcut: shortcut
63
- // If there are no undo levels we don't want to actually disable this
64
- // button, because it will remove focus for keyboard users.
65
- // See: https://github.com/WordPress/gutenberg/issues/3486
66
- ,
67
- "aria-disabled": !hasRedo,
58
+ shortcut: shortcut,
59
+ disabled: !hasRedo,
68
60
  onClick: sidebar.redo,
69
61
  className: "customize-widgets-editor-history-button redo-button"
70
62
  }), /*#__PURE__*/_jsx(ToolbarButton, {
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","ToolbarButton","NavigableToolbar","createPortal","useEffect","useState","displayShortcut","isAppleOS","__","_x","isRTL","plus","undo","undoIcon","redo","redoIcon","Inserter","MoreMenu","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Header","sidebar","inserter","isInserterOpened","setIsInserterOpened","isFixedToolbarActive","hasUndo","hasRedo","setUndoRedo","shortcut","primaryShift","primary","subscribeHistory","children","className","icon","label","onClick","isPressed","variant","isOpen","setIsOpened","contentContainer"],"sources":["@wordpress/customize-widgets/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { createPortal, useEffect, useState } from '@wordpress/element';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport { plus, undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport MoreMenu from '../more-menu';\n\nfunction Header( {\n\tsidebar,\n\tinserter,\n\tisInserterOpened,\n\tsetIsInserterOpened,\n\tisFixedToolbarActive,\n} ) {\n\tconst [ [ hasUndo, hasRedo ], setUndoRedo ] = useState( [\n\t\tsidebar.hasUndo(),\n\t\tsidebar.hasRedo(),\n\t] );\n\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribeHistory( () => {\n\t\t\tsetUndoRedo( [ sidebar.hasUndo(), sidebar.hasRedo() ] );\n\t\t} );\n\t}, [ sidebar ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'customize-widgets-header', {\n\t\t\t\t\t'is-fixed-toolbar-active': isFixedToolbarActive,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tclassName=\"customize-widgets-header-toolbar\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Undo' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\t\t\t\taria-disabled={ ! hasUndo }\n\t\t\t\t\t\tonClick={ sidebar.undo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button undo-button\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Redo' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\t\t\t\taria-disabled={ ! hasRedo }\n\t\t\t\t\t\tonClick={ sidebar.redo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button redo-button\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tclassName=\"customize-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsInserterOpened( ( isOpen ) => ! isOpen );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</NavigableToolbar>\n\t\t\t</div>\n\n\t\t\t{ createPortal(\n\t\t\t\t<Inserter setIsOpened={ setIsInserterOpened } />,\n\t\t\t\tinserter.contentContainer[ 0 ]\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Header;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,YAAY,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AACtE,SAASC,eAAe,EAAEC,SAAS,QAAQ,qBAAqB;AAChE,SAASC,EAAE,EAAEC,EAAE,EAAEC,KAAK,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ableToolbar","createPortal","useEffect","useState","displayShortcut","isAppleOS","__","_x","isRTL","plus","undo","undoIcon","redo","redoIcon","Inserter","MoreMenu","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Header","sidebar","inserter","isInserterOpened","setIsInserterOpened","isFixedToolbarActive","hasUndo","hasRedo","setUndoRedo","shortcut","primaryShift","primary","subscribeHistory","children","className","icon","label","disabled","onClick","isPressed","variant","isOpen","setIsOpened","contentContainer"],"sources":["@wordpress/customize-widgets/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { createPortal, useEffect, useState } from '@wordpress/element';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport { plus, undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport MoreMenu from '../more-menu';\n\nfunction Header( {\n\tsidebar,\n\tinserter,\n\tisInserterOpened,\n\tsetIsInserterOpened,\n\tisFixedToolbarActive,\n} ) {\n\tconst [ [ hasUndo, hasRedo ], setUndoRedo ] = useState( [\n\t\tsidebar.hasUndo(),\n\t\tsidebar.hasRedo(),\n\t] );\n\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribeHistory( () => {\n\t\t\tsetUndoRedo( [ sidebar.hasUndo(), sidebar.hasRedo() ] );\n\t\t} );\n\t}, [ sidebar ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'customize-widgets-header', {\n\t\t\t\t\t'is-fixed-toolbar-active': isFixedToolbarActive,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tclassName=\"customize-widgets-header-toolbar\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Undo' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t\t\t\tdisabled={ ! hasUndo }\n\t\t\t\t\t\tonClick={ sidebar.undo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button undo-button\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Redo' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\tdisabled={ ! hasRedo }\n\t\t\t\t\t\tonClick={ sidebar.redo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button redo-button\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tclassName=\"customize-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsInserterOpened( ( isOpen ) => ! isOpen );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</NavigableToolbar>\n\t\t\t</div>\n\n\t\t\t{ createPortal(\n\t\t\t\t<Inserter setIsOpened={ setIsInserterOpened } />,\n\t\t\t\tin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M,IAAM,CAAEA,MAAO,CAAC;UAC9C;QAAG,CACH,CAAC,eACF1B,IAAA,CAACF,QAAQ,IAAE,CAAC;MAAA,CACK;IAAC,CACf,CAAC,EAEJd,YAAY,eACbgB,IAAA,CAACH,QAAQ;MAAC8B,WAAW,EAAGlB;IAAqB,CAAE,CAAC,EAChDF,QAAQ,CAACqB,gBAAgB,CAAE,CAAC,CAC7B,CAAC;EAAA,CACA,CAAC;AAEL;AAEA,eAAevB,MAAM","ignoreList":[]}
@@ -5,5 +5,5 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
  export const {
6
6
  lock,
7
7
  unlock
8
- } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/customize-widgets');
8
+ } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/customize-widgets');
9
9
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/customize-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/customize-widgets'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,iHAAiH,EACjH,8BACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/customize-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/customize-widgets'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,+HAA+H,EAC/H,8BACD,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/customize-widgets",
3
- "version": "5.1.0",
3
+ "version": "5.3.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",
@@ -25,26 +25,26 @@
25
25
  "react-native": "src/index",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.16.0",
28
- "@wordpress/block-editor": "^13.1.0",
29
- "@wordpress/block-library": "^9.1.0",
30
- "@wordpress/blocks": "^13.1.0",
31
- "@wordpress/components": "^28.1.0",
32
- "@wordpress/compose": "^7.1.0",
33
- "@wordpress/core-data": "^7.1.0",
34
- "@wordpress/data": "^10.1.0",
35
- "@wordpress/dom": "^4.1.0",
36
- "@wordpress/element": "^6.1.0",
37
- "@wordpress/hooks": "^4.1.0",
38
- "@wordpress/i18n": "^5.1.0",
39
- "@wordpress/icons": "^10.1.0",
40
- "@wordpress/interface": "^6.1.0",
41
- "@wordpress/is-shallow-equal": "^5.1.0",
42
- "@wordpress/keyboard-shortcuts": "^5.1.0",
43
- "@wordpress/keycodes": "^4.1.0",
44
- "@wordpress/media-utils": "^5.1.0",
45
- "@wordpress/preferences": "^4.1.0",
46
- "@wordpress/private-apis": "^1.1.0",
47
- "@wordpress/widgets": "^4.1.0",
28
+ "@wordpress/block-editor": "^13.3.0",
29
+ "@wordpress/block-library": "^9.3.0",
30
+ "@wordpress/blocks": "^13.3.0",
31
+ "@wordpress/components": "^28.3.0",
32
+ "@wordpress/compose": "^7.3.0",
33
+ "@wordpress/core-data": "^7.3.0",
34
+ "@wordpress/data": "^10.3.0",
35
+ "@wordpress/dom": "^4.3.0",
36
+ "@wordpress/element": "^6.3.0",
37
+ "@wordpress/hooks": "^4.3.0",
38
+ "@wordpress/i18n": "^5.3.0",
39
+ "@wordpress/icons": "^10.3.0",
40
+ "@wordpress/interface": "^6.3.0",
41
+ "@wordpress/is-shallow-equal": "^5.3.0",
42
+ "@wordpress/keyboard-shortcuts": "^5.3.0",
43
+ "@wordpress/keycodes": "^4.3.0",
44
+ "@wordpress/media-utils": "^5.3.0",
45
+ "@wordpress/preferences": "^4.3.0",
46
+ "@wordpress/private-apis": "^1.3.0",
47
+ "@wordpress/widgets": "^4.3.0",
48
48
  "clsx": "^2.1.1",
49
49
  "fast-deep-equal": "^3.1.3"
50
50
  },
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "66d3bf12e67d16deddc4b4a9ec42e1d0bed3479a"
58
+ "gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
59
59
  }
@@ -57,10 +57,7 @@ function Header( {
57
57
  /* translators: button label text should, if possible, be under 16 characters. */
58
58
  label={ __( 'Undo' ) }
59
59
  shortcut={ displayShortcut.primary( 'z' ) }
60
- // If there are no undo levels we don't want to actually disable this
61
- // button, because it will remove focus for keyboard users.
62
- // See: https://github.com/WordPress/gutenberg/issues/3486
63
- aria-disabled={ ! hasUndo }
60
+ disabled={ ! hasUndo }
64
61
  onClick={ sidebar.undo }
65
62
  className="customize-widgets-editor-history-button undo-button"
66
63
  />
@@ -69,10 +66,7 @@ function Header( {
69
66
  /* translators: button label text should, if possible, be under 16 characters. */
70
67
  label={ __( 'Redo' ) }
71
68
  shortcut={ shortcut }
72
- // If there are no undo levels we don't want to actually disable this
73
- // button, because it will remove focus for keyboard users.
74
- // See: https://github.com/WordPress/gutenberg/issues/3486
75
- aria-disabled={ ! hasRedo }
69
+ disabled={ ! hasRedo }
76
70
  onClick={ sidebar.redo }
77
71
  className="customize-widgets-editor-history-button redo-button"
78
72
  />
@@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
 
6
6
  export const { lock, unlock } =
7
7
  __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
- 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
8
+ 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
9
9
  '@wordpress/customize-widgets'
10
10
  );