@dso-toolkit/core 43.0.0 → 44.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 (132) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-autosuggest.cjs.entry.js +14 -3
  3. package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
  4. package/dist/cjs/dso-header.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-image-overlay.cjs.entry.js +46 -8
  8. package/dist/cjs/dso-info-button.cjs.entry.js +5 -1
  9. package/dist/cjs/dso-label.cjs.entry.js +16 -12
  10. package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-ozon-content.cjs.entry.js +64 -37
  12. package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
  13. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-toggletip.cjs.entry.js +3 -15
  15. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  16. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  17. package/dist/cjs/dso-viewer-grid.cjs.entry.js +9 -4
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/components/alert/alert.css +1 -1
  20. package/dist/collection/components/alert/alert.template.js +0 -14
  21. package/dist/collection/components/autosuggest/autosuggest.js +33 -4
  22. package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
  23. package/dist/collection/components/date-picker/date-picker.css +3 -3
  24. package/dist/collection/components/date-picker/date-picker.template.js +1 -16
  25. package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +22 -3
  26. package/dist/collection/components/header/header.css +3 -3
  27. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +2 -2
  28. package/dist/collection/components/highlight-box/highlight-box.css +11 -6
  29. package/dist/collection/components/image-overlay/image-overlay.css +2 -2
  30. package/dist/collection/components/image-overlay/image-overlay.js +57 -11
  31. package/dist/collection/components/info-button/info-button.js +24 -2
  32. package/dist/collection/components/label/label.css +6 -2
  33. package/dist/collection/components/label/label.js +21 -14
  34. package/dist/collection/components/label/label.template.js +3 -3
  35. package/dist/collection/components/map-controls/map-controls.css +2 -2
  36. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +2 -2
  37. package/dist/collection/components/ozon-content/nodes/figuur.node.js +22 -0
  38. package/dist/collection/components/ozon-content/nodes/{illustratie.node.js → inline-tekst-afbeelding.node.js} +2 -2
  39. package/dist/collection/components/ozon-content/ozon-content-mapper.js +5 -3
  40. package/dist/collection/components/ozon-content/ozon-content.css +9 -8
  41. package/dist/collection/components/ozon-content/ozon-content.js +10 -5
  42. package/dist/collection/components/ozon-content/ozon-content.template.js +1 -1
  43. package/dist/collection/components/pagination/pagination.css +4 -4
  44. package/dist/collection/components/progress-bar/progress-bar.css +1 -1
  45. package/dist/collection/components/toggletip/toggletip.js +3 -15
  46. package/dist/collection/components/tooltip/tooltip.css +1 -1
  47. package/dist/collection/components/viewer-grid/viewer-grid.css +16 -15
  48. package/dist/collection/components/viewer-grid/viewer-grid.js +10 -2
  49. package/dist/collection/components/viewer-grid/{templates/viewer-grid.template.js → viewer-grid.template.js} +0 -0
  50. package/dist/custom-elements/index.js +169 -93
  51. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  52. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  53. package/dist/dso-toolkit/{p-0777c1c4.entry.js → p-363b56b1.entry.js} +1 -1
  54. package/dist/dso-toolkit/p-446dba5a.entry.js +1 -0
  55. package/dist/dso-toolkit/{p-3cb44a36.entry.js → p-6505be7d.entry.js} +1 -1
  56. package/dist/dso-toolkit/{p-8e6ee9f0.entry.js → p-68d49733.entry.js} +1 -1
  57. package/dist/dso-toolkit/{p-1e92e29d.entry.js → p-7b716383.entry.js} +1 -1
  58. package/dist/dso-toolkit/p-7bfc5267.entry.js +1 -0
  59. package/dist/dso-toolkit/{p-63e0f10d.entry.js → p-80b5c915.entry.js} +1 -1
  60. package/dist/dso-toolkit/p-814d9d78.entry.js +1 -0
  61. package/dist/dso-toolkit/{p-1bd0e0c3.entry.js → p-ba835421.entry.js} +1 -1
  62. package/dist/dso-toolkit/p-bd1ee63c.entry.js +1 -0
  63. package/dist/dso-toolkit/p-bf4d6f63.entry.js +1 -0
  64. package/dist/dso-toolkit/p-cc45ecdf.entry.js +1 -0
  65. package/dist/dso-toolkit/{p-17e9802f.entry.js → p-d60876c2.entry.js} +1 -1
  66. package/dist/dso-toolkit/{p-a7bcd356.entry.js → p-d84c166c.entry.js} +1 -1
  67. package/dist/dso-toolkit/p-e98f049e.entry.js +1 -0
  68. package/dist/dso-toolkit/{p-553bd3aa.entry.js → p-f726111e.entry.js} +1 -1
  69. package/dist/esm/dso-alert.entry.js +1 -1
  70. package/dist/esm/dso-autosuggest.entry.js +14 -3
  71. package/dist/esm/dso-date-picker.entry.js +1 -1
  72. package/dist/esm/dso-header.entry.js +1 -1
  73. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  74. package/dist/esm/dso-highlight-box.entry.js +1 -1
  75. package/dist/esm/dso-image-overlay.entry.js +46 -8
  76. package/dist/esm/dso-info-button.entry.js +5 -1
  77. package/dist/esm/dso-label.entry.js +17 -13
  78. package/dist/esm/dso-map-controls.entry.js +1 -1
  79. package/dist/esm/dso-ozon-content.entry.js +64 -37
  80. package/dist/esm/dso-pagination.entry.js +1 -1
  81. package/dist/esm/dso-progress-bar.entry.js +1 -1
  82. package/dist/esm/dso-toggletip.entry.js +3 -15
  83. package/dist/esm/dso-toolkit.js +1 -1
  84. package/dist/esm/dso-tooltip.entry.js +1 -1
  85. package/dist/esm/dso-viewer-grid.entry.js +9 -4
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/types/components/alert/alert.template.d.ts +1 -2
  88. package/dist/types/components/autosuggest/autosuggest.d.ts +11 -1
  89. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  90. package/dist/types/components/date-picker/date-picker.template.d.ts +1 -4
  91. package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +1 -2
  92. package/dist/types/components/image-overlay/image-overlay.d.ts +5 -0
  93. package/dist/types/components/info-button/info-button.d.ts +2 -0
  94. package/dist/types/components/label/label.d.ts +2 -1
  95. package/dist/types/components/label/label.template.d.ts +1 -1
  96. package/dist/types/components/ozon-content/nodes/{illustratie.node.d.ts → figuur.node.d.ts} +1 -1
  97. package/dist/types/components/ozon-content/nodes/inline-tekst-afbeelding.node.d.ts +5 -0
  98. package/dist/types/components/ozon-content/ozon-content.d.ts +5 -1
  99. package/dist/types/components/toggletip/toggletip.d.ts +1 -3
  100. package/dist/types/components/viewer-grid/viewer-grid.d.ts +4 -0
  101. package/dist/types/components/viewer-grid/{templates/viewer-grid.template.d.ts → viewer-grid.template.d.ts} +0 -0
  102. package/dist/types/components.d.ts +13 -4
  103. package/package.json +2 -16
  104. package/dist/collection/components/anchor/anchor.template.js +0 -17
  105. package/dist/collection/components/button/button.template.js +0 -48
  106. package/dist/collection/components/context/context.template.js +0 -42
  107. package/dist/collection/components/definition-list/definition-list.template.js +0 -36
  108. package/dist/collection/components/label/label.decorator.js +0 -6
  109. package/dist/collection/components/label-group/label-group.template.js +0 -7
  110. package/dist/collection/components/list/list.template.js +0 -44
  111. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.js +0 -22
  112. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.js +0 -12
  113. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.js +0 -60
  114. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.js +0 -17
  115. package/dist/dso-toolkit/p-04b8814d.entry.js +0 -1
  116. package/dist/dso-toolkit/p-14fc5767.entry.js +0 -1
  117. package/dist/dso-toolkit/p-1d52d4f2.entry.js +0 -1
  118. package/dist/dso-toolkit/p-a5705dd1.entry.js +0 -1
  119. package/dist/dso-toolkit/p-aa098949.entry.js +0 -1
  120. package/dist/dso-toolkit/p-c282135e.entry.js +0 -1
  121. package/dist/dso-toolkit/p-daf049bd.entry.js +0 -1
  122. package/dist/types/components/anchor/anchor.template.d.ts +0 -2
  123. package/dist/types/components/button/button.template.d.ts +0 -2
  124. package/dist/types/components/context/context.template.d.ts +0 -3
  125. package/dist/types/components/definition-list/definition-list.template.d.ts +0 -3
  126. package/dist/types/components/label/label.decorator.d.ts +0 -3
  127. package/dist/types/components/label-group/label-group.template.d.ts +0 -2
  128. package/dist/types/components/list/list.template.d.ts +0 -3
  129. package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.d.ts +0 -2
  130. package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.d.ts +0 -2
  131. package/dist/types/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.d.ts +0 -1
  132. package/dist/types/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.d.ts +0 -2
