@dso-toolkit/core 33.2.0 → 34.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 (170) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -71
  4. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-banner.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-date-picker.cjs.entry.js +49 -28
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +19 -232
  8. package/dist/cjs/dso-header.cjs.entry.js +101 -0
  9. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/dso-info-button.cjs.entry.js +2 -2
  13. package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
  14. package/dist/cjs/dso-label.cjs.entry.js +1 -1
  15. package/dist/cjs/dso-map-base-layers.cjs.entry.js +7 -6
  16. package/dist/cjs/dso-map-controls.cjs.entry.js +3 -3
  17. package/dist/cjs/dso-map-overlays.cjs.entry.js +9 -10
  18. package/dist/cjs/dso-ozon-content.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  20. package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
  22. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  23. package/dist/cjs/dso-tooltip.cjs.entry.js +169 -76
  24. package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
  25. package/dist/cjs/dso-viewer-grid.cjs.entry.js +778 -0
  26. package/dist/cjs/{index-fcdfdd38.js → index-5ea63531.js} +26 -2
  27. package/dist/cjs/index-794ad37a.js +72 -0
  28. package/dist/cjs/index.esm-2ac7081c.js +267 -0
  29. package/dist/cjs/loader.cjs.js +2 -2
  30. package/dist/collection/collection-manifest.json +3 -1
  31. package/dist/collection/components/alert/alert.css +0 -3
  32. package/dist/collection/components/anchor/anchor.template.js +17 -0
  33. package/dist/collection/components/attachments-counter/attachments-counter.css +0 -4
  34. package/dist/collection/components/autosuggest/autosuggest.css +0 -3
  35. package/dist/collection/components/badge/badge.css +0 -3
  36. package/dist/collection/components/banner/banner.css +0 -3
  37. package/dist/collection/components/button/button.template.js +48 -0
  38. package/dist/collection/components/context/context.template.js +42 -0
  39. package/dist/collection/components/date-picker/date-picker.css +3 -5
  40. package/dist/collection/components/date-picker/date-picker.js +49 -28
  41. package/dist/collection/components/date-picker/date-picker.template.js +2 -1
  42. package/dist/collection/components/definition-list/definition-list.template.js +36 -0
  43. package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -3
  44. package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -4
  45. package/dist/collection/components/header/header.css +433 -0
  46. package/dist/collection/components/header/header.js +294 -0
  47. package/dist/collection/components/header/header.template.js +32 -0
  48. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +0 -3
  49. package/dist/collection/components/highlight-box/highlight-box.css +0 -3
  50. package/dist/collection/components/icon/icon.css +0 -4
  51. package/dist/collection/components/info/info.css +1 -4
  52. package/dist/collection/components/info-button/info-button.css +1 -3
  53. package/dist/collection/components/label/label.css +0 -3
  54. package/dist/collection/components/label-group/label-group.template.js +7 -0
  55. package/dist/collection/components/list/list.template.js +37 -0
  56. package/dist/collection/components/map-base-layers/map-base-layers.css +4 -3
  57. package/dist/collection/components/map-base-layers/map-base-layers.js +10 -27
  58. package/dist/collection/components/map-controls/map-controls.css +30 -11
  59. package/dist/collection/components/map-controls/map-controls.js +10 -11
  60. package/dist/collection/components/map-controls/map-controls.template.js +12 -20
  61. package/dist/collection/components/map-overlays/map-overlays.css +4 -3
  62. package/dist/collection/components/map-overlays/map-overlays.js +13 -35
  63. package/dist/collection/components/ozon-content/ozon-content.css +0 -3
  64. package/dist/collection/components/progress-bar/progress-bar.css +0 -3
  65. package/dist/collection/components/progress-indicator/progress-indicator.css +0 -3
  66. package/dist/collection/components/selectable/selectable.css +0 -3
  67. package/dist/collection/components/toggletip/toggletip.css +0 -3
  68. package/dist/collection/components/tooltip/tooltip.css +34 -15
  69. package/dist/collection/components/tooltip/tooltip.js +19 -4
  70. package/dist/collection/components/tooltip/tooltip.template.js +3 -5
  71. package/dist/collection/components/tree-view/tree-view.css +3 -3
  72. package/dist/collection/components/viewer-grid/viewer-grid-document-header.template.js +39 -0
  73. package/dist/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +19 -0
  74. package/dist/collection/components/viewer-grid/viewer-grid-filterblok.template.js +28 -0
  75. package/dist/collection/components/viewer-grid/viewer-grid.css +386 -0
  76. package/dist/collection/components/viewer-grid/viewer-grid.js +128 -0
  77. package/dist/collection/components/viewer-grid/viewer-grid.template.js +23 -0
  78. package/dist/custom-elements/index.d.ts +12 -0
  79. package/dist/custom-elements/index.js +1162 -132
  80. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  81. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  82. package/dist/dso-toolkit/p-06de0fa1.entry.js +1 -0
  83. package/dist/dso-toolkit/p-17f073d1.entry.js +1 -0
  84. package/dist/dso-toolkit/p-1805f5b0.js +1 -0
  85. package/dist/dso-toolkit/{p-75233655.entry.js → p-1fefbf8c.entry.js} +1 -1
  86. package/dist/dso-toolkit/{p-a52d3623.entry.js → p-20856f91.entry.js} +1 -1
  87. package/dist/dso-toolkit/{p-262858dd.entry.js → p-2b6a3dfa.entry.js} +1 -1
  88. package/dist/dso-toolkit/{p-be5682cc.entry.js → p-348414bf.entry.js} +1 -1
  89. package/dist/dso-toolkit/{p-984551a8.entry.js → p-3b493a2c.entry.js} +1 -1
  90. package/dist/dso-toolkit/{p-0a08ac9f.entry.js → p-4e573fc5.entry.js} +1 -1
  91. package/dist/dso-toolkit/{p-c9c1bc8f.entry.js → p-5037944e.entry.js} +1 -1
  92. package/dist/dso-toolkit/p-7b006b11.entry.js +1 -0
  93. package/dist/dso-toolkit/p-88bc5873.entry.js +1 -0
  94. package/dist/dso-toolkit/p-8bf3a60e.js +5 -0
  95. package/dist/dso-toolkit/p-94b79e43.entry.js +1 -0
  96. package/dist/dso-toolkit/{p-83f166b3.entry.js → p-94dffa65.entry.js} +1 -1
  97. package/dist/dso-toolkit/{p-b07991b9.entry.js → p-951f5872.entry.js} +1 -1
  98. package/dist/dso-toolkit/p-a7306b7b.entry.js +1 -0
  99. package/dist/dso-toolkit/p-aadc4f8e.entry.js +1 -0
  100. package/dist/dso-toolkit/p-ad2210ad.entry.js +1 -0
  101. package/dist/dso-toolkit/p-b69134ed.entry.js +5 -0
  102. package/dist/dso-toolkit/{p-b5b946de.entry.js → p-bc14cafd.entry.js} +1 -1
  103. package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-c54ecae1.entry.js} +1 -1
  104. package/dist/dso-toolkit/p-c95108fe.entry.js +1 -0
  105. package/dist/dso-toolkit/{p-e814d644.entry.js → p-daa1e29d.entry.js} +1 -1
  106. package/dist/dso-toolkit/p-dad72605.js +1 -0
  107. package/dist/dso-toolkit/{p-2e7d535c.entry.js → p-dc86d830.entry.js} +1 -1
  108. package/dist/dso-toolkit/{p-19de4cc7.entry.js → p-f0b67246.entry.js} +1 -1
  109. package/dist/esm/dso-alert.entry.js +1 -1
  110. package/dist/esm/dso-attachments-counter.entry.js +2 -2
  111. package/dist/esm/dso-autosuggest.entry.js +2 -70
  112. package/dist/esm/dso-badge.entry.js +1 -1
  113. package/dist/esm/dso-banner.entry.js +1 -1
  114. package/dist/esm/dso-date-picker.entry.js +49 -28
  115. package/dist/esm/dso-dropdown-menu.entry.js +17 -230
  116. package/dist/esm/dso-header.entry.js +97 -0
  117. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  118. package/dist/esm/dso-highlight-box.entry.js +1 -1
  119. package/dist/esm/dso-icon.entry.js +1 -1
  120. package/dist/esm/dso-info-button.entry.js +2 -2
  121. package/dist/esm/dso-info_2.entry.js +2 -2
  122. package/dist/esm/dso-label.entry.js +1 -1
  123. package/dist/esm/dso-map-base-layers.entry.js +7 -6
  124. package/dist/esm/dso-map-controls.entry.js +3 -3
  125. package/dist/esm/dso-map-overlays.entry.js +9 -10
  126. package/dist/esm/dso-ozon-content.entry.js +1 -1
  127. package/dist/esm/dso-progress-bar.entry.js +1 -1
  128. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  129. package/dist/esm/dso-toggletip.entry.js +1 -1
  130. package/dist/esm/dso-toolkit.js +2 -2
  131. package/dist/esm/dso-tooltip.entry.js +169 -76
  132. package/dist/esm/dso-tree-view.entry.js +2 -2
  133. package/dist/esm/dso-viewer-grid.entry.js +774 -0
  134. package/dist/esm/{index-61410be2.js → index-d54cae76.js} +26 -2
  135. package/dist/esm/index-f2bf58ce.js +70 -0
  136. package/dist/esm/index.esm-a1362957.js +262 -0
  137. package/dist/esm/loader.js +2 -2
  138. package/dist/types/components/anchor/anchor.template.d.ts +2 -0
  139. package/dist/types/components/button/button.template.d.ts +2 -0
  140. package/dist/types/components/context/context.template.d.ts +3 -0
  141. package/dist/types/components/date-picker/date-picker.d.ts +3 -1
  142. package/dist/types/components/date-picker/date-picker.template.d.ts +1 -1
  143. package/dist/types/components/definition-list/definition-list.template.d.ts +3 -0
  144. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
  145. package/dist/types/components/header/header.d.ts +36 -0
  146. package/dist/types/components/header/header.template.d.ts +2 -0
  147. package/dist/types/components/label-group/label-group.template.d.ts +2 -0
  148. package/dist/types/components/list/list.template.d.ts +3 -0
  149. package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
  150. package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +6 -1
  151. package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
  152. package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
  153. package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +7 -1
  154. package/dist/types/components/tooltip/tooltip.d.ts +1 -0
  155. package/dist/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +3 -0
  156. package/dist/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +3 -0
  157. package/dist/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +3 -0
  158. package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -0
  159. package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
  160. package/dist/types/components.d.ts +50 -8
  161. package/package.json +4 -2
  162. package/dist/dso-toolkit/p-08427682.entry.js +0 -1
  163. package/dist/dso-toolkit/p-731a9631.entry.js +0 -1
  164. package/dist/dso-toolkit/p-741e96de.entry.js +0 -5
  165. package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
  166. package/dist/dso-toolkit/p-a40eeb32.js +0 -1
  167. package/dist/dso-toolkit/p-affe82e6.entry.js +0 -1
  168. package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
  169. package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
  170. package/dist/dso-toolkit/p-fd5e24c9.entry.js +0 -1
