@wordpress/interface 5.15.0 → 5.17.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/action-item/index.js +6 -14
  3. package/build/components/action-item/index.js.map +1 -1
  4. package/build/components/complementary-area/index.js +9 -28
  5. package/build/components/complementary-area/index.js.map +1 -1
  6. package/build/components/complementary-area-context/index.js +0 -3
  7. package/build/components/complementary-area-context/index.js.map +1 -1
  8. package/build/components/complementary-area-header/index.js +1 -7
  9. package/build/components/complementary-area-header/index.js.map +1 -1
  10. package/build/components/complementary-area-more-menu-item/index.js +3 -9
  11. package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
  12. package/build/components/complementary-area-toggle/index.js +2 -10
  13. package/build/components/complementary-area-toggle/index.js.map +1 -1
  14. package/build/components/fullscreen-mode/index.js +3 -7
  15. package/build/components/fullscreen-mode/index.js.map +1 -1
  16. package/build/components/index.js +0 -14
  17. package/build/components/index.js.map +1 -1
  18. package/build/components/index.native.js +0 -3
  19. package/build/components/index.native.js.map +1 -1
  20. package/build/components/interface-skeleton/index.js +8 -22
  21. package/build/components/interface-skeleton/index.js.map +1 -1
  22. package/build/components/more-menu-dropdown/index.js +1 -8
  23. package/build/components/more-menu-dropdown/index.js.map +1 -1
  24. package/build/components/more-menu-feature-toggle/index.js +2 -11
  25. package/build/components/more-menu-feature-toggle/index.js.map +1 -1
  26. package/build/components/navigable-region/index.js +1 -4
  27. package/build/components/navigable-region/index.js.map +1 -1
  28. package/build/components/pinned-items/index.js +1 -7
  29. package/build/components/pinned-items/index.js.map +1 -1
  30. package/build/components/preferences-modal/index.js +1 -4
  31. package/build/components/preferences-modal/index.js.map +1 -1
  32. package/build/components/preferences-modal-base-option/index.js +1 -4
  33. package/build/components/preferences-modal-base-option/index.js.map +1 -1
  34. package/build/components/preferences-modal-section/index.js +0 -3
  35. package/build/components/preferences-modal-section/index.js.map +1 -1
  36. package/build/components/preferences-modal-tabs/index.js +6 -15
  37. package/build/components/preferences-modal-tabs/index.js.map +1 -1
  38. package/build/index.js +0 -3
  39. package/build/index.js.map +1 -1
  40. package/build/store/actions.js +15 -37
  41. package/build/store/actions.js.map +1 -1
  42. package/build/store/constants.js +0 -1
  43. package/build/store/constants.js.map +1 -1
  44. package/build/store/index.js +3 -11
  45. package/build/store/index.js.map +1 -1
  46. package/build/store/reducer.js +8 -14
  47. package/build/store/reducer.js.map +1 -1
  48. package/build/store/selectors.js +8 -15
  49. package/build/store/selectors.js.map +1 -1
  50. package/build-module/components/action-item/index.js +5 -10
  51. package/build-module/components/action-item/index.js.map +1 -1
  52. package/build-module/components/complementary-area/index.js +10 -17
  53. package/build-module/components/complementary-area/index.js.map +1 -1
  54. package/build-module/components/complementary-area-context/index.js.map +1 -1
  55. package/build-module/components/complementary-area-header/index.js +2 -5
  56. package/build-module/components/complementary-area-header/index.js.map +1 -1
  57. package/build-module/components/complementary-area-more-menu-item/index.js +3 -5
  58. package/build-module/components/complementary-area-more-menu-item/index.js.map +1 -1
  59. package/build-module/components/complementary-area-toggle/index.js +2 -5
  60. package/build-module/components/complementary-area-toggle/index.js.map +1 -1
  61. package/build-module/components/fullscreen-mode/index.js +2 -6
  62. package/build-module/components/fullscreen-mode/index.js.map +1 -1
  63. package/build-module/components/index.js.map +1 -1
  64. package/build-module/components/index.native.js.map +1 -1
  65. package/build-module/components/interface-skeleton/index.js +9 -17
  66. package/build-module/components/interface-skeleton/index.js.map +1 -1
  67. package/build-module/components/more-menu-dropdown/index.js +1 -3
  68. package/build-module/components/more-menu-dropdown/index.js.map +1 -1
  69. package/build-module/components/more-menu-feature-toggle/index.js +2 -5
  70. package/build-module/components/more-menu-feature-toggle/index.js.map +1 -1
  71. package/build-module/components/navigable-region/index.js +0 -1
  72. package/build-module/components/navigable-region/index.js.map +1 -1
  73. package/build-module/components/pinned-items/index.js +1 -5
  74. package/build-module/components/pinned-items/index.js.map +1 -1
  75. package/build-module/components/preferences-modal/index.js +0 -1
  76. package/build-module/components/preferences-modal/index.js.map +1 -1
  77. package/build-module/components/preferences-modal-base-option/index.js +0 -3
  78. package/build-module/components/preferences-modal-base-option/index.js.map +1 -1
  79. package/build-module/components/preferences-modal-section/index.js +0 -2
  80. package/build-module/components/preferences-modal-section/index.js.map +1 -1
  81. package/build-module/components/preferences-modal-tabs/index.js +5 -9
  82. package/build-module/components/preferences-modal-tabs/index.js.map +1 -1
  83. package/build-module/index.js.map +1 -1
  84. package/build-module/store/actions.js +16 -20
  85. package/build-module/store/actions.js.map +1 -1
  86. package/build-module/store/constants.js.map +1 -1
  87. package/build-module/store/index.js +5 -4
  88. package/build-module/store/index.js.map +1 -1
  89. package/build-module/store/reducer.js +7 -9
  90. package/build-module/store/reducer.js.map +1 -1
  91. package/build-module/store/selectors.js +9 -10
  92. package/build-module/store/selectors.js.map +1 -1
  93. package/build-style/style-rtl.css +14 -8
  94. package/build-style/style.css +14 -8
  95. package/package.json +13 -13
  96. package/src/components/complementary-area/README.md +1 -1
  97. package/src/components/complementary-area/index.js +18 -2
  98. package/src/components/complementary-area-toggle/index.js +1 -1
  99. package/src/components/interface-skeleton/index.js +2 -0
  100. package/src/components/interface-skeleton/style.scss +6 -0
  101. package/src/components/more-menu-feature-toggle/index.js +1 -1
  102. package/src/components/pinned-items/style.scss +12 -10
