@wordpress/block-library 6.0.3 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/buttons/deprecated.js +11 -7
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +1 -4
- package/build/buttons/edit.js.map +1 -1
- package/build/column/index.js +1 -1
- package/build/cover/index.js +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/use-mobile-warning.js +2 -2
- package/build/gallery/use-mobile-warning.js.map +1 -1
- package/build/group/index.js +1 -1
- package/build/navigation/edit/placeholder/index.js +2 -2
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +1 -2
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/index.js +2 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/view.js +29 -26
- package/build/navigation/view.js.map +1 -1
- package/build-module/buttons/deprecated.js +11 -7
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js +2 -5
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/column/index.js +1 -1
- package/build-module/cover/index.js +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/use-mobile-warning.js +2 -2
- package/build-module/gallery/use-mobile-warning.js.map +1 -1
- package/build-module/group/index.js +1 -1
- package/build-module/navigation/edit/placeholder/index.js +2 -2
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +1 -2
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/index.js +2 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/view.js +28 -26
- package/build-module/navigation/view.js.map +1 -1
- package/build-style/navigation/style-rtl.css +14 -16
- package/build-style/navigation/style.css +14 -16
- package/build-style/navigation-submenu/style-rtl.css +1 -0
- package/build-style/navigation-submenu/style.css +1 -0
- package/build-style/page-list/style-rtl.css +5 -2
- package/build-style/page-list/style.css +5 -2
- package/build-style/style-rtl.css +20 -22
- package/build-style/style.css +20 -22
- package/package.json +4 -4
- package/src/buttons/deprecated.js +11 -8
- package/src/buttons/edit.js +0 -5
- package/src/column/block.json +1 -1
- package/src/cover/block.json +1 -1
- package/src/gallery/edit.js +3 -1
- package/src/gallery/use-mobile-warning.js +2 -2
- package/src/group/block.json +1 -1
- package/src/navigation/block.json +2 -1
- package/src/navigation/edit/placeholder/index.js +2 -2
- package/src/navigation/edit/responsive-wrapper.js +1 -5
- package/src/navigation/index.php +1 -112
- package/src/navigation/style.scss +17 -16
- package/src/navigation/view.js +33 -32
- package/src/navigation-submenu/style.scss +4 -0
- package/src/page-list/style.scss +5 -2
- package/src/style.scss +0 -1
- package/build-style/post-content/style-rtl.css +0 -79
- package/build-style/post-content/style.css +0 -79
- package/src/post-content/style.scss +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/navigation/view.js"],"names":["MicroModal","navigationToggleModal","modal","triggerButton","document","querySelector","id","closeButton","isHidden","getAttribute","setAttribute","classList","toggle","htmlElement","documentElement","closeSubmenus","element","querySelectorAll","forEach","toggleSubmenuOnClick","event","buttonToggle","target","closest","isSubmenuOpen","parentElement","navigationParent","child","
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/navigation/view.js"],"names":["MicroModal","navigationToggleModal","modal","triggerButton","document","querySelector","id","closeButton","isHidden","getAttribute","setAttribute","classList","toggle","htmlElement","documentElement","closeSubmenus","element","querySelectorAll","forEach","toggleSubmenuOnClick","event","buttonToggle","target","closest","isSubmenuOpen","parentElement","navigationParent","child","window","onload","init","onShow","onClose","openClass","submenuButtons","button","addEventListener","navigationBlocks","block","contains","submenuBlocks"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB,C,CAEA;;AACA,SAASC,qBAAT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D,UAAMoB,aAAa,GAAGpC,QAAQ,CAACa,gBAAT,CACrB,qCADqB,CAAtB;AAGAuB,IAAAA,aAAa,CAACtB,OAAd,CAAuB,UAAWoB,KAAX,EAAmB;AACzC,UAAK,CAAEA,KAAK,CAACC,QAAN,CAAgBnB,KAAK,CAACE,MAAtB,CAAP,EAAwC;AACvCP,QAAAA,aAAa,CAAEuB,KAAF,CAAb;AACA;AACD,KAJD;AAKA,GATD;AAUA,CArCD","sourcesContent":["/**\n * External dependencies\n */\nimport MicroModal from 'micromodal';\n\n// Responsive navigation toggle.\nfunction navigationToggleModal( modal ) {\n\tconst triggerButton = document.querySelector(\n\t\t`button[data-micromodal-trigger=\"${ modal.id }\"]`\n\t);\n\tconst closeButton = modal.querySelector( 'button[data-micromodal-close]' );\n\t// Use aria-hidden to determine the status of the modal, as this attribute is\n\t// managed by micromodal.\n\tconst isHidden = 'true' === modal.getAttribute( 'aria-hidden' );\n\ttriggerButton.setAttribute( 'aria-expanded', ! isHidden );\n\tcloseButton.setAttribute( 'aria-expanded', ! isHidden );\n\tmodal.classList.toggle( 'has-modal-open', ! isHidden );\n\n\t// Add a class to indicate the modal is open.\n\tconst htmlElement = document.documentElement;\n\thtmlElement.classList.toggle( 'has-modal-open' );\n}\n\n// Open on click functionality.\nfunction closeSubmenus( element ) {\n\telement\n\t\t.querySelectorAll( '[aria-expanded=\"true\"]' )\n\t\t.forEach( function ( toggle ) {\n\t\t\ttoggle.setAttribute( 'aria-expanded', 'false' );\n\t\t} );\n}\n\nfunction toggleSubmenuOnClick( event ) {\n\tconst buttonToggle = event.target.closest( '[aria-expanded]' );\n\tconst isSubmenuOpen = buttonToggle.getAttribute( 'aria-expanded' );\n\n\tif ( isSubmenuOpen === 'true' ) {\n\t\tcloseSubmenus( buttonToggle.closest( '.wp-block-navigation-item' ) );\n\t} else {\n\t\t// Close all sibling submenus.\n\t\tconst parentElement = buttonToggle.closest(\n\t\t\t'.wp-block-navigation-item'\n\t\t);\n\t\tconst navigationParent = buttonToggle.closest(\n\t\t\t'.wp-block-navigation__submenu-container, .wp-block-navigation__container, .wp-block-page-list'\n\t\t);\n\t\tnavigationParent\n\t\t\t.querySelectorAll( '.wp-block-navigation-item' )\n\t\t\t.forEach( function ( child ) {\n\t\t\t\tif ( child !== parentElement ) {\n\t\t\t\t\tcloseSubmenus( child );\n\t\t\t\t}\n\t\t\t} );\n\t\t// Open submenu.\n\t\tbuttonToggle.setAttribute( 'aria-expanded', 'true' );\n\t}\n}\n\n// Necessary for some themes such as TT1 Blocks, where\n// scripts could be loaded before the body.\nwindow.onload = () => {\n\tMicroModal.init( {\n\t\tonShow: navigationToggleModal,\n\t\tonClose: navigationToggleModal,\n\t\topenClass: 'is-menu-open',\n\t} );\n\n\tconst submenuButtons = document.querySelectorAll(\n\t\t'.wp-block-navigation-submenu__toggle'\n\t);\n\n\tsubmenuButtons.forEach( function ( button ) {\n\t\tbutton.addEventListener( 'click', toggleSubmenuOnClick );\n\t} );\n\n\t// Close on click outside.\n\tdocument.addEventListener( 'click', function ( event ) {\n\t\tconst navigationBlocks = document.querySelectorAll(\n\t\t\t'.wp-block-navigation'\n\t\t);\n\t\tnavigationBlocks.forEach( function ( block ) {\n\t\t\tif ( ! block.contains( event.target ) ) {\n\t\t\t\tcloseSubmenus( block );\n\t\t\t}\n\t\t} );\n\t} );\n\t// Close on focus outside.\n\tdocument.addEventListener( 'keyup', function ( event ) {\n\t\tconst submenuBlocks = document.querySelectorAll(\n\t\t\t'.wp-block-navigation-item.has-child'\n\t\t);\n\t\tsubmenuBlocks.forEach( function ( block ) {\n\t\t\tif ( ! block.contains( event.target ) ) {\n\t\t\t\tcloseSubmenus( block );\n\t\t\t}\n\t\t} );\n\t} );\n};\n"]}
|
|
@@ -264,6 +264,11 @@
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
.wp-block-navigation__container {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
269
|
+
flex-direction: var(--layout-direction, initial);
|
|
270
|
+
justify-content: var(--layout-justify, initial);
|
|
271
|
+
align-items: var(--layout-align, initial);
|
|
267
272
|
list-style: none;
|
|
268
273
|
margin: 0;
|
|
269
274
|
padding-right: 0;
|
|
@@ -284,7 +289,11 @@
|
|
|
284
289
|
bottom: 0;
|
|
285
290
|
}
|
|
286
291
|
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
|
|
287
|
-
display:
|
|
292
|
+
display: flex;
|
|
293
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
294
|
+
flex-direction: var(--layout-direction, initial);
|
|
295
|
+
justify-content: var(--layout-justify, initial);
|
|
296
|
+
align-items: var(--layout-align, initial);
|
|
288
297
|
}
|
|
289
298
|
.wp-block-navigation__responsive-container.is-menu-open {
|
|
290
299
|
display: flex;
|
|
@@ -293,12 +302,12 @@
|
|
|
293
302
|
z-index: 100000;
|
|
294
303
|
padding: 72px 24px 24px 24px;
|
|
295
304
|
background-color: inherit;
|
|
296
|
-
align-items: inherit;
|
|
297
305
|
}
|
|
298
306
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
|
|
299
307
|
display: flex;
|
|
300
308
|
flex-direction: column;
|
|
301
|
-
align-items: var(--justification-setting, inherit);
|
|
309
|
+
align-items: var(--layout-justification-setting, inherit);
|
|
310
|
+
justify-content: flex-start;
|
|
302
311
|
overflow: auto;
|
|
303
312
|
padding: 0;
|
|
304
313
|
}
|
|
@@ -336,7 +345,7 @@
|
|
|
336
345
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
|
|
337
346
|
display: flex;
|
|
338
347
|
flex-direction: column;
|
|
339
|
-
align-items: var(--justification-setting,
|
|
348
|
+
align-items: var(--layout-justification-setting, initial);
|
|
340
349
|
}
|
|
341
350
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
|
|
342
351
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
|
|
@@ -349,7 +358,7 @@
|
|
|
349
358
|
}
|
|
350
359
|
@media (min-width: 600px) {
|
|
351
360
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
|
|
352
|
-
display:
|
|
361
|
+
display: block;
|
|
353
362
|
width: 100%;
|
|
354
363
|
position: relative;
|
|
355
364
|
z-index: 2;
|
|
@@ -416,15 +425,4 @@
|
|
|
416
425
|
|
|
417
426
|
html.has-modal-open {
|
|
418
427
|
overflow: hidden;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.wp-block-navigation__responsive-close,
|
|
422
|
-
.wp-block-navigation__responsive-dialog,
|
|
423
|
-
.wp-block-navigation__container {
|
|
424
|
-
display: contents;
|
|
425
|
-
}
|
|
426
|
-
.is-menu-open .wp-block-navigation__responsive-close,
|
|
427
|
-
.is-menu-open .wp-block-navigation__responsive-dialog,
|
|
428
|
-
.is-menu-open .wp-block-navigation__container {
|
|
429
|
-
align-items: inherit;
|
|
430
428
|
}
|
|
@@ -264,6 +264,11 @@
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
.wp-block-navigation__container {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
269
|
+
flex-direction: var(--layout-direction, initial);
|
|
270
|
+
justify-content: var(--layout-justify, initial);
|
|
271
|
+
align-items: var(--layout-align, initial);
|
|
267
272
|
list-style: none;
|
|
268
273
|
margin: 0;
|
|
269
274
|
padding-left: 0;
|
|
@@ -284,7 +289,11 @@
|
|
|
284
289
|
bottom: 0;
|
|
285
290
|
}
|
|
286
291
|
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
|
|
287
|
-
display:
|
|
292
|
+
display: flex;
|
|
293
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
294
|
+
flex-direction: var(--layout-direction, initial);
|
|
295
|
+
justify-content: var(--layout-justify, initial);
|
|
296
|
+
align-items: var(--layout-align, initial);
|
|
288
297
|
}
|
|
289
298
|
.wp-block-navigation__responsive-container.is-menu-open {
|
|
290
299
|
display: flex;
|
|
@@ -293,12 +302,12 @@
|
|
|
293
302
|
z-index: 100000;
|
|
294
303
|
padding: 72px 24px 24px 24px;
|
|
295
304
|
background-color: inherit;
|
|
296
|
-
align-items: inherit;
|
|
297
305
|
}
|
|
298
306
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
|
|
299
307
|
display: flex;
|
|
300
308
|
flex-direction: column;
|
|
301
|
-
align-items: var(--justification-setting, inherit);
|
|
309
|
+
align-items: var(--layout-justification-setting, inherit);
|
|
310
|
+
justify-content: flex-start;
|
|
302
311
|
overflow: auto;
|
|
303
312
|
padding: 0;
|
|
304
313
|
}
|
|
@@ -336,7 +345,7 @@
|
|
|
336
345
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
|
|
337
346
|
display: flex;
|
|
338
347
|
flex-direction: column;
|
|
339
|
-
align-items: var(--justification-setting,
|
|
348
|
+
align-items: var(--layout-justification-setting, initial);
|
|
340
349
|
}
|
|
341
350
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
|
|
342
351
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
|
|
@@ -349,7 +358,7 @@
|
|
|
349
358
|
}
|
|
350
359
|
@media (min-width: 600px) {
|
|
351
360
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
|
|
352
|
-
display:
|
|
361
|
+
display: block;
|
|
353
362
|
width: 100%;
|
|
354
363
|
position: relative;
|
|
355
364
|
z-index: 2;
|
|
@@ -416,15 +425,4 @@
|
|
|
416
425
|
|
|
417
426
|
html.has-modal-open {
|
|
418
427
|
overflow: hidden;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.wp-block-navigation__responsive-close,
|
|
422
|
-
.wp-block-navigation__responsive-dialog,
|
|
423
|
-
.wp-block-navigation__container {
|
|
424
|
-
display: contents;
|
|
425
|
-
}
|
|
426
|
-
.is-menu-open .wp-block-navigation__responsive-close,
|
|
427
|
-
.is-menu-open .wp-block-navigation__responsive-dialog,
|
|
428
|
-
.is-menu-open .wp-block-navigation__container {
|
|
429
|
-
align-items: inherit;
|
|
430
428
|
}
|
|
@@ -75,8 +75,11 @@
|
|
|
75
75
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
76
76
|
*/
|
|
77
77
|
.wp-block-navigation .wp-block-page-list {
|
|
78
|
-
display:
|
|
79
|
-
flex-
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: var(--layout-direction, initial);
|
|
80
|
+
justify-content: var(--layout-justify, initial);
|
|
81
|
+
align-items: var(--layout-align, initial);
|
|
82
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
80
83
|
background-color: inherit;
|
|
81
84
|
}
|
|
82
85
|
.wp-block-navigation .wp-block-navigation-item {
|
|
@@ -75,8 +75,11 @@
|
|
|
75
75
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
76
76
|
*/
|
|
77
77
|
.wp-block-navigation .wp-block-page-list {
|
|
78
|
-
display:
|
|
79
|
-
flex-
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: var(--layout-direction, initial);
|
|
80
|
+
justify-content: var(--layout-justify, initial);
|
|
81
|
+
align-items: var(--layout-align, initial);
|
|
82
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
80
83
|
background-color: inherit;
|
|
81
84
|
}
|
|
82
85
|
.wp-block-navigation .wp-block-navigation-item {
|
|
@@ -1669,6 +1669,11 @@ ul.has-background {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
|
|
1671
1671
|
.wp-block-navigation__container {
|
|
1672
|
+
display: flex;
|
|
1673
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1674
|
+
flex-direction: var(--layout-direction, initial);
|
|
1675
|
+
justify-content: var(--layout-justify, initial);
|
|
1676
|
+
align-items: var(--layout-align, initial);
|
|
1672
1677
|
list-style: none;
|
|
1673
1678
|
margin: 0;
|
|
1674
1679
|
padding-right: 0;
|
|
@@ -1689,7 +1694,11 @@ ul.has-background {
|
|
|
1689
1694
|
bottom: 0;
|
|
1690
1695
|
}
|
|
1691
1696
|
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
|
|
1692
|
-
display:
|
|
1697
|
+
display: flex;
|
|
1698
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1699
|
+
flex-direction: var(--layout-direction, initial);
|
|
1700
|
+
justify-content: var(--layout-justify, initial);
|
|
1701
|
+
align-items: var(--layout-align, initial);
|
|
1693
1702
|
}
|
|
1694
1703
|
.wp-block-navigation__responsive-container.is-menu-open {
|
|
1695
1704
|
display: flex;
|
|
@@ -1698,12 +1707,12 @@ ul.has-background {
|
|
|
1698
1707
|
z-index: 100000;
|
|
1699
1708
|
padding: 72px 24px 24px 24px;
|
|
1700
1709
|
background-color: inherit;
|
|
1701
|
-
align-items: inherit;
|
|
1702
1710
|
}
|
|
1703
1711
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
|
|
1704
1712
|
display: flex;
|
|
1705
1713
|
flex-direction: column;
|
|
1706
|
-
align-items: var(--justification-setting, inherit);
|
|
1714
|
+
align-items: var(--layout-justification-setting, inherit);
|
|
1715
|
+
justify-content: flex-start;
|
|
1707
1716
|
overflow: auto;
|
|
1708
1717
|
padding: 0;
|
|
1709
1718
|
}
|
|
@@ -1741,7 +1750,7 @@ ul.has-background {
|
|
|
1741
1750
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
|
|
1742
1751
|
display: flex;
|
|
1743
1752
|
flex-direction: column;
|
|
1744
|
-
align-items: var(--justification-setting,
|
|
1753
|
+
align-items: var(--layout-justification-setting, initial);
|
|
1745
1754
|
}
|
|
1746
1755
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
|
|
1747
1756
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
|
|
@@ -1754,7 +1763,7 @@ ul.has-background {
|
|
|
1754
1763
|
}
|
|
1755
1764
|
@media (min-width: 600px) {
|
|
1756
1765
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
|
|
1757
|
-
display:
|
|
1766
|
+
display: block;
|
|
1758
1767
|
width: 100%;
|
|
1759
1768
|
position: relative;
|
|
1760
1769
|
z-index: 2;
|
|
@@ -1823,17 +1832,6 @@ html.has-modal-open {
|
|
|
1823
1832
|
overflow: hidden;
|
|
1824
1833
|
}
|
|
1825
1834
|
|
|
1826
|
-
.wp-block-navigation__responsive-close,
|
|
1827
|
-
.wp-block-navigation__responsive-dialog,
|
|
1828
|
-
.wp-block-navigation__container {
|
|
1829
|
-
display: contents;
|
|
1830
|
-
}
|
|
1831
|
-
.is-menu-open .wp-block-navigation__responsive-close,
|
|
1832
|
-
.is-menu-open .wp-block-navigation__responsive-dialog,
|
|
1833
|
-
.is-menu-open .wp-block-navigation__container {
|
|
1834
|
-
align-items: inherit;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
1835
|
.wp-block-navigation .wp-block-navigation-item__label {
|
|
1838
1836
|
word-break: normal;
|
|
1839
1837
|
overflow-wrap: break-word;
|
|
@@ -1853,6 +1851,7 @@ button.wp-block-navigation-item__content {
|
|
|
1853
1851
|
color: currentColor;
|
|
1854
1852
|
font-size: inherit;
|
|
1855
1853
|
font-family: inherit;
|
|
1854
|
+
text-align: right;
|
|
1856
1855
|
}
|
|
1857
1856
|
|
|
1858
1857
|
.wp-block-navigation-submenu__toggle {
|
|
@@ -1889,8 +1888,11 @@ button.wp-block-navigation-item__content {
|
|
|
1889
1888
|
}
|
|
1890
1889
|
|
|
1891
1890
|
.wp-block-navigation .wp-block-page-list {
|
|
1892
|
-
display:
|
|
1893
|
-
flex-
|
|
1891
|
+
display: flex;
|
|
1892
|
+
flex-direction: var(--layout-direction, initial);
|
|
1893
|
+
justify-content: var(--layout-justify, initial);
|
|
1894
|
+
align-items: var(--layout-align, initial);
|
|
1895
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1894
1896
|
background-color: inherit;
|
|
1895
1897
|
}
|
|
1896
1898
|
.wp-block-navigation .wp-block-navigation-item {
|
|
@@ -2165,10 +2167,6 @@ p.has-background {
|
|
|
2165
2167
|
color: inherit;
|
|
2166
2168
|
}
|
|
2167
2169
|
|
|
2168
|
-
.wp-block-post-content + * {
|
|
2169
|
-
clear: both;
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
2170
|
.wp-block-post-template,
|
|
2173
2171
|
.wp-block-query-loop {
|
|
2174
2172
|
margin-top: 0;
|
package/build-style/style.css
CHANGED
|
@@ -1691,6 +1691,11 @@ ul.has-background {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
1693
|
.wp-block-navigation__container {
|
|
1694
|
+
display: flex;
|
|
1695
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1696
|
+
flex-direction: var(--layout-direction, initial);
|
|
1697
|
+
justify-content: var(--layout-justify, initial);
|
|
1698
|
+
align-items: var(--layout-align, initial);
|
|
1694
1699
|
list-style: none;
|
|
1695
1700
|
margin: 0;
|
|
1696
1701
|
padding-left: 0;
|
|
@@ -1711,7 +1716,11 @@ ul.has-background {
|
|
|
1711
1716
|
bottom: 0;
|
|
1712
1717
|
}
|
|
1713
1718
|
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
|
|
1714
|
-
display:
|
|
1719
|
+
display: flex;
|
|
1720
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1721
|
+
flex-direction: var(--layout-direction, initial);
|
|
1722
|
+
justify-content: var(--layout-justify, initial);
|
|
1723
|
+
align-items: var(--layout-align, initial);
|
|
1715
1724
|
}
|
|
1716
1725
|
.wp-block-navigation__responsive-container.is-menu-open {
|
|
1717
1726
|
display: flex;
|
|
@@ -1720,12 +1729,12 @@ ul.has-background {
|
|
|
1720
1729
|
z-index: 100000;
|
|
1721
1730
|
padding: 72px 24px 24px 24px;
|
|
1722
1731
|
background-color: inherit;
|
|
1723
|
-
align-items: inherit;
|
|
1724
1732
|
}
|
|
1725
1733
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
|
|
1726
1734
|
display: flex;
|
|
1727
1735
|
flex-direction: column;
|
|
1728
|
-
align-items: var(--justification-setting, inherit);
|
|
1736
|
+
align-items: var(--layout-justification-setting, inherit);
|
|
1737
|
+
justify-content: flex-start;
|
|
1729
1738
|
overflow: auto;
|
|
1730
1739
|
padding: 0;
|
|
1731
1740
|
}
|
|
@@ -1763,7 +1772,7 @@ ul.has-background {
|
|
|
1763
1772
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
|
|
1764
1773
|
display: flex;
|
|
1765
1774
|
flex-direction: column;
|
|
1766
|
-
align-items: var(--justification-setting,
|
|
1775
|
+
align-items: var(--layout-justification-setting, initial);
|
|
1767
1776
|
}
|
|
1768
1777
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
|
|
1769
1778
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
|
|
@@ -1776,7 +1785,7 @@ ul.has-background {
|
|
|
1776
1785
|
}
|
|
1777
1786
|
@media (min-width: 600px) {
|
|
1778
1787
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
|
|
1779
|
-
display:
|
|
1788
|
+
display: block;
|
|
1780
1789
|
width: 100%;
|
|
1781
1790
|
position: relative;
|
|
1782
1791
|
z-index: 2;
|
|
@@ -1845,17 +1854,6 @@ html.has-modal-open {
|
|
|
1845
1854
|
overflow: hidden;
|
|
1846
1855
|
}
|
|
1847
1856
|
|
|
1848
|
-
.wp-block-navigation__responsive-close,
|
|
1849
|
-
.wp-block-navigation__responsive-dialog,
|
|
1850
|
-
.wp-block-navigation__container {
|
|
1851
|
-
display: contents;
|
|
1852
|
-
}
|
|
1853
|
-
.is-menu-open .wp-block-navigation__responsive-close,
|
|
1854
|
-
.is-menu-open .wp-block-navigation__responsive-dialog,
|
|
1855
|
-
.is-menu-open .wp-block-navigation__container {
|
|
1856
|
-
align-items: inherit;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
1857
|
.wp-block-navigation .wp-block-navigation-item__label {
|
|
1860
1858
|
word-break: normal;
|
|
1861
1859
|
overflow-wrap: break-word;
|
|
@@ -1875,6 +1873,7 @@ button.wp-block-navigation-item__content {
|
|
|
1875
1873
|
color: currentColor;
|
|
1876
1874
|
font-size: inherit;
|
|
1877
1875
|
font-family: inherit;
|
|
1876
|
+
text-align: left;
|
|
1878
1877
|
}
|
|
1879
1878
|
|
|
1880
1879
|
.wp-block-navigation-submenu__toggle {
|
|
@@ -1911,8 +1910,11 @@ button.wp-block-navigation-item__content {
|
|
|
1911
1910
|
}
|
|
1912
1911
|
|
|
1913
1912
|
.wp-block-navigation .wp-block-page-list {
|
|
1914
|
-
display:
|
|
1915
|
-
flex-
|
|
1913
|
+
display: flex;
|
|
1914
|
+
flex-direction: var(--layout-direction, initial);
|
|
1915
|
+
justify-content: var(--layout-justify, initial);
|
|
1916
|
+
align-items: var(--layout-align, initial);
|
|
1917
|
+
flex-wrap: var(--layout-wrap, wrap);
|
|
1916
1918
|
background-color: inherit;
|
|
1917
1919
|
}
|
|
1918
1920
|
.wp-block-navigation .wp-block-navigation-item {
|
|
@@ -2187,10 +2189,6 @@ p.has-background {
|
|
|
2187
2189
|
color: inherit;
|
|
2188
2190
|
}
|
|
2189
2191
|
|
|
2190
|
-
.wp-block-post-content + * {
|
|
2191
|
-
clear: both;
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
2192
|
.wp-block-post-template,
|
|
2195
2193
|
.wp-block-query-loop {
|
|
2196
2194
|
margin-top: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@wordpress/api-fetch": "^5.2.5",
|
|
38
38
|
"@wordpress/autop": "^3.2.2",
|
|
39
39
|
"@wordpress/blob": "^3.2.1",
|
|
40
|
-
"@wordpress/block-editor": "^8.0.
|
|
40
|
+
"@wordpress/block-editor": "^8.0.1",
|
|
41
41
|
"@wordpress/blocks": "^11.1.3",
|
|
42
42
|
"@wordpress/components": "^19.0.1",
|
|
43
43
|
"@wordpress/compose": "^5.0.5",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@wordpress/keycodes": "^3.2.3",
|
|
58
58
|
"@wordpress/notices": "^3.2.6",
|
|
59
59
|
"@wordpress/primitives": "^3.0.3",
|
|
60
|
-
"@wordpress/reusable-blocks": "^3.0.
|
|
60
|
+
"@wordpress/reusable-blocks": "^3.0.6",
|
|
61
61
|
"@wordpress/rich-text": "^5.0.5",
|
|
62
62
|
"@wordpress/server-side-render": "^3.0.5",
|
|
63
63
|
"@wordpress/url": "^3.3.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "f89b63995376fe6efe920d858b48268b510920e1"
|
|
77
77
|
}
|
|
@@ -15,18 +15,20 @@ const migrateWithLayout = ( attributes ) => {
|
|
|
15
15
|
return attributes;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...
|
|
22
|
-
};
|
|
18
|
+
const {
|
|
19
|
+
contentJustification,
|
|
20
|
+
orientation,
|
|
21
|
+
...updatedAttributes
|
|
22
|
+
} = attributes;
|
|
23
23
|
|
|
24
24
|
if ( contentJustification || orientation ) {
|
|
25
25
|
Object.assign( updatedAttributes, {
|
|
26
26
|
layout: {
|
|
27
27
|
type: 'flex',
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
...( contentJustification && {
|
|
29
|
+
justifyContent: contentJustification,
|
|
30
|
+
} ),
|
|
31
|
+
...( orientation && { orientation } ),
|
|
30
32
|
},
|
|
31
33
|
} );
|
|
32
34
|
}
|
|
@@ -57,7 +59,8 @@ const deprecated = [
|
|
|
57
59
|
},
|
|
58
60
|
},
|
|
59
61
|
},
|
|
60
|
-
isEligible: ( {
|
|
62
|
+
isEligible: ( { contentJustification, orientation } ) =>
|
|
63
|
+
!! contentJustification || !! orientation,
|
|
61
64
|
migrate: migrateWithLayout,
|
|
62
65
|
save( { attributes: { contentJustification, orientation } } ) {
|
|
63
66
|
return (
|
package/src/buttons/edit.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
BlockControls,
|
|
6
5
|
useBlockProps,
|
|
7
6
|
useInnerBlocksProps,
|
|
8
7
|
store as blockEditorStore,
|
|
@@ -39,10 +38,6 @@ function ButtonsEdit( { attributes: { layout = {} } } ) {
|
|
|
39
38
|
|
|
40
39
|
return (
|
|
41
40
|
<>
|
|
42
|
-
<BlockControls
|
|
43
|
-
group="block"
|
|
44
|
-
__experimentalShareWithChildBlocks
|
|
45
|
-
></BlockControls>
|
|
46
41
|
<div { ...innerBlocksProps } />
|
|
47
42
|
</>
|
|
48
43
|
);
|
package/src/column/block.json
CHANGED
package/src/cover/block.json
CHANGED
package/src/gallery/edit.js
CHANGED
|
@@ -97,7 +97,7 @@ function GalleryEdit( props ) {
|
|
|
97
97
|
shortCodeTransforms,
|
|
98
98
|
sizeSlug,
|
|
99
99
|
} = attributes;
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
const {
|
|
102
102
|
__unstableMarkNextChangeAsNotPersistent,
|
|
103
103
|
replaceInnerBlocks,
|
|
@@ -139,6 +139,8 @@ function GalleryEdit( props ) {
|
|
|
139
139
|
|
|
140
140
|
const newImages = useGetNewImages( images, imageData );
|
|
141
141
|
|
|
142
|
+
useMobileWarning( newImages );
|
|
143
|
+
|
|
142
144
|
useEffect( () => {
|
|
143
145
|
newImages?.forEach( ( newImage ) => {
|
|
144
146
|
updateBlockAttributes( newImage.clientId, {
|
|
@@ -6,7 +6,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
|
|
|
6
6
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
7
7
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
8
|
|
|
9
|
-
export default function useMobileWarning() {
|
|
9
|
+
export default function useMobileWarning( newImages ) {
|
|
10
10
|
const { createWarningNotice } = useDispatch( noticesStore );
|
|
11
11
|
const { toggleFeature } = useDispatch( interfaceStore );
|
|
12
12
|
const isMobileWarningActive = useSelect( ( select ) => {
|
|
@@ -14,7 +14,7 @@ export default function useMobileWarning() {
|
|
|
14
14
|
return isFeatureActive( 'core/edit-post', 'mobileGalleryWarning' );
|
|
15
15
|
}, [] );
|
|
16
16
|
|
|
17
|
-
if ( ! isMobileWarningActive ) {
|
|
17
|
+
if ( ! isMobileWarningActive || ! newImages ) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
|
package/src/group/block.json
CHANGED
|
@@ -46,7 +46,7 @@ const ExistingMenusDropdown = ( {
|
|
|
46
46
|
>
|
|
47
47
|
{ ( { onClose } ) => (
|
|
48
48
|
<>
|
|
49
|
-
<MenuGroup label=
|
|
49
|
+
<MenuGroup label={ __( 'Menus' ) }>
|
|
50
50
|
{ canSwitchNavigationMenu &&
|
|
51
51
|
navigationMenus.map( ( menu ) => {
|
|
52
52
|
return (
|
|
@@ -63,7 +63,7 @@ const ExistingMenusDropdown = ( {
|
|
|
63
63
|
);
|
|
64
64
|
} ) }
|
|
65
65
|
</MenuGroup>
|
|
66
|
-
<MenuGroup label=
|
|
66
|
+
<MenuGroup label={ __( 'Classic Menus' ) }>
|
|
67
67
|
{ menus.map( ( menu ) => {
|
|
68
68
|
return (
|
|
69
69
|
<MenuItem
|
|
@@ -61,11 +61,7 @@ export default function ResponsiveWrapper( {
|
|
|
61
61
|
</Button>
|
|
62
62
|
) }
|
|
63
63
|
|
|
64
|
-
<div
|
|
65
|
-
className={ responsiveContainerClasses }
|
|
66
|
-
id={ modalId }
|
|
67
|
-
aria-hidden={ ! isOpen }
|
|
68
|
-
>
|
|
64
|
+
<div className={ responsiveContainerClasses } id={ modalId }>
|
|
69
65
|
<div
|
|
70
66
|
className="wp-block-navigation__responsive-close"
|
|
71
67
|
tabIndex="-1"
|