@gemeentenijmegen/web-components 0.0.2-alpha.86 → 0.0.2-alpha.88

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.
@@ -28,7 +28,7 @@
28
28
  }
29
29
  }
30
30
 
31
- var css_248z = "/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n/* stylelint-disable-next-line block-no-empty */\n.nijmegen-header {\n background-color: var(--nijmegen-header-background-color, #fff);\n border: 0 solid var(--nijmegen-header-border-color, transparent);\n border-block-end-width: var(--nijmegen-header-border-block-end-width, 0);\n writing-mode: horizontal-tb;\n}\n.nijmegen-header .nijmegen-search {\n background-color: red;\n inline-size: 100%;\n}\n\n.nijmegen-header__content {\n align-items: center;\n align-self: center;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-inline: auto;\n max-inline-size: var(--nijmegen-header-content-max-inline-size, 100%);\n padding-block-end: var(--nijmegen-header-content-padding-block-end, 0);\n padding-block-start: var(--nijmegen-header-content-padding-block-start, 0);\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n}\n@media (width < 1024px) {\n .nijmegen-header__content {\n display: none;\n }\n}\n\n.nijmegen-header__content--small {\n position: relative;\n}\n.nijmegen-header__content--small--inner {\n align-items: center;\n align-self: center;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-inline: auto;\n max-inline-size: var(--nijmegen-header-content-max-inline-size, 100%);\n padding-block-end: var(--nijmegen-header-content-padding-block-end, 0);\n padding-block-start: var(--nijmegen-header-content-padding-block-start, 0);\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n border-block-end-width: var(--nijmegen-header-border-block-end-width, 0);\n}\n@media (width >= 1024px) {\n .nijmegen-header__content--small {\n display: none;\n }\n}\n\n.nijmegen-header__mobile-menu {\n background-color: var(--nijmegen-menu-background-color);\n border: 0 solid var(--nijmegen-header-border-color, transparent);\n border-block-end-width: var(--nijmegen-header-border-block-end-width, 0);\n display: none;\n padding-block-end: var(--nijmegen-menu-padding-block-end);\n padding-block-start: var(--nijmegen-menu-padding-block-start);\n position: absolute;\n width: 100%; /* stylelint-disable-line property-disallowed-list */\n z-index: 10;\n}\n.nijmegen-header__mobile-menu nijmegen-search,\n.nijmegen-header__mobile-menu .nijmegen-search {\n display: block;\n max-inline-size: calc(100% - var(--nijmegen-header-content-padding-inline-end, 0) - var(--nijmegen-header-content-padding-inline-start, 0));\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n}\n.nijmegen-header__mobile-menu--visible {\n display: block;\n}\n\n.nijmegen-header__navigation,\n.nijmegen-header__actions {\n column-gap: var(--nijmegen-header-content-column-gap, 0);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n list-style: none;\n padding-inline-start: 0;\n}\n\n.nijmegen-header__panel {\n display: none;\n left: 0; /* stylelint-disable-line property-disallowed-list */\n padding-block-start: 1.5rem;\n position: absolute;\n width: 100%; /* stylelint-disable-line property-disallowed-list */\n z-index: 10;\n}\n.nijmegen-header__panel--small {\n width: auto; /* stylelint-disable-line property-disallowed-list */\n}\n\n.nijmegen-header-action--relative {\n position: relative;\n}\n.nijmegen-header-action--relative .nijmegen-header__panel {\n left: auto; /* stylelint-disable-line property-disallowed-list */\n right: 0; /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-action--relative .nijmegen-header__panel .nijmegen-listbox {\n min-inline-size: 240px;\n}\n\n.nijmegen-header-item {\n all: unset; /* stylelint-disable-line order/properties-alphabetical-order */\n align-items: end; /* stylelint-disable-line order/properties-alphabetical-order */\n color: var(--nijmegen-header-item-color, #000);\n column-gap: var(--nijmegen-header-item-column-gap, 0);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n font-family: var(--nijmegen-header-item-font-family, inherit);\n font-size: var(--nijmegen-header-item-font-size, 1rem);\n font-weight: var(--nijmegen-header-item-font-weight, 400);\n justify-content: space-between;\n line-height: var(--nijmegen-header-item-line-height, 1.5);\n text-decoration: none;\n user-select: none;\n}\n.nijmegen-header-item[aria-expanded]::after {\n background-color: var(--nijmegen-header-item-color, #000);\n content: \"\";\n display: inline-block;\n /* stylelint-disable-next-line property-disallowed-list */\n height: var(--nijmegen-header-item-icon-size, 1.5rem);\n mask-position: center;\n mask-repeat: no-repeat;\n mask-size: 100%;\n width: var(--nijmegen-header-item-icon-size, 1.5rem); /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-item--active, .nijmegen-header-item[aria-expanded=true] {\n -webkit-text-stroke-width: 1px;\n}\n.nijmegen-header-item--active + .nijmegen-header__panel, .nijmegen-header-item[aria-expanded=true] + .nijmegen-header__panel {\n display: block;\n}\n.nijmegen-header-item[aria-expanded=false]::after {\n mask-image: var(--nijmegen-header-item-open-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 9l6 6l6 -6\" /></svg>'));\n}\n.nijmegen-header-item[aria-expanded=true]::after {\n mask-image: var(--nijmegen-header-item-open-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-up\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 15l6 -6l6 6\" /></svg>'));\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-]::before {\n background-color: var(--nijmegen-header-item-color, #000);\n content: \"\";\n display: inline-block;\n /* stylelint-disable-next-line property-disallowed-list */\n height: var(--nijmegen-header-item-icon-size, 1.5rem);\n mask-position: center;\n mask-repeat: no-repeat;\n mask-size: 100%;\n width: var(--nijmegen-header-item-icon-size, 1.5rem); /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-][aria-expanded]::after {\n all: unset;\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-][aria-expanded=true]::before {\n mask-image: var(--nijmegen-header-item-close-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-x\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 6l-12 12\" /><path d=\"M6 6l12 12\" /></svg>'));\n}\n.nijmegen-header-item--icon-search::before {\n mask-image: var(--nijmegen-header-item-search-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-search\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\" /><path d=\"M21 21l-6 -6\" /></svg>'));\n}\n@media (width < 1280px) {\n .nijmegen-header-item--icon-user span {\n display: none;\n }\n}\n.nijmegen-header-item--icon-user::before {\n mask-image: var(--nijmegen-header-item-search-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-user\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\" /><path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\" /></svg>'));\n}\n.nijmegen-header-item:hover, .nijmegen-header-item--hover {\n color: var(--nijmegen-header-item-hover-color, #000);\n text-decoration: var(--nijmegen-header-item-hover-text-decoration, none);\n}\n.nijmegen-header-item:hover::before, .nijmegen-header-item:hover::after, .nijmegen-header-item--hover::before, .nijmegen-header-item--hover::after {\n background-color: var(--nijmegen-header-item-hover-color, #000);\n}\n.nijmegen-header-item:active, .nijmegen-header-item--active {\n color: var(--nijmegen-header-item-active-color, #000);\n text-decoration: var(--nijmegen-header-item-active-text-decoration, none);\n}\n.nijmegen-header-item:focus-visible, .nijmegen-header-item--focus-visible {\n /* - The browser default focus ring should apply when these CSS custom properties are not set.\n * - Make the `box-shadow` value available, so components that have their own `box-shadow`\n * can combine it with the focus ring box shadow.\n */\n --_utrecht-focus-ring-box-shadow: 0 0 0 var(--utrecht-focus-outline-width, 0)\n var(--utrecht-focus-inverse-outline-color, transparent);\n box-shadow: var(--_utrecht-focus-ring-box-shadow);\n outline-color: var(--utrecht-focus-outline-color, revert);\n outline-offset: var(--utrecht-focus-outline-offset, revert);\n outline-style: var(--utrecht-focus-outline-style, revert);\n outline-width: var(--utrecht-focus-outline-width, revert);\n z-index: 1;\n background-color: var(--nijmegen-header-item-focus-visible-background-color, #fff);\n color: var(--nijmegen-header-item-focus-visible-color, #000);\n}";
31
+ var css_248z = "/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n/* stylelint-disable-next-line block-no-empty */\n.nijmegen-header {\n position: relative;\n writing-mode: horizontal-tb;\n}\n.nijmegen-header .nijmegen-search {\n inline-size: 100%;\n}\n\n.nijmegen-header__backdrop {\n background-color: var(--utrecht-backdrop-background-color);\n display: none;\n height: 100vh; /* stylelint-disable-line property-disallowed-list */\n opacity: var(--utrecht-backdrop-opacity);\n position: fixed;\n top: 0; /* stylelint-disable-line property-disallowed-list */\n width: 100%; /* stylelint-disable-line property-disallowed-list */\n z-index: 100;\n}\n.nijmegen-header__backdrop--visible {\n display: block;\n}\n\n.nijmegen-header__content {\n background-color: var(--nijmegen-header-background-color, #fff);\n border: 0 solid var(--nijmegen-header-border-color, transparent);\n border-block-end-width: var(--nijmegen-header-border-block-end-width, 0);\n position: relative;\n z-index: 101;\n}\n.nijmegen-header__content .nijmegen-header__content--inner {\n align-items: center;\n align-self: center;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-inline: auto;\n max-inline-size: var(--nijmegen-header-content-max-inline-size, 100%);\n padding-block-end: var(--nijmegen-header-content-padding-block-end, 0);\n padding-block-start: var(--nijmegen-header-content-padding-block-start, 0);\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n}\n@media (width < 1024px) {\n .nijmegen-header__content {\n display: none;\n }\n}\n\n.nijmegen-header__content--small {\n background-color: var(--nijmegen-header-background-color, #fff);\n border: 0 solid var(--nijmegen-header-border-color, transparent);\n border-block-end-width: var(--nijmegen-header-border-block-end-width, 0);\n position: relative;\n z-index: 101;\n}\n.nijmegen-header__content--small--inner {\n align-items: center;\n align-self: center;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-inline: auto;\n max-inline-size: var(--nijmegen-header-content-max-inline-size, 100%);\n padding-block-end: var(--nijmegen-header-content-padding-block-end, 0);\n padding-block-start: var(--nijmegen-header-content-padding-block-start, 0);\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n}\n@media (width >= 1024px) {\n .nijmegen-header__content--small {\n display: none;\n }\n}\n\n.nijmegen-header__mobile-menu {\n background-color: var(--nijmegen-menu-background-color);\n border: 0 solid var(--nijmegen-header-border-color, transparent);\n border-block-start-width: var(--nijmegen-header-border-block-end-width, 0);\n display: none;\n padding-block-end: var(--nijmegen-menu-padding-block-end);\n padding-block-start: var(--nijmegen-menu-padding-block-start);\n position: absolute;\n width: 100%; /* stylelint-disable-line property-disallowed-list */\n z-index: 10;\n}\n.nijmegen-header__mobile-menu nijmegen-search,\n.nijmegen-header__mobile-menu .nijmegen-search {\n display: block;\n max-inline-size: calc(100% - var(--nijmegen-header-content-padding-inline-end, 0) - var(--nijmegen-header-content-padding-inline-start, 0));\n padding-inline-end: var(--nijmegen-header-content-padding-inline-end, 0);\n padding-inline-start: var(--nijmegen-header-content-padding-inline-start, 0);\n}\n.nijmegen-header__mobile-menu--visible {\n display: block;\n}\n\n.nijmegen-header__navigation,\n.nijmegen-header__actions {\n column-gap: var(--nijmegen-header-content-column-gap, 0);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n list-style: none;\n padding-inline-start: 0;\n}\n\n.nijmegen-header__panel {\n display: none;\n left: 0; /* stylelint-disable-line property-disallowed-list */\n padding-block-start: calc(1.5rem + 2px);\n position: absolute;\n width: 100%; /* stylelint-disable-line property-disallowed-list */\n z-index: 10;\n}\n.nijmegen-header__panel--small {\n width: auto; /* stylelint-disable-line property-disallowed-list */\n}\n\n.nijmegen-header-action--relative {\n position: relative;\n}\n.nijmegen-header-action--relative .nijmegen-header__panel {\n left: auto; /* stylelint-disable-line property-disallowed-list */\n right: 0; /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-action--relative .nijmegen-header__panel .nijmegen-listbox {\n min-inline-size: 240px;\n}\n\n.nijmegen-header-item {\n all: unset; /* stylelint-disable-line order/properties-alphabetical-order */\n align-items: end; /* stylelint-disable-line order/properties-alphabetical-order */\n color: var(--nijmegen-header-item-color, #000);\n column-gap: var(--nijmegen-header-item-column-gap, 0);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n font-family: var(--nijmegen-header-item-font-family, inherit);\n font-size: var(--nijmegen-header-item-font-size, 1rem);\n font-weight: var(--nijmegen-header-item-font-weight, 400);\n justify-content: space-between;\n line-height: var(--nijmegen-header-item-line-height, 1.5);\n text-decoration: none;\n user-select: none;\n}\n.nijmegen-header-item[aria-expanded]::after {\n background-color: var(--nijmegen-header-item-color, #000);\n content: \"\";\n display: inline-block;\n /* stylelint-disable-next-line property-disallowed-list */\n height: var(--nijmegen-header-item-icon-size, 1.5rem);\n mask-position: center;\n mask-repeat: no-repeat;\n mask-size: 100%;\n width: var(--nijmegen-header-item-icon-size, 1.5rem); /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-item--active, .nijmegen-header-item[aria-expanded=true] {\n -webkit-text-stroke-width: 1px;\n}\n.nijmegen-header-item--active + .nijmegen-header__panel, .nijmegen-header-item[aria-expanded=true] + .nijmegen-header__panel {\n display: block;\n}\n.nijmegen-header-item[aria-expanded=false]::after {\n mask-image: var(--nijmegen-header-item-open-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 9l6 6l6 -6\" /></svg>'));\n}\n.nijmegen-header-item[aria-expanded=true]::after {\n mask-image: var(--nijmegen-header-item-open-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-up\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 15l6 -6l6 6\" /></svg>'));\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-]::before {\n background-color: var(--nijmegen-header-item-color, #000);\n content: \"\";\n display: inline-block;\n /* stylelint-disable-next-line property-disallowed-list */\n height: var(--nijmegen-header-item-icon-size, 1.5rem);\n mask-position: center;\n mask-repeat: no-repeat;\n mask-size: 100%;\n width: var(--nijmegen-header-item-icon-size, 1.5rem); /* stylelint-disable-line property-disallowed-list */\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-][aria-expanded]::after {\n all: unset;\n}\n.nijmegen-header-item[class*=nijmegen-header-item--icon-][aria-expanded=true]::before {\n mask-image: var(--nijmegen-header-item-close-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-x\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 6l-12 12\" /><path d=\"M6 6l12 12\" /></svg>'));\n}\n.nijmegen-header-item--icon-search::before {\n mask-image: var(--nijmegen-header-item-search-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-search\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\" /><path d=\"M21 21l-6 -6\" /></svg>'));\n}\n@media (width < 1280px) {\n .nijmegen-header-item--icon-user span {\n display: none;\n }\n}\n.nijmegen-header-item--icon-user::before {\n mask-image: var(--nijmegen-header-item-search-icon-image, url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-user\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\" /><path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\" /></svg>'));\n}\n.nijmegen-header-item:hover, .nijmegen-header-item--hover {\n color: var(--nijmegen-header-item-hover-color, #000);\n text-decoration: var(--nijmegen-header-item-hover-text-decoration, none);\n}\n.nijmegen-header-item:hover::before, .nijmegen-header-item:hover::after, .nijmegen-header-item--hover::before, .nijmegen-header-item--hover::after {\n background-color: var(--nijmegen-header-item-hover-color, #000);\n}\n.nijmegen-header-item:active, .nijmegen-header-item--active {\n color: var(--nijmegen-header-item-active-color, #000);\n text-decoration: var(--nijmegen-header-item-active-text-decoration, none);\n}\n.nijmegen-header-item:focus-visible, .nijmegen-header-item--focus-visible {\n /* - The browser default focus ring should apply when these CSS custom properties are not set.\n * - Make the `box-shadow` value available, so components that have their own `box-shadow`\n * can combine it with the focus ring box shadow.\n */\n --_utrecht-focus-ring-box-shadow: 0 0 0 var(--utrecht-focus-outline-width, 0)\n var(--utrecht-focus-inverse-outline-color, transparent);\n box-shadow: var(--_utrecht-focus-ring-box-shadow);\n outline-color: var(--utrecht-focus-outline-color, revert);\n outline-offset: var(--utrecht-focus-outline-offset, revert);\n outline-style: var(--utrecht-focus-outline-style, revert);\n outline-width: var(--utrecht-focus-outline-width, revert);\n z-index: 1;\n background-color: var(--nijmegen-header-item-focus-visible-background-color, #fff);\n color: var(--nijmegen-header-item-focus-visible-color, #000);\n}";
32
32
  styleInject(css_248z);