@@ -1,30 +1,28 @@
1
1
  import { createElement, Fragment } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import classnames from 'classnames';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { Button, Panel, Slot, Fill } from '@wordpress/components';
12
11
  import { useDispatch, useSelect } from '@wordpress/data';
13
12
  import { __ } from '@wordpress/i18n';
14
13
  import { check, starEmpty, starFilled } from '@wordpress/icons';
15
14
  import { useEffect, useRef } from '@wordpress/element';
16
15
  import { store as viewportStore } from '@wordpress/viewport';
16
+
17
17
  /**
18
18
  * Internal dependencies
19
19
  */
20
-
21
20
  import ComplementaryAreaHeader from '../complementary-area-header';
22
21
  import ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';
23
22
  import ComplementaryAreaToggle from '../complementary-area-toggle';
24
23
  import withComplementaryAreaContext from '../complementary-area-context';
25
24
  import PinnedItems from '../pinned-items';
26
25
  import { store as interfaceStore } from '../../store';
27
-
28
26
  function ComplementaryAreaSlot({
29
27
  scope,
30
28
  ...props
@@ -34,7 +32,6 @@ function ComplementaryAreaSlot({
34
32
  ...props
35
33
  });
36
34
  }
37
-
38
35
  function ComplementaryAreaFill({
39
36
  scope,
40
37
  children,
@@ -46,7 +43,6 @@ function ComplementaryAreaFill({
46
43
  className: className
47
44
  }, children));
48
45
  }
49
-
50
46
  function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
51
47
  const previousIsSmall = useRef(false);
52
48
  const shouldOpenWhenNotSmall = useRef(false);
@@ -58,11 +54,12 @@ function useAdjustComplementaryListener(scope, identifier, activeArea, isActive,
58
54
  // If the complementary area is active and the editor is switching from
59
55
  // a big to a small window size.
60
56
  if (isActive && isSmall && !previousIsSmall.current) {
61
- disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size
57
+ disableComplementaryArea(scope);
58
+ // Flag the complementary area to be reopened when the window size
62
59
  // goes from small to big.
63
-
64
60
  shouldOpenWhenNotSmall.current = true;
65
- } else if ( // If there is a flag indicating the complementary area should be
61
+ } else if (
62
+ // If there is a flag indicating the complementary area should be
66
63
  // enabled when we go from small to big window size and we are going
67
64
  // from a small to big window size.
68
65
  shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
@@ -70,19 +67,18 @@ function useAdjustComplementaryListener(scope, identifier, activeArea, isActive,
70
67
  // enabled.
71
68
  shouldOpenWhenNotSmall.current = false;
72
69
  enableComplementaryArea(scope, identifier);
73
- } else if ( // If the flag is indicating the current complementary should be
70
+ } else if (
71
+ // If the flag is indicating the current complementary should be
74
72
  // reopened but another complementary area becomes active, remove
75
73
  // the flag.
76
74
  shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
77
75
  shouldOpenWhenNotSmall.current = false;
78
76
  }
79
-
80
77
  if (isSmall !== previousIsSmall.current) {
81
78
  previousIsSmall.current = isSmall;
82
79
  }
83
- }, [isActive, isSmall, scope, identifier, activeArea]);
80
+ }, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]);
84
81
  }
85
-
86
82
  function ComplementaryArea({
87
83
  children,
88
84
  className,
@@ -114,9 +110,7 @@ function ComplementaryArea({
114
110
  isComplementaryAreaLoading,
115
111
  isItemPinned
116
112
  } = select(interfaceStore);
117
-
118
113
  const _activeArea = getActiveComplementaryArea(scope);
119
-
120
114
  return {
121
115
  isLoading: isComplementaryAreaLoading(scope),
122
116
  isActive: _activeArea === identifier,
@@ -141,7 +135,7 @@ function ComplementaryArea({
141
135
  } else if (activeArea === undefined && isSmall) {
142
136
  disableComplementaryArea(scope, identifier);
143
137
  }
144
- }, [activeArea, isActiveByDefault, scope, identifier, isSmall]);
138
+ }, [activeArea, isActiveByDefault, scope, identifier, isSmall, enableComplementaryArea, disableComplementaryArea]);
145
139
  return createElement(Fragment, null, isPinnable && createElement(PinnedItems, {
146
140
  scope: scope
147
141
  }, isPinned && createElement(ComplementaryAreaToggle, {
@@ -183,7 +177,6 @@ function ComplementaryArea({
183
177
  className: panelClassName
184
178
  }, children)));
185
179
  }
186
-
187
180
  const ComplementaryAreaWrapped = withComplementaryAreaContext(ComplementaryArea);
188
181
  ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
189
182
  export default ComplementaryAreaWrapped;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/complementary-area/index.js"],"names":["classnames","Button","Panel","Slot","Fill","useDispatch","useSelect","__","check","starEmpty","starFilled","useEffect","useRef","store","viewportStore","ComplementaryAreaHeader","ComplementaryAreaMoreMenuItem","ComplementaryAreaToggle","withComplementaryAreaContext","PinnedItems","interfaceStore","ComplementaryAreaSlot","scope","props","ComplementaryAreaFill","children","className","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","current","ComplementaryArea","closeLabel","header","headerClassName","icon","isPinnable","panelClassName","name","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","isViewportMatch","pinItem","unpinItem","undefined","label","shortcut","ComplementaryAreaWrapped"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,EAAiBC,KAAjB,EAAwBC,IAAxB,EAA8BC,IAA9B,QAA0C,uBAA1C;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAT,EAAgBC,SAAhB,EAA2BC,UAA3B,QAA6C,kBAA7C;AACA,SAASC,SAAT,EAAoBC,MAApB,QAAkC,oBAAlC;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,qBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,4BAAP,MAAyC,+BAAzC;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAASN,KAAK,IAAIO,cAAlB,QAAwC,aAAxC;;AAEA,SAASC,qBAAT,CAAgC;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CAAhC,EAAsD;AACrD,SAAO,cAAC,IAAD;AAAM,IAAA,IAAI,EAAI,qBAAqBD,KAAO,EAA1C;AAAA,OAAmDC;AAAnD,IAAP;AACA;;AAED,SAASC,qBAAT,CAAgC;AAAEF,EAAAA,KAAF;AAASG,EAAAA,QAAT;AAAm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7B;AAGA2B,wBAAwB,CAAC7D,IAAzB,GAAgCkB,qBAAhC;AAEA,eAAe2C,wBAAf","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 } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div className={ className }>{ children }</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}, [ isActive, isSmall, scope, identifier, activeArea ] );\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}, [ activeArea, isActiveByDefault, scope, identifier, isSmall ] );\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>\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"]}
