@dso-toolkit/core 43.0.0 → 43.1.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 (90) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-autosuggest.cjs.entry.js +13 -2
  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 +1 -1
  10. package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-ozon-content.cjs.entry.js +56 -34
  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 +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/components/alert/alert.css +1 -1
  20. package/dist/collection/components/autosuggest/autosuggest.js +32 -3
  21. package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
  22. package/dist/collection/components/date-picker/date-picker.css +3 -3
  23. package/dist/collection/components/header/header.css +3 -3
  24. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +2 -2
  25. package/dist/collection/components/highlight-box/highlight-box.css +11 -6
  26. package/dist/collection/components/image-overlay/image-overlay.css +2 -2
  27. package/dist/collection/components/image-overlay/image-overlay.js +57 -11
  28. package/dist/collection/components/info-button/info-button.js +24 -2
  29. package/dist/collection/components/label/label.css +1 -1
  30. package/dist/collection/components/map-controls/map-controls.css +2 -2
  31. package/dist/collection/components/ozon-content/nodes/figuur.node.js +22 -0
  32. package/dist/collection/components/ozon-content/nodes/{illustratie.node.js → inline-tekst-afbeelding.node.js} +2 -2
  33. package/dist/collection/components/ozon-content/ozon-content-mapper.js +5 -3
  34. package/dist/collection/components/ozon-content/ozon-content.css +2 -8
  35. package/dist/collection/components/pagination/pagination.css +4 -4
  36. package/dist/collection/components/progress-bar/progress-bar.css +1 -1
  37. package/dist/collection/components/toggletip/toggletip.js +3 -15
  38. package/dist/collection/components/tooltip/tooltip.css +1 -1
  39. package/dist/collection/components/viewer-grid/viewer-grid.css +5 -5
  40. package/dist/custom-elements/index.js +135 -73
  41. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  42. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  43. package/dist/dso-toolkit/{p-04b8814d.entry.js → p-1845b0ce.entry.js} +1 -1
  44. package/dist/dso-toolkit/p-237cd551.entry.js +1 -0
  45. package/dist/dso-toolkit/{p-0777c1c4.entry.js → p-363b56b1.entry.js} +1 -1
  46. package/dist/dso-toolkit/{p-3cb44a36.entry.js → p-6505be7d.entry.js} +1 -1
  47. package/dist/dso-toolkit/{p-8e6ee9f0.entry.js → p-68d49733.entry.js} +1 -1
  48. package/dist/dso-toolkit/{p-1e92e29d.entry.js → p-7b716383.entry.js} +1 -1
  49. package/dist/dso-toolkit/{p-63e0f10d.entry.js → p-80b5c915.entry.js} +1 -1
  50. package/dist/dso-toolkit/{p-1d52d4f2.entry.js → p-93683c65.entry.js} +1 -1
  51. package/dist/dso-toolkit/p-acc0620a.entry.js +1 -0
  52. package/dist/dso-toolkit/{p-1bd0e0c3.entry.js → p-ba835421.entry.js} +1 -1
  53. package/dist/dso-toolkit/p-bd1ee63c.entry.js +1 -0
  54. package/dist/dso-toolkit/p-bf4d6f63.entry.js +1 -0
  55. package/dist/dso-toolkit/{p-17e9802f.entry.js → p-d60876c2.entry.js} +1 -1
  56. package/dist/dso-toolkit/{p-a7bcd356.entry.js → p-d84c166c.entry.js} +1 -1
  57. package/dist/dso-toolkit/p-e98f049e.entry.js +1 -0
  58. package/dist/dso-toolkit/{p-553bd3aa.entry.js → p-f726111e.entry.js} +1 -1
  59. package/dist/esm/dso-alert.entry.js +1 -1
  60. package/dist/esm/dso-autosuggest.entry.js +13 -2
  61. package/dist/esm/dso-date-picker.entry.js +1 -1
  62. package/dist/esm/dso-header.entry.js +1 -1
  63. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  64. package/dist/esm/dso-highlight-box.entry.js +1 -1
  65. package/dist/esm/dso-image-overlay.entry.js +46 -8
  66. package/dist/esm/dso-info-button.entry.js +5 -1
  67. package/dist/esm/dso-label.entry.js +1 -1
  68. package/dist/esm/dso-map-controls.entry.js +1 -1
  69. package/dist/esm/dso-ozon-content.entry.js +56 -34
  70. package/dist/esm/dso-pagination.entry.js +1 -1
  71. package/dist/esm/dso-progress-bar.entry.js +1 -1
  72. package/dist/esm/dso-toggletip.entry.js +3 -15
  73. package/dist/esm/dso-toolkit.js +1 -1
  74. package/dist/esm/dso-tooltip.entry.js +1 -1
  75. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/types/components/autosuggest/autosuggest.d.ts +11 -1
  78. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  79. package/dist/types/components/image-overlay/image-overlay.d.ts +5 -0
  80. package/dist/types/components/info-button/info-button.d.ts +2 -0
  81. package/dist/types/components/ozon-content/nodes/{illustratie.node.d.ts → figuur.node.d.ts} +1 -1
  82. package/dist/types/components/ozon-content/nodes/inline-tekst-afbeelding.node.d.ts +5 -0
  83. package/dist/types/components/toggletip/toggletip.d.ts +1 -3
  84. package/dist/types/components.d.ts +9 -0
  85. package/package.json +1 -1
  86. package/dist/dso-toolkit/p-14fc5767.entry.js +0 -1
  87. package/dist/dso-toolkit/p-a5705dd1.entry.js +0 -1
  88. package/dist/dso-toolkit/p-aa098949.entry.js +0 -1
  89. package/dist/dso-toolkit/p-c282135e.entry.js +0 -1
  90. package/dist/dso-toolkit/p-daf049bd.entry.js +0 -1
