@wordpress/interface 5.26.0 → 5.28.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 (68) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/action-item/index.js +1 -2
  3. package/build/components/action-item/index.js.map +1 -1
  4. package/build/components/complementary-area/index.js +1 -2
  5. package/build/components/complementary-area/index.js.map +1 -1
  6. package/build/components/complementary-area-context/index.js +1 -2
  7. package/build/components/complementary-area-context/index.js.map +1 -1
  8. package/build/components/complementary-area-header/index.js +1 -2
  9. package/build/components/complementary-area-header/index.js.map +1 -1
  10. package/build/components/complementary-area-toggle/index.js +1 -2
  11. package/build/components/complementary-area-toggle/index.js.map +1 -1
  12. package/build/components/fullscreen-mode/index.js +1 -2
  13. package/build/components/fullscreen-mode/index.js.map +1 -1
  14. package/build/components/index.js +0 -28
  15. package/build/components/index.js.map +1 -1
  16. package/build/components/interface-skeleton/index.js +2 -3
  17. package/build/components/interface-skeleton/index.js.map +1 -1
  18. package/build/components/pinned-items/index.js +1 -2
  19. package/build/components/pinned-items/index.js.map +1 -1
  20. package/build/store/constants.js +1 -2
  21. package/build/store/constants.js.map +1 -1
  22. package/build/store/index.js +3 -4
  23. package/build/store/index.js.map +1 -1
  24. package/build/store/reducer.js +1 -2
  25. package/build/store/reducer.js.map +1 -1
  26. package/build/store/selectors.js +4 -8
  27. package/build/store/selectors.js.map +1 -1
  28. package/build-module/components/index.js +0 -4
  29. package/build-module/components/index.js.map +1 -1
  30. package/build-module/components/interface-skeleton/index.js +2 -2
  31. package/build-module/components/interface-skeleton/index.js.map +1 -1
  32. package/build-style/style-rtl.css +2 -96
  33. package/build-style/style.css +2 -96
  34. package/lock-unlock.js +10 -0
  35. package/package.json +14 -13
  36. package/src/components/index.js +0 -4
  37. package/src/components/interface-skeleton/index.js +2 -2
  38. package/src/components/more-menu-dropdown/style.scss +1 -1
  39. package/src/components/pinned-items/style.scss +0 -3
  40. package/src/style.scss +0 -4
  41. package/build/components/preferences-modal/index.js +0 -24
  42. package/build/components/preferences-modal/index.js.map +0 -1
  43. package/build/components/preferences-modal-base-option/index.js +0 -32
  44. package/build/components/preferences-modal-base-option/index.js.map +0 -1
  45. package/build/components/preferences-modal-section/index.js +0 -25
  46. package/build/components/preferences-modal-section/index.js.map +0 -1
  47. package/build/components/preferences-modal-tabs/index.js +0 -111
  48. package/build/components/preferences-modal-tabs/index.js.map +0 -1
  49. package/build-module/components/preferences-modal/index.js +0 -17
  50. package/build-module/components/preferences-modal/index.js.map +0 -1
  51. package/build-module/components/preferences-modal-base-option/index.js +0 -24
  52. package/build-module/components/preferences-modal-base-option/index.js.map +0 -1
  53. package/build-module/components/preferences-modal-section/index.js +0 -18
  54. package/build-module/components/preferences-modal-section/index.js.map +0 -1
  55. package/build-module/components/preferences-modal-tabs/index.js +0 -104
  56. package/build-module/components/preferences-modal-tabs/index.js.map +0 -1
  57. package/src/components/preferences-modal/README.md +0 -69
  58. package/src/components/preferences-modal/index.js +0 -17
  59. package/src/components/preferences-modal/style.scss +0 -21
  60. package/src/components/preferences-modal-base-option/README.md +0 -42
  61. package/src/components/preferences-modal-base-option/index.js +0 -21
  62. package/src/components/preferences-modal-base-option/style.scss +0 -10
  63. package/src/components/preferences-modal-section/README.md +0 -30
  64. package/src/components/preferences-modal-section/index.js +0 -19
  65. package/src/components/preferences-modal-section/style.scss +0 -28
  66. package/src/components/preferences-modal-tabs/README.md +0 -14
  67. package/src/components/preferences-modal-tabs/index.js +0 -156
  68. package/src/components/preferences-modal-tabs/style.scss +0 -49