1
+ {"version":3,"names":["classnames","Button","Panel","Slot","Fill","useDispatch","useSelect","__","check","starEmpty","starFilled","useEffect","useRef","store","viewportStore","ComplementaryAreaHeader","ComplementaryAreaMoreMenuItem","ComplementaryAreaToggle","withComplementaryAreaContext","PinnedItems","interfaceStore","ComplementaryAreaSlot","scope","props","createElement","name","ComplementaryAreaFill","children","className","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","current","ComplementaryArea","closeLabel","header","headerClassName","icon","isPinnable","panelClassName","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","isViewportMatch","pinItem","unpinItem","undefined","Fragment","isPressed","label","showTooltip","variant","target","onClose","toggleButtonProps","shortcut","onClick","ComplementaryAreaWrapped"],"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 } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div className={ className }>{ children }</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>\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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,QAAQ,uBAAuB;AACjE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,kBAAkB;AAC/D,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,KAAK,IAAIC,aAAa,QAAQ,qBAAqB;;AAE5D;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,6BAA6B,MAAM,sCAAsC;AAChF,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,4BAA4B,MAAM,+BAA+B;AACxE,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAASN,KAAK,IAAIO,cAAc,QAAQ,aAAa;AAErD,SAASC,qBAAqBA,CAAE;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAG;EACrD,O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AqB;IACrBE,SAAS,EAAG5B,UAAU,CACrB,8BAA8B,EAC9B4B,SACD,CAAG;IACHN,KAAK,EAAGA;EAAO,GAEfE,aAAA,CAACT,uBAAuB;IACvBa,SAAS,EAAGc,eAAiB;IAC7BF,UAAU,EAAGA,UAAY;IACzB6B,OAAO,EAAGA,CAAA,KAAMhC,wBAAwB,CAAEf,KAAM,CAAG;IACnDwB,gBAAgB,EAAGA,gBAAkB;IACrCwB,iBAAiB,EAAG;MACnBL,KAAK,EAAEzB,UAAU;MACjB+B,QAAQ,EAAEvB,cAAc;MACxB1B,KAAK;MACLQ;IACD;EAAG,GAEDW,MAAM,IACPjB,aAAA,CAAAuC,QAAA,QACCvC,aAAA,iBAAUuB,KAAe,CAAC,EACxBH,UAAU,IACXpB,aAAA,CAACvB,MAAM;IACN2B,SAAS,EAAC,8CAA8C;IACxDe,IAAI,EACHS,QAAQ,GAAG1C,UAAU,GAAGD,SACxB;IACDwD,KAAK,EACJb,QAAQ,GACL7C,EAAE,CAAE,oBAAqB,CAAC,GAC1BA,EAAE,CAAE,gBAAiB,CACxB;IACDiE,OAAO,EAAGA,CAAA,KACT,CAAEpB,QAAQ,GAAGS,SAAS,GAAGD,OAAO,EAC/BtC,KAAK,EACLQ,UACD,CACA;IACDkC,SAAS,EAAGZ,QAAU;IACtB,iBAAgBA;EAAU,CAC1B,CAED,CAEqB,CAAC,EAC1B5B,aAAA,CAACtB,KAAK;IAAC0B,SAAS,EAAGiB;EAAgB,GAAGlB,QAAiB,CACjC,CAEvB,CAAC;AAEL;AAEA,MAAM8C,wBAAwB,GAC7BvD,4BAA4B,CAAEqB,iBAAkB,CAAC;AAElDkC,wBAAwB,CAACtE,IAAI,GAAGkB,qBAAqB;AAErD,eAAeoD,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/complementary-area-context/index.js"],"names":["withPluginContext","context","ownProps","icon","identifier","name"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAT,QAAkC,oBAAlC;AAEA,eAAeA,iBAAiB,CAAE,CAAEC,OAAF,EAAWC,QAAX,KAAyB;AAC1D,SAAO;AACNC,IAAAA,IAAI,EAAED,QAAQ,CAACC,IAAT,IAAiBF,OAAO,CAACE,IADzB;AAENC,IAAAA,UAAU,EACTF,QAAQ,CAACE,UAAT,IAAwB,GAAGH,OAAO,CAACI,IAAM,IAAIH,QAAQ,CAACG,IAAM;AAHvD,GAAP;AAKA,CAN+B,CAAhC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n"]}
1
+ {"version":3,"names":["withPluginContext","context","ownProps","icon","identifier","name"],"sources":["@wordpress/interface/src/components/complementary-area-context/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,oBAAoB;AAEtD,eAAeA,iBAAiB,CAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAC1D,OAAO;IACNC,IAAI,EAAED,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACE,IAAI;IACnCC,UAAU,EACTF,QAAQ,CAACE,UAAU,IAAK,GAAGH,OAAO,CAACI,IAAM,IAAIH,QAAQ,CAACG,IAAM;EAC9D,CAAC;AACF,CAAE,CAAC"}
@@ -1,20 +1,18 @@
1
1
  import { createElement, Fragment } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import classnames from 'classnames';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { closeSmall } from '@wordpress/icons';
11
+
12
12
  /**
13
13
  * Internal dependencies
14
14
  */
15
-
16
15
  import ComplementaryAreaToggle from '../complementary-area-toggle';
17
-
18
16
  const ComplementaryAreaHeader = ({
19
17
  smallScreenTitle,
20
18
  children,
@@ -34,6 +32,5 @@ const ComplementaryAreaHeader = ({
34
32
  tabIndex: -1
35
33
  }, children, toggleButton));
36
34
  };
37
-
38
35
  export default ComplementaryAreaHeader;
39
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/complementary-area-header/index.js"],"names":["classnames","closeSmall","ComplementaryAreaToggle","ComplementaryAreaHeader","smallScreenTitle","children","className","toggleButtonProps","toggleButton"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,kBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;;AAEA,MAAMC,uBAAuB,GAAG,CAAE;AACjCC,EAAAA,gBADiC;AAEjCC,EAAAA,QAFiC;AAGjCC,EAAAA,SAHiC;AAIjCC,EAAAA;AAJiC,CAAF,KAKzB;AACN,QAAMC,YAAY,GACjB,cAAC,uBAAD;AAAyB,IAAA,IAAI,EAAGP,UAAhC;AAAA,OAAkDM;AAAlD,IADD;AAGA,SACC,8BACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGH,gBAAgB,IACjB;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGA,gBADH,CAFF,EAMGI,YANH,CADD,EASC;AACC,IAAA,SAAS,EAAGR,UAAU,CACrB,0BADqB,EAErB,qCAFqB,EAGrBM,SAHqB,CADvB;AAMC,IAAA,QAAQ,EAAG,CAAC;AANb,KAQGD,QARH,EASGG,YATH,CATD,CADD;AAuBA,CAhCD;;AAkCA,eAAeL,uBAAf","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"]}
1
+ {"version":3,"names":["classnames","closeSmall","ComplementaryAreaToggle","ComplementaryAreaHeader","smallScreenTitle","children","className","toggleButtonProps","toggleButton","createElement","icon","Fragment","tabIndex"],"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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,kBAAkB;;AAE7C;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAElE,MAAMC,uBAAuB,GAAGA,CAAE;EACjCC,gBAAgB;EAChBC,QAAQ;EACRC,SAAS;EACTC;AACD,CAAC,KAAM;EACN,MAAMC,YAAY,GACjBC,aAAA,CAACP,uBAAuB;IAACQ,IAAI,EAAGT,UAAY;IAAA,GAAMM;EAAiB,CAAI,CACvE;EACD,OACCE,aAAA,CAAAE,QAAA,QACCF,aAAA;IAAKH,SAAS,EAAC;EAAqE,GACjFF,gBAAgB,IACjBK,aAAA;IAAMH,SAAS,EAAC;EAAkD,GAC/DF,gBACG,CACN,EACCI,YACE,CAAC,EACNC,aAAA;IACCH,SAAS,EAAGN,UAAU,CACrB,0BAA0B,EAC1B,qCAAqC,EACrCM,SACD,CAAG;IACHM,QAAQ,EAAG,CAAC;EAAG,GAEbP,QAAQ,EACRG,YACE,CACJ,CAAC;AAEL,CAAC;AAED,eAAeL,uBAAuB"}
@@ -1,17 +1,15 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { check } from '@wordpress/icons';
7
6
  import { MenuItem } from '@wordpress/components';