@@ -1,29 +1,67 @@
1
- import { Component, Element, forceUpdate, h, Host, State } from "@stencil/core";
1
+ import { Component, Element, forceUpdate, h, Host, Listen, State } from "@stencil/core";
2
+ import debounce from 'debounce';
2
3
  import { createFocusTrap } from 'focus-trap';
3
4
  export class ImageOverlay {
4
5
  constructor() {
5
6
  this.active = false;
6
7
  this.focused = false;
8
+ this.zoomable = false;
9
+ }
10
+ loadListener(event) {
11
+ if (event.target instanceof HTMLImageElement) {
12
+ this.setZoomable(event.target);
13
+ }
7
14
  }
8
15
  componentDidLoad() {
9
- this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
16
+ this.resizeObserver = new ResizeObserver(debounce(() => {
17
+ const imgElement = this.host.querySelector('img');
18
+ if (imgElement instanceof HTMLImageElement) {
19
+ this.setZoomable(imgElement);
20
+ }
21
+ }, 200));
22
+ this.mutationObserver = new MutationObserver((e) => {
23
+ var _a, _b;
24
+ forceUpdate(this.host);
25
+ if (((_a = e[0]) === null || _a === void 0 ? void 0 : _a.type) === 'childList') {
26
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
27
+ // <img> is gone or a new element.
28
+ this.initZoomableImage();
29
+ }
30
+ });
10
31
  this.mutationObserver.observe(this.host, {
11
32
  attributes: true,
12
- subtree: true
33
+ subtree: true,
34
+ attributeFilter: ['src', 'alt'],
35
+ childList: true,
13
36
  });
37
+ this.initZoomableImage();
14
38
  }
15
39
  disconnectedCallback() {
16
- var _a, _b;
40
+ var _a, _b, _c;
17
41
  (_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
18
42
  (_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
43
+ (_c = this.resizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
44
+ }
45
+ initZoomableImage() {
46
+ var _a;
47
+ const imgElement = this.host.querySelector('img');
48
+ if (!(imgElement instanceof HTMLImageElement)) {
49
+ return;
50
+ }
51
+ // Due to timing issues where the image is loaded before we listen to load events we double check if the image is already complete.
52
+ if (imgElement.complete) {
53
+ this.setZoomable(imgElement);
54
+ }
55
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(imgElement);
56
+ }
57
+ setZoomable(imageElement) {
58
+ const { width, naturalWidth, height, naturalHeight } = imageElement;
59
+ this.zoomable = width < naturalWidth || height < naturalHeight;
19
60
  }
20
61
  render() {
21
62
  var _a;
22
63
  const { src, alt } = (_a = this.host.querySelector('img')) !== null && _a !== void 0 ? _a : {};
23
- return (h(Host, { tabindex: this.focused ? -1 : 0, onFocus: () => {
24
- var _a;
25
- (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus();
26
- } },
64
+ 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(); } },
27
65
  this.active && src && alt && (h("div", { class: "dimmer", ref: element => this.wrapperElement = element },
28
66
  h("div", { class: "wrapper" },
29
67
  h("img", { src: src, alt: alt }),
@@ -31,9 +69,9 @@ export class ImageOverlay {
31
69
  h("dso-icon", { icon: "times" }),
32
70
  h("span", null, "Sluiten"))))),
33
71
  h("slot", null),
34
- h("button", { type: "button", class: "open", ref: element => this.buttonElement = element, onClick: () => this.active = true, onFocus: () => this.focused = true, onBlur: () => this.focused = false },
72
+ 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 },
35
73
  h("dso-icon", { icon: "external-link" }),
36
- h("span", null, "Afbeelding vergroot weergeven"))));
74
+ h("span", null, "Afbeelding vergroot weergeven")))));
37
75
  }
