@dso-toolkit/core 32.2.0 → 33.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.
Files changed (27) hide show
  1. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +4 -1
  2. package/dist/cjs/dso-toggletip.cjs.entry.js +2 -1
  3. package/dist/cjs/dso-tree-view.cjs.entry.js +5 -4
  4. package/dist/collection/components/dropdown-menu/dropdown-menu.css +4 -0
  5. package/dist/collection/components/dropdown-menu/dropdown-menu.js +3 -0
  6. package/dist/collection/components/toggletip/toggletip.css +4 -0
  7. package/dist/collection/components/toggletip/toggletip.js +1 -0
  8. package/dist/collection/components/tree-view/tree-item.js +3 -2
  9. package/dist/collection/components/tree-view/tree-view.css +33 -5
  10. package/dist/collection/components/tree-view/tree-view.js +11 -11
  11. package/dist/custom-elements/index.js +11 -6
  12. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  13. package/dist/dso-toolkit/p-741e96de.entry.js +5 -0
  14. package/dist/dso-toolkit/{p-e2dc97c4.entry.js → p-984551a8.entry.js} +1 -1
  15. package/dist/dso-toolkit/p-e814d644.entry.js +1 -0
  16. package/dist/esm/dso-dropdown-menu.entry.js +4 -1
  17. package/dist/esm/dso-toggletip.entry.js +2 -1
  18. package/dist/esm/dso-tree-view.entry.js +5 -4
  19. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -0
  20. package/dist/types/components/tree-view/tree-item.d.ts +4 -4
  21. package/dist/types/components/tree-view/tree-view.d.ts +12 -9
  22. package/dist/types/components/tree-view/tree-view.interfaces.d.ts +14 -4
  23. package/dist/types/components/tree-view/tree-view.template.d.ts +1 -1
  24. package/dist/types/components.d.ts +7 -7
  25. package/package.json +1 -1
  26. package/dist/dso-toolkit/p-12f7e7d7.entry.js +0 -5
  27. package/dist/dso-toolkit/p-ad8f467f.entry.js +0 -1
@@ -230,7 +230,7 @@ var tabbable = function tabbable(el, options) {
230
230
  return tabbableNodes;
231
231
  };
232
232
 
233
- const dropdownMenuCss = ":host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
233
+ const dropdownMenuCss = ":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
234
234
 
235
235
  let DropdownMenu = class {
236
236
  constructor(hostRef) {
@@ -325,6 +325,9 @@ let DropdownMenu = class {
325
325
  this.openPopup();
326
326
  }
327
327
  }
328
+ componentDidRender() {
329
+ this.host.setAttribute("tabindex", "-1");
330
+ }
328
331
  componentWillRender() {
329
332
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
330
333
  for (const tab of tabbable(li)) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-fcdfdd38.js');
6
6
 
7
- const toggletipCss = "*,*::after,*::before{box-sizing:border-box}";
7
+ const toggletipCss = "*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";
8
8
 
9
9
  let Toggletip = class {
10
10
  constructor(hostRef) {
@@ -51,6 +51,7 @@ let Toggletip = class {
51
51
  throw Error("button not found");
52
52
  }
53
53
  this.button = button;
54
+ this.host.setAttribute("tabindex", "-1");
54
55
  }
55
56
  render() {
56
57
  return (index.h(index.Fragment, null, index.h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }), index.h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small }, index.h("slot", null))));
@@ -7,13 +7,14 @@ const clsx_m = require('./clsx.m-b00fa5e1.js');
7
7
 
