@wordpress/interface 5.19.3 → 5.20.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 +2 -0
- package/build/components/action-item/index.js +6 -5
- package/build/components/action-item/index.js.map +1 -1
- package/build/components/complementary-area/index.js +12 -11
- package/build/components/complementary-area/index.js.map +1 -1
- package/build/components/complementary-area-header/index.js +5 -5
- package/build/components/complementary-area-header/index.js.map +1 -1
- package/build/components/complementary-area-more-menu-item/index.js +4 -4
- package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build/components/complementary-area-toggle/index.js +2 -2
- package/build/components/complementary-area-toggle/index.js.map +1 -1
- package/build/components/interface-skeleton/index.js +13 -12
- package/build/components/interface-skeleton/index.js.map +1 -1
- package/build/components/more-menu-dropdown/index.js +2 -2
- package/build/components/more-menu-dropdown/index.js.map +1 -1
- package/build/components/more-menu-feature-toggle/index.js +2 -2
- package/build/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build/components/navigable-region/index.js +2 -2
- package/build/components/navigable-region/index.js.map +1 -1
- package/build/components/pinned-items/index.js +4 -4
- package/build/components/pinned-items/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +2 -2
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal-base-option/index.js +3 -3
- package/build/components/preferences-modal-base-option/index.js.map +1 -1
- package/build/components/preferences-modal-section/index.js +5 -5
- package/build/components/preferences-modal-section/index.js.map +1 -1
- package/build/components/preferences-modal-tabs/index.js +16 -15
- package/build/components/preferences-modal-tabs/index.js.map +1 -1
- package/build-module/components/action-item/index.js +1 -1
- package/build-module/components/complementary-area/index.js +1 -1
- package/build-module/components/complementary-area-header/index.js +1 -1
- package/build-module/components/complementary-area-more-menu-item/index.js +1 -1
- package/build-module/components/complementary-area-toggle/index.js +1 -1
- package/build-module/components/interface-skeleton/index.js +1 -1
- package/build-module/components/more-menu-dropdown/index.js +1 -1
- package/build-module/components/more-menu-feature-toggle/index.js +1 -1
- package/build-module/components/navigable-region/index.js +1 -1
- package/build-module/components/pinned-items/index.js +1 -1
- package/build-module/components/preferences-modal/index.js +1 -1
- package/build-module/components/preferences-modal-base-option/index.js +1 -1
- package/build-module/components/preferences-modal-section/index.js +1 -1
- package/build-module/components/preferences-modal-tabs/index.js +1 -1
- package/build-style/style-rtl.css +1 -1
- package/build-style/style.css +1 -1
- package/package.json +13 -13
- package/src/components/complementary-area/README.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
|
+
var _element = require("@wordpress/element");
|
|
9
10
|
/**
|
|
10
11
|
* WordPress dependencies
|
|
11
12
|
*/
|
|
@@ -18,7 +19,7 @@ function ActionItemSlot({
|
|
|
18
19
|
bubblesVirtually,
|
|
19
20
|
...props
|
|
20
21
|
}) {
|
|
21
|
-
return (0,
|
|
22
|
+
return (0, _react.createElement)(_components.Slot, {
|
|
22
23
|
name: name,
|
|
23
24
|
bubblesVirtually: bubblesVirtually,
|
|
24
25
|
fillProps: fillProps
|
|
@@ -49,7 +50,7 @@ function ActionItemSlot({
|
|
|
49
50
|
}
|
|
50
51
|
return child;
|
|
51
52
|
});
|
|
52
|
-
return (0,
|
|
53
|
+
return (0, _react.createElement)(Component, {
|
|
53
54
|
...props
|
|
54
55
|
}, children);
|
|
55
56
|
});
|
|
@@ -60,12 +61,12 @@ function ActionItem({
|
|
|
60
61
|
onClick,
|
|
61
62
|
...props
|
|
62
63
|
}) {
|
|
63
|
-
return (0,
|
|
64
|
+
return (0, _react.createElement)(_components.Fill, {
|
|
64
65
|
name: name
|
|
65
66
|
}, ({
|
|
66
67
|
onClick: fpOnClick
|
|
67
68
|
}) => {
|
|
68
|
-
return (0,
|
|
69
|
+
return (0, _react.createElement)(Component, {
|
|
69
70
|
onClick: onClick || fpOnClick ? (...args) => {
|
|
70
71
|
(onClick || noop)(...args);
|
|
71
72
|
(fpOnClick || noop)(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_components","require","_element","noop","ActionItemSlot","name","as","Component","ButtonGroup","fillProps","bubblesVirtually","props","_react","createElement","Slot","fills","Children","toArray","length","initializedByPlugins","forEach","__unstableExplicitMenuItem","__unstableTarget","push","children","map","child","includes","ActionItem","Button","onClick","Fill","fpOnClick","args","undefined","_default","exports","default"],"sources":["@wordpress/interface/src/components/action-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ButtonGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = ButtonGroup,\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"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,cAAcA,CAAE;EACxBC,IAAI;EACJC,EAAE,EAAEC,SAAS,GAAGC,uBAAW;EAC3BC,SAAS,GAAG,CAAC,CAAC;EACdC,gBAAgB;EAChB,GAAGC;AACJ,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EA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A,OAAO,IAAIE,SAAS,GACjB,CAAE,GAAGC,IAAI,KAAM;QACf,CAAEH,OAAO,IAAI3B,IAAI,EAAI,GAAG8B,IAAK,CAAC;QAC9B,CAAED,SAAS,IAAI7B,IAAI,EAAI,GAAG8B,IAAK,CAAC;MAChC,CAAC,GACDC,SACH;MAAA,GACIvB;IAAK,CACV,CAAC;EAEJ,CACK,CAAC;AAET;AAEAiB,UAAU,CAACd,IAAI,GAAGV,cAAc;AAAC,IAAA+B,QAAA,GAElBP,UAAU;AAAAQ,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
12
|
var _i18n = require("@wordpress/i18n");
|
|
13
13
|
var _icons = require("@wordpress/icons");
|
|
14
|
+
var _element = require("@wordpress/element");
|
|
14
15
|
var _viewport = require("@wordpress/viewport");
|
|
15
16
|
var _complementaryAreaHeader = _interopRequireDefault(require("../complementary-area-header"));
|
|
16
17
|
var _complementaryAreaMoreMenuItem = _interopRequireDefault(require("../complementary-area-more-menu-item"));
|
|
@@ -34,7 +35,7 @@ function ComplementaryAreaSlot({
|
|
|
34
35
|
scope,
|
|
35
36
|
...props
|
|
36
37
|
}) {
|
|
37
|
-
return (0,
|
|
38
|
+
return (0, _react.createElement)(_components.Slot, {
|
|
38
39
|
name: `ComplementaryArea/${scope}`,
|
|
39
40
|
...props
|
|
40
41
|
});
|
|
@@ -45,9 +46,9 @@ function ComplementaryAreaFill({
|
|
|
45
46
|
className,
|
|
46
47
|
id
|
|
47
48
|
}) {
|
|
48
|
-
return (0,
|
|
49
|
+
return (0, _react.createElement)(_components.Fill, {
|
|
49
50
|
name: `ComplementaryArea/${scope}`
|
|
50
|
-
}, (0,
|
|
51
|
+
}, (0, _react.createElement)("div", {
|
|
51
52
|
id: id,
|
|
52
53
|
className: className
|
|
53
54
|
}, children));
|
|
@@ -145,9 +146,9 @@ function ComplementaryArea({
|
|
|
145
146
|
disableComplementaryArea(scope, identifier);
|
|
146
147
|
}
|
|
147
148
|
}, [activeArea, isActiveByDefault, scope, identifier, isSmall, enableComplementaryArea, disableComplementaryArea]);
|
|
148
|
-
return (0,
|
|
149
|
+
return (0, _react.createElement)(_react.Fragment, null, isPinnable && (0, _react.createElement)(_pinnedItems.default, {
|
|
149
150
|
scope: scope
|
|
150
|
-
}, isPinned && (0,
|
|
151
|
+
}, isPinned && (0, _react.createElement)(_complementaryAreaToggle.default, {
|
|
151
152
|
scope: scope,
|
|
152
153
|
identifier: identifier,
|
|
153
154
|
isPressed: isActive && (!showIconLabels || isLarge),
|
|
@@ -157,15 +158,15 @@ function ComplementaryArea({
|
|
|
157
158
|
icon: showIconLabels ? _icons.check : icon,
|
|
158
159
|
showTooltip: !showIconLabels,
|
|
159
160
|
variant: showIconLabels ? 'tertiary' : undefined
|
|
160
|
-
})), name && isPinnable && (0,
|
|
161
|
+
})), name && isPinnable && (0, _react.createElement)(_complementaryAreaMoreMenuItem.default, {
|
|
161
162
|
target: name,
|
|
162
163
|
scope: scope,
|
|
163
164
|
icon: icon
|
|
164
|
-
}, title), isActive && (0,
|
|
165
|
+
}, title), isActive && (0, _react.createElement)(ComplementaryAreaFill, {
|
|
165
166
|
className: (0, _classnames.default)('interface-complementary-area', className),
|
|
166
167
|
scope: scope,
|
|
167
168
|
id: identifier.replace('/', ':')
|
|
168
|
-
}, (0,
|
|
169
|
+
}, (0, _react.createElement)(_complementaryAreaHeader.default, {
|
|
169
170
|
className: headerClassName,
|
|
170
171
|
closeLabel: closeLabel,
|
|
171
172
|
onClose: () => disableComplementaryArea(scope),
|
|
@@ -176,14 +177,14 @@ function ComplementaryArea({
|
|
|
176
177
|
scope,
|
|
177
178
|
identifier
|
|
178
179
|
}
|
|
179
|
-
}, header || (0,
|
|
180
|
+
}, header || (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("strong", null, title), isPinnable && (0, _react.createElement)(_components.Button, {
|
|
180
181
|
className: "interface-complementary-area__pin-unpin-item",
|
|
181
182
|
icon: isPinned ? _icons.starFilled : _icons.starEmpty,
|
|
182
183
|
label: isPinned ? (0, _i18n.__)('Unpin from toolbar') : (0, _i18n.__)('Pin to toolbar'),
|
|
183
184
|
onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier),
|
|
184
185
|
isPressed: isPinned,
|
|
185
186
|
"aria-expanded": isPinned
|
|
186
|
-
}))), (0,
|
|
187
|
+
}))), (0, _react.createElement)(_components.Panel, {
|
|
187
188
|
className: panelClassName
|
|
188
189
|
}, children)));
|
|
189
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_components","_data","_i18n","_icons","_viewport","_complementaryAreaHeader","_complementaryAreaMoreMenuItem","_complementaryAreaToggle","_complementaryAreaContext","_pinnedItems","_store","ComplementaryAreaSlot","scope","props","createElement","Slot","name","ComplementaryAreaFill","children","className","id","Fill","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","useRef","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","useDispatch","interfaceStore","useEffect","current","ComplementaryArea","closeLabel","__","header","headerClassName","icon","isPinnable","panelClassName","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","useSelect","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","viewportStore","isViewportMatch","pinItem","unpinItem","undefined","Fragment","default","isPressed","label","check","showTooltip","variant","target","classnames","replace","onClose","toggleButtonProps","shortcut","Button","starFilled","starEmpty","onClick","Panel","ComplementaryAreaWrapped","withComplementaryAreaContext","_default","exports"],"sources":["@wordpress/interface/src/components/complementary-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Panel, Slot, Fill } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nfunction ComplementaryAreaFill( { scope, children, className, id } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div id={ id } className={ className }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmall.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmall.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n\tshowIconLabels = false,\n} ) {\n\tconst { isLoading, isActive, isPinned, activeArea, isSmall, isLarge } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\t\tisItemPinned,\n\t\t\t\t} = select( interfaceStore );\n\n\t\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\t\treturn {\n\t\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\t\tactiveArea: _activeArea,\n\t\t\t\t\tisSmall:\n\t\t\t\t\t\tselect( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ identifier, scope ]\n\t\t);\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t{ isActive && (\n\t\t\t\t<ComplementaryAreaFill\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'interface-complementary-area',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\tid={ identifier.replace( '/', ':' ) }\n\t\t\t\t>\n\t\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tidentifier,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<strong>{ title }</strong>\n\t\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisPinned ? starFilled : starEmpty\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t\t</ComplementaryAreaFill>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n"],"mappings":";;;;;;;AAYA,IAAAA,QAAA,GAAAC,OAAA;AATA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,wBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,8BAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,wBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,yBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,YAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAvBA;A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AAGC,gBACxB;IACDZ,KAAK,EACJhB,QAAQ,GACL,IAAAZ,QAAE,EAAE,oBAAqB,CAAC,GAC1B,IAAAA,QAAE,EAAE,gBAAiB,CACxB;IACDyC,OAAO,EAAGA,CAAA,KACT,CAAE7B,QAAQ,GAAGW,SAAS,GAAGD,OAAO,EAC/BhD,KAAK,EACLW,UACD,CACA;IACD0C,SAAS,EAAGf,QAAU;IACtB,iBAAgBA;EAAU,CAC1B,CAED,CAEqB,CAAC,EAC1B,IAAAtD,QAAA,CAAAkB,aAAA,EAACd,WAAA,CAAAgF,KAAK;IAAC7D,SAAS,EAAGwB;EAAgB,GAAGzB,QAAiB,CACjC,CAEvB,CAAC;AAEL;AAEA,MAAM+D,wBAAwB,GAC7B,IAAAC,iCAA4B,EAAE9C,iBAAkB,CAAC;AAElD6C,wBAAwB,CAAClE,IAAI,GAAGJ,qBAAqB;AAAC,IAAAwE,QAAA,GAEvCF,wBAAwB;AAAAG,OAAA,CAAApB,OAAA,GAAAmB,QAAA"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_data","_i18n","_icons","_element","_viewport","_complementaryAreaHeader","_complementaryAreaMoreMenuItem","_complementaryAreaToggle","_complementaryAreaContext","_pinnedItems","_store","ComplementaryAreaSlot","scope","props","_react","createElement","Slot","name","ComplementaryAreaFill","children","className","id","Fill","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","useRef","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","useDispatch","interfaceStore","useEffect","current","ComplementaryArea","closeLabel","__","header","headerClassName","icon","isPinnable","panelClassName","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","useSelect","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","viewportStore","isViewportMatch","pinItem","unpinItem","undefined","Fragment","default","isPressed","label","check","showTooltip","variant","target","classnames","replace","onClose","toggleButtonProps","shortcut","Button","starFilled","starEmpty","onClick","Panel","ComplementaryAreaWrapped","withComplementaryAreaContext","_default","exports"],"sources":["@wordpress/interface/src/components/complementary-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Panel, Slot, Fill } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nfunction ComplementaryAreaFill( { scope, children, className, id } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div id={ id } className={ className }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmall.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmall.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n\tshowIconLabels = false,\n} ) {\n\tconst { isLoading, isActive, isPinned, activeArea, isSmall, isLarge } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\t\tisItemPinned,\n\t\t\t\t} = select( interfaceStore );\n\n\t\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\t\treturn {\n\t\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\t\tactiveArea: _activeArea,\n\t\t\t\t\tisSmall:\n\t\t\t\t\t\tselect( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ identifier, scope ]\n\t\t);\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t{ isActive && (\n\t\t\t\t<ComplementaryAreaFill\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'interface-complementary-area',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\tid={ identifier.replace( '/', ':' ) }\n\t\t\t\t>\n\t\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tidentifier,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<strong>{ title }</strong>\n\t\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisPinned ? starFilled : starEmpty\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t\t</ComplementaryAreaFill>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAKA,IAAAO,wBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,8BAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,wBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,yBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAA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,EAAC,8CAA8C;IACxDsB,IAAI,EACHS,QAAQ,GAAG2B,iBAAU,GAAGC,gBACxB;IACDZ,KAAK,EACJhB,QAAQ,GACL,IAAAZ,QAAE,EAAE,oBAAqB,CAAC,GAC1B,IAAAA,QAAE,EAAE,gBAAiB,CACxB;IACDyC,OAAO,EAAGA,CAAA,KACT,CAAE7B,QAAQ,GAAGW,SAAS,GAAGD,OAAO,EAC/BjD,KAAK,EACLY,UACD,CACA;IACD0C,SAAS,EAAGf,QAAU;IACtB,iBAAgBA;EAAU,CAC1B,CAED,CAEqB,CAAC,EAC1B,IAAArC,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkF,KAAK;IAAC7D,SAAS,EAAGwB;EAAgB,GAAGzB,QAAiB,CACjC,CAEvB,CAAC;AAEL;AAEA,MAAM+D,wBAAwB,GAC7B,IAAAC,iCAA4B,EAAE9C,iBAAkB,CAAC;AAElD6C,wBAAwB,CAAClE,IAAI,GAAGL,qBAAqB;AAAC,IAAAyE,QAAA,GAEvCF,wBAAwB;AAAAG,OAAA,CAAApB,OAAA,GAAAmB,QAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _icons = require("@wordpress/icons");
|
|
11
11
|
var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-area-toggle"));
|
|
@@ -27,15 +27,15 @@ const ComplementaryAreaHeader = ({
|
|
|
27
27
|
className,
|
|
28
28
|
toggleButtonProps
|
|
29
29
|
}) => {
|
|
30
|
-
const toggleButton = (0,
|
|
30
|
+
const toggleButton = (0, _react.createElement)(_complementaryAreaToggle.default, {
|
|
31
31
|
icon: _icons.closeSmall,
|
|
32
32
|
...toggleButtonProps
|
|
33
33
|
});
|
|
34
|
-
return (0,
|
|
34
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
|
|
35
35
|
className: "components-panel__header interface-complementary-area-header__small"
|
|
36
|
-
}, smallScreenTitle && (0,
|
|
36
|
+
}, smallScreenTitle && (0, _react.createElement)("span", {
|
|
37
37
|
className: "interface-complementary-area-header__small-title"
|
|
38
|
-
}, smallScreenTitle), toggleButton), (0,
|
|
38
|
+
}, smallScreenTitle), toggleButton), (0, _react.createElement)("div", {
|
|
39
39
|
className: (0, _classnames.default)('components-panel__header', 'interface-complementary-area-header', className),
|
|
40
40
|
tabIndex: -1
|
|
41
41
|
}, children, toggleButton));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_icons","_complementaryAreaToggle","ComplementaryAreaHeader","smallScreenTitle","children","className","toggleButtonProps","toggleButton","
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_icons","_complementaryAreaToggle","ComplementaryAreaHeader","smallScreenTitle","children","className","toggleButtonProps","toggleButton","_react","createElement","default","icon","closeSmall","Fragment","classnames","tabIndex","_default","exports"],"sources":["@wordpress/interface/src/components/complementary-area-header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\n\nconst ComplementaryAreaHeader = ( {\n\tsmallScreenTitle,\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"components-panel__header interface-complementary-area-header__small\">\n\t\t\t\t{ smallScreenTitle && (\n\t\t\t\t\t<span className=\"interface-complementary-area-header__small-title\">\n\t\t\t\t\t\t{ smallScreenTitle }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-panel__header',\n\t\t\t\t\t'interface-complementary-area-header',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,wBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMG,uBAAuB,GAAGA,CAAE;EACjCC,gBAAgB;EAChBC,QAAQ;EACRC,SAAS;EACTC;AACD,CAAC,KAAM;EACN,MAAMC,YAAY,GACjB,IAAAC,MAAA,CAAAC,aAAA,EAACR,wBAAA,CAAAS,OAAuB;IAACC,IAAI,EAAGC,iBAAY;IAAA,GAAMN;EAAiB,CAAI,CACvE;EACD,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAK,QAAA,QACC,IAAAL,MAAA,CAAAC,aAAA;IAAKJ,SAAS,EAAC;EAAqE,GACjFF,gBAAgB,IACjB,IAAAK,MAAA,CAAAC,aAAA;IAAMJ,SAAS,EAAC;EAAkD,GAC/DF,gBACG,CACN,EACCI,YACE,CAAC,EACN,IAAAC,MAAA,CAAAC,aAAA;IACCJ,SAAS,EAAG,IAAAS,mBAAU,EACrB,0BAA0B,EAC1B,qCAAqC,EACrCT,SACD,CAAG;IACHU,QAAQ,EAAG,CAAC;EAAG,GAEbX,QAAQ,EACRG,YACE,CACJ,CAAC;AAEL,CAAC;AAAC,IAAAS,QAAA,GAEad,uBAAuB;AAAAe,OAAA,CAAAP,OAAA,GAAAM,QAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = ComplementaryAreaMoreMenuItem;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _icons = require("@wordpress/icons");
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-area-toggle"));
|
|
@@ -25,7 +25,7 @@ const PluginsMenuItem = ({
|
|
|
25
25
|
__unstableExplicitMenuItem,
|
|
26
26
|
__unstableTarget,
|
|
27
27
|
...restProps
|
|
28
|
-
}) => (0,
|
|
28
|
+
}) => (0, _react.createElement)(_components.MenuItem, {
|
|
29
29
|
...restProps
|
|
30
30
|
});
|
|
31
31
|
function ComplementaryAreaMoreMenuItem({
|
|
@@ -34,9 +34,9 @@ function ComplementaryAreaMoreMenuItem({
|
|
|
34
34
|
__unstableExplicitMenuItem,
|
|
35
35
|
...props
|
|
36
36
|
}) {
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.createElement)(_complementaryAreaToggle.default, {
|
|
38
38
|
as: toggleProps => {
|
|
39
|
-
return (0,
|
|
39
|
+
return (0, _react.createElement)(_actionItem.default, {
|
|
40
40
|
__unstableExplicitMenuItem: __unstableExplicitMenuItem,
|
|
41
41
|
__unstableTarget: `${scope}/${target}`,
|
|
42
42
|
as: PluginsMenuItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_components","_complementaryAreaToggle","_interopRequireDefault","_actionItem","PluginsMenuItem","__unstableExplicitMenuItem","__unstableTarget","restProps","
|
|
1
|
+
{"version":3,"names":["_icons","require","_components","_complementaryAreaToggle","_interopRequireDefault","_actionItem","PluginsMenuItem","__unstableExplicitMenuItem","__unstableTarget","restProps","_react","createElement","MenuItem","ComplementaryAreaMoreMenuItem","scope","target","props","default","as","toggleProps","name","role","selectedIcon","check"],"sources":["@wordpress/interface/src/components/complementary-area-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport ActionItem from '../action-item';\n\nconst PluginsMenuItem = ( {\n\t// Menu item is marked with unstable prop for backward compatibility.\n\t// They are removed so they don't leak to DOM elements.\n\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t__unstableExplicitMenuItem,\n\t__unstableTarget,\n\t...restProps\n} ) => <MenuItem { ...restProps } />;\n\nexport default function ComplementaryAreaMoreMenuItem( {\n\tscope,\n\ttarget,\n\t__unstableExplicitMenuItem,\n\t...props\n} ) {\n\treturn (\n\t\t<ComplementaryAreaToggle\n\t\t\tas={ ( toggleProps ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ActionItem\n\t\t\t\t\t\t__unstableExplicitMenuItem={\n\t\t\t\t\t\t\t__unstableExplicitMenuItem\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableTarget={ `${ scope }/${ target }` }\n\t\t\t\t\t\tas={ PluginsMenuItem }\n\t\t\t\t\t\tname={ `${ scope }/plugin-more-menu` }\n\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tselectedIcon={ check }\n\t\t\tname={ target }\n\t\t\tscope={ scope }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,wBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAMK,eAAe,GAAGA,CAAE;EACzB;EACA;EACA;EACAC,0BAA0B;EAC1BC,gBAAgB;EAChB,GAAGC;AACJ,CAAC,KAAM,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,QAAQ;EAAA,GAAMH;AAAS,CAAI,CAAC;AAErB,SAASI,6BAA6BA,CAAE;EACtDC,KAAK;EACLC,MAAM;EACNR,0BAA0B;EAC1B,GAAGS;AACJ,CAAC,EAAG;EACH,OACC,IAAAN,MAAA,CAAAC,aAAA,EAACR,wBAAA,CAAAc,OAAuB;IACvBC,EAAE,EAAKC,WAAW,IAAM;MACvB,OACC,IAAAT,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAY,OAAU;QACVV,0BAA0B,EACzBA,0BACA;QACDC,gBAAgB,EAAI,GAAGM,KAAO,IAAIC,MAAQ,EAAG;QAC7CG,EAAE,EAAGZ,eAAiB;QACtBc,IAAI,EAAI,GAAGN,KAAO,mBAAoB;QAAA,GACjCK;MAAW,CAChB,CAAC;IAEJ,CAAG;IACHE,IAAI,EAAC,kBAAkB;IACvBC,YAAY,EAAGC,YAAO;IACtBH,IAAI,EAAGL,MAAQ;IACfD,KAAK,EAAGA,KAAO;IAAA,GACVE;EAAK,CACV,CAAC;AAEJ"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _store = require("../../store");
|
|
@@ -33,7 +33,7 @@ function ComplementaryAreaToggle({
|
|
|
33
33
|
enableComplementaryArea,
|
|
34
34
|
disableComplementaryArea
|
|
35
35
|
} = (0, _data.useDispatch)(_store.store);
|
|
36
|
-
return (0,
|
|
36
|
+
return (0, _react.createElement)(ComponentToUse, {
|
|
37
37
|
icon: selectedIcon && isSelected ? selectedIcon : icon,
|
|
38
38
|
"aria-controls": identifier.replace('/', ':'),
|
|
39
39
|
onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_store","_complementaryAreaContext","_interopRequireDefault","ComplementaryAreaToggle","as","Button","scope","identifier","icon","selectedIcon","name","props","ComponentToUse","isSelected","useSelect","select","interfaceStore","getActiveComplementaryArea","enableComplementaryArea","disableComplementaryArea","useDispatch","
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_store","_complementaryAreaContext","_interopRequireDefault","ComplementaryAreaToggle","as","Button","scope","identifier","icon","selectedIcon","name","props","ComponentToUse","isSelected","useSelect","select","interfaceStore","getActiveComplementaryArea","enableComplementaryArea","disableComplementaryArea","useDispatch","_react","createElement","replace","onClick","_default","complementaryAreaContext","exports","default"],"sources":["@wordpress/interface/src/components/complementary-area-toggle/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\nimport complementaryAreaContext from '../complementary-area-context';\n\nfunction ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier,\n\ticon,\n\tselectedIcon,\n\tname,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier, scope ]\n\t);\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\n\t\t\taria-controls={ identifier.replace( '/', ':' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tif ( isSelected ) {\n\t\t\t\t\tdisableComplementaryArea( scope );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( scope, identifier );\n\t\t\t\t}\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default complementaryAreaCont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6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
10
11
|
var _components = require("@wordpress/components");
|
|
11
12
|
var _i18n = require("@wordpress/i18n");
|
|
12
13
|
var _compose = require("@wordpress/compose");
|
|
@@ -92,13 +93,13 @@ function InterfaceSkeleton({
|
|
|
92
93
|
...defaultLabels,
|
|
93
94
|
...labels
|
|
94
95
|
};
|
|
95
|
-
return (0,
|
|
96
|
+
return (0, _react.createElement)("div", {
|
|
96
97
|
...(enableRegionNavigation ? navigateRegionsProps : {}),
|
|
97
98
|
ref: (0, _compose.useMergeRefs)([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
|
|
98
99
|
className: (0, _classnames.default)(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer')
|
|
99
|
-
}, (0,
|
|
100
|
+
}, (0, _react.createElement)("div", {
|
|
100
101
|
className: "interface-interface-skeleton__editor"
|
|
101
|
-
}, !!header && (0,
|
|
102
|
+
}, !!header && (0, _react.createElement)(_navigableRegion.default, {
|
|
102
103
|
as: _components.__unstableMotion.div,
|
|
103
104
|
className: "interface-interface-skeleton__header",
|
|
104
105
|
"aria-label": mergedLabels.header,
|
|
@@ -110,26 +111,26 @@ function InterfaceSkeleton({
|
|
|
110
111
|
type: 'tween',
|
|
111
112
|
delay: 0.8
|
|
112
113
|
} : undefined
|
|
113
|
-
}, header), isDistractionFree && (0,
|
|
114
|
+
}, header), isDistractionFree && (0, _react.createElement)("div", {
|
|
114
115
|
className: "interface-interface-skeleton__header"
|
|
115
|
-
}, editorNotices), (0,
|
|
116
|
+
}, editorNotices), (0, _react.createElement)("div", {
|
|
116
117
|
className: "interface-interface-skeleton__body"
|
|
117
|
-
}, !!secondarySidebar && (0,
|
|
118
|
+
}, !!secondarySidebar && (0, _react.createElement)(_navigableRegion.default, {
|
|
118
119
|
className: "interface-interface-skeleton__secondary-sidebar",
|
|
119
120
|
ariaLabel: mergedLabels.secondarySidebar
|
|
120
|
-
}, secondarySidebar), !!notices && (0,
|
|
121
|
+
}, secondarySidebar), !!notices && (0, _react.createElement)("div", {
|
|
121
122
|
className: "interface-interface-skeleton__notices"
|
|
122
|
-
}, notices), (0,
|
|
123
|
+
}, notices), (0, _react.createElement)(_navigableRegion.default, {
|
|
123
124
|
className: "interface-interface-skeleton__content",
|
|
124
125
|
ariaLabel: mergedLabels.body,
|
|
125
126
|
...contentProps
|
|
126
|
-
}, content), !!sidebar && (0,
|
|
127
|
+
}, content), !!sidebar && (0, _react.createElement)(_navigableRegion.default, {
|
|
127
128
|
className: "interface-interface-skeleton__sidebar",
|
|
128
129
|
ariaLabel: mergedLabels.sidebar
|
|
129
|
-
}, sidebar), !!actions && (0,
|
|
130
|
+
}, sidebar), !!actions && (0, _react.createElement)(_navigableRegion.default, {
|
|
130
131
|
className: "interface-interface-skeleton__actions",
|
|
131
132
|
ariaLabel: mergedLabels.actions
|
|
132
|
-
}, actions))), !!footer && (0,
|
|
133
|
+
}, actions))), !!footer && (0, _react.createElement)(_navigableRegion.default, {
|
|
133
134
|
className: "interface-interface-skeleton__footer",
|
|
134
135
|
ariaLabel: mergedLabels.footer
|
|
135
136
|
}, footer));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_components","_i18n","_compose","_navigableRegion","useHTMLClass","className","useEffect","element","document","querySelector","classList","toggle","headerVariants","hidden","opacity","hover","transition","type","delay","delayChildren","distractionFreeInactive","InterfaceSkeleton","isDistractionFree","footer","header","editorNotices","sidebar","secondarySidebar","notices","content","contentProps","actions","labels","enableRegionNavigation","shortcuts","ref","navigateRegionsProps","useNavigateRegions","defaultLabels","__","body","mergedLabels","_react","createElement","useMergeRefs","undefined","classnames","default","as","motion","div","initial","whileHover","animate","variants","ariaLabel","_default","forwardRef","exports"],"sources":["@wordpress/interface/src/components/interface-skeleton/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\t__unstableUseNavigateRegions as useNavigateRegions,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NavigableRegion from '../navigable-region';\n\nfunction useHTMLClass( className ) {\n\tuseEffect( () => {\n\t\tconst element =\n\t\t\tdocument && document.querySelector( `html:not(.${ className })` );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\t\telement.classList.toggle( className );\n\t\treturn () => {\n\t\t\telement.classList.toggle( className );\n\t\t};\n\t}, [ className ] );\n}\n\nconst headerVariants = {\n\thidden: { opacity: 0 },\n\thover: {\n\t\topacity: 1,\n\t\ttransition: { type: 'tween', delay: 0.2, delayChildren: 0.2 },\n\t},\n\tdistractionFreeInactive: { opacity: 1, transition: { delay: 0 } },\n};\n\nfunction InterfaceSkeleton(\n\t{\n\t\tisDistractionFree,\n\t\tfooter,\n\t\theader,\n\t\teditorNotices,\n\t\tsidebar,\n\t\tsecondarySidebar,\n\t\tnotices,\n\t\tcontent,\n\t\tcontentProps,\n\t\tactions,\n\t\tlabels,\n\t\tclassName,\n\t\tenableRegionNavigation = true,\n\t\t// Todo: does this need to be a prop.\n\t\t// Can we use a dependency to keyboard-shortcuts directly?\n\t\tshortcuts,\n\t},\n\tref\n) {\n\tconst navigateRegionsProps = useNavigateRegions( shortcuts );\n\n\tuseHTMLClass( 'interface-interface-skeleton__html-container' );\n\n\tconst defaultLabels = {\n\t\t/* translators: accessibility text for the top bar landmark region. */\n\t\theader: __( 'Header' ),\n\t\t/* translators: accessibility text for the content landmark region. */\n\t\tbody: __( 'Content' ),\n\t\t/* translators: accessibility text for the secondary sidebar landmark region. */\n\t\tsecondarySidebar: __( 'Block Library' ),\n\t\t/* translators: accessibility text for the settings landmark region. */\n\t\tsidebar: __( 'Settings' ),\n\t\t/* translators: accessibility text for the publish landmark region. */\n\t\tactions: __( 'Publish' ),\n\t\t/* translators: accessibility text for the footer landmark region. */\n\t\tfooter: __( 'Footer' ),\n\t};\n\n\tconst mergedLabels = { ...defaultLabels, ...labels };\n\n\treturn (\n\t\t<div\n\t\t\t{ ...( enableRegionNavigation ? navigateRegionsProps : {} ) }\n\t\t\tref={ useMergeRefs( [\n\t\t\t\tref,\n\t\t\t\tenableRegionNavigation ? navigateRegionsProps.ref : undefined,\n\t\t\t] ) }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'interface-interface-skeleton',\n\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t!! footer && 'has-footer'\n\t\t\t) }\n\t\t>\n\t\t\t<div className=\"interface-interface-skeleton__editor\">\n\t\t\t\t{ !! header && (\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__header\"\n\t\t\t\t\t\taria-label={ mergedLabels.header }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hidden'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hidden'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvariants={ headerVariants }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? { type: 'tween', delay: 0.8 }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t) }\n\t\t\t\t{ isDistractionFree && (\n\t\t\t\t\t<div className=\"interface-interface-skeleton__header\">\n\t\t\t\t\t\t{ editorNotices }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"interface-interface-skeleton__body\">\n\t\t\t\t\t{ !! secondarySidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__secondary-sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.secondarySidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ secondarySidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! notices && (\n\t\t\t\t\t\t<div className=\"interface-interface-skeleton__notices\">\n\t\t\t\t\t\t\t{ notices }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__content\"\n\t\t\t\t\t\tariaLabel={ mergedLabels.body }\n\t\t\t\t\t\t{ ...contentProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ content }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t{ !! sidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.sidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! actions && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__actions\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.actions }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ !! footer && (\n\t\t\t\t<NavigableRegion\n\t\t\t\t\tclassName=\"interface-interface-skeleton__footer\"\n\t\t\t\t\tariaLabel={ mergedLabels.footer }\n\t\t\t\t>\n\t\t\t\t\t{ footer }\n\t\t\t\t</NavigableRegion>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InterfaceSkeleton );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,gBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASM,YAAYA,CAAEC,SAAS,EAAG;EAClC,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,OAAO,GACZC,QAAQ,IAAIA,QAAQ,CAACC,aAAa,CAAG,aAAaJ,SAAW,GAAG,CAAC;IAClE,IAAK,CAAEE,OAAO,EAAG;MAChB;IACD;IACAA,OAAO,CAACG,SAAS,CAACC,MAAM,CAAEN,SAAU,CAAC;IACrC,OAAO,MAAM;MACZE,OAAO,CAACG,SAAS,CAACC,MAAM,CAAEN,SAAU,CAAC;IACtC,CAAC;EACF,CAAC,EAAE,CAAEA,SAAS,CAAG,CAAC;AACnB;AAEA,MAAMO,cAAc,GAAG;EACtBC,MAAM,EAAE;IAAEC,OAAO,EAAE;EAAE,CAAC;EACtBC,KAAK,EAAE;IACND,OAAO,EAAE,CAAC;IACVE,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEC,KAAK,EAAE,GAAG;MAAEC,aAAa,EAAE;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IAAAgB,MAAA,CAAAC,aAAA,EAACxC,gBAAA,CAAA4C,OAAe;IACf1C,SAAS,EAAC,uCAAuC;IACjDkD,SAAS,EAAGd,YAAY,CAACf;EAAS,GAEhCA,OACc,CACjB,EACC,CAAC,CAAEK,OAAO,IACX,IAAAW,MAAA,CAAAC,aAAA,EAACxC,gBAAA,CAAA4C,OAAe;IACf1C,SAAS,EAAC,uCAAuC;IACjDkD,SAAS,EAAGd,YAAY,CAACV;EAAS,GAEhCA,OACc,CAEd,CACD,CAAC,EACJ,CAAC,CAAER,MAAM,IACV,IAAAmB,MAAA,CAAAC,aAAA,EAACxC,gBAAA,CAAA4C,OAAe;IACf1C,SAAS,EAAC,sCAAsC;IAChDkD,SAAS,EAAGd,YAAY,CAAClB;EAAQ,GAE/BA,MACc,CAEd,CAAC;AAER;AAAC,IAAAiC,QAAA,GAEc,IAAAC,mBAAU,EAAEpC,iBAAkB,CAAC;AAAAqC,OAAA,CAAAX,OAAA,GAAAS,QAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = MoreMenuDropdown;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -27,7 +27,7 @@ function MoreMenuDropdown({
|
|
|
27
27
|
toggleProps,
|
|
28
28
|
children
|
|
29
29
|
}) {
|
|
30
|
-
return (0,
|
|
30
|
+
return (0, _react.createElement)(DropdownComponent, {
|
|
31
31
|
className: (0, _classnames.default)('interface-more-menu-dropdown', className),
|
|
32
32
|
icon: _icons.moreVertical,
|
|
33
33
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_i18n","_icons","MoreMenuDropdown","as","DropdownComponent","DropdownMenu","className","label","__","popoverProps","toggleProps","children","
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_i18n","_icons","MoreMenuDropdown","as","DropdownComponent","DropdownMenu","className","label","__","popoverProps","toggleProps","children","_react","createElement","classnames","icon","moreVertical","placement","tooltipPosition","onClose"],"sources":["@wordpress/interface/src/components/more-menu-dropdown/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DropdownMenu } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\n\nexport default function MoreMenuDropdown( {\n\tas: DropdownComponent = DropdownMenu,\n\tclassName,\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tlabel = __( 'Options' ),\n\tpopoverProps,\n\ttoggleProps,\n\tchildren,\n} ) {\n\treturn (\n\t\t<DropdownComponent\n\t\t\tclassName={ classnames(\n\t\t\t\t'interface-more-menu-dropdown',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ label }\n\t\t\tpopoverProps={ {\n\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t...popoverProps,\n\t\t\t\tclassName: classnames(\n\t\t\t\t\t'interface-more-menu-dropdown__content',\n\t\t\t\t\tpopoverProps?.className\n\t\t\t\t),\n\t\t\t} }\n\t\t\ttoggleProps={ {\n\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t...toggleProps,\n\t\t\t} }\n\t\t>\n\t\t\t{ ( onClose ) => children( onClose ) }\n\t\t</DropdownComponent>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAKe,SAASI,gBAAgBA,CAAE;EACzCC,EAAE,EAAEC,iBAAiB,GAAGC,wBAAY;EACpCC,SAAS;EACT;EACAC,KAAK,GAAG,IAAAC,QAAE,EAAE,SAAU,CAAC;EACvBC,YAAY;EACZC,WAAW;EACXC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,iBAAiB;IACjBE,SAAS,EAAG,IAAAQ,mBAAU,EACrB,8BAA8B,EAC9BR,SACD,CAAG;IACHS,IAAI,EAAGC,mBAAc;IACrBT,KAAK,EAAGA,KAAO;IACfE,YAAY,EAAG;MACdQ,SAAS,EAAE,YAAY;MACvB,GAAGR,YAAY;MACfH,SAAS,EAAE,IAAAQ,mBAAU,EACpB,uCAAuC,EACvCL,YAAY,EAAEH,SACf;IACD,CAAG;IACHI,WAAW,EAAG;MACbQ,eAAe,EAAE,QAAQ;MACzB,GAAGR;IACJ;EAAG,GAECS,OAAO,IAAMR,QAAQ,CAAEQ,OAAQ,CACjB,CAAC;AAEtB"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = MoreMenuFeatureToggle;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _data = require("@wordpress/data");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -39,7 +39,7 @@ function MoreMenuFeatureToggle({
|
|
|
39
39
|
(0, _a11y.speak)(messageActivated || (0, _i18n.__)('Feature activated'));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (0,
|
|
42
|
+
return (0, _react.createElement)(_components.MenuItem, {
|
|
43
43
|
icon: isActive && _icons.check,
|
|
44
44
|
isSelected: isActive,
|
|
45
45
|
onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_components","_i18n","_icons","_a11y","_store","MoreMenuFeatureToggle","scope","label","info","messageActivated","messageDeactivated","shortcut","feature","isActive","useSelect","select","interfaceStore","isFeatureActive","toggleFeature","useDispatch","speakMessage","speak","__","
|
|
1
|
+
{"version":3,"names":["_data","require","_components","_i18n","_icons","_a11y","_store","MoreMenuFeatureToggle","scope","label","info","messageActivated","messageDeactivated","shortcut","feature","isActive","useSelect","select","interfaceStore","isFeatureActive","toggleFeature","useDispatch","speakMessage","speak","__","_react","createElement","MenuItem","icon","check","isSelected","onClick","role"],"sources":["@wordpress/interface/src/components/more-menu-feature-toggle/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\n\nexport default function MoreMenuFeatureToggle( {\n\tscope,\n\tlabel,\n\tinfo,\n\tmessageActivated,\n\tmessageDeactivated,\n\tshortcut,\n\tfeature,\n} ) {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isFeatureActive( scope, feature ),\n\t\t[ feature, scope ]\n\t);\n\tconst { toggleFeature } = useDispatch( interfaceStore );\n\tconst speakMessage = () => {\n\t\tif ( isActive ) {\n\t\t\tspeak( messageDeactivated || __( 'Feature deactivated' ) );\n\t\t} else {\n\t\t\tspeak( messageActivated || __( 'Feature activated' ) );\n\t\t}\n\t};\n\n\treturn (\n\t\t<MenuItem\n\t\t\ticon={ isActive && check }\n\t\t\tisSelected={ isActive }\n\t\t\tonClick={ () => {\n\t\t\t\ttoggleFeature( scope, feature );\n\t\t\t\tspeakMessage();\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tinfo={ info }\n\t\t\tshortcut={ shortcut }\n\t\t>\n\t\t\t{ label }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WA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
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = NavigableRegion;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
/**
|
|
11
11
|
* External dependencies
|
|
@@ -18,7 +18,7 @@ function NavigableRegion({
|
|
|
18
18
|
as: Tag = 'div',
|
|
19
19
|
...props
|
|
20
20
|
}) {
|
|
21
|
-
return (0,
|
|
21
|
+
return (0, _react.createElement)(Tag, {
|
|
22
22
|
className: (0, _classnames.default)('interface-navigable-region', className),
|
|
23
23
|
"aria-label": ariaLabel,
|
|
24
24
|
role: "region",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","NavigableRegion","children","className","ariaLabel","as","Tag","props","
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","NavigableRegion","children","className","ariaLabel","as","Tag","props","_react","createElement","classnames","role","tabIndex"],"sources":["@wordpress/interface/src/components/navigable-region/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nexport default function NavigableRegion( {\n\tchildren,\n\tclassName,\n\tariaLabel,\n\tas: Tag = 'div',\n\t...props\n} ) {\n\treturn (\n\t\t<Tag\n\t\t\tclassName={ classnames( 'interface-navigable-region', className ) }\n\t\t\taria-label={ ariaLabel }\n\t\t\trole=\"region\"\n\t\t\ttabIndex=\"-1\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Tag>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,eAAeA,CAAE;EACxCC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,EAAE,EAAEC,GAAG,GAAG,KAAK;EACf,GAAGC;AACJ,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,GAAG;IACHH,SAAS,EAAG,IAAAO,mBAAU,EAAE,4BAA4B,EAAEP,SAAU,CAAG;IACnE,cAAaC,SAAW;IACxBO,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAC,IAAI;IAAA,GACRL;EAAK,GAERL,QACE,CAAC;AAER"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
/**
|
|
@@ -20,7 +20,7 @@ function PinnedItems({
|
|
|
20
20
|
scope,
|
|
21
21
|
...props
|
|
22
22
|
}) {
|
|
23
|
-
return (0,
|
|
23
|
+
return (0, _react.createElement)(_components.Fill, {
|
|
24
24
|
name: `PinnedItems/${scope}`,
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
@@ -30,10 +30,10 @@ function PinnedItemsSlot({
|
|
|
30
30
|
className,
|
|
31
31
|
...props
|
|
32
32
|
}) {
|
|
33
|
-
return (0,
|
|
33
|
+
return (0, _react.createElement)(_components.Slot, {
|
|
34
34
|
name: `PinnedItems/${scope}`,
|
|
35
35
|
...props
|
|
36
|
-
}, fills => fills?.length > 0 && (0,
|
|
36
|
+
}, fills => fills?.length > 0 && (0, _react.createElement)("div", {
|
|
37
37
|
className: (0, _classnames.default)(className, 'interface-pinned-items')
|
|
38
38
|
}, fills));
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","PinnedItems","scope","props","
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","PinnedItems","scope","props","_react","createElement","Fill","name","PinnedItemsSlot","className","Slot","fills","length","classnames","_default","exports","default"],"sources":["@wordpress/interface/src/components/pinned-items/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Slot, Fill } from '@wordpress/components';\n\nfunction PinnedItems( { scope, ...props } ) {\n\treturn <Fill name={ `PinnedItems/${ scope }` } { ...props } />;\n}\n\nfunction PinnedItemsSlot( { scope, className, ...props } ) {\n\treturn (\n\t\t<Slot name={ `PinnedItems/${ scope }` } { ...props }>\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t'interface-pinned-items'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t</Slot>\n\t);\n}\n\nPinnedItems.Slot = PinnedItemsSlot;\n\nexport default PinnedItems;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASE,WAAWA,CAAE;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC3C,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,IAAI;IAACC,IAAI,EAAI,eAAeL,KAAO,EAAG;IAAA,GAAMC;EAAK,CAAI,CAAC;AAC/D;AAEA,SAASK,eAAeA,CAAE;EAAEN,KAAK;EAAEO,SAAS;EAAE,GAAGN;AAAM,CAAC,EAAG;EAC1D,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAU,IAAI;IAACH,IAAI,EAAI,eAAeL,KAAO,EAAG;IAAA,GAAMC;EAAK,GAC7CQ,KAAK,IACRA,KAAK,EAAEC,MAAM,GAAG,CAAC,IAChB,IAAAR,MAAA,CAAAC,aAAA;IACCI,SAAS,EAAG,IAAAI,mBAAU,EACrBJ,SAAS,EACT,wBACD;EAAG,GAEDE,KACE,CAGF,CAAC;AAET;AAEAV,WAAW,CAACS,IAAI,GAAGF,eAAe;AAAC,IAAAM,QAAA,GAEpBb,WAAW;AAAAc,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PreferencesModal;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
/**
|
|
@@ -15,7 +15,7 @@ function PreferencesModal({
|
|
|
15
15
|
closeModal,
|
|
16
16
|
children
|
|
17
17
|
}) {
|
|
18
|
-
return (0,
|
|
18
|
+
return (0, _react.createElement)(_components.Modal, {
|
|
19
19
|
className: "interface-preferences-modal",
|
|
20
20
|
title: (0, _i18n.__)('Preferences'),
|
|
21
21
|
onRequestClose: closeModal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","PreferencesModal","closeModal","children","
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","PreferencesModal","closeModal","children","_react","createElement","Modal","className","title","__","onRequestClose"],"sources":["@wordpress/interface/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PreferencesModal( { closeModal, children } ) {\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"interface-preferences-modal\"\n\t\t\ttitle={ __( 'Preferences' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t>\n\t\t\t{ children }\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIe,SAASE,gBAAgBA,CAAE;EAAEC,UAAU;EAAEC;AAAS,CAAC,EAAG;EACpE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,WAAA,CAAAQ,KAAK;IACLC,SAAS,EAAC,6BAA6B;IACvCC,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;IAC7BC,cAAc,EAAGR;EAAY,GAE3BC,QACI,CAAC;AAEV"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
/**
|
|
10
10
|
* WordPress dependencies
|
|
@@ -17,9 +17,9 @@ function BaseOption({
|
|
|
17
17
|
onChange,
|
|
18
18
|
children
|
|
19
19
|
}) {
|
|
20
|
-
return (0,
|
|
20
|
+
return (0, _react.createElement)("div", {
|
|
21
21
|
className: "interface-preferences-modal__option"
|
|
22
|
-
}, (0,
|
|
22
|
+
}, (0, _react.createElement)(_components.ToggleControl, {
|
|
23
23
|
__nextHasNoMarginBottom: true,
|
|
24
24
|
help: help,
|
|
25
25
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","BaseOption","help","label","isChecked","onChange","children","
|
|
1
|
+
{"version":3,"names":["_components","require","BaseOption","help","label","isChecked","onChange","children","_react","createElement","className","ToggleControl","__nextHasNoMarginBottom","checked","_default","exports","default"],"sources":["@wordpress/interface/src/components/preferences-modal-base-option/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\n\nfunction BaseOption( { help, label, isChecked, onChange, children } ) {\n\treturn (\n\t\t<div className=\"interface-preferences-modal__option\">\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\thelp={ help }\n\t\t\t\tlabel={ label }\n\t\t\t\tchecked={ isChecked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default BaseOption;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAEC;AAAS,CAAC,EAAG;EACrE,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAqC,GACnD,IAAAF,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAW,aAAa;IACbC,uBAAuB;IACvBT,IAAI,EAAGA,IAAM;IACbC,KAAK,EAAGA,KAAO;IACfS,OAAO,EAAGR,SAAW;IACrBC,QAAQ,EAAGA;EAAU,CACrB,CAAC,EACAC,QACE,CAAC;AAER;AAAC,IAAAO,QAAA,GAEcZ,UAAU;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -4,18 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
const Section = ({
|
|
9
9
|
description,
|
|
10
10
|
title,
|
|
11
11
|
children
|
|
12
|
-
}) => (0,
|
|
12
|
+
}) => (0, _react.createElement)("fieldset", {
|
|
13
13
|
className: "interface-preferences-modal__section"
|
|
14
|
-
}, (0,
|
|
14
|
+
}, (0, _react.createElement)("legend", {
|
|
15
15
|
className: "interface-preferences-modal__section-legend"
|
|
16
|
-
}, (0,
|
|
16
|
+
}, (0, _react.createElement)("h2", {
|
|
17
17
|
className: "interface-preferences-modal__section-title"
|
|
18
|
-
}, title), description && (0,
|
|
18
|
+
}, title), description && (0, _react.createElement)("p", {
|
|
19
19
|
className: "interface-preferences-modal__section-description"
|
|
20
20
|
}, description)), children);
|
|
21
21
|
var _default = Section;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Section","description","title","children","
|
|
1
|
+
{"version":3,"names":["Section","description","title","children","_react","createElement","className","_default","exports","default"],"sources":["@wordpress/interface/src/components/preferences-modal-section/index.js"],"sourcesContent":["const Section = ( { description, title, children } ) => (\n\t<fieldset className=\"interface-preferences-modal__section\">\n\t\t<legend className=\"interface-preferences-modal__section-legend\">\n\t\t\t<h2 className=\"interface-preferences-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"interface-preferences-modal__section-description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</legend>\n\t\t{ children }\n\t</fieldset>\n);\n\nexport default Section;\n"],"mappings":";;;;;;;AAAA,MAAMA,OAAO,GAAGA,CAAE;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAS,CAAC,KACjD,IAAAC,MAAA,CAAAC,aAAA;EAAUC,SAAS,EAAC;AAAsC,GACzD,IAAAF,MAAA,CAAAC,aAAA;EAAQC,SAAS,EAAC;AAA6C,GAC9D,IAAAF,MAAA,CAAAC,aAAA;EAAIC,SAAS,EAAC;AAA4C,GACvDJ,KACC,CAAC,EACHD,WAAW,IACZ,IAAAG,MAAA,CAAAC,aAAA;EAAGC,SAAS,EAAC;AAAkD,GAC5DL,WACA,CAEG,CAAC,EACPE,QACO,CACV;AAAC,IAAAI,QAAA,GAEaP,OAAO;AAAAQ,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PreferencesModalTabs;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _compose = require("@wordpress/compose");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
10
11
|
var _icons = require("@wordpress/icons");
|
|
11
12
|
var _i18n = require("@wordpress/i18n");
|
|
12
13
|
/**
|
|
@@ -58,7 +59,7 @@ function PreferencesModalTabs({
|
|
|
58
59
|
let modalContent;
|
|
59
60
|
// We render different components based on the viewport size.
|
|
60
61
|
if (isLargeViewport) {
|
|
61
|
-
modalContent = (0,
|
|
62
|
+
modalContent = (0, _react.createElement)(_components.TabPanel, {
|
|
62
63
|
className: "interface-preferences__tabs",
|
|
63
64
|
tabs: tabs,
|
|
64
65
|
initialTabName: activeMenu !== PREFERENCES_MENU ? activeMenu : undefined,
|
|
@@ -66,43 +67,43 @@ function PreferencesModalTabs({
|
|
|
66
67
|
orientation: "vertical"
|
|
67
68
|
}, getCurrentTab);
|
|
68
69
|
} else {
|
|
69
|
-
modalContent = (0,
|
|
70
|
+
modalContent = (0, _react.createElement)(_components.__experimentalNavigatorProvider, {
|
|
70
71
|
initialPath: "/",
|
|
71
72
|
className: "interface-preferences__provider"
|
|
72
|
-
}, (0,
|
|
73
|
+
}, (0, _react.createElement)(_components.__experimentalNavigatorScreen, {
|
|
73
74
|
path: "/"
|
|
74
|
-
}, (0,
|
|
75
|
+
}, (0, _react.createElement)(_components.Card, {
|
|
75
76
|
isBorderless: true,
|
|
76
77
|
size: "small"
|
|
77
|
-
}, (0,
|
|
78
|
-
return (0,
|
|
78
|
+
}, (0, _react.createElement)(_components.CardBody, null, (0, _react.createElement)(_components.__experimentalItemGroup, null, tabs.map(tab => {
|
|
79
|
+
return (0, _react.createElement)(_components.__experimentalNavigatorButton, {
|
|
79
80
|
key: tab.name,
|
|
80
81
|
path: tab.name,
|
|
81
82
|
as: _components.__experimentalItem,
|
|
82
83
|
isAction: true
|
|
83
|
-
}, (0,
|
|
84
|
+
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
84
85
|
justify: "space-between"
|
|
85
|
-
}, (0,
|
|
86
|
+
}, (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_components.__experimentalTruncate, null, tab.title)), (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_icons.Icon, {
|
|
86
87
|
icon: (0, _i18n.isRTL)() ? _icons.chevronLeft : _icons.chevronRight
|
|
87
88
|
}))));
|
|
88
89
|
}))))), sections.length && sections.map(section => {
|
|
89
|
-
return (0,
|
|
90
|
+
return (0, _react.createElement)(_components.__experimentalNavigatorScreen, {
|
|
90
91
|
key: `${section.name}-menu`,
|
|
91
92
|
path: section.name
|
|
92
|
-
}, (0,
|
|
93
|
+
}, (0, _react.createElement)(_components.Card, {
|
|
93
94
|
isBorderless: true,
|
|
94
95
|
size: "large"
|
|
95
|
-
}, (0,
|
|
96
|
+
}, (0, _react.createElement)(_components.CardHeader, {
|
|
96
97
|
isBorderless: false,
|
|
97
98
|
justify: "left",
|
|
98
99
|
size: "small",
|
|
99
100
|
gap: "6"
|
|
100
|
-
}, (0,
|
|
101
|
+
}, (0, _react.createElement)(_components.__experimentalNavigatorBackButton, {
|
|
101
102
|
icon: (0, _i18n.isRTL)() ? _icons.chevronRight : _icons.chevronLeft,
|
|
102
103
|
"aria-label": (0, _i18n.__)('Navigate to the previous view')
|
|
103
|
-
}), (0,
|
|
104
|
+
}), (0, _react.createElement)(_components.__experimentalText, {
|
|
104
105
|
size: "16"
|
|
105
|
-
}, section.tabLabel)), (0,
|
|
106
|
+
}, section.tabLabel)), (0, _react.createElement)(_components.CardBody, null, section.content)));
|
|
106
107
|
}));
|
|
107
108
|
}
|
|
108
109
|
return modalContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_compose","require","_components","_element","_icons","_i18n","PREFERENCES_MENU","PreferencesModalTabs","sections","isLargeViewport","useViewportMatch","activeMenu","setActiveMenu","useState","tabs","sectionsContentMap","useMemo","mappedTabs","length","reduce","accumulator","name","tabLabel","title","content","push","getCurrentTab","useCallback","tab","modalContent","_react","createElement","TabPanel","className","initialTabName","undefined","onSelect","orientation","__experimentalNavigatorProvider","initialPath","__experimentalNavigatorScreen","path","Card","isBorderless","size","CardBody","__experimentalItemGroup","map","__experimentalNavigatorButton","key","as","Item","isAction","__experimentalHStack","justify","FlexItem","__experimentalTruncate","Icon","icon","isRTL","chevronLeft","chevronRight","section","CardHeader","gap","__experimentalNavigatorBackButton","__","__experimentalText"],"sources":["@wordpress/interface/src/components/preferences-modal-tabs/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorBackButton as NavigatorBackButton,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\t__experimentalTruncate as Truncate,\n\tFlexItem,\n\tTabPanel,\n\tCard,\n\tCardHeader,\n\tCardBody,\n} from '@wordpress/components';\nimport { useMemo, useCallback, useState } from '@wordpress/element';\nimport { chevronLeft, chevronRight, Icon } from '@wordpress/icons';\nimport { isRTL, __ } from '@wordpress/i18n';\n\nconst PREFERENCES_MENU = 'preferences-menu';\n\nexport default function PreferencesModalTabs( { sections } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\t// This is also used to sync the two different rendered components\n\t// between small and large viewports.\n\tconst [ activeMenu, setActiveMenu ] = useState( PREFERENCES_MENU );\n\t/**\n\t * Create helper objects from `sections` for easier data handling.\n\t * `tabs` is used for creating the `TabPanel` and `sectionsContentMap`\n\t * is used for easier access to active tab's content.\n\t */\n\tconst { tabs, sectionsContentMap } = useMemo( () => {\n\t\tlet mappedTabs = {\n\t\t\ttabs: [],\n\t\t\tsectionsContentMap: {},\n\t\t};\n\t\tif ( sections.length ) {\n\t\t\tmappedTabs = sections.reduce(\n\t\t\t\t( accumulator, { name, tabLabel: title, content } ) => {\n\t\t\t\t\taccumulator.tabs.push( { name, title } );\n\t\t\t\t\taccumulator.sectionsContentMap[ name ] = content;\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ tabs: [], sectionsContentMap: {} }\n\t\t\t);\n\t\t}\n\t\treturn mappedTabs;\n\t}, [ sections ] );\n\n\tconst getCurrentTab = useCallback(\n\t\t( tab ) => sectionsContentMap[ tab.name ] || null,\n\t\t[ sectionsContentMap ]\n\t);\n\n\tlet modalContent;\n\t// We render different components based on the viewport size.\n\tif ( isLargeViewport ) {\n\t\tmodalContent = (\n\t\t\t<TabPanel\n\t\t\t\tclassName=\"interface-preferences__tabs\"\n\t\t\t\ttabs={ tabs }\n\t\t\t\tinitialTabName={\n\t\t\t\t\tactiveMenu !== PREFERENCES_MENU ? activeMenu : undefined\n\t\t\t\t}\n\t\t\t\tonSelect={ setActiveMenu }\n\t\t\t\torientation=\"vertical\"\n\t\t\t>\n\t\t\t\t{ getCurrentTab }\n\t\t\t</TabPanel>\n\t\t);\n\t} else {\n\t\tmodalContent = (\n\t\t\t<NavigatorProvider\n\t\t\t\tinitialPath=\"/\"\n\t\t\t\tclassName=\"interface-preferences__provider\"\n\t\t\t>\n\t\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t\t<Card isBorderless size=\"small\">\n\t\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\t\t\t\tpath={ tab.name }\n\t\t\t\t\t\t\t\t\t\t\tas={ Item }\n\t\t\t\t\t\t\t\t\t\t\tisAction\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Truncate>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisRTL()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? chevronLeft\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: chevronRight\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t</CardBody>\n\t\t\t\t\t</Card>\n\t\t\t\t</NavigatorScreen>\n\t\t\t\t{ sections.length &&\n\t\t\t\t\tsections.map( ( section ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<NavigatorScreen\n\t\t\t\t\t\t\t\tkey={ `${ section.name }-menu` }\n\t\t\t\t\t\t\t\tpath={ section.name }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Card isBorderless size=\"large\">\n\t\t\t\t\t\t\t\t\t<CardHeader\n\t\t\t\t\t\t\t\t\t\tisBorderless={ false }\n\t\t\t\t\t\t\t\t\t\tjustify=\"left\"\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tgap=\"6\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<NavigatorBackButton\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tisRTL()\n\t\t\t\t\t\t\t\t\t\t\t\t\t? chevronRight\n\t\t\t\t\t\t\t\t\t\t\t\t\t: chevronLeft\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Navigate to the previous view'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Text size=\"16\">\n\t\t\t\t\t\t\t\t\t\t\t{ section.tabLabel }\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t<CardBody>{ section.content }</CardBody>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t</NavigatorScreen>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t</NavigatorProvider>\n\t\t);\n\t}\n\n\treturn modalContent;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAgBA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAtBA;AACA;AACA;;AAsBA,MAAMK,gBAAgB,GAAG,kBAAkB;AAE5B,SAASC,oBAAoBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC5D,MAAMC,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;;EAEpD;EACA;EACA,MAAM,CAAEC,UAAU,EAAEC,aAAa,CAAE,GAAG,IAAAC,iBAAQ,EAAEP,gBAAiB,CAAC;EAClE;AACD;AACA;AACA;AACA;EACC,MAAM;IAAEQ,IAAI;IAAEC;EAAmB,CAAC,GAAG,IAAAC,gBAAO,EAAE,MAAM;IACnD,IAAIC,UAAU,GAAG;MAChBH,IAAI,EAAE,EAAE;MACRC,kBAAkB,EAAE,CAAC;IACtB,CAAC;IACD,IAAKP,QAAQ,CAACU,MAAM,EAAG;MACtBD,UAAU,GAA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AAC,aAAA,EAAC7B,WAAA,CAAA6D,UAAU;QACVpB,YAAY,EAAG,KAAO;QACtBW,OAAO,EAAC,MAAM;QACdV,IAAI,EAAC,OAAO;QACZoB,GAAG,EAAC;MAAG,GAEP,IAAAlC,MAAA,CAAAC,aAAA,EAAC7B,WAAA,CAAA+D,iCAAmB;QACnBP,IAAI,EACH,IAAAC,WAAK,EAAC,CAAC,GACJE,mBAAY,GACZD,kBACH;QACD,cAAa,IAAAM,QAAE,EACd,+BACD;MAAG,CACH,CAAC,EACF,IAAApC,MAAA,CAAAC,aAAA,EAAC7B,WAAA,CAAAiE,kBAAI;QAACvB,IAAI,EAAC;MAAI,GACZkB,OAAO,CAACxC,QACL,CACK,CAAC,EACb,IAAAQ,MAAA,CAAAC,aAAA,EAAC7B,WAAA,CAAA2C,QAAQ,QAAGiB,OAAO,CAACtC,OAAmB,CAClC,CACU,CAAC;IAEpB,CAAE,CACe,CACnB;EACF;EAEA,OAAOK,YAAY;AACpB"}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (min-resolution: 192dpi) {
|
|
100
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
package/build-style/style.css
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (min-resolution: 192dpi) {
|
|
100
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/interface",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.0",
|
|
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.43.0",
|
|
36
|
+
"@wordpress/components": "^25.9.0",
|
|
37
|
+
"@wordpress/compose": "^6.20.0",
|
|
38
|
+
"@wordpress/data": "^9.13.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.43.0",
|
|
40
|
+
"@wordpress/element": "^5.20.0",
|
|
41
|
+
"@wordpress/i18n": "^4.43.0",
|
|
42
|
+
"@wordpress/icons": "^9.34.0",
|
|
43
|
+
"@wordpress/plugins": "^6.11.0",
|
|
44
|
+
"@wordpress/preferences": "^3.20.0",
|
|
45
|
+
"@wordpress/viewport": "^5.20.0",
|
|
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": "9b8e598c5418d38fe72197c24ef1d3dd6c712151"
|
|
56
56
|
}
|