33
33
 
34
34
  var html = "<header class=\"nijmegen-header\">\n <slot></slot>\n</header>\n";
@@ -57,6 +57,14 @@
57
57
  });
58
58
  });
59
59
  });
60
+
61
+ // Add backdrop click handler
62
+ const backdrop = this.querySelector('.nijmegen-header__backdrop');
63
+ if (backdrop) {
64
+ backdrop.addEventListener('click', () => {
65
+ this.#closeAllMenus();
66
+ });
67
+ }
60
68
  }
61
69
 
62
70
  #handleClick(target, expandableElements) {
@@ -71,6 +79,9 @@
71
79
  this.#updateAriaLabel(element);
72
80
  this.#updateTabOrder(element);
73
81
  });
82
+
83
+ // Handle backdrop visibility
84
+ this.#updateBackdrop();
74
85
  }
75
86
 
76
87
  #handleContainerToggle(button) {
@@ -142,6 +153,50 @@
142
153
  button.ariaLabel = isExpanded ? 'Zoeken sluiten' : 'Zoeken';
143
154
  }
144
155
  }
156
+
157
+ #hasSmallPanel(button) {
158
+ // Check if the button's next sibling is a small panel
159
+ const panel = button.nextElementSibling;
160
+ if (panel && panel.classList.contains('nijmegen-header__panel--small')) {
161
+ return true;
162
+ }
163
+
164
+ return false;
165
+ }
166
+
167
+ #updateBackdrop() {
168
+ const backdrop = this.querySelector('.nijmegen-header__backdrop');
169
+ if (!backdrop) return;
170
+
171
+ // Check ALL expandable elements in the component
172
+ const allExpandableElements = this.querySelectorAll('[aria-expanded]:not(.nijmegen-mobile-menu__link)');
173
+
174
+ const anyExpanded = Array.from(allExpandableElements).some((element) => {
175
+ const isExpanded = element.getAttribute('aria-expanded') === 'true';
176
+
177
+ // Ignore small panels
178
+ if (this.#hasSmallPanel(element)) {
179
+ return false;
180
+ }
181
+
182
+ return isExpanded;
183
+ });
184
+
185
+ backdrop.classList.toggle('nijmegen-header__backdrop--visible', anyExpanded);
186
+ }
187
+
188
+ #closeAllMenus() {
189
+ const expandableElements = this.querySelectorAll('[aria-expanded="true"]:not(.nijmegen-mobile-menu__link)');
190
+
191
+ expandableElements.forEach((element) => {
192
+ element.ariaExpanded = 'false';
193
+ this.#handleContainerToggle(element);
194
+ this.#updateAriaLabel(element);
195
+ this.#updateTabOrder(element);
196
+ });
197
+
198
+ this.#updateBackdrop();
199
+ }
145
200
  }