@@ -23,7 +23,7 @@ const keyCode = {
23
23
  RIGHT: 39,
24
24
  DOWN: 40,
25
25
  };
26
- const DISALLOWED_CHARACTERS = /[^0-9\.\/\-]+/g;
26
+ const DISALLOWED_CHARACTERS = /[^0-9\-]+/g;
27
27
  const TRANSITION_MS = 300;
28
28
  export class DsoDatePicker {
29
29
  constructor() {
@@ -229,7 +229,49 @@ export class DsoDatePicker {
229
229
  };
230
230
  this.handleInputChange = (e) => {
231
231
  const target = e.target;
232
- this.setValue(target.value.replace(DISALLOWED_CHARACTERS, ""));
232
+ this.setValue(target.value);
233
+ };
234
+ this.handleKeyPress = (e) => {
235
+ if (e.key.search(DISALLOWED_CHARACTERS) > -1) {
236
+ e.preventDefault();
237
+ }
238
+ };
239
+ this.prepareEvent = (value) => {
240
+ var event = {
241
+ component: "dso-date-picker",
242
+ value: "",
243
+ valueAsDate: undefined
244
+ };
245
+ if (value instanceof Date) {
246
+ event.valueAsDate = value;
247
+ }
248
+ else {
249
+ event.value = value;
250
+ event.valueAsDate = parseDutchDate(value);
251
+ }
252
+ if (event.valueAsDate) {
253
+ event.value = printDutchDate(event.valueAsDate);
254
+ }
255
+ if (!event.valueAsDate && this.required) {
256
+ event.error = "required";
257
+ }
258
+ if (event.value && !event.valueAsDate) {
259
+ event.error = "invalid";
260
+ }
261
+ if (event.valueAsDate && (this.min || this.max)) {
262
+ const min = parseDutchDate(this.min);
263
+ const max = parseDutchDate(this.max);
264
+ const clampValue = clamp(event.valueAsDate, min, max);
265
+ if (clampValue !== event.valueAsDate && clampValue === min) {
266
+ event.valueAsDate = undefined;
267
+ event.error = "min-range";
268
+ }
269
+ else if (clampValue !== event.valueAsDate && clampValue === max) {
270
+ event.valueAsDate = undefined;
271
+ event.error = "max-range";
272
+ }
273
+ }
274
+ return event;
233
275
  };
234
276
  this.processFocusedDayNode = (element) => {
235
277
  this.focusedDayNode = element;
@@ -242,13 +284,12 @@ export class DsoDatePicker {
242
284
  * Component event handling.
243
285
  */
244
286
  handleDocumentClick(e) {
245
- var _a;
246
287
  if (!this.open) {
247
288
  return;
248
289
  }
249
290
  const path = e.composedPath();
250
291
  for (const target of path) {
251
- if (target instanceof Node && ((_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(target))) {
292
+ if (target instanceof Node && this.element.contains(target)) {
252
293
  return;
253
294
  }
254
295
  }
@@ -322,27 +363,7 @@ export class DsoDatePicker {
322
363
  this.focusedDay = clamp(day, parseDutchDate(this.min), parseDutchDate(this.max));
323
364
  }
324
365
  setValue(value) {
325
- var event = {
326
- component: "dso-date-picker",
327
- value: "",
328
- valueAsDate: undefined
329
- };
330
- if (value instanceof Date) {
331
- event.valueAsDate = value;
332
- }
333
- else {
334
- event.value = value;
335
- event.valueAsDate = parseDutchDate(value);
336
- }
337
- if (event.valueAsDate) {
338
- event.value = printDutchDate(event.valueAsDate);
339
- }
340
- if (!event.valueAsDate && this.required) {
341
- event.error = "required";
342
- }
343
- if (event.value && !event.valueAsDate) {
344
- event.error = "invalid";
345
- }
366
+ const event = this.prepareEvent(value);
346
367
  this.value = event.value;
347
368
  this.dateChange.emit(event);
348
369
  }
@@ -380,7 +401,7 @@ export class DsoDatePicker {
380
401
  return (h(Host, null,
381
402
  h("div", { class: "dso-date" },
382
403
  h("div", { class: "dso-date__input-wrapper" },
383
- h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }),
404
+ h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onKeyPress: this.handleKeyPress, onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }),
384
405
  h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) },
385
406
  h("span", { class: "dso-date__toggle-icon" },
386
407
  h("dso-icon", { icon: "calendar" })),
@@ -431,7 +452,7 @@ export class DsoDatePicker {
431
452
  h(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate }))))));
432
453
  }
