@wordpress/edit-widgets 4.19.0 → 5.0.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 +6 -0
- package/build/components/keyboard-shortcuts/index.js +11 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +10 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-style/style-rtl.css +63 -33
- package/build-style/style.css +63 -33
- package/package.json +28 -28
- package/src/components/keyboard-shortcuts/index.js +13 -0
- package/src/components/sidebar/style.scss +50 -35
package/CHANGELOG.md
CHANGED
|
@@ -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;;
|
|
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,cAA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AE,MADK;AAEfC,QAAAA,SAAS,EAAE;AAFI,OAJC;AAQjBC,MAAAA,OAAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ;AARQ,KAAF,CAAhB;AAgBAP,IAAAA,gBAAgB,CAAE;AACjBE,MAAAA,IAAI,EAAE,mCADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAE,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,
|
|
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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AAI,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,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
|
*/
|
|
@@ -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 {
|
|
@@ -308,6 +322,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
308
322
|
}
|
|
309
323
|
.interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
310
324
|
flex-grow: 1;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
@@ -343,6 +359,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
343
359
|
}
|
|
344
360
|
}
|
|
345
361
|
|
|
362
|
+
.interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
|
|
363
|
+
height: 100%;
|
|
364
|
+
}
|
|
346
365
|
@media (min-width: 782px) {
|
|
347
366
|
.interface-interface-skeleton__secondary-sidebar {
|
|
348
367
|
border-left: 1px solid #e0e0e0;
|
|
@@ -400,12 +419,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
400
419
|
bottom: 0;
|
|
401
420
|
}
|
|
402
421
|
|
|
403
|
-
@media (min-width: 782px) {
|
|
404
|
-
.interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
|
|
405
|
-
height: calc(100% - 25px);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
422
|
.interface-more-menu-dropdown {
|
|
410
423
|
margin-right: -4px;
|
|
411
424
|
}
|
|
@@ -593,7 +606,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
593
606
|
max-width: 780px;
|
|
594
607
|
padding: 20px;
|
|
595
608
|
margin-top: 60px;
|
|
596
|
-
box-shadow: 0
|
|
609
|
+
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
610
|
}
|
|
598
611
|
|
|
599
612
|
.edit-widgets-header {
|
|
@@ -757,46 +770,62 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
757
770
|
}
|
|
758
771
|
|
|
759
772
|
.components-button.edit-widgets-sidebar__panel-tab {
|
|
773
|
+
position: relative;
|
|
760
774
|
border-radius: 0;
|
|
761
|
-
height:
|
|
775
|
+
height: 48px;
|
|
762
776
|
background: transparent;
|
|
763
777
|
border: none;
|
|
764
778
|
box-shadow: none;
|
|
765
779
|
cursor: pointer;
|
|
766
|
-
|
|
767
|
-
padding: 3px 15px;
|
|
780
|
+
padding: 3px 16px;
|
|
768
781
|
margin-right: 0;
|
|
769
|
-
font-weight:
|
|
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;
|
|
782
|
+
font-weight: 500;
|
|
780
783
|
}
|
|
781
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
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;
|
|
784
|
+
.components-button.edit-widgets-sidebar__panel-tab:focus:not(:disabled) {
|
|
784
785
|
position: relative;
|
|
786
|
+
box-shadow: none;
|
|
785
787
|
}
|
|
786
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
788
|
+
.components-button.edit-widgets-sidebar__panel-tab::after {
|
|
787
789
|
content: "";
|
|
788
790
|
position: absolute;
|
|
789
|
-
top: 0;
|
|
790
|
-
bottom: 1px;
|
|
791
791
|
left: 0;
|
|
792
|
+
bottom: 0;
|
|
792
793
|
right: 0;
|
|
793
|
-
|
|
794
|
+
pointer-events: none;
|
|
795
|
+
background: var(--wp-admin-theme-color);
|
|
796
|
+
height: calc(0 * var(--wp-admin-border-width-focus));
|
|
797
|
+
border-radius: 0;
|
|
798
|
+
transition: all 0.1s linear;
|
|
794
799
|
}
|
|
795
|
-
|
|
796
|
-
|
|
800
|
+
@media (prefers-reduced-motion: reduce) {
|
|
801
|
+
.components-button.edit-widgets-sidebar__panel-tab::after {
|
|
802
|
+
transition-duration: 0s;
|
|
803
|
+
transition-delay: 0s;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
.components-button.edit-widgets-sidebar__panel-tab.is-active::after {
|
|
807
|
+
height: calc(1 * var(--wp-admin-border-width-focus));
|
|
808
|
+
}
|
|
809
|
+
.components-button.edit-widgets-sidebar__panel-tab::before {
|
|
810
|
+
content: "";
|
|
811
|
+
position: absolute;
|
|
812
|
+
top: 12px;
|
|
813
|
+
left: 12px;
|
|
814
|
+
bottom: 12px;
|
|
815
|
+
right: 12px;
|
|
816
|
+
pointer-events: none;
|
|
817
|
+
box-shadow: 0 0 0 0 transparent;
|
|
818
|
+
border-radius: 2px;
|
|
819
|
+
transition: all 0.1s linear;
|
|
820
|
+
}
|
|
821
|
+
@media (prefers-reduced-motion: reduce) {
|
|
822
|
+
.components-button.edit-widgets-sidebar__panel-tab::before {
|
|
823
|
+
transition-duration: 0s;
|
|
824
|
+
transition-delay: 0s;
|
|
825
|
+
}
|
|
797
826
|
}
|
|
798
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
799
|
-
box-shadow:
|
|
827
|
+
.components-button.edit-widgets-sidebar__panel-tab:focus-visible::before {
|
|
828
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
800
829
|
}
|
|
801
830
|
|
|
802
831
|
.edit-widgets-widget-areas__top-container {
|
|
@@ -901,7 +930,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
|
|
|
901
930
|
.edit-widgets-welcome-guide__image > img {
|
|
902
931
|
display: block;
|
|
903
932
|
max-width: 100%;
|
|
904
|
-
object-fit: cover;
|
|
933
|
+
-o-object-fit: cover;
|
|
934
|
+
object-fit: cover;
|
|
905
935
|
}
|
|
906
936
|
.edit-widgets-welcome-guide__heading {
|
|
907
937
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
package/build-style/style.css
CHANGED
|
@@ -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
|
*/
|
|
@@ -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 {
|
|
@@ -308,6 +322,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
308
322
|
}
|
|
309
323
|
.interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
310
324
|
flex-grow: 1;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
@@ -343,6 +359,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
343
359
|
}
|
|
344
360
|
}
|
|
345
361
|
|
|
362
|
+
.interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
|
|
363
|
+
height: 100%;
|
|
364
|
+
}
|
|
346
365
|
@media (min-width: 782px) {
|
|
347
366
|
.interface-interface-skeleton__secondary-sidebar {
|
|
348
367
|
border-right: 1px solid #e0e0e0;
|
|
@@ -400,12 +419,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
400
419
|
bottom: 0;
|
|
401
420
|
}
|
|
402
421
|
|
|
403
|
-
@media (min-width: 782px) {
|
|
404
|
-
.interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
|
|
405
|
-
height: calc(100% - 25px);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
422
|
.interface-more-menu-dropdown {
|
|
410
423
|
margin-left: -4px;
|
|
411
424
|
}
|
|
@@ -593,7 +606,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
593
606
|
max-width: 780px;
|
|
594
607
|
padding: 20px;
|
|
595
608
|
margin-top: 60px;
|
|
596
|
-
box-shadow: 0
|
|
609
|
+
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
610
|
}
|
|
598
611
|
|
|
599
612
|
.edit-widgets-header {
|
|
@@ -757,46 +770,62 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
757
770
|
}
|
|
758
771
|
|
|
759
772
|
.components-button.edit-widgets-sidebar__panel-tab {
|
|
773
|
+
position: relative;
|
|
760
774
|
border-radius: 0;
|
|
761
|
-
height:
|
|
775
|
+
height: 48px;
|
|
762
776
|
background: transparent;
|
|
763
777
|
border: none;
|
|
764
778
|
box-shadow: none;
|
|
765
779
|
cursor: pointer;
|
|
766
|
-
|
|
767
|
-
padding: 3px 15px;
|
|
780
|
+
padding: 3px 16px;
|
|
768
781
|
margin-left: 0;
|
|
769
|
-
font-weight:
|
|
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;
|
|
782
|
+
font-weight: 500;
|
|
780
783
|
}
|
|
781
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
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;
|
|
784
|
+
.components-button.edit-widgets-sidebar__panel-tab:focus:not(:disabled) {
|
|
784
785
|
position: relative;
|
|
786
|
+
box-shadow: none;
|
|
785
787
|
}
|
|
786
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
788
|
+
.components-button.edit-widgets-sidebar__panel-tab::after {
|
|
787
789
|
content: "";
|
|
788
790
|
position: absolute;
|
|
789
|
-
top: 0;
|
|
790
|
-
bottom: 1px;
|
|
791
791
|
right: 0;
|
|
792
|
+
bottom: 0;
|
|
792
793
|
left: 0;
|
|
793
|
-
|
|
794
|
+
pointer-events: none;
|
|
795
|
+
background: var(--wp-admin-theme-color);
|
|
796
|
+
height: calc(0 * var(--wp-admin-border-width-focus));
|
|
797
|
+
border-radius: 0;
|
|
798
|
+
transition: all 0.1s linear;
|
|
794
799
|
}
|
|
795
|
-
|
|
796
|
-
|
|
800
|
+
@media (prefers-reduced-motion: reduce) {
|
|
801
|
+
.components-button.edit-widgets-sidebar__panel-tab::after {
|
|
802
|
+
transition-duration: 0s;
|
|
803
|
+
transition-delay: 0s;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
.components-button.edit-widgets-sidebar__panel-tab.is-active::after {
|
|
807
|
+
height: calc(1 * var(--wp-admin-border-width-focus));
|
|
808
|
+
}
|
|
809
|
+
.components-button.edit-widgets-sidebar__panel-tab::before {
|
|
810
|
+
content: "";
|
|
811
|
+
position: absolute;
|
|
812
|
+
top: 12px;
|
|
813
|
+
right: 12px;
|
|
814
|
+
bottom: 12px;
|
|
815
|
+
left: 12px;
|
|
816
|
+
pointer-events: none;
|
|
817
|
+
box-shadow: 0 0 0 0 transparent;
|
|
818
|
+
border-radius: 2px;
|
|
819
|
+
transition: all 0.1s linear;
|
|
820
|
+
}
|
|
821
|
+
@media (prefers-reduced-motion: reduce) {
|
|
822
|
+
.components-button.edit-widgets-sidebar__panel-tab::before {
|
|
823
|
+
transition-duration: 0s;
|
|
824
|
+
transition-delay: 0s;
|
|
825
|
+
}
|
|
797
826
|
}
|
|
798
|
-
.components-button.edit-widgets-sidebar__panel-tab
|
|
799
|
-
box-shadow:
|
|
827
|
+
.components-button.edit-widgets-sidebar__panel-tab:focus-visible::before {
|
|
828
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
800
829
|
}
|
|
801
830
|
|
|
802
831
|
.edit-widgets-widget-areas__top-container {
|
|
@@ -901,7 +930,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
|
|
|
901
930
|
.edit-widgets-welcome-guide__image > img {
|
|
902
931
|
display: block;
|
|
903
932
|
max-width: 100%;
|
|
904
|
-
object-fit: cover;
|
|
933
|
+
-o-object-fit: cover;
|
|
934
|
+
object-fit: cover;
|
|
905
935
|
}
|
|
906
936
|
.edit-widgets-welcome-guide__heading {
|
|
907
937
|
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": "
|
|
3
|
+
"version": "5.0.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.
|
|
31
|
-
"@wordpress/block-editor": "^
|
|
32
|
-
"@wordpress/block-library": "^
|
|
33
|
-
"@wordpress/blocks": "^
|
|
34
|
-
"@wordpress/components": "^
|
|
35
|
-
"@wordpress/compose": "^
|
|
36
|
-
"@wordpress/core-data": "^
|
|
37
|
-
"@wordpress/data": "^
|
|
38
|
-
"@wordpress/deprecated": "^3.
|
|
39
|
-
"@wordpress/dom": "^3.
|
|
40
|
-
"@wordpress/element": "^
|
|
41
|
-
"@wordpress/hooks": "^3.
|
|
42
|
-
"@wordpress/i18n": "^4.
|
|
43
|
-
"@wordpress/icons": "^9.
|
|
44
|
-
"@wordpress/interface": "^
|
|
45
|
-
"@wordpress/keyboard-shortcuts": "^
|
|
46
|
-
"@wordpress/keycodes": "^3.
|
|
47
|
-
"@wordpress/media-utils": "^4.
|
|
48
|
-
"@wordpress/notices": "^3.
|
|
49
|
-
"@wordpress/plugins": "^
|
|
50
|
-
"@wordpress/preferences": "^
|
|
51
|
-
"@wordpress/reusable-blocks": "^
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/widgets": "^
|
|
30
|
+
"@wordpress/api-fetch": "^6.20.0",
|
|
31
|
+
"@wordpress/block-editor": "^11.0.0",
|
|
32
|
+
"@wordpress/block-library": "^8.0.0",
|
|
33
|
+
"@wordpress/blocks": "^12.0.0",
|
|
34
|
+
"@wordpress/components": "^23.0.0",
|
|
35
|
+
"@wordpress/compose": "^6.0.0",
|
|
36
|
+
"@wordpress/core-data": "^6.0.0",
|
|
37
|
+
"@wordpress/data": "^8.0.0",
|
|
38
|
+
"@wordpress/deprecated": "^3.23.0",
|
|
39
|
+
"@wordpress/dom": "^3.23.0",
|
|
40
|
+
"@wordpress/element": "^5.0.0",
|
|
41
|
+
"@wordpress/hooks": "^3.23.0",
|
|
42
|
+
"@wordpress/i18n": "^4.23.0",
|
|
43
|
+
"@wordpress/icons": "^9.14.0",
|
|
44
|
+
"@wordpress/interface": "^5.0.0",
|
|
45
|
+
"@wordpress/keyboard-shortcuts": "^4.0.0",
|
|
46
|
+
"@wordpress/keycodes": "^3.23.0",
|
|
47
|
+
"@wordpress/media-utils": "^4.14.0",
|
|
48
|
+
"@wordpress/notices": "^3.23.0",
|
|
49
|
+
"@wordpress/plugins": "^5.0.0",
|
|
50
|
+
"@wordpress/preferences": "^3.0.0",
|
|
51
|
+
"@wordpress/reusable-blocks": "^4.0.0",
|
|
52
|
+
"@wordpress/url": "^3.24.0",
|
|
53
|
+
"@wordpress/widgets": "^3.0.0",
|
|
54
54
|
"classnames": "^2.3.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
57
|
+
"react": "^18.0.0",
|
|
58
|
+
"react-dom": "^18.0.0"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "1eb65aabe6738097f4c062e78f69ae8f05879848"
|
|
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:
|
|
29
|
+
height: $grid-unit-60;
|
|
27
30
|
background: transparent;
|
|
28
31
|
border: none;
|
|
29
32
|
box-shadow: none;
|
|
30
33
|
cursor: pointer;
|
|
31
|
-
|
|
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:
|
|
35
|
-
color: $gray-900;
|
|
36
|
+
font-weight: 500;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
69
|
-
|
|
62
|
+
// Active.
|
|
63
|
+
&.is-active::after {
|
|
64
|
+
height: calc(1 * var(--wp-admin-border-width-focus));
|
|
70
65
|
}
|
|
71
66
|
|
|
72
|
-
|
|
73
|
-
|
|
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;
|