146
201
 
147
202
  customElements.define('nijmegen-header', NijmegenHeader);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.2-alpha.86",
2
+ "version": "0.0.2-alpha.88",
3
3
  "author": "gemeente Nijmegen",
4
4
  "description": "Web components for the gemeente Nijmegen design system",
5
5
  "license": "EUPL-1.2",
@@ -26,12 +26,12 @@
26
26
  "clean": "rimraf dist"
27
27
  },
28
28
  "devDependencies": {
29
- "@gemeentenijmegen/components-css": "0.0.1-alpha.109",
29
+ "@gemeentenijmegen/components-css": "0.0.1-alpha.111",
30
30
  "postcss-discard-duplicates": "7.0.1",
31
31
  "rollup": "4.12.1",
32
32
  "rollup-plugin-html": "0.2.1",
33
33
  "rollup-plugin-node-resolve": "5.2.0",
34
34
  "rollup-plugin-postcss": "4.0.2"
35
35
  },
36
- "gitHead": "471eb1b2b9a437131f1f627d398067f028cb334b"
36
+ "gitHead": "738a0a6a92308311f21d17612712bcfd1bac757c"
37
37
  }
@@ -25,6 +25,14 @@ class NijmegenHeader extends HTMLElement {
25
25
  });
26
26
  });