433
454
  static get is() { return "dso-date-picker"; }
434
- static get encapsulation() { return "shadow"; }
455
+ static get encapsulation() { return "scoped"; }
435
456
  static get originalStyleUrls() { return {
436
457
  "$": ["date-picker.scss"]
437
458
  }; }
@@ -637,7 +658,7 @@ export class DsoDatePicker {
637
658
  },
638
659
  "complexType": {
639
660
  "original": "DsoDatePickerChangeEvent",
640
- "resolved": "{ component: \"dso-date-picker\"; valueAsDate: Date | undefined; value: string; error?: \"invalid\" | \"required\" | undefined; }",
661
+ "resolved": "{ component: \"dso-date-picker\"; valueAsDate: Date | undefined; value: string; error?: \"invalid\" | \"required\" | \"min-range\" | \"max-range\" | undefined; }",
641
662
  "references": {
642
663
  "DsoDatePickerChangeEvent": {
643
664
  "location": "local"
@@ -1,9 +1,10 @@
1
1
  import { html } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined';
3
- export function datePickerTemplate({ id, onDateChange, value, min, max, disabled, autofocus }) {
3
+ export function datePickerTemplate({ id, onDateChange, value, min, max, disabled, autofocus, direction }) {
4
4
  return html `
5
5
  <dso-date-picker
6
6
  @dateChange=${(e) => onDateChange(e)}
7
+ direction=${ifDefined(direction)}
7
8
  identifier=${ifDefined(id)}
8
9
  value=${ifDefined(value || undefined)}
9
10
  min=${ifDefined(min || undefined)}
@@ -0,0 +1,36 @@
1
+ import { html } from 'lit-html';
2
+ import { ifDefined } from 'lit-html/directives/if-defined';
3
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html';
4
+ import { listTemplate } from '../list/list.template';
5
+ function definitionTemplate({ term, descriptions }, useSrOnlyColon) {
6
+ return html `
7
+ <dt>
8
+ ${term}${useSrOnlyColon
9
+ ? html `<span class="sr-only">:</span>`
10
+ : ':'}
11
+ </dt>
12
+ ${descriptions.map(description => html `
13
+ <dd>${definitionContentTemplate(description)}</dd>
14
+ `)}
15
+ `;
16
+ }
17
+ function definitionContentTemplate(description) {
18
+ if ('content' in description) {
19
+ if (typeof description.content === 'string') {
20
+ return unsafeHTML(description.content);
21
+ }
22
+ return description.content;
23
+ }
24
+ return listTemplate(description.list);
25
+ }
26
+ export function definitionListTemplate({ modifier, definitions, useSrOnlyColon }) {
27
+ return html `
28
+ <dl class=${ifDefined(modifier)}>
29
+ ${definitions.map(definition => (modifier === null || modifier === void 0 ? void 0 : modifier.split(' ').includes('dso-columns'))
30
+ ? html `
31
+ <div>${definitionTemplate(definition, useSrOnlyColon)}</div>
32
+ `
33
+ : definitionTemplate(definition, useSrOnlyColon))}
34
+ </dl>
35
+ `;
36
+ }
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host(:focus) {
5
2
  outline: none;
6
3
  }
@@ -93,9 +93,6 @@ export class DropdownMenu {
93
93
  this.openPopup();
94
94
  }
95
95
  }
96
- componentDidRender() {
97
- this.host.setAttribute("tabindex", "-1");
98
- }
99
96
  componentWillRender() {
100
97
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
101
98
  for (const tab of tabbable(li)) {
@@ -110,6 +107,7 @@ export class DropdownMenu {
110
107
  }
111
108
  }
112
109
  openPopup() {
110
+ this.host.setAttribute("tabindex", "-1");
113
111
  this.host.addEventListener("keydown", this.keyDownListener);
114
112
  this.host.addEventListener("focusout", this.focusOutListener);
115
113
  this.button.setAttribute("aria-expanded", "true");
@@ -119,11 +117,24 @@ export class DropdownMenu {
119
117
  this.host.removeEventListener("keydown", this.keyDownListener);
120
118
  this.host.removeEventListener("focusout", this.focusOutListener);
121
119
  this.button.setAttribute("aria-expanded", "false");
120
+ this.host.removeAttribute("tabindex");
122
121
  this.tabbables.forEach((tabbable) => tabbable.removeEventListener("click", this.escape));
123
122
  }
123
+ getActiveElement(root = document) {
124
+ const activeEl = root.activeElement;
125
+ if (!activeEl) {
126
+ return null;
127
+ }
128
+ if (activeEl.shadowRoot) {
129
+ return this.getActiveElement(activeEl.shadowRoot);
130
+ }
131
+ else {
132
+ return activeEl;
133
+ }
134
+ }
124
135
  tabInPopup(direction) {
125
136
  const tabs = this.tabbables;
126
- const currentIndex = tabs.findIndex((e) => e === document.activeElement);
137
+ const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());
127
138
  let nextIndex = currentIndex + direction;
128
139
  if (nextIndex >= tabs.length) {
129
140
  nextIndex = 0;
@@ -0,0 +1,433 @@
1
+ :host {
2
+ --di-chevron-down-bosgroen: url("data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%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");
3
+ --di-chevron-up-bosgroen: url("data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%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");
4
+ display: block;
5
+ }
6
+
7
+ .dso-header {
8
+ border-bottom: 1px solid #ccc;
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ }
12
+ @media screen and (min-width: 768px) {
13
+ .dso-header {
14
+ align-items: center;
15
+ }
16
+ }
17
+ @media screen and (max-width: 991px) {
18
+ .dso-header.use-drop-down {
19
+ flex-wrap: nowrap;
20
+ }
21
+ }
22
+
23
+ .logo-container {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ padding-bottom: 16px;
27
+ padding-top: 16px;
28
+ }
29
+
30
+ @media screen and (min-width: 768px) {
31
+ .sub-logo {
32
+ margin-left: 24px;
33
+ }
34
+ }
35
+ @media screen and (max-width: 767px) {
36
+ .sub-logo {
37
+ flex-basis: 100%;
38
+ }
39
+ }
40
+
41
+ .login,
42
+ .logout {
43
+ margin-right: 16px;
44
+ }
45
+
46
+ .profile a,
47
+ .logout a,
48
+ .login a {
49
+ text-decoration: none;
50
+ color: #39870c;
51
+ font-weight: 600;
52
+ }
53
+ .profile a:hover, .profile a:focus,
54
+ .logout a:hover,
55
+ .logout a:focus,
56
+ .login a:hover,
57
+ .login a:focus {
58
+ text-decoration: none;
59
+ }
60
+ .profile a:active,
61
+ .logout a:active,
62
+ .login a:active {
63
+ text-decoration: underline;
64
+ }
65
+
66
+ .dso-header-session {
67
+ display: flex;
68
+ margin-left: auto;
69
+ }
70
+ .dso-header-session .profile a {
71
+ margin-left: 8px;
72
+ }
73
+ .dso-header-session .profile + .logout {
74
+ border-left: 3px solid #ccc;
75
+ margin-left: 16px;
76
+ padding-left: 16px;
77
+ }
78
+
79
+ .dso-navbar {
80
+ flex-basis: 100%;
81
+ }
82
+
83
+ dso-dropdown-menu > .dso-primary::after,
84
+ dso-dropdown-menu > .dso-secondary::after,
85
+ dso-dropdown-menu > .dso-tertiary::after,
86
+ dso-dropdown-menu > .btn::after {
87
+ content: "";
88
+ display: inline-block;
89
+ margin-left: 8px;
90
+ }
91
+ dso-dropdown-menu > .dso-primary::after,
92
+ dso-dropdown-menu > .btn-primary::after {
93
+ background: var(--dso-icon, var(--di-chevron-down-wit)) no-repeat;
94
+ background-position: center;
95
+ background-size: cover;
96
+ height: 1.5em;
97
+ vertical-align: top;
98
+ width: 1.5em;
99
+ }
100
+ dso-dropdown-menu > .dso-secondary::after,
101
+ dso-dropdown-menu > .btn-default::after {
102
+ background: var(--dso-icon, var(--di-chevron-down)) no-repeat;
103
+ background-position: center;
104
+ background-size: cover;
105
+ height: 1.5em;
106
+ vertical-align: top;
107
+ width: 1.5em;
108
+ }
109
+ dso-dropdown-menu > .dso-secondary:hover::after,
110
+ dso-dropdown-menu > .btn-default:hover::after {
111
+ --dso-icon: var(--di-chevron-down-wit);
112
+ }
113
+ dso-dropdown-menu > .dso-tertiary::after,
114
+ dso-dropdown-menu > .btn-link::after {
115
+ background: var(--dso-icon, var(--di-chevron-down)) no-repeat;
116
+ background-position: center;
117
+ background-size: cover;
118
+ height: 1.5em;
119
+ vertical-align: top;
120
+ width: 1.5em;
121
+ position: relative;
122
+ top: -2px;
123
+ }
124
+ dso-dropdown-menu > .dso-tertiary:hover::after,
125
+ dso-dropdown-menu > .btn-link:hover::after {
126
+ --dso-icon: var(--di-chevron-down-scampi);
127
+ }
128
+ dso-dropdown-menu .dso-group-label {
129
+ color: #999;
130
+ font-size: 0.875em;
131
+ font-weight: 400;
132
+ margin: 0;
133
+ padding: 4px 20px 2px;
134
+ text-transform: uppercase;
135
+ }
136
+ dso-dropdown-menu ul {
137
+ margin: 0;
138
+ padding: 0;
139
+ }
140
+ dso-dropdown-menu ul:not(:last-child) {
141
+ border-bottom: 1px solid #e5e5e5;
142
+ margin-bottom: 11px;
143
+ padding-bottom: 11px;
144
+ }
145
+ dso-dropdown-menu .dso-dropdown-options {
146
+ background-clip: padding-box;
147
+ background-color: #fff;
148
+ border-radius: 4px;
149
+ border: 1px solid rgba(0, 0, 0, 0.15);
150
+ box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4);
151
+ font-size: 16px;
152
+ margin: 2px 0 0;
153
+ min-width: 160px;
154
+ padding: 5px 0;
155
+ position: absolute;
156
+ text-align: left;
157
+ top: 100%;
158
+ z-index: 1000;
159
+ }
160
+ dso-dropdown-menu .dso-dropdown-options li {
161
+ list-style: none;
162
+ }
163
+ dso-dropdown-menu .dso-dropdown-options li a:visited {
164
+ color: #191919;
165
+ }
166
+ dso-dropdown-menu .dso-dropdown-options li a,
167
+ dso-dropdown-menu .dso-dropdown-options li button {
168
+ text-decoration: none;
169
+ clear: both;
170
+ color: #191919;
171
+ display: block;
172
+ font-weight: 400;
173
+ line-height: 1.5;
174
+ padding: 3px 20px;
175
+ text-decoration: none;
176
+ white-space: nowrap;
177
+ }
178
+ dso-dropdown-menu .dso-dropdown-options li a:hover, dso-dropdown-menu .dso-dropdown-options li a:focus, dso-dropdown-menu .dso-dropdown-options li a:active,
179
+ dso-dropdown-menu .dso-dropdown-options li button:hover,
180
+ dso-dropdown-menu .dso-dropdown-options li button:focus,
181
+ dso-dropdown-menu .dso-dropdown-options li button:active {
182
+ text-decoration: underline;
183
+ }
184
+ dso-dropdown-menu .dso-dropdown-options li a:hover, dso-dropdown-menu .dso-dropdown-options li a:focus,
185
+ dso-dropdown-menu .dso-dropdown-options li button:hover,
186
+ dso-dropdown-menu .dso-dropdown-options li button:focus {
187
+ background-color: #39870c;
188
+ border-color: #39870c;
189
+ color: #fff;
190
+ text-decoration: none;
191
+ }
192
+ dso-dropdown-menu .dso-dropdown-options li button {
193
+ background-color: transparent;
194
+ border: 0;
195
+ border-radius: 0;
196
+ text-align: inherit;
197
+ width: 100%;
198
+ }
199
+ dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options {
200
+ right: 0;
201
+ }
202
+ dso-dropdown-menu[open] > .dso-primary::after,
203
+ dso-dropdown-menu[open] > .btn-primary::after {
204
+ --dso-icon: var(--di-chevron-up-wit);
205
+ }
206
+ dso-dropdown-menu[open] > .dso-secondary::after,
207
+ dso-dropdown-menu[open] > .btn-default::after {
208
+ --dso-icon: var(--di-chevron-up);
209
+ }
210
+ dso-dropdown-menu[open] > .dso-secondary:hover::after,
211
+ dso-dropdown-menu[open] > .btn-default:hover::after {
212
+ --dso-icon: var(--di-chevron-up-wit);
213
+ }
214
+ dso-dropdown-menu[open] > .dso-tertiary::after,
215
+ dso-dropdown-menu[open] > .btn-link::after {
216
+ --dso-icon: var(--di-chevron-up);
217
+ }
218
+ dso-dropdown-menu[open] > .dso-tertiary:hover::after,
219
+ dso-dropdown-menu[open] > .btn-link:hover::after {
220
+ --dso-icon: var(--di-chevron-up-scampi);
221
+ }
222
+ dso-dropdown-menu[open] button::after {
223
+ background: var(--dso-icon, var(--di-chevron-up-bosgroen)) no-repeat;
224
+ background-position: center;
225
+ background-size: cover;
226
+ height: 1.2em;
227
+ vertical-align: top;
228
+ width: 1.2em;
229
+ }
230
+ dso-dropdown-menu[checkable] .dso-group-label {
231
+ padding-left: 40px;
232
+ }
233
+ dso-dropdown-menu[checkable] li a,
234
+ dso-dropdown-menu[checkable] li button {
235
+ padding-left: 40px;
236
+ }
237
+ dso-dropdown-menu[checkable] li.dso-checked a:not(:focus),
238
+ dso-dropdown-menu[checkable] li.dso-checked button:not(:focus) {
239
+ background-color: #39870c;
240
+ border-color: #39870c;
241
+ color: #fff;
242
+ }
243
+ dso-dropdown-menu[checkable] li.dso-checked a::before,
244
+ dso-dropdown-menu[checkable] li.dso-checked button::before {
245
+ background: var(--dso-icon, var(--di-check-wit)) no-repeat;
246
+ background-position: center;
247
+ background-size: cover;
248
+ height: 24px;
249
+ vertical-align: top;
250
+ width: 24px;
251
+ content: "";
252
+ display: block;
253
+ float: left;
254
+ margin-left: -32px;
255
+ margin-right: 8px;
256
+ }
257
+ dso-dropdown-menu button {
258
+ align-items: flex-end;
259
+ background-color: transparent;
260
+ border: 0;
261
+ display: flex;
262
+ font-family: Asap, sans-serif;
263
+ padding-right: 32px;
264
+ }
265
+ dso-dropdown-menu button::after {
266
+ background: var(--dso-icon, var(--di-chevron-down-bosgroen)) no-repeat;
267
+ background-position: center;
268
+ background-size: cover;
269
+ height: 1.2em;
270
+ vertical-align: top;
271
+ width: 1.2em;
272
+ content: "";
273
+ display: inline-block;
274
+ margin-left: 8px;
275
+ position: absolute;
276
+ right: 0;
277
+ top: 50%;
278
+ transform: translateY(-50%);
279
+ }
280
+ @media screen and (max-width: 991px) {
281
+ dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options {
282
+ right: -16px;
283
+ }
284
+ }
285
+ @media screen and (max-width: 767px) {
286
+ dso-dropdown-menu {
287
+ top: 12px;
288
+ }
289
+ }
290
+ dso-dropdown-menu .dso-dropdown-options {
291
+ border: 0;
292
+ border-radius: 0;
293
+ }
294
+ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul {
295
+ width: 320px;
296
+ }
297
+ @media screen and (max-width: 991px) {
298
+ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul {
299
+ width: 100vw;
300
+ }
301
+ }
302
+ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li a {
303
+ color: #275937;
304
+ font-size: 1.25rem;
305
+ padding: 16px;
306
+ }
307
+ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li.dso-active a {
308
+ font-weight: 600;
309
+ }
310
+ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li + li {
311
+ border-top: 1px solid #ccc;
312
+ }
313
+
314
+ .dropdown {
315
+ margin-left: auto;
316
+ }
317
+ @media screen and (max-width: 767px) {
318
+ .dropdown dso-dropdown-menu {
319
+ top: 28px;
320
+ }
321
+ }
322
+ .dropdown dso-dropdown-menu .dso-dropdown-options {
323
+ top: calc(100% + 29px);
324
+ }
325
+ @media screen and (max-width: 767px) {
326
+ .dropdown dso-dropdown-menu .dso-dropdown-options {
327
+ top: 72px;
328
+ }
329
+ }
330
+ .dropdown dso-dropdown-menu[open] button::after {
331
+ background: var(--dso-icon, var(--di-chevron-up)) no-repeat;
332
+ background-position: center;
333
+ background-size: cover;
334
+ height: 1.5em;
335
+ vertical-align: top;
336
+ width: 1.5em;
337
+ }
338
+ .dropdown dso-dropdown-menu button {
339
+ color: #39870c;
340
+ font-size: 16px;
341
+ font-weight: 600;
342
+ }
343
+ .dropdown dso-dropdown-menu button:hover, .dropdown dso-dropdown-menu button:active {
344
+ cursor: pointer;
345
+ text-decoration: underline;
346
+ }
347
+ .dropdown dso-dropdown-menu button::after {
348
+ background: var(--dso-icon, var(--di-chevron-down)) no-repeat;
349
+ background-position: center;
350
+ background-size: cover;
351
+ height: 1.5em;
352
+ vertical-align: top;
353
+ width: 1.5em;
354
+ }
355
+
356
+ .dso-nav {
357
+ align-items: end;
358
+ column-gap: 32px;
359
+ display: flex;
360
+ list-style: none;
361
+ margin-bottom: 0;
362
+ margin-top: 0;
363
+ padding-left: 0;
364
+ }
365
+ .dso-nav > li {
366
+ margin-bottom: 4px;
367
+ }
368
+ .dso-nav > li > a {
369
+ display: block;
370
+ }
371
+ .dso-nav > li > a, .dso-nav > li > a:hover, .dso-nav > li > a:focus, .dso-nav > li > a:visited {
372
+ color: #275937;
373
+ }
374
+ .dso-nav > li.dso-active, .dso-nav > li.is-active {
375
+ margin-bottom: 0;
376
+ }
377
+ .dso-nav > li.dso-active > a, .dso-nav > li.is-active > a {
378
+ border-bottom: 4px solid #8b4a6a;
379
+ font-weight: bold;
380
+ }
381
+ .dso-nav.dso-nav-main > li > a {
382
+ text-decoration: none;
383
+ font-size: 1.25em;
384
+ line-height: 1;
385
+ margin-top: 8px;
386
+ padding: 16px 0;
387
+ white-space: nowrap;
388
+ }
389
+ .dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus, .dso-nav.dso-nav-main > li > a:active {
390
+ text-decoration: underline;
391
+ }
392
+ .dso-nav.dso-nav-main dso-dropdown-menu .dso-dropdown-options {
393
+ top: calc(100% + 3px);
394
+ }
395
+ .dso-nav.dso-nav-main dso-dropdown-menu button {
396
+ font-size: 1.25em;
397
+ line-height: 1;
398
+ margin-top: 8px;
399
+ padding: 16px 0;
400
+ align-items: center;
401
+ color: #275937;
402
+ padding-right: 32px;
403
+ }
404
+ .dso-nav.dso-nav-main dso-dropdown-menu button:hover, .dso-nav.dso-nav-main dso-dropdown-menu button:active {
405
+ cursor: pointer;
406
+ text-decoration: underline;
407
+ }
408
+ .dso-nav.dso-nav-main dso-dropdown-menu button::after {
409
+ top: auto;
410
+ transform: none;
411
+ }
412
+ .dso-nav.dso-nav-sub > li {
413
+ display: inline-block;
414
+ }
415
+ .dso-nav.dso-nav-sub > li > a {
416
+ text-decoration: none;
417
+ font-size: 16px;
418
+ margin-top: 4px;
419
+ padding: 4px 8px 3px;
420
+ }
421
+ .dso-nav.dso-nav-sub > li > a:hover, .dso-nav.dso-nav-sub > li > a:focus, .dso-nav.dso-nav-sub > li > a:active {
422
+ text-decoration: underline;
423
+ }
424
+ .dso-nav .menu-user-home {
425
+ margin-left: auto;
426
+ }
427
+ .dso-nav .menu-user-home dso-icon {
428
+ height: 1em;
429
+ margin-right: 8px;
430
+ position: relative;
431
+ top: -2px;
432
+ width: 1.2em;
433
+ }