38
76
  componentDidRender() {
39
77
  var _a, _b;
@@ -66,7 +104,15 @@ export class ImageOverlay {
66
104
  }; }
67
105
  static get states() { return {
68
106
  "active": {},
69
- "focused": {}
107
+ "focused": {},
108
+ "zoomable": {}
70
109
  }; }
71
110
  static get elementRef() { return "host"; }
111
+ static get listeners() { return [{
112
+ "name": "load",
113
+ "method": "loadListener",
114
+ "target": undefined,
115
+ "capture": true,
116
+ "passive": false
117
+ }]; }
72
118
  }
@@ -1,15 +1,19 @@
1
- import { h, Component, Event, Prop } from '@stencil/core';
1
+ import { h, Component, Event, Prop, Method } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
3
  export class InfoButton {
4
4
  constructor() {
5
5
  this.label = 'Toelichting bij optie';
6
6
  }
7
+ async setFocus() {
8
+ var _a;
9
+ (_a = this.button) === null || _a === void 0 ? void 0 : _a.focus();
10
+ }
7
11
  handleToggle(e) {
8
12
  this.active = !this.active;
9
13
  this.toggle.emit({ originalEvent: e, active: this.active });
10
14
  }
11
15
  render() {
12
- return (h("button", { type: "button", class: clsx('btn', { 'dso-open': !!this.active, 'dso-info-secondary': !!this.secondary }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e) },
16
+ return (h("button", { type: "button", class: clsx('btn', { 'dso-open': !!this.active, 'dso-info-secondary': !!this.secondary }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e), ref: element => (this.button = element) },
13
17
  h("span", { class: "sr-only" }, this.label)));
14
18
  }
15
19
  static get is() { return "dso-info-button"; }
@@ -94,4 +98,22 @@ export class InfoButton {
94
98
  }
95
99
  }
96
100
  }]; }
