@dso-toolkit/core 47.0.0 → 48.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1447 -58
- package/dist/cjs/dso-autosuggest.cjs.entry.js +57 -47
- package/dist/cjs/dso-date-picker.cjs.entry.js +3 -2
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +2 -2
- package/dist/cjs/dso-modal.cjs.entry.js +4 -7
- package/dist/cjs/dso-ozon-content.cjs.entry.js +3 -3
- package/dist/cjs/dso-table.cjs.entry.js +3 -5
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +13 -21
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +8 -3
- package/dist/cjs/{focus-trap.esm-d83fd673.js → focus-trap.esm-c501d382.js} +82 -155
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/accordion/components/accordion-section.css +27 -4
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js +6 -0
- package/dist/collection/components/accordion/components/accordion-section.js +91 -59
- package/dist/collection/components/accordion/components/handles/element.handle.js +7 -0
- package/dist/collection/components/accordion/components/handles/heading.handle.js +14 -0
- package/dist/collection/components/accordion/components/handles/icon.handle.js +13 -0
- package/dist/collection/components/accordion/components/handles/index.js +4 -0
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js +15 -0
- package/dist/collection/components/autosuggest/autosuggest.interfaces.js +1 -0
- package/dist/collection/components/autosuggest/autosuggest.js +61 -49
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/card-container/card-container.js +1 -1
- package/dist/collection/components/date-picker/date-picker.interfaces.js +1 -0
- package/dist/collection/components/date-picker/date-picker.js +19 -11
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +2 -2
- package/dist/collection/components/header/header.js +2 -6
- package/dist/collection/components/info-button/info-button.interfaces.js +1 -0
- package/dist/collection/components/info-button/info-button.js +2 -1
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/modal/modal.css +103 -75
- package/dist/collection/components/modal/modal.interfaces.js +1 -0
- package/dist/collection/components/modal/modal.js +6 -9
- package/dist/collection/components/ozon-content/nodes/noot.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/selectable/selectable.css +18 -1
- package/dist/collection/components/selectable/selectable.interfaces.js +1 -0
- package/dist/collection/components/selectable/selectable.js +3 -2
- package/dist/collection/components/table/table.css +49 -16
- package/dist/collection/components/table/table.js +2 -4
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +13 -42
- package/dist/collection/components/tree-view/tree-view.js +8 -2
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -0
- package/dist/collection/components/viewer-grid/viewer-grid.js +19 -11
- package/dist/collection/index.js +13 -0
- package/dist/components/clsx.m.js +3 -0
- package/dist/components/create-identifier.js +15 -0
- package/dist/components/dropdown-menu.js +151 -0
- package/dist/components/dso-accordion-section.d.ts +11 -0
- package/dist/components/dso-accordion-section.js +1535 -0
- package/dist/components/dso-accordion.d.ts +11 -0
- package/dist/components/dso-accordion.js +316 -0
- package/dist/components/dso-alert.d.ts +11 -0
- package/dist/components/dso-alert.js +55 -0
- package/dist/components/dso-attachments-counter.d.ts +11 -0
- package/dist/components/dso-attachments-counter.js +42 -0
- package/dist/components/dso-autosuggest.d.ts +11 -0
- package/dist/components/dso-autosuggest.js +309 -0
- package/dist/components/dso-badge.d.ts +11 -0
- package/dist/components/dso-badge.js +37 -0
- package/dist/components/dso-banner.d.ts +11 -0
- package/dist/components/dso-banner.js +37 -0
- package/dist/components/dso-card-container.d.ts +11 -0
- package/dist/components/dso-card-container.js +36 -0
- package/dist/components/dso-card.d.ts +11 -0
- package/dist/components/dso-card.js +66 -0
- package/dist/components/dso-date-picker.d.ts +11 -0
- package/dist/components/dso-date-picker.js +682 -0
- package/dist/components/dso-dropdown-menu.d.ts +11 -0
- package/dist/components/dso-dropdown-menu.js +6 -0
- package/dist/components/dso-header.d.ts +11 -0
- package/dist/components/dso-header.js +159 -0
- package/dist/components/dso-helpcenter-panel.d.ts +11 -0
- package/dist/components/dso-helpcenter-panel.js +127 -0
- package/dist/components/dso-highlight-box.d.ts +11 -0
- package/dist/components/dso-highlight-box.js +55 -0
- package/dist/components/dso-icon.d.ts +11 -0
- package/dist/components/dso-icon.js +6 -0
- package/dist/components/dso-image-overlay.d.ts +11 -0
- package/dist/components/dso-image-overlay.js +129 -0
- package/dist/components/dso-info-button.d.ts +11 -0
- package/dist/components/dso-info-button.js +6 -0
- package/dist/components/dso-info.d.ts +11 -0
- package/dist/components/dso-info.js +6 -0
- package/dist/components/dso-label.d.ts +11 -0
- package/dist/components/dso-label.js +156 -0
- package/dist/components/dso-map-base-layers.d.ts +11 -0
- package/dist/components/dso-map-base-layers.js +80 -0
- package/dist/components/dso-map-controls.d.ts +11 -0
- package/dist/components/dso-map-controls.js +86 -0
- package/dist/components/dso-map-overlays.d.ts +11 -0
- package/dist/components/dso-map-overlays.js +81 -0
- package/dist/components/dso-modal.d.ts +11 -0
- package/dist/components/dso-modal.js +85 -0
- package/dist/components/dso-ozon-content.d.ts +11 -0
- package/dist/components/dso-ozon-content.js +507 -0
- package/dist/components/dso-pagination.d.ts +11 -0
- package/dist/components/dso-pagination.js +159 -0
- package/dist/components/dso-progress-bar.d.ts +11 -0
- package/dist/components/dso-progress-bar.js +42 -0
- package/dist/components/dso-progress-indicator.d.ts +11 -0
- package/dist/components/dso-progress-indicator.js +6 -0
- package/dist/components/dso-responsive-element.d.ts +11 -0
- package/dist/components/dso-responsive-element.js +6 -0
- package/dist/components/dso-selectable.d.ts +11 -0
- package/dist/components/dso-selectable.js +6 -0
- package/dist/components/dso-table.d.ts +11 -0
- package/dist/components/dso-table.js +111 -0
- package/dist/components/dso-toggletip.d.ts +11 -0
- package/dist/components/dso-toggletip.js +90 -0
- package/dist/components/dso-tooltip.d.ts +11 -0
- package/dist/components/dso-tooltip.js +6 -0
- package/dist/components/dso-tree-view.d.ts +11 -0
- package/dist/components/dso-tree-view.js +227 -0
- package/dist/components/dso-viewer-grid.d.ts +11 -0
- package/dist/components/dso-viewer-grid.js +171 -0
- package/dist/components/focus-trap.esm.js +688 -0
- package/dist/components/icon.js +663 -0
- package/dist/components/index.d.ts +55 -0
- package/dist/components/index.esm.js +458 -0
- package/dist/components/index.js +35 -0
- package/dist/components/index2.js +70 -0
- package/dist/components/info-button.js +56 -0
- package/dist/components/info.js +42 -0
- package/dist/components/is-modified-event.js +4 -0
- package/dist/components/progress-indicator.js +44 -0
- package/dist/components/responsive-element.js +67 -0
- package/dist/components/selectable.js +108 -0
- package/dist/components/tooltip.js +2047 -0
- package/dist/components/v4.js +66 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-04ffcc93.entry.js +1 -0
- package/dist/dso-toolkit/{p-e0a37d82.entry.js → p-06b4f78d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2b83a825.entry.js → p-35687d62.entry.js} +1 -1
- package/dist/dso-toolkit/p-52bc72d0.entry.js +1 -0
- package/dist/dso-toolkit/p-57ceabab.js +5 -0
- package/dist/dso-toolkit/p-655eff47.entry.js +1 -0
- package/dist/dso-toolkit/p-672c8323.entry.js +1 -0
- package/dist/dso-toolkit/p-7f8be9bc.entry.js +1 -0
- package/dist/dso-toolkit/p-80575700.entry.js +1 -0
- package/dist/dso-toolkit/p-8e9f6355.entry.js +1 -0
- package/dist/dso-toolkit/p-a8cb2eae.entry.js +1 -0
- package/dist/dso-toolkit/p-d31805a9.entry.js +1 -0
- package/dist/dso-toolkit/{p-dcc74039.entry.js → p-d7b2adc3.entry.js} +1 -1
- package/dist/dso-toolkit/{p-800e1267.entry.js → p-daee3252.entry.js} +1 -1
- package/dist/dso-toolkit/p-ec5412aa.entry.js +1 -0
- package/dist/esm/dso-accordion-section.entry.js +1448 -59
- package/dist/esm/dso-autosuggest.entry.js +57 -47
- package/dist/esm/dso-date-picker.entry.js +3 -2
- package/dist/esm/dso-dropdown-menu.entry.js +2 -2
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +2 -2
- package/dist/esm/dso-modal.entry.js +5 -8
- package/dist/esm/dso-ozon-content.entry.js +3 -3
- package/dist/esm/dso-table.entry.js +3 -5
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +2 -2
- package/dist/esm/dso-tooltip.entry.js +13 -21
- package/dist/esm/dso-viewer-grid.entry.js +8 -3
- package/dist/esm/{focus-trap.esm-33203b60.js → focus-trap.esm-94794d92.js} +82 -155
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/accordion/accordion.interfaces.d.ts +0 -2
- package/dist/types/components/accordion/components/accordion-section.d.ts +10 -1
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +3 -0
- package/dist/types/components/accordion/components/handles/element.handle.d.ts +6 -0
- package/dist/types/components/accordion/components/handles/heading.handle.d.ts +5 -0
- package/dist/types/components/accordion/components/handles/icon.handle.d.ts +7 -0
- package/dist/types/components/accordion/components/handles/index.d.ts +4 -0
- package/dist/types/components/accordion/components/handles/state-icon.handle.d.ts +5 -0
- package/dist/types/components/autosuggest/autosuggest.d.ts +2 -15
- package/dist/types/components/autosuggest/autosuggest.interfaces.d.ts +14 -0
- package/dist/types/components/date-picker/date-picker.d.ts +2 -15
- package/dist/types/components/date-picker/date-picker.interfaces.d.ts +14 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +2 -2
- package/dist/types/components/header/header.interfaces.d.ts +1 -0
- package/dist/types/components/info-button/info-button.d.ts +1 -4
- package/dist/types/components/info-button/info-button.interfaces.d.ts +4 -0
- package/dist/types/components/map-overlays/map-overlays.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +3 -5
- package/dist/types/components/modal/modal.interfaces.d.ts +3 -0
- package/dist/types/components/selectable/selectable.d.ts +1 -2
- package/dist/types/components/selectable/selectable.interfaces.d.ts +2 -0
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +0 -8
- package/dist/types/components/tree-view/tree-view.d.ts +2 -2
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +5 -16
- package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +15 -0
- package/dist/types/components.d.ts +20 -27
- package/dist/types/index.d.ts +13 -0
- package/package.json +8 -8
- package/dist/custom-elements/index.d.ts +0 -243
- package/dist/custom-elements/index.js +0 -7555
- package/dist/dso-toolkit/p-0917f18a.entry.js +0 -1
- package/dist/dso-toolkit/p-0c8cd0d8.entry.js +0 -1
- package/dist/dso-toolkit/p-203fc66c.entry.js +0 -1
- package/dist/dso-toolkit/p-3ab4441a.entry.js +0 -1
- package/dist/dso-toolkit/p-44c0bb3e.entry.js +0 -1
- package/dist/dso-toolkit/p-89d262b7.js +0 -5
- package/dist/dso-toolkit/p-9aa3fa9d.entry.js +0 -1
- package/dist/dso-toolkit/p-ba253bcd.entry.js +0 -1
- package/dist/dso-toolkit/p-e43e39cf.entry.js +0 -1
- package/dist/dso-toolkit/p-e8b22546.entry.js +0 -1
- package/dist/dso-toolkit/p-f93b7c7a.entry.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoDropdownMenu extends Components.DsoDropdownMenu, HTMLElement {}
|
|
4
|
+
export const DsoDropdownMenu: {
|
|
5
|
+
prototype: DsoDropdownMenu;
|
|
6
|
+
new (): DsoDropdownMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoHeader extends Components.DsoHeader, HTMLElement {}
|
|
4
|
+
export const DsoHeader: {
|
|
5
|
+
prototype: DsoHeader;
|
|
6
|
+
new (): DsoHeader;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as clsx } from './clsx.m.js';
|
|
3
|
+
import { d as debounce_1 } from './index2.js';
|
|
4
|
+
import { i as isModifiedEvent } from './is-modified-event.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './dropdown-menu.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
7
|
+
|
|
8
|
+
const headerCss = ".sc-dso-header-h{display:block}.dso-header.sc-dso-header{border-bottom:1px solid #ccc;display:flex;flex-wrap:wrap;position:relative}@media screen and (min-width: 768px){.dso-header.sc-dso-header{align-items:center}}@media screen and (max-width: 991px){.dso-header.use-drop-down.sc-dso-header{flex-wrap:nowrap}}.dso-header.sc-dso-header .dso-nav.sc-dso-header{border:0}.logo-container.sc-dso-header{display:flex;flex-wrap:wrap;gap:0 24px;padding-bottom:16px;padding-top:16px}.login.sc-dso-header .dso-tertiary.sc-dso-header,.logout.sc-dso-header .dso-tertiary.sc-dso-header{cursor:pointer;font-family:Asap, sans-serif;font-weight:600;vertical-align:text-bottom}.profile.sc-dso-header a.sc-dso-header,.logout.sc-dso-header a.sc-dso-header,.login.sc-dso-header a.sc-dso-header{text-decoration:none;color:#39870c;font-weight:600}.profile.sc-dso-header a.sc-dso-header:hover,.profile.sc-dso-header a.sc-dso-header:focus,.logout.sc-dso-header a.sc-dso-header:hover,.logout.sc-dso-header a.sc-dso-header:focus,.login.sc-dso-header a.sc-dso-header:hover,.login.sc-dso-header a.sc-dso-header:focus{text-decoration:none}.profile.sc-dso-header a.sc-dso-header:active,.logout.sc-dso-header a.sc-dso-header:active,.login.sc-dso-header a.sc-dso-header:active{text-decoration:underline}.dso-header-session.sc-dso-header{display:flex;margin-left:auto}.dso-header-session.sc-dso-header .profile.sc-dso-header a.sc-dso-header{margin-left:8px}.dso-header-session.sc-dso-header .profile.sc-dso-header+.logout.sc-dso-header{border-left:3px solid #ccc;margin-left:16px;padding-left:16px}.dso-navbar.sc-dso-header{flex-basis:100%}.dso-navbar.sc-dso-header .dso-dropdown-options.sc-dso-header{border-top:1px solid #ccc}dso-dropdown-menu.sc-dso-header button.sc-dso-header{align-items:flex-end;background-color:transparent;border:0;display:flex;font-family:Asap, sans-serif;padding-right:32px}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{border:0;border-radius:0}@media screen and (min-width: 768px){dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{width:375px}}@media screen and (max-width: 767px){dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{width:100%}}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header{color:#275937;font-size:1.25rem;padding:16px;white-space:pre-wrap}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header:focus{color:#fff}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header:hover{background-color:#fff;color:#275937;text-decoration:underline}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.dso-active.sc-dso-header a.sc-dso-header{font-weight:600}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header+li.sc-dso-header{border-top:1px solid #ccc}.dropdown.sc-dso-header{margin-left:auto}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header{position:static}@media screen and (max-width: 767px){.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header{margin-top:28px}}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{right:0;top:100%}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header{color:#39870c;font-size:16px;font-weight:600;line-height:normal;position:relative}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header::after{margin-left:8px;position:absolute;right:0px;top:50%;transform:translateY(-50%)}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:hover,.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:active{cursor:pointer;text-decoration:underline}.dso-nav.sc-dso-header{align-items:end;column-gap:32px;display:flex;list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.dso-nav.sc-dso-header>li.sc-dso-header{margin-bottom:4px}.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header{display:block}.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:hover,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:focus,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:visited{color:#275937}.dso-nav.sc-dso-header>li.dso-active.sc-dso-header,.dso-nav.sc-dso-header>li.is-active.sc-dso-header{margin-bottom:0}.dso-nav.sc-dso-header>li.dso-active.sc-dso-header>a.sc-dso-header,.dso-nav.sc-dso-header>li.is-active.sc-dso-header>a.sc-dso-header{border-bottom:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main.sc-dso-header{display:flex !important}.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header{text-decoration:none;font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;white-space:nowrap}.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:hover,.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:focus,.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:active{text-decoration:underline}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{left:-1rem;top:calc(100% + 3px)}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header{font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;align-items:center;color:#275937;padding-right:32px}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:hover,.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header::after{margin-left:8px;position:absolute;right:0px;top:auto;transform:none}.dso-nav.sc-dso-header .menu-user-home.sc-dso-header{margin-left:auto}.dso-nav.sc-dso-header .menu-user-home.sc-dso-header dso-icon.sc-dso-header{height:1em;margin-right:8px;position:relative;top:-2px;width:1.2em}";
|
|
9
|
+
|
|
10
|
+
const minDesktopViewportWidth = 992;
|
|
11
|
+
const Header = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.dsoHeaderClick = createEvent(this, "dsoHeaderClick", 7);
|
|
16
|
+
this.onWindowResize = debounce_1(() => {
|
|
17
|
+
this.setDropDownMenu();
|
|
18
|
+
this.setOverflowMenu();
|
|
19
|
+
}, 100);
|
|
20
|
+
this.MenuItem = (item) => {
|
|
21
|
+
return (h("li", { class: item.active ? "dso-active" : undefined }, h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: (e) => this.clickHandler(e, "menuItem", { menuItem: item }) }, item.label)));
|
|
22
|
+
};
|
|
23
|
+
this.mainMenu = [];
|
|
24
|
+
this.useDropDownMenu = "auto";
|
|
25
|
+
this.authStatus = "none";
|
|
26
|
+
this.loginUrl = undefined;
|
|
27
|
+
this.logoutUrl = undefined;
|
|
28
|
+
this.userProfileName = undefined;
|
|
29
|
+
this.userProfileUrl = undefined;
|
|
30
|
+
this.userHomeUrl = undefined;
|
|
31
|
+
this.showDropDown = undefined;
|
|
32
|
+
this.hasSubLogo = false;
|
|
33
|
+
this.overflowMenuItems = 0;
|
|
34
|
+
}
|
|
35
|
+
clickHandler(e, type, options) {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
this.dsoHeaderClick.emit({
|
|
38
|
+
originalEvent: e,
|
|
39
|
+
isModifiedEvent: isModifiedEvent(e),
|
|
40
|
+
type,
|
|
41
|
+
menuItem: options === null || options === void 0 ? void 0 : options.menuItem,
|
|
42
|
+
url: (_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.menuItem) === null || _b === void 0 ? void 0 : _b.url,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
setShowDropDown(value) {
|
|
46
|
+
if (value === "auto") {
|
|
47
|
+
this.setDropDownMenu();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.showDropDown = value === "always";
|
|
51
|
+
}
|
|
52
|
+
componentWillLoad() {
|
|
53
|
+
this.hasSubLogo = this.host.querySelector("*[slot = 'sub-logo']") !== null;
|
|
54
|
+
}
|
|
55
|
+
shrinkMenuToFit() {
|
|
56
|
+
if (!this.wrapper || !this.nav) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (this.wrapper.clientWidth >= this.nav.clientWidth) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.overflowMenuItems++;
|
|
66
|
+
}
|
|
67
|
+
componentDidRender() {
|
|
68
|
+
if (this.showDropDown) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
window.setTimeout(() => this.shrinkMenuToFit(), 0);
|
|
72
|
+
}
|
|
73
|
+
componentDidLoad() {
|
|
74
|
+
this.setShowDropDown(this.useDropDownMenu);
|
|
75
|
+
}
|
|
76
|
+
setOverflowMenu() {
|
|
77
|
+
if (this.showDropDown) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (this.overflowMenuItems !== 0) {
|
|
81
|
+
this.overflowMenuItems = 0;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.shrinkMenuToFit();
|
|
85
|
+
}
|
|
86
|
+
setDropDownMenu() {
|
|
87
|
+
if (this.useDropDownMenu !== "auto") {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.showDropDown = window.innerWidth < minDesktopViewportWidth;
|
|
91
|
+
}
|
|
92
|
+
connectedCallback() {
|
|
93
|
+
window.addEventListener("resize", this.onWindowResize);
|
|
94
|
+
}
|
|
95
|
+
disconnectedCallback() {
|
|
96
|
+
window.removeEventListener("resize", this.onWindowResize);
|
|
97
|
+
}
|
|
98
|
+
render() {
|
|
99
|
+
// Prevent 'flickering' when useDropDownMenu = 'always'
|
|
100
|
+
if (this.showDropDown === undefined) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
return (h(Fragment, null, h("div", { class: clsx("dso-header", {
|
|
104
|
+
["use-drop-down"]: this.showDropDown,
|
|
105
|
+
["has-sub-logo"]: this.hasSubLogo,
|
|
106
|
+
}), ref: (element) => (this.wrapper = element) }, h("div", { class: "logo-container" }, h("div", { class: "logo" }, h("slot", { name: "logo" })), h("div", { class: "sub-logo" }, h("slot", { name: "sub-logo" }))), this.showDropDown && this.mainMenu && this.mainMenu.length > 0 && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right" }, h("button", { type: "button", slot: "toggle" }, h("span", null, "Menu")), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (h("li", null, h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, "Mijn Omgevingsloket"))), this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("li", null, h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName, h("span", { class: "profile-label" }, " - Mijn profiel")))), this.authStatus === "loggedOut" && (h("li", null, this.loginUrl ? (h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (h("li", null, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen"))))))))), !this.showDropDown && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("div", { class: "profile" }, h("span", { class: "profile-label" }, "Welkom:"), h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName))), this.authStatus === "loggedOut" && (h("div", { class: "login" }, this.loginUrl ? (h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (h("div", { class: "logout" }, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen"))))), ((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (h("nav", { class: "dso-navbar" }, h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu &&
|
|
107
|
+
this.mainMenu
|
|
108
|
+
.filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)
|
|
109
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { "dropdown-align": "left" }, h("button", { type: "button", slot: "toggle" }, h("span", null, "Meer")), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu &&
|
|
110
|
+
this.mainMenu
|
|
111
|
+
.filter((_, index) => this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems)
|
|
112
|
+
.map(this.MenuItem)))))), this.userHomeUrl && (h("li", { class: "menu-user-home" }, h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, h("dso-icon", { icon: "user-line" }), "Mijn Omgevingsloket")))))))))));
|
|
113
|
+
}
|
|
114
|
+
get host() { return this; }
|
|
115
|
+
static get watchers() { return {
|
|
116
|
+
"useDropDownMenu": ["setShowDropDown"]
|
|
117
|
+
}; }
|
|
118
|
+
static get style() { return headerCss; }
|
|
119
|
+
}, [6, "dso-header", {
|
|
120
|
+
"mainMenu": [16],
|
|
121
|
+
"useDropDownMenu": [1, "use-drop-down-menu"],
|
|
122
|
+
"authStatus": [1, "auth-status"],
|
|
123
|
+
"loginUrl": [1, "login-url"],
|
|
124
|
+
"logoutUrl": [1, "logout-url"],
|
|
125
|
+
"userProfileName": [1, "user-profile-name"],
|
|
126
|
+
"userProfileUrl": [1, "user-profile-url"],
|
|
127
|
+
"userHomeUrl": [1, "user-home-url"],
|
|
128
|
+
"showDropDown": [32],
|
|
129
|
+
"hasSubLogo": [32],
|
|
130
|
+
"overflowMenuItems": [32]
|
|
131
|
+
}]);
|
|
132
|
+
function defineCustomElement$1() {
|
|
133
|
+
if (typeof customElements === "undefined") {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const components = ["dso-header", "dso-dropdown-menu", "dso-icon"];
|
|
137
|
+
components.forEach(tagName => { switch (tagName) {
|
|
138
|
+
case "dso-header":
|
|
139
|
+
if (!customElements.get(tagName)) {
|
|
140
|
+
customElements.define(tagName, Header);
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
case "dso-dropdown-menu":
|
|
144
|
+
if (!customElements.get(tagName)) {
|
|
145
|
+
defineCustomElement$3();
|
|
146
|
+
}
|
|
147
|
+
break;
|
|
148
|
+
case "dso-icon":
|
|
149
|
+
if (!customElements.get(tagName)) {
|
|
150
|
+
defineCustomElement$2();
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
} });
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const DsoHeader = Header;
|
|
157
|
+
const defineCustomElement = defineCustomElement$1;
|
|
158
|
+
|
|
159
|
+
export { DsoHeader, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoHelpcenterPanel extends Components.DsoHelpcenterPanel, HTMLElement {}
|
|
4
|
+
export const DsoHelpcenterPanel: {
|
|
5
|
+
prototype: DsoHelpcenterPanel;
|
|
6
|
+
new (): DsoHelpcenterPanel;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createFocusTrap } from './focus-trap.esm.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
|
+
|
|
5
|
+
const helpcenterPanelCss = ":host {\n display: block;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.wrapper {\n height: 100%;\n left: 0;\n position: fixed;\n top: 0;\n visibility: hidden;\n width: 100%;\n}\n.wrapper.visible {\n visibility: visible;\n}\n\n.dimscreen {\n background-color: #000;\n height: 100%;\n opacity: 0.4;\n width: 100%;\n}\n\n.open-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n bottom: 16px;\n font-family: Asap, sans-serif;\n position: fixed;\n right: 16px;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);\n}\n.open-button:focus, .open-button:focus-visible {\n outline-offset: 2px;\n}\n.open-button:active {\n outline: 0;\n}\n.open-button:hover {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.open-button:active {\n background-color: #15301e;\n border-color: #15301e;\n color: #fff;\n}\n.open-button[disabled], .open-button[disabled]:hover {\n background-color: #afcf9d;\n border-color: #afcf9d;\n color: #fff;\n}\n.open-button.btn-sm {\n line-height: 1rem;\n}\n.open-button.btn-sm dso-icon,\n.open-button.btn-sm svg.di, .open-button.btn-sm.extern::after, .open-button.btn-sm.download::after, .open-button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.open-button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.open-button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.open-button dso-icon,\n.open-button svg.di {\n margin-left: -8px;\n margin-right: 8px;\n}\n.open-button span + dso-icon,\n.open-button span + svg.di {\n margin-left: 8px;\n margin-right: -8px;\n}\n.open-button.dso-spinner-left[disabled], .open-button.dso-spinner-right[disabled] {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.open-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.open-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.open-button:hover {\n cursor: pointer;\n}\n.open-button.open {\n display: none;\n}\n\n.close-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border-right: 0;\n border-top: 0;\n border-radius: 0 0 0 8px;\n height: 40px;\n min-width: 40px;\n padding: 0;\n position: fixed;\n right: 0;\n width: 40px;\n top: 0;\n}\n.close-button:focus, .close-button:focus-visible {\n outline-offset: 2px;\n}\n.close-button:active {\n outline: 0;\n}\n.close-button:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.close-button:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.close-button[disabled], .close-button[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.close-button.btn-sm {\n line-height: 1rem;\n}\n.close-button.btn-sm dso-icon,\n.close-button.btn-sm svg.di, .close-button.btn-sm.extern::after, .close-button.btn-sm.download::after, .close-button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.close-button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.close-button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.close-button dso-icon,\n.close-button svg.di {\n margin-left: -8px;\n margin-right: 8px;\n}\n.close-button span + dso-icon,\n.close-button span + svg.di {\n margin-left: 8px;\n margin-right: -8px;\n}\n.close-button.dso-spinner-left[disabled], .close-button.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.close-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.close-button.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.close-button.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.close-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.close-button.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.close-button.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n.close-button dso-icon {\n margin-left: 0;\n margin-right: 0;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.close-button:hover, .close-button:active, .close-button:focus {\n cursor: pointer;\n}\n.close-button.close {\n display: none;\n}\n\n.iframe-container {\n background-color: #fff;\n border: 0;\n border-left: 1px solid #ccc;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.4);\n height: 100%;\n position: absolute;\n top: 0;\n transition: right 0.5s;\n}\n@media screen and (max-width: 480px) {\n .iframe-container {\n right: -320px;\n width: 320px;\n }\n}\n@media screen and (min-width: 481px) and (max-width: 767px) {\n .iframe-container {\n right: -480px;\n width: 480px;\n }\n}\n@media screen and (min-width: 768px) {\n .iframe-container {\n right: -640px;\n width: 640px;\n }\n}\n.iframe-container.open {\n right: 0;\n}\n\niframe {\n border: 0;\n height: 100%;\n width: 100%;\n}";
|
|
6
|
+
|
|
7
|
+
const maxCssTransitionMilliseconds = 500;
|
|
8
|
+
const HelpcenterPanel = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.iframeLoaded = false;
|
|
14
|
+
this.openClick = () => {
|
|
15
|
+
this.visibility = "visible";
|
|
16
|
+
this.slideState = "open";
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
this.isOpen = "open";
|
|
19
|
+
});
|
|
20
|
+
if (!this.loadIframe) {
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
this.loadIframe = true;
|
|
23
|
+
}, maxCssTransitionMilliseconds);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.closeClick = () => {
|
|
27
|
+
this.isOpen = "close";
|
|
28
|
+
this.slideState = "close";
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
this.visibility = "hidden";
|
|
31
|
+
}, maxCssTransitionMilliseconds);
|
|
32
|
+
};
|
|
33
|
+
this.label = "Hulp nodig";
|
|
34
|
+
this.url = undefined;
|
|
35
|
+
this.visibility = "hidden";
|
|
36
|
+
this.isOpen = "close";
|
|
37
|
+
this.slideState = "close";
|
|
38
|
+
this.loadIframe = false;
|
|
39
|
+
}
|
|
40
|
+
watchUrl(url) {
|
|
41
|
+
if (this.isOpen === "open" && this.iframeUrl !== url) {
|
|
42
|
+
this.iframeUrl = url;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
watchIsOpen(isOpen) {
|
|
46
|
+
const body = document.querySelector("body");
|
|
47
|
+
if (isOpen === "open") {
|
|
48
|
+
body === null || body === void 0 ? void 0 : body.style.setProperty("overflow", "hidden");
|
|
49
|
+
if (this.iframeUrl !== this.url) {
|
|
50
|
+
this.iframeUrl = this.url;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
body === null || body === void 0 ? void 0 : body.style.removeProperty("overflow");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
keyDownListener(event) {
|
|
58
|
+
if (event.key === "Escape" && this.isOpen === "open") {
|
|
59
|
+
this.closeClick();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
createTrap() {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (!this.panelWrapperElement) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.trap = createFocusTrap(this.panelWrapperElement, {
|
|
68
|
+
allowOutsideClick: true,
|
|
69
|
+
tabbableOptions: {
|
|
70
|
+
getShadowRoot: true,
|
|
71
|
+
},
|
|
72
|
+
setReturnFocus: (_a = this.openButtonElement) !== null && _a !== void 0 ? _a : false,
|
|
73
|
+
initialFocus: (_b = this.closeButtonElement) !== null && _b !== void 0 ? _b : false,
|
|
74
|
+
}).activate();
|
|
75
|
+
}
|
|
76
|
+
componentDidRender() {
|
|
77
|
+
var _a;
|
|
78
|
+
if (this.isOpen === "open" && this.iframeLoaded && !this.trap) {
|
|
79
|
+
this.createTrap();
|
|
80
|
+
}
|
|
81
|
+
else if (this.isOpen === "close" && this.trap) {
|
|
82
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
83
|
+
delete this.trap;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
return (h(Fragment, null, h("button", { type: "button", onClick: this.openClick, class: `open-button ${this.isOpen}`, "aria-expanded": this.isOpen === "open" ? "true" : "false", "aria-haspopup": "dialog", "aria-controls": "dso-panel-wrapper", ref: (element) => (this.openButtonElement = element) }, h("dso-icon", { icon: "help" }), h("span", null, this.label)), h("div", { id: "dso-panel-wrapper", class: `wrapper ${this.visibility}`, "aria-label": "helpcentrum", role: "dialog", ref: (element) => (this.panelWrapperElement = element) }, h("div", { class: "dimscreen", onClick: this.closeClick }), h("div", { class: `iframe-container ${this.slideState}`, "aria-live": "polite" }, this.loadIframe ? (h("iframe", { src: this.iframeUrl, tabindex: "0", onLoad: () => {
|
|
88
|
+
this.createTrap();
|
|
89
|
+
this.iframeLoaded = true;
|
|
90
|
+
} })) : (h("div", null))), h("button", { type: "button", class: `close-button ${this.isOpen}`, onClick: this.closeClick, "aria-expanded": this.isOpen === "open" ? "true" : "false", "aria-controls": "dso-panel-wrapper", ref: (element) => (this.closeButtonElement = element) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "sluiten")))));
|
|
91
|
+
}
|
|
92
|
+
static get watchers() { return {
|
|
93
|
+
"url": ["watchUrl"],
|
|
94
|
+
"isOpen": ["watchIsOpen"]
|
|
95
|
+
}; }
|
|
96
|
+
static get style() { return helpcenterPanelCss; }
|
|
97
|
+
}, [1, "dso-helpcenter-panel", {
|
|
98
|
+
"label": [1],
|
|
99
|
+
"url": [1],
|
|
100
|
+
"visibility": [32],
|
|
101
|
+
"isOpen": [32],
|
|
102
|
+
"slideState": [32],
|
|
103
|
+
"loadIframe": [32]
|
|
104
|
+
}, [[8, "keydown", "keyDownListener"]]]);
|
|
105
|
+
function defineCustomElement$1() {
|
|
106
|
+
if (typeof customElements === "undefined") {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const components = ["dso-helpcenter-panel", "dso-icon"];
|
|
110
|
+
components.forEach(tagName => { switch (tagName) {
|
|
111
|
+
case "dso-helpcenter-panel":
|
|
112
|
+
if (!customElements.get(tagName)) {
|
|
113
|
+
customElements.define(tagName, HelpcenterPanel);
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
case "dso-icon":
|
|
117
|
+
if (!customElements.get(tagName)) {
|
|
118
|
+
defineCustomElement$2();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
} });
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const DsoHelpcenterPanel = HelpcenterPanel;
|
|
125
|
+
const defineCustomElement = defineCustomElement$1;
|
|
126
|
+
|
|
127
|
+
export { DsoHelpcenterPanel, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoHighlightBox extends Components.DsoHighlightBox, HTMLElement {}
|
|
4
|
+
export const DsoHighlightBox: {
|
|
5
|
+
prototype: DsoHighlightBox;
|
|
6
|
+
new (): DsoHighlightBox;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as clsx } from './clsx.m.js';
|
|
3
|
+
|
|
4
|
+
const highlightBoxCss = ":host{display:block}:host-context(.row.dso-equal-heights){height:100%;min-height:auto}:host-context(.row.dso-equal-heights)>.dso-highlight-box{min-height:auto}:host-context(.row.dso-equal-heights)>.dso-highlight-box.dso-has-counter{height:calc(100% - 48px)}:host-context(.row.dso-equal-heights)>.dso-highlight-box:not(.dso-has-counter){height:calc(100% - 16px)}*,*::after,*::before{box-sizing:border-box}.dso-highlight-box{background-color:#f2f2f2;margin-top:16px;padding:16px;margin-bottom:24px}.dso-highlight-box.dso-white{background-color:#fff}.dso-highlight-box.dso-yellow{background-color:#f8f6cc}.dso-highlight-box.dso-drop-shadow{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2)}.dso-highlight-box.dso-border{background-color:#fff;border:1px solid #ccc;padding:15px}.dso-highlight-box.dso-has-counter{margin-top:48px}.dso-highlight-box.dso-has-counter{padding-top:2.5rem;position:relative}.dso-highlight-box .dso-step-counter{background-color:#275937;border:8px solid #79b929;border-radius:50%;box-sizing:content-box;color:#fff;font-size:1.25rem;font-weight:500;height:2rem;left:16px;line-height:2rem;position:absolute;text-align:center;top:-1.5rem;width:2rem}.dso-highlight-box .dso-step-counter svg.di{height:1.5rem;margin-top:0.25rem;width:1.5rem}.dso-highlight-box>dso-icon{vertical-align:text-top}";
|
|
5
|
+
|
|
6
|
+
const HighlightBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.yellow = undefined;
|
|
12
|
+
this.border = undefined;
|
|
13
|
+
this.white = undefined;
|
|
14
|
+
this.dropShadow = undefined;
|
|
15
|
+
this.step = undefined;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
var _a;
|
|
19
|
+
const hasCounter = this.step || !!this.element.querySelector("[slot=icon]");
|
|
20
|
+
const classes = clsx("dso-highlight-box", {
|
|
21
|
+
"dso-yellow": this.yellow,
|
|
22
|
+
"dso-border": this.border,
|
|
23
|
+
"dso-white": this.white,
|
|
24
|
+
"dso-drop-shadow": this.dropShadow,
|
|
25
|
+
"dso-has-counter": hasCounter,
|
|
26
|
+
});
|
|
27
|
+
return (h("div", { class: classes }, hasCounter && h("div", { class: "dso-step-counter" }, (_a = this.step) !== null && _a !== void 0 ? _a : h("slot", { name: "icon" })), h("slot", null)));
|
|
28
|
+
}
|
|
29
|
+
get element() { return this; }
|
|
30
|
+
static get style() { return highlightBoxCss; }
|
|
31
|
+
}, [1, "dso-highlight-box", {
|
|
32
|
+
"yellow": [4],
|
|
33
|
+
"border": [4],
|
|
34
|
+
"white": [4],
|
|
35
|
+
"dropShadow": [4, "drop-shadow"],
|
|
36
|
+
"step": [2]
|
|
37
|
+
}]);
|
|
38
|
+
function defineCustomElement$1() {
|
|
39
|
+
if (typeof customElements === "undefined") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const components = ["dso-highlight-box"];
|
|
43
|
+
components.forEach(tagName => { switch (tagName) {
|
|
44
|
+
case "dso-highlight-box":
|
|
45
|
+
if (!customElements.get(tagName)) {
|
|
46
|
+
customElements.define(tagName, HighlightBox);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
} });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const DsoHighlightBox = HighlightBox;
|
|
53
|
+
const defineCustomElement = defineCustomElement$1;
|
|
54
|
+
|
|
55
|
+
export { DsoHighlightBox, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoIcon extends Components.DsoIcon, HTMLElement {}
|
|
4
|
+
export const DsoIcon: {
|
|
5
|
+
prototype: DsoIcon;
|
|
6
|
+
new (): DsoIcon;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoImageOverlay extends Components.DsoImageOverlay, HTMLElement {}
|
|
4
|
+
export const DsoImageOverlay: {
|
|
5
|
+
prototype: DsoImageOverlay;
|
|
6
|
+
new (): DsoImageOverlay;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as debounce_1 } from './index2.js';
|
|
3
|
+
import { c as createFocusTrap } from './focus-trap.esm.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
|
+
|
|
6
|
+
const imageOverlayCss = ":host {\n display: inline-block;\n position: relative;\n}\n\n:host(:hover) .open,\n.open:focus {\n opacity: 1;\n}\n\nbutton {\n -webkit-appearance: button;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n margin: 0;\n overflow: visible;\n text-transform: none;\n}\nbutton[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.open {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n min-width: auto;\n padding: 8px;\n opacity: 0;\n position: absolute;\n right: 16px;\n top: 16px;\n}\n.open:focus, .open:focus-visible {\n outline-offset: 2px;\n}\n.open:active {\n outline: 0;\n}\n.open:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.open:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.open[disabled], .open[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.open.btn-sm {\n line-height: 1rem;\n}\n.open.btn-sm dso-icon,\n.open.btn-sm svg.di, .open.btn-sm.extern::after, .open.btn-sm.download::after, .open.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.open.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.open.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.open > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.open.dso-spinner-left[disabled], .open.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.open.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.open.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.open.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.open.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.open.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.open.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n\n.dimmer {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 19;\n display: flex;\n padding: 32px;\n background-color: rgba(255, 255, 255, 0.8);\n justify-content: center;\n}\n\n.wrapper {\n align-self: center;\n box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);\n line-height: 0;\n outline: 4px solid #fff;\n position: relative;\n z-index: 20;\n}\n.wrapper .titel:not([hidden]) {\n background-color: #fff;\n font-weight: 700;\n line-height: initial;\n padding: 8px;\n position: absolute;\n}\n.wrapper img {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: calc(100vh - 64px);\n}\n.wrapper .figuur-bijschrift:not([hidden]) {\n display: block;\n font-size: 0.75rem;\n font-style: italic;\n padding-bottom: 12px;\n padding-top: 16px;\n}\n\n.close {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n min-width: auto;\n padding: 8px;\n position: absolute;\n top: 16px;\n right: 16px;\n}\n.close:focus, .close:focus-visible {\n outline-offset: 2px;\n}\n.close:active {\n outline: 0;\n}\n.close:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.close:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.close[disabled], .close[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.close.btn-sm {\n line-height: 1rem;\n}\n.close.btn-sm dso-icon,\n.close.btn-sm svg.di, .close.btn-sm.extern::after, .close.btn-sm.download::after, .close.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.close.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.close.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.close > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.close.dso-spinner-left[disabled], .close.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.close.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.close.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.close.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.close.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.close.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.close.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}";
|
|
7
|
+
|
|
8
|
+
const ImageOverlay = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.titelSlot = null;
|
|
14
|
+
this.bijschriftSlot = null;
|
|
15
|
+
this.active = false;
|
|
16
|
+
this.focused = false;
|
|
17
|
+
this.zoomable = false;
|
|
18
|
+
}
|
|
19
|
+
loadListener(event) {
|
|
20
|
+
if (event.target instanceof HTMLImageElement) {
|
|
21
|
+
this.setZoomable(event.target);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
this.titelSlot = this.host.querySelector("div[slot='titel']");
|
|
26
|
+
this.bijschriftSlot = this.host.querySelector("div[slot='bijschrift']");
|
|
27
|
+
}
|
|
28
|
+
componentDidLoad() {
|
|
29
|
+
this.resizeObserver = new ResizeObserver(debounce_1(() => {
|
|
30
|
+
const imgElement = this.host.querySelector("img");
|
|
31
|
+
if (imgElement instanceof HTMLImageElement) {
|
|
32
|
+
this.setZoomable(imgElement);
|
|
33
|
+
}
|
|
34
|
+
}, 200));
|
|
35
|
+
this.mutationObserver = new MutationObserver((e) => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
forceUpdate(this.host);
|
|
38
|
+
if (((_a = e[0]) === null || _a === void 0 ? void 0 : _a.type) === "childList") {
|
|
39
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
40
|
+
// <img> is gone or a new element.
|
|
41
|
+
this.initZoomableImage();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
this.mutationObserver.observe(this.host, {
|
|
45
|
+
attributes: true,
|
|
46
|
+
subtree: true,
|
|
47
|
+
attributeFilter: ["src", "alt"],
|
|
48
|
+
childList: true,
|
|
49
|
+
});
|
|
50
|
+
this.initZoomableImage();
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
55
|
+
(_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
56
|
+
(_c = this.resizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
57
|
+
}
|
|
58
|
+
initZoomableImage() {
|
|
59
|
+
var _a;
|
|
60
|
+
const imgElement = this.host.querySelector("img");
|
|
61
|
+
if (!(imgElement instanceof HTMLImageElement)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Due to timing issues where the image is loaded before we listen to load events we double check if the image is already complete.
|
|
65
|
+
if (imgElement.complete) {
|
|
66
|
+
this.setZoomable(imgElement);
|
|
67
|
+
}
|
|
68
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(imgElement);
|
|
69
|
+
}
|
|
70
|
+
setZoomable(imageElement) {
|
|
71
|
+
const { width, naturalWidth, height, naturalHeight } = imageElement;
|
|
72
|
+
this.zoomable = width < naturalWidth || height < naturalHeight;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
var _a;
|
|
76
|
+
const { src, alt } = (_a = this.host.querySelector("img")) !== null && _a !== void 0 ? _a : {};
|
|
77
|
+
return (h(Host, { tabindex: this.focused || !this.zoomable ? -1 : 0, onFocus: () => { var _a; return (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, this.active && src && alt && (h("div", { class: "dimmer" }, h("div", { class: "wrapper", ref: (element) => (this.wrapperElement = element) }, h("div", { class: "titel", hidden: !this.titelSlot }, h("slot", { name: "titel" })), h("img", { src: src, alt: alt }), h("button", { type: "button", class: "close", onClick: () => (this.active = false) }, h("dso-icon", { icon: "times" }), h("span", null, "Sluiten")), h("div", { class: "figuur-bijschrift", hidden: !this.bijschriftSlot }, h("slot", { name: "bijschrift" }))))), h("slot", null), this.zoomable && (h("button", { type: "button", class: "open", ref: (element) => (this.buttonElement = element), onClick: () => (this.active = true), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }, h("dso-icon", { icon: "external-link" }), h("span", null, "Afbeelding vergroot weergeven")))));
|
|
78
|
+
}
|
|
79
|
+
componentDidRender() {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
if (this.active && this.wrapperElement && !this.trap) {
|
|
82
|
+
this.trap = createFocusTrap(this.wrapperElement, {
|
|
83
|
+
escapeDeactivates: true,
|
|
84
|
+
clickOutsideDeactivates: (e) => {
|
|
85
|
+
if (e instanceof MouseEvent && e.composedPath()[0] === this.wrapperElement) {
|
|
86
|
+
this.active = false;
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
},
|
|
91
|
+
setReturnFocus: (_a = this.buttonElement) !== null && _a !== void 0 ? _a : false,
|
|
92
|
+
onDeactivate: () => (this.active = false),
|
|
93
|
+
}).activate();
|
|
94
|
+
}
|
|
95
|
+
else if (!this.active && this.trap) {
|
|
96
|
+
(_b = this.trap) === null || _b === void 0 ? void 0 : _b.deactivate();
|
|
97
|
+
delete this.trap;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
get host() { return this; }
|
|
101
|
+
static get style() { return imageOverlayCss; }
|
|
102
|
+
}, [1, "dso-image-overlay", {
|
|
103
|
+
"active": [32],
|
|
104
|
+
"focused": [32],
|
|
105
|
+
"zoomable": [32]
|
|
106
|
+
}, [[2, "load", "loadListener"]]]);
|
|
107
|
+
function defineCustomElement$1() {
|
|
108
|
+
if (typeof customElements === "undefined") {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const components = ["dso-image-overlay", "dso-icon"];
|
|
112
|
+
components.forEach(tagName => { switch (tagName) {
|
|
113
|
+
case "dso-image-overlay":
|
|
114
|
+
if (!customElements.get(tagName)) {
|
|
115
|
+
customElements.define(tagName, ImageOverlay);
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case "dso-icon":
|
|
119
|
+
if (!customElements.get(tagName)) {
|
|
120
|
+
defineCustomElement$2();
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
} });
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const DsoImageOverlay = ImageOverlay;
|
|
127
|
+
const defineCustomElement = defineCustomElement$1;
|
|
128
|
+
|
|
129
|
+
export { DsoImageOverlay, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoInfoButton extends Components.DsoInfoButton, HTMLElement {}
|
|
4
|
+
export const DsoInfoButton: {
|
|
5
|
+
prototype: DsoInfoButton;
|
|
6
|
+
new (): DsoInfoButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|