@@ -26,15 +26,25 @@ export class Autosuggest {
26
26
  this.suggestOnFocus = false;
27
27
  this.showSuggestions = false;
28
28
  this.notFound = false;
29
+ this.showLoading = false;
29
30
  this.listboxId = v4();
30
31
  this.inputId = v4();
31
32
  this.labelId = v4();
32
- this.debouncedEmitValue = debounce((value) => this.changeEmitter.emit(value), 200);
33
+ this.debouncedEmitValue = debounce((value) => {
34
+ this.changeEmitter.emit(value);
35
+ this.debouncedShowLoading();
36
+ }, 200);
37
+ this.debouncedShowLoading = debounce(() => {
38
+ if (this.inputValue) {
39
+ this.showLoading = true;
40
+ }
41
+ }, this.loadingDelayed);
33
42
  this.inputValue = '';
34
43
  this.onInput = (event) => {
35
44
  if (!(event.target instanceof HTMLInputElement)) {
36
45
  throw new Error("event.target is not instanceof HTMLInputElement");
37
46
  }
47
+ this.showLoading = !this.loadingDelayed;
38
48
  this.inputValue = event.target.value;
39
49
  this.debouncedEmitValue(event.target.value.match(/(\S+)/g) ? event.target.value : '');
40
50
  };
@@ -186,6 +196,7 @@ export class Autosuggest {
186
196
  }
187
197
  }
188
198
  resetSelectedSuggestion() {
199
+ this.showLoading = !this.loadingDelayed;
189
200
  this.selectedSuggestion = undefined;
190
201
  this.input.setAttribute('aria-activedescendant', '');
191
202
  }