@@ -9,7 +9,7 @@ import classnames from 'classnames';
9
9
  */
10
10
  import { forwardRef, useEffect } from '@wordpress/element';
11
11
  import { __unstableUseNavigateRegions as useNavigateRegions, __unstableMotion as motion } from '@wordpress/components';
12
- import { __ } from '@wordpress/i18n';
12
+ import { __, _x } from '@wordpress/i18n';
13
13
  import { useMergeRefs } from '@wordpress/compose';
14
14
 
15
15
  /**
@@ -68,7 +68,7 @@ function InterfaceSkeleton({
68
68
  useHTMLClass('interface-interface-skeleton__html-container');
69
69
  const defaultLabels = {
70
70
  /* translators: accessibility text for the top bar landmark region. */
71
- header: __('Header'),
71
+ header: _x('Header', 'header landmark area'),
72
72
  /* translators: accessibility text for the content landmark region. */
73
73
  body: __('Content'),
74
74
  /* translators: accessibility text for the secondary sidebar landmark region. */
@@ -1 +1 @@
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","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\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"],"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,E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,SAAS,EAAGT,YAAY,CAACX;EAAkB,GAEzCA,gBACc,CACjB,EACC,CAAC,CAAEC,OAAO,IACXW,aAAA;IAAKjC,SAAS,EAAC;EAAuC,GACnDsB,OACE,CACL,EACDW,aAAA,CAACnC,eAAe;IACfE,SAAS,EAAC,uCAAuC;IACjDyC,SAAS,EAAGT,YAAY,CAACD;EAAM,GAE7BR,OACc,CAAC,EAChB,CAAC,CAAEH,OAAO,IACXa,aAAA,CAACnC,eAAe;IACfE,SAAS,EAAC,uCAAuC;IACjDyC,SAAS,EAAGT,YAAY,CAACZ;EAAS,GAEhCA,OACc,CACjB,EACC,CAAC,CAAEI,OAAO,IACXS,aAAA,CAACnC,eAAe;IACfE,SAAS,EAAC,uCAAuC;IACjDyC,SAAS,EAAGT,YAAY,CAACR;EAAS,GAEhCA,OACc,CAEd,CACD,CAAC,EACJ,CAAC,CAAEP,MAAM,IACVgB,aAAA,CAACnC,eAAe;IACfE,SAAS,EAAC,sCAAsC;IAChDyC,SAAS,EAAGT,YAAY,CAACf;EAAQ,GAE/BA,MACc,CAEd,CAAC;AAER;AAEA,eAAe3B,UAAU,CAAEyB,iBAAkB,CAAC"}
1
+ {"version":3,"names":["classnames","forwardRef","useEffect","__unstableUseNavigateRegions","useNavigateRegions","__unstableMotion","motion","__","_x","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","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 { __, _x } 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: _x( 'Header', 'header landmark area' ),\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"],"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,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AAEjD,SAASC,YAAYA,CAAEC,SAAS,EAAG;EAClCV,SAAS,CAAE,MAAM;IAChB,MAAMW,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,SAAU,CAAC;IACtC,CAAC;EACF,CAAC,EAAE,CAAEA,SAAS,CAAG,CAAC;AACnB;AAEA,MAAMM,cAAc,GAAG;EACtBC,MAAM,EAAE;IAAEC,OAAO,EAAE;EAAE,CAAC;EACtBC,KAAK,EAAE;IACND,OAAO,EAAE,CAAC;IACVE,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEC,KAAK,EAAE,GAAG;MAAEC,aAAa,EAAE;IAAI;EAC7D,CAAC;EACDC,uBAAuB,EAAE;IAAEN,OAAO,EAAE,CAAC;IAAEE,UAAU,EAAE;MAAEE,KAAK,EAAE;IAAE;EAAE;AACjE,CAAC;AAED,SAASG,iBAAiBA,CACzB;EACCC,iBAAiB;EAC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,iBAAkB,CAAC"}
@@ -97,7 +97,7 @@
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
99
  }
100
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
100
+ @media (min-resolution: 192dpi) {
101
101
  :root {
102
102
  --wp-admin-border-width-focus: 1.5px;
103
103
  }
@@ -451,7 +451,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
451
451
  }
