Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -91,6 +91,7 @@
},
"supports": {
"align": [ "wide", "full" ],
"ariaLabel": true,
"html": false,
"inserter": true,
"typography": {
@@ -131,9 +132,10 @@
}
}
}
}
},
"interactivity": true
},
"viewScript": [ "file:./view.min.js", "file:./view-modal.min.js" ],
"viewScript": "file:./view.min.js",
"editorStyle": "wp-block-navigation-editor",
"style": "wp-block-navigation"
}

View File

@@ -18,6 +18,7 @@
}
.wp-block-navigation .wp-block-navigation-item{
align-items:center;
background-color:inherit;
display:flex;
position:relative;
}
@@ -234,6 +235,13 @@ button.wp-block-navigation-item__content{
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{
background-color:#fff;
border:1px solid rgba(0,0,0,.15);
}
.wp-block-navigation.has-background .wp-block-navigation__submenu-container{
background-color:inherit;
}
.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container{
color:#000;
}
@@ -272,7 +280,7 @@ button.wp-block-navigation-item__content{
right:0;
top:0;
}
.wp-block-navigation__responsive-container .wp-block-navigation-link a{
.wp-block-navigation__responsive-container :where(.wp-block-navigation-item a){
color:inherit;
}
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content{
@@ -293,7 +301,7 @@ button.wp-block-navigation-item__content{
display:flex;
flex-direction:column;
overflow:auto;
padding:var(--wp--style--root--padding-top, 2rem) var(--wp--style--root--padding-left, 2rem) var(--wp--style--root--padding-bottom, 2rem) var(--wp--style--root--padding-right, 2rem);
padding:clamp(1rem, var(--wp--style--root--padding-top), 20rem) clamp(1rem, var(--wp--style--root--padding-left), 20em) clamp(1rem, var(--wp--style--root--padding-bottom), 20rem) clamp(1rem, var(--wp--style--root--padding-right), 20rem);
z-index:100000;
}
@media (prefers-reduced-motion:reduce){
@@ -342,7 +350,7 @@ button.wp-block-navigation-item__content{
display:flex;
flex-direction:column;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{
background:transparent !important;
color:inherit !important;
}
@@ -368,6 +376,9 @@ button.wp-block-navigation-item__content{
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
background-color:#fff;
}
.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open{
color:#000;
}

File diff suppressed because one or more lines are too long

View File

@@ -18,6 +18,7 @@
}
.wp-block-navigation .wp-block-navigation-item{
align-items:center;
background-color:inherit;
display:flex;
position:relative;
}
@@ -234,6 +235,13 @@ button.wp-block-navigation-item__content{
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{
background-color:#fff;
border:1px solid rgba(0,0,0,.15);
}
.wp-block-navigation.has-background .wp-block-navigation__submenu-container{
background-color:inherit;
}
.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container{
color:#000;
}
@@ -272,7 +280,7 @@ button.wp-block-navigation-item__content{
right:0;
top:0;
}
.wp-block-navigation__responsive-container .wp-block-navigation-link a{
.wp-block-navigation__responsive-container :where(.wp-block-navigation-item a){
color:inherit;
}
.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content{
@@ -293,7 +301,7 @@ button.wp-block-navigation-item__content{
display:flex;
flex-direction:column;
overflow:auto;
padding:var(--wp--style--root--padding-top, 2rem) var(--wp--style--root--padding-right, 2rem) var(--wp--style--root--padding-bottom, 2rem) var(--wp--style--root--padding-left, 2rem);
padding:clamp(1rem, var(--wp--style--root--padding-top), 20rem) clamp(1rem, var(--wp--style--root--padding-right), 20rem) clamp(1rem, var(--wp--style--root--padding-bottom), 20rem) clamp(1rem, var(--wp--style--root--padding-left), 20em);
z-index:100000;
}
@media (prefers-reduced-motion:reduce){
@@ -342,7 +350,7 @@ button.wp-block-navigation-item__content{
display:flex;
flex-direction:column;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{
background:transparent !important;
color:inherit !important;
}
@@ -368,6 +376,9 @@ button.wp-block-navigation-item__content{
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
background-color:#fff;
}
.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open{
color:#000;
}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '6391fb107a84d15c14f4');
<?php return array('dependencies' => array(), 'version' => 'a145d0113e969f692877');

View File

@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'b0c5026864ec3616bae7');
<?php return array('dependencies' => array(), 'version' => 'b3eba25769c9fe5ec0fa');

View File

@@ -1,63 +1,213 @@
/******/ (function() { // webpackBootstrap
var __webpack_exports__ = {};
// Open on click functionality.
function closeSubmenus(element) {
element.querySelectorAll('[aria-expanded="true"]').forEach(function (toggle) {
toggle.setAttribute('aria-expanded', 'false');
});
}
"use strict";
(self["__WordPressPrivateInteractivityAPI__"] = self["__WordPressPrivateInteractivityAPI__"] || []).push([[3],{
function toggleSubmenuOnClick(event) {
const buttonToggle = event.target.closest('[aria-expanded]');
const isSubmenuOpen = buttonToggle.getAttribute('aria-expanded');
/***/ 932:
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
if (isSubmenuOpen === 'true') {
closeSubmenus(buttonToggle.closest('.wp-block-navigation-item'));
} else {
// Close all sibling submenus.
const parentElement = buttonToggle.closest('.wp-block-navigation-item');
const navigationParent = buttonToggle.closest('.wp-block-navigation__submenu-container, .wp-block-navigation__container, .wp-block-page-list');
navigationParent.querySelectorAll('.wp-block-navigation-item').forEach(function (child) {
if (child !== parentElement) {
closeSubmenus(child);
}
}); // Open submenu.
/* harmony import */ var _wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(754);
/**
* WordPress dependencies
*/
buttonToggle.setAttribute('aria-expanded', 'true');
const focusableSelectors = ['a[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', '[contenteditable]', '[tabindex]:not([tabindex^="-"])'];
// This is a fix for Safari in iOS/iPadOS. Without it, Safari doesn't focus out
// when the user taps in the body. It can be removed once we add an overlay to
// capture the clicks, instead of relying on the focusout event.
document.addEventListener('click', () => {});
const openMenu = (store, menuOpenedOn) => {
const {
context,
selectors
} = store;
selectors.core.navigation.menuOpenedBy(store)[menuOpenedOn] = true;
if (context.core.navigation.type === 'overlay') {
// Add a `has-modal-open` class to the <html> root.
document.documentElement.classList.add('has-modal-open');
}
} // Necessary for some themes such as TT1 Blocks, where
// scripts could be loaded before the body.
window.addEventListener('load', () => {
const submenuButtons = document.querySelectorAll('.wp-block-navigation-submenu__toggle');
submenuButtons.forEach(function (button) {
button.addEventListener('click', toggleSubmenuOnClick);
}); // Close on click outside.
document.addEventListener('click', function (event) {
const navigationBlocks = document.querySelectorAll('.wp-block-navigation');
navigationBlocks.forEach(function (block) {
if (!block.contains(event.target)) {
closeSubmenus(block);
};
const closeMenu = (store, menuClosedOn) => {
const {
context,
selectors
} = store;
selectors.core.navigation.menuOpenedBy(store)[menuClosedOn] = false;
// Check if the menu is still open or not.
if (!selectors.core.navigation.isMenuOpen(store)) {
if (context.core.navigation.modal?.contains(window.document.activeElement)) {
context.core.navigation.previousFocus?.focus();
}
context.core.navigation.modal = null;
context.core.navigation.previousFocus = null;
if (context.core.navigation.type === 'overlay') {
document.documentElement.classList.remove('has-modal-open');
}
}
};
(0,_wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__/* .store */ .h)({
effects: {
core: {
navigation: {
initMenu: store => {
const {
context,
selectors,
ref
} = store;
if (selectors.core.navigation.isMenuOpen(store)) {
const focusableElements = ref.querySelectorAll(focusableSelectors);
context.core.navigation.modal = ref;
context.core.navigation.firstFocusableElement = focusableElements[0];
context.core.navigation.lastFocusableElement = focusableElements[focusableElements.length - 1];
}
},
focusFirstElement: store => {
const {
selectors,
ref
} = store;
if (selectors.core.navigation.isMenuOpen(store)) {
ref.querySelector('.wp-block-navigation-item > *:first-child').focus();
}
}
}
});
}); // Close on focus outside or escape key.
document.addEventListener('keyup', function (event) {
const submenuBlocks = document.querySelectorAll('.wp-block-navigation-item.has-child');
submenuBlocks.forEach(function (block) {
if (!block.contains(event.target)) {
closeSubmenus(block);
} else if (event.key === 'Escape') {
const toggle = block.querySelector('[aria-expanded="true"]');
closeSubmenus(block); // Focus the submenu trigger so focus does not get trapped in the closed submenu.
toggle?.focus();
}
},
selectors: {
core: {
navigation: {
roleAttribute: store => {
const {
context,
selectors
} = store;
return context.core.navigation.type === 'overlay' && selectors.core.navigation.isMenuOpen(store) ? 'dialog' : null;
},
ariaModal: store => {
const {
context,
selectors
} = store;
return context.core.navigation.type === 'overlay' && selectors.core.navigation.isMenuOpen(store) ? 'true' : null;
},
ariaLabel: store => {
const {
context,
selectors
} = store;
return context.core.navigation.type === 'overlay' && selectors.core.navigation.isMenuOpen(store) ? context.core.navigation.ariaLabel : null;
},
isMenuOpen: ({
context
}) =>
// The menu is opened if either `click`, `hover` or `focus` is true.
Object.values(context.core.navigation[context.core.navigation.type === 'overlay' ? 'overlayOpenedBy' : 'submenuOpenedBy']).filter(Boolean).length > 0,
menuOpenedBy: ({
context
}) => context.core.navigation[context.core.navigation.type === 'overlay' ? 'overlayOpenedBy' : 'submenuOpenedBy']
}
});
});
}
},
actions: {
core: {
navigation: {
openMenuOnHover(store) {
const {
navigation
} = store.context.core;
if (navigation.type === 'submenu' &&
// Only open on hover if the overlay is closed.
Object.values(navigation.overlayOpenedBy || {}).filter(Boolean).length === 0) openMenu(store, 'hover');
},
closeMenuOnHover(store) {
closeMenu(store, 'hover');
},
openMenuOnClick(store) {
const {
context,
ref
} = store;
context.core.navigation.previousFocus = ref;
openMenu(store, 'click');
},
closeMenuOnClick(store) {
closeMenu(store, 'click');
closeMenu(store, 'focus');
},
openMenuOnFocus(store) {
openMenu(store, 'focus');
},
toggleMenuOnClick: store => {
const {
selectors,
context,
ref
} = store;
// Safari won't send focus to the clicked element, so we need to manually place it: https://bugs.webkit.org/show_bug.cgi?id=22261
if (window.document.activeElement !== ref) ref.focus();
const menuOpenedBy = selectors.core.navigation.menuOpenedBy(store);
if (menuOpenedBy.click || menuOpenedBy.focus) {
closeMenu(store, 'click');
closeMenu(store, 'focus');
} else {
context.core.navigation.previousFocus = ref;
openMenu(store, 'click');
}
},
handleMenuKeydown: store => {
const {
context,
selectors,
event
} = store;
if (selectors.core.navigation.menuOpenedBy(store).click) {
// If Escape close the menu.
if (event?.key === 'Escape') {
closeMenu(store, 'click');
closeMenu(store, 'focus');
return;
}
// Trap focus if it is an overlay (main menu).
if (context.core.navigation.type === 'overlay' && event.key === 'Tab') {
// If shift + tab it change the direction.
if (event.shiftKey && window.document.activeElement === context.core.navigation.firstFocusableElement) {
event.preventDefault();
context.core.navigation.lastFocusableElement.focus();
} else if (!event.shiftKey && window.document.activeElement === context.core.navigation.lastFocusableElement) {
event.preventDefault();
context.core.navigation.firstFocusableElement.focus();
}
}
}
},
handleMenuFocusout: store => {
const {
context,
event
} = store;
// If focus is outside modal, and in the document, close menu
// event.target === The element losing focus
// event.relatedTarget === The element receiving focus (if any)
// When focusout is outsite the document,
// `window.document.activeElement` doesn't change.
// The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.
if (event.relatedTarget === null || !context.core.navigation.modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
closeMenu(store, 'click');
closeMenu(store, 'focus');
}
}
}
}
}
});
/******/ })()
;
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__(932));
/******/ }
]);

View File

@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '886680af40b7521d60fc');
<?php return array('dependencies' => array(), 'version' => 'e3d6f3216904b5b42831');

View File

@@ -1 +1 @@
!function(){function e(e){e.querySelectorAll('[aria-expanded="true"]').forEach((function(e){e.setAttribute("aria-expanded","false")}))}function t(t){const n=t.target.closest("[aria-expanded]");if("true"===n.getAttribute("aria-expanded"))e(n.closest(".wp-block-navigation-item"));else{const t=n.closest(".wp-block-navigation-item");n.closest(".wp-block-navigation__submenu-container, .wp-block-navigation__container, .wp-block-page-list").querySelectorAll(".wp-block-navigation-item").forEach((function(n){n!==t&&e(n)})),n.setAttribute("aria-expanded","true")}}window.addEventListener("load",(()=>{document.querySelectorAll(".wp-block-navigation-submenu__toggle").forEach((function(e){e.addEventListener("click",t)})),document.addEventListener("click",(function(t){document.querySelectorAll(".wp-block-navigation").forEach((function(n){n.contains(t.target)||e(n)}))})),document.addEventListener("keyup",(function(t){document.querySelectorAll(".wp-block-navigation-item.has-child").forEach((function(n){if(n.contains(t.target)){if("Escape"===t.key){const t=n.querySelector('[aria-expanded="true"]');e(n),t?.focus()}}else e(n)}))}))}))}();
"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[3],{932:function(e,n,o){var t=o(754);const a=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];document.addEventListener("click",(()=>{}));const i=(e,n)=>{const{context:o,selectors:t}=e;t.core.navigation.menuOpenedBy(e)[n]=!0,"overlay"===o.core.navigation.type&&document.documentElement.classList.add("has-modal-open")},c=(e,n)=>{const{context:o,selectors:t}=e;t.core.navigation.menuOpenedBy(e)[n]=!1,t.core.navigation.isMenuOpen(e)||(o.core.navigation.modal?.contains(window.document.activeElement)&&o.core.navigation.previousFocus?.focus(),o.core.navigation.modal=null,o.core.navigation.previousFocus=null,"overlay"===o.core.navigation.type&&document.documentElement.classList.remove("has-modal-open"))};(0,t.h)({effects:{core:{navigation:{initMenu:e=>{const{context:n,selectors:o,ref:t}=e;if(o.core.navigation.isMenuOpen(e)){const e=t.querySelectorAll(a);n.core.navigation.modal=t,n.core.navigation.firstFocusableElement=e[0],n.core.navigation.lastFocusableElement=e[e.length-1]}},focusFirstElement:e=>{const{selectors:n,ref:o}=e;n.core.navigation.isMenuOpen(e)&&o.querySelector(".wp-block-navigation-item > *:first-child").focus()}}}},selectors:{core:{navigation:{roleAttribute:e=>{const{context:n,selectors:o}=e;return"overlay"===n.core.navigation.type&&o.core.navigation.isMenuOpen(e)?"dialog":null},ariaModal:e=>{const{context:n,selectors:o}=e;return"overlay"===n.core.navigation.type&&o.core.navigation.isMenuOpen(e)?"true":null},ariaLabel:e=>{const{context:n,selectors:o}=e;return"overlay"===n.core.navigation.type&&o.core.navigation.isMenuOpen(e)?n.core.navigation.ariaLabel:null},isMenuOpen:({context:e})=>Object.values(e.core.navigation["overlay"===e.core.navigation.type?"overlayOpenedBy":"submenuOpenedBy"]).filter(Boolean).length>0,menuOpenedBy:({context:e})=>e.core.navigation["overlay"===e.core.navigation.type?"overlayOpenedBy":"submenuOpenedBy"]}}},actions:{core:{navigation:{openMenuOnHover(e){const{navigation:n}=e.context.core;"submenu"===n.type&&0===Object.values(n.overlayOpenedBy||{}).filter(Boolean).length&&i(e,"hover")},closeMenuOnHover(e){c(e,"hover")},openMenuOnClick(e){const{context:n,ref:o}=e;n.core.navigation.previousFocus=o,i(e,"click")},closeMenuOnClick(e){c(e,"click"),c(e,"focus")},openMenuOnFocus(e){i(e,"focus")},toggleMenuOnClick:e=>{const{selectors:n,context:o,ref:t}=e;window.document.activeElement!==t&&t.focus();const a=n.core.navigation.menuOpenedBy(e);a.click||a.focus?(c(e,"click"),c(e,"focus")):(o.core.navigation.previousFocus=t,i(e,"click"))},handleMenuKeydown:e=>{const{context:n,selectors:o,event:t}=e;if(o.core.navigation.menuOpenedBy(e).click){if("Escape"===t?.key)return c(e,"click"),void c(e,"focus");"overlay"===n.core.navigation.type&&"Tab"===t.key&&(t.shiftKey&&window.document.activeElement===n.core.navigation.firstFocusableElement?(t.preventDefault(),n.core.navigation.lastFocusableElement.focus()):t.shiftKey||window.document.activeElement!==n.core.navigation.lastFocusableElement||(t.preventDefault(),n.core.navigation.firstFocusableElement.focus()))}},handleMenuFocusout:e=>{const{context:n,event:o}=e;(null===o.relatedTarget||!n.core.navigation.modal?.contains(o.relatedTarget)&&o.target!==window.document.activeElement)&&(c(e,"click"),c(e,"focus"))}}}}})}},function(e){var n;n=932,e(e.s=n)}]);