8
8
  const DsoTreeItem = ({ owner, ancestors, item, index: index$1, level, setSize }) => {
9
9
  var _a, _b, _c;
10
- return (index.h("li", { key: item.reference, class: clsx_m.clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
10
+ return (index.h("li", { key: item.id, class: clsx_m.clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
11
11
  index.h("div", { class: "tree-branch-control" }, item.hasItems
12
12
  ?
13
13
  index.h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
14
14
  index.h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
15
15
  : index.h("dso-icon", null)),
16
- index.h("p", { class: "tree-content", tabindex: level === 1 && index$1 === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index$1 + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
16
+ index.h("p", { class: clsx_m.clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index$1 === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index$1 + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
17
+ item.selected && index.h("span", { class: "sr-only" }, "Resultaat: "),
17
18
  item.href
18
19
  ? index.h("a", { href: item.href, tabindex: "-1" }, item.label)
19
20
  : index.h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
@@ -24,7 +25,7 @@ const DsoTreeItem = ({ owner, ancestors, item, index: index$1, level, setSize })
24
25
  : index.h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index$1, org) => index.h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index$1, level: level + 1, setSize: org.length }))))));
25
26
  };
26
27
 
27
- const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";
28
+ const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
28
29
 
29
30
  let TreeView = class {
30
31
  constructor(hostRef) {
@@ -85,7 +86,7 @@ let TreeView = class {
85
86
  return;
86
87
  }
87
88
  TreeView.setFocus(tree, contentElement);
88
- this.clickItem.emit([...ancestors, item]);
89
+ this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
89
90
  return;
90
91
  }
91
92
  if (item.open) {
@@ -1,6 +1,10 @@
1
1
  /* stylelint-disable value-keyword-case */
2
2
  /* stylelint-disable string-no-newline */
3
3
  /* stylelint-enable */
4
+ :host(:focus) {
5
+ outline: none;
6
+ }
7
+
4
8
  :host {
5
9
  --di-check-wit: url("data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e");
6
10
  --di-chevron-down: url("data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e");
@@ -93,6 +93,9 @@ export class DropdownMenu {
93
93
  this.openPopup();
94
94
  }
95
95
  }
96
+ componentDidRender() {
97
+ this.host.setAttribute("tabindex", "-1");
98
+ }
96
99
  componentWillRender() {
97
100
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
98
101
  for (const tab of tabbable(li)) {
@@ -5,4 +5,8 @@
5
5
  *::after,
6
6
  *::before {
7
7
  box-sizing: border-box;
8
+ }
9
+
10
+ :host(:focus) {
11
+ outline: none;
8
12
  }
@@ -43,6 +43,7 @@ export class Toggletip {
43
43
  throw Error("button not found");
44
44
  }
45
45
  this.button = button;
46
+ this.host.setAttribute("tabindex", "-1");
46
47
  }
47
48
  render() {
48
49
  return (h(Fragment, null,
@@ -2,13 +2,14 @@ import { h, Fragment } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
3
  export const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
4
4
  var _a, _b, _c;
5
- return (h("li", { key: item.reference, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
5
+ return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
6
6
  h("div", { class: "tree-branch-control" }, item.hasItems
7
7
  ?
8
8
  h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
9
9
  h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
10
10
  : h("dso-icon", null)),
11
- h("p", { class: "tree-content", tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
11
+ h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
12
+ item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
12
13
  item.href
13
14
  ? h("a", { href: item.href, tabindex: "-1" }, item.label)
14
15
  : h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
@@ -19,25 +19,53 @@
19
19
  display: inline-block;
20
20
  margin: 8px 0;
21
21
  }
22
- :host .tree-content a, :host .tree-content a:visited {
23
- color: #39870c;
22
+ :host .tree-content.active {
23
+ font-weight: 700;
24
+ }
25
+ :host .tree-content.active:hover {
26
+ text-decoration: underline;
27
+ }
28
+ :host .tree-content.active a {
24
29
  text-decoration: none;
25
30
  }
26
- :host .tree-content a:hover, :host .tree-content a:focus {
27
- color: #676cb0;
31
+ :host .tree-content.selected {
32
+ color: #191919;
33
+ font-weight: 700;
28
34
  text-decoration: underline;
29
35
  }
36
+ :host .tree-content.selected:hover, :host .tree-content.selected:focus {
37
+ text-decoration: none;
38
+ }
39
+ :host .tree-content a, :host .tree-content a:visited {
40
+ color: #191919;
41
+ text-decoration: underline;
42
+ }
43
+ :host .tree-content a:hover, :host .tree-content a:focus {
44
+ color: #191919;
45
+ text-decoration: none;
46
+ }
30
47
  :host .tree-content a:active {
31
48
  text-decoration: none;
32
49
  }
33
50
  :host .tree-content dso-icon {
34
- vertical-align: text-bottom;
35
51
  font-size: 0.75em;
36
52
  margin-left: 0.5em;
53
+ vertical-align: text-bottom;
37
54
  }
38
55
 
39
56
  *,
40
57
  *::after,
41
58
  *::before {
42
59
  box-sizing: border-box;
60
+ }
61
+
62
+ .sr-only {
63
+ position: absolute;
64
+ width: 1px;
65
+ height: 1px;
66
+ padding: 0;
67
+ margin: -1px;
68
+ overflow: hidden;
69
+ clip: rect(0, 0, 0, 0);
70
+ border: 0;
43
71
  }
@@ -55,7 +55,7 @@ export class TreeView {
55
55
  return;
56
56
  }
57
57
  TreeView.setFocus(tree, contentElement);
58
- this.clickItem.emit([...ancestors, item]);
58
+ this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
59
59
  return;
60
60
  }
61
61
  if (item.open) {
@@ -158,8 +158,8 @@ export class TreeView {
158
158
  "type": "unknown",
159
159
  "mutable": false,
160
160
  "complexType": {
161
- "original": "TreeViewItem<string>[]",
162
- "resolved": "TreeViewItem<string>[]",
161
+ "original": "TreeViewItem[]",
162
+ "resolved": "TreeViewItem[]",
163
163
  "references": {
164
164
  "TreeViewItem": {
165
165
  "location": "import",
@@ -186,8 +186,8 @@ export class TreeView {
186
186
  "text": "Emitted when a tree view item is opened.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the\nroot to the item that is emitting the open event. The consumer of the event is responsible for updating\nthe TreeView's collection (usually set the open state on the last TreeViewItem in path)."
187
187
  },
188
188
  "complexType": {
189
- "original": "TreeViewItem<string>[]",
190
- "resolved": "TreeViewItem<string>[]",
189
+ "original": "TreeViewItem[]",
190
+ "resolved": "TreeViewItem[]",
191
191
  "references": {
192
192
  "TreeViewItem": {
193
193
  "location": "import",
@@ -206,8 +206,8 @@ export class TreeView {
206
206
  "text": "Emitted when a tree view item is closed.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the\nroot to the item that is emitting the close event. The consumer of the event is responsible for updating\nthe TreeView's collection (usually set the closed state on the last TreeViewItem in path)."
207
207
  },
208
208
  "complexType": {
209
- "original": "TreeViewItem<string>[]",
210
- "resolved": "TreeViewItem<string>[]",
209
+ "original": "TreeViewItem[]",
210
+ "resolved": "TreeViewItem[]",
211
211
  "references": {
212
212
  "TreeViewItem": {
213
213
  "location": "import",
@@ -223,13 +223,13 @@ export class TreeView {
223
223
  "composed": true,
224
224
  "docs": {
225
225
  "tags": [],
226
- "text": "Emitted when a tree view item is clicked.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the\nroot to the item that is emitting the clicked event."
226
+ "text": "Emitted when a tree view item is clicked.\nThe `detail` property of the `CustomEvent`\u00A0will contain an object with:\n`path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event.\n`originalEvent` = the original click event.\nThe consumer of the event is responsible for updating the TreeView's collection (usually set the active\nstate on the last TreeViewItem in path and clear all other active item states)."
227
227
  },
228
228
  "complexType": {
229
- "original": "TreeViewItem<string>[]",
230
- "resolved": "TreeViewItem<string>[]",
229
+ "original": "TreeViewPointerEvent",
230
+ "resolved": "TreeViewPointerEvent",
231
231
  "references": {
232
- "TreeViewItem": {
232
+ "TreeViewPointerEvent": {
233
233
  "location": "import",
234
234
  "path": "./tree-view.interfaces"
235
235
  }
@@ -1359,7 +1359,7 @@ var tabbable = function tabbable(el, options) {
1359
1359
  return tabbableNodes;
1360
1360
  };
1361
1361
 
1362
- const dropdownMenuCss = ":host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
1362
+ const dropdownMenuCss = ":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
1363
1363
 
1364
1364
  let DropdownMenu = class extends HTMLElement {
1365
1365
  constructor() {
@@ -1456,6 +1456,9 @@ let DropdownMenu = class extends HTMLElement {
1456
1456
  this.openPopup();
1457
1457
  }
1458
1458
  }
1459
+ componentDidRender() {
1460
+ this.host.setAttribute("tabindex", "-1");
1461
+ }
1459
1462
  componentWillRender() {
1460
1463
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
1461
1464
  for (const tab of tabbable(li)) {
@@ -2883,7 +2886,7 @@ let Selectable = class extends HTMLElement {
2883
2886
  static get style() { return selectableCss; }
2884
2887
  };
2885
2888
 
2886
- const toggletipCss = "*,*::after,*::before{box-sizing:border-box}";
2889
+ const toggletipCss = "*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";
2887
2890
 
2888
2891
  let Toggletip = class extends HTMLElement {
2889
2892
  constructor() {
@@ -2932,6 +2935,7 @@ let Toggletip = class extends HTMLElement {
2932
2935
  throw Error("button not found");
2933
2936
  }
2934
2937
  this.button = button;
2938
+ this.host.setAttribute("tabindex", "-1");
2935
2939
  }
2936
2940
  render() {
2937
2941
  return (h(Fragment, null, h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }), h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small }, h("slot", null))));
@@ -4822,13 +4826,14 @@ let Tooltip = class extends HTMLElement {
4822
4826
 
4823
4827
  const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
4824
4828
  var _a, _b, _c;
4825
- return (h("li", { key: item.reference, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
4829
+ return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
4826
4830
  h("div", { class: "tree-branch-control" }, item.hasItems
4827
4831
  ?
4828
4832
  h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
4829
4833
  h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
4830
4834
  : h("dso-icon", null)),
4831
- h("p", { class: "tree-content", tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
4835
+ h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
4836
+ item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
4832
4837
  item.href
4833
4838
  ? h("a", { href: item.href, tabindex: "-1" }, item.label)
4834
4839
  : h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
@@ -4839,7 +4844,7 @@ const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
4839
4844
  : h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
4840
4845
  };
4841
4846
 
4842
- const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";
4847
+ const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
4843
4848
 
4844
4849
  let TreeView = class extends HTMLElement {
4845
4850
  constructor() {
@@ -4902,7 +4907,7 @@ let TreeView = class extends HTMLElement {
4902
4907
  return;
4903
4908
  }
4904
4909
  TreeView.setFocus(tree, contentElement);
4905
- this.clickItem.emit([...ancestors, item]);
4910
+ this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
4906
4911
  return;
4907
4912
  }
4908
4913
  if (item.open) {
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-a40eeb32.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-08427682",[[1,"dso-map-base-layers",{baseLayers:[16],selectedBaseLayer:[1040]}]]],["p-e7700d9e",[[1,"dso-map-overlays",{overlays:[16],checkedOverlays:[1040]}]]],["p-e2dc97c4",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-ad8f467f",[[1,"dso-tree-view",{collection:[16]}]]],["p-e03d7741",[[1,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-b07991b9",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]}]]],["p-9e9f8bcf",[[1,"dso-label",{compact:[4],removable:[4],status:[1],hover:[32]}]]],["p-e4269e02",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32]}]]],["p-83f166b3",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-2e7d535c",[[1,"dso-attachments-counter",{count:[2]}]]],["p-39dae284",[[6,"dso-autosuggest",{suggestions:[16],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32]},[[4,"click","onDocumentClick"]]]]],["p-c9c1bc8f",[[1,"dso-badge",{status:[1]}]]],["p-19de4cc7",[[1,"dso-banner",{status:[1]}]]],["p-12f7e7d7",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4]}]]],["p-be5682cc",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-a52d3623",[[0,"dso-ozon-content",{content:[1]},[[0,"click","handleClick"]]]]],["p-262858dd",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-b5b946de",[[1,"dso-progress-indicator",{label:[1],size:[1],block:[4]}]]],["p-759920d0",[[1,"dso-tooltip",{position:[1],for:[1],noArrow:[4,"no-arrow"],stateless:[4],small:[4],active:[1540],hidden:[32],activate:[64],deactivate:[64]},[[0,"click","listenClick"]]]]],["p-5665f1ee",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1]}]]],["p-affe82e6",[[1,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32]}],[1,"dso-info",{fixed:[516],active:[516]}]]],["p-75233655",[[1,"dso-icon",{icon:[1]}]]]],e)));
1
+ import{p as e,b as o}from"./p-a40eeb32.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-08427682",[[1,"dso-map-base-layers",{baseLayers:[16],selectedBaseLayer:[1040]}]]],["p-e7700d9e",[[1,"dso-map-overlays",{overlays:[16],checkedOverlays:[1040]}]]],["p-984551a8",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-e814d644",[[1,"dso-tree-view",{collection:[16]}]]],["p-e03d7741",[[1,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-b07991b9",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]}]]],["p-9e9f8bcf",[[1,"dso-label",{compact:[4],removable:[4],status:[1],hover:[32]}]]],["p-e4269e02",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32]}]]],["p-83f166b3",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-2e7d535c",[[1,"dso-attachments-counter",{count:[2]}]]],["p-39dae284",[[6,"dso-autosuggest",{suggestions:[16],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32]},[[4,"click","onDocumentClick"]]]]],["p-c9c1bc8f",[[1,"dso-badge",{status:[1]}]]],["p-19de4cc7",[[1,"dso-banner",{status:[1]}]]],["p-741e96de",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4]}]]],["p-be5682cc",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-a52d3623",[[0,"dso-ozon-content",{content:[1]},[[0,"click","handleClick"]]]]],["p-262858dd",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-b5b946de",[[1,"dso-progress-indicator",{label:[1],size:[1],block:[4]}]]],["p-759920d0",[[1,"dso-tooltip",{position:[1],for:[1],noArrow:[4,"no-arrow"],stateless:[4],small:[4],active:[1540],hidden:[32],activate:[64],deactivate:[64]},[[0,"click","listenClick"]]]]],["p-5665f1ee",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1]}]]],["p-affe82e6",[[1,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32]}],[1,"dso-info",{fixed:[516],active:[516]}]]],["p-75233655",[[1,"dso-icon",{icon:[1]}]]]],e)));
@@ -0,0 +1,5 @@
1
+ import{r as c,h as t,F as e,g as n}from"./p-a40eeb32.js";import{v as o}from"./p-19b890a3.js";
2
+ /*!
3
+ * tabbable 5.2.1
4
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
+ */var r=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"].join(","),i="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=function(c){var t=parseInt(c.getAttribute("tabindex"),10);return isNaN(t)?function(c){return"true"===c.contentEditable}(c)?0:"AUDIO"!==c.nodeName&&"VIDEO"!==c.nodeName&&"DETAILS"!==c.nodeName||null!==c.getAttribute("tabindex")?c.tabIndex:0:t},a=function(c,t){return c.tabIndex===t.tabIndex?c.documentOrder-t.documentOrder:c.tabIndex-t.tabIndex},l=function(c){return"INPUT"===c.tagName},u=function(c,t){return!(!function(c,t){return!(t.disabled||function(c){return l(c)&&"hidden"===c.type}(t)||function(c,t){if("hidden"===getComputedStyle(c).visibility)return!0;var e=i.call(c,"details>summary:first-of-type");if(i.call(e?c.parentElement:c,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var n=c.getBoundingClientRect();return 0===n.width&&0===n.height}}else for(;c;){if("none"===getComputedStyle(c).display)return!0;c=c.parentElement}return!1}(t,c.displayCheck)||function(c){return"DETAILS"===c.tagName&&Array.prototype.slice.apply(c.children).some((function(c){return"SUMMARY"===c.tagName}))}(t)||function(c){if(l(c)||"SELECT"===c.tagName||"TEXTAREA"===c.tagName||"BUTTON"===c.tagName)for(var t=c.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var e=0;e<t.children.length;e++){var n=t.children.item(e);if("LEGEND"===n.tagName)return!n.contains(c)}return!0}t=t.parentElement}return!1}(t))}(c,t)||function(c){return function(c){return l(c)&&"radio"===c.type}(c)&&!function(c){if(!c.name)return!0;var t,e=c.form||c.ownerDocument,n=function(c){return e.querySelectorAll('input[type="radio"][name="'+c+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(c.name));else try{t=n(c.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var o=function(c,t){for(var e=0;e<c.length;e++)if(c[e].checked&&c[e].form===t)return c[e]}(t,c.form);return!o||o===c}(c)}(t)||s(t)<0)},d=function(c,t){var e=[],n=[];return function(c,t,e){var n=Array.prototype.slice.apply(c.querySelectorAll(r));return t&&i.call(c,r)&&n.unshift(c),n.filter(e)}(c,(t=t||{}).includeContainer,u.bind(null,t)).forEach((function(c,t){var o=s(c);0===o?e.push(c):n.push({documentOrder:t,tabIndex:o,node:c})})),n.sort(a).map((function(c){return c.node})).concat(e)};let h=class{constructor(t){c(this,t),this.open=!1,this.dropdownAlign="left",this.checkable=!1,this.focusOutListener=c=>{this.tabbables.includes(c.relatedTarget)||(this.open=!1)},this.keyDownListener=c=>{if(!c.defaultPrevented){switch(c.key){case"ArrowDown":this.tabInPopup(1);break;case"ArrowUp":this.tabInPopup(-1);break;case"Escape":this.escape();break;case" ":c.target instanceof HTMLElement&&c.target.click();break;default:return}c.preventDefault()}},this.escape=()=>{this.button.focus(),this.open=!1}}get button(){const c=this.host.querySelectorAll('button[slot="toggle"]')[0];if(!(c instanceof HTMLButtonElement))throw new ReferenceError("Mandatory toggle button not found");return c}get tabbables(){return d(this.host).filter((c=>c!==this.button))}openWatch(c){c?this.openPopup():this.closePopup()}connectedCallback(){this.button.setAttribute("aria-haspopup","menu"),this.button.setAttribute("aria-expanded","false"),this.button.id||(this.button.id=o()),this.button.addEventListener("click",(()=>{this.open=!this.open}));const c=this.host.querySelector(".dso-dropdown-options");if(null==c)throw new ReferenceError("Dropdown options not found");c.setAttribute("role","menu"),c.setAttribute("aria-labelledby",this.button.id);for(const c of Array.from(this.host.getElementsByTagName("ul"))){c.setAttribute("role","none");for(const t of Array.from(c.getElementsByTagName("li")))t.setAttribute("role","none")}this.open&&this.openPopup()}componentDidRender(){this.host.setAttribute("tabindex","-1")}componentWillRender(){for(const c of Array.from(this.host.getElementsByTagName("li")))for(const t of d(c))t.setAttribute("role",this.checkable?"menuitemradio":"menuitem"),this.checkable&&c.classList.contains("dso-checked")?t.setAttribute("aria-checked","true"):t.removeAttribute("aria-checked")}openPopup(){this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","true"),this.tabbables.forEach((c=>c.addEventListener("click",this.escape)))}closePopup(){this.host.removeEventListener("keydown",this.keyDownListener),this.host.removeEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","false"),this.tabbables.forEach((c=>c.removeEventListener("click",this.escape)))}tabInPopup(c){const t=this.tabbables;let e=t.findIndex((c=>c===document.activeElement))+c;e>=t.length?e=0:e<0&&(e=t.length-1),t[e].focus()}render(){return t(e,null,t("slot",{name:"toggle"}),t("div",{hidden:!this.open},t("slot",null)))}get host(){return n(this)}static get watchers(){return{open:["openWatch"]}}};h.style=":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";export{h as dso_dropdown_menu}
@@ -1 +1 @@
1
- import{r as t,h as s,F as i,g as o}from"./p-a40eeb32.js";let h=class{constructor(s){t(this,s),this.active=!1,this.label="Toelichting",this.position="right",this.click=()=>{this.active?this.close():this.open()},this.open=()=>{this.active=!0,this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener)},this.close=()=>{this.host.removeEventListener("focusout",this.focusOutListener),this.host.removeEventListener("keydown",this.keyDownListener),this.active=!1},this.focusOutListener=t=>{this.host.contains(t.relatedTarget)||this.close()},this.keyDownListener=t=>{t.defaultPrevented||"Escape"!=t.key||(this.close(),this.button.focus(),t.preventDefault())}}componentDidRender(){var t,s,i;const o=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("dso-info-button");if(!o)throw Error("dso-info-button not found");this.infoButton=o;const h=null===(i=null===(s=this.infoButton)||void 0===s?void 0:s.shadowRoot)||void 0===i?void 0:i.querySelector("button");if(!h)throw Error("button not found");this.button=h}render(){return s(i,null,s("dso-info-button",{id:"toggle",onClick:this.click,label:this.label,active:this.active,secondary:this.secondary}),s("dso-tooltip",{stateless:!0,for:"toggle",active:this.active,position:this.position,small:this.small},s("slot",null)))}get host(){return o(this)}};h.style="*,*::after,*::before{box-sizing:border-box}";export{h as dso_toggletip}
1
+ import{r as t,h as s,F as i,g as o}from"./p-a40eeb32.js";let h=class{constructor(s){t(this,s),this.active=!1,this.label="Toelichting",this.position="right",this.click=()=>{this.active?this.close():this.open()},this.open=()=>{this.active=!0,this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener)},this.close=()=>{this.host.removeEventListener("focusout",this.focusOutListener),this.host.removeEventListener("keydown",this.keyDownListener),this.active=!1},this.focusOutListener=t=>{this.host.contains(t.relatedTarget)||this.close()},this.keyDownListener=t=>{t.defaultPrevented||"Escape"!=t.key||(this.close(),this.button.focus(),t.preventDefault())}}componentDidRender(){var t,s,i;const o=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("dso-info-button");if(!o)throw Error("dso-info-button not found");this.infoButton=o;const h=null===(i=null===(s=this.infoButton)||void 0===s?void 0:s.shadowRoot)||void 0===i?void 0:i.querySelector("button");if(!h)throw Error("button not found");this.button=h,this.host.setAttribute("tabindex","-1")}render(){return s(i,null,s("dso-info-button",{id:"toggle",onClick:this.click,label:this.label,active:this.active,secondary:this.secondary}),s("dso-tooltip",{stateless:!0,for:"toggle",active:this.active,position:this.position,small:this.small},s("slot",null)))}get host(){return o(this)}};h.style="*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";export{h as dso_toggletip}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as o,c as n}from"./p-a40eeb32.js";import{c as r}from"./p-4070c1e5.js";const i=({owner:o,ancestors:n,item:s,index:a,level:l,setSize:c})=>{var d,u,v;return e("li",{key:s.id,class:r("tree-item",{"has-child":s.hasItems}),role:"none"},e("div",{class:"tree-branch-control"},s.hasItems?e("div",{onClick:e=>o.itemClick(e,n,s)},e("dso-icon",{icon:s.open?"chevron-down":"chevron-right"})):e("dso-icon",null)),e("p",{class:r("tree-content",{active:s.active},{selected:s.selected}),tabindex:1===l&&0===a?0:-1,role:"treeitem","aria-expanded":s.hasItems?""+(!!s.open&&!!(null===(d=s.items)||void 0===d?void 0:d.length)):void 0,"aria-current":s.active?"true":void 0,"aria-level":l,"aria-setsize":c,"aria-posinset":a+1,"aria-busy":s.loading?"true":void 0,onClick:e=>o.itemClick(e,n,s)},s.selected&&e("span",{class:"sr-only"},"Resultaat: "),s.href?e("a",{href:s.href,tabindex:"-1"},s.label):e("span",null,s.label),null===(u=s.icons)||void 0===u?void 0:u.map((t=>e("dso-icon",{icon:t.icon,title:t.label})))),s.open&&e(t,null,s.hasItems&&!s.items&&s.loading?e("dso-progress-indicator",{size:"small",label:"Resultaten laden: een moment geduld alstublieft."}):e("ul",{role:"group"},null===(v=s.items)||void 0===v?void 0:v.map(((t,r,a)=>e(i,{owner:o,ancestors:[...n,s],item:t,index:r,level:l+1,setSize:a.length}))))))};let s=class{constructor(e){o(this,e),this.openItem=n(this,"openItem",7),this.closeItem=n(this,"closeItem",7),this.clickItem=n(this,"clickItem",7),this.keyDownListener=e=>{if(e.defaultPrevented)return;const t=e.composedPath().find((e=>e instanceof HTMLElement&&"dso-tree"===e.className));if(e.target instanceof HTMLParagraphElement&&t instanceof HTMLElement){switch(e.key){case"ArrowDown":s.moveFocus(t,e.target,"next");break;case"ArrowUp":s.moveFocus(t,e.target,"previous");break;case"ArrowRight":s.expandItemOrFocusChild(t,e.target);break;case"ArrowLeft":s.collapseItemOrFocusParent(t,e.target);break;case"End":s.moveFocus(t,e.target,"last");break;case"Home":s.moveFocus(t,e.target,"first");break;case"Enter":case" ":e.target.click();break;default:if(1===(o=e.key).length&&o.match(/\S/)&&s.setFocusByFirstCharacter(t,e.target,e.key,e.shiftKey))break;return}var o;e.preventDefault()}},this.itemClick=(e,t,o)=>{if(!(e.target instanceof HTMLElement))return;const n=e.target.closest(".tree-content");if(n){const r=e.composedPath().find((e=>e instanceof HTMLElement&&"dso-tree"===e.className));if(!(n instanceof HTMLParagraphElement&&r instanceof HTMLElement))return;return s.setFocus(r,n),void this.clickItem.emit({path:[...t,o],originalEvent:e})}o.open?this.closeItem.emit([...t,o]):this.openItem.emit([...t,o])}}static setFocus(e,t){t&&(Array.from(e.querySelectorAll("p")).filter((e=>0===e.tabIndex)).forEach((e=>e.tabIndex=-1)),t.tabIndex=0,t.focus())}static moveFocus(e,t,o){const n=Array.from(e.querySelectorAll("p")).filter((e=>e.offsetWidth>0&&e.offsetHeight>0));let r=0;switch(o){case"first":r=0;break;case"previous":r=n.indexOf(t)-1;break;case"next":r=n.indexOf(t)+1;break;case"last":r=n.length-1}s.setFocus(e,n[r])}static expandItemOrFocusChild(e,t){var o;if("true"===(null==t?void 0:t.getAttribute("aria-expanded")))s.moveFocus(e,t,"next");else{const e=null===(o=t.previousElementSibling)||void 0===o?void 0:o.firstElementChild;e instanceof HTMLElement&&e.click()}}static collapseItemOrFocusParent(e,t){var o,n,r;if("true"===(null==t?void 0:t.getAttribute("aria-expanded"))){const e=null===(o=t.previousElementSibling)||void 0===o?void 0:o.firstElementChild;e instanceof HTMLElement&&e.click()}else{const o=null===(r=null===(n=null==t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.previousElementSibling;o instanceof HTMLElement&&s.setFocus(e,o)}}static setFocusByFirstCharacter(e,t,o,n){const r=Array.from(e.querySelectorAll("p")).filter((e=>e.offsetWidth>0&&e.offsetHeight>0));n&&r.reverse();const i=r.indexOf(t);o=o.toLowerCase();let a=r.find(((e,t)=>{var n;return t>i&&(null===(n=e.textContent)||void 0===n?void 0:n.toLowerCase().startsWith(o))}));return a||(a=r.find(((e,t)=>{var n;return t<i&&(null===(n=e.textContent)||void 0===n?void 0:n.toLowerCase().startsWith(o))}))),!!a&&(s.setFocus(e,a),!0)}render(){var t;return e("div",{id:"tree",class:"dso-tree",onKeyDown:e=>this.keyDownListener(e)},e("ul",{role:"tree","aria-label":"Objectenboom"},null===(t=this.collection)||void 0===t?void 0:t.map(((t,o)=>e(i,{owner:this,ancestors:[],item:t,index:o,level:1,setSize:this.collection.length})))))}};s.style=":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{s as dso_tree_view}
@@ -226,7 +226,7 @@ var tabbable = function tabbable(el, options) {
226
226
  return tabbableNodes;
227
227
  };
228
228
 
229
- const dropdownMenuCss = ":host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
229
+ const dropdownMenuCss = ":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
230
230
 
231
231
  let DropdownMenu = class {
232
232
  constructor(hostRef) {
@@ -321,6 +321,9 @@ let DropdownMenu = class {
321
321
  this.openPopup();
322
322
  }
323
323
  }
324
+ componentDidRender() {
325
+ this.host.setAttribute("tabindex", "-1");
326
+ }
324
327
  componentWillRender() {
325
328
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
326
329
  for (const tab of tabbable(li)) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, F as Fragment, g as getElement } from './index-61410be2.js';
2
2
 
3
- const toggletipCss = "*,*::after,*::before{box-sizing:border-box}";
3
+ const toggletipCss = "*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";
4
4
 
5
5
  let Toggletip = class {
6
6
  constructor(hostRef) {
@@ -47,6 +47,7 @@ let Toggletip = class {
47
47
  throw Error("button not found");
48
48
  }
49
49
  this.button = button;
50
+ this.host.setAttribute("tabindex", "-1");
50
51
  }
51
52
  render() {
52
53
  return (h(Fragment, null, h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }), h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small }, h("slot", null))));
@@ -3,13 +3,14 @@ import { c as clsx } from './clsx.m-071989db.js';
3
3
 
4
4
  const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
5
5
  var _a, _b, _c;
6
- return (h("li", { key: item.reference, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
6
+ return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
7
7
  h("div", { class: "tree-branch-control" }, item.hasItems
8
8
  ?
9
9
  h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
10
10
  h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
11
11
  : h("dso-icon", null)),
12
- h("p", { class: "tree-content", tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
12
+ h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
13
+ item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
13
14
  item.href
14
15
  ? h("a", { href: item.href, tabindex: "-1" }, item.label)
15
16
  : h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
@@ -20,7 +21,7 @@ const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
20
21
  : h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
21
22
  };
22
23
 
23
- const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";
24
+ const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
24
25
 
25
26
  let TreeView = class {
26
27
  constructor(hostRef) {
@@ -81,7 +82,7 @@ let TreeView = class {
81
82
  return;
82
83
  }
83
84
  TreeView.setFocus(tree, contentElement);
84
- this.clickItem.emit([...ancestors, item]);
85
+ this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
85
86
  return;
86
87
  }
87
88
  if (item.open) {
@@ -18,6 +18,7 @@ export declare class DropdownMenu {
18
18
  get tabbables(): FocusableElement[];
19
19
  openWatch(open: boolean): void;
20
20
  connectedCallback(): void;
21
+ componentDidRender(): void;
21
22
  componentWillRender(): void;
22
23
  openPopup(): void;
23
24
  closePopup(): void;
@@ -1,13 +1,13 @@
1
1
  import { FunctionalComponent } from '../../stencil-public-runtime';
2
2
  import { TreeViewItem } from '@dso-toolkit/sources';
3
3
  import { TreeView } from './tree-view';
4
- interface TreeViewItemProps<T> {
4
+ interface TreeViewItemProps {
5
5
  owner: TreeView;
6
- ancestors: TreeViewItem<T>[];
7
- item: TreeViewItem<T>;
6
+ ancestors: TreeViewItem[];
7
+ item: TreeViewItem;
8
8
  index: number;
9
9
  level: number;
10
10
  setSize: number;
11
11
  }
12
- export declare const DsoTreeItem: FunctionalComponent<TreeViewItemProps<string>>;
12
+ export declare const DsoTreeItem: FunctionalComponent<TreeViewItemProps>;
13
13
  export {};
@@ -1,32 +1,35 @@
1
- import { ComponentInterface, Event, EventEmitter } from '../../stencil-public-runtime';
2
- import { TreeViewItem } from './tree-view.interfaces';
1
+ import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
+ import { TreeViewPointerEvent, TreeViewItem } from './tree-view.interfaces';
3
3
  export declare class TreeView implements ComponentInterface {
4
4
  /**
5
5
  * The collection of TreeViewItems
6
6
  */
7
- collection: TreeViewItem<string>[];
7
+ collection: TreeViewItem[];
8
8
  /**
9
9
  * Emitted when a tree view item is opened.
10
10
  * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
11
11
  * root to the item that is emitting the open event. The consumer of the event is responsible for updating
12
12
  * the TreeView's collection (usually set the open state on the last TreeViewItem in path).
13
13
  */
14
- openItem: EventEmitter<TreeViewItem<string>[]>;
14
+ openItem: EventEmitter<TreeViewItem[]>;
15
15
  /**
16
16
  * Emitted when a tree view item is closed.
17
17
  * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
18
18
  * root to the item that is emitting the close event. The consumer of the event is responsible for updating
19
19
  * the TreeView's collection (usually set the closed state on the last TreeViewItem in path).
20
20
  */
21
- closeItem: EventEmitter<TreeViewItem<string>[]>;
21
+ closeItem: EventEmitter<TreeViewItem[]>;
22
22
  /**
23
23
  * Emitted when a tree view item is clicked.
24
- * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
25
- * root to the item that is emitting the clicked event.
24
+ * The `detail` property of the `CustomEvent` will contain an object with:
25
+ * `path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event.
26
+ * `originalEvent` = the original click event.
27
+ * The consumer of the event is responsible for updating the TreeView's collection (usually set the active
28
+ * state on the last TreeViewItem in path and clear all other active item states).
26
29
  */
27
- clickItem: EventEmitter<TreeViewItem<string>[]>;
30
+ clickItem: EventEmitter<TreeViewPointerEvent>;
28
31
  keyDownListener: (event: KeyboardEvent) => void;
29
- itemClick: (event: Event, ancestors: TreeViewItem<string>[], item: TreeViewItem<string>) => void;
32
+ itemClick: (event: MouseEvent, ancestors: TreeViewItem[], item: TreeViewItem) => void;
30
33
  private static setFocus;
31
34
  private static moveFocus;
32
35
  private static expandItemOrFocusChild;
@@ -1,6 +1,6 @@
1
- export interface TreeViewItem<T> {
2
- /** The reference of type T */
3
- reference: T;
1
+ export interface TreeViewItem {
2
+ /** The id of the item */
3
+ id: string;
4
4
  /** The label of the item */
5
5
  label: string;
6
6
  /** The optional href of the item (creates a link) */
@@ -8,11 +8,15 @@ export interface TreeViewItem<T> {
8
8
  /** Indicates whether the item has children */
9
9
  hasItems: boolean;
10
10
  /** The array of child items */
11
- items?: TreeViewItem<T>[];
11
+ items?: TreeViewItem[];
12
12
  /** Indicates whether the node is open and child items are shown */
13
13
  open?: boolean;
14
14
  /** Indicates the node is loading child items */
15
15
  loading?: boolean;
16
+ /** Indicates the node is active, only one item should be active */
17
+ active?: boolean;
18
+ /** Indicates the node is selected, multiple items can be selected */
19
+ selected?: boolean;
16
20
  /** An optional array of icons */
17
21
  icons?: TreeViewItemIcon[];
18
22
  }
@@ -22,3 +26,9 @@ export interface TreeViewItemIcon {
22
26
  /** The label for the icon */
23
27
  label: string;
24
28
  }
29
+ export interface TreeViewPointerEvent {
30
+ /** The path to the clicked item */
31
+ path: TreeViewItem[];
32
+ /** The original pointer event */
33
+ originalEvent: MouseEvent;
34
+ }
@@ -1,2 +1,2 @@
1
1
  import { TreeView } from '@dso-toolkit/sources';
2
- export declare function treeViewTemplate({ collection, onOpenItem, onCloseItem, onClickItem }: TreeView<string>): import("lit-html").TemplateResult<1>;
2
+ export declare function treeViewTemplate({ collection, onOpenItem, onCloseItem, onClickItem }: TreeView): import("lit-html").TemplateResult<1>;
@@ -12,7 +12,7 @@ import { BaseLayer } from "./components/map-base-layers/map-base-layers.interfac
12
12
  import { Overlay } from "./components/map-overlays/map-overlays.interfaces";
13
13
  import { ContentAnchor } from "./components/ozon-content/ozon-content.interfaces";
14
14
  import { SelectableChangeEvent } from "./components/selectable/selectable";
15
- import { TreeViewItem } from "./components/tree-view/tree-view.interfaces";
15
+ import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-view.interfaces";
16
16
  export namespace Components {
17
17
  interface DsoAlert {
18
18
  /**
@@ -221,7 +221,7 @@ export namespace Components {
221
221
  /**
222
222
  * The collection of TreeViewItems
223
223
  */
224
- "collection": TreeViewItem<string>[];
224
+ "collection": TreeViewItem[];
225
225
  }
226
226
  }
227
227
  declare global {
@@ -614,19 +614,19 @@ declare namespace LocalJSX {
614
614
  /**
615
615
  * The collection of TreeViewItems
616
616
  */
617
- "collection": TreeViewItem<string>[];
617
+ "collection": TreeViewItem[];
618
618
  /**
619
- * Emitted when a tree view item is clicked. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the clicked event.
619
+ * Emitted when a tree view item is clicked. The `detail` property of the `CustomEvent` will contain an object with: `path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event. `originalEvent` = the original click event. The consumer of the event is responsible for updating the TreeView's collection (usually set the active state on the last TreeViewItem in path and clear all other active item states).
620
620
  */
621
- "onClickItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
621
+ "onClickItem"?: (event: CustomEvent<TreeViewPointerEvent>) => void;
622
622
  /**
623
623
  * Emitted when a tree view item is closed. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the close event. The consumer of the event is responsible for updating the TreeView's collection (usually set the closed state on the last TreeViewItem in path).
624
624
  */
625
- "onCloseItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
625
+ "onCloseItem"?: (event: CustomEvent<TreeViewItem[]>) => void;
626
626
  /**
627
627
  * Emitted when a tree view item is opened. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the open event. The consumer of the event is responsible for updating the TreeView's collection (usually set the open state on the last TreeViewItem in path).
628
628
  */
629
- "onOpenItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
629
+ "onOpenItem"?: (event: CustomEvent<TreeViewItem[]>) => void;
630
630
  }
631
631
  interface IntrinsicElements {
632
632
  "dso-alert": DsoAlert;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "32.2.0",
3
+ "version": "33.0.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1,5 +0,0 @@
1
- import{r as c,h as t,F as e,g as n}from"./p-a40eeb32.js";import{v as r}from"./p-19b890a3.js";
2
- /*!
3
- * tabbable 5.2.1
4
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var o=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"].join(","),i="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=function(c){var t=parseInt(c.getAttribute("tabindex"),10);return isNaN(t)?function(c){return"true"===c.contentEditable}(c)?0:"AUDIO"!==c.nodeName&&"VIDEO"!==c.nodeName&&"DETAILS"!==c.nodeName||null!==c.getAttribute("tabindex")?c.tabIndex:0:t},a=function(c,t){return c.tabIndex===t.tabIndex?c.documentOrder-t.documentOrder:c.tabIndex-t.tabIndex},l=function(c){return"INPUT"===c.tagName},u=function(c,t){return!(!function(c,t){return!(t.disabled||function(c){return l(c)&&"hidden"===c.type}(t)||function(c,t){if("hidden"===getComputedStyle(c).visibility)return!0;var e=i.call(c,"details>summary:first-of-type");if(i.call(e?c.parentElement:c,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var n=c.getBoundingClientRect();return 0===n.width&&0===n.height}}else for(;c;){if("none"===getComputedStyle(c).display)return!0;c=c.parentElement}return!1}(t,c.displayCheck)||function(c){return"DETAILS"===c.tagName&&Array.prototype.slice.apply(c.children).some((function(c){return"SUMMARY"===c.tagName}))}(t)||function(c){if(l(c)||"SELECT"===c.tagName||"TEXTAREA"===c.tagName||"BUTTON"===c.tagName)for(var t=c.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var e=0;e<t.children.length;e++){var n=t.children.item(e);if("LEGEND"===n.tagName)return!n.contains(c)}return!0}t=t.parentElement}return!1}(t))}(c,t)||function(c){return function(c){return l(c)&&"radio"===c.type}(c)&&!function(c){if(!c.name)return!0;var t,e=c.form||c.ownerDocument,n=function(c){return e.querySelectorAll('input[type="radio"][name="'+c+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(c.name));else try{t=n(c.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var r=function(c,t){for(var e=0;e<c.length;e++)if(c[e].checked&&c[e].form===t)return c[e]}(t,c.form);return!r||r===c}(c)}(t)||s(t)<0)},d=function(c,t){var e=[],n=[];return function(c,t,e){var n=Array.prototype.slice.apply(c.querySelectorAll(o));return t&&i.call(c,o)&&n.unshift(c),n.filter(e)}(c,(t=t||{}).includeContainer,u.bind(null,t)).forEach((function(c,t){var r=s(c);0===r?e.push(c):n.push({documentOrder:t,tabIndex:r,node:c})})),n.sort(a).map((function(c){return c.node})).concat(e)};let h=class{constructor(t){c(this,t),this.open=!1,this.dropdownAlign="left",this.checkable=!1,this.focusOutListener=c=>{this.tabbables.includes(c.relatedTarget)||(this.open=!1)},this.keyDownListener=c=>{if(!c.defaultPrevented){switch(c.key){case"ArrowDown":this.tabInPopup(1);break;case"ArrowUp":this.tabInPopup(-1);break;case"Escape":this.escape();break;case" ":c.target instanceof HTMLElement&&c.target.click();break;default:return}c.preventDefault()}},this.escape=()=>{this.button.focus(),this.open=!1}}get button(){const c=this.host.querySelectorAll('button[slot="toggle"]')[0];if(!(c instanceof HTMLButtonElement))throw new ReferenceError("Mandatory toggle button not found");return c}get tabbables(){return d(this.host).filter((c=>c!==this.button))}openWatch(c){c?this.openPopup():this.closePopup()}connectedCallback(){this.button.setAttribute("aria-haspopup","menu"),this.button.setAttribute("aria-expanded","false"),this.button.id||(this.button.id=r()),this.button.addEventListener("click",(()=>{this.open=!this.open}));const c=this.host.querySelector(".dso-dropdown-options");if(null==c)throw new ReferenceError("Dropdown options not found");c.setAttribute("role","menu"),c.setAttribute("aria-labelledby",this.button.id);for(const c of Array.from(this.host.getElementsByTagName("ul"))){c.setAttribute("role","none");for(const t of Array.from(c.getElementsByTagName("li")))t.setAttribute("role","none")}this.open&&this.openPopup()}componentWillRender(){for(const c of Array.from(this.host.getElementsByTagName("li")))for(const t of d(c))t.setAttribute("role",this.checkable?"menuitemradio":"menuitem"),this.checkable&&c.classList.contains("dso-checked")?t.setAttribute("aria-checked","true"):t.removeAttribute("aria-checked")}openPopup(){this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","true"),this.tabbables.forEach((c=>c.addEventListener("click",this.escape)))}closePopup(){this.host.removeEventListener("keydown",this.keyDownListener),this.host.removeEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","false"),this.tabbables.forEach((c=>c.removeEventListener("click",this.escape)))}tabInPopup(c){const t=this.tabbables;let e=t.findIndex((c=>c===document.activeElement))+c;e>=t.length?e=0:e<0&&(e=t.length-1),t[e].focus()}render(){return t(e,null,t("slot",{name:"toggle"}),t("div",{hidden:!this.open},t("slot",null)))}get host(){return n(this)}static get watchers(){return{open:["openWatch"]}}};h.style=":host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";export{h as dso_dropdown_menu}
@@ -1 +0,0 @@
1
- import{h as e,F as t,r as o,c as n}from"./p-a40eeb32.js";import{c as r}from"./p-4070c1e5.js";const i=({owner:o,ancestors:n,item:s,index:a,level:l,setSize:c})=>{var d,u,v;return e("li",{key:s.reference,class:r("tree-item",{"has-child":s.hasItems}),role:"none"},e("div",{class:"tree-branch-control"},s.hasItems?e("div",{onClick:e=>o.itemClick(e,n,s)},e("dso-icon",{icon:s.open?"chevron-down":"chevron-right"})):e("dso-icon",null)),e("p",{class:"tree-content",tabindex:1===l&&0===a?0:-1,role:"treeitem","aria-expanded":s.hasItems?""+(!!s.open&&!!(null===(d=s.items)||void 0===d?void 0:d.length)):void 0,"aria-level":l,"aria-setsize":c,"aria-posinset":a+1,"aria-busy":s.loading?"true":void 0,onClick:e=>o.itemClick(e,n,s)},s.href?e("a",{href:s.href,tabindex:"-1"},s.label):e("span",null,s.label),null===(u=s.icons)||void 0===u?void 0:u.map((t=>e("dso-icon",{icon:t.icon,title:t.label})))),s.open&&e(t,null,s.hasItems&&!s.items&&s.loading?e("dso-progress-indicator",{size:"small",label:"Resultaten laden: een moment geduld alstublieft."}):e("ul",{role:"group"},null===(v=s.items)||void 0===v?void 0:v.map(((t,r,a)=>e(i,{owner:o,ancestors:[...n,s],item:t,index:r,level:l+1,setSize:a.length}))))))};let s=class{constructor(e){o(this,e),this.openItem=n(this,"openItem",7),this.closeItem=n(this,"closeItem",7),this.clickItem=n(this,"clickItem",7),this.keyDownListener=e=>{if(e.defaultPrevented)return;const t=e.composedPath().find((e=>e instanceof HTMLElement&&"dso-tree"===e.className));if(e.target instanceof HTMLParagraphElement&&t instanceof HTMLElement){switch(e.key){case"ArrowDown":s.moveFocus(t,e.target,"next");break;case"ArrowUp":s.moveFocus(t,e.target,"previous");break;case"ArrowRight":s.expandItemOrFocusChild(t,e.target);break;case"ArrowLeft":s.collapseItemOrFocusParent(t,e.target);break;case"End":s.moveFocus(t,e.target,"last");break;case"Home":s.moveFocus(t,e.target,"first");break;case"Enter":case" ":e.target.click();break;default:if(1===(o=e.key).length&&o.match(/\S/)&&s.setFocusByFirstCharacter(t,e.target,e.key,e.shiftKey))break;return}var o;e.preventDefault()}},this.itemClick=(e,t,o)=>{if(!(e.target instanceof HTMLElement))return;const n=e.target.closest(".tree-content");if(n){const r=e.composedPath().find((e=>e instanceof HTMLElement&&"dso-tree"===e.className));if(!(n instanceof HTMLParagraphElement&&r instanceof HTMLElement))return;return s.setFocus(r,n),void this.clickItem.emit([...t,o])}o.open?this.closeItem.emit([...t,o]):this.openItem.emit([...t,o])}}static setFocus(e,t){t&&(Array.from(e.querySelectorAll("p")).filter((e=>0===e.tabIndex)).forEach((e=>e.tabIndex=-1)),t.tabIndex=0,t.focus())}static moveFocus(e,t,o){const n=Array.from(e.querySelectorAll("p")).filter((e=>e.offsetWidth>0&&e.offsetHeight>0));let r=0;switch(o){case"first":r=0;break;case"previous":r=n.indexOf(t)-1;break;case"next":r=n.indexOf(t)+1;break;case"last":r=n.length-1}s.setFocus(e,n[r])}static expandItemOrFocusChild(e,t){var o;if("true"===(null==t?void 0:t.getAttribute("aria-expanded")))s.moveFocus(e,t,"next");else{const e=null===(o=t.previousElementSibling)||void 0===o?void 0:o.firstElementChild;e instanceof HTMLElement&&e.click()}}static collapseItemOrFocusParent(e,t){var o,n,r;if("true"===(null==t?void 0:t.getAttribute("aria-expanded"))){const e=null===(o=t.previousElementSibling)||void 0===o?void 0:o.firstElementChild;e instanceof HTMLElement&&e.click()}else{const o=null===(r=null===(n=null==t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.previousElementSibling;o instanceof HTMLElement&&s.setFocus(e,o)}}static setFocusByFirstCharacter(e,t,o,n){const r=Array.from(e.querySelectorAll("p")).filter((e=>e.offsetWidth>0&&e.offsetHeight>0));n&&r.reverse();const i=r.indexOf(t);o=o.toLowerCase();let a=r.find(((e,t)=>{var n;return t>i&&(null===(n=e.textContent)||void 0===n?void 0:n.toLowerCase().startsWith(o))}));return a||(a=r.find(((e,t)=>{var n;return t<i&&(null===(n=e.textContent)||void 0===n?void 0:n.toLowerCase().startsWith(o))}))),!!a&&(s.setFocus(e,a),!0)}render(){var t;return e("div",{id:"tree",class:"dso-tree",onKeyDown:e=>this.keyDownListener(e)},e("ul",{role:"tree","aria-label":"Objectenboom"},null===(t=this.collection)||void 0===t?void 0:t.map(((t,o)=>e(i,{owner:this,ancestors:[],item:t,index:o,level:1,setSize:this.collection.length})))))}};s.style=":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";export{s as dso_tree_view}