452
452
 
453
453
  .interface-more-menu-dropdown__content .components-popover__content {
454
- min-width: 280px;
454
+ min-width: 300px;
455
455
  }
456
456
  @media (min-width: 480px) {
457
457
  .interface-more-menu-dropdown__content .components-popover__content {
@@ -469,7 +469,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
469
469
  .interface-pinned-items {
470
470
  display: flex;
471
471
  gap: 8px;
472
- margin-left: -4px;
473
472
  }
474
473
  .interface-pinned-items .components-button {
475
474
  display: none;
@@ -486,97 +485,4 @@ body.is-fullscreen-mode .interface-interface-skeleton {
486
485
  .interface-pinned-items .components-button {
487
486
  display: flex;
488
487
  }
489
- }
490
-
491
- @media (min-width: 600px) {
492
- .interface-preferences-modal {
493
- width: calc(100% - 32px);
494
- height: calc(100% - 120px);
495
- }
496
- }
497
- @media (min-width: 782px) {
498
- .interface-preferences-modal {
499
- width: 750px;
500
- }
501
- }
502
- @media (min-width: 960px) {
503
- .interface-preferences-modal {
504
- height: 70%;
505
- }
506
- }
507
- @media (max-width: 781px) {
508
- .interface-preferences-modal .components-modal__content {
509
- padding: 0;
510
- }
511
- }
512
-
513
- .interface-preferences__tabs .components-tab-panel__tabs {
514
- position: absolute;
515
- top: 84px;
516
- right: 16px;
517
- width: 160px;
518
- }
519
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
520
- border-radius: 2px;
521
- font-weight: 400;
522
- }
523
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
524
- background: #f0f0f0;
525
- box-shadow: none;
526
- font-weight: 500;
527
- }
528
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active::after {
529
- content: none;
530
- }
531
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
532
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
533
- outline: 2px solid transparent;
534
- }
535
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus-visible::before {
536
- content: none;
537
- }
538
- .interface-preferences__tabs .components-tab-panel__tab-content {
539
- padding-right: 24px;
540
- margin-right: 160px;
541
- }
542
-
543
- @media (max-width: 781px) {
544
- .interface-preferences__provider {
545
- height: 100%;
546
- }
547
- }
548
- .interface-preferences-modal__section {
549
- margin: 0 0 2.5rem 0;
550
- }
551
- .interface-preferences-modal__section:last-child {
552
- margin: 0;
553
- }
554
-
555
- .interface-preferences-modal__section-legend {
556
- margin-bottom: 8px;
557
- }
558
-
559
- .interface-preferences-modal__section-title {
560
- font-size: 0.9rem;
561
- font-weight: 600;
562
- margin-top: 0;
563
- }
564
-
565
- .interface-preferences-modal__section-description {
566
- margin: -8px 0 8px 0;
567
- font-size: 12px;
568
- font-style: normal;
569
- color: #757575;
570
- }
571
-
572
- .interface-preferences-modal__section:has(.interface-preferences-modal__section-content:empty) {
573
- display: none;
574
- }
575
-
576
- .interface-preferences-modal__option + .interface-preferences-modal__option {
577
- margin-top: 16px;
578
- }
579
- .interface-preferences-modal__option .components-base-control__help {
580
- margin-top: 0;
581
- margin-right: 48px;
582
488
  }
@@ -97,7 +97,7 @@
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
99
  }
100
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
100
+ @media (min-resolution: 192dpi) {
101
101
  :root {
102
102
  --wp-admin-border-width-focus: 1.5px;
103
103
  }
@@ -451,7 +451,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
451
451
  }
452
452
 
453
453
  .interface-more-menu-dropdown__content .components-popover__content {
454
- min-width: 280px;
454
+ min-width: 300px;
455
455
  }