@@ -222,7 +233,7 @@ export class Autosuggest {
222
233
  const terms = this.input.value.split(' ').filter(t => t);
223
234
  return (h(Fragment, null,
224
235
  h("slot", null),
225
- this.loading
236
+ this.loading && this.showLoading
226
237
  ? h("div", { class: "autosuggest-progress-box" },
227
238
  h("dso-progress-indicator", { label: this.loadingLabel }))
228
239
  : h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions && !this.notFound }, this.showSuggestions
@@ -303,6 +314,23 @@ export class Autosuggest {
303
314
  "reflect": false,
304
315
  "defaultValue": "\"Een moment geduld.\""
305
316
  },
317
+ "loadingDelayed": {
318
+ "type": "number",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "number",
322
+ "resolved": "number | undefined",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": true,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "To delay progress indicator showing (in ms)."
330
+ },
331
+ "attribute": "loading-delayed",
332
+ "reflect": false
333
+ },
306
334
  "notFoundLabel": {
307
335
  "type": "string",
308
336
  "mutable": false,
@@ -342,7 +370,8 @@ export class Autosuggest {
342
370
  static get states() { return {
343
371
  "showSuggestions": {},
344
372
  "selectedSuggestion": {},
345
- "notFound": {}
373
+ "notFound": {},
374
+ "showLoading": {}
346
375
  }; }
347
376
  static get events() { return [{
348
377
  "method": "selectEmitter",
@@ -1,6 +1,6 @@
1
1
  import { html } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel, notFoundLabel }, children) {
3
+ export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel, loadingDelayed, notFoundLabel }, children) {
4
4
  return html `
5
5
  <dso-autosuggest
6
6
  .suggestions=${suggestions}
@@ -10,6 +10,7 @@ export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch,
10
10
  ?suggest-on-focus=${suggestOnFocus}
11
11
  ?loading=${loading}
12
12
  loading-label=${ifDefined(loadingLabel)}
13
+ loading-delayed=${ifDefined(loadingDelayed)}
13
14
  not-found-label=${ifDefined(notFoundLabel)}
14
15
  >
15
16
  ${children}
@@ -25,9 +25,9 @@
25
25
  .dso-date__input {
26
26
  display: block;
27
27
  width: 100%;
28
- height: 40px;
28
+ height: calc(16px + 1.5rem);
29
29
  padding: 6px 14px;
30
- font-size: 16px;
30
+ font-size: 1rem;
31
31
  line-height: 1.5;
32
32
  color: #191919;
33
33
  background-color: #fff;
@@ -70,7 +70,7 @@
70
70
  border-width: 1px;
71
71
  }
72
72
  .dso-date__input[type=text] {
73
- line-height: 40px;
73
+ line-height: calc(16px + 1.5rem);
74
74
  }
75
75
  .dso-date__input[size] {
76
76
  width: auto;
@@ -304,7 +304,7 @@ dso-dropdown-menu .dso-dropdown-options {
304
304
  border-radius: 4px;
305
305
  border: 1px solid rgba(0, 0, 0, 0.15);
306
306
  box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4);
307
- font-size: 16px;
307
+ font-size: 1rem;
308
308
  margin: 2px 0 0;
309
309
  min-width: 160px;
310
310
  padding: 5px 0;
@@ -490,7 +490,7 @@ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li + li {
490
490
  }
491
491
  .dropdown dso-dropdown-menu button {
492
492
  color: #39870c;
493
- font-size: 16px;
493
+ font-size: 1rem;
494
494
  font-weight: 600;
495
495
  position: relative;
496
496
  }
@@ -568,7 +568,7 @@ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li + li {
568
568
  }
569
569
  .dso-nav.dso-nav-sub > li > a {
570
570
  text-decoration: none;
571
- font-size: 16px;
571
+ font-size: 1rem;
572
572
  margin-top: 4px;
573
573
  padding: 4px 8px 3px;
574
574
  }
@@ -113,7 +113,7 @@
113
113
  color: #fff;
114
114
  }
115
115
  .open-button.btn-sm {
116
- line-height: 16px;
116
+ line-height: 1rem;
117
117
  }
118
118
  .open-button.btn-sm dso-icon,
119
119
  .open-button.btn-sm svg.di, .open-button.btn-sm.extern::after, .open-button.btn-sm.download::after, .open-button.btn-sm.dso-spinner::before {
@@ -246,7 +246,7 @@
246
246
  color: #afcf9d;
247
247
  }
248
248
  .close-button.btn-sm {
249
- line-height: 16px;
249
+ line-height: 1rem;
250
250
  }
251
251
  .close-button.btn-sm dso-icon,
252
252
  .close-button.btn-sm svg.di, .close-button.btn-sm.extern::after, .close-button.btn-sm.download::after, .close-button.btn-sm.dso-spinner::before {
@@ -48,7 +48,7 @@
48
48
  margin-top: 48px;
49
49
  }
50
50
  .dso-highlight-box.dso-has-counter {
51
- padding-top: 40px;
51
+ padding-top: 2.5rem;
52
52
  position: relative;
53
53
  }
54
54
  .dso-highlight-box .dso-step-counter {
@@ -57,15 +57,20 @@
57
57
  border-radius: 50%;
58
58
  box-sizing: content-box;
59
59
  color: #fff;
60
- font-size: 1.25em;
60
+ font-size: 1.25rem;
61
61
  font-weight: 500;
62
- height: 32px;
62
+ height: 2rem;
63
63
  left: 16px;
64
- line-height: 32px;
64
+ line-height: 2rem;
65
65
  position: absolute;
66
66
  text-align: center;
67
- top: -24px;
68
- width: 32px;
67
+ top: -1.5rem;
68
+ width: 2rem;
69
+ }
70
+ .dso-highlight-box .dso-step-counter svg.di {
71
+ height: 1.5rem;
72
+ margin-top: 0.25rem;
73
+ width: 1.5rem;
69
74
  }
70
75
  .dso-highlight-box dso-icon {
71
76
  vertical-align: text-top;
@@ -86,7 +86,7 @@ button::-moz-focus-inner {
86
86
  color: #afcf9d;
87
87
  }
88
88
  .open.btn-sm {
89
- line-height: 16px;
89
+ line-height: 1rem;
90
90
  }
91
91
  .open.btn-sm dso-icon,
92
92
  .open.btn-sm svg.di, .open.btn-sm.extern::after, .open.btn-sm.download::after, .open.btn-sm.dso-spinner::before {
@@ -277,7 +277,7 @@ button::-moz-focus-inner {
277
277
  color: #afcf9d;
278
278
  }
279
279
  .close.btn-sm {
280
- line-height: 16px;
280
+ line-height: 1rem;
281
281
  }
282
282
  .close.btn-sm dso-icon,
283
283
  .close.btn-sm svg.di, .close.btn-sm.extern::after, .close.btn-sm.download::after, .close.btn-sm.dso-spinner::before {
@@ -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;
@@ -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 {
@@ -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) {
@@ -192,15 +192,9 @@ span[role=paragraph] {
192
192
  text-align: right;
193
193
  }
194
194
 
195
- .od-Figuur img {
196
- margin-left: 25px;
197
- max-width: 100%;
198
- height: auto;
199
- }
200
-
201
- .od-Figuur .od-Bijschrift {
195
+ .dso-ozon-figuur .figuur-bijschrift {
196
+ display: block;
202
197
  font-size: 0.75rem;
203
- margin-left: 25px;
204
198
  padding-bottom: 2.5rem;
205
199
  }
206
200
 
@@ -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;
@@ -443,7 +443,7 @@ h6,
443
443
  color: #afcf9d;
444
444
  }
445
445
  .sizing-buttons button.btn-sm {
446
- line-height: 16px;
446
+ line-height: 1rem;
447
447
  }
448
448
  .sizing-buttons button.btn-sm dso-icon,
449
449
  .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 +650,7 @@ h6,
650
650
  line-height: 1.5;
651
651
  min-width: 56px;
652
652
  padding: 11px 15px;
653
- line-height: 16px;
653
+ line-height: 1rem;
654
654
  }
655
655
  .filterpanel-buttons .cancel-button:focus, .filterpanel-buttons .cancel-button:focus-visible {
656
656
  outline-offset: 2px;
@@ -682,7 +682,7 @@ h6,
682
682
  color: #afcf9d;
683
683
  }
684
684
  .filterpanel-buttons .cancel-button.btn-sm {
685
- line-height: 16px;
685
+ line-height: 1rem;
686
686
  }
687
687
  .filterpanel-buttons .cancel-button.btn-sm dso-icon,
688
688
  .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 +820,7 @@ h6,
820
820
  line-height: 1.5;
821
821
  min-width: 56px;
822
822
  padding: 11px 15px;
823
- line-height: 16px;
823
+ line-height: 1rem;
824
824
  }
825
825
  .filterpanel-buttons .apply-button:focus, .filterpanel-buttons .apply-button:focus-visible {
826
826
  outline-offset: 2px;
@@ -852,7 +852,7 @@ h6,
852
852
  color: #fff;
853
853
  }
854
854
  .filterpanel-buttons .apply-button.btn-sm {
855
- line-height: 16px;
855
+ line-height: 1rem;
856
856
  }
857
857
  .filterpanel-buttons .apply-button.btn-sm dso-icon,
858
858
  .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 {