@wordpress/edit-site 6.50.0 → 7.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 +11 -0
- package/build/components/add-new-template/add-custom-template-modal-content.cjs +3 -3
- package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template/index.cjs +1 -1
- package/build/components/add-new-template/index.cjs.map +2 -2
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +3 -3
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template-legacy/index.cjs +1 -1
- package/build/components/add-new-template-legacy/index.cjs.map +2 -2
- package/build/components/editor/index.cjs +22 -97
- package/build/components/editor/index.cjs.map +3 -3
- package/build/components/layout/index.cjs +12 -15
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/page-patterns/fields.cjs +0 -36
- package/build/components/page-patterns/fields.cjs.map +2 -2
- package/build/components/page-patterns/index.cjs +4 -15
- package/build/components/page-patterns/index.cjs.map +2 -2
- package/build/components/save-panel/index.cjs +1 -2
- package/build/components/save-panel/index.cjs.map +2 -2
- package/build/components/site-editor-routes/styles.cjs +4 -3
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build/components/site-hub/index.cjs +13 -176
- package/build/components/site-hub/index.cjs.map +3 -3
- package/build/index.cjs +3 -1
- package/build/index.cjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +3 -3
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template/index.mjs +1 -1
- package/build-module/components/add-new-template/index.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +3 -3
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/index.mjs +1 -1
- package/build-module/components/add-new-template-legacy/index.mjs.map +2 -2
- package/build-module/components/editor/index.mjs +25 -100
- package/build-module/components/editor/index.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +12 -15
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/page-patterns/fields.mjs +2 -41
- package/build-module/components/page-patterns/fields.mjs.map +2 -2
- package/build-module/components/page-patterns/index.mjs +5 -16
- package/build-module/components/page-patterns/index.mjs.map +2 -2
- package/build-module/components/save-panel/index.mjs +1 -2
- package/build-module/components/save-panel/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +4 -3
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-module/components/site-hub/index.mjs +17 -170
- package/build-module/components/site-hub/index.mjs.map +2 -2
- package/build-module/index.mjs +3 -1
- package/build-module/index.mjs.map +2 -2
- package/build-style/style-rtl.css +110 -330
- package/build-style/style.css +110 -330
- package/package.json +52 -52
- package/src/components/add-new-template/add-custom-template-modal-content.js +3 -3
- package/src/components/add-new-template/index.js +1 -1
- package/src/components/add-new-template-legacy/add-custom-template-modal-content.js +3 -3
- package/src/components/add-new-template-legacy/index.js +1 -1
- package/src/components/editor/index.js +31 -122
- package/src/components/editor/style.scss +0 -62
- package/src/components/layout/index.js +13 -18
- package/src/components/layout/style.scss +5 -62
- package/src/components/page-patterns/fields.js +2 -50
- package/src/components/page-patterns/index.js +5 -23
- package/src/components/page-patterns/style.scss +1 -1
- package/src/components/save-panel/index.js +1 -2
- package/src/components/sidebar/style.scss +2 -0
- package/src/components/sidebar-button/style.scss +1 -9
- package/src/components/sidebar-global-styles/style.scss +7 -4
- package/src/components/sidebar-navigation-item/style.scss +8 -4
- package/src/components/sidebar-navigation-screen/style.scss +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +2 -2
- package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
- package/src/components/site-editor-routes/styles.js +5 -2
- package/src/components/site-hub/index.js +12 -170
- package/src/components/site-hub/style.scss +5 -82
- package/src/index.js +3 -1
- package/src/style.scss +16 -11
- package/build/components/site-icon/index.cjs +0 -73
- package/build/components/site-icon/index.cjs.map +0 -7
- package/build-module/components/site-icon/index.mjs +0 -42
- package/build-module/components/site-icon/index.mjs.map +0 -7
- package/build-style/experimental-omnibar-rtl.css +0 -103
- package/build-style/experimental-omnibar.css +0 -103
- package/src/components/site-icon/index.js +0 -51
- package/src/components/site-icon/style.scss +0 -41
- package/src/experimental-omnibar.scss +0 -75
package/src/style.scss
CHANGED
|
@@ -26,14 +26,11 @@
|
|
|
26
26
|
@use "./components/sidebar-navigation-screen-templates-browse/style.scss" as *;
|
|
27
27
|
@use "./components/sidebar-dataviews/style.scss" as *;
|
|
28
28
|
@use "./components/site-hub/style.scss" as *;
|
|
29
|
-
@use "./components/site-icon/style.scss" as *;
|
|
30
29
|
@use "./components/post-list/style.scss" as *;
|
|
31
30
|
@use "./components/resizable-frame/style.scss" as *;
|
|
32
31
|
@use "./components/pagination/style.scss" as *;
|
|
33
32
|
@use "./components/sidebar-global-styles/style.scss" as *;
|
|
34
|
-
@use "./experimental-omnibar.scss" as *;
|
|
35
33
|
|
|
36
|
-
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
37
34
|
::view-transition-image-pair(root) {
|
|
38
35
|
isolation: auto;
|
|
39
36
|
}
|
|
@@ -45,12 +42,7 @@
|
|
|
45
42
|
display: block;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
body.js #wpadminbar {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
45
|
+
// stylelint-disable selector-class-pattern -- WordPress admin body classes use underscores by convention.
|
|
54
46
|
body.js #wpbody {
|
|
55
47
|
padding-top: 0;
|
|
56
48
|
}
|
|
@@ -62,10 +54,22 @@ body.js.site-editor-php {
|
|
|
62
54
|
|
|
63
55
|
body.js.site-editor-php {
|
|
64
56
|
background: var(--wpds-color-background-surface-neutral-weak);
|
|
57
|
+
|
|
58
|
+
@include break-medium {
|
|
59
|
+
&:has(.editor-editor-interface.is-distraction-free) {
|
|
60
|
+
--wp-admin--admin-bar--height: 0px;
|
|
61
|
+
|
|
62
|
+
#wpadminbar {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
65
67
|
}
|
|
68
|
+
// stylelint-enable selector-class-pattern
|
|
66
69
|
|
|
67
70
|
.edit-site {
|
|
68
71
|
@include reset;
|
|
72
|
+
padding-top: var(--wp-admin--admin-bar--height, 0);
|
|
69
73
|
height: 100vh;
|
|
70
74
|
|
|
71
75
|
// On mobile the main content area has to scroll, otherwise you can invoke
|
|
@@ -73,10 +77,11 @@ body.js.site-editor-php {
|
|
|
73
77
|
@include break-small {
|
|
74
78
|
bottom: 0;
|
|
75
79
|
left: 0;
|
|
76
|
-
|
|
80
|
+
height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
|
|
81
|
+
padding-top: 0;
|
|
77
82
|
position: fixed;
|
|
78
83
|
right: 0;
|
|
79
|
-
top: 0;
|
|
84
|
+
top: var(--wp-admin--admin-bar--height, 0);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
.no-js & {
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// packages/edit-site/src/components/site-icon/index.js
|
|
31
|
-
var site_icon_exports = {};
|
|
32
|
-
__export(site_icon_exports, {
|
|
33
|
-
default: () => site_icon_default
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(site_icon_exports);
|
|
36
|
-
var import_clsx = __toESM(require("clsx"));
|
|
37
|
-
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_components = require("@wordpress/components");
|
|
39
|
-
var import_i18n = require("@wordpress/i18n");
|
|
40
|
-
var import_icons = require("@wordpress/icons");
|
|
41
|
-
var import_core_data = require("@wordpress/core-data");
|
|
42
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
function SiteIcon({ className }) {
|
|
44
|
-
const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
|
|
45
|
-
const { getEntityRecord } = select(import_core_data.store);
|
|
46
|
-
const siteData = getEntityRecord("root", "__unstableBase", void 0);
|
|
47
|
-
return {
|
|
48
|
-
isRequestingSite: !siteData,
|
|
49
|
-
siteIconUrl: siteData?.site_icon_url
|
|
50
|
-
};
|
|
51
|
-
}, []);
|
|
52
|
-
if (isRequestingSite && !siteIconUrl) {
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-site-site-icon__image" });
|
|
54
|
-
}
|
|
55
|
-
const icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
"img",
|
|
57
|
-
{
|
|
58
|
-
className: "edit-site-site-icon__image",
|
|
59
|
-
alt: (0, import_i18n.__)("Site Icon"),
|
|
60
|
-
src: siteIconUrl
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
-
import_components.Icon,
|
|
64
|
-
{
|
|
65
|
-
className: "edit-site-site-icon__icon",
|
|
66
|
-
icon: import_icons.wordpress,
|
|
67
|
-
size: 48
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_clsx.default)(className, "edit-site-site-icon"), children: icon });
|
|
71
|
-
}
|
|
72
|
-
var site_icon_default = SiteIcon;
|
|
73
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/site-icon/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon as WCIcon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<WCIcon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\ticon={ wordpress }\n\t\t\tsize={ 48 }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ clsx( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,wBAA+B;AAC/B,kBAAmB;AACnB,mBAA0B;AAC1B,uBAAuC;AAc9B;AAZT,SAAS,SAAU,EAAE,UAAU,GAAI;AAClC,QAAM,EAAE,kBAAkB,YAAY,QAAI,uBAAW,CAAE,WAAY;AAClE,UAAM,EAAE,gBAAgB,IAAI,OAAQ,iBAAAA,KAAc;AAClD,UAAM,WAAW,gBAAiB,QAAQ,kBAAkB,MAAU;AAEtE,WAAO;AAAA,MACN,kBAAkB,CAAE;AAAA,MACpB,aAAa,UAAU;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,oBAAoB,CAAE,aAAc;AACxC,WAAO,4CAAC,SAAI,WAAU,8BAA6B;AAAA,EACpD;AAEA,QAAM,OAAO,cACZ;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,SAAM,gBAAI,WAAY;AAAA,MACtB,KAAM;AAAA;AAAA,EACP,IAEA;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,WAAU;AAAA,MACV,MAAO;AAAA,MACP,MAAO;AAAA;AAAA,EACR;AAGD,SACC,4CAAC,SAAI,eAAY,YAAAC,SAAM,WAAW,qBAAsB,GACrD,gBACH;AAEF;AAEA,IAAO,oBAAQ;",
|
|
6
|
-
"names": ["coreDataStore", "WCIcon", "clsx"]
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// packages/edit-site/src/components/site-icon/index.js
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { useSelect } from "@wordpress/data";
|
|
4
|
-
import { Icon as WCIcon } from "@wordpress/components";
|
|
5
|
-
import { __ } from "@wordpress/i18n";
|
|
6
|
-
import { wordpress } from "@wordpress/icons";
|
|
7
|
-
import { store as coreDataStore } from "@wordpress/core-data";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
function SiteIcon({ className }) {
|
|
10
|
-
const { isRequestingSite, siteIconUrl } = useSelect((select) => {
|
|
11
|
-
const { getEntityRecord } = select(coreDataStore);
|
|
12
|
-
const siteData = getEntityRecord("root", "__unstableBase", void 0);
|
|
13
|
-
return {
|
|
14
|
-
isRequestingSite: !siteData,
|
|
15
|
-
siteIconUrl: siteData?.site_icon_url
|
|
16
|
-
};
|
|
17
|
-
}, []);
|
|
18
|
-
if (isRequestingSite && !siteIconUrl) {
|
|
19
|
-
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-icon__image" });
|
|
20
|
-
}
|
|
21
|
-
const icon = siteIconUrl ? /* @__PURE__ */ jsx(
|
|
22
|
-
"img",
|
|
23
|
-
{
|
|
24
|
-
className: "edit-site-site-icon__image",
|
|
25
|
-
alt: __("Site Icon"),
|
|
26
|
-
src: siteIconUrl
|
|
27
|
-
}
|
|
28
|
-
) : /* @__PURE__ */ jsx(
|
|
29
|
-
WCIcon,
|
|
30
|
-
{
|
|
31
|
-
className: "edit-site-site-icon__icon",
|
|
32
|
-
icon: wordpress,
|
|
33
|
-
size: 48
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
return /* @__PURE__ */ jsx("div", { className: clsx(className, "edit-site-site-icon"), children: icon });
|
|
37
|
-
}
|
|
38
|
-
var site_icon_default = SiteIcon;
|
|
39
|
-
export {
|
|
40
|
-
site_icon_default as default
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/site-icon/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon as WCIcon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<WCIcon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\ticon={ wordpress }\n\t\t\tsize={ 48 }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ clsx( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,cAAc;AAC/B,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,qBAAqB;AAc9B;AAZT,SAAS,SAAU,EAAE,UAAU,GAAI;AAClC,QAAM,EAAE,kBAAkB,YAAY,IAAI,UAAW,CAAE,WAAY;AAClE,UAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAClD,UAAM,WAAW,gBAAiB,QAAQ,kBAAkB,MAAU;AAEtE,WAAO;AAAA,MACN,kBAAkB,CAAE;AAAA,MACpB,aAAa,UAAU;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,oBAAoB,CAAE,aAAc;AACxC,WAAO,oBAAC,SAAI,WAAU,8BAA6B;AAAA,EACpD;AAEA,QAAM,OAAO,cACZ;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,KAAM,GAAI,WAAY;AAAA,MACtB,KAAM;AAAA;AAAA,EACP,IAEA;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,MAAO;AAAA,MACP,MAAO;AAAA;AAAA,EACR;AAGD,SACC,oBAAC,SAAI,WAAY,KAAM,WAAW,qBAAsB,GACrD,gBACH;AAEF;AAEA,IAAO,oBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SCSS Variables.
|
|
3
|
-
*
|
|
4
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
5
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
6
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Colors
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Fonts & basic variables.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Typography
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Grid System.
|
|
19
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Radius scale.
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* Elevation scale.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Dimensions.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Mobile specific styles
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Editor styles.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Block & Editor UI.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Block paddings.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* React Native specific.
|
|
44
|
-
* These variables do not appear to be used anywhere else.
|
|
45
|
-
*/
|
|
46
|
-
body.has-admin-bar-in-editor {
|
|
47
|
-
margin-top: 0;
|
|
48
|
-
height: 100%;
|
|
49
|
-
}
|
|
50
|
-
body.has-admin-bar-in-editor:has(.editor-editor-interface.is-distraction-free) {
|
|
51
|
-
--wp-admin--admin-bar--height: 0;
|
|
52
|
-
}
|
|
53
|
-
body.has-admin-bar-in-editor .edit-site-site-hub__title,
|
|
54
|
-
body.has-admin-bar-in-editor .edit-site-site-hub__actions {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
body.has-admin-bar-in-editor .edit-site-editor__view-mode-toggle .edit-site-editor__back-icon {
|
|
58
|
-
background: transparent;
|
|
59
|
-
}
|
|
60
|
-
body.has-admin-bar-in-editor .edit-site-editor__view-mode-toggle:hover .edit-site-editor__back-icon {
|
|
61
|
-
color: var(--wp-admin-theme-color);
|
|
62
|
-
}
|
|
63
|
-
body.has-admin-bar-in-editor .edit-site-sidebar-navigation-screen__title-icon {
|
|
64
|
-
padding-top: 32px;
|
|
65
|
-
}
|
|
66
|
-
body.has-admin-bar-in-editor .edit-site-layout__content,
|
|
67
|
-
body.has-admin-bar-in-editor .edit-site-layout__sidebar {
|
|
68
|
-
min-height: 0;
|
|
69
|
-
}
|
|
70
|
-
body.has-admin-bar-in-editor .edit-site-sidebar__content {
|
|
71
|
-
flex-basis: 0;
|
|
72
|
-
min-height: 0;
|
|
73
|
-
}
|
|
74
|
-
body.has-admin-bar-in-editor .edit-site {
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
padding-top: var(--wp-admin--admin-bar--height, 0);
|
|
77
|
-
height: 100vh;
|
|
78
|
-
min-height: 100vh;
|
|
79
|
-
}
|
|
80
|
-
@media (min-width: 600px) {
|
|
81
|
-
body.has-admin-bar-in-editor .edit-site {
|
|
82
|
-
padding-top: 0;
|
|
83
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
84
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
85
|
-
min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
body.has-admin-bar-in-editor .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region {
|
|
89
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
90
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
91
|
-
}
|
|
92
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,
|
|
93
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within,
|
|
94
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .edit-site-layout__actions.is-entity-save-view-open:focus,
|
|
95
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .edit-site-layout__actions.is-entity-save-view-open:focus-within {
|
|
96
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
97
|
-
}
|
|
98
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode #wpadminbar {
|
|
99
|
-
display: block;
|
|
100
|
-
}
|
|
101
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
|
|
102
|
-
display: none;
|
|
103
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SCSS Variables.
|
|
3
|
-
*
|
|
4
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
5
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
6
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Colors
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Fonts & basic variables.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Typography
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Grid System.
|
|
19
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Radius scale.
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* Elevation scale.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Dimensions.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Mobile specific styles
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Editor styles.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Block & Editor UI.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Block paddings.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* React Native specific.
|
|
44
|
-
* These variables do not appear to be used anywhere else.
|
|
45
|
-
*/
|
|
46
|
-
body.has-admin-bar-in-editor {
|
|
47
|
-
margin-top: 0;
|
|
48
|
-
height: 100%;
|
|
49
|
-
}
|
|
50
|
-
body.has-admin-bar-in-editor:has(.editor-editor-interface.is-distraction-free) {
|
|
51
|
-
--wp-admin--admin-bar--height: 0;
|
|
52
|
-
}
|
|
53
|
-
body.has-admin-bar-in-editor .edit-site-site-hub__title,
|
|
54
|
-
body.has-admin-bar-in-editor .edit-site-site-hub__actions {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
body.has-admin-bar-in-editor .edit-site-editor__view-mode-toggle .edit-site-editor__back-icon {
|
|
58
|
-
background: transparent;
|
|
59
|
-
}
|
|
60
|
-
body.has-admin-bar-in-editor .edit-site-editor__view-mode-toggle:hover .edit-site-editor__back-icon {
|
|
61
|
-
color: var(--wp-admin-theme-color);
|
|
62
|
-
}
|
|
63
|
-
body.has-admin-bar-in-editor .edit-site-sidebar-navigation-screen__title-icon {
|
|
64
|
-
padding-top: 32px;
|
|
65
|
-
}
|
|
66
|
-
body.has-admin-bar-in-editor .edit-site-layout__content,
|
|
67
|
-
body.has-admin-bar-in-editor .edit-site-layout__sidebar {
|
|
68
|
-
min-height: 0;
|
|
69
|
-
}
|
|
70
|
-
body.has-admin-bar-in-editor .edit-site-sidebar__content {
|
|
71
|
-
flex-basis: 0;
|
|
72
|
-
min-height: 0;
|
|
73
|
-
}
|
|
74
|
-
body.has-admin-bar-in-editor .edit-site {
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
padding-top: var(--wp-admin--admin-bar--height, 0);
|
|
77
|
-
height: 100vh;
|
|
78
|
-
min-height: 100vh;
|
|
79
|
-
}
|
|
80
|
-
@media (min-width: 600px) {
|
|
81
|
-
body.has-admin-bar-in-editor .edit-site {
|
|
82
|
-
padding-top: 0;
|
|
83
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
84
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
85
|
-
min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
body.has-admin-bar-in-editor .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region {
|
|
89
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
90
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
91
|
-
}
|
|
92
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,
|
|
93
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within,
|
|
94
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .edit-site-layout__actions.is-entity-save-view-open:focus,
|
|
95
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode .edit-site-layout__actions.is-entity-save-view-open:focus-within {
|
|
96
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
97
|
-
}
|
|
98
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode #wpadminbar {
|
|
99
|
-
display: block;
|
|
100
|
-
}
|
|
101
|
-
body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
|
|
102
|
-
display: none;
|
|
103
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { useSelect } from '@wordpress/data';
|
|
10
|
-
import { Icon as WCIcon } from '@wordpress/components';
|
|
11
|
-
import { __ } from '@wordpress/i18n';
|
|
12
|
-
import { wordpress } from '@wordpress/icons';
|
|
13
|
-
import { store as coreDataStore } from '@wordpress/core-data';
|
|
14
|
-
|
|
15
|
-
function SiteIcon( { className } ) {
|
|
16
|
-
const { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {
|
|
17
|
-
const { getEntityRecord } = select( coreDataStore );
|
|
18
|
-
const siteData = getEntityRecord( 'root', '__unstableBase', undefined );
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
isRequestingSite: ! siteData,
|
|
22
|
-
siteIconUrl: siteData?.site_icon_url,
|
|
23
|
-
};
|
|
24
|
-
}, [] );
|
|
25
|
-
|
|
26
|
-
if ( isRequestingSite && ! siteIconUrl ) {
|
|
27
|
-
return <div className="edit-site-site-icon__image" />;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const icon = siteIconUrl ? (
|
|
31
|
-
<img
|
|
32
|
-
className="edit-site-site-icon__image"
|
|
33
|
-
alt={ __( 'Site Icon' ) }
|
|
34
|
-
src={ siteIconUrl }
|
|
35
|
-
/>
|
|
36
|
-
) : (
|
|
37
|
-
<WCIcon
|
|
38
|
-
className="edit-site-site-icon__icon"
|
|
39
|
-
icon={ wordpress }
|
|
40
|
-
size={ 48 }
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div className={ clsx( className, 'edit-site-site-icon' ) }>
|
|
46
|
-
{ icon }
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default SiteIcon;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
|
-
@use "@wordpress/base-styles/variables" as *;
|
|
3
|
-
|
|
4
|
-
.edit-site-site-icon__icon {
|
|
5
|
-
fill: currentColor;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
.edit-site-layout.is-full-canvas & {
|
|
10
|
-
// Make the WordPress icon not so big in full canvas.
|
|
11
|
-
padding: $grid-unit-15;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.edit-site-site-icon__image {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
object-fit: cover;
|
|
19
|
-
background: #333;
|
|
20
|
-
aspect-ratio: 1 / 1;
|
|
21
|
-
|
|
22
|
-
.edit-site-layout.is-full-canvas & {
|
|
23
|
-
border-radius: 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.edit-site-editor__view-mode-toggle button:focus {
|
|
28
|
-
position: relative;
|
|
29
|
-
|
|
30
|
-
&::before {
|
|
31
|
-
content: "";
|
|
32
|
-
display: block;
|
|
33
|
-
position: absolute;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
top: 0;
|
|
36
|
-
right: 0;
|
|
37
|
-
bottom: 0;
|
|
38
|
-
left: 0;
|
|
39
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 calc(#{ $border-width } + var(--wp-admin-border-width-focus)) $white;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// Styles for the experimental admin bar in editor.
|
|
2
|
-
|
|
3
|
-
@use "@wordpress/base-styles/variables" as *;
|
|
4
|
-
|
|
5
|
-
body.has-admin-bar-in-editor {
|
|
6
|
-
margin-top: 0;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
&:has(.editor-editor-interface.is-distraction-free) {
|
|
10
|
-
--wp-admin--admin-bar--height: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.edit-site-site-hub__title,
|
|
14
|
-
.edit-site-site-hub__actions {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.edit-site-editor__view-mode-toggle .edit-site-editor__back-icon {
|
|
19
|
-
background: transparent;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.edit-site-editor__view-mode-toggle:hover .edit-site-editor__back-icon {
|
|
23
|
-
color: var(--wp-admin-theme-color);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.edit-site-sidebar-navigation-screen__title-icon {
|
|
27
|
-
padding-top: $grid-unit-40;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.edit-site-layout__content,
|
|
31
|
-
.edit-site-layout__sidebar {
|
|
32
|
-
min-height: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.edit-site-sidebar__content {
|
|
36
|
-
flex-basis: 0;
|
|
37
|
-
min-height: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.edit-site {
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
padding-top: var(--wp-admin--admin-bar--height, 0);
|
|
43
|
-
height: 100vh;
|
|
44
|
-
min-height: 100vh;
|
|
45
|
-
|
|
46
|
-
@media (min-width: 600px) {
|
|
47
|
-
padding-top: 0;
|
|
48
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
49
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
50
|
-
min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region {
|
|
55
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
56
|
-
height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.is-fullscreen-mode {
|
|
60
|
-
.is-entity-save-view-open .interface-interface-skeleton__actions:focus,
|
|
61
|
-
.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within,
|
|
62
|
-
.edit-site-layout__actions.is-entity-save-view-open:focus,
|
|
63
|
-
.edit-site-layout__actions.is-entity-save-view-open:focus-within {
|
|
64
|
-
top: var(--wp-admin--admin-bar--height, 0);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
#wpadminbar {
|
|
68
|
-
display: block;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
|
|
72
|
-
display: none;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|