456
456
  @media (min-width: 480px) {
457
457
  .interface-more-menu-dropdown__content .components-popover__content {
@@ -469,7 +469,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
469
469
  .interface-pinned-items {
470
470
  display: flex;
471
471
  gap: 8px;
472
- margin-right: -4px;
473
472
  }
474
473
  .interface-pinned-items .components-button {
475
474
  display: none;
@@ -486,97 +485,4 @@ body.is-fullscreen-mode .interface-interface-skeleton {
486
485
  .interface-pinned-items .components-button {
487
486
  display: flex;
488
487
  }
489
- }
490
-
491
- @media (min-width: 600px) {
492
- .interface-preferences-modal {
493
- width: calc(100% - 32px);
494
- height: calc(100% - 120px);
495
- }
496
- }
497
- @media (min-width: 782px) {
498
- .interface-preferences-modal {
499
- width: 750px;
500
- }
501
- }
502
- @media (min-width: 960px) {
503
- .interface-preferences-modal {
504
- height: 70%;
505
- }
506
- }
507
- @media (max-width: 781px) {
508
- .interface-preferences-modal .components-modal__content {
509
- padding: 0;
510
- }
511
- }
512
-
513
- .interface-preferences__tabs .components-tab-panel__tabs {
514
- position: absolute;
515
- top: 84px;
516
- left: 16px;
517
- width: 160px;
518
- }
519
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
520
- border-radius: 2px;
521
- font-weight: 400;
522
- }
523
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
524
- background: #f0f0f0;
525
- box-shadow: none;
526
- font-weight: 500;
527
- }
528
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active::after {
529
- content: none;
530
- }
531
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
532
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
533
- outline: 2px solid transparent;
534
- }
535
- .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus-visible::before {
536
- content: none;
537
- }
538
- .interface-preferences__tabs .components-tab-panel__tab-content {
539
- padding-left: 24px;
540
- margin-left: 160px;
541
- }
542
-
543
- @media (max-width: 781px) {
544
- .interface-preferences__provider {
545
- height: 100%;
546
- }
547
- }
548
- .interface-preferences-modal__section {
549
- margin: 0 0 2.5rem 0;
550
- }
551
- .interface-preferences-modal__section:last-child {
552
- margin: 0;
553
- }
554
-
555
- .interface-preferences-modal__section-legend {
556
- margin-bottom: 8px;
557
- }
558
-
559
- .interface-preferences-modal__section-title {
560
- font-size: 0.9rem;
561
- font-weight: 600;
562
- margin-top: 0;
563
- }
564
-
565
- .interface-preferences-modal__section-description {
566
- margin: -8px 0 8px 0;
567
- font-size: 12px;
568
- font-style: normal;
569
- color: #757575;
570
- }
571
-
572
- .interface-preferences-modal__section:has(.interface-preferences-modal__section-content:empty) {
573
- display: none;
574
- }
575
-
576
- .interface-preferences-modal__option + .interface-preferences-modal__option {
577
- margin-top: 16px;
578
- }
579
- .interface-preferences-modal__option .components-base-control__help {
580
- margin-top: 0;
581
- margin-left: 48px;
582
488
  }
package/lock-unlock.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
5
+
6
+ export const { lock, unlock } =
7
+ __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
+ 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
9
+ '@wordpress/interface'
10
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/interface",
3
- "version": "5.26.0",
3
+ "version": "5.28.0",
4
4
  "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,17 +32,18 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
- "@wordpress/a11y": "^3.49.0",
36
- "@wordpress/components": "^25.15.0",
37
- "@wordpress/compose": "^6.26.0",
38
- "@wordpress/data": "^9.19.0",
39
- "@wordpress/deprecated": "^3.49.0",
40
- "@wordpress/element": "^5.26.0",
41
- "@wordpress/i18n": "^4.49.0",
42
- "@wordpress/icons": "^9.40.0",
43
- "@wordpress/plugins": "^6.17.0",
44
- "@wordpress/preferences": "^3.26.0",
45
- "@wordpress/viewport": "^5.26.0",
35
+ "@wordpress/a11y": "^3.51.0",
36
+ "@wordpress/components": "^26.0.0",
37
+ "@wordpress/compose": "^6.28.0",
38
+ "@wordpress/data": "^9.21.0",
39
+ "@wordpress/deprecated": "^3.51.0",
40
+ "@wordpress/element": "^5.28.0",
41
+ "@wordpress/i18n": "^4.51.0",
42
+ "@wordpress/icons": "^9.42.0",
43
+ "@wordpress/plugins": "^6.19.0",
44
+ "@wordpress/preferences": "^3.28.0",
45
+ "@wordpress/private-apis": "^0.33.0",
46
+ "@wordpress/viewport": "^5.28.0",
46
47
  "classnames": "^2.3.1"
