@wordpress/edit-widgets 4.19.0 → 5.1.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,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.1.0 (2023-01-02)
6
+
7
+ ## 5.0.0 (2022-12-14)
8
+
9
+ ### Breaking Changes
10
+
11
+ - Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235))
12
+
5
13
  ## 4.19.0 (2022-11-16)
6
14
 
7
15
  ## 4.18.0 (2022-11-02)
@@ -9,6 +9,8 @@ var _element = require("@wordpress/element");
9
9
 
10
10
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
11
11
 
12
+ var _keycodes = require("@wordpress/keycodes");
13
+
12
14
  var _data = require("@wordpress/data");
13
15
 
14
16
  var _i18n = require("@wordpress/i18n");
@@ -69,7 +71,15 @@ function KeyboardShortcutsRegister() {
69
71
  keyCombination: {
70
72
  modifier: 'primaryShift',
71
73
  character: 'z'
72
- }
74
+ },
75
+ // Disable on Apple OS because it conflicts with the browser's
76
+ // history shortcut. It's a fine alias for both Windows and Linux.
77
+ // Since there's no conflict for Ctrl+Shift+Z on both Windows and
78
+ // Linux, we keep it as the default for consistency.
79
+ aliases: (0, _keycodes.isAppleOS)() ? [] : [{
80
+ modifier: 'primary',
81
+ character: 'y'
82
+ }]
73
83
  });
