@wordpress/interface 9.17.0 → 9.17.1-next.47f435fc9.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/build/components/action-item/index.js +68 -66
- package/build/components/action-item/index.js.map +7 -1
- package/build/components/complementary-area/index.js +215 -194
- package/build/components/complementary-area/index.js.map +7 -1
- package/build/components/complementary-area-header/index.js +53 -33
- package/build/components/complementary-area-header/index.js.map +7 -1
- package/build/components/complementary-area-more-menu-item/index.js +60 -39
- package/build/components/complementary-area-more-menu-item/index.js.map +7 -1
- package/build/components/complementary-area-toggle/index.js +61 -50
- package/build/components/complementary-area-toggle/index.js.map +7 -1
- package/build/components/fullscreen-mode/index.js +33 -27
- package/build/components/fullscreen-mode/index.js.map +7 -1
- package/build/components/index.js +52 -55
- package/build/components/index.js.map +7 -1
- package/build/components/interface-skeleton/index.js +156 -132
- package/build/components/interface-skeleton/index.js.map +7 -1
- package/build/components/pinned-items/index.js +48 -39
- package/build/components/pinned-items/index.js.map +7 -1
- package/build/index.js +27 -24
- package/build/index.js.map +7 -1
- package/build/store/actions.js +94 -165
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +27 -12
- package/build/store/constants.js.map +7 -1
- package/build/store/deprecated.js +55 -29
- package/build/store/deprecated.js.map +7 -1
- package/build/store/index.js +44 -32
- package/build/store/index.js.map +7 -1
- package/build/store/reducer.js +49 -51
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +96 -93
- package/build/store/selectors.js.map +7 -1
- package/build-module/components/action-item/index.js +49 -59
- package/build-module/components/action-item/index.js.map +7 -1
- package/build-module/components/complementary-area/index.js +185 -174
- package/build-module/components/complementary-area/index.js.map +7 -1
- package/build-module/components/complementary-area-header/index.js +25 -26
- package/build-module/components/complementary-area-header/index.js.map +7 -1
- package/build-module/components/complementary-area-more-menu-item/index.js +33 -33
- package/build-module/components/complementary-area-more-menu-item/index.js.map +7 -1
- package/build-module/components/complementary-area-toggle/index.js +41 -44
- package/build-module/components/complementary-area-toggle/index.js.map +7 -1
- package/build-module/components/fullscreen-mode/index.js +13 -19
- package/build-module/components/fullscreen-mode/index.js.map +7 -1
- package/build-module/components/index.js +15 -8
- package/build-module/components/index.js.map +7 -1
- package/build-module/components/interface-skeleton/index.js +132 -122
- package/build-module/components/interface-skeleton/index.js.map +7 -1
- package/build-module/components/pinned-items/index.js +20 -32
- package/build-module/components/pinned-items/index.js.map +7 -1
- package/build-module/index.js +6 -3
- package/build-module/index.js.map +7 -1
- package/build-module/store/actions.js +47 -138
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +5 -7
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/deprecated.js +21 -20
- package/build-module/store/deprecated.js.map +7 -1
- package/build-module/store/index.js +10 -22
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/reducer.js +28 -45
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +64 -87
- package/build-module/store/selectors.js.map +7 -1
- package/build-style/style-rtl.css +87 -85
- package/build-style/style.css +87 -85
- package/package.json +21 -15
- package/src/components/complementary-area/style.scss +5 -0
- package/src/components/complementary-area-header/style.scss +3 -0
- package/src/components/fullscreen-mode/style.scss +3 -0
- package/src/components/index.js +0 -1
- package/src/components/interface-skeleton/index.js +1 -5
- package/src/components/interface-skeleton/style.scss +6 -0
- package/src/components/pinned-items/style.scss +3 -0
- package/src/style.scss +6 -5
- package/build/components/index.native.js +0 -21
- package/build/components/index.native.js.map +0 -1
- package/build/components/navigable-region/index.js +0 -38
- package/build/components/navigable-region/index.js.map +0 -1
- package/build-module/components/index.native.js +0 -3
- package/build-module/components/index.native.js.map +0 -1
- package/build-module/components/navigable-region/index.js +0 -30
- package/build-module/components/navigable-region/index.js.map +0 -1
- package/src/components/navigable-region/README.md +0 -36
- package/src/components/navigable-region/index.js +0 -29
|
@@ -1,83 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var action_item_exports = {};
|
|
19
|
+
__export(action_item_exports, {
|
|
20
|
+
default: () => action_item_default
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const noop = () => {};
|
|
22
|
+
module.exports = __toCommonJS(action_item_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_components = require("@wordpress/components");
|
|
25
|
+
var import_element = require("@wordpress/element");
|
|
26
|
+
const noop = () => {
|
|
27
|
+
};
|
|
15
28
|
function ActionItemSlot({
|
|
16
29
|
name,
|
|
17
|
-
as: Component =
|
|
30
|
+
as: Component = import_components.MenuGroup,
|
|
18
31
|
fillProps = {},
|
|
19
32
|
bubblesVirtually,
|
|
20
33
|
...props
|
|
21
34
|
}) {
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Special handling exists for backward compatibility.
|
|
32
|
-
// It ensures that menu items created by plugin authors aren't
|
|
33
|
-
// duplicated with automatically injected menu items coming
|
|
34
|
-
// from pinnable plugin sidebars.
|
|
35
|
-
// @see https://github.com/WordPress/gutenberg/issues/14457
|
|
36
|
-
const initializedByPlugins = [];
|
|
37
|
-
_element.Children.forEach(fills, ({
|
|
38
|
-
props: {
|
|
39
|
-
__unstableExplicitMenuItem,
|
|
40
|
-
__unstableTarget
|
|
41
|
-
}
|
|
42
|
-
}) => {
|
|
43
|
-
if (__unstableTarget && __unstableExplicitMenuItem) {
|
|
44
|
-
initializedByPlugins.push(__unstableTarget);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const children = _element.Children.map(fills, child => {
|
|
48
|
-
if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
|
+
import_components.Slot,
|
|
37
|
+
{
|
|
38
|
+
name,
|
|
39
|
+
bubblesVirtually,
|
|
40
|
+
fillProps,
|
|
41
|
+
children: (fills) => {
|
|
42
|
+
if (!import_element.Children.toArray(fills).length) {
|
|
49
43
|
return null;
|
|
50
44
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
const initializedByPlugins = [];
|
|
46
|
+
import_element.Children.forEach(
|
|
47
|
+
fills,
|
|
48
|
+
({
|
|
49
|
+
props: { __unstableExplicitMenuItem, __unstableTarget }
|
|
50
|
+
}) => {
|
|
51
|
+
if (__unstableTarget && __unstableExplicitMenuItem) {
|
|
52
|
+
initializedByPlugins.push(__unstableTarget);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const children = import_element.Children.map(fills, (child) => {
|
|
57
|
+
if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(
|
|
58
|
+
child.props.__unstableTarget
|
|
59
|
+
)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return child;
|
|
63
|
+
});
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props, children });
|
|
65
|
+
}
|
|
57
66
|
}
|
|
58
|
-
|
|
67
|
+
);
|
|
59
68
|
}
|
|
60
|
-
function ActionItem({
|
|
61
|
-
name,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}) {
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Fill, {
|
|
67
|
-
name: name,
|
|
68
|
-
children: ({
|
|
69
|
-
onClick: fpOnClick
|
|
70
|
-
}) => {
|
|
71
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
69
|
+
function ActionItem({ name, as: Component = import_components.Button, onClick, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Fill, { name, children: ({ onClick: fpOnClick }) => {
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
Component,
|
|
73
|
+
{
|
|
72
74
|
onClick: onClick || fpOnClick ? (...args) => {
|
|
73
75
|
(onClick || noop)(...args);
|
|
74
76
|
(fpOnClick || noop)(...args);
|
|
75
|
-
} :
|
|
77
|
+
} : void 0,
|
|
76
78
|
...props
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
});
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
} });
|
|
80
82
|
}
|
|
81
83
|
ActionItem.Slot = ActionItemSlot;
|
|
82
|
-
var
|
|
83
|
-
//# sourceMappingURL=index.js.map
|
|
84
|
+
var action_item_default = ActionItem;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/action-item/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { MenuGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = MenuGroup,\n\tfillProps = {},\n\tbubblesVirtually,\n\t...props\n} ) {\n\treturn (\n\t\t<Slot\n\t\t\tname={ name }\n\t\t\tbubblesVirtually={ bubblesVirtually }\n\t\t\tfillProps={ fillProps }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! Children.toArray( fills ).length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Special handling exists for backward compatibility.\n\t\t\t\t// It ensures that menu items created by plugin authors aren't\n\t\t\t\t// duplicated with automatically injected menu items coming\n\t\t\t\t// from pinnable plugin sidebars.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t\tconst initializedByPlugins = [];\n\t\t\t\tChildren.forEach(\n\t\t\t\t\tfills,\n\t\t\t\t\t( {\n\t\t\t\t\t\tprops: { __unstableExplicitMenuItem, __unstableTarget },\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tif ( __unstableTarget && __unstableExplicitMenuItem ) {\n\t\t\t\t\t\t\tinitializedByPlugins.push( __unstableTarget );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst children = Children.map( fills, ( child ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! child.props.__unstableExplicitMenuItem &&\n\t\t\t\t\t\tinitializedByPlugins.includes(\n\t\t\t\t\t\t\tchild.props.__unstableTarget\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} );\n\n\t\t\t\treturn <Component { ...props }>{ children }</Component>;\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nfunction ActionItem( { name, as: Component = Button, onClick, ...props } ) {\n\treturn (\n\t\t<Fill name={ name }>\n\t\t\t{ ( { onClick: fpOnClick } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\tonClick || fpOnClick\n\t\t\t\t\t\t\t\t? ( ...args ) => {\n\t\t\t\t\t\t\t\t\t\t( onClick || noop )( ...args );\n\t\t\t\t\t\t\t\t\t\t( fpOnClick || noop )( ...args );\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Fill>\n\t);\n}\n\nActionItem.Slot = ActionItemSlot;\n\nexport default ActionItem;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDW;AAnDX,wBAA8C;AAC9C,qBAAyB;AAEzB,MAAM,OAAO,MAAM;AAAC;AAEpB,SAAS,eAAgB;AAAA,EACxB;AAAA,EACA,IAAI,YAAY;AAAA,EAChB,YAAY,CAAC;AAAA,EACb;AAAA,EACA,GAAG;AACJ,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEE,WAAE,UAAW;AACd,YAAK,CAAE,wBAAS,QAAS,KAAM,EAAE,QAAS;AACzC,iBAAO;AAAA,QACR;AAOA,cAAM,uBAAuB,CAAC;AAC9B,gCAAS;AAAA,UACR;AAAA,UACA,CAAE;AAAA,YACD,OAAO,EAAE,4BAA4B,iBAAiB;AAAA,UACvD,MAAO;AACN,gBAAK,oBAAoB,4BAA6B;AACrD,mCAAqB,KAAM,gBAAiB;AAAA,YAC7C;AAAA,UACD;AAAA,QACD;AACA,cAAM,WAAW,wBAAS,IAAK,OAAO,CAAE,UAAW;AAClD,cACC,CAAE,MAAM,MAAM,8BACd,qBAAqB;AAAA,YACpB,MAAM,MAAM;AAAA,UACb,GACC;AACD,mBAAO;AAAA,UACR;AACA,iBAAO;AAAA,QACR,CAAE;AAEF,eAAO,4CAAC,aAAY,GAAG,OAAU,UAAU;AAAA,MAC5C;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,WAAY,EAAE,MAAM,IAAI,YAAY,0BAAQ,SAAS,GAAG,MAAM,GAAI;AAC1E,SACC,4CAAC,0BAAK,MACH,WAAE,EAAE,SAAS,UAAU,MAAO;AAC/B,WACC;AAAA,MAAC;AAAA;AAAA,QACA,SACC,WAAW,YACR,IAAK,SAAU;AACf,WAAE,WAAW,MAAQ,GAAG,IAAK;AAC7B,WAAE,aAAa,MAAQ,GAAG,IAAK;AAAA,QAC/B,IACA;AAAA,QAEF,GAAG;AAAA;AAAA,IACN;AAAA,EAEF,GACD;AAEF;AAEA,WAAW,OAAO;AAElB,IAAO,sBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|