47
48
  },
48
49
  "peerDependencies": {
@@ -52,5 +53,5 @@
52
53
  "publishConfig": {
53
54
  "access": "public"
54
55
  },
55
- "gitHead": "5e6f9caa205d3bfdbac131952b7bf9c6ec60569b"
56
+ "gitHead": "eb796371e9630636a4a8837033807b0c4a06ed67"
56
57
  }
@@ -6,8 +6,4 @@ export { default as PinnedItems } from './pinned-items';
6
6
  export { default as MoreMenuDropdown } from './more-menu-dropdown';
7
7
  export { default as MoreMenuFeatureToggle } from './more-menu-feature-toggle';
8
8
  export { default as ActionItem } from './action-item';
9
- export { default as PreferencesModal } from './preferences-modal';
10
- export { default as PreferencesModalTabs } from './preferences-modal-tabs';
11
- export { default as PreferencesModalSection } from './preferences-modal-section';
12
- export { default as ___unstablePreferencesModalBaseOption } from './preferences-modal-base-option';
13
9
  export { default as NavigableRegion } from './navigable-region';
@@ -11,7 +11,7 @@ import {
11
11
  __unstableUseNavigateRegions as useNavigateRegions,
12
12
  __unstableMotion as motion,
13
13
  } from '@wordpress/components';
14
- import { __ } from '@wordpress/i18n';
14
+ import { __, _x } from '@wordpress/i18n';
15
15
  import { useMergeRefs } from '@wordpress/compose';
16
16
 
17
17
  /**
@@ -68,7 +68,7 @@ function InterfaceSkeleton(
68
68
 
69
69
  const defaultLabels = {
70
70
  /* translators: accessibility text for the top bar landmark region. */
71
- header: __( 'Header' ),
71
+ header: _x( 'Header', 'header landmark area' ),
72
72
  /* translators: accessibility text for the content landmark region. */
73
73
  body: __( 'Content' ),
