@wordpress/interface 5.16.0 → 5.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/action-item/index.js +6 -14
- package/build/components/action-item/index.js.map +1 -1
- package/build/components/complementary-area/index.js +9 -28
- package/build/components/complementary-area/index.js.map +1 -1
- package/build/components/complementary-area-context/index.js +0 -3
- package/build/components/complementary-area-context/index.js.map +1 -1
- package/build/components/complementary-area-header/index.js +1 -7
- package/build/components/complementary-area-header/index.js.map +1 -1
- package/build/components/complementary-area-more-menu-item/index.js +3 -9
- package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build/components/complementary-area-toggle/index.js +2 -10
- package/build/components/complementary-area-toggle/index.js.map +1 -1
- package/build/components/fullscreen-mode/index.js +3 -7
- package/build/components/fullscreen-mode/index.js.map +1 -1
- package/build/components/index.js +0 -14
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +0 -3
- package/build/components/index.native.js.map +1 -1
- package/build/components/interface-skeleton/index.js +8 -22
- package/build/components/interface-skeleton/index.js.map +1 -1
- package/build/components/more-menu-dropdown/index.js +1 -8
- package/build/components/more-menu-dropdown/index.js.map +1 -1
- package/build/components/more-menu-feature-toggle/index.js +2 -11
- package/build/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build/components/navigable-region/index.js +1 -4
- package/build/components/navigable-region/index.js.map +1 -1
- package/build/components/pinned-items/index.js +1 -7
- package/build/components/pinned-items/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -4
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal-base-option/index.js +1 -4
- package/build/components/preferences-modal-base-option/index.js.map +1 -1
- package/build/components/preferences-modal-section/index.js +0 -3
- package/build/components/preferences-modal-section/index.js.map +1 -1
- package/build/components/preferences-modal-tabs/index.js +6 -15
- package/build/components/preferences-modal-tabs/index.js.map +1 -1
- package/build/index.js +0 -3
- package/build/index.js.map +1 -1
- package/build/store/actions.js +15 -37
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +0 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +3 -11
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +8 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +8 -15
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/action-item/index.js +5 -10
- package/build-module/components/action-item/index.js.map +1 -1
- package/build-module/components/complementary-area/index.js +10 -17
- package/build-module/components/complementary-area/index.js.map +1 -1
- package/build-module/components/complementary-area-context/index.js.map +1 -1
- package/build-module/components/complementary-area-header/index.js +2 -5
- package/build-module/components/complementary-area-header/index.js.map +1 -1
- package/build-module/components/complementary-area-more-menu-item/index.js +3 -5
- package/build-module/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build-module/components/complementary-area-toggle/index.js +2 -5
- package/build-module/components/complementary-area-toggle/index.js.map +1 -1
- package/build-module/components/fullscreen-mode/index.js +2 -6
- package/build-module/components/fullscreen-mode/index.js.map +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/interface-skeleton/index.js +9 -17
- package/build-module/components/interface-skeleton/index.js.map +1 -1
- package/build-module/components/more-menu-dropdown/index.js +1 -3
- package/build-module/components/more-menu-dropdown/index.js.map +1 -1
- package/build-module/components/more-menu-feature-toggle/index.js +2 -5
- package/build-module/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build-module/components/navigable-region/index.js +0 -1
- package/build-module/components/navigable-region/index.js.map +1 -1
- package/build-module/components/pinned-items/index.js +1 -5
- package/build-module/components/pinned-items/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +0 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal-base-option/index.js +0 -3
- package/build-module/components/preferences-modal-base-option/index.js.map +1 -1
- package/build-module/components/preferences-modal-section/index.js +0 -2
- package/build-module/components/preferences-modal-section/index.js.map +1 -1
- package/build-module/components/preferences-modal-tabs/index.js +5 -9
- package/build-module/components/preferences-modal-tabs/index.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +16 -20
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +5 -4
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +7 -9
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +9 -10
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +14 -8
- package/build-style/style.css +14 -8
- package/package.json +13 -13
- package/src/components/complementary-area/README.md +1 -1
- package/src/components/complementary-area/index.js +18 -2
- package/src/components/complementary-area-toggle/index.js +1 -1
- package/src/components/interface-skeleton/index.js +2 -0
- package/src/components/interface-skeleton/style.scss +6 -0
- package/src/components/more-menu-feature-toggle/index.js +1 -1
- package/src/components/pinned-items/style.scss +12 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["combineReducers","complementaryAreas","state","action","type","scope","area","activeModal","name"],"sources":["@wordpress/interface/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function complementaryAreas( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEFAULT_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\n\t\t\t// If there's already an area, don't overwrite it.\n\t\t\tif ( state[ scope ] ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t\tcase 'ENABLE_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer for storing the name of the open modal, or null if no modal is open.\n *\n * @param {Object} state Previous state.\n * @param {Object} action Action object containing the `name` of the modal\n *\n * @return {Object} Updated state\n */\nexport function activeModal( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_MODAL':\n\t\t\treturn action.name;\n\t\tcase 'CLOSE_MODAL':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tcomplementaryAreas,\n\tactiveModal,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,OAAO,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EACxD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,gCAAgC;MAAE;QACtC,MAAM;UAAEC,KAAK;UAAEC;QAAK,CAAC,GAAGH,MAAM;;QAE9B;QACA,IAAKD,KAAK,CAAEG,KAAK,CAAE,EAAG;UACrB,OAAOH,KAAK;QACb;QAEA,OAAO;UACN,GAAGA,KAAK;UACR,CAAEG,KAAK,GAAIC;QACZ,CAAC;MACF;IACA,KAAK,2BAA2B;MAAE;QACjC,MAAM;UAAED,KAAK;UAAEC;QAAK,CAAC,GAAGH,MAAM;QAC9B,OAAO;UACN,GAAGD,KAAK;UACR,CAAEG,KAAK,GAAIC;QACZ,CAAC;MACF;EACD;EAEA,OAAOJ,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,WAAWA,CAAEL,KAAK,GAAG,IAAI,EAAEC,MAAM,EAAG;EACnD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,YAAY;MAChB,OAAOD,MAAM,CAACK,IAAI;IACnB,KAAK,aAAa;MACjB,OAAO,IAAI;EACb;EAEA,OAAON,KAAK;AACb;AAEA,eAAeF,eAAe,CAAE;EAC/BC,kBAAkB;EAClBM;AACD,CAAE,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { createRegistrySelector } from '@wordpress/data';
|
|
5
5
|
import deprecated from '@wordpress/deprecated';
|
|
6
6
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* Returns the complementary area that is active in a given scope.
|
|
9
10
|
*
|
|
@@ -12,21 +13,20 @@ import { store as preferencesStore } from '@wordpress/preferences';
|
|
|
12
13
|
*
|
|
13
14
|
* @return {string | null | undefined} The complementary area that is active in the given scope.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
16
|
export const getActiveComplementaryArea = createRegistrySelector(select => (state, scope) => {
|
|
17
|
-
const isComplementaryAreaVisible = select(preferencesStore).get(scope, 'isComplementaryAreaVisible');
|
|
17
|
+
const isComplementaryAreaVisible = select(preferencesStore).get(scope, 'isComplementaryAreaVisible');
|
|
18
|
+
|
|
19
|
+
// Return `undefined` to indicate that the user has never toggled
|
|
18
20
|
// visibility, this is the vanilla default. Other code relies on this
|
|
19
21
|
// nuance in the return value.
|
|
20
|
-
|
|
21
22
|
if (isComplementaryAreaVisible === undefined) {
|
|
22
23
|
return undefined;
|
|
23
|
-
}
|
|
24
|
-
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
+
// Return `null` to indicate the user hid the complementary area.
|
|
26
27
|
if (isComplementaryAreaVisible === false) {
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
30
|
return state?.complementaryAreas?.[scope];
|
|
31
31
|
});
|
|
32
32
|
export const isComplementaryAreaLoading = createRegistrySelector(select => (state, scope) => {
|
|
@@ -34,6 +34,7 @@ export const isComplementaryAreaLoading = createRegistrySelector(select => (stat
|
|
|
34
34
|
const identifier = state?.complementaryAreas?.[scope];
|
|
35
35
|
return isVisible && identifier === undefined;
|
|
36
36
|
});
|
|
37
|
+
|
|
37
38
|
/**
|
|
38
39
|
* Returns a boolean indicating if an item is pinned or not.
|
|
39
40
|
*
|
|
@@ -43,13 +44,12 @@ export const isComplementaryAreaLoading = createRegistrySelector(select => (stat
|
|
|
43
44
|
*
|
|
44
45
|
* @return {boolean} True if the item is pinned and false otherwise.
|
|
45
46
|
*/
|
|
46
|
-
|
|
47
47
|
export const isItemPinned = createRegistrySelector(select => (state, scope, item) => {
|
|
48
48
|
var _pinnedItems$item;
|
|
49
|
-
|
|
50
49
|
const pinnedItems = select(preferencesStore).get(scope, 'pinnedItems');
|
|
51
50
|
return (_pinnedItems$item = pinnedItems?.[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
|
|
52
51
|
});
|
|
52
|
+
|
|
53
53
|
/**
|
|
54
54
|
* Returns a boolean indicating whether a feature is active for a particular
|
|
55
55
|
* scope.
|
|
@@ -60,7 +60,6 @@ export const isItemPinned = createRegistrySelector(select => (state, scope, item
|
|
|
60
60
|
*
|
|
61
61
|
* @return {boolean} Is the feature enabled?
|
|
62
62
|
*/
|
|
63
|
-
|
|
64
63
|
export const isFeatureActive = createRegistrySelector(select => (state, scope, featureName) => {
|
|
65
64
|
deprecated(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
|
|
66
65
|
since: '6.0',
|
|
@@ -68,6 +67,7 @@ export const isFeatureActive = createRegistrySelector(select => (state, scope, f
|
|
|
68
67
|
});
|
|
69
68
|
return !!select(preferencesStore).get(scope, featureName);
|
|
70
69
|
});
|
|
70
|
+
|
|
71
71
|
/**
|
|
72
72
|
* Returns true if a modal is active, or false otherwise.
|
|
73
73
|
*
|
|
@@ -76,7 +76,6 @@ export const isFeatureActive = createRegistrySelector(select => (state, scope, f
|
|
|
76
76
|
*
|
|
77
77
|
* @return {boolean} Whether the modal is active.
|
|
78
78
|
*/
|
|
79
|
-
|
|
80
79
|
export function isModalActive(state, modalName) {
|
|
81
80
|
return state.activeModal === modalName;
|
|
82
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["createRegistrySelector","deprecated","store","preferencesStore","getActiveComplementaryArea","select","state","scope","isComplementaryAreaVisible","get","undefined","complementaryAreas","isComplementaryAreaLoading","isVisible","identifier","isItemPinned","item","_pinnedItems$item","pinnedItems","isFeatureActive","featureName","since","alternative","isModalActive","modalName","activeModal"],"sources":["@wordpress/interface/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,iBAAiB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAGJ,sBAAsB,CAC7DK,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjC,MAAMC,0BAA0B,GAAGH,MAAM,CAAEF,gBAAiB,CAAC,CAACM,GAAG,CAChEF,KAAK,EACL,4BACD,CAAC;;EAED;EACA;EACA;EACA,IAAKC,0BAA0B,KAAKE,SAAS,EAAG;IAC/C,OAAOA,SAAS;EACjB;;EAEA;EACA,IAAKF,0BAA0B,KAAK,KAAK,EAAG;IAC3C,OAAO,IAAI;EACZ;EAEA,OAAOF,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;AAC5C,CACD,CAAC;AAED,OAAO,MAAMK,0BAA0B,GAAGZ,sBAAsB,CAC7DK,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjC,MAAMM,SAAS,GAAGR,MAAM,CAAEF,gBAAiB,CAAC,CAACM,GAAG,CAC/CF,KAAK,EACL,4BACD,CAAC;EACD,MAAMO,UAAU,GAAGR,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;EAEvD,OAAOM,SAAS,IAAIC,UAAU,KAAKJ,SAAS;AAC7C,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,YAAY,GAAGf,sBAAsB,CAC/CK,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAES,IAAI,KAAM;EAAA,IAAAC,iBAAA;EACvC,MAAMC,WAAW,GAAGb,MAAM,CAAEF,gBAAiB,CAAC,CAACM,GAAG,CACjDF,KAAK,EACL,aACD,CAAC;EACD,QAAAU,iBAAA,GAAOC,WAAW,GAAIF,IAAI,CAAE,cAAAC,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AACrC,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,eAAe,GAAGnB,sBAAsB,CAClDK,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAEa,WAAW,KAAM;EAC9CnB,UAAU,CACR,kEAAiE,EAClE;IACCoB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CACD,CAAC;EAED,OAAO,CAAC,CAAEjB,MAAM,CAAEF,gBAAiB,CAAC,CAACM,GAAG,CAAEF,KAAK,EAAEa,WAAY,CAAC;AAC/D,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,aAAaA,CAAEjB,KAAK,EAAEkB,SAAS,EAAG;EACjD,OAAOlB,KAAK,CAACmB,WAAW,KAAKD,SAAS;AACvC"}
|
|
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
320
320
|
overflow: auto;
|
|
321
321
|
z-index: 20;
|
|
322
322
|
}
|
|
323
|
+
@media (min-width: 782px) {
|
|
324
|
+
.interface-interface-skeleton__content {
|
|
325
|
+
z-index: auto;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
|
|
324
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
325
330
|
.interface-interface-skeleton__sidebar {
|
|
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
471
|
gap: 4px;
|
|
467
472
|
margin-left: -4px;
|
|
468
473
|
}
|
|
469
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
470
|
-
display: none;
|
|
471
|
-
}
|
|
472
|
-
@media (min-width: 600px) {
|
|
473
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
474
|
-
display: flex;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
474
|
.interface-pinned-items .components-button {
|
|
475
|
+
display: none;
|
|
478
476
|
margin: 0;
|
|
479
477
|
}
|
|
478
|
+
.interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
|
|
479
|
+
display: flex;
|
|
480
|
+
}
|
|
480
481
|
.interface-pinned-items .components-button svg {
|
|
481
482
|
max-width: 24px;
|
|
482
483
|
max-height: 24px;
|
|
483
484
|
}
|
|
485
|
+
@media (min-width: 600px) {
|
|
486
|
+
.interface-pinned-items .components-button {
|
|
487
|
+
display: flex;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
484
490
|
|
|
485
491
|
@media (min-width: 600px) {
|
|
486
492
|
.interface-preferences-modal {
|
package/build-style/style.css
CHANGED
|
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
320
320
|
overflow: auto;
|
|
321
321
|
z-index: 20;
|
|
322
322
|
}
|
|
323
|
+
@media (min-width: 782px) {
|
|
324
|
+
.interface-interface-skeleton__content {
|
|
325
|
+
z-index: auto;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
|
|
324
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
325
330
|
.interface-interface-skeleton__sidebar {
|
|
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
471
|
gap: 4px;
|
|
467
472
|
margin-right: -4px;
|
|
468
473
|
}
|
|
469
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
470
|
-
display: none;
|
|
471
|
-
}
|
|
472
|
-
@media (min-width: 600px) {
|
|
473
|
-
.interface-pinned-items .components-button:not(:first-child) {
|
|
474
|
-
display: flex;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
474
|
.interface-pinned-items .components-button {
|
|
475
|
+
display: none;
|
|
478
476
|
margin: 0;
|
|
479
477
|
}
|
|
478
|
+
.interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
|
|
479
|
+
display: flex;
|
|
480
|
+
}
|
|
480
481
|
.interface-pinned-items .components-button svg {
|
|
481
482
|
max-width: 24px;
|
|
482
483
|
max-height: 24px;
|
|
483
484
|
}
|
|
485
|
+
@media (min-width: 600px) {
|
|
486
|
+
.interface-pinned-items .components-button {
|
|
487
|
+
display: flex;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
484
490
|
|
|
485
491
|
@media (min-width: 600px) {
|
|
486
492
|
.interface-preferences-modal {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/interface",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.1",
|
|
4
4
|
"description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
|
-
"@wordpress/a11y": "^3.
|
|
36
|
-
"@wordpress/components": "^25.
|
|
37
|
-
"@wordpress/compose": "^6.
|
|
38
|
-
"@wordpress/data": "^9.
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/element": "^5.
|
|
41
|
-
"@wordpress/i18n": "^4.
|
|
42
|
-
"@wordpress/icons": "^9.
|
|
43
|
-
"@wordpress/plugins": "^6.
|
|
44
|
-
"@wordpress/preferences": "^3.
|
|
45
|
-
"@wordpress/viewport": "^5.
|
|
35
|
+
"@wordpress/a11y": "^3.40.1",
|
|
36
|
+
"@wordpress/components": "^25.6.1",
|
|
37
|
+
"@wordpress/compose": "^6.17.1",
|
|
38
|
+
"@wordpress/data": "^9.10.1",
|
|
39
|
+
"@wordpress/deprecated": "^3.40.1",
|
|
40
|
+
"@wordpress/element": "^5.17.1",
|
|
41
|
+
"@wordpress/i18n": "^4.40.1",
|
|
42
|
+
"@wordpress/icons": "^9.31.1",
|
|
43
|
+
"@wordpress/plugins": "^6.8.1",
|
|
44
|
+
"@wordpress/preferences": "^3.17.1",
|
|
45
|
+
"@wordpress/viewport": "^5.17.1",
|
|
46
46
|
"classnames": "^2.3.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "bb1fbf87bb0f451744530fc6a85de2dff1263bed"
|
|
56
56
|
}
|
|
@@ -5,7 +5,7 @@ Multiple areas may be added in a given time, but only one is visible; the compon
|
|
|
5
5
|
|
|
6
6
|
The contents passed to ComplementaryArea are rendered in the ComplementaryArea.Slot corresponding to their scope if the complementary area is enabled.
|
|
7
7
|
|
|
8
|
-
Besides rendering the
|
|
8
|
+
Besides rendering the complementary area, the component renders a button in `PinnedItems` that allows opening the complementary area. The button only appears if the complementary is marked as favorite. By default, the complementary area headers rendered contain a button to mark and unmark areas as favorites.
|
|
9
9
|
|
|
10
10
|
## Props
|
|
11
11
|
|
|
@@ -79,7 +79,15 @@ function useAdjustComplementaryListener(
|
|
|
79
79
|
if ( isSmall !== previousIsSmall.current ) {
|
|
80
80
|
previousIsSmall.current = isSmall;
|
|
81
81
|
}
|
|
82
|
-
}, [
|
|
82
|
+
}, [
|
|
83
|
+
isActive,
|
|
84
|
+
isSmall,
|
|
85
|
+
scope,
|
|
86
|
+
identifier,
|
|
87
|
+
activeArea,
|
|
88
|
+
disableComplementaryArea,
|
|
89
|
+
enableComplementaryArea,
|
|
90
|
+
] );
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
function ComplementaryArea( {
|
|
@@ -145,7 +153,15 @@ function ComplementaryArea( {
|
|
|
145
153
|
} else if ( activeArea === undefined && isSmall ) {
|
|
146
154
|
disableComplementaryArea( scope, identifier );
|
|
147
155
|
}
|
|
148
|
-
}, [
|
|
156
|
+
}, [
|
|
157
|
+
activeArea,
|
|
158
|
+
isActiveByDefault,
|
|
159
|
+
scope,
|
|
160
|
+
identifier,
|
|
161
|
+
isSmall,
|
|
162
|
+
enableComplementaryArea,
|
|
163
|
+
disableComplementaryArea,
|
|
164
|
+
] );
|
|
149
165
|
|
|
150
166
|
return (
|
|
151
167
|
<>
|
|
@@ -24,7 +24,7 @@ function ComplementaryAreaToggle( {
|
|
|
24
24
|
( select ) =>
|
|
25
25
|
select( interfaceStore ).getActiveComplementaryArea( scope ) ===
|
|
26
26
|
identifier,
|
|
27
|
-
[ identifier ]
|
|
27
|
+
[ identifier, scope ]
|
|
28
28
|
);
|
|
29
29
|
const { enableComplementaryArea, disableComplementaryArea } =
|
|
30
30
|
useDispatch( interfaceStore );
|
|
@@ -52,6 +52,7 @@ function InterfaceSkeleton(
|
|
|
52
52
|
secondarySidebar,
|
|
53
53
|
notices,
|
|
54
54
|
content,
|
|
55
|
+
contentProps,
|
|
55
56
|
actions,
|
|
56
57
|
labels,
|
|
57
58
|
className,
|
|
@@ -150,6 +151,7 @@ function InterfaceSkeleton(
|
|
|
150
151
|
<NavigableRegion
|
|
151
152
|
className="interface-interface-skeleton__content"
|
|
152
153
|
ariaLabel={ mergedLabels.body }
|
|
154
|
+
{ ...contentProps }
|
|
153
155
|
>
|
|
154
156
|
{ content }
|
|
155
157
|
</NavigableRegion>
|
|
@@ -88,6 +88,12 @@ html.interface-interface-skeleton__html-container {
|
|
|
88
88
|
// to "bleed" through the header.
|
|
89
89
|
// See https://github.com/WordPress/gutenberg/issues/32631
|
|
90
90
|
z-index: z-index(".interface-interface-skeleton__content");
|
|
91
|
+
|
|
92
|
+
// On Safari the z-index is not respected when the element is fixed.
|
|
93
|
+
// Setting it to auto fixes the problem
|
|
94
|
+
@include break-medium() {
|
|
95
|
+
z-index: auto;
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
.interface-interface-skeleton__secondary-sidebar,
|
|
@@ -24,7 +24,7 @@ export default function MoreMenuFeatureToggle( {
|
|
|
24
24
|
const isActive = useSelect(
|
|
25
25
|
( select ) =>
|
|
26
26
|
select( interfaceStore ).isFeatureActive( scope, feature ),
|
|
27
|
-
[ feature ]
|
|
27
|
+
[ feature, scope ]
|
|
28
28
|
);
|
|
29
29
|
const { toggleFeature } = useDispatch( interfaceStore );
|
|
30
30
|
const speakMessage = () => {
|
|
@@ -3,8 +3,19 @@
|
|
|
3
3
|
|
|
4
4
|
// We intentionally hide pinned items (plugins) on mobile, and unhide them at desktop breakpoints.
|
|
5
5
|
// Otherwise the list can wreak havoc on the layout.
|
|
6
|
-
.components-button
|
|
6
|
+
.components-button {
|
|
7
7
|
display: none;
|
|
8
|
+
margin: 0;
|
|
9
|
+
|
|
10
|
+
&:nth-last-child(1),
|
|
11
|
+
&:nth-last-child(2) {
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
svg {
|
|
16
|
+
max-width: $icon-size;
|
|
17
|
+
max-height: $icon-size;
|
|
18
|
+
}
|
|
8
19
|
|
|
9
20
|
@include break-small() {
|
|
10
21
|
display: flex;
|
|
@@ -16,13 +27,4 @@
|
|
|
16
27
|
|
|
17
28
|
// Account for larger grid from parent container gap.
|
|
18
29
|
margin-right: -$grid-unit-05;
|
|
19
|
-
|
|
20
|
-
.components-button {
|
|
21
|
-
margin: 0;
|
|
22
|
-
|
|
23
|
-
svg {
|
|
24
|
-
max-width: $icon-size;
|
|
25
|
-
max-height: $icon-size;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
30
|
}
|