7
+
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
-
12
11
  import ComplementaryAreaToggle from '../complementary-area-toggle';
13
12
  import ActionItem from '../action-item';
14
-
15
13
  const PluginsMenuItem = ({
16
14
  // Menu item is marked with unstable prop for backward compatibility.
17
15
  // They are removed so they don't leak to DOM elements.
@@ -19,9 +17,9 @@ const PluginsMenuItem = ({
19
17
  __unstableExplicitMenuItem,
20
18
  __unstableTarget,
21
19
  ...restProps
22
- }) => createElement(MenuItem, { ...restProps
20
+ }) => createElement(MenuItem, {
21
+ ...restProps
23
22
  });
24
-
25
23
  export default function ComplementaryAreaMoreMenuItem({
26
24
  scope,
27
25
  target,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/complementary-area-more-menu-item/index.js"],"names":["check","MenuItem","ComplementaryAreaToggle","ActionItem","PluginsMenuItem","__unstableExplicitMenuItem","__unstableTarget","restProps","ComplementaryAreaMoreMenuItem","scope","target","props","toggleProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,kBAAtB;AACA,SAASC,QAAT,QAAyB,uBAAzB;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,UAAP,MAAuB,gBAAvB;;AAEA,MAAMC,eAAe,GAAG,CAAE;AACzB;AACA;AACA;AACAC,EAAAA,0BAJyB;AAKzBC,EAAAA,gBALyB;AAMzB,KAAGC;AANsB,CAAF,KAOjB,cAAC,QAAD,OAAeA;AAAf,EAPP;;AASA,eAAe,SAASC,6BAAT,CAAwC;AACtDC,EAAAA,KADsD;AAEtDC,EAAAA,MAFsD;AAGtDL,EAAAA,0BAHsD;AAItD,KAAGM;AAJmD,CAAxC,EAKX;AACH,SACC,cAAC,uBAAD;AACC,IAAA,EAAE,EAAKC,WAAF,IAAmB;AACvB,aACC,cAAC,UAAD;AACC,QAAA,0BAA0B,EACzBP,0BAFF;AAIC,QAAA,gBAAgB,EAAI,GAAGI,KAAO,IAAIC,MAAQ,EAJ3C;AAKC,QAAA,EAAE,EAAGN,eALN;AAMC,QAAA,IAAI,EAAI,GAAGK,KAAO,mBANnB;AAAA,WAOMG;AAPN,QADD;AAWA,KAbF;AAcC,IAAA,IAAI,EAAC,kBAdN;AAeC,IAAA,YAAY,EAAGZ,KAfhB;AAgBC,IAAA,IAAI,EAAGU,MAhBR;AAiBC,IAAA,KAAK,EAAGD,KAjBT;AAAA,OAkBME;AAlBN,IADD;AAsBA","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"]}
1
+ {"version":3,"names":["check","MenuItem","ComplementaryAreaToggle","ActionItem","PluginsMenuItem","__unstableExplicitMenuItem","__unstableTarget","restProps","createElement","ComplementaryAreaMoreMenuItem","scope","target","props","as","toggleProps","name","role","selectedIcon"],"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":";AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,kBAAkB;AACxC,SAASC,QAAQ,QAAQ,uBAAuB;;AAEhD;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,UAAU,MAAM,gBAAgB;AAEvC,MAAMC,eAAe,GAAGA,CAAE;EACzB;EACA;EACA;EACAC,0BAA0B;EAC1BC,gBAAgB;EAChB,GAAGC;AACJ,CAAC,KAAMC,aAAA,CAACP,QAAQ;EAAA,GAAMM;AAAS,CAAI,CAAC;AAEpC,eAAe,SAASE,6BAA6BA,CAAE;EACtDC,KAAK;EACLC,MAAM;EACNN,0BAA0B;EAC1B,GAAGO;AACJ,CAAC,EAAG;EACH,OACCJ,aAAA,CAACN,uBAAuB;IACvBW,EAAE,EAAKC,WAAW,IAAM;MACvB,OACCN,aAAA,CAACL,UAAU;QACVE,0BAA0B,EACzBA,0BACA;QACDC,gBAAgB,EAAI,GAAGI,KAAO,IAAIC,MAAQ,EAAG;QAC7CE,EAAE,EAAGT,eAAiB;QACtBW,IAAI,EAAI,GAAGL,KAAO,mBAAoB;QAAA,GACjCI;MAAW,CAChB,CAAC;IAEJ,CAAG;IACHE,IAAI,EAAC,kBAAkB;IACvBC,YAAY,EAAGjB,KAAO;IACtBe,IAAI,EAAGJ,MAAQ;IACfD,KAAK,EAAGA,KAAO;IAAA,GACVE;EAAK,CACV,CAAC;AAEJ"}
@@ -1,17 +1,15 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { Button } from '@wordpress/components';
7
6
  import { useDispatch, useSelect } from '@wordpress/data';
7
+
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
-
12
11
  import { store as interfaceStore } from '../../store';
13
12
  import complementaryAreaContext from '../complementary-area-context';
14
-
15
13
  function ComplementaryAreaToggle({
16
14
  as = Button,
17
15
  scope,
@@ -22,7 +20,7 @@ function ComplementaryAreaToggle({
22
20
  ...props
23
21
  }) {
24
22
  const ComponentToUse = as;
25
- const isSelected = useSelect(select => select(interfaceStore).getActiveComplementaryArea(scope) === identifier, [identifier]);
23
+ const isSelected = useSelect(select => select(interfaceStore).getActiveComplementaryArea(scope) === identifier, [identifier, scope]);
26
24
  const {
27
25
  enableComplementaryArea,
28
26
  disableComplementaryArea
@@ -39,6 +37,5 @@ function ComplementaryAreaToggle({
39
37
  ...props
40
38
  });
41
39
  }
42
-
43
40
  export default complementaryAreaContext(ComplementaryAreaToggle);
44
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/complementary-area-toggle/index.js"],"names":["Button","useDispatch","useSelect","store","interfaceStore","complementaryAreaContext","ComplementaryAreaToggle","as","scope","identifier","icon","selectedIcon","name","props","ComponentToUse","isSelected","select","getActiveComplementaryArea","enableComplementaryArea","disableComplementaryArea"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,uBAAvB;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,aAAxC;AACA,OAAOC,wBAAP,MAAqC,+BAArC;;AAEA,SAASC,uBAAT,CAAkC;AACjCC,EAAAA,EAAE,GAAGP,MAD4B;AAEjCQ,EAAAA,KAFiC;AAGjCC,EAAAA,UAHiC;AAIjCC,EAAAA,IAJiC;AAKjCC,EAAAA,YALiC;AAMjCC,EAAAA,IANiC;AAOjC,KAAGC;AAP8B,CAAlC,EAQI;AACH,QAAMC,cAAc,GAAGP,EAAvB;AACA,QAAMQ,UAAU,GAAGb,SAAS,CACzBc,MAAF,IACCA,MAAM,CAAEZ,cAAF,CAAN,CAAyBa,0BAAzB,CAAqDT,KAArD,MACAC,UAH0B,EAI3B,CAAEA,UAAF,CAJ2B,CAA5B;AAMA,QAAM;AAAES,IAAAA,uBAAF;AAA2BC,IAAAA;AAA3B,MACLlB,WAAW,CAAEG,cAAF,CADZ;AAEA,SACC,cAAC,cAAD;AACC,IAAA,IAAI,EAAGO,YAAY,IAAII,UAAhB,GAA6BJ,YAA7B,GAA4CD,IADpD;AAEC,IAAA,OAAO,EAAG,MAAM;AACf,UAAKK,UAAL,EAAkB;AACjBI,QAAAA,wBAAwB,CAAEX,KAAF,CAAxB;AACA,OAFD,MAEO;AACNU,QAAAA,uBAAuB,CAAEV,KAAF,EAASC,UAAT,CAAvB;AACA;AACD,KARF;AAAA,OASMI;AATN,IADD;AAaA;;AAED,eAAeR,wBAAwB,CAAEC,uBAAF,CAAvC","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 ]\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\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 complementaryAreaContext( ComplementaryAreaToggle );\n"]}
1
+ {"version":3,"names":["Button","useDispatch","useSelect","store","interfaceStore","complementaryAreaContext","ComplementaryAreaToggle","as","scope","identifier","icon","selectedIcon","name","props","ComponentToUse","isSelected","select","getActiveComplementaryArea","enableComplementaryArea","disableComplementaryArea","createElement","onClick"],"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\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 complementaryAreaContext( ComplementaryAreaToggle );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,cAAc,QAAQ,aAAa;AACrD,OAAOC,wBAAwB,MAAM,+BAA+B;AAEpE,SAASC,uBAAuBA,CAAE;EACjCC,EAAE,GAAGP,MAAM;EACXQ,KAAK;EACLC,UAAU;EACVC,IAAI;EACJC,YAAY;EACZC,IAAI;EACJ,GAAGC;AACJ,CAAC,EAAG;EACH,MAAMC,cAAc,GAAGP,EAAE;EACzB,MAAMQ,UAAU,GAAGb,SAAS,CACzBc,MAAM,IACPA,MAAM,CAAEZ,cAAe,CAAC,CAACa,0BAA0B,CAAET,KAAM,CAAC,KAC5DC,UAAU,EACX,CAAEA,UAAU,EAAED,KAAK,CACpB,CAAC;EACD,MAAM;IAAEU,uBAAuB;IAAEC;EAAyB,CAAC,GAC1DlB,WAAW,CAAEG,cAAe,CAAC;EAC9B,OACCgB,aAAA,CAACN,cAAc;IACdJ,IAAI,EAAGC,YAAY,IAAII,UAAU,GAAGJ,YAAY,GAAGD,IAAM;IACzDW,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKN,UAAU,EAAG;QACjBI,wBAAwB,CAAEX,KAAM,CAAC;MAClC,CAAC,MAAM;QACNU,uBAAuB,CAAEV,KAAK,EAAEC,UAAW,CAAC;MAC7C;IACD,CAAG;IAAA,GACEI;EAAK,CACV,CAAC;AAEJ;AAEA,eAAeR,wBAAwB,CAAEC,uBAAwB,CAAC"}
@@ -2,21 +2,19 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useEffect } from '@wordpress/element';
5
-
6
5
  const FullscreenMode = ({
7
6
  isActive
8
7
  }) => {
9
8
  useEffect(() => {
10
- let isSticky = false; // `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes
9
+ let isSticky = false;
10
+ // `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes
11
11
  // `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled
12
12
  // even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as
13
13
  // a consequence of the FullscreenMode setup.
14
-
15
14
  if (document.body.classList.contains('sticky-menu')) {
16
15
  isSticky = true;
17
16
  document.body.classList.remove('sticky-menu');
18
17
  }
19
-
20
18
  return () => {
21
19
  if (isSticky) {
22
20
  document.body.classList.add('sticky-menu');
@@ -29,7 +27,6 @@ const FullscreenMode = ({
29
27
  } else {
30
28
  document.body.classList.remove('is-fullscreen-mode');
31
29
  }
32
-
33
30
  return () => {
34
31
  if (isActive) {
35
32
  document.body.classList.remove('is-fullscreen-mode');
@@ -38,6 +35,5 @@ const FullscreenMode = ({
38
35
  }, [isActive]);
39
36
  return null;
40
37
  };
41
-
42
38
  export default FullscreenMode;
43
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/fullscreen-mode/index.js"],"names":["useEffect","FullscreenMode","isActive","isSticky","document","body","classList","contains","remove","add"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;;AAEA,MAAMC,cAAc,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAoB;AAC1CF,EAAAA,SAAS,CAAE,MAAM;AAChB,QAAIG,QAAQ,GAAG,KAAf,CADgB,CAEhB;AACA;AACA;AACA;;AACA,QAAKC,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBC,QAAxB,CAAkC,aAAlC,CAAL,EAAyD;AACxDJ,MAAAA,QAAQ,GAAG,IAAX;AACAC,MAAAA,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBE,MAAxB,CAAgC,aAAhC;AACA;;AAED,WAAO,MAAM;AACZ,UAAKL,QAAL,EAAgB;AACfC,QAAAA,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBG,GAAxB,CAA6B,aAA7B;AACA;AACD,KAJD;AAKA,GAhBQ,EAgBN,EAhBM,CAAT;AAkBAT,EAAAA,SAAS,CAAE,MAAM;AAChB,QAAKE,QAAL,EAAgB;AACfE,MAAAA,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBG,GAAxB,CAA6B,oBAA7B;AACA,KAFD,MAEO;AACNL,MAAAA,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBE,MAAxB,CAAgC,oBAAhC;AACA;;AAED,WAAO,MAAM;AACZ,UAAKN,QAAL,EAAgB;AACfE,QAAAA,QAAQ,CAACC,IAAT,CAAcC,SAAd,CAAwBE,MAAxB,CAAgC,oBAAhC;AACA;AACD,KAJD;AAKA,GAZQ,EAYN,CAAEN,QAAF,CAZM,CAAT;AAcA,SAAO,IAAP;AACA,CAlCD;;AAmCA,eAAeD,cAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\nconst FullscreenMode = ( { isActive } ) => {\n\tuseEffect( () => {\n\t\tlet isSticky = false;\n\t\t// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes\n\t\t// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled\n\t\t// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as\n\t\t// a consequence of the FullscreenMode setup.\n\t\tif ( document.body.classList.contains( 'sticky-menu' ) ) {\n\t\t\tisSticky = true;\n\t\t\tdocument.body.classList.remove( 'sticky-menu' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isSticky ) {\n\t\t\t\tdocument.body.classList.add( 'sticky-menu' );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tdocument.body.classList.add( 'is-fullscreen-mode' );\n\t\t} else {\n\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isActive ) {\n\t\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t\t}\n\t\t};\n\t}, [ isActive ] );\n\n\treturn null;\n};\nexport default FullscreenMode;\n"]}
1
+ {"version":3,"names":["useEffect","FullscreenMode","isActive","isSticky","document","body","classList","contains","remove","add"],"sources":["@wordpress/interface/src/components/fullscreen-mode/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\nconst FullscreenMode = ( { isActive } ) => {\n\tuseEffect( () => {\n\t\tlet isSticky = false;\n\t\t// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes\n\t\t// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled\n\t\t// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as\n\t\t// a consequence of the FullscreenMode setup.\n\t\tif ( document.body.classList.contains( 'sticky-menu' ) ) {\n\t\t\tisSticky = true;\n\t\t\tdocument.body.classList.remove( 'sticky-menu' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isSticky ) {\n\t\t\t\tdocument.body.classList.add( 'sticky-menu' );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tdocument.body.classList.add( 'is-fullscreen-mode' );\n\t\t} else {\n\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isActive ) {\n\t\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t\t}\n\t\t};\n\t}, [ isActive ] );\n\n\treturn null;\n};\nexport default FullscreenMode;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAE9C,MAAMC,cAAc,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC1CF,SAAS,CAAE,MAAM;IAChB,IAAIG,QAAQ,GAAG,KAAK;IACpB;IACA;IACA;IACA;IACA,IAAKC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,QAAQ,CAAE,aAAc,CAAC,EAAG;MACxDJ,QAAQ,GAAG,IAAI;MACfC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,aAAc,CAAC;IAChD;IAEA,OAAO,MAAM;MACZ,IAAKL,QAAQ,EAAG;QACfC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACG,GAAG,CAAE,aAAc,CAAC;MAC7C;IACD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEPT,SAAS,CAAE,MAAM;IAChB,IAAKE,QAAQ,EAAG;MACfE,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACG,GAAG,CAAE,oBAAqB,CAAC;IACpD,CAAC,MAAM;MACNL,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,oBAAqB,CAAC;IACvD;IAEA,OAAO,MAAM;MACZ,IAAKN,QAAQ,EAAG;QACfE,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,oBAAqB,CAAC;MACvD;IACD,CAAC;EACF,CAAC,EAAE,CAAEN,QAAQ,CAAG,CAAC;EAEjB,OAAO,IAAI;AACZ,CAAC;AACD,eAAeD,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/index.js"],"names":["default","ComplementaryArea","ComplementaryAreaMoreMenuItem","FullscreenMode","InterfaceSkeleton","PinnedItems","MoreMenuDropdown","MoreMenuFeatureToggle","ActionItem","PreferencesModal","PreferencesModalTabs","PreferencesModalSection","___unstablePreferencesModalBaseOption","NavigableRegion"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAApB,QAA6C,sBAA7C;AACA,SAASD,OAAO,IAAIE,6BAApB,QAAyD,qCAAzD;AACA,SAASF,OAAO,IAAIG,cAApB,QAA0C,mBAA1C;AACA,SAASH,OAAO,IAAII,iBAApB,QAA6C,sBAA7C;AACA,SAASJ,OAAO,IAAIK,WAApB,QAAuC,gBAAvC;AACA,SAASL,OAAO,IAAIM,gBAApB,QAA4C,sBAA5C;AACA,SAASN,OAAO,IAAIO,qBAApB,QAAiD,4BAAjD;AACA,SAASP,OAAO,IAAIQ,UAApB,QAAsC,eAAtC;AACA,SAASR,OAAO,IAAIS,gBAApB,QAA4C,qBAA5C;AACA,SAAST,OAAO,IAAIU,oBAApB,QAAgD,0BAAhD;AACA,SAASV,OAAO,IAAIW,uBAApB,QAAmD,6BAAnD;AACA,SAASX,OAAO,IAAIY,qCAApB,QAAiE,iCAAjE;AACA,SAASZ,OAAO,IAAIa,eAApB,QAA2C,oBAA3C","sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as ComplementaryAreaMoreMenuItem } from './complementary-area-more-menu-item';\nexport { default as FullscreenMode } from './fullscreen-mode';\nexport { default as InterfaceSkeleton } from './interface-skeleton';\nexport { default as PinnedItems } from './pinned-items';\nexport { default as MoreMenuDropdown } from './more-menu-dropdown';\nexport { default as MoreMenuFeatureToggle } from './more-menu-feature-toggle';\nexport { default as ActionItem } from './action-item';\nexport { default as PreferencesModal } from './preferences-modal';\nexport { default as PreferencesModalTabs } from './preferences-modal-tabs';\nexport { default as PreferencesModalSection } from './preferences-modal-section';\nexport { default as ___unstablePreferencesModalBaseOption } from './preferences-modal-base-option';\nexport { default as NavigableRegion } from './navigable-region';\n"]}
1
+ {"version":3,"names":["default","ComplementaryArea","ComplementaryAreaMoreMenuItem","FullscreenMode","InterfaceSkeleton","PinnedItems","MoreMenuDropdown","MoreMenuFeatureToggle","ActionItem","PreferencesModal","PreferencesModalTabs","PreferencesModalSection","___unstablePreferencesModalBaseOption","NavigableRegion"],"sources":["@wordpress/interface/src/components/index.js"],"sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as ComplementaryAreaMoreMenuItem } from './complementary-area-more-menu-item';\nexport { default as FullscreenMode } from './fullscreen-mode';\nexport { default as InterfaceSkeleton } from './interface-skeleton';\nexport { default as PinnedItems } from './pinned-items';\nexport { default as MoreMenuDropdown } from './more-menu-dropdown';\nexport { default as MoreMenuFeatureToggle } from './more-menu-feature-toggle';\nexport { default as ActionItem } from './action-item';\nexport { default as PreferencesModal } from './preferences-modal';\nexport { default as PreferencesModalTabs } from './preferences-modal-tabs';\nexport { default as PreferencesModalSection } from './preferences-modal-section';\nexport { default as ___unstablePreferencesModalBaseOption } from './preferences-modal-base-option';\nexport { default as NavigableRegion } from './navigable-region';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,sBAAsB;AACnE,SAASD,OAAO,IAAIE,6BAA6B,QAAQ,qCAAqC;AAC9F,SAASF,OAAO,IAAIG,cAAc,QAAQ,mBAAmB;AAC7D,SAASH,OAAO,IAAII,iBAAiB,QAAQ,sBAAsB;AACnE,SAASJ,OAAO,IAAIK,WAAW,QAAQ,gBAAgB;AACvD,SAASL,OAAO,IAAIM,gBAAgB,QAAQ,sBAAsB;AAClE,SAASN,OAAO,IAAIO,qBAAqB,QAAQ,4BAA4B;AAC7E,SAASP,OAAO,IAAIQ,UAAU,QAAQ,eAAe;AACrD,SAASR,OAAO,IAAIS,gBAAgB,QAAQ,qBAAqB;AACjE,SAAST,OAAO,IAAIU,oBAAoB,QAAQ,0BAA0B;AAC1E,SAASV,OAAO,IAAIW,uBAAuB,QAAQ,6BAA6B;AAChF,SAASX,OAAO,IAAIY,qCAAqC,QAAQ,iCAAiC;AAClG,SAASZ,OAAO,IAAIa,eAAe,QAAQ,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/interface/src/components/index.native.js"],"names":["default","ComplementaryArea","PinnedItems"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAApB,QAA6C,sBAA7C;AACA,SAASD,OAAO,IAAIE,WAApB,QAAuC,gBAAvC","sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as PinnedItems } from './pinned-items';\n"]}
1
+ {"version":3,"names":["default","ComplementaryArea","PinnedItems"],"sources":["@wordpress/interface/src/components/index.native.js"],"sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as PinnedItems } from './pinned-items';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,sBAAsB;AACnE,SAASD,OAAO,IAAIE,WAAW,QAAQ,gBAAgB"}
@@ -1,38 +1,33 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import classnames from 'classnames';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { forwardRef, useEffect } from '@wordpress/element';
12
11
  import { __unstableUseNavigateRegions as useNavigateRegions, __unstableMotion as motion } from '@wordpress/components';
13
12
  import { __ } from '@wordpress/i18n';
14
13
  import { useMergeRefs } from '@wordpress/compose';
14
+
15
15
  /**
16
16
  * Internal dependencies
17
17
  */
18
-
19
18
  import NavigableRegion from '../navigable-region';
20
-
21
19
  function useHTMLClass(className) {
22
20
  useEffect(() => {
23
21
  const element = document && document.querySelector(`html:not(.${className})`);
24
-
25
22
  if (!element) {
26
23
  return;
27
24
  }
28
-
29
25
  element.classList.toggle(className);
30
26
  return () => {
31
27
  element.classList.toggle(className);
32
28
  };
33
29
  }, [className]);
34
30
  }
35
-
36
31
  const headerVariants = {
37
32
  hidden: {
38
33
  opacity: 0
@@ -52,7 +47,6 @@ const headerVariants = {
52
47
  }
53
48
  }
54
49
  };
55
-
56
50
  function InterfaceSkeleton({
57
51
  isDistractionFree,
58
52
  footer,
@@ -62,6 +56,7 @@ function InterfaceSkeleton({
62
56
  secondarySidebar,
63
57
  notices,
64
58
  content,
59
+ contentProps,
65
60
  actions,
66
61
  labels,
67
62
  className,
@@ -75,26 +70,23 @@ function InterfaceSkeleton({
75
70
  const defaultLabels = {
76
71
  /* translators: accessibility text for the top bar landmark region. */
77
72
  header: __('Header'),
78
-
79
73
  /* translators: accessibility text for the content landmark region. */
80
74
  body: __('Content'),
81
-
82
75
  /* translators: accessibility text for the secondary sidebar landmark region. */
83
76
  secondarySidebar: __('Block Library'),
84
-
85
77
  /* translators: accessibility text for the settings landmark region. */
86
78
  sidebar: __('Settings'),
87
-
88
79
  /* translators: accessibility text for the publish landmark region. */
89
80
  actions: __('Publish'),
90
-
91
81
  /* translators: accessibility text for the footer landmark region. */
92
82
  footer: __('Footer')
93
83
  };
94
- const mergedLabels = { ...defaultLabels,
84
+ const mergedLabels = {
85
+ ...defaultLabels,
95
86
  ...labels
96
87
  };
97
- return createElement("div", { ...(enableRegionNavigation ? navigateRegionsProps : {}),
88
+ return createElement("div", {
89
+ ...(enableRegionNavigation ? navigateRegionsProps : {}),
98
90
  ref: useMergeRefs([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
99
91
  className: classnames(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer')
100
92
  }, createElement("div", {
@@ -122,7 +114,8 @@ function InterfaceSkeleton({
122
114
  className: "interface-interface-skeleton__notices"
123
115
  }, notices), createElement(NavigableRegion, {
124
116
  className: "interface-interface-skeleton__content",
125
- ariaLabel: mergedLabels.body
117
+ ariaLabel: mergedLabels.body,
118
+ ...contentProps
126
119
  }, content), !!sidebar && createElement(NavigableRegion, {
127
120
  className: "interface-interface-skeleton__sidebar",
128
121
  ariaLabel: mergedLabels.sidebar
@@ -134,6 +127,5 @@ function InterfaceSkeleton({
134
127
  ariaLabel: mergedLabels.footer
135
128
  }, footer));
136
129
  }
137
-
138
130
  export default forwardRef(InterfaceSkeleton);
139
131
  //# sourceMappingURL=index.js.map
@@ -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","headerVariants","hidden","opacity","hover","transition","type","delay","delayChildren","distractionFreeInactive","InterfaceSkeleton","isDistractionFree","footer","header","editorNotices","sidebar","secondarySidebar","notices","content","actions","labels","enableRegionNavigation","shortcuts","ref","navigateRegionsProps","defaultLabels","body","mergedLabels","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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AAiB,IAClB;AAAK,IAAA,SAAS,EAAC;AAAf,KACGG,aADH,CAhCF,EAoCC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,CAAC,CAAEE,gBAAH,IACD,cAAC,eAAD;AACC,IAAA,SAAS,EAAC,iDADX;AAEC,IAAA,SAAS,EAAGW,YAAY,CAACX;AAF1B,KAIGA,gBAJH,CAFF,EASG,CAAC,CAAEC,OAAH,IACD;AAAK,IAAA,SAAS,EAAC;AAAf,KACGA,OADH,CAVF,EAcC,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,eAAe3B,UAAU,CAAEyB,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\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\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>\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"]}
1
+ {"version":3,"names":["classnames","forwardRef","useEffect","__unstableUseNavigateRegions","useNavigateRegions","__unstableMotion","motion","__","useMergeRefs","NavigableRegion","useHTMLClass","className","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","defaultLabels","body","mergedLabels","createElement","undefined","as","div","initial","whileHover","animate","variants","ariaLabel"],"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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,SAAS,QAAQ,oBAAoB;AAC1D,SACCC,4BAA4B,IAAIC,kBAAkB,EAClDC,gBAAgB,IAAIC,MAAM,QACpB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AAEjD,SAASC,YAAYA,CAAEC,SAAS,EAAG;EAClCT,SAAS,CAAE,MAAM;IAChB,MAAMU,OAAO,GACZC,QAAQ,IAAIA,QAAQ,CAACC,aAAa,CAAG,aAAaH,SAAW,GAAG,CAAC;IAClE,IAAK,CAAEC,OAAO,EAAG;MAChB;IACD;IACAA,OAAO,CAACG,SAAS,CAACC,MAAM,CAAEL,SAAU,CAAC;IACrC,OAAO,MAAM;MACZC,OAAO,CAACG,SAAS,CAACC,MAAM,CAAEL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AC,EAChB,CAAC,CAAEH,OAAO,IACXc,aAAA,CAACpC,eAAe;IACfE,SAAS,EAAC,uCAAuC;IACjD0C,SAAS,EAAGT,YAAY,CAACb;EAAS,GAEhCA,OACc,CACjB,EACC,CAAC,CAAEK,OAAO,IACXS,aAAA,CAACpC,eAAe;IACfE,SAAS,EAAC,uCAAuC;IACjD0C,SAAS,EAAGT,YAAY,CAACR;EAAS,GAEhCA,OACc,CAEd,CACD,CAAC,EACJ,CAAC,CAAER,MAAM,IACViB,aAAA,CAACpC,eAAe;IACfE,SAAS,EAAC,sCAAsC;IAChD0C,SAAS,EAAGT,YAAY,CAAChB;EAAQ,GAE/BA,MACc,CAEd,CAAC;AAER;AAEA,eAAe3B,UAAU,CAAEyB,iBAAkB,CAAC"}
@@ -1,20 +1,18 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import classnames from 'classnames';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { DropdownMenu } from '@wordpress/components';
12
11
  import { __ } from '@wordpress/i18n';
13
12
  import { moreVertical } from '@wordpress/icons';
14
13
  export default function MoreMenuDropdown({
15
14
  as: DropdownComponent = DropdownMenu,
16
15
  className,
17
-
18
16
  /* translators: button label text should, if possible, be under 16 characters. */
19
17
  label = __('Options'),
20
18
  popoverProps,
@@ -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,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"]}
1
+ {"version":3,"names":["classnames","DropdownMenu","__","moreVertical","MoreMenuDropdown","as","DropdownComponent","className","label","popoverProps","toggleProps","children","createElement","icon","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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,kBAAkB;AAE/C,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,EAAE,EAAEC,iBAAiB,GAAGL,YAAY;EACpCM,SAAS;EACT;EACAC,KAAK,GAAGN,EAAE,CAAE,SAAU,CAAC;EACvBO,YAAY;EACZC,WAAW;EACXC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACN,iBAAiB;IACjBC,SAAS,EAAGP,UAAU,CACrB,8BAA8B,EAC9BO,SACD,CAAG;IACHM,IAAI,EAAGV,YAAc;IACrBK,KAAK,EAAGA,KAAO;IACfC,YAAY,EAAG;MACdK,SAAS,EAAE,YAAY;MACvB,GAAGL,YAAY;MACfF,SAAS,EAAEP,UAAU,CACpB,uCAAuC,EACvCS,YAAY,EAAEF,SACf;IACD,CAAG;IACHG,WAAW,EAAG;MACbK,eAAe,EAAE,QAAQ;MACzB,GAAGL;IACJ;EAAG,GAECM,OAAO,IAAML,QAAQ,CAAEK,OAAQ,CACjB,CAAC;AAEtB"}