74
74
  /* translators: accessibility text for the secondary sidebar landmark region. */
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  .interface-more-menu-dropdown__content .components-popover__content {
20
- min-width: 280px;
20
+ min-width: 300px;
21
21
 
22
22
  // Let the menu scale to fit items.
23
23
  @include break-mobile() {
@@ -27,7 +27,4 @@
27
27
 
28
28
  // Gap between pinned items.
29
29
  gap: $grid-unit-10;
30
-
31
- // Account for larger grid from parent container gap.
32
- margin-right: -$grid-unit-05;
33
30
  }
package/src/style.scss CHANGED
@@ -4,7 +4,3 @@
4
4
  @import "./components/interface-skeleton/style.scss";
5
5
  @import "./components/more-menu-dropdown/style.scss";
6
6
  @import "./components/pinned-items/style.scss";
7
- @import "./components/preferences-modal/style.scss";
8
- @import "./components/preferences-modal-tabs/style.scss";
9
- @import "./components/preferences-modal-section/style.scss";
10
- @import "./components/preferences-modal-base-option/style.scss";
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = PreferencesModal;
7
- var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- var _i18n = require("@wordpress/i18n");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- function PreferencesModal({
15
- closeModal,
16
- children
17
- }) {
18
- return (0, _react.createElement)(_components.Modal, {
19
- className: "interface-preferences-modal",
20
- title: (0, _i18n.__)('Preferences'),
21
- onRequestClose: closeModal
22
- }, children);
23
- }
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_i18n","PreferencesModal","closeModal","children","_react","createElement","Modal","className","title","__","onRequestClose"],"sources":["@wordpress/interface/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PreferencesModal( { closeModal, children } ) {\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"interface-preferences-modal\"\n\t\t\ttitle={ __( 'Preferences' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t>\n\t\t\t{ children }\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIe,SAASE,gBAAgBA,CAAE;EAAEC,UAAU;EAAEC;AAAS,CAAC,EAAG;EACpE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,WAAA,CAAAQ,KAAK;IACLC,SAAS,EAAC,6BAA6B;IACvCC,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;IAC7BC,cAAc,EAAGR;EAAY,GAE3BC,QACI,CAAC;AAEV"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- /**
10
- * WordPress dependencies
11
- */
12
-
13
- function BaseOption({
14
- help,
15
- label,
16
- isChecked,
17
- onChange,
18
- children
19
- }) {
20
- return (0, _react.createElement)("div", {
21
- className: "interface-preferences-modal__option"
22
- }, (0, _react.createElement)(_components.ToggleControl, {
23
- __nextHasNoMarginBottom: true,
24
- help: help,
25
- label: label,
26
- checked: isChecked,
27
- onChange: onChange
28
- }), children);
29
- }
30
- var _default = BaseOption;
31
- exports.default = _default;
32
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","BaseOption","help","label","isChecked","onChange","children","_react","createElement","className","ToggleControl","__nextHasNoMarginBottom","checked","_default","exports","default"],"sources":["@wordpress/interface/src/components/preferences-modal-base-option/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\n\nfunction BaseOption( { help, label, isChecked, onChange, children } ) {\n\treturn (\n\t\t<div className=\"interface-preferences-modal__option\">\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\thelp={ help }\n\t\t\t\tlabel={ label }\n\t\t\t\tchecked={ isChecked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default BaseOption;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAEC;AAAS,CAAC,EAAG;EACrE,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAqC,GACnD,IAAAF,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAW,aAAa;IACbC,uBAAuB;IACvBT,IAAI,EAAGA,IAAM;IACbC,KAAK,EAAGA,KAAO;IACfS,OAAO,EAAGR,SAAW;IACrBC,QAAQ,EAAGA;EAAU,CACrB,CAAC,EACAC,QACE,CAAC;AAER;AAAC,IAAAO,QAAA,GAEcZ,UAAU;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- const Section = ({
9
- description,
10
- title,
11
- children
12
- }) => (0, _react.createElement)("fieldset", {
13
- className: "interface-preferences-modal__section"
14
- }, (0, _react.createElement)("legend", {
15
- className: "interface-preferences-modal__section-legend"
16
- }, (0, _react.createElement)("h2", {
17
- className: "interface-preferences-modal__section-title"
18
- }, title), description && (0, _react.createElement)("p", {
19
- className: "interface-preferences-modal__section-description"
20
- }, description)), (0, _react.createElement)("div", {
21
- className: "interface-preferences-modal__section-content"
22
- }, children));
23
- var _default = Section;
24
- exports.default = _default;
25
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Section","description","title","children","_react","createElement","className","_default","exports","default"],"sources":["@wordpress/interface/src/components/preferences-modal-section/index.js"],"sourcesContent":["const Section = ( { description, title, children } ) => (\n\t<fieldset className=\"interface-preferences-modal__section\">\n\t\t<legend className=\"interface-preferences-modal__section-legend\">\n\t\t\t<h2 className=\"interface-preferences-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"interface-preferences-modal__section-description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</legend>\n\t\t<div className=\"interface-preferences-modal__section-content\">\n\t\t\t{ children }\n\t\t</div>\n\t</fieldset>\n);\n\nexport default Section;\n"],"mappings":";;;;;;;AAAA,MAAMA,OAAO,GAAGA,CAAE;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAS,CAAC,KACjD,IAAAC,MAAA,CAAAC,aAAA;EAAUC,SAAS,EAAC;AAAsC,GACzD,IAAAF,MAAA,CAAAC,aAAA;EAAQC,SAAS,EAAC;AAA6C,GAC9D,IAAAF,MAAA,CAAAC,aAAA;EAAIC,SAAS,EAAC;AAA4C,GACvDJ,KACC,CAAC,EACHD,WAAW,IACZ,IAAAG,MAAA,CAAAC,aAAA;EAAGC,SAAS,EAAC;AAAkD,GAC5DL,WACA,CAEG,CAAC,EACT,IAAAG,MAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAA8C,GAC1DH,QACE,CACI,CACV;AAAC,IAAAI,QAAA,GAEaP,OAAO;AAAAQ,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1,111 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = PreferencesModalTabs;
7
- var _react = require("react");
8
- var _compose = require("@wordpress/compose");
9
- var _components = require("@wordpress/components");
10
- var _element = require("@wordpress/element");
11
- var _icons = require("@wordpress/icons");
12
- var _i18n = require("@wordpress/i18n");
13
- /**
14
- * WordPress dependencies
15
- */
16
-
17
- const PREFERENCES_MENU = 'preferences-menu';
18
- function PreferencesModalTabs({
19
- sections
20
- }) {
21
- const isLargeViewport = (0, _compose.useViewportMatch)('medium');
22
-
23
- // This is also used to sync the two different rendered components
24
- // between small and large viewports.
25
- const [activeMenu, setActiveMenu] = (0, _element.useState)(PREFERENCES_MENU);
26
- /**
27
- * Create helper objects from `sections` for easier data handling.
28
- * `tabs` is used for creating the `TabPanel` and `sectionsContentMap`
29
- * is used for easier access to active tab's content.
30
- */
31
- const {
32
- tabs,
33
- sectionsContentMap
34
- } = (0, _element.useMemo)(() => {
35
- let mappedTabs = {
36
- tabs: [],
37
- sectionsContentMap: {}
38
- };
39
- if (sections.length) {
40
- mappedTabs = sections.reduce((accumulator, {
41
- name,
42
- tabLabel: title,
43
- content
44
- }) => {
45
- accumulator.tabs.push({
46
- name,
47
- title
48
- });
49
- accumulator.sectionsContentMap[name] = content;
50
- return accumulator;
51
- }, {
52
- tabs: [],
53
- sectionsContentMap: {}
54
- });
55
- }
56
- return mappedTabs;
57
- }, [sections]);
58
- const getCurrentTab = (0, _element.useCallback)(tab => sectionsContentMap[tab.name] || null, [sectionsContentMap]);
59
- let modalContent;
60
- // We render different components based on the viewport size.
61
- if (isLargeViewport) {
62
- modalContent = (0, _react.createElement)(_components.TabPanel, {
63
- className: "interface-preferences__tabs",
64
- tabs: tabs,
65
- initialTabName: activeMenu !== PREFERENCES_MENU ? activeMenu : undefined,
66
- onSelect: setActiveMenu,
67
- orientation: "vertical"
68
- }, getCurrentTab);
69
- } else {
70
- modalContent = (0, _react.createElement)(_components.__experimentalNavigatorProvider, {
71
- initialPath: "/",
72
- className: "interface-preferences__provider"
73
- }, (0, _react.createElement)(_components.__experimentalNavigatorScreen, {
74
- path: "/"
75
- }, (0, _react.createElement)(_components.Card, {
76
- isBorderless: true,
77
- size: "small"
78
- }, (0, _react.createElement)(_components.CardBody, null, (0, _react.createElement)(_components.__experimentalItemGroup, null, tabs.map(tab => {
79
- return (0, _react.createElement)(_components.__experimentalNavigatorButton, {
80
- key: tab.name,
81
- path: tab.name,
82
- as: _components.__experimentalItem,
83
- isAction: true
84
- }, (0, _react.createElement)(_components.__experimentalHStack, {
85
- justify: "space-between"
86
- }, (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_components.__experimentalTruncate, null, tab.title)), (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_icons.Icon, {
87
- icon: (0, _i18n.isRTL)() ? _icons.chevronLeft : _icons.chevronRight
88
- }))));
89
- }))))), sections.length && sections.map(section => {
90
- return (0, _react.createElement)(_components.__experimentalNavigatorScreen, {
91
- key: `${section.name}-menu`,
92
- path: section.name
93
- }, (0, _react.createElement)(_components.Card, {
94
- isBorderless: true,
95
- size: "large"
96
- }, (0, _react.createElement)(_components.CardHeader, {
97
- isBorderless: false,
98
- justify: "left",
99
- size: "small",
100
- gap: "6"
101
- }, (0, _react.createElement)(_components.__experimentalNavigatorBackButton, {
102
- icon: (0, _i18n.isRTL)() ? _icons.chevronRight : _icons.chevronLeft,
103
- "aria-label": (0, _i18n.__)('Navigate to the previous view')
104
- }), (0, _react.createElement)(_components.__experimentalText, {
105
- size: "16"
106
- }, section.tabLabel)), (0, _react.createElement)(_components.CardBody, null, section.content)));
107
- }));
108
- }
109
- return modalContent;
110
- }
111
- //# sourceMappingURL=index.js.map