27
27
  });
28
+
29
+ // Add backdrop click handler
30
+ const backdrop = this.querySelector('.nijmegen-header__backdrop');
31
+ if (backdrop) {
32
+ backdrop.addEventListener('click', () => {
33
+ this.#closeAllMenus();
34
+ });
35
+ }
28
36
  }
29
37
 
30
38
  #handleClick(target, expandableElements) {
@@ -39,6 +47,9 @@ class NijmegenHeader extends HTMLElement {
39
47
  this.#updateAriaLabel(element);
40
48
  this.#updateTabOrder(element);
41
49
  });
50
+
51
+ // Handle backdrop visibility
52
+ this.#updateBackdrop();
42
53
  }
43
54
 
44
55
  #handleContainerToggle(button) {
@@ -110,6 +121,50 @@ class NijmegenHeader extends HTMLElement {
110
121
  button.ariaLabel = isExpanded ? 'Zoeken sluiten' : 'Zoeken';
111
122
  }
112
123
  }
124
+
125
+ #hasSmallPanel(button) {
126
+ // Check if the button's next sibling is a small panel
127
+ const panel = button.nextElementSibling;
128
+ if (panel && panel.classList.contains('nijmegen-header__panel--small')) {
129
+ return true;
130
+ }
131
+
132
+ return false;
133
+ }
134
+
135
+ #updateBackdrop() {
136
+ const backdrop = this.querySelector('.nijmegen-header__backdrop');
137
+ if (!backdrop) return;
138
+
139
+ // Check ALL expandable elements in the component
140
+ const allExpandableElements = this.querySelectorAll('[aria-expanded]:not(.nijmegen-mobile-menu__link)');
141
+
142
+ const anyExpanded = Array.from(allExpandableElements).some((element) => {
143
+ const isExpanded = element.getAttribute('aria-expanded') === 'true';
144
+
145
+ // Ignore small panels
146
+ if (this.#hasSmallPanel(element)) {
147
+ return false;
148
+ }
149
+
150
+ return isExpanded;
151
+ });
152
+
153
+ backdrop.classList.toggle('nijmegen-header__backdrop--visible', anyExpanded);
154
+ }
155
+
156
+ #closeAllMenus() {
157
+ const expandableElements = this.querySelectorAll('[aria-expanded="true"]:not(.nijmegen-mobile-menu__link)');
158
+
159
+ expandableElements.forEach((element) => {
160
+ element.ariaExpanded = 'false';
161
+ this.#handleContainerToggle(element);
162
+ this.#updateAriaLabel(element);
163
+ this.#updateTabOrder(element);
164
+ });
165
+
166
+ this.#updateBackdrop();
167
+ }
113
168
  }
114
169
 
115
170
  customElements.define('nijmegen-header', NijmegenHeader);