@wordpress/interface 5.11.0 → 5.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/action-item/index.js +31 -38
- package/build/components/action-item/index.js.map +1 -1
- package/build/components/complementary-area/index.js +30 -34
- package/build/components/complementary-area/index.js.map +1 -1
- package/build/components/complementary-area-header/index.js +10 -12
- package/build/components/complementary-area-header/index.js.map +1 -1
- package/build/components/complementary-area-more-menu-item/index.js +24 -27
- package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build/components/complementary-area-toggle/index.js +13 -15
- package/build/components/complementary-area-toggle/index.js.map +1 -1
- package/build/components/fullscreen-mode/index.js +3 -4
- package/build/components/fullscreen-mode/index.js.map +1 -1
- package/build/components/interface-skeleton/index.js +32 -33
- package/build/components/interface-skeleton/index.js.map +1 -1
- package/build/components/more-menu-dropdown/index.js +11 -12
- package/build/components/more-menu-dropdown/index.js.map +1 -1
- package/build/components/more-menu-feature-toggle/index.js +9 -10
- package/build/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build/components/navigable-region/index.js +11 -13
- package/build/components/navigable-region/index.js.map +1 -1
- package/build/components/pinned-items/index.js +15 -17
- package/build/components/pinned-items/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +4 -5
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal-base-option/index.js +7 -8
- package/build/components/preferences-modal-base-option/index.js.map +1 -1
- package/build/components/preferences-modal-section/index.js +13 -16
- package/build/components/preferences-modal-section/index.js.map +1 -1
- package/build/components/preferences-modal-tabs/index.js +8 -10
- package/build/components/preferences-modal-tabs/index.js.map +1 -1
- package/build/store/actions.js +23 -33
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +1 -4
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +3 -7
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/action-item/index.js +31 -35
- package/build-module/components/action-item/index.js.map +1 -1
- package/build-module/components/complementary-area/index.js +30 -33
- package/build-module/components/complementary-area/index.js.map +1 -1
- package/build-module/components/complementary-area-header/index.js +10 -11
- package/build-module/components/complementary-area-header/index.js.map +1 -1
- package/build-module/components/complementary-area-more-menu-item/index.js +23 -25
- package/build-module/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build-module/components/complementary-area-toggle/index.js +13 -14
- package/build-module/components/complementary-area-toggle/index.js.map +1 -1
- package/build-module/components/fullscreen-mode/index.js +3 -4
- package/build-module/components/fullscreen-mode/index.js.map +1 -1
- package/build-module/components/interface-skeleton/index.js +32 -32
- package/build-module/components/interface-skeleton/index.js.map +1 -1
- package/build-module/components/more-menu-dropdown/index.js +10 -11
- package/build-module/components/more-menu-dropdown/index.js.map +1 -1
- package/build-module/components/more-menu-feature-toggle/index.js +9 -10
- package/build-module/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build-module/components/navigable-region/index.js +11 -12
- package/build-module/components/navigable-region/index.js.map +1 -1
- package/build-module/components/pinned-items/index.js +15 -16
- package/build-module/components/pinned-items/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal-base-option/index.js +7 -8
- package/build-module/components/preferences-modal-base-option/index.js.map +1 -1
- package/build-module/components/preferences-modal-section/index.js +13 -16
- package/build-module/components/preferences-modal-section/index.js.map +1 -1
- package/build-module/components/preferences-modal-tabs/index.js +8 -10
- package/build-module/components/preferences-modal-tabs/index.js.map +1 -1
- package/build-module/store/actions.js +23 -33
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +1 -4
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +3 -7
- package/build-module/store/selectors.js.map +1 -1
- package/package.json +13 -13
- package/src/components/interface-skeleton/index.js +23 -13
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -34,24 +33,23 @@ function useHTMLClass(className) {
|
|
|
34
33
|
}, [className]);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
function InterfaceSkeleton(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} = _ref;
|
|
36
|
+
function InterfaceSkeleton({
|
|
37
|
+
isDistractionFree,
|
|
38
|
+
footer,
|
|
39
|
+
header,
|
|
40
|
+
editorNotices,
|
|
41
|
+
sidebar,
|
|
42
|
+
secondarySidebar,
|
|
43
|
+
notices,
|
|
44
|
+
content,
|
|
45
|
+
actions,
|
|
46
|
+
labels,
|
|
47
|
+
className,
|
|
48
|
+
enableRegionNavigation = true,
|
|
49
|
+
// Todo: does this need to be a prop.
|
|
50
|
+
// Can we use a dependency to keyboard-shortcuts directly?
|
|
51
|
+
shortcuts
|
|
52
|
+
}, ref) {
|
|
55
53
|
const navigateRegionsProps = useNavigateRegions(shortcuts);
|
|
56
54
|
useHTMLClass('interface-interface-skeleton__html-container');
|
|
57
55
|
const defaultLabels = {
|
|
@@ -77,10 +75,8 @@ function InterfaceSkeleton(_ref, ref) {
|
|
|
77
75
|
...labels
|
|
78
76
|
};
|
|
79
77
|
const headerVariants = {
|
|
80
|
-
hidden:
|
|
78
|
+
hidden: {
|
|
81
79
|
opacity: 0
|
|
82
|
-
} : {
|
|
83
|
-
opacity: 1
|
|
84
80
|
},
|
|
85
81
|
hover: {
|
|
86
82
|
opacity: 1,
|
|
@@ -89,27 +85,31 @@ function InterfaceSkeleton(_ref, ref) {
|
|
|
89
85
|
delay: 0.2,
|
|
90
86
|
delayChildren: 0.2
|
|
91
87
|
}
|
|
88
|
+
},
|
|
89
|
+
distractionFreeInactive: {
|
|
90
|
+
opacity: 1,
|
|
91
|
+
transition: {
|
|
92
|
+
delay: 0
|
|
93
|
+
}
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
|
-
return createElement("div",
|
|
96
|
+
return createElement("div", { ...(enableRegionNavigation ? navigateRegionsProps : {}),
|
|
95
97
|
ref: useMergeRefs([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
|
|
96
98
|
className: classnames(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer')
|
|
97
|
-
}
|
|
99
|
+
}, createElement("div", {
|
|
98
100
|
className: "interface-interface-skeleton__editor"
|
|
99
|
-
}, !!header &&
|
|
101
|
+
}, !!header && createElement(NavigableRegion, {
|
|
100
102
|
as: motion.div,
|
|
101
103
|
className: "interface-interface-skeleton__header",
|
|
102
104
|
"aria-label": mergedLabels.header,
|
|
103
|
-
initial: isDistractionFree ? 'hidden' : '
|
|
104
|
-
whileHover:
|
|
105
|
+
initial: isDistractionFree ? 'hidden' : 'distractionFreeInactive',
|
|
106
|
+
whileHover: isDistractionFree ? 'hover' : 'distractionFreeInactive',
|
|
107
|
+
animate: isDistractionFree ? 'hidden' : 'distractionFreeInactive',
|
|
105
108
|
variants: headerVariants,
|
|
106
|
-
transition: {
|
|
109
|
+
transition: isDistractionFree ? {
|
|
107
110
|
type: 'tween',
|
|
108
111
|
delay: 0.8
|
|
109
|
-
}
|
|
110
|
-
}, header), !!header && !isDistractionFree && createElement(NavigableRegion, {
|
|
111
|
-
className: "interface-interface-skeleton__header",
|
|
112
|
-
ariaLabel: mergedLabels.header
|
|
112
|
+
} : undefined
|
|
113
113
|
}, header), isDistractionFree && createElement("div", {
|
|
114
114
|
className: "interface-interface-skeleton__header"
|
|
115
115
|
}, editorNotices), createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/interface-skeleton/index.js"],"names":["classnames","forwardRef","useEffect","__unstableUseNavigateRegions","useNavigateRegions","__unstableMotion","motion","__","useMergeRefs","NavigableRegion","useHTMLClass","className","element","document","querySelector","classList","toggle","InterfaceSkeleton","
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/interface-skeleton/index.js"],"names":["classnames","forwardRef","useEffect","__unstableUseNavigateRegions","useNavigateRegions","__unstableMotion","motion","__","useMergeRefs","NavigableRegion","useHTMLClass","className","element","document","querySelector","classList","toggle","InterfaceSkeleton","isDistractionFree","footer","header","editorNotices","sidebar","secondarySidebar","notices","content","actions","labels","enableRegionNavigation","shortcuts","ref","navigateRegionsProps","defaultLabels","body","mergedLabels","headerVariants","hidden","opacity","hover","transition","type","delay","delayChildren","distractionFreeInactive","undefined","div"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,oBAAtC;AACA,SACCC,4BAA4B,IAAIC,kBADjC,EAECC,gBAAgB,IAAIC,MAFrB,QAGO,uBAHP;AAIA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,QAA6B,oBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,eAAP,MAA4B,qBAA5B;;AAEA,SAASC,YAAT,CAAuBC,SAAvB,EAAmC;AAClCT,EAAAA,SAAS,CAAE,MAAM;AAChB,UAAMU,OAAO,GACZC,QAAQ,IAAIA,QAAQ,CAACC,aAAT,CAAyB,aAAaH,SAAW,GAAjD,CADb;;AAEA,QAAK,CAAEC,OAAP,EAAiB;AAChB;AACA;;AACDA,IAAAA,OAAO,CAACG,SAAR,CAAkBC,MAAlB,CAA0BL,SAA1B;AACA,WAAO,MAAM;AACZC,MAAAA,OAAO,CAACG,SAAR,CAAkBC,MAAlB,CAA0BL,SAA1B;AACA,KAFD;AAGA,GAVQ,EAUN,CAAEA,SAAF,CAVM,CAAT;AAWA;;AAED,SAASM,iBAAT,CACC;AACCC,EAAAA,iBADD;AAECC,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C,cAAC,eAAD;AACC,IAAA,SAAS,EAAC,uCADX;AAEC,IAAA,SAAS,EAAGU,YAAY,CAACD;AAF1B,KAIGR,OAJH,CAdD,EAoBG,CAAC,CAAEH,OAAH,IACD,cAAC,eAAD;AACC,IAAA,SAAS,EAAC,uCADX;AAEC,IAAA,SAAS,EAAGY,YAAY,CAACZ;AAF1B,KAIGA,OAJH,CArBF,EA4BG,CAAC,CAAEI,OAAH,IACD,cAAC,eAAD;AACC,IAAA,SAAS,EAAC,uCADX;AAEC,IAAA,SAAS,EAAGQ,YAAY,CAACR;AAF1B,KAIGA,OAJH,CA7BF,CApCD,CAbD,EAuFG,CAAC,CAAEP,MAAH,IACD,cAAC,eAAD;AACC,IAAA,SAAS,EAAC,sCADX;AAEC,IAAA,SAAS,EAAGe,YAAY,CAACf;AAF1B,KAIGA,MAJH,CAxFF,CADD;AAkGA;;AAED,eAAelB,UAAU,CAAEgB,iBAAF,CAAzB","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\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\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\tconst headerVariants = {\n\t\thidden: { opacity: 0 },\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\ttransition: { type: 'tween', delay: 0.2, delayChildren: 0.2 },\n\t\t},\n\t\tdistractionFreeInactive: { opacity: 1, transition: { delay: 0 } },\n\t};\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>\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"]}
|
|
@@ -11,17 +11,16 @@ import classnames from 'classnames';
|
|
|
11
11
|
import { DropdownMenu } from '@wordpress/components';
|
|
12
12
|
import { __ } from '@wordpress/i18n';
|
|
13
13
|
import { moreVertical } from '@wordpress/icons';
|
|
14
|
-
export default function MoreMenuDropdown(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
className,
|
|
14
|
+
export default function MoreMenuDropdown({
|
|
15
|
+
as: DropdownComponent = DropdownMenu,
|
|
16
|
+
className,
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
/* translators: button label text should, if possible, be under 16 characters. */
|
|
19
|
+
label = __('Options'),
|
|
20
|
+
popoverProps,
|
|
21
|
+
toggleProps,
|
|
22
|
+
children
|
|
23
|
+
}) {
|
|
25
24
|
return createElement(DropdownComponent, {
|
|
26
25
|
className: classnames('interface-more-menu-dropdown', className),
|
|
27
26
|
icon: moreVertical,
|
|
@@ -29,7 +28,7 @@ export default function MoreMenuDropdown(_ref) {
|
|
|
29
28
|
popoverProps: {
|
|
30
29
|
placement: 'bottom-end',
|
|
31
30
|
...popoverProps,
|
|
32
|
-
className: classnames('interface-more-menu-dropdown__content', popoverProps
|
|
31
|
+
className: classnames('interface-more-menu-dropdown__content', popoverProps?.className)
|
|
33
32
|
},
|
|
34
33
|
toggleProps: {
|
|
35
34
|
tooltipPosition: 'bottom',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/more-menu-dropdown/index.js"],"names":["classnames","DropdownMenu","__","moreVertical","MoreMenuDropdown","as","DropdownComponent","className","label","popoverProps","toggleProps","children","placement","tooltipPosition","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,QAA6B,uBAA7B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA,eAAe,SAASC,gBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/more-menu-dropdown/index.js"],"names":["classnames","DropdownMenu","__","moreVertical","MoreMenuDropdown","as","DropdownComponent","className","label","popoverProps","toggleProps","children","placement","tooltipPosition","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,QAA6B,uBAA7B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA,eAAe,SAASC,gBAAT,CAA2B;AACzCC,EAAAA,EAAE,EAAEC,iBAAiB,GAAGL,YADiB;AAEzCM,EAAAA,SAFyC;;AAGzC;AACAC,EAAAA,KAAK,GAAGN,EAAE,CAAE,SAAF,CAJ+B;AAKzCO,EAAAA,YALyC;AAMzCC,EAAAA,WANyC;AAOzCC,EAAAA;AAPyC,CAA3B,EAQX;AACH,SACC,cAAC,iBAAD;AACC,IAAA,SAAS,EAAGX,UAAU,CACrB,8BADqB,EAErBO,SAFqB,CADvB;AAKC,IAAA,IAAI,EAAGJ,YALR;AAMC,IAAA,KAAK,EAAGK,KANT;AAOC,IAAA,YAAY,EAAG;AACdI,MAAAA,SAAS,EAAE,YADG;AAEd,SAAGH,YAFW;AAGdF,MAAAA,SAAS,EAAEP,UAAU,CACpB,uCADoB,EAEpBS,YAAY,EAAEF,SAFM;AAHP,KAPhB;AAeC,IAAA,WAAW,EAAG;AACbM,MAAAA,eAAe,EAAE,QADJ;AAEb,SAAGH;AAFU;AAff,KAoBKI,OAAF,IAAeH,QAAQ,CAAEG,OAAF,CApB1B,CADD;AAwBA","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"]}
|
|
@@ -13,16 +13,15 @@ import { speak } from '@wordpress/a11y';
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { store as interfaceStore } from '../../store';
|
|
16
|
-
export default function MoreMenuFeatureToggle(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
16
|
+
export default function MoreMenuFeatureToggle({
|
|
17
|
+
scope,
|
|
18
|
+
label,
|
|
19
|
+
info,
|
|
20
|
+
messageActivated,
|
|
21
|
+
messageDeactivated,
|
|
22
|
+
shortcut,
|
|
23
|
+
feature
|
|
24
|
+
}) {
|
|
26
25
|
const isActive = useSelect(select => select(interfaceStore).isFeatureActive(scope, feature), [feature]);
|
|
27
26
|
const {
|
|
28
27
|
toggleFeature
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/more-menu-feature-toggle/index.js"],"names":["useSelect","useDispatch","MenuItem","__","check","speak","store","interfaceStore","MoreMenuFeatureToggle","scope","label","info","messageActivated","messageDeactivated","shortcut","feature","isActive","select","isFeatureActive","toggleFeature","speakMessage"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,QAAT,QAAyB,uBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,aAAxC;AAEA,eAAe,SAASC,qBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/more-menu-feature-toggle/index.js"],"names":["useSelect","useDispatch","MenuItem","__","check","speak","store","interfaceStore","MoreMenuFeatureToggle","scope","label","info","messageActivated","messageDeactivated","shortcut","feature","isActive","select","isFeatureActive","toggleFeature","speakMessage"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,QAAT,QAAyB,uBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,aAAxC;AAEA,eAAe,SAASC,qBAAT,CAAgC;AAC9CC,EAAAA,KAD8C;AAE9CC,EAAAA,KAF8C;AAG9CC,EAAAA,IAH8C;AAI9CC,EAAAA,gBAJ8C;AAK9CC,EAAAA,kBAL8C;AAM9CC,EAAAA,QAN8C;AAO9CC,EAAAA;AAP8C,CAAhC,EAQX;AACH,QAAMC,QAAQ,GAAGhB,SAAS,CACvBiB,MAAF,IACCA,MAAM,CAAEV,cAAF,CAAN,CAAyBW,eAAzB,CAA0CT,KAA1C,EAAiDM,OAAjD,CAFwB,EAGzB,CAAEA,OAAF,CAHyB,CAA1B;AAKA,QAAM;AAAEI,IAAAA;AAAF,MAAoBlB,WAAW,CAAEM,cAAF,CAArC;;AACA,QAAMa,YAAY,GAAG,MAAM;AAC1B,QAAKJ,QAAL,EAAgB;AACfX,MAAAA,KAAK,CAAEQ,kBAAkB,IAAIV,EAAE,CAAE,qBAAF,CAA1B,CAAL;AACA,KAFD,MAEO;AACNE,MAAAA,KAAK,CAAEO,gBAAgB,IAAIT,EAAE,CAAE,mBAAF,CAAxB,CAAL;AACA;AACD,GAND;;AAQA,SACC,cAAC,QAAD;AACC,IAAA,IAAI,EAAGa,QAAQ,IAAIZ,KADpB;AAEC,IAAA,UAAU,EAAGY,QAFd;AAGC,IAAA,OAAO,EAAG,MAAM;AACfG,MAAAA,aAAa,CAAEV,KAAF,EAASM,OAAT,CAAb;AACAK,MAAAA,YAAY;AACZ,KANF;AAOC,IAAA,IAAI,EAAC,kBAPN;AAQC,IAAA,IAAI,EAAGT,IARR;AASC,IAAA,QAAQ,EAAGG;AATZ,KAWGJ,KAXH,CADD;AAeA","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 ]\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"]}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* External dependencies
|
|
6
5
|
*/
|
|
7
6
|
import classnames from 'classnames';
|
|
8
|
-
export default function NavigableRegion(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return createElement(Tag, _extends({
|
|
7
|
+
export default function NavigableRegion({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
ariaLabel,
|
|
11
|
+
as: Tag = 'div',
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return createElement(Tag, {
|
|
17
15
|
className: classnames('interface-navigable-region', className),
|
|
18
16
|
"aria-label": ariaLabel,
|
|
19
17
|
role: "region",
|
|
20
|
-
tabIndex: "-1"
|
|
21
|
-
|
|
18
|
+
tabIndex: "-1",
|
|
19
|
+
...props
|
|
20
|
+
}, children);
|
|
22
21
|
}
|
|
23
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/navigable-region/index.js"],"names":["classnames","NavigableRegion","children","className","ariaLabel","as","Tag","props"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/navigable-region/index.js"],"names":["classnames","NavigableRegion","children","className","ariaLabel","as","Tag","props"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA,eAAe,SAASC,eAAT,CAA0B;AACxCC,EAAAA,QADwC;AAExCC,EAAAA,SAFwC;AAGxCC,EAAAA,SAHwC;AAIxCC,EAAAA,EAAE,EAAEC,GAAG,GAAG,KAJ8B;AAKxC,KAAGC;AALqC,CAA1B,EAMX;AACH,SACC,cAAC,GAAD;AACC,IAAA,SAAS,EAAGP,UAAU,CAAE,4BAAF,EAAgCG,SAAhC,CADvB;AAEC,kBAAaC,SAFd;AAGC,IAAA,IAAI,EAAC,QAHN;AAIC,IAAA,QAAQ,EAAC,IAJV;AAAA,OAKMG;AALN,KAOGL,QAPH,CADD;AAWA","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"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -11,25 +10,25 @@ import classnames from 'classnames';
|
|
|
11
10
|
|
|
12
11
|
import { Slot, Fill } from '@wordpress/components';
|
|
13
12
|
|
|
14
|
-
function PinnedItems(
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
function PinnedItems({
|
|
14
|
+
scope,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
return createElement(Fill, {
|
|
18
|
+
name: `PinnedItems/${scope}`,
|
|
17
19
|
...props
|
|
18
|
-
}
|
|
19
|
-
return createElement(Fill, _extends({
|
|
20
|
-
name: `PinnedItems/${scope}`
|
|
21
|
-
}, props));
|
|
20
|
+
});
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
function PinnedItemsSlot(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
function PinnedItemsSlot({
|
|
24
|
+
scope,
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return createElement(Slot, {
|
|
29
|
+
name: `PinnedItems/${scope}`,
|
|
28
30
|
...props
|
|
29
|
-
}
|
|
30
|
-
return createElement(Slot, _extends({
|
|
31
|
-
name: `PinnedItems/${scope}`
|
|
32
|
-
}, props), fills => (fills === null || fills === void 0 ? void 0 : fills.length) > 0 && createElement("div", {
|
|
31
|
+
}, fills => fills?.length > 0 && createElement("div", {
|
|
33
32
|
className: classnames(className, 'interface-pinned-items')
|
|
34
33
|
}, fills));
|
|
35
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/pinned-items/index.js"],"names":["classnames","Slot","Fill","PinnedItems","scope","props","PinnedItemsSlot","className","fills","length"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/pinned-items/index.js"],"names":["classnames","Slot","Fill","PinnedItems","scope","props","PinnedItemsSlot","className","fills","length"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,uBAA3B;;AAEA,SAASC,WAAT,CAAsB;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CAAtB,EAA4C;AAC3C,SAAO,cAAC,IAAD;AAAM,IAAA,IAAI,EAAI,eAAeD,KAAO,EAApC;AAAA,OAA6CC;AAA7C,IAAP;AACA;;AAED,SAASC,eAAT,CAA0B;AAAEF,EAAAA,KAAF;AAASG,EAAAA,SAAT;AAAoB,KAAGF;AAAvB,CAA1B,EAA2D;AAC1D,SACC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAI,eAAeD,KAAO,EAApC;AAAA,OAA6CC;AAA7C,KACKG,KAAF,IACDA,KAAK,EAAEC,MAAP,GAAgB,CAAhB,IACC;AACC,IAAA,SAAS,EAAGT,UAAU,CACrBO,SADqB,EAErB,wBAFqB;AADvB,KAMGC,KANH,CAHH,CADD;AAgBA;;AAEDL,WAAW,CAACF,IAAZ,GAAmBK,eAAnB;AAEA,eAAeH,WAAf","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"]}
|
|
@@ -5,11 +5,10 @@ import { createElement } from "@wordpress/element";
|
|
|
5
5
|
*/
|
|
6
6
|
import { Modal } from '@wordpress/components';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
|
-
export default function PreferencesModal(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = _ref;
|
|
8
|
+
export default function PreferencesModal({
|
|
9
|
+
closeModal,
|
|
10
|
+
children
|
|
11
|
+
}) {
|
|
13
12
|
return createElement(Modal, {
|
|
14
13
|
className: "interface-preferences-modal",
|
|
15
14
|
title: __('Preferences'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal/index.js"],"names":["Modal","__","PreferencesModal","closeModal","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,uBAAtB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,eAAe,SAASC,gBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal/index.js"],"names":["Modal","__","PreferencesModal","closeModal","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,uBAAtB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,eAAe,SAASC,gBAAT,CAA2B;AAAEC,EAAAA,UAAF;AAAcC,EAAAA;AAAd,CAA3B,EAAsD;AACpE,SACC,cAAC,KAAD;AACC,IAAA,SAAS,EAAC,6BADX;AAEC,IAAA,KAAK,EAAGH,EAAE,CAAE,aAAF,CAFX;AAGC,IAAA,cAAc,EAAGE;AAHlB,KAKGC,QALH,CADD;AASA","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"]}
|
|
@@ -5,14 +5,13 @@ import { createElement } from "@wordpress/element";
|
|
|
5
5
|
*/
|
|
6
6
|
import { ToggleControl } from '@wordpress/components';
|
|
7
7
|
|
|
8
|
-
function BaseOption(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
8
|
+
function BaseOption({
|
|
9
|
+
help,
|
|
10
|
+
label,
|
|
11
|
+
isChecked,
|
|
12
|
+
onChange,
|
|
13
|
+
children
|
|
14
|
+
}) {
|
|
16
15
|
return createElement("div", {
|
|
17
16
|
className: "interface-preferences-modal__option"
|
|
18
17
|
}, createElement(ToggleControl, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-base-option/index.js"],"names":["ToggleControl","BaseOption","help","label","isChecked","onChange","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,uBAA9B;;AAEA,SAASC,UAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-base-option/index.js"],"names":["ToggleControl","BaseOption","help","label","isChecked","onChange","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,uBAA9B;;AAEA,SAASC,UAAT,CAAqB;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,KAAR;AAAeC,EAAAA,SAAf;AAA0BC,EAAAA,QAA1B;AAAoCC,EAAAA;AAApC,CAArB,EAAsE;AACrE,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,aAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,IAAI,EAAGJ,IAFR;AAGC,IAAA,KAAK,EAAGC,KAHT;AAIC,IAAA,OAAO,EAAGC,SAJX;AAKC,IAAA,QAAQ,EAAGC;AALZ,IADD,EAQGC,QARH,CADD;AAYA;;AAED,eAAeL,UAAf","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"]}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
2
|
|
|
3
|
-
const Section =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
className: "interface-preferences-modal__section-description"
|
|
17
|
-
}, description)), children);
|
|
18
|
-
};
|
|
3
|
+
const Section = ({
|
|
4
|
+
description,
|
|
5
|
+
title,
|
|
6
|
+
children
|
|
7
|
+
}) => createElement("fieldset", {
|
|
8
|
+
className: "interface-preferences-modal__section"
|
|
9
|
+
}, createElement("legend", {
|
|
10
|
+
className: "interface-preferences-modal__section-legend"
|
|
11
|
+
}, createElement("h2", {
|
|
12
|
+
className: "interface-preferences-modal__section-title"
|
|
13
|
+
}, title), description && createElement("p", {
|
|
14
|
+
className: "interface-preferences-modal__section-description"
|
|
15
|
+
}, description)), children);
|
|
19
16
|
|
|
20
17
|
export default Section;
|
|
21
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-section/index.js"],"names":["Section","description","title","children"],"mappings":";;AAAA,MAAMA,OAAO,GAAG
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-section/index.js"],"names":["Section","description","title","children"],"mappings":";;AAAA,MAAMA,OAAO,GAAG,CAAE;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,KAAf;AAAsBC,EAAAA;AAAtB,CAAF,KACf;AAAU,EAAA,SAAS,EAAC;AAApB,GACC;AAAQ,EAAA,SAAS,EAAC;AAAlB,GACC;AAAI,EAAA,SAAS,EAAC;AAAd,GACGD,KADH,CADD,EAIGD,WAAW,IACZ;AAAG,EAAA,SAAS,EAAC;AAAb,GACGA,WADH,CALF,CADD,EAWGE,QAXH,CADD;;AAgBA,eAAeH,OAAf","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"]}
|
|
@@ -9,10 +9,9 @@ import { useMemo, useCallback, useState } from '@wordpress/element';
|
|
|
9
9
|
import { chevronLeft, chevronRight, Icon } from '@wordpress/icons';
|
|
10
10
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
11
11
|
const PREFERENCES_MENU = 'preferences-menu';
|
|
12
|
-
export default function PreferencesModalTabs(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
12
|
+
export default function PreferencesModalTabs({
|
|
13
|
+
sections
|
|
14
|
+
}) {
|
|
16
15
|
const isLargeViewport = useViewportMatch('medium'); // This is also used to sync the two different rendered components
|
|
17
16
|
// between small and large viewports.
|
|
18
17
|
|
|
@@ -33,12 +32,11 @@ export default function PreferencesModalTabs(_ref) {
|
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
if (sections.length) {
|
|
36
|
-
mappedTabs = sections.reduce((accumulator,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = _ref2;
|
|
35
|
+
mappedTabs = sections.reduce((accumulator, {
|
|
36
|
+
name,
|
|
37
|
+
tabLabel: title,
|
|
38
|
+
content
|
|
39
|
+
}) => {
|
|
42
40
|
accumulator.tabs.push({
|
|
43
41
|
name,
|
|
44
42
|
title
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-tabs/index.js"],"names":["useViewportMatch","__experimentalNavigatorProvider","NavigatorProvider","__experimentalNavigatorScreen","NavigatorScreen","__experimentalNavigatorButton","NavigatorButton","__experimentalNavigatorBackButton","NavigatorBackButton","__experimentalItemGroup","ItemGroup","__experimentalItem","Item","__experimentalHStack","HStack","__experimentalText","Text","__experimentalTruncate","Truncate","FlexItem","TabPanel","Card","CardHeader","CardBody","useMemo","useCallback","useState","chevronLeft","chevronRight","Icon","isRTL","__","PREFERENCES_MENU","PreferencesModalTabs","sections","isLargeViewport","activeMenu","setActiveMenu","tabs","sectionsContentMap","mappedTabs","length","reduce","accumulator","name","tabLabel","title","content","push","getCurrentTab","tab","modalContent","undefined","map","section"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SACCC,+BAA+B,IAAIC,iBADpC,EAECC,6BAA6B,IAAIC,eAFlC,EAGCC,6BAA6B,IAAIC,eAHlC,EAICC,iCAAiC,IAAIC,mBAJtC,EAKCC,uBAAuB,IAAIC,SAL5B,EAMCC,kBAAkB,IAAIC,IANvB,EAOCC,oBAAoB,IAAIC,MAPzB,EAQCC,kBAAkB,IAAIC,IARvB,EASCC,sBAAsB,IAAIC,QAT3B,EAUCC,QAVD,EAWCC,QAXD,EAYCC,IAZD,EAaCC,UAbD,EAcCC,QAdD,QAeO,uBAfP;AAgBA,SAASC,OAAT,EAAkBC,WAAlB,EAA+BC,QAA/B,QAA+C,oBAA/C;AACA,SAASC,WAAT,EAAsBC,YAAtB,EAAoCC,IAApC,QAAgD,kBAAhD;AACA,SAASC,KAAT,EAAgBC,EAAhB,QAA0B,iBAA1B;AAEA,MAAMC,gBAAgB,GAAG,kBAAzB;AAEA,eAAe,SAASC,oBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/interface/src/components/preferences-modal-tabs/index.js"],"names":["useViewportMatch","__experimentalNavigatorProvider","NavigatorProvider","__experimentalNavigatorScreen","NavigatorScreen","__experimentalNavigatorButton","NavigatorButton","__experimentalNavigatorBackButton","NavigatorBackButton","__experimentalItemGroup","ItemGroup","__experimentalItem","Item","__experimentalHStack","HStack","__experimentalText","Text","__experimentalTruncate","Truncate","FlexItem","TabPanel","Card","CardHeader","CardBody","useMemo","useCallback","useState","chevronLeft","chevronRight","Icon","isRTL","__","PREFERENCES_MENU","PreferencesModalTabs","sections","isLargeViewport","activeMenu","setActiveMenu","tabs","sectionsContentMap","mappedTabs","length","reduce","accumulator","name","tabLabel","title","content","push","getCurrentTab","tab","modalContent","undefined","map","section"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SACCC,+BAA+B,IAAIC,iBADpC,EAECC,6BAA6B,IAAIC,eAFlC,EAG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,QAAA,OAAO,EAAC;AAAhB,SACC,cAAC,QAAD,QACC,cAAC,QAAD,QACGsC,GAAG,CAACJ,KADP,CADD,CADD,EAMC,cAAC,QAAD,QACC,cAAC,IAAD;AACC,QAAA,IAAI,EACHhB,KAAK,KACFH,WADE,GAEFC;AAJL,QADD,CAND,CAND,CADD;AAyBA,KA1BC,CADH,CADD,CADD,CADD,CAJD,EAuCGM,QAAQ,CAACO,MAAT,IACDP,QAAQ,CAACmB,GAAT,CAAgBC,OAAF,IAAe;AAC5B,aACC,cAAC,eAAD;AACC,QAAA,GAAG,EAAI,GAAGA,OAAO,CAACV,IAAM,OADzB;AAEC,QAAA,IAAI,EAAGU,OAAO,CAACV;AAFhB,SAIC,cAAC,IAAD;AAAM,QAAA,YAAY,MAAlB;AAAmB,QAAA,IAAI,EAAC;AAAxB,SACC,cAAC,UAAD;AACC,QAAA,YAAY,EAAG,KADhB;AAEC,QAAA,OAAO,EAAC,MAFT;AAGC,QAAA,IAAI,EAAC,OAHN;AAIC,QAAA,GAAG,EAAC;AAJL,SAMC,cAAC,mBAAD;AACC,QAAA,IAAI,EACHd,KAAK,KACFF,YADE,GAEFD,WAJL;AAMC,sBAAaI,EAAE,CACd,+BADc;AANhB,QAND,EAgBC,cAAC,IAAD;AAAM,QAAA,IAAI,EAAC;AAAX,SACGuB,OAAO,CAACT,QADX,CAhBD,CADD,EAqBC,cAAC,QAAD,QAAYS,OAAO,CAACP,OAApB,CArBD,CAJD,CADD;AA8BA,KA/BD,CAxCF,CADD;AA2EA;;AAED,SAAOI,YAAP;AACA","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"]}
|