101
+ static get methods() { return {
102
+ "setFocus": {
103
+ "complexType": {
104
+ "signature": "() => Promise<void>",
105
+ "parameters": [],
106
+ "references": {
107
+ "Promise": {
108
+ "location": "global"
109
+ }
110
+ },
111
+ "return": "Promise<void>"
112
+ },
113
+ "docs": {
114
+ "text": "",
115
+ "tags": []
116
+ }
117
+ }
118
+ }; }
97
119
  }
@@ -39,7 +39,7 @@
39
39
  border-radius: 0 4px 4px 0;
40
40
  color: inherit;
41
41
  float: right;
42
- font-size: 16px;
42
+ font-size: 1rem;
43
43
  margin-bottom: -4px;
44
44
  margin-left: 8px;
45
45
  margin-right: -4px;
@@ -89,9 +89,13 @@
89
89
 
90
90
  .dso-truncate.dso-label-content {
91
91
  display: inline-block;
92
- max-width: 184px;
92
+ max-width: 100%;
93
93
  overflow: hidden;
94
94
  text-overflow: ellipsis;
95
95
  vertical-align: bottom;
96
96
  white-space: nowrap;
97
+ }
98
+
99
+ :host([removable]) .dso-truncate.dso-label-content {
100
+ max-width: calc(100% - 28px);
97
101
  }
@@ -1,10 +1,16 @@
1
- import { Component, h, Prop, Event, State, Element, Fragment, Watch } from '@stencil/core';
1
+ import { Component, h, Prop, Event, State, Element, Watch, Host } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
3
  function hasEllipses(el) {
4
4
  return el.scrollWidth > el.clientWidth;
5
5
  }
6
6
  export class Label {
7
7
  constructor() {
8
+ this.mutationObserver = new MutationObserver(() => {
9
+ this.labelText = this.host.innerText;
10
+ if (this.truncate) {
11
+ this.truncateLabel();
12
+ }
13
+ });
8
14
  this.resizeObserver = new ResizeObserver(() => this.truncateLabel());
9
15
  this.keydownListenerActive = false;
10
16
  this.keyDownListener = (event) => {
@@ -40,35 +46,33 @@ export class Label {
40
46
  });
41
47
  }
42
48
  componentDidLoad() {
49
+ this.labelText = this.host.innerText;
50
+ this.mutationObserver.observe(this.host, {
51
+ attributes: true,
52
+ subtree: true
53
+ });
43
54
  if (this.truncate) {
44
55
  this.startTruncate();
45
56
  }
46
57
  }
47
58
  disconnectedCallback() {
59
+ var _a;
60
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
48
61
  this.stopTruncate();
49
62
  }
50
63
  startTruncate() {
51
- this.mutationObserver = new MutationObserver(() => {
52
- this.truncateLabel();
53
- });
54
- this.mutationObserver.observe(this.host, {
55
- attributes: true,
56
- subtree: true
57
- });
58
64
  this.resizeObserver.observe(this.host);
59
65
  this.truncateLabel();
60
66
  }
61
67
  stopTruncate() {
62
- var _a;
63
68
  document.removeEventListener('keydown', this.keyDownListener);
64
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
65
69
  this.resizeObserver.unobserve(this.host);
66
70
  this.truncatedContent = undefined;
67
71
  this.keydownListenerActive = false;
68
72
  }
69
73
  render() {
70
74
  const status = this.status && Label.statusMap.get(this.status);
71
- return (h(Fragment, null,
75
+ return (h(Host, { "aria-roledescription": (this.truncate && this.truncatedContent) ? 'Deze tekst is visueel afgekapt en wordt volledig zichtbaar bij focus.' : undefined },
72
76
  h("span", { id: "toggle-anchor", class: clsx('dso-label', {
73
77
  [`dso-label-${this.status}`]: this.status,
74
78
  'dso-compact': this.compact && !this.removable,
@@ -83,9 +87,11 @@ export class Label {
83
87
  }), ref: element => this.labelContent = element, tabindex: (this.truncate && this.truncatedContent) ? 0 : -1, onMouseEnter: () => this.textHover = true, onMouseLeave: () => this.textHover = false, onFocus: () => this.textFocus = true, onBlur: () => this.textFocus = false },
84
88
  h("slot", null)),
85
89
  this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.removeHover = true, onMouseLeave: () => this.removeHover = false, onFocus: () => this.removeFocus = true, onBlur: () => this.removeFocus = false },
86
- h("span", { class: "sr-only" }, "Verwijder"),
90
+ h("span", { class: "sr-only" },
91
+ "Verwijder: ",
92
+ this.labelText),
87
93
  h("dso-icon", { icon: "times" })))),
88
- h("dso-tooltip", { stateless: true, for: "toggle-anchor", active: !!this.truncatedContent && (this.textHover || this.textFocus), position: "top" }, this.truncatedContent)));
94
+ h("dso-tooltip", { stateless: true, for: "toggle-anchor", active: !!this.truncatedContent && (this.textHover || this.textFocus), position: "top", strategy: "absolute" }, this.truncatedContent)));
89
95
  }
