From 9017cf97f7c1e145812cd8b50bb961e981b85384 Mon Sep 17 00:00:00 2001 From: zeroedin Date: Mon, 16 Oct 2023 13:56:39 +0000 Subject: [PATCH] deploy: f4fcb1f370e099a368d6746ae16458cbaeae7fc7 --- .../rh-navigation-secondary.d.ts | 3 +- .../rh-navigation-secondary.js | 84 ++++++++++++++--- .../rh-navigation-secondary.js.map | 2 +- .../rh-navigation-secondary.ts | 92 +++++++++++++++++-- 4 files changed, 158 insertions(+), 23 deletions(-) diff --git a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.d.ts b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.d.ts index f482f0abbc..b6721d0f40 100644 --- a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.d.ts +++ b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.d.ts @@ -1,8 +1,8 @@ import { LitElement } from 'lit'; +import { ComposedEvent } from '@patternfly/pfe-core'; import '../../lib/elements/rh-context-provider/rh-context-provider.js'; import './rh-navigation-secondary-menu-section.js'; import './rh-navigation-secondary-overlay.js'; -import { ComposedEvent } from '@patternfly/pfe-core'; import { RhNavigationSecondaryDropdown } from './rh-navigation-secondary-dropdown.js'; import { type ColorPalette } from '../../lib/context/color/provider.js'; export declare class SecondaryNavOverlayChangeEvent extends ComposedEvent { @@ -41,6 +41,7 @@ export declare class RhNavigationSecondary extends LitElement { * Color palette darker | lighter (default: lighter) */ colorPalette: NavPalette; + private _nav?; /** * `mobileMenuExpanded` property is toggled when the mobile menu button is clicked, * a focusout event occurs, or on an overlay click event. It also switches state diff --git a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js index 121644b210..a8f9a204a4 100644 --- a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js +++ b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js @@ -1,15 +1,18 @@ -var _RhNavigationSecondary_instances, _RhNavigationSecondary_logger, _RhNavigationSecondary_logoCopy, _RhNavigationSecondary_label, _RhNavigationSecondary_dir, _RhNavigationSecondary_compact, _RhNavigationSecondary_screenSize, _RhNavigationSecondary_onExpandRequest, _RhNavigationSecondary_onFocusout, _RhNavigationSecondary_onOverlayClick, _RhNavigationSecondary_onKeydown, _RhNavigationSecondary_getDropdownIndex, _RhNavigationSecondary_dropdownByIndex, _RhNavigationSecondary_expand, _RhNavigationSecondary_allDropdowns, _RhNavigationSecondary_closeDropdown, _RhNavigationSecondary_openDropdown, _RhNavigationSecondary_onOverlayChange, _RhNavigationSecondary_upgradeAccessibility, _RhNavigationSecondary_toggleMobileMenu, _RhSecondaryNav_logger; +var _RhNavigationSecondary_instances, _RhNavigationSecondary_logger, _RhNavigationSecondary_logoCopy, _RhNavigationSecondary_label, _RhNavigationSecondary_dir, _RhNavigationSecondary_compact, _RhNavigationSecondary_tabindex, _RhNavigationSecondary_rtiInit, _RhNavigationSecondary_navItems, _RhNavigationSecondary_screenSize, _RhNavigationSecondary_onExpandRequest, _RhNavigationSecondary_onFocusout, _RhNavigationSecondary_onOverlayClick, _RhNavigationSecondary_onKeydown, _RhNavigationSecondary_onTabEvent, _RhNavigationSecondary_onSlotchange, _RhNavigationSecondary_focusableChildElements, _RhNavigationSecondary_getDropdownIndex, _RhNavigationSecondary_dropdownByIndex, _RhNavigationSecondary_expand, _RhNavigationSecondary_allDropdowns, _RhNavigationSecondary_closeDropdown, _RhNavigationSecondary_openDropdown, _RhNavigationSecondary_onOverlayChange, _RhNavigationSecondary_upgradeAccessibility, _RhNavigationSecondary_toggleMobileMenu, _RhSecondaryNav_logger; var RhNavigationSecondary_1; import { __classPrivateFieldGet, __classPrivateFieldSet, __decorate } from "tslib"; import { LitElement, html } from 'lit'; import { customElement } from 'lit/decorators/custom-element.js'; import { property } from 'lit/decorators/property.js'; import { classMap } from 'lit/directives/class-map.js'; +import { state } from 'lit/decorators/state.js'; +import { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js'; +import { ComposedEvent } from '@patternfly/pfe-core'; +import { RovingTabindexController } from '@patternfly/pfe-core/controllers/roving-tabindex-controller.js'; import { Logger } from '@patternfly/pfe-core/controllers/logger.js'; import '../../lib/elements/rh-context-provider/rh-context-provider.js'; import './rh-navigation-secondary-menu-section.js'; import './rh-navigation-secondary-overlay.js'; -import { ComposedEvent } from '@patternfly/pfe-core'; import { RhNavigationSecondaryDropdown, SecondaryNavDropdownExpandEvent } from './rh-navigation-secondary-dropdown.js'; import { DirController } from '../../lib/DirController.js'; import { ScreenSizeController } from '../../lib/ScreenSizeController.js'; @@ -23,7 +26,6 @@ export class SecondaryNavOverlayChangeEvent extends ComposedEvent { } import { css } from "lit"; const styles = css `:host{--_chevron-size:calc(var(--rh-font-size-body-text-md, 1rem) * 0.35);--_chevron-thickness:calc(var(--rh-font-size-body-text-md, 1rem) * 0.125);--_chevron-up:45deg;--_chevron-down:-135deg;--_chevron-correction-x:calc(-1 * var(--rh-font-size-body-text-md, 1rem) / 16);--_chevron-correction-y:calc(-1 * var(--rh-font-size-body-text-md, 1rem) / 16);--_chevron-color:var(--_context-text);--_chevron-transform-collapsed:rotate(var(--_chevron-up)) translate(var(--_chevron-correction-x), var(--_chevron-correction-x));--_chevron-transform-expanded:rotate(var(--_chevron-down)) translate(var(--_chevron-correction-y), var(--_chevron-correction-y));--_button-font-color:var(--_context-text);--_nav-max-height:var(--_max-height, max-content);--_nav-min-height:var(--_min-height, 80px);--_current-active-child-border-color:var(--rh-color-brand-red-on-light, #ee0000);z-index:var(--rh-navigation-secondary-z-index,102)}:host([color-palette=dark]){--_current-active-child-border-color:var(--rh-color-brand-red-on-dark, #ff442b)}nav{position:absolute;height:100%;width:100%;min-height:var(--_min-height);z-index:var(--rh-navigation-secondary-z-index,102)}:host([color-palette=dark]) nav.compact{border-block-end:1px solid var(--rh-color-border-subtle-on-dark,#707070)}nav.rtl{--_chevron-transform-collapsed:rotate(calc(-1 * var(--_chevron-up))) translate(calc(1 * var(--_chevron-correction-y)), var(--_chevron-correction-y));--_chevron-transform-expanded:rotate(calc(-1 * var(--_chevron-down))) translate(calc(1 * var(--_chevron-correction-x)), var(--_chevron-correction-x))}#container{display:grid;position:relative;z-index:var(--rh-navigation-secondary-z-index,102);background-color:var(--_context-background-color);gap:0 var(--rh-space-lg,16px);grid-template-rows:minmax(var(--_nav-min-height),var(--_nav-max-height)) max-content max-content;grid-template-columns:1fr max-content;grid-template-areas:"logo menu" "main main";height:fit-content;min-height:var(--_min-height);max-height:100vh;overflow-y:auto}rh-context-provider{grid-area:main;display:flex;flex-direction:column;height:100%;width:100%}::slotted([slot=cta]),::slotted([slot=nav]){grid-area:unset!important}#container.expanded ::slotted([slot=cta]),#container.expanded ::slotted([slot=nav]){display:flex!important}#container.expanded ::slotted([slot=nav]){list-style:none;flex-direction:column;padding:2rem 1rem 0;padding:var(--rh-space-2xl,32px) var(--rh-space-lg,16px) 0 var(--rh-space-lg,16px);margin:0!important}#container.expanded ::slotted([slot=cta]){padding:2rem 1rem}button{grid-area:menu;border:none;display:flex;height:100%;align-items:center;font-family:var(--rh-font-family-body-text, RedHatText, "Red Hat Text", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif);font-size:var(--rh-font-size-body-text-md, 1rem);padding:var(--rh-space-lg,16px);border-block-start:var(--rh-border-width-lg,3px) solid transparent;margin-inline-end:var(--rh-space-lg,16px);color:var(--_button-font-color);background-color:var(--rh-color-surface-lighter,#f2f2f2);gap:var(--rh-space-md,8px)}button:hover{border-block-start-color:var(--rh-color-text-brand-on-light,#ee0000)}button:after{box-sizing:content-box!important;content:"";display:block;width:var(--_chevron-size);height:var(--_chevron-size);border-inline-end:var(--_chevron-thickness) solid var(--_chevron-color);border-block-end:var(--_chevron-thickness) solid var(--_chevron-color);transform:var(--_chevron-transform-collapsed)}button[aria-expanded=true]:after{transform:var(--_chevron-transform-expanded)}button:focus{border-block-start-color:var(--rh-color-text-brand-on-light,#ee0000)}:host([color-palette=dark]) button{background-color:var(--_context-background-color)}:host([color-palette=dark]) button[aria-expanded=true],button:active,button[aria-expanded=true]{--_chevron-color:var(--rh-color-text-primary-on-light, #151515);color:var(--rh-color-text-primary-on-light,#151515);background-color:var(--rh-color-surface-lightest,#fff);border-block-start-color:var(--rh-color-text-brand-on-light,#ee0000);border-block-end:none}:host([color-palette=dark]) button:active{color:var(--rh-color-text-primary-on-dark,#fff)}:host([color-palette=dark]) button[aria-expanded=true]:active{color:var(--rh-color-text-primary-on-light,#151515)}@media screen and (min-width:768px){button{margin-inline-end:var(--rh-space-2xl,32px)}#container.expanded ::slotted([slot=nav]){padding:var(--rh-space-2xl,32px) var(--rh-space-2xl,32px) 0!important}#container.expanded ::slotted([slot=cta]){padding:var(--rh-space-2xl,32px)!important}}@media screen and (min-width:992px){:host{--_min-height:86px}#container{grid-template-areas:"logo main";grid-template-rows:auto;grid-template-columns:max-content 1fr;height:100%;max-height:initial;overflow-y:initial}rh-context-provider{flex-direction:row;justify-content:space-between;width:100%}#container.expanded ::slotted([slot=nav]){max-height:calc(100vh - var(--_nav-min-height))}button{display:none}}`; -import { state } from 'lit/decorators/state.js'; /** * The Secondary navigation is used to connect a series of pages together. It displays wayfinding content and links relevant to the page it is placed on. It should be used in conjunction with the [primary navigation](../navigation-primary). * @@ -65,6 +67,10 @@ let RhNavigationSecondary = RhNavigationSecondary_1 = class RhNavigationSecondar _RhNavigationSecondary_dir.set(this, new DirController(this)); /** Compact mode */ _RhNavigationSecondary_compact.set(this, false); + _RhNavigationSecondary_tabindex.set(this, new RovingTabindexController(this)); + _RhNavigationSecondary_rtiInit.set(this, false); + /** Navigation Items that should be initialized by Roving Tabindex */ + _RhNavigationSecondary_navItems.set(this, void 0); /** * `mobileMenuExpanded` property is toggled when the mobile menu button is clicked, * a focusout event occurs, or on an overlay click event. It also switches state @@ -120,7 +126,7 @@ let RhNavigationSecondary = RhNavigationSecondary_1 = class RhNavigationSecondar aria-expanded="${String(expanded)}" @click="${__classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_toggleMobileMenu)}">Menu - +
@@ -157,7 +163,7 @@ let RhNavigationSecondary = RhNavigationSecondary_1 = class RhNavigationSecondar .forEach(dropdown => __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_closeDropdown).call(this, dropdown)); } }; -_RhNavigationSecondary_logger = new WeakMap(), _RhNavigationSecondary_logoCopy = new WeakMap(), _RhNavigationSecondary_label = new WeakMap(), _RhNavigationSecondary_dir = new WeakMap(), _RhNavigationSecondary_compact = new WeakMap(), _RhNavigationSecondary_screenSize = new WeakMap(), _RhNavigationSecondary_instances = new WeakSet(), _RhNavigationSecondary_onExpandRequest = function _RhNavigationSecondary_onExpandRequest(event) { +_RhNavigationSecondary_logger = new WeakMap(), _RhNavigationSecondary_logoCopy = new WeakMap(), _RhNavigationSecondary_label = new WeakMap(), _RhNavigationSecondary_dir = new WeakMap(), _RhNavigationSecondary_compact = new WeakMap(), _RhNavigationSecondary_tabindex = new WeakMap(), _RhNavigationSecondary_rtiInit = new WeakMap(), _RhNavigationSecondary_navItems = new WeakMap(), _RhNavigationSecondary_screenSize = new WeakMap(), _RhNavigationSecondary_instances = new WeakSet(), _RhNavigationSecondary_onExpandRequest = function _RhNavigationSecondary_onExpandRequest(event) { if (event instanceof SecondaryNavDropdownExpandEvent) { const index = __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_getDropdownIndex).call(this, event.target); if (index === null || index === undefined) { @@ -192,23 +198,72 @@ _RhNavigationSecondary_logger = new WeakMap(), _RhNavigationSecondary_logoCopy = } }, _RhNavigationSecondary_onKeydown = function _RhNavigationSecondary_onKeydown(event) { switch (event.key) { - case 'Escape': - if (__classPrivateFieldGet(this, _RhNavigationSecondary_screenSize, "f").matches.has('md')) { + case 'Escape': { + if (!__classPrivateFieldGet(this, _RhNavigationSecondary_screenSize, "f").matches.has('md')) { this.mobileMenuExpanded = false; this.shadowRoot?.querySelector('button')?.focus?.(); } else { - __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_allDropdowns).call(this) - .find(x => x.expanded) - ?.querySelector('a') - ?.focus(); + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").activeItem?.focus(); } this.close(); this.overlayOpen = false; break; + } + case 'Tab': + __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_onTabEvent).call(this, event); + break; default: break; } +}, _RhNavigationSecondary_onTabEvent = function _RhNavigationSecondary_onTabEvent(event) { + // target is the element we are leaving with tab press + const target = event.target; + // get target parent dropdown + const dropdowns = __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_allDropdowns).call(this); + const dropdownParent = dropdowns.find(dropdown => dropdown.contains(target)); + if (!dropdownParent) { + return; + } + const focusableChildren = __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_focusableChildElements).call(this, dropdownParent); + if (!focusableChildren) { + return; + } + if (event.shiftKey) { + const firstFocusable = focusableChildren[0] === target; + if (!firstFocusable) { + return; + } + else { + this.close(); + this.overlayOpen = false; + } + } + else { + // is the target the last focusableChildren element in the dropdown + const lastFocusable = focusableChildren[focusableChildren.length - 1] === target; + if (!lastFocusable) { + return; + } + event.preventDefault(); + this.close(); + this.overlayOpen = false; + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").updateActiveItem(__classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").nextItem); + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").activeItem?.focus(); + } +}, _RhNavigationSecondary_onSlotchange = function _RhNavigationSecondary_onSlotchange() { + this._nav?.forEach(nav => { + __classPrivateFieldSet(this, _RhNavigationSecondary_navItems, Array.from(nav.querySelectorAll(':is(rh-navigation-secondary-dropdown, rh-secondary-nav-dropdown) > a, [slot="nav"] > li > a')), "f"); + }); + if (__classPrivateFieldGet(this, _RhNavigationSecondary_rtiInit, "f")) { + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").updateItems(__classPrivateFieldGet(this, _RhNavigationSecondary_navItems, "f") ?? []); + } + else { + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").initItems(__classPrivateFieldGet(this, _RhNavigationSecondary_navItems, "f") ?? []); + __classPrivateFieldSet(this, _RhNavigationSecondary_rtiInit, true, "f"); + } +}, _RhNavigationSecondary_focusableChildElements = function _RhNavigationSecondary_focusableChildElements(parent) { + return parent.querySelectorAll('a, button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)'); }, _RhNavigationSecondary_getDropdownIndex = function _RhNavigationSecondary_getDropdownIndex(element) { if (!RhNavigationSecondary_1.isDropdown(element)) { __classPrivateFieldGet(this, _RhNavigationSecondary_logger, "f").warn('The getDropdownIndex method expects to receive a dropdown element.'); @@ -230,6 +285,10 @@ _RhNavigationSecondary_logger = new WeakMap(), _RhNavigationSecondary_logoCopy = } const dropdown = __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_dropdownByIndex).call(this, index); if (dropdown && RhNavigationSecondary_1.isDropdown(dropdown)) { + const link = dropdown.querySelector('a'); + if (link) { + __classPrivateFieldGet(this, _RhNavigationSecondary_tabindex, "f").updateActiveItem(link); + } __classPrivateFieldGet(this, _RhNavigationSecondary_instances, "m", _RhNavigationSecondary_openDropdown).call(this, dropdown); } }, _RhNavigationSecondary_allDropdowns = function _RhNavigationSecondary_allDropdowns() { @@ -269,6 +328,9 @@ __decorate([ colorContextProvider(), property({ reflect: true, attribute: 'color-palette' }) ], RhNavigationSecondary.prototype, "colorPalette", void 0); +__decorate([ + queryAssignedElements({ slot: 'nav' }) +], RhNavigationSecondary.prototype, "_nav", void 0); __decorate([ state() ], RhNavigationSecondary.prototype, "mobileMenuExpanded", void 0); diff --git a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js.map b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js.map index 417ae2af83..b84f0fa790 100644 --- a/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js.map +++ b/assets/packages/@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js.map @@ -1 +1 @@ -{"version":3,"file":"rh-navigation-secondary.js","sourceRoot":"","sources":["rh-navigation-secondary.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AAEpE,OAAO,+DAA+D,CAAC;AAEvE,OAAO,2CAA2C,CAAC;AACnD,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAEvH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAqB,MAAM,qCAAqC,CAAC;AAE9F,MAAM,OAAO,8BAA+B,SAAQ,aAAa;IAC/D,YACS,IAAa,EACb,MAAmB;QAE1B,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAHjB,SAAI,GAAJ,IAAI,CAAS;QACb,WAAM,GAAN,MAAM,C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AAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;IAC5F,CAAC;CACF,CAAA;;AAPK,cAAc;IADnB,aAAa,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CAOnB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Logger } from '@patternfly/pfe-core/controllers/logger.js';\n\nimport '../../lib/elements/rh-context-provider/rh-context-provider.js';\n\nimport './rh-navigation-secondary-menu-section.js';\nimport './rh-navigation-secondary-overlay.js';\n\nimport { ComposedEvent } from '@patternfly/pfe-core';\n\nimport { RhNavigationSecondaryDropdown, SecondaryNavDropdownExpandEvent } from './rh-navigation-secondary-dropdown.js';\n\nimport { DirController } from '../../lib/DirController.js';\nimport { ScreenSizeController } from '../../lib/ScreenSizeController.js';\nimport { colorContextProvider, type ColorPalette } from '../../lib/context/color/provider.js';\n\nexport class SecondaryNavOverlayChangeEvent extends ComposedEvent {\n constructor(\n public open: boolean,\n public toggle: HTMLElement\n ) {\n super('overlay-change');\n }\n}\n\nexport type NavPalette = Extract;\n\nimport styles from './rh-navigation-secondary.css';\nimport { state } from 'lit/decorators/state.js';\n\n/**\n * The Secondary navigation is used to connect a series of pages together. It displays wayfinding content and links relevant to the page it is placed on. It should be used in conjunction with the [primary navigation](../navigation-primary).\n *\n * @summary Propagates related content across a series of pages\n *\n * @slot logo - Logo added to the main nav bar, expects `Text | | ` element\n * @slot nav - Navigation list added to the main nav bar, expects `
    ` element\n * @slot cta - Nav bar level CTA, expects `` element\n * @slot mobile-menu - Text label for the mobile menu button, for l10n. Defaults to \"Menu\"\n *\n * @csspart nav - container, `