74
84
  registerShortcut({
75
85
  name: 'core/edit-widgets/save',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcuts/index.js"],"names":["KeyboardShortcuts","redo","undo","coreStore","saveEditedWidgetAreas","editWidgetsStore","event","preventDefault","KeyboardShortcutsRegister","registerShortcut","keyboardShortcutsStore","name","category","description","keyCombination","modifier","character","aliases","Register"],"mappings":";;;;;;;AAGA;;AACA;;AAIA;;AACA;;AACA;;AAKA;;AAfA;AACA;AACA;;AA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GA5ED,EA4EG,CAAEP,gBAAF,CA5EH;AA8EA,SAAO,IAAP;AACA;;AAEDT,iBAAiB,CAACkB,QAAlB,GAA6BV,yBAA7B;eACeR,iB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcuts/index.js"],"names":["KeyboardShortcuts","redo","undo","coreStore","saveEditedWidgetAreas","editWidgetsStore","event","preventDefault","KeyboardShortcutsRegister","registerShortcut","keyboardShortcutsStore","name","category","description","keyCombination","modifier","character","aliases","Register"],"mappings":";;;;;;;AAGA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAKA;;AAhBA;AACA;AACA;;AAWA;AACA;AACA;AAGA,SAASA,iBAAT,GAA6B;AAC5B,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAiB,uBAAaC,eAAb,CAAvB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAA4B,uBAAaC,YAAb,CAAlC;AAEA,sCAAa,wBAAb,EAAyCC,KAAF,IAAa;AACnDJ,IAAAA,IAAI;AACJI,IAAAA,KAAK,CAACC,cAAN;AACA,GAHD;AAKA,sCAAa,wBAAb,EAAyCD,KAAF,IAAa;AACnDL,IAAAA,IAAI;AACJK,IAAAA,KAAK,CAACC,cAAN;AACA,GAHD;AAKA,sCAAa,wBAAb,EAAyCD,KAAF,IAAa;AACnDA,IAAAA,KAAK,CAACC,cAAN;AACAH,IAAAA,qBAAqB;AACrB,GAHD;AAKA,SAAO,IAAP;AACA;;AAED,SAASI,yBAAT,GAAqC;AACpC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAuB,uBAAaC,wBAAb,CAA7B;AACA,0BAAW,MAAM;AAChBD,IAAAA,gBAAgB,CAAE;AACjBE,MAAAA,IAAI,EAAE,wBADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAE,cAAI,yBAAJ,CAHI;AAIjBC,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,EAAE,SADK;AAEfC,QAAAA,SAAS,EAAE;AAFI;AAJC,KAAF,CAAhB;AAUAP,IAAAA,gBAAgB,CAAE;AACjBE,MAAAA,IAAI,EAAE,wBADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAE,cAAI,sBAAJ,CAHI;AAIjBC,MAAAA,cAA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E,cAAI,8CAAJ,CAHI;AAIjBC,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,EAAE,WADK;AAEfC,QAAAA,SAAS,EAAE;AAFI,OAJC;AAQjBC,MAAAA,OAAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ,EAKR;AACCD,QAAAA,QAAQ,EAAE,WADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OALQ;AARQ,KAAF,CAAhB;AAmBA,GAxFD,EAwFG,CAAEP,gBAAF,CAxFH;AA0FA,SAAO,IAAP;AACA;;AAEDT,iBAAiB,CAACkB,QAAlB,GAA6BV,yBAA7B;eACeR,iB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"]}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { useEffect } from '@wordpress/element';
5
5
  import { useShortcut, store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
6
+ import { isAppleOS } from '@wordpress/keycodes';
6
7
  import { useDispatch } from '@wordpress/data';
7
8
  import { __ } from '@wordpress/i18n';
8
9
  import { store as coreStore } from '@wordpress/core-data';
@@ -57,7 +58,15 @@ function KeyboardShortcutsRegister() {
57
58
  keyCombination: {
58
59
  modifier: 'primaryShift',
59
60
  character: 'z'
60
- }
61
+ },
62
+ // Disable on Apple OS because it conflicts with the browser's
63
+ // history shortcut. It's a fine alias for both Windows and Linux.
64
+ // Since there's no conflict for Ctrl+Shift+Z on both Windows and
65
+ // Linux, we keep it as the default for consistency.
66
+ aliases: isAppleOS() ? [] : [{
67
+ modifier: 'primary',
68
+ character: 'y'
69
+ }]
61
70
  });
62
71
  registerShortcut({
63
72
  name: 'core/edit-widgets/save',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcuts/index.js"],"names":["useEffect","useShortcut","store","keyboardShortcutsStore","useDispatch","__","coreStore","editWidgetsStore","KeyboardShortcuts","redo","undo","saveEditedWidgetAreas","event","preventDefault","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","Register"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SACCC,WADD,EAECC,KAAK,IAAIC,sBAFV,QAGO,+BAHP;AAIA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASH,KAAK,IAAII,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASJ,KAAK,IAAIK,gBAAlB,QAA0C,aAA1C;;AAEA,SAASC,iBAAT,GAA6B;AAC5B,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAiBN,WAAW,CAAEE,SAAF,CAAlC;AACA,QAAM;AAAEK,IAAAA;AAAF,MAA4BP,WAAW,CAAEG,gBAAF,CAA7C;AAEAN,EAAAA,WAAW,CAAE,wBAAF,EAA8BW,KAAF,IAAa;AACnDF,IAAAA,IAAI;AACJE,IAAAA,KAAK,CAACC,cAAN;AACA,GAHU,CAAX;AAKAZ,EAAAA,WAAW,CAAE,wBAAF,EAA8BW,KAAF,IAAa;AACnDH,IAAAA,IAAI;AACJG,IAAAA,KAAK,CAACC,cAAN;AACA,GAHU,CAAX;AAKAZ,EAAAA,WAAW,CAAE,wBAAF,EAA8BW,KAAF,IAAa;AACnDA,IAAAA,KAAK,CAACC,cAAN;AACAF,IAAAA,qBAAqB;AACrB,GAHU,CAAX;AAKA,SAAO,IAAP;AACA;;AAED,SAASG,yBAAT,GAAqC;AACpC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAuBX,WAAW,CAAED,sBAAF,CAAxC;AACAH,EAAAA,SAAS,CAAE,MAAM;AAChBe,IAAAA,gBAAgB,CAAE;AACjBC,MAAAA,IAAI,EAAE,wBADW;AAEjBC,MAAAA,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AAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ;AARQ,KAAF,CAAhB;AAgBAN,IAAAA,gBAAgB,CAAE;AACjBC,MAAAA,IAAI,EAAE,mCADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAEb,EAAE,CAAE,8CAAF,CAHE;AAIjBc,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,EAAE,WADK;AAEfC,QAAAA,SAAS,EAAE;AAFI,OAJC;AAQjBC,MAAAA,OAAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ,EAKR;AACCD,QAAAA,QAAQ,EAAE,WADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OALQ;AARQ,KAAF,CAAhB;AAmBA,GA5EQ,EA4EN,CAAEN,gBAAF,CA5EM,CAAT;AA8EA,SAAO,IAAP;AACA;;AAEDP,iBAAiB,CAACe,QAAlB,GAA6BT,yBAA7B;AACA,eAAeN,iBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcuts/index.js"],"names":["useEffect","useShortcut","store","keyboardShortcutsStore","isAppleOS","useDispatch","__","coreStore","editWidgetsStore","KeyboardShortcuts","redo","undo","saveEditedWidgetAreas","event","preventDefault","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","Register"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SACCC,WADD,EAECC,KAAK,IAAIC,sBAFV,QAGO,+BAHP;AAIA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASL,KAAK,IAAIM,gBAAlB,QAA0C,aAA1C;;AAEA,SAASC,iBAAT,GAA6B;AAC5B,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAiBN,WAAW,CAAEE,SAAF,CAAlC;AACA,QAAM;AAAEK,IAAAA;AAAF,MAA4BP,WAAW,CAAEG,gBAAF,CAA7C;AAEAP,EAAAA,WAAW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AECC,QAAAA,SAAS,EAAE;AAFZ,OALQ;AARQ,KAAF,CAAhB;AAmBA,GAxFQ,EAwFN,CAAEN,gBAAF,CAxFM,CAAT;AA0FA,SAAO,IAAP;AACA;;AAEDP,iBAAiB,CAACe,QAAlB,GAA6BT,yBAA7B;AACA,eAAeN,iBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"]}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Converts a hex value into the rgb equivalent.
3
+ *
4
+ * @param {string} hex - the hexadecimal value to convert
5
+ * @return {string} comma separated rgb values
6
+ */
1
7
  /**
2
8
  * Colors
3
9
  */
@@ -11,6 +17,12 @@
11
17
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
18
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
19
  */
20
+ /**
21
+ * Converts a hex value into the rgb equivalent.
22
+ *
23
+ * @param {string} hex - the hexadecimal value to convert
24
+ * @return {string} comma separated rgb values
25
+ */
14
26
  /**
15
27
  * Colors
16
28
  */
@@ -46,15 +58,15 @@
46
58
  * @param {string} hex - the hexadecimal value to convert
47
59
  * @return {string} comma separated rgb values
48
60
  */
49
- /**
50
- * Breakpoint mixins
51
- */
52
61
  /**
53
62
  * Long content fade mixin
54
63
  *
55
64
  * Creates a fading overlay to signify that the content is longer
56
65
  * than the space allows.
57
66
  */
67
+ /**
68
+ * Breakpoint mixins
69
+ */
58
70
  /**
59
71
  * Focus styles.
60
72
  */
@@ -82,6 +94,8 @@
82
94
  --wp-admin-theme-color-darker-20: #005a87;
83
95
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
84
96
  --wp-admin-border-width-focus: 2px;
97
+ --wp-block-synced-color: #7a00df;
98
+ --wp-block-synced-color--rgb: 122, 0, 223;
85
99
  }
86
100
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
87
101
  :root {
@@ -306,9 +320,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
306
320
  overflow: auto;
307
321
  z-index: 20;
308
322
  }
309
- .interface-interface-skeleton__content .interface-navigable-region__stacker {
310
- flex-grow: 1;
311
- }
312
323
 
313
324
  .interface-interface-skeleton__secondary-sidebar,
314
325
  .interface-interface-skeleton__sidebar {
@@ -400,12 +411,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
400
411
  bottom: 0;
401
412
  }
402
413
 
403
- @media (min-width: 782px) {
404
- .interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
405
- height: calc(100% - 25px);
406
- }
407
- }
408
-
409
414
  .interface-more-menu-dropdown {
410
415
  margin-right: -4px;
411
416
  }
@@ -593,7 +598,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
593
598
  max-width: 780px;
594
599
  padding: 20px;
595
600
  margin-top: 60px;
596
- box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
601
+ box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), -0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
597
602
  }
598
603
 
599
604
  .edit-widgets-header {
@@ -757,46 +762,62 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
757
762
  }
758
763
 
759
764
  .components-button.edit-widgets-sidebar__panel-tab {
765
+ position: relative;
760
766
  border-radius: 0;
761
- height: 49px;
767
+ height: 48px;
762
768
  background: transparent;
763
769
  border: none;
764
770
  box-shadow: none;
765
771
  cursor: pointer;
766
- display: inline-block;
767
- padding: 3px 15px;
772
+ padding: 3px 16px;
768
773
  margin-right: 0;
769
- font-weight: 400;
770
- color: #1e1e1e;
771
- }
772
- .components-button.edit-widgets-sidebar__panel-tab::after {
773
- content: attr(data-label);
774
- display: block;
775
- font-weight: 600;
776
- height: 0;
777
- overflow: hidden;
778
- speak: none;
779
- visibility: hidden;
774
+ font-weight: 500;
780
775
  }
781
- .components-button.edit-widgets-sidebar__panel-tab.is-active {
782
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
783
- font-weight: 600;
776
+ .components-button.edit-widgets-sidebar__panel-tab:focus:not(:disabled) {
784
777
  position: relative;
778
+ box-shadow: none;
785
779
  }
786
- .components-button.edit-widgets-sidebar__panel-tab.is-active::before {
780
+ .components-button.edit-widgets-sidebar__panel-tab::after {
787
781
  content: "";
788
782
  position: absolute;
789
- top: 0;
790
- bottom: 1px;
791
783
  left: 0;
784
+ bottom: 0;
792
785
  right: 0;
793
- border-bottom: 1.5px solid transparent;
786
+ pointer-events: none;
787
+ background: var(--wp-admin-theme-color);
788
+ height: calc(0 * var(--wp-admin-border-width-focus));
789
+ border-radius: 0;
790
+ transition: all 0.1s linear;
794
791
  }
795
- .components-button.edit-widgets-sidebar__panel-tab:focus {
796
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
792
+ @media (prefers-reduced-motion: reduce) {
793
+ .components-button.edit-widgets-sidebar__panel-tab::after {
794
+ transition-duration: 0s;
795
+ transition-delay: 0s;
796
+ }
797
+ }
798
+ .components-button.edit-widgets-sidebar__panel-tab.is-active::after {
799
+ height: calc(1 * var(--wp-admin-border-width-focus));
800
+ }
801
+ .components-button.edit-widgets-sidebar__panel-tab::before {
802
+ content: "";
803
+ position: absolute;
804
+ top: 12px;
805
+ left: 12px;
806
+ bottom: 12px;
807
+ right: 12px;
808
+ pointer-events: none;
809
+ box-shadow: 0 0 0 0 transparent;
810
+ border-radius: 2px;
811
+ transition: all 0.1s linear;
812
+ }
813
+ @media (prefers-reduced-motion: reduce) {
814
+ .components-button.edit-widgets-sidebar__panel-tab::before {
815
+ transition-duration: 0s;
816
+ transition-delay: 0s;
817
+ }
797
818
  }
798
- .components-button.edit-widgets-sidebar__panel-tab.is-active:focus {
799
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
819
+ .components-button.edit-widgets-sidebar__panel-tab:focus-visible::before {
820
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
800
821
  }
801
822
 
802
823
  .edit-widgets-widget-areas__top-container {
@@ -901,7 +922,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
901
922
  .edit-widgets-welcome-guide__image > img {
902
923
  display: block;
903
924
  max-width: 100%;
904
- object-fit: cover;
925
+ -o-object-fit: cover;
926
+ object-fit: cover;
905
927
  }
906
928
  .edit-widgets-welcome-guide__heading {
907
929
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Converts a hex value into the rgb equivalent.
3
+ *
4
+ * @param {string} hex - the hexadecimal value to convert
5
+ * @return {string} comma separated rgb values
6
+ */
1
7
  /**
2
8
  * Colors
3
9
  */
@@ -11,6 +17,12 @@
11
17
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
18
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
19
  */
20
+ /**
21
+ * Converts a hex value into the rgb equivalent.
22
+ *
23
+ * @param {string} hex - the hexadecimal value to convert
24
+ * @return {string} comma separated rgb values
25
+ */
14
26
  /**
15
27
  * Colors
16
28
  */
@@ -46,15 +58,15 @@
46
58
  * @param {string} hex - the hexadecimal value to convert
47
59
  * @return {string} comma separated rgb values
48
60
  */
49
- /**
50
- * Breakpoint mixins
51
- */
52
61
  /**
53
62
  * Long content fade mixin
54
63
  *
55
64
  * Creates a fading overlay to signify that the content is longer
56
65
  * than the space allows.
57
66
  */
67
+ /**
68
+ * Breakpoint mixins
69
+ */
58
70
  /**
59
71
  * Focus styles.
60
72
  */
@@ -82,6 +94,8 @@
82
94
  --wp-admin-theme-color-darker-20: #005a87;
83
95
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
84
96
  --wp-admin-border-width-focus: 2px;
97
+ --wp-block-synced-color: #7a00df;
98
+ --wp-block-synced-color--rgb: 122, 0, 223;
85
99
  }
86
100
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
87
101
  :root {
@@ -306,9 +320,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
306
320
  overflow: auto;
307
321
  z-index: 20;
308
322
  }
309
- .interface-interface-skeleton__content .interface-navigable-region__stacker {
310
- flex-grow: 1;
311
- }
312
323
 
313
324
  .interface-interface-skeleton__secondary-sidebar,
314
325
  .interface-interface-skeleton__sidebar {
@@ -400,12 +411,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
400
411
  bottom: 0;
401
412
  }
402
413
 
403
- @media (min-width: 782px) {
404
- .interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
405
- height: calc(100% - 25px);
406
- }
407
- }
408
-
409
414
  .interface-more-menu-dropdown {
410
415
  margin-left: -4px;
411
416
  }
@@ -593,7 +598,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
593
598
  max-width: 780px;
594
599
  padding: 20px;
595
600
  margin-top: 60px;
596
- box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
601
+ box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), 0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
597
602
  }
598
603
 
599
604
  .edit-widgets-header {
@@ -757,46 +762,62 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
757
762
  }
758
763
 
759
764
  .components-button.edit-widgets-sidebar__panel-tab {
765
+ position: relative;
760
766
  border-radius: 0;
761
- height: 49px;
767
+ height: 48px;
762
768
  background: transparent;
763
769
  border: none;
764
770
  box-shadow: none;
765
771
  cursor: pointer;
766
- display: inline-block;
767
- padding: 3px 15px;
772
+ padding: 3px 16px;
768
773
  margin-left: 0;
769
- font-weight: 400;
770
- color: #1e1e1e;
771
- }
772
- .components-button.edit-widgets-sidebar__panel-tab::after {
773
- content: attr(data-label);
774
- display: block;
775
- font-weight: 600;
776
- height: 0;
777
- overflow: hidden;
778
- speak: none;
779
- visibility: hidden;
774
+ font-weight: 500;
780
775
  }
781
- .components-button.edit-widgets-sidebar__panel-tab.is-active {
782
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
783
- font-weight: 600;
776
+ .components-button.edit-widgets-sidebar__panel-tab:focus:not(:disabled) {
784
777
  position: relative;
778
+ box-shadow: none;
785
779
  }
786
- .components-button.edit-widgets-sidebar__panel-tab.is-active::before {
780
+ .components-button.edit-widgets-sidebar__panel-tab::after {
787
781
  content: "";
788
782
  position: absolute;
789
- top: 0;
790
- bottom: 1px;
791
783
  right: 0;
784
+ bottom: 0;
792
785
  left: 0;
793
- border-bottom: 1.5px solid transparent;
786
+ pointer-events: none;
787
+ background: var(--wp-admin-theme-color);
788
+ height: calc(0 * var(--wp-admin-border-width-focus));
789
+ border-radius: 0;
790
+ transition: all 0.1s linear;
794
791
  }
795
- .components-button.edit-widgets-sidebar__panel-tab:focus {
796
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
792
+ @media (prefers-reduced-motion: reduce) {
793
+ .components-button.edit-widgets-sidebar__panel-tab::after {
794
+ transition-duration: 0s;
795
+ transition-delay: 0s;
796
+ }
797
+ }
798
+ .components-button.edit-widgets-sidebar__panel-tab.is-active::after {
799
+ height: calc(1 * var(--wp-admin-border-width-focus));
800
+ }
801
+ .components-button.edit-widgets-sidebar__panel-tab::before {
802
+ content: "";
803
+ position: absolute;
804
+ top: 12px;
805
+ right: 12px;
806
+ bottom: 12px;
807
+ left: 12px;
808
+ pointer-events: none;
809
+ box-shadow: 0 0 0 0 transparent;
810
+ border-radius: 2px;
811
+ transition: all 0.1s linear;
812
+ }
813
+ @media (prefers-reduced-motion: reduce) {
814
+ .components-button.edit-widgets-sidebar__panel-tab::before {
815
+ transition-duration: 0s;
816
+ transition-delay: 0s;
817
+ }
797
818
  }
798
- .components-button.edit-widgets-sidebar__panel-tab.is-active:focus {
799
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
819
+ .components-button.edit-widgets-sidebar__panel-tab:focus-visible::before {
820
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
800
821
  }
801
822
 
802
823
  .edit-widgets-widget-areas__top-container {
@@ -901,7 +922,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
901
922
  .edit-widgets-welcome-guide__image > img {
902
923
  display: block;
903
924
  max-width: 100%;
904
- object-fit: cover;
925
+ -o-object-fit: cover;
926
+ object-fit: cover;
905
927
  }
906
928
  .edit-widgets-welcome-guide__heading {
907
929
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "4.19.0",
3
+ "version": "5.1.0",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,38 +27,38 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/api-fetch": "^6.19.0",
31
- "@wordpress/block-editor": "^10.5.0",
32
- "@wordpress/block-library": "^7.19.0",
33
- "@wordpress/blocks": "^11.21.0",
34
- "@wordpress/components": "^22.1.0",
35
- "@wordpress/compose": "^5.20.0",
36
- "@wordpress/core-data": "^5.5.0",
37
- "@wordpress/data": "^7.6.0",
38
- "@wordpress/deprecated": "^3.22.0",
39
- "@wordpress/dom": "^3.22.0",
40
- "@wordpress/element": "^4.20.0",
41
- "@wordpress/hooks": "^3.22.0",
42
- "@wordpress/i18n": "^4.22.0",
43
- "@wordpress/icons": "^9.13.0",
44
- "@wordpress/interface": "^4.21.0",
45
- "@wordpress/keyboard-shortcuts": "^3.20.0",
46
- "@wordpress/keycodes": "^3.22.0",
47
- "@wordpress/media-utils": "^4.13.0",
48
- "@wordpress/notices": "^3.22.0",
49
- "@wordpress/plugins": "^4.20.0",
50
- "@wordpress/preferences": "^2.14.0",
51
- "@wordpress/reusable-blocks": "^3.20.0",
52
- "@wordpress/url": "^3.23.0",
53
- "@wordpress/widgets": "^2.20.0",
30
+ "@wordpress/api-fetch": "^6.21.0",
31
+ "@wordpress/block-editor": "^11.1.0",
32
+ "@wordpress/block-library": "^8.1.0",
33
+ "@wordpress/blocks": "^12.1.0",
34
+ "@wordpress/components": "^23.1.0",
35
+ "@wordpress/compose": "^6.1.0",
36
+ "@wordpress/core-data": "^6.1.0",
37
+ "@wordpress/data": "^8.1.0",
38
+ "@wordpress/deprecated": "^3.24.0",
39
+ "@wordpress/dom": "^3.24.0",
40
+ "@wordpress/element": "^5.1.0",
41
+ "@wordpress/hooks": "^3.24.0",
42
+ "@wordpress/i18n": "^4.24.0",
43
+ "@wordpress/icons": "^9.15.0",
44
+ "@wordpress/interface": "^5.1.0",
45
+ "@wordpress/keyboard-shortcuts": "^4.1.0",
46
+ "@wordpress/keycodes": "^3.24.0",
47
+ "@wordpress/media-utils": "^4.15.0",
48
+ "@wordpress/notices": "^3.24.0",
49
+ "@wordpress/plugins": "^5.1.0",
50
+ "@wordpress/preferences": "^3.1.0",
51
+ "@wordpress/reusable-blocks": "^4.1.0",
52
+ "@wordpress/url": "^3.25.0",
53
+ "@wordpress/widgets": "^3.1.0",
54
54
  "classnames": "^2.3.1"
55
55
  },
56
56
  "peerDependencies": {
57
- "react": "^17.0.0",
58
- "react-dom": "^17.0.0"
57
+ "react": "^18.0.0",
58
+ "react-dom": "^18.0.0"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
63
+ "gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
64
64
  }
@@ -6,6 +6,7 @@ import {
6
6
  useShortcut,
7
7
  store as keyboardShortcutsStore,
8
8
  } from '@wordpress/keyboard-shortcuts';
9
+ import { isAppleOS } from '@wordpress/keycodes';
9
10
  import { useDispatch } from '@wordpress/data';
10
11
  import { __ } from '@wordpress/i18n';
11
12
  import { store as coreStore } from '@wordpress/core-data';
@@ -59,6 +60,18 @@ function KeyboardShortcutsRegister() {
59
60
  modifier: 'primaryShift',
60
61
  character: 'z',
61
62
  },
63
+ // Disable on Apple OS because it conflicts with the browser's
64
+ // history shortcut. It's a fine alias for both Windows and Linux.
65
+ // Since there's no conflict for Ctrl+Shift+Z on both Windows and
66
+ // Linux, we keep it as the default for consistency.
67
+ aliases: isAppleOS()
68
+ ? []
69
+ : [
70
+ {
71
+ modifier: 'primary',
72
+ character: 'y',
73
+ },
74
+ ],
62
75
  } );
63
76
 
64
77
  registerShortcut( {
@@ -21,59 +21,74 @@
21
21
  }
22
22
  }
23
23
 
24
+ // This tab style CSS is duplicated verbatim in
25
+ // /packages/components/src/tab-panel/style.scss
24
26
  .components-button.edit-widgets-sidebar__panel-tab {
27
+ position: relative;
25
28
  border-radius: 0;
26
- height: 50px - $border-width;
29
+ height: $grid-unit-60;
27
30
  background: transparent;
28
31
  border: none;
29
32
  box-shadow: none;
30
33
  cursor: pointer;
31
- display: inline-block;
32
- padding: 3px 15px; // Use padding to offset the is-active border, this benefits Windows High Contrast mode
34
+ padding: 3px $grid-unit-20; // Use padding to offset the is-active border, this benefits Windows High Contrast mode
33
35
  margin-left: 0;
34
- font-weight: 400;
35
- color: $gray-900;
36
+ font-weight: 500;
36
37
 
37
- // This pseudo-element "duplicates" the tab label and sets the text to bold.
38
- // This ensures that the tab doesn't change width when selected.
39
- // See: https://github.com/WordPress/gutenberg/pull/9793
40
- &::after {
41
- content: attr(data-label);
42
- display: block;
43
- font-weight: 600;
44
- height: 0;
45
- overflow: hidden;
46
- speak: none;
47
- visibility: hidden;
38
+ &:focus:not(:disabled) {
39
+ position: relative;
40
+ box-shadow: none;
48
41
  }
49
42
 
50
- &.is-active {
51
- // The transparent shadow ensures no jumpiness when focus animates on an active tab.
52
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 0 -$border-width-tab 0 0 var(--wp-admin-theme-color);
53
- font-weight: 600;
54
- position: relative;
43
+ // Tab indicator
44
+ &::after {
45
+ content: "";
46
+ position: absolute;
47
+ right: 0;
48
+ bottom: 0;
49
+ left: 0;
50
+ pointer-events: none;
55
51
 
56
- // This border appears in Windows High Contrast mode instead of the box-shadow.
57
- &::before {
58
- content: "";
59
- position: absolute;
60
- top: 0;
61
- bottom: 1px;
62
- right: 0;
63
- left: 0;
64
- border-bottom: $border-width-tab solid transparent;
65
- }
52
+ // Draw the indicator.
53
+ background: var(--wp-admin-theme-color);
54
+ height: calc(0 * var(--wp-admin-border-width-focus));
55
+ border-radius: 0;
56
+
57
+ // Animation
58
+ transition: all 0.1s linear;
59
+ @include reduce-motion("transition");
66
60
  }
67
61
 
68
- &:focus {
69
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
62
+ // Active.
63
+ &.is-active::after {
64
+ height: calc(1 * var(--wp-admin-border-width-focus));
70
65
  }
71
66
 
72
- &.is-active:focus {
73
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 -$border-width-tab 0 0 var(--wp-admin-theme-color);
67
+ // Focus.
68
+ &::before {
69
+ content: "";
70
+ position: absolute;
71
+ top: $grid-unit-15;
72
+ right: $grid-unit-15;
73
+ bottom: $grid-unit-15;
74
+ left: $grid-unit-15;
75
+ pointer-events: none;
76
+
77
+ // Draw the indicator.
78
+ box-shadow: 0 0 0 0 transparent;
79
+ border-radius: $radius-block-ui;
80
+
81
+ // Animation
82
+ transition: all 0.1s linear;
83
+ @include reduce-motion("transition");
84
+ }
85
+
86
+ &:focus-visible::before {
87
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
74
88
  }
75
89
  }
76
90
 
91
+
77
92
  .edit-widgets-widget-areas__top-container {
78
93
  display: flex;
79
94
  padding: $grid-unit-20;