90
96
  static get is() { return "dso-label"; }
91
97
  static get encapsulation() { return "shadow"; }
@@ -170,7 +176,8 @@ export class Label {
170
176
  "removeFocus": {},
171
177
  "textHover": {},
172
178
  "textFocus": {},
173
- "truncatedContent": {}
179
+ "truncatedContent": {},
180
+ "labelText": {}
174
181
  }; }
175
182
  static get events() { return [{
176
183
  "method": "removeClick",
@@ -1,14 +1,14 @@
1
1
  import { html, nothing } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
4
- export function labelTemplate({ status, label, button, compact, truncate, symbol }) {
4
+ export function labelTemplate({ status, label, removable, onRemoveClick, compact, truncate, symbol }) {
5
5
  return html `
6
6
  <dso-label
7
7
  status=${ifDefined(status)}
8
- @removeClick=${ifDefined(button === null || button === void 0 ? void 0 : button.onClick)}
8
+ @removeClick=${ifDefined(onRemoveClick)}
9
9
  ?truncate=${truncate}
10
10
  ?compact=${compact}
11
- ?removable=${button}
11
+ ?removable=${removable}
12
12
  >
13
13
  ${symbol
14
14
  ? html `
@@ -104,7 +104,7 @@ button::-moz-focus-inner {
104
104
  color: #afcf9d;
105
105
  }
106
106
  #toggle-visibility-button.btn-sm {
107
- line-height: 16px;
107
+ line-height: 1rem;
108
108
  }
109
109
  #toggle-visibility-button.btn-sm dso-icon,
110
110
  #toggle-visibility-button.btn-sm svg.di, #toggle-visibility-button.btn-sm.extern::after, #toggle-visibility-button.btn-sm.download::after, #toggle-visibility-button.btn-sm.dso-spinner::before {
@@ -286,7 +286,7 @@ button::-moz-focus-inner {
286
286
  color: #afcf9d;
287
287
  }
288
288
  #zoom-buttons button.btn-sm {
289
- line-height: 16px;
289
+ line-height: 1rem;
290
290
  }
291
291
  #zoom-buttons button.btn-sm dso-icon,
292
292
  #zoom-buttons button.btn-sm svg.di, #zoom-buttons button.btn-sm.extern::after, #zoom-buttons button.btn-sm.download::after, #zoom-buttons button.btn-sm.dso-spinner::before {
@@ -7,8 +7,8 @@ export class OzonContentExtRefNode {
7
7
  ];
8
8
  }
9
9
  render(node, { mapNodeToJsx }) {
10
- var _a;
11
- return (h("a", { target: "_blank", rel: "noopener noreferrer", href: (_a = node.getAttribute('ref')) !== null && _a !== void 0 ? _a : undefined },
10
+ const href = node.tagName === 'ExtIoRef' ? node.getAttribute('href') : node.getAttribute('ref');
11
+ return (h("a", { target: "_blank", rel: "noopener noreferrer", href: href !== null && href !== void 0 ? href : undefined },
12
12
  h("span", { class: "sr-only" }, "opent in nieuw venster"),
13
13
  mapNodeToJsx(node.childNodes)));
14
14
  }
@@ -0,0 +1,22 @@
1
+ import { h } from '@stencil/core';
2
+ import { getNodeName } from '../get-node-name.function';
3
+ export class OzonContentFiguurNode {
4
+ constructor() {
5
+ this.name = [
6
+ 'Figuur',
7
+ ];
8
+ }
9
+ render(node) {
10
+ var _a, _b, _c, _d, _e;
11
+ const childNodes = Array.from(node.childNodes);
12
+ const titel = (_a = childNodes.find(n => getNodeName(n) === 'Titel')) === null || _a === void 0 ? void 0 : _a.textContent;
13
+ const bijschrift = (_b = childNodes.find(n => getNodeName(n) === 'Bijschrift')) === null || _b === void 0 ? void 0 : _b.textContent;
14
+ const illustratieNode = childNodes.find(n => getNodeName(n) === 'Illustratie');
15
+ if (illustratieNode instanceof Element) {
16
+ return (h("div", { class: "dso-ozon-figuur" },
17
+ h("dso-image-overlay", null,
18
+ h("img", { src: (_c = illustratieNode.getAttribute('naam')) !== null && _c !== void 0 ? _c : undefined, alt: (_e = (_d = titel !== null && titel !== void 0 ? titel : illustratieNode.getAttribute('alt')) !== null && _d !== void 0 ? _d : illustratieNode.getAttribute('naam')) !== null && _e !== void 0 ? _e : undefined })),
19
+ bijschrift && (h("span", { class: "figuur-bijschrift" }, bijschrift))));
20
+ }
21
+ }
22
+ }
@@ -1,9 +1,9 @@
1
1
  import { h } from '@stencil/core';
2
- export class OzonContentIllustratieNode {
2
+ export class OzonContentInlineTekstAfbeeldingNode {
3
3
  constructor() {
4
4
  this.name = [
5
+ 'InlineTekstAfbeelding',
5
6
  'Illustratie',
6
- 'InlineTekstAfbeelding'
7
7
  ];
8
8
  }
9
9
  render(node) {
@@ -2,17 +2,18 @@ import { Fragment, h } from '@stencil/core';
2
2
  import { OzonContentAlNode } from './nodes/al.node';
3
3
  import { OzonContentDocumentNode } from './nodes/document.node';
4
4
  import { OzonContentExtRefNode } from './nodes/ext-ref.node';
5
- import { OzonContentIllustratieNode } from './nodes/illustratie.node';
5
+ import { OzonContentFiguurNode } from './nodes/figuur.node';
6
6
  import { OzonContentInhoudNode } from './nodes/inhoud.node';
7
+ import { OzonContentInlineTekstAfbeeldingNode } from './nodes/inline-tekst-afbeelding.node';
7
8
  import { OzonContentOpschriftNode } from './nodes/opschrift.node';
8
9
  import { OzonContentInlineNodes } from './nodes/inline.nodes';
10
+ import { OzonContentIntIoRefNode } from './nodes/int-io-ref.node';
9
11
  import { OzonContentIntRefNode } from './nodes/int-ref.node';
10
12
  import { OzonContentNootNode } from './nodes/noot.node';
11
13
  import { OzonContentTableNode } from './nodes/table.node';
12
14
  import { OzonContentTextNode } from './nodes/text.node';
13
15
  import { getNodeName } from './get-node-name.function';
14
16
  import { OzonContentFallbackNode } from './nodes/fallback.node';
15
- import { OzonContentIntIoRefNode } from './nodes/int-io-ref.node';
16
17
  export class Mapper {
17
18
  constructor() {
18
19
  this.mappers = [
@@ -24,10 +25,11 @@ export class Mapper {
24
25
  new OzonContentExtRefNode(),
25
26
  new OzonContentAlNode(),
26
27
  new OzonContentInlineNodes(),
27
- new OzonContentIllustratieNode(),
28
+ new OzonContentInlineTekstAfbeeldingNode(),
28
29
  new OzonContentNootNode(),
29
30
  new OzonContentTableNode(),
30
31
  new OzonContentIntIoRefNode(),
32
+ new OzonContentFiguurNode(),
31
33
  ];
32
34
  this.skip = this.mappers.reduce((t, m) => {
33
35
  if (m.handles) {
@@ -15,6 +15,9 @@
15
15
  color: #39870c;
16
16
  text-decoration: underline;
17
17
  cursor: pointer;
18
+ color: #275937;
19
+ font-weight: 600;
20
+ text-decoration: none;
18
21
  }
19
22
  :host([interactive]):hover, :host([interactive]):focus {
20
23
  color: #676cb0;
@@ -24,6 +27,10 @@
24
27
  text-decoration: none;
25
28
  }
26
29
 
30
+ :host([interactive=sub]) {
31
+ color: #191919;
32
+ }
33
+
27
34
  .deleted-start,
28
35
  .deleted-end {
29
36
  position: absolute;
@@ -192,15 +199,9 @@ span[role=paragraph] {
192
199
  text-align: right;
193
200
  }
194
201
 
195
- .od-Figuur img {
196
- margin-left: 25px;
197
- max-width: 100%;
198
- height: auto;
199
- }
200
-
201
- .od-Figuur .od-Bijschrift {
202
+ .dso-ozon-figuur .figuur-bijschrift {
203
+ display: block;
202
204
  font-size: 0.75rem;
203
- margin-left: 25px;
204
205
  padding-bottom: 2.5rem;
205
206
  }
206
207
 
@@ -16,13 +16,18 @@ export class OzonContent {
16
16
  *
17
17
  * **Do not** use this without an accessible companion element! `interactive` is only
18
18
  * meant to ease the use of the companion element for mouse/touch users.
19
+ *
20
+ * * `true`: Interactive anchor-look-alike
21
+ * * `"sub"`: Interactive anchor-look-alike for sub navigation
22
+ * * `false | undefined`: Disabled
19
23
  */
20
24
  this.interactive = false;
21
25
  this.state = {};
22
26
  this.mapper = new Mapper();
23
27
  }
24
28
  handleHostOnClick(e) {
25
- if (!this.interactive) {
29
+ // '' is `true`: <dso-ozon-content interactive>
30
+ if (this.interactive !== '' && !this.interactive) {
26
31
  return;
27
32
  }
28
33
  const doIt = e.composedPath().find(e => e === this.host || (e instanceof HTMLElement && isTabbable(e))) === this.host;
@@ -114,18 +119,18 @@ export class OzonContent {
114
119
  "defaultValue": "false"
115
120
  },
116
121
  "interactive": {
117
- "type": "boolean",
122
+ "type": "any",
118
123
  "mutable": false,
119
124
  "complexType": {
120
- "original": "boolean",
121
- "resolved": "boolean",
125
+ "original": "'sub' | '' | boolean",
126
+ "resolved": "\"\" | \"sub\" | boolean",
122
127
  "references": {}
123
128
  },
124
129
  "required": false,
125
130
  "optional": false,
126
131
  "docs": {
127
132
  "tags": [],
128
- "text": "Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements.\n\n**Do not** use this without an accessible companion element! `interactive` is only\nmeant to ease the use of the companion element for mouse/touch users."
133
+ "text": "Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements.\n\n**Do not** use this without an accessible companion element! `interactive` is only\nmeant to ease the use of the companion element for mouse/touch users.\n\n* `true`: Interactive anchor-look-alike\n* `\"sub\"`: Interactive anchor-look-alike for sub navigation\n* `false | undefined`: Disabled"
129
134
  },
130
135
  "attribute": "interactive",
131
136
  "reflect": true,
@@ -3,9 +3,9 @@ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function ozonContentTemplate({ content, inline, interactive, deleted, prefix, suffix, onAnchorClick, onClick }) {
4
4
  return html `
5
5
  <dso-ozon-content
6
+ interactive=${ifDefined(interactive || undefined)}
6
7
  .content=${content}
7
8
  ?inline=${inline}
8
- ?interactive=${interactive}
9
9
  ?deleted=${deleted}
10
10
  @anchorClick=${onAnchorClick}
11
11
  @dsoClick=${ifDefined(interactive ? onClick : undefined)}
@@ -14,7 +14,7 @@
14
14
  .pagination > li {
15
15
  display: inline-block;
16
16
  font-weight: bold;
17
- line-height: 28px;
17
+ line-height: calc(2rem - 4px);
18
18
  text-align: center;
19
19
  vertical-align: middle;
20
20
  }
@@ -23,10 +23,10 @@
23
23
  align-items: center;
24
24
  color: #39870c;
25
25
  display: flex;
26
- height: 32px;
26
+ height: 2rem;
27
27
  justify-content: center;
28
28
  position: relative;
29
- width: 32px;
29
+ width: 2rem;
30
30
  }
31
31
  .pagination > li > a:active,
32
32
  .pagination > li > span:active {
@@ -37,7 +37,7 @@
37
37
  border-radius: 50%;
38
38
  }
39
39
  .pagination > li a {
40
- line-height: 32px;
40
+ line-height: 2rem;
41
41
  text-decoration: none;
42
42
  }
43
43
  .pagination > li a:hover, .pagination > li a:focus {
@@ -30,7 +30,7 @@
30
30
  background-color: #39870c;
31
31
  color: #fff;
32
32
  float: left;
33
- font-size: 14px;
33
+ font-size: 0.875rem;
34
34
  height: 100%;
35
35
  line-height: 16px;
36
36
  text-align: center;
@@ -23,30 +23,18 @@ export class Toggletip {
23
23
  }
24
24
  };
25
25
  this.keyDownListener = (event) => {
26
+ var _a;
26
27
  if (!event.defaultPrevented && event.key == "Escape") {
27
28
  this.close();
28
- this.button.focus();
29
+ (_a = this.infoButton) === null || _a === void 0 ? void 0 : _a.setFocus();
29
30
  event.preventDefault();
30
31
  }
31
32
  return;
32
33
  };
33
34
  }
34
- componentDidRender() {
35
- var _a, _b, _c;
36
- const infoButton = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("dso-info-button");
37
- if (!infoButton) {
38
- throw Error("dso-info-button not found");
39
- }
40
- this.infoButton = infoButton;
41
- const button = (_c = (_b = this.infoButton) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector("button");
42
- if (!button) {
43
- throw Error("button not found");
44
- }
45
- this.button = button;
46
- }
47
35
  render() {
48
36
  return (h(Fragment, null,
49
- h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }),
37
+ h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary, ref: element => this.infoButton = element }),
50
38
  h("dso-tooltip", { stateless: true, descriptive: true, for: "toggle", active: this.active, position: this.position, small: this.small },
51
39
  h("slot", null))));
52
40
  }
@@ -59,7 +59,7 @@
59
59
  border-radius: 4px;
60
60
  color: #191919;
61
61
  display: inline-block;
62
- font-size: 16px;
62
+ font-size: 1rem;
63
63
  max-width: 640px;
64
64
  padding: 8px 16px;
65
65
  position: relative;
@@ -153,6 +153,17 @@ h6,
153
153
  }
154
154
  }
155
155
 
156
+ .sr-only {
157
+ position: absolute;
158
+ width: 1px;
159
+ height: 1px;
160
+ padding: 0;
161
+ margin: -1px;
162
+ overflow: hidden;
163
+ clip: rect(0, 0, 0, 0);
164
+ border: 0;
165
+ }
166
+
156
167
  .shrink,
157
168
  .expand,
158
169
  .overlay-close-button {
@@ -342,16 +353,6 @@ h6,
342
353
  top: 8px;
343
354
  right: 16px;
344
355
  }
345
- .overlay-close-button .sr-only {
346
- position: absolute;
347
- width: 1px;
348
- height: 1px;
349
- padding: 0;
350
- margin: -1px;
351
- overflow: hidden;
352
- clip: rect(0, 0, 0, 0);
353
- border: 0;
354
- }
355
356
 
356
357
  .dso-map-panel {
357
358
  background-color: #fff;
@@ -443,7 +444,7 @@ h6,
443
444
  color: #afcf9d;
444
445
  }
445
446
  .sizing-buttons button.btn-sm {
446
- line-height: 16px;
447
+ line-height: 1rem;
447
448
  }
448
449
  .sizing-buttons button.btn-sm dso-icon,
449
450
  .sizing-buttons button.btn-sm svg.di, .sizing-buttons button.btn-sm.extern::after, .sizing-buttons button.btn-sm.download::after, .sizing-buttons button.btn-sm.dso-spinner::before {
@@ -650,7 +651,7 @@ h6,
650
651
  line-height: 1.5;
651
652
  min-width: 56px;
652
653
  padding: 11px 15px;
653
- line-height: 16px;
654
+ line-height: 1rem;
654
655
  }
655
656
  .filterpanel-buttons .cancel-button:focus, .filterpanel-buttons .cancel-button:focus-visible {
656
657
  outline-offset: 2px;
@@ -682,7 +683,7 @@ h6,
682
683
  color: #afcf9d;
683
684
  }
684
685
  .filterpanel-buttons .cancel-button.btn-sm {
685
- line-height: 16px;
686
+ line-height: 1rem;
686
687
  }
687
688
  .filterpanel-buttons .cancel-button.btn-sm dso-icon,
688
689
  .filterpanel-buttons .cancel-button.btn-sm svg.di, .filterpanel-buttons .cancel-button.btn-sm.extern::after, .filterpanel-buttons .cancel-button.btn-sm.download::after, .filterpanel-buttons .cancel-button.btn-sm.dso-spinner::before {
@@ -820,7 +821,7 @@ h6,
820
821
  line-height: 1.5;
821
822
  min-width: 56px;
822
823
  padding: 11px 15px;
823
- line-height: 16px;
824
+ line-height: 1rem;
824
825
  }
825
826
  .filterpanel-buttons .apply-button:focus, .filterpanel-buttons .apply-button:focus-visible {
826
827
  outline-offset: 2px;
@@ -852,7 +853,7 @@ h6,
852
853
  color: #fff;
853
854
  }
854
855
  .filterpanel-buttons .apply-button.btn-sm {
855
- line-height: 16px;
856
+ line-height: 1rem;
856
857
  }
857
858
  .filterpanel-buttons .apply-button.btn-sm dso-icon,
858
859
  .filterpanel-buttons .apply-button.btn-sm svg.di, .filterpanel-buttons .apply-button.btn-sm.extern::after, .filterpanel-buttons .apply-button.btn-sm.download::after, .filterpanel-buttons .apply-button.btn-sm.dso-spinner::before {