@dso-toolkit/core 62.9.0 → 62.11.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 (214) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dso-action-list-item.cjs.entry.js +1 -1
  4. package/dist/cjs/dso-action-list-item.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-action-list.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-action-list.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-alert_7.cjs.entry.js +6 -7
  8. package/dist/cjs/dso-alert_7.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-annotation-output_3.cjs.entry.js +2 -2
  10. package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-card.cjs.entry.js +1 -1
  12. package/dist/cjs/dso-card.cjs.entry.js.map +1 -1
  13. package/dist/cjs/dso-date-picker.cjs.entry.js +45 -22
  14. package/dist/cjs/dso-date-picker.cjs.entry.js.map +1 -1
  15. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +36 -10
  16. package/dist/cjs/dso-dropdown-menu.cjs.entry.js.map +1 -1
  17. package/dist/cjs/dso-header.cjs.entry.js +1 -1
  18. package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
  19. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -2
  20. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js.map +1 -1
  21. package/dist/cjs/dso-highlight-box.cjs.entry.js +2 -10
  22. package/dist/cjs/dso-highlight-box.cjs.entry.js.map +1 -1
  23. package/dist/cjs/dso-icon.cjs.entry.js +1 -1
  24. package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
  25. package/dist/cjs/dso-info_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/dso-list-button.cjs.entry.js +24 -11
  27. package/dist/cjs/dso-list-button.cjs.entry.js.map +1 -1
  28. package/dist/cjs/dso-modal.cjs.entry.js +4 -2
  29. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  30. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  31. package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
  32. package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
  33. package/dist/cjs/{focus-trap.esm-6cff35a7.js → focus-trap.esm-1633a28f.js} +584 -16
  34. package/dist/cjs/focus-trap.esm-1633a28f.js.map +1 -0
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/components/accordion/components/accordion-section.css +1 -1
  37. package/dist/collection/components/action-list/action-list.css +18 -1
  38. package/dist/collection/components/action-list/components/action-list-item.css +0 -12
  39. package/dist/collection/components/alert/alert.css +0 -20
  40. package/dist/collection/components/annotation-output/annotation-output.css +17 -0
  41. package/dist/collection/components/badge/badge.css +8 -5
  42. package/dist/collection/components/card/card.css +9 -9
  43. package/dist/collection/components/date-picker/date-picker.interfaces.js.map +1 -1
  44. package/dist/collection/components/date-picker/date-picker.js +49 -26
  45. package/dist/collection/components/date-picker/date-picker.js.map +1 -1
  46. package/dist/collection/components/document-component/document-component.css +41 -9
  47. package/dist/collection/components/dropdown-menu/dropdown-menu.js +34 -7
  48. package/dist/collection/components/dropdown-menu/dropdown-menu.js.map +1 -1
  49. package/dist/collection/components/header/header.css +1 -1
  50. package/dist/collection/components/highlight-box/highlight-box.css +20 -56
  51. package/dist/collection/components/highlight-box/highlight-box.js +7 -15
  52. package/dist/collection/components/highlight-box/highlight-box.js.map +1 -1
  53. package/dist/collection/components/info/info.css +0 -2
  54. package/dist/collection/components/label/label.css +15 -4
  55. package/dist/collection/components/list-button/list-button.js +41 -10
  56. package/dist/collection/components/list-button/list-button.js.map +1 -1
  57. package/dist/collection/components/modal/modal.css +2 -2
  58. package/dist/collection/components/modal/modal.js +3 -1
  59. package/dist/collection/components/modal/modal.js.map +1 -1
  60. package/dist/collection/components/ozon-content/ozon-content.css +83 -19
  61. package/dist/collection/components/table/table.css +2 -2
  62. package/dist/collection/components/viewer-grid/viewer-grid.css +4 -4
  63. package/dist/components/alert.js +1 -1
  64. package/dist/components/alert.js.map +1 -1
  65. package/dist/components/annotation-output.js +1 -1
  66. package/dist/components/annotation-output.js.map +1 -1
  67. package/dist/components/badge.js +1 -1
  68. package/dist/components/badge.js.map +1 -1
  69. package/dist/components/document-component.js +1 -1
  70. package/dist/components/document-component.js.map +1 -1
  71. package/dist/components/dropdown-menu.js +34 -8
  72. package/dist/components/dropdown-menu.js.map +1 -1
  73. package/dist/components/dso-accordion-section.js +1 -1
  74. package/dist/components/dso-accordion-section.js.map +1 -1
  75. package/dist/components/dso-action-list-item.js +1 -1
  76. package/dist/components/dso-action-list-item.js.map +1 -1
  77. package/dist/components/dso-action-list.js +1 -1
  78. package/dist/components/dso-action-list.js.map +1 -1
  79. package/dist/components/dso-card.js +1 -1
  80. package/dist/components/dso-card.js.map +1 -1
  81. package/dist/components/dso-date-picker.js +45 -22
  82. package/dist/components/dso-date-picker.js.map +1 -1
  83. package/dist/components/dso-header.js +1 -1
  84. package/dist/components/dso-header.js.map +1 -1
  85. package/dist/components/dso-highlight-box.js +8 -16
  86. package/dist/components/dso-highlight-box.js.map +1 -1
  87. package/dist/components/dso-list-button.js +25 -10
  88. package/dist/components/dso-list-button.js.map +1 -1
  89. package/dist/components/dso-modal.js +4 -2
  90. package/dist/components/dso-modal.js.map +1 -1
  91. package/dist/components/dso-viewer-grid.js +1 -1
  92. package/dist/components/dso-viewer-grid.js.map +1 -1
  93. package/dist/components/focus-trap.esm.js +569 -2
  94. package/dist/components/focus-trap.esm.js.map +1 -1
  95. package/dist/components/icon.js +1 -1
  96. package/dist/components/info.js +1 -1
  97. package/dist/components/info.js.map +1 -1
  98. package/dist/components/label.js +1 -1
  99. package/dist/components/label.js.map +1 -1
  100. package/dist/components/ozon-content.js +1 -1
  101. package/dist/components/ozon-content.js.map +1 -1
  102. package/dist/components/table.js +1 -1
  103. package/dist/components/table.js.map +1 -1
  104. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  105. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  106. package/dist/dso-toolkit/p-0a3337b2.entry.js +2 -0
  107. package/dist/dso-toolkit/{p-9c34ee39.entry.js.map → p-0a3337b2.entry.js.map} +1 -1
  108. package/dist/dso-toolkit/p-1faa1497.entry.js +2 -0
  109. package/dist/dso-toolkit/{p-eb7275e9.entry.js.map → p-1faa1497.entry.js.map} +1 -1
  110. package/dist/dso-toolkit/p-2862c19a.entry.js +2 -0
  111. package/dist/dso-toolkit/{p-35dae23f.entry.js.map → p-2862c19a.entry.js.map} +1 -1
  112. package/dist/dso-toolkit/p-31825ec2.entry.js +2 -0
  113. package/dist/dso-toolkit/{p-336aefb5.entry.js.map → p-31825ec2.entry.js.map} +1 -1
  114. package/dist/dso-toolkit/p-5def1d28.entry.js +2 -0
  115. package/dist/dso-toolkit/p-5def1d28.entry.js.map +1 -0
  116. package/dist/dso-toolkit/p-67461818.entry.js +2 -0
  117. package/dist/dso-toolkit/{p-977dde7f.entry.js.map → p-67461818.entry.js.map} +1 -1
  118. package/dist/dso-toolkit/p-7bcce109.entry.js +2 -0
  119. package/dist/dso-toolkit/{p-193b7e46.entry.js.map → p-7bcce109.entry.js.map} +1 -1
  120. package/dist/dso-toolkit/p-92fd9516.entry.js +2 -0
  121. package/dist/dso-toolkit/p-92fd9516.entry.js.map +1 -0
  122. package/dist/dso-toolkit/p-9bf33855.entry.js +2 -0
  123. package/dist/dso-toolkit/{p-a3f28ef2.entry.js.map → p-9bf33855.entry.js.map} +1 -1
  124. package/dist/dso-toolkit/p-9c0f67c8.js +10 -0
  125. package/dist/dso-toolkit/p-9c0f67c8.js.map +1 -0
  126. package/dist/dso-toolkit/{p-bf04808f.entry.js → p-aa6d1e42.entry.js} +2 -2
  127. package/dist/dso-toolkit/{p-bf04808f.entry.js.map → p-aa6d1e42.entry.js.map} +1 -1
  128. package/dist/dso-toolkit/p-c9fbf040.entry.js +2 -0
  129. package/dist/dso-toolkit/p-c9fbf040.entry.js.map +1 -0
  130. package/dist/dso-toolkit/p-e0a3a1d4.entry.js +2 -0
  131. package/dist/dso-toolkit/p-e0a3a1d4.entry.js.map +1 -0
  132. package/dist/dso-toolkit/p-e5ecc82f.entry.js +2 -0
  133. package/dist/dso-toolkit/p-e5ecc82f.entry.js.map +1 -0
  134. package/dist/dso-toolkit/p-eeacda43.entry.js +2 -0
  135. package/dist/dso-toolkit/{p-e348d48b.entry.js.map → p-eeacda43.entry.js.map} +1 -1
  136. package/dist/dso-toolkit/p-f4cb0d36.entry.js +2 -0
  137. package/dist/dso-toolkit/p-f4cb0d36.entry.js.map +1 -0
  138. package/dist/dso-toolkit/p-f6d1d215.entry.js +2 -0
  139. package/dist/dso-toolkit/p-f6d1d215.entry.js.map +1 -0
  140. package/dist/esm/dso-accordion-section.entry.js +1 -1
  141. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  142. package/dist/esm/dso-action-list-item.entry.js +1 -1
  143. package/dist/esm/dso-action-list-item.entry.js.map +1 -1
  144. package/dist/esm/dso-action-list.entry.js +1 -1
  145. package/dist/esm/dso-action-list.entry.js.map +1 -1
  146. package/dist/esm/dso-alert_7.entry.js +6 -7
  147. package/dist/esm/dso-alert_7.entry.js.map +1 -1
  148. package/dist/esm/dso-annotation-output_3.entry.js +2 -2
  149. package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
  150. package/dist/esm/dso-card.entry.js +1 -1
  151. package/dist/esm/dso-card.entry.js.map +1 -1
  152. package/dist/esm/dso-date-picker.entry.js +45 -22
  153. package/dist/esm/dso-date-picker.entry.js.map +1 -1
  154. package/dist/esm/dso-dropdown-menu.entry.js +34 -8
  155. package/dist/esm/dso-dropdown-menu.entry.js.map +1 -1
  156. package/dist/esm/dso-header.entry.js +1 -1
  157. package/dist/esm/dso-header.entry.js.map +1 -1
  158. package/dist/esm/dso-helpcenter-panel.entry.js +1 -2
  159. package/dist/esm/dso-helpcenter-panel.entry.js.map +1 -1
  160. package/dist/esm/dso-highlight-box.entry.js +3 -11
  161. package/dist/esm/dso-highlight-box.entry.js.map +1 -1
  162. package/dist/esm/dso-icon.entry.js +1 -1
  163. package/dist/esm/dso-info_2.entry.js +1 -1
  164. package/dist/esm/dso-info_2.entry.js.map +1 -1
  165. package/dist/esm/dso-list-button.entry.js +25 -12
  166. package/dist/esm/dso-list-button.entry.js.map +1 -1
  167. package/dist/esm/dso-modal.entry.js +4 -2
  168. package/dist/esm/dso-modal.entry.js.map +1 -1
  169. package/dist/esm/dso-toolkit.js +1 -1
  170. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  171. package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
  172. package/dist/esm/{focus-trap.esm-d8deb1f0.js → focus-trap.esm-22fb5633.js} +570 -3
  173. package/dist/esm/focus-trap.esm-22fb5633.js.map +1 -0
  174. package/dist/esm/loader.js +1 -1
  175. package/dist/types/components/date-picker/date-picker.d.ts +4 -2
  176. package/dist/types/components/date-picker/date-picker.interfaces.d.ts +5 -1
  177. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +2 -1
  178. package/dist/types/components/list-button/list-button.d.ts +8 -0
  179. package/dist/types/components.d.ts +12 -4
  180. package/package.json +2 -2
  181. package/dist/cjs/focus-trap.esm-6cff35a7.js.map +0 -1
  182. package/dist/cjs/index.esm-970bc106.js +0 -578
  183. package/dist/cjs/index.esm-970bc106.js.map +0 -1
  184. package/dist/components/index.esm.js +0 -572
  185. package/dist/components/index.esm.js.map +0 -1
  186. package/dist/dso-toolkit/p-09e0f1a6.entry.js +0 -2
  187. package/dist/dso-toolkit/p-09e0f1a6.entry.js.map +0 -1
  188. package/dist/dso-toolkit/p-193b7e46.entry.js +0 -2
  189. package/dist/dso-toolkit/p-33416b1d.entry.js +0 -2
  190. package/dist/dso-toolkit/p-33416b1d.entry.js.map +0 -1
  191. package/dist/dso-toolkit/p-336aefb5.entry.js +0 -2
  192. package/dist/dso-toolkit/p-35dae23f.entry.js +0 -2
  193. package/dist/dso-toolkit/p-39962ce8.entry.js +0 -2
  194. package/dist/dso-toolkit/p-39962ce8.entry.js.map +0 -1
  195. package/dist/dso-toolkit/p-482c8ebd.entry.js +0 -2
  196. package/dist/dso-toolkit/p-482c8ebd.entry.js.map +0 -1
  197. package/dist/dso-toolkit/p-5f39d08c.entry.js +0 -2
  198. package/dist/dso-toolkit/p-5f39d08c.entry.js.map +0 -1
  199. package/dist/dso-toolkit/p-7b36db3a.entry.js +0 -2
  200. package/dist/dso-toolkit/p-7b36db3a.entry.js.map +0 -1
  201. package/dist/dso-toolkit/p-86133aa5.js +0 -6
  202. package/dist/dso-toolkit/p-86133aa5.js.map +0 -1
  203. package/dist/dso-toolkit/p-977dde7f.entry.js +0 -2
  204. package/dist/dso-toolkit/p-9c34ee39.entry.js +0 -2
  205. package/dist/dso-toolkit/p-a3f28ef2.entry.js +0 -2
  206. package/dist/dso-toolkit/p-e2f7399e.entry.js +0 -2
  207. package/dist/dso-toolkit/p-e2f7399e.entry.js.map +0 -1
  208. package/dist/dso-toolkit/p-e348d48b.entry.js +0 -2
  209. package/dist/dso-toolkit/p-eb7275e9.entry.js +0 -2
  210. package/dist/dso-toolkit/p-fbb226aa.js +0 -6
  211. package/dist/dso-toolkit/p-fbb226aa.js.map +0 -1
  212. package/dist/esm/focus-trap.esm-d8deb1f0.js.map +0 -1
  213. package/dist/esm/index.esm-7e16e884.js +0 -572
  214. package/dist/esm/index.esm-7e16e884.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, forceUpdate, } from "@stencil/core";
2
2
  import { createFocusTrap } from "focus-trap";
3
3
  import clsx from "clsx";
4
4
  export class ListButton {
@@ -12,15 +12,28 @@ export class ListButton {
12
12
  this.max = undefined;
13
13
  this.checked = false;
14
14
  this.disabled = false;
15
+ this.subcontentPrefix = undefined;
15
16
  this.manual = true;
16
17
  }
18
+ get subcontentSlot() {
19
+ return this.host.querySelector("[slot='subcontent']");
20
+ }
17
21
  watchManualCallback() {
18
22
  if (!this.manual && this.manualCount) {
19
23
  this.stopManualCountInput();
20
24
  }
21
25
  }
26
+ connectedCallback() {
27
+ this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
28
+ this.mutationObserver.observe(this.host, {
29
+ characterData: true,
30
+ childList: true,
31
+ subtree: true,
32
+ attributes: true,
33
+ });
34
+ }
22
35
  componentDidRender() {
23
- var _a;
36
+ var _a, _b;
24
37
  if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {
25
38
  this.trap = createFocusTrap(this.manualInputWrapperElement, {
26
39
  escapeDeactivates: true,
@@ -37,10 +50,13 @@ export class ListButton {
37
50
  (_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
38
51
  delete this.trap;
39
52
  }
53
+ (_b = this.subcontentSlot) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-hidden", "true");
40
54
  }
41
55
  disconnectedCallback() {
42
- var _a;
56
+ var _a, _b;
43
57
  (_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
58
+ (_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
59
+ delete this.mutationObserver;
44
60
  }
45
61
  handleOnChange({ target }) {
46
62
  if (target instanceof HTMLInputElement) {
@@ -50,7 +66,7 @@ export class ListButton {
50
66
  stepValue(e, direction) {
51
67
  if (typeof this.count === "number") {
52
68
  const newValue = direction === "increment" ? this.count + 1 : this.count - 1;
53
- if (this.isNewCountValid(newValue) === false) {
69
+ if (!this.isNewCountValid(newValue)) {
54
70
  return;
55
71
  }
56
72
  this.dsoCountChange.emit({
@@ -90,17 +106,14 @@ export class ListButton {
90
106
  this.manualCount = undefined;
91
107
  }
92
108
  isNewCountValid(newValue) {
93
- if (this.min !== undefined &&
109
+ return !(this.min !== undefined &&
94
110
  this.max !== undefined &&
95
- (newValue < Number(this.min) || newValue > Number(this.max))) {
96
- return false;
97
- }
98
- return true;
111
+ (newValue < Number(this.min) || newValue > Number(this.max)));
99
112
  }
100
113
  render() {
101
114
  const showButtonInputs = this.manualCount === undefined;
102
115
  const selected = this.checked || (this.count !== undefined && this.count > 0);
103
- return (h("div", { class: clsx(["dso-button-group", { "dso-disabled": this.disabled }]) }, h("div", { class: clsx(["dso-list-button", { "dso-selected": selected, "dso-single-count": this.count === 1 }]), onClick: (e) => this.handleSelectClick(e) }, h("div", { class: "dso-selectable" }, h("input", { id: "dso-list-button-checkbox", type: "checkbox", value: "list-button", name: "naam", checked: selected, disabled: this.disabled, "aria-label": this.label }), h("label", { htmlFor: "dso-list-button-checkbox" }, this.label)), this.sublabel && h("span", { class: "dso-sublabel" }, this.sublabel), h("slot", { name: "subcontent" })), this.count !== undefined && this.count > 0 && (h("div", { class: "dso-input-number" }, this.manualCount === undefined && this.count > 1 && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.min) || this.disabled, onClick: (e) => this.stepValue(e, "decrement") }, h("dso-icon", { icon: "minus-circle" }), h("span", { class: "sr-only" }, "Aantal verlagen"))), h("div", { class: "dso-input-wrapper" }, this.manualCount === undefined && this.count > 1 && (h("input", { class: "dso-input-step-counter", type: "number", tabIndex: -1, "aria-label": "Aantal", value: this.count, readOnly: true })), h("form", { onSubmit: (e) => this.setCount(e) }, h("div", { ref: (element) => (this.manualInputWrapperElement = element) }, h("input", { class: clsx("form-control", { hidden: showButtonInputs }), type: "number", "aria-label": "Aantal", value: this.manualCount, min: this.min, max: this.max, onInput: (e) => this.handleOnChange(e) })), this.manual === true && (h("button", { class: clsx("dso-manual-input-button", { "sr-only": !showButtonInputs }), type: !showButtonInputs ? "submit" : "button", disabled: this.disabled, onClick: () => showButtonInputs && this.startManualCountInput() }, showButtonInputs ? (h("span", { class: "sr-only" }, "Handmatig aantal invullen")) : (h("span", { class: "sr-only" }, "Zet waarde")))))), showButtonInputs && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.max) || this.disabled, onClick: (e) => this.stepValue(e, "increment") }, h("dso-icon", { icon: "plus-circle" }), h("span", { class: "sr-only" }, "Aantal verhogen")))))));
116
+ return (h("div", { class: clsx(["dso-button-group", { "dso-disabled": this.disabled }]) }, h("div", { class: clsx(["dso-list-button", { "dso-selected": selected, "dso-single-count": this.count === 1 }]), onClick: (e) => this.handleSelectClick(e) }, h("div", { class: "dso-selectable" }, h("input", { id: "dso-list-button-checkbox", type: "checkbox", value: "list-button", name: "naam", "aria-describedby": [this.sublabel && "sublabel", this.subcontentSlot && "description"].filter((s) => !!s).join(" ") || null, checked: selected, disabled: this.disabled }), h("label", { htmlFor: "dso-list-button-checkbox" }, this.label), this.subcontentSlot && (h("div", { class: "sr-only", id: "description" }, this.subcontentPrefix && this.subcontentPrefix + ":", h("div", { innerHTML: this.subcontentSlot.innerHTML })))), this.sublabel && (h("span", { class: "dso-sublabel", id: "sublabel" }, this.sublabel)), h("slot", { name: "subcontent" })), this.count !== undefined && this.count > 0 && (h("div", { class: "dso-input-number" }, this.manualCount === undefined && this.count > 1 && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.min) || this.disabled, onClick: (e) => this.stepValue(e, "decrement") }, h("dso-icon", { icon: "minus-circle" }), h("span", { class: "sr-only" }, "Aantal verlagen"))), h("div", { class: "dso-input-wrapper" }, this.manualCount === undefined && this.count > 1 && (h("input", { class: "dso-input-step-counter", type: "number", tabIndex: -1, "aria-label": "Aantal", value: this.count, readOnly: true })), h("form", { onSubmit: (e) => this.setCount(e) }, h("div", { ref: (element) => (this.manualInputWrapperElement = element) }, h("input", { class: clsx("form-control", { hidden: showButtonInputs }), type: "number", "aria-label": "Aantal", value: this.manualCount, min: this.min, max: this.max, onInput: (e) => this.handleOnChange(e) })), this.manual && (h("button", { class: clsx("dso-manual-input-button", { "sr-only": !showButtonInputs }), type: !showButtonInputs ? "submit" : "button", disabled: this.disabled, onClick: () => showButtonInputs && this.startManualCountInput() }, showButtonInputs ? (h("span", { class: "sr-only" }, "Handmatig aantal invullen")) : (h("span", { class: "sr-only" }, "Zet waarde")))))), showButtonInputs && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.max) || this.disabled, onClick: (e) => this.stepValue(e, "increment") }, h("dso-icon", { icon: "plus-circle" }), h("span", { class: "sr-only" }, "Aantal verhogen")))))));
104
117
  }
105
118
  static get is() { return "dso-list-button"; }
106
119
  static get encapsulation() { return "shadow"; }
@@ -237,6 +250,23 @@ export class ListButton {
237
250
  "reflect": true,
238
251
  "defaultValue": "false"
239
252
  },
253
+ "subcontentPrefix": {
254
+ "type": "string",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "string",
258
+ "resolved": "string | undefined",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": true,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": "Prefix to subcontent for the purpose of screenreading."
266
+ },
267
+ "attribute": "subcontent-prefix",
268
+ "reflect": false
269
+ },
240
270
  "manual": {
241
271
  "type": "boolean",
242
272
  "mutable": false,
@@ -308,6 +338,7 @@ export class ListButton {
308
338
  }
309
339
  }];
310
340
  }
341
+ static get elementRef() { return "host"; }
311
342
  static get watchers() {
312
343
  return [{
313
344
  "propName": "manual",
@@ -1 +1 @@
1
- {"version":3,"file":"list-button.js","sourceRoot":"","sources":["../../../../src/components/list-button/list-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,UAAU;;;;;;;;;mBA6CX,KAAK;oBAMJ,KAAK;kBAQP,IAAI;;EAiBb,mBAAmB;IACjB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE;MACpC,IAAI,CAA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;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Prop, Event, EventEmitter, State, Watch } from \"@stencil/core\";\r\nimport { ListButtonChangeEvent, ListButtonSelectedEvent } from \"./list-button.interfaces\";\r\n\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-list-button\",\r\n shadow: true,\r\n styleUrl: \"list-button.scss\",\r\n})\r\nexport class ListButton implements ComponentInterface {\r\n private trap?: FocusTrap;\r\n\r\n @State()\r\n private manualInputWrapperElement?: HTMLDivElement;\r\n\r\n private manualInputButtonElement?: HTMLButtonElement;\r\n\r\n @State()\r\n manualCount?: number;\r\n\r\n /**\r\n * The label of the List Button.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The sublabel of the List Button.\r\n */\r\n @Prop()\r\n sublabel?: string;\r\n\r\n /**\r\n * When defined the count can show on the List Button.\r\n */\r\n @Prop()\r\n count?: number;\r\n\r\n /**\r\n * The minimum value.\r\n */\r\n @Prop()\r\n min?: string | number;\r\n\r\n /**\r\n * The maximum value.\r\n */\r\n @Prop()\r\n max?: string | number;\r\n\r\n /**\r\n * Whether the List Button is checked.\r\n */\r\n @Prop({ reflect: true })\r\n checked = false;\r\n\r\n /**\r\n * Whether the List Button is disabled.\r\n */\r\n @Prop({ reflect: true })\r\n disabled = false;\r\n\r\n /**\r\n * Allow user to directly input a value.\r\n *\r\n * Set to `false` to force users to use plus/minus buttons.\r\n */\r\n @Prop()\r\n manual = true;\r\n\r\n /**\r\n * Emitted when the user changes the count.\r\n */\r\n @Event()\r\n dsoCountChange!: EventEmitter<ListButtonChangeEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the List Button itself.\r\n *\r\n * Does not fire when the user activates the count controls.\r\n */\r\n @Event()\r\n dsoSelectedChange!: EventEmitter<ListButtonSelectedEvent>;\r\n\r\n @Watch(\"manual\")\r\n watchManualCallback() {\r\n if (!this.manual && this.manualCount) {\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {\r\n this.trap = createFocusTrap(this.manualInputWrapperElement, {\r\n escapeDeactivates: true,\r\n setReturnFocus: false,\r\n\r\n clickOutsideDeactivates: (e) => {\r\n this.setCount(e);\r\n\r\n return true;\r\n },\r\n onDeactivate: () => this.stopManualCountInput(),\r\n onPostDeactivate: () => this.manualInputButtonElement?.focus(),\r\n }).activate();\r\n } else if (this.manualCount === undefined && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.trap?.deactivate();\r\n }\r\n\r\n private handleOnChange({ target }: Event): void {\r\n if (target instanceof HTMLInputElement) {\r\n this.manualCount = target.valueAsNumber;\r\n }\r\n }\r\n\r\n private stepValue(e: Event, direction: \"increment\" | \"decrement\"): void {\r\n if (typeof this.count === \"number\") {\r\n const newValue = direction === \"increment\" ? this.count + 1 : this.count - 1;\r\n\r\n if (this.isNewCountValid(newValue) === false) {\r\n return;\r\n }\r\n\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: newValue,\r\n });\r\n }\r\n }\r\n\r\n private setCount(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (typeof this.manualCount === \"number\" && this.isNewCountValid(this.manualCount)) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.manualCount,\r\n });\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n private handleSelectClick(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (this.count !== undefined) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.count > 0 ? 0 : 1,\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.dsoSelectedChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n private startManualCountInput(): void {\r\n this.manualCount = this.count;\r\n }\r\n\r\n private stopManualCountInput(): void {\r\n this.manualCount = undefined;\r\n }\r\n\r\n private isNewCountValid(newValue: number): boolean {\r\n if (\r\n this.min !== undefined &&\r\n this.max !== undefined &&\r\n (newValue < Number(this.min) || newValue > Number(this.max))\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n render() {\r\n const showButtonInputs = this.manualCount === undefined;\r\n\r\n const selected = this.checked || (this.count !== undefined && this.count > 0);\r\n\r\n return (\r\n <div class={clsx([\"dso-button-group\", { \"dso-disabled\": this.disabled }])}>\r\n <div\r\n class={clsx([\"dso-list-button\", { \"dso-selected\": selected, \"dso-single-count\": this.count === 1 }])}\r\n onClick={(e) => this.handleSelectClick(e)}\r\n >\r\n <div class=\"dso-selectable\">\r\n <input\r\n id=\"dso-list-button-checkbox\"\r\n type=\"checkbox\"\r\n value=\"list-button\"\r\n name=\"naam\"\r\n checked={selected}\r\n disabled={this.disabled}\r\n aria-label={this.label}\r\n />\r\n <label htmlFor=\"dso-list-button-checkbox\">{this.label}</label>\r\n </div>\r\n {this.sublabel && <span class=\"dso-sublabel\">{this.sublabel}</span>}\r\n <slot name=\"subcontent\" />\r\n </div>\r\n\r\n {this.count !== undefined && this.count > 0 && (\r\n <div class=\"dso-input-number\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.min) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"decrement\")}\r\n >\r\n <dso-icon icon=\"minus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verlagen</span>\r\n </button>\r\n )}\r\n\r\n <div class=\"dso-input-wrapper\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <input\r\n class=\"dso-input-step-counter\"\r\n type=\"number\"\r\n tabIndex={-1}\r\n aria-label=\"Aantal\"\r\n value={this.count}\r\n readOnly\r\n />\r\n )}\r\n\r\n <form onSubmit={(e) => this.setCount(e)}>\r\n <div ref={(element) => (this.manualInputWrapperElement = element)}>\r\n <input\r\n class={clsx(\"form-control\", { hidden: showButtonInputs })}\r\n type=\"number\"\r\n aria-label=\"Aantal\"\r\n value={this.manualCount}\r\n min={this.min}\r\n max={this.max}\r\n onInput={(e) => this.handleOnChange(e)}\r\n />\r\n </div>\r\n\r\n {this.manual === true && (\r\n <button\r\n class={clsx(\"dso-manual-input-button\", { \"sr-only\": !showButtonInputs })}\r\n type={!showButtonInputs ? \"submit\" : \"button\"}\r\n disabled={this.disabled}\r\n onClick={() => showButtonInputs && this.startManualCountInput()}\r\n >\r\n {showButtonInputs ? (\r\n <span class=\"sr-only\">Handmatig aantal invullen</span>\r\n ) : (\r\n <span class=\"sr-only\">Zet waarde</span>\r\n )}\r\n </button>\r\n )}\r\n </form>\r\n </div>\r\n\r\n {showButtonInputs && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.max) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"increment\")}\r\n >\r\n <dso-icon icon=\"plus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verhogen</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"list-button.js","sourceRoot":"","sources":["../../../../src/components/list-button/list-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,WAAW,GACZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,UAAU;;;;;;;;;mBAsDX,KAAK;oBAMJ,KAAK;;kBAcP,IAAI;;EAlEb,IAAY,cAAc;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAc,qBAAqB,CAAC,CAAC;EACrE,CAAC;EAiFD,mBAAmB;IACjB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BAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAC7C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,IAE9D,gBAAgB,CAAC,CAAC,CAAC,CAClB,YAAM,KAAK,EAAC,SAAS,gCAAiC,CACvD,CAAC,CAAC,CAAC,CACF,YAAM,KAAK,EAAC,SAAS,iBAAkB,CACxC,CACM,CACV,CACI,CACH;QAEL,gBAAgB,IAAI,CACnB,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,cAAc,EACpB,QAAQ,EAAE,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,EAC1D,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC;UAE9C,gBAAU,IAAI,EAAC,aAAa,GAAY;UACxC,YAAM,KAAK,EAAC,SAAS,sBAAuB,CACrC,CACV,CACG,CACP,CACG,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n h,\r\n Prop,\r\n Event,\r\n EventEmitter,\r\n State,\r\n Watch,\r\n forceUpdate,\r\n} from \"@stencil/core\";\r\nimport { ListButtonChangeEvent, ListButtonSelectedEvent } from \"./list-button.interfaces\";\r\n\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-list-button\",\r\n shadow: true,\r\n styleUrl: \"list-button.scss\",\r\n})\r\nexport class ListButton implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoListButtonElement;\r\n\r\n private trap?: FocusTrap;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n private get subcontentSlot() {\r\n return this.host.querySelector<HTMLElement>(\"[slot='subcontent']\");\r\n }\r\n\r\n @State()\r\n private manualInputWrapperElement?: HTMLDivElement;\r\n\r\n private manualInputButtonElement?: HTMLButtonElement;\r\n\r\n @State()\r\n manualCount?: number;\r\n\r\n /**\r\n * The label of the List Button.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The sublabel of the List Button.\r\n */\r\n @Prop()\r\n sublabel?: string;\r\n\r\n /**\r\n * When defined the count can show on the List Button.\r\n */\r\n @Prop()\r\n count?: number;\r\n\r\n /**\r\n * The minimum value.\r\n */\r\n @Prop()\r\n min?: string | number;\r\n\r\n /**\r\n * The maximum value.\r\n */\r\n @Prop()\r\n max?: string | number;\r\n\r\n /**\r\n * Whether the List Button is checked.\r\n */\r\n @Prop({ reflect: true })\r\n checked = false;\r\n\r\n /**\r\n * Whether the List Button is disabled.\r\n */\r\n @Prop({ reflect: true })\r\n disabled = false;\r\n\r\n /**\r\n * Prefix to subcontent for the purpose of screenreading.\r\n */\r\n @Prop()\r\n subcontentPrefix?: string;\r\n\r\n /**\r\n * Allow user to directly input a value.\r\n *\r\n * Set to `false` to force users to use plus/minus buttons.\r\n */\r\n @Prop()\r\n manual = true;\r\n\r\n /**\r\n * Emitted when the user changes the count.\r\n */\r\n @Event()\r\n dsoCountChange!: EventEmitter<ListButtonChangeEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the List Button itself.\r\n *\r\n * Does not fire when the user activates the count controls.\r\n */\r\n @Event()\r\n dsoSelectedChange!: EventEmitter<ListButtonSelectedEvent>;\r\n\r\n @Watch(\"manual\")\r\n watchManualCallback() {\r\n if (!this.manual && this.manualCount) {\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {\r\n this.trap = createFocusTrap(this.manualInputWrapperElement, {\r\n escapeDeactivates: true,\r\n setReturnFocus: false,\r\n\r\n clickOutsideDeactivates: (e) => {\r\n this.setCount(e);\r\n\r\n return true;\r\n },\r\n onDeactivate: () => this.stopManualCountInput(),\r\n onPostDeactivate: () => this.manualInputButtonElement?.focus(),\r\n }).activate();\r\n } else if (this.manualCount === undefined && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n\r\n this.subcontentSlot?.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.trap?.deactivate();\r\n\r\n this.mutationObserver?.disconnect();\r\n delete this.mutationObserver;\r\n }\r\n\r\n private handleOnChange({ target }: Event): void {\r\n if (target instanceof HTMLInputElement) {\r\n this.manualCount = target.valueAsNumber;\r\n }\r\n }\r\n\r\n private stepValue(e: Event, direction: \"increment\" | \"decrement\"): void {\r\n if (typeof this.count === \"number\") {\r\n const newValue = direction === \"increment\" ? this.count + 1 : this.count - 1;\r\n\r\n if (!this.isNewCountValid(newValue)) {\r\n return;\r\n }\r\n\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: newValue,\r\n });\r\n }\r\n }\r\n\r\n private setCount(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (typeof this.manualCount === \"number\" && this.isNewCountValid(this.manualCount)) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.manualCount,\r\n });\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n private handleSelectClick(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (this.count !== undefined) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.count > 0 ? 0 : 1,\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.dsoSelectedChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n private startManualCountInput(): void {\r\n this.manualCount = this.count;\r\n }\r\n\r\n private stopManualCountInput(): void {\r\n this.manualCount = undefined;\r\n }\r\n\r\n private isNewCountValid(newValue: number): boolean {\r\n return !(\r\n this.min !== undefined &&\r\n this.max !== undefined &&\r\n (newValue < Number(this.min) || newValue > Number(this.max))\r\n );\r\n }\r\n\r\n render() {\r\n const showButtonInputs = this.manualCount === undefined;\r\n\r\n const selected = this.checked || (this.count !== undefined && this.count > 0);\r\n\r\n return (\r\n <div class={clsx([\"dso-button-group\", { \"dso-disabled\": this.disabled }])}>\r\n <div\r\n class={clsx([\"dso-list-button\", { \"dso-selected\": selected, \"dso-single-count\": this.count === 1 }])}\r\n onClick={(e) => this.handleSelectClick(e)}\r\n >\r\n <div class=\"dso-selectable\">\r\n <input\r\n id=\"dso-list-button-checkbox\"\r\n type=\"checkbox\"\r\n value=\"list-button\"\r\n name=\"naam\"\r\n aria-describedby={\r\n [this.sublabel && \"sublabel\", this.subcontentSlot && \"description\"].filter((s) => !!s).join(\" \") || null\r\n }\r\n checked={selected}\r\n disabled={this.disabled}\r\n />\r\n <label htmlFor=\"dso-list-button-checkbox\">{this.label}</label>\r\n {this.subcontentSlot && (\r\n <div class=\"sr-only\" id=\"description\">\r\n {this.subcontentPrefix && this.subcontentPrefix + \":\"}\r\n <div innerHTML={this.subcontentSlot.innerHTML}></div>\r\n </div>\r\n )}\r\n </div>\r\n {this.sublabel && (\r\n <span class=\"dso-sublabel\" id=\"sublabel\">\r\n {this.sublabel}\r\n </span>\r\n )}\r\n <slot name=\"subcontent\" />\r\n </div>\r\n\r\n {this.count !== undefined && this.count > 0 && (\r\n <div class=\"dso-input-number\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.min) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"decrement\")}\r\n >\r\n <dso-icon icon=\"minus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verlagen</span>\r\n </button>\r\n )}\r\n\r\n <div class=\"dso-input-wrapper\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <input\r\n class=\"dso-input-step-counter\"\r\n type=\"number\"\r\n tabIndex={-1}\r\n aria-label=\"Aantal\"\r\n value={this.count}\r\n readOnly\r\n />\r\n )}\r\n\r\n <form onSubmit={(e) => this.setCount(e)}>\r\n <div ref={(element) => (this.manualInputWrapperElement = element)}>\r\n <input\r\n class={clsx(\"form-control\", { hidden: showButtonInputs })}\r\n type=\"number\"\r\n aria-label=\"Aantal\"\r\n value={this.manualCount}\r\n min={this.min}\r\n max={this.max}\r\n onInput={(e) => this.handleOnChange(e)}\r\n />\r\n </div>\r\n\r\n {this.manual && (\r\n <button\r\n class={clsx(\"dso-manual-input-button\", { \"sr-only\": !showButtonInputs })}\r\n type={!showButtonInputs ? \"submit\" : \"button\"}\r\n disabled={this.disabled}\r\n onClick={() => showButtonInputs && this.startManualCountInput()}\r\n >\r\n {showButtonInputs ? (\r\n <span class=\"sr-only\">Handmatig aantal invullen</span>\r\n ) : (\r\n <span class=\"sr-only\">Zet waarde</span>\r\n )}\r\n </button>\r\n )}\r\n </form>\r\n </div>\r\n\r\n {showButtonInputs && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.max) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"increment\")}\r\n >\r\n <dso-icon icon=\"plus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verhogen</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- @keyframes slideInFromTop {
1
+ @keyframes ModalFadeIn {
2
2
  0% {
3
3
  opacity: 0;
4
4
  }
@@ -97,7 +97,7 @@ button::-moz-focus-inner {
97
97
  background-color: #fff;
98
98
  opacity: 1;
99
99
  box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
100
- animation: 1s ease-out 0s 1 slideInFromTop;
100
+ animation: 200ms ease-out 0s 1 ModalFadeIn;
101
101
  }
102
102
  .dso-modal .dso-header {
103
103
  position: relative;
@@ -14,7 +14,9 @@ export class Modal {
14
14
  }
15
15
  componentDidLoad() {
16
16
  var _a;
17
- (_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.showModal();
17
+ if ((_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.isConnected) {
18
+ this.htmlDialogElement.showModal();
19
+ }
18
20
  document.body.classList.add("dso-modal-open");
19
21
  }
20
22
  disconnectedCallback() {
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAS1B,MAAM,OAAO,KAAK;;kBAOP,EAAE,EAAE;;;;gBAqBS,QAAQ;2BAQZ,IAAI;;EAQtB,iBAAiB;IACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;EACvE,CAAC;EAED,gBAAgB;;IACd,MAAA,IAAI,CAAC,iBAAiB,0CAAE,SAAS,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;EAChD,CAAC;EAED,oBAAoB;;IAClB,QAAQ,CAAC,IAAI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CAChB,CACS;QAEhB,IAAI,CAAC,SAAS,IAAI,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,CACC,CACV,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n @State()\r\n hasFooter?: boolean;\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n role: string | null = \"dialog\";\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n componentWillLoad(): void {\r\n this.hasFooter = this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.htmlDialogElement?.showModal();\r\n document.body.classList.add(\"dso-modal-open\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n document.body.classList.remove(\"dso-modal-open\");\r\n this.htmlDialogElement?.close();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.role ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n Dialoog\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAS1B,MAAM,OAAO,KAAK;;kBAOP,EAAE,EAAE;;;;gBAqBS,QAAQ;2BAQZ,IAAI;;EAQtB,iBAAiB;IACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAA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EAAE,CAAC;YAC9F,gBAAU,IAAI,EAAC,OAAO,GAAY;YAClC,YAAM,KAAK,EAAC,SAAS,cAAe,CAC7B,CACV,CACG,CACP,CAAC,CAAC,CAAC,CACF,YAAM,KAAK,EAAC,SAAS,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,cAE9B,CACR;QAED;UACE,WAAK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC;YAC/B,YAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACS;QAEhB,IAAI,CAAC,SAAS,IAAI,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,CACC,CACV,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n @State()\r\n hasFooter?: boolean;\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n role: string | null = \"dialog\";\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n componentWillLoad(): void {\r\n this.hasFooter = this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n this.htmlDialogElement.showModal();\r\n }\r\n\r\n document.body.classList.add(\"dso-modal-open\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n document.body.classList.remove(\"dso-modal-open\");\r\n this.htmlDialogElement?.close();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.role ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n Dialoog\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"]}
@@ -685,7 +685,7 @@ sup {
685
685
  sup a {
686
686
  text-decoration: none;
687
687
  }
688
- sup a:hover, sup a:focus, sup a:active {
688
+ sup a:hover, sup a:focus-visible, sup a:active {
689
689
  text-decoration: underline;
690
690
  }
691
691
 
@@ -699,7 +699,7 @@ sub {
699
699
  sub a {
700
700
  text-decoration: none;
701
701
  }
702
- sub a:hover, sub a:focus, sub a:active {
702
+ sub a:hover, sub a:focus-visible, sub a:active {
703
703
  text-decoration: underline;
704
704
  }
705
705
 
@@ -1203,7 +1203,7 @@ a {
1203
1203
  color: var(--link-color);
1204
1204
  text-decoration: underline;
1205
1205
  }
1206
- a:hover, a:focus {
1206
+ a:hover, a:focus-visible {
1207
1207
  color: var(--link-hover-color);
1208
1208
  text-decoration: underline;
1209
1209
  }
@@ -1307,45 +1307,109 @@ a:visited {
1307
1307
  p.wijzigactie-voegtoe,
1308
1308
  span[role=paragraph].wijzigactie-voegtoe,
1309
1309
  table.wijzigactie-voegtoe {
1310
+ --link-color: currentColor;
1311
+ --link-hover-color: currentColor;
1312
+ --link-visited-color: currentColor;
1310
1313
  background-color: #e4f1d4;
1314
+ border-color: #e4f1d4;
1315
+ color: #191919;
1311
1316
  box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.25);
1312
- color: #000;
1313
1317
  }
1314
- p.wijzigactie-voegtoe a,
1315
- span[role=paragraph].wijzigactie-voegtoe a,
1316
- table.wijzigactie-voegtoe a {
1317
- color: #000;
1318
+ p.wijzigactie-voegtoe a:is(.download, .download:hover, .download:focus-visible),
1319
+ span[role=paragraph].wijzigactie-voegtoe a:is(.download, .download:hover, .download:focus-visible),
1320
+ table.wijzigactie-voegtoe a:is(.download, .download:hover, .download:focus-visible) {
1321
+ background-image: url("./dso-icons.svg#img-download-zwart");
1322
+ }
1323
+ p.wijzigactie-voegtoe a:is(.extern, .extern:hover, .extern:focus-visible),
1324
+ span[role=paragraph].wijzigactie-voegtoe a:is(.extern, .extern:hover, .extern:focus-visible),
1325
+ table.wijzigactie-voegtoe a:is(.extern, .extern:hover, .extern:focus-visible) {
1326
+ background-image: url("./dso-icons.svg#img-external-link-zwart");
1327
+ }
1328
+ p.wijzigactie-voegtoe a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible),
1329
+ span[role=paragraph].wijzigactie-voegtoe a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible),
1330
+ table.wijzigactie-voegtoe a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible) {
1331
+ background-image: url("./dso-icons.svg#img-call-zwart");
1332
+ }
1333
+ p.wijzigactie-voegtoe a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible),
1334
+ span[role=paragraph].wijzigactie-voegtoe a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible),
1335
+ table.wijzigactie-voegtoe a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible) {
1336
+ background-image: url("./dso-icons.svg#img-email-zwart");
1318
1337
  }
1319
1338
  p.wijzigactie-verwijder,
1320
1339
  span[role=paragraph].wijzigactie-verwijder,
1321
1340
  table.wijzigactie-verwijder {
1341
+ --link-color: currentColor;
1342
+ --link-hover-color: currentColor;
1343
+ --link-visited-color: currentColor;
1322
1344
  background-color: #f5d8dc;
1323
- color: #000;
1345
+ border-color: #f5d8dc;
1346
+ color: #191919;
1324
1347
  text-decoration: line-through;
1325
1348
  }
1326
- p.wijzigactie-verwijder a,
1327
- span[role=paragraph].wijzigactie-verwijder a,
1328
- table.wijzigactie-verwijder a {
1329
- color: #000;
1349
+ p.wijzigactie-verwijder a:is(.download, .download:hover, .download:focus-visible),
1350
+ span[role=paragraph].wijzigactie-verwijder a:is(.download, .download:hover, .download:focus-visible),
1351
+ table.wijzigactie-verwijder a:is(.download, .download:hover, .download:focus-visible) {
1352
+ background-image: url("./dso-icons.svg#img-download-zwart");
1353
+ }
1354
+ p.wijzigactie-verwijder a:is(.extern, .extern:hover, .extern:focus-visible),
1355
+ span[role=paragraph].wijzigactie-verwijder a:is(.extern, .extern:hover, .extern:focus-visible),
1356
+ table.wijzigactie-verwijder a:is(.extern, .extern:hover, .extern:focus-visible) {
1357
+ background-image: url("./dso-icons.svg#img-external-link-zwart");
1358
+ }
1359
+ p.wijzigactie-verwijder a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible),
1360
+ span[role=paragraph].wijzigactie-verwijder a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible),
1361
+ table.wijzigactie-verwijder a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible) {
1362
+ background-image: url("./dso-icons.svg#img-call-zwart");
1363
+ }
1364
+ p.wijzigactie-verwijder a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible),
1365
+ span[role=paragraph].wijzigactie-verwijder a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible),
1366
+ table.wijzigactie-verwijder a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible) {
1367
+ background-image: url("./dso-icons.svg#img-email-zwart");
1330
1368
  }
1331
1369
 
1332
1370
  ins.nieuwe-tekst {
1333
1371
  text-decoration: none;
1372
+ --link-color: currentColor;
1373
+ --link-hover-color: currentColor;
1374
+ --link-visited-color: currentColor;
1334
1375
  background-color: #e4f1d4;
1376
+ border-color: #e4f1d4;
1377
+ color: #191919;
1335
1378
  box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.25);
1336
- color: #000;
1337
1379
  }
1338
- ins.nieuwe-tekst a {
1339
- color: #000;
1380
+ ins.nieuwe-tekst a:is(.download, .download:hover, .download:focus-visible) {
1381
+ background-image: url("./dso-icons.svg#img-download-zwart");
1382
+ }
1383
+ ins.nieuwe-tekst a:is(.extern, .extern:hover, .extern:focus-visible) {
1384
+ background-image: url("./dso-icons.svg#img-external-link-zwart");
1385
+ }
1386
+ ins.nieuwe-tekst a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible) {
1387
+ background-image: url("./dso-icons.svg#img-call-zwart");
1388
+ }
1389
+ ins.nieuwe-tekst a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible) {
1390
+ background-image: url("./dso-icons.svg#img-email-zwart");
1340
1391
  }
1341
1392
 
1342
1393
  del.verwijderde-tekst {
1394
+ --link-color: currentColor;
1395
+ --link-hover-color: currentColor;
1396
+ --link-visited-color: currentColor;
1343
1397
  background-color: #f5d8dc;
1344
- color: #000;
1398
+ border-color: #f5d8dc;
1399
+ color: #191919;
1345
1400
  text-decoration: line-through;
1346
1401
  }
1347
- del.verwijderde-tekst a {
1348
- color: #000;
1402
+ del.verwijderde-tekst a:is(.download, .download:hover, .download:focus-visible) {
1403
+ background-image: url("./dso-icons.svg#img-download-zwart");
1404
+ }
1405
+ del.verwijderde-tekst a:is(.extern, .extern:hover, .extern:focus-visible) {
1406
+ background-image: url("./dso-icons.svg#img-external-link-zwart");
1407
+ }
1408
+ del.verwijderde-tekst a:is([href^="tel:"], [href^="tel:"]:hover, [href^="tel:"]:focus-visible) {
1409
+ background-image: url("./dso-icons.svg#img-call-zwart");
1410
+ }
1411
+ del.verwijderde-tekst a:is([href^="mailto:"], [href^="mailto:"]:hover, [href^="mailto:"]:focus-visible) {
1412
+ background-image: url("./dso-icons.svg#img-email-zwart");
1349
1413
  }
1350
1414
 
1351
1415
  .dso-rich-content p {
@@ -666,7 +666,7 @@ a.dso-tertiary, a.dso-tertiary:visited {
666
666
  margin-left: 16px;
667
667
  }
668
668
 
669
- @keyframes slideInFromTop {
669
+ @keyframes ModalFadeIn {
670
670
  0% {
671
671
  opacity: 0;
672
672
  }
@@ -708,7 +708,7 @@ a.dso-tertiary, a.dso-tertiary:visited {
708
708
  background-color: #fff;
709
709
  opacity: 1;
710
710
  box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
711
- animation: 1s ease-out 0s 1 slideInFromTop;
711
+ animation: 200ms ease-out 0s 1 ModalFadeIn;
712
712
  }
713
713
  :host .dso-modal .dso-header {
714
714
  position: relative;
@@ -931,9 +931,9 @@ button::-moz-focus-inner {
931
931
  margin-top: 8px;
932
932
  padding: 8px 16px 7px;
933
933
  }
934
- .dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus, .dso-nav.dso-nav-main > li > a:active,
934
+ .dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus-visible, .dso-nav.dso-nav-main > li > a:active,
935
935
  .dso-nav.dso-nav-main > li > button:hover,
936
- .dso-nav.dso-nav-main > li > button:focus,
936
+ .dso-nav.dso-nav-main > li > button:focus-visible,
937
937
  .dso-nav.dso-nav-main > li > button:active {
938
938
  text-decoration: underline;
939
939
  }
@@ -947,9 +947,9 @@ button::-moz-focus-inner {
947
947
  margin-top: 4px;
948
948
  padding: 4px 8px 3px;
949
949
  }
950
- .dso-nav.dso-nav-sub > li > a:hover, .dso-nav.dso-nav-sub > li > a:focus, .dso-nav.dso-nav-sub > li > a:active,
950
+ .dso-nav.dso-nav-sub > li > a:hover, .dso-nav.dso-nav-sub > li > a:focus-visible, .dso-nav.dso-nav-sub > li > a:active,
951
951
  .dso-nav.dso-nav-sub > li > button:hover,
952
- .dso-nav.dso-nav-sub > li > button:focus,
952
+ .dso-nav.dso-nav-sub > li > button:focus-visible,
953
953
  .dso-nav.dso-nav-sub > li > button:active {
954
954
  text-decoration: underline;
955
955
  }
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
2
2
  import { c as clsx } from './clsx.js';
3
3
  import { d as defineCustomElement$1 } from './icon.js';
4
4
 
5
- const alertCss = ":host{display:block}:host(:not(:first-child)){margin-top:24px}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.alert{border:1px solid transparent;line-height:1.5;margin-bottom:24px;min-height:64px;position:relative}@media screen and (min-width: 481px){.alert{padding:19px 16px 19px 63px}}@media screen and (max-width: 480px){.alert{padding:63px 16px 16px}}.alert:not(:first-child){margin-top:24px}.alert.alert-success{color:#000;background-color:#e4f1d4;border-color:#e4f1d4}.alert.alert-error{color:#000;background-color:#f5d8dc;border-color:#f5d8dc}.alert.alert-warning{color:#000;background-color:#f8f6cc;border-color:#f8f6cc}.alert.alert-info{color:#000;background-color:#e1ecf7;border-color:#e1ecf7}.alert dso-icon{left:15px;position:absolute;top:15px;height:32px;width:32px}";
5
+ const alertCss = ":host{display:block}:host(:not(:first-child)){margin-top:24px}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.alert{border:1px solid transparent;line-height:1.5;margin-bottom:24px;min-height:64px;position:relative}@media screen and (min-width: 481px){.alert{padding:19px 16px 19px 63px}}@media screen and (max-width: 480px){.alert{padding:63px 16px 16px}}.alert:not(:first-child){margin-top:24px}.alert dso-icon{left:15px;position:absolute;top:15px;height:32px;width:32px}";
6
6
 
7
7
  const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
8
8
  constructor() {
@@ -1 +1 @@
1
- {"file":"alert.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,83BAA83B;;MCQl4B,KAAK;;;;;;;;EAoBhB,MAAM;IACJ,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,EAAE;MACX,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KAClD;IAED,QACE,WAAK,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,IAC3F,gBAAU,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC,MAAM,GAAa,EACpD,YAAM,KAAK,EAAC,SAAS,IAAE,MAAM,MAAS,EACtC,eAAa,CACT,EACN;GACH;;;;;;AApBc,eAAS,GAAG,IAAI,GAAG,CAAiB;EACjD,CAAC,SAAS,EAAE,QAAQ,CAAC;EACrB,CAAC,MAAM,EAAE,WAAW,CAAC;EACrB,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3B,CAAC,OAAO,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/alert/alert.scss?tag=dso-alert&encapsulation=shadow","src/components/alert/alert.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/alert\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n:host(:not(:first-child)) {\r\n margin-top: units.$u3;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.alert {\r\n @include alert.root();\r\n\r\n dso-icon {\r\n @include alert.icon-position();\r\n\r\n height: units.$u4;\r\n width: units.$u4;\r\n }\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-alert\",\r\n styleUrl: \"alert.scss\",\r\n shadow: true,\r\n})\r\nexport class Alert {\r\n /**\r\n * Set status of alert\r\n */\r\n @Prop()\r\n status!: \"success\" | \"info\" | \"warning\" | \"error\";\r\n\r\n /**\r\n * Whether or not to show the role attribute with value \"alert\". To control the tooltip add the `role-alert` attribute.\r\n */\r\n @Prop()\r\n roleAlert?: boolean;\r\n\r\n private static statusMap = new Map<string, string>([\r\n [\"success\", \"Gelukt\"],\r\n [\"info\", \"Opmerking\"],\r\n [\"warning\", \"Waarschuwing\"],\r\n [\"error\", \"Fout\"],\r\n ]);\r\n\r\n render() {\r\n const status = Alert.statusMap.get(this.status);\r\n if (!status) {\r\n throw new Error(`Invalid status ${this.status}`);\r\n }\r\n\r\n return (\r\n <div class={clsx(\"alert\", `alert-${this.status}`)} role={this.roleAlert ? \"alert\" : undefined}>\r\n <dso-icon icon={\"status-\" + this.status}></dso-icon>\r\n <span class=\"sr-only\">{status}:</span>\r\n <slot></slot>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"alert.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,2kBAA2kB;;MCQ/kB,KAAK;;;;;;;;EAoBhB,MAAM;IACJ,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,EAAE;MACX,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KAClD;IAED,QACE,WAAK,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,IAC3F,gBAAU,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC,MAAM,GAAa,EACpD,YAAM,KAAK,EAAC,SAAS,IAAE,MAAM,MAAS,EACtC,eAAa,CACT,EACN;GACH;;;;;;AApBc,eAAS,GAAG,IAAI,GAAG,CAAiB;EACjD,CAAC,SAAS,EAAE,QAAQ,CAAC;EACrB,CAAC,MAAM,EAAE,WAAW,CAAC;EACrB,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3B,CAAC,OAAO,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/alert/alert.scss?tag=dso-alert&encapsulation=shadow","src/components/alert/alert.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/alert\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n:host(:not(:first-child)) {\r\n margin-top: units.$u3;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.alert {\r\n @include alert.root();\r\n\r\n dso-icon {\r\n @include alert.icon-position();\r\n\r\n height: units.$u4;\r\n width: units.$u4;\r\n }\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-alert\",\r\n styleUrl: \"alert.scss\",\r\n shadow: true,\r\n})\r\nexport class Alert {\r\n /**\r\n * Set status of alert\r\n */\r\n @Prop()\r\n status!: \"success\" | \"info\" | \"warning\" | \"error\";\r\n\r\n /**\r\n * Whether or not to show the role attribute with value \"alert\". To control the tooltip add the `role-alert` attribute.\r\n */\r\n @Prop()\r\n roleAlert?: boolean;\r\n\r\n private static statusMap = new Map<string, string>([\r\n [\"success\", \"Gelukt\"],\r\n [\"info\", \"Opmerking\"],\r\n [\"warning\", \"Waarschuwing\"],\r\n [\"error\", \"Fout\"],\r\n ]);\r\n\r\n render() {\r\n const status = Alert.statusMap.get(this.status);\r\n if (!status) {\r\n throw new Error(`Invalid status ${this.status}`);\r\n }\r\n\r\n return (\r\n <div class={clsx(\"alert\", `alert-${this.status}`)} role={this.roleAlert ? \"alert\" : undefined}>\r\n <dso-icon icon={\"status-\" + this.status}></dso-icon>\r\n <span class=\"sr-only\">{status}:</span>\r\n <slot></slot>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -3,7 +3,7 @@ import { d as defineCustomElement$3 } from './expandable.js';
3
3
  import { d as defineCustomElement$2 } from './icon.js';
4
4
  import { d as defineCustomElement$1 } from './responsive-element.js';
5
5
 
6
- const annotationOutputCss = "*,*::after,*::before{box-sizing:border-box}dso-annotation-output{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-annotation-header{align-items:center;background-color:#f2f2f2;clear:both;display:flex;margin-bottom:2px;margin-top:8px;padding-left:16px;padding-right:8px;padding-top:8px;padding-bottom:8px}.dso-annotation-header>[slot=title]{color:#000;font-size:1.25rem;margin-bottom:0;margin-top:0}.dso-annotation-header>:nth-child(2){margin-left:auto}dso-responsive-element[small] .dso-annotation-header,dso-responsive-element[medium] .dso-annotation-header{display:grid;row-gap:8px}dso-responsive-element[small] .dso-annotation-header *[slot=title],dso-responsive-element[medium] .dso-annotation-header *[slot=title]{grid-row:1;grid-column:1}dso-responsive-element[small] .dso-annotation-header *[slot=addons],dso-responsive-element[medium] .dso-annotation-header *[slot=addons]{grid-row:2;grid-column:1;margin-left:initial}dso-responsive-element[small] .dso-annotation-header .dso-annotation-close-button,dso-responsive-element[medium] .dso-annotation-header .dso-annotation-close-button{grid-row:1;grid-column:2;margin-left:8px;text-align:end}.dso-annotation-content{background-color:#f2f2f2;padding-left:16px;padding-right:8px;padding-top:8px;padding-bottom:8px}.dso-annotation-close-button{margin-left:32px}.dso-annotation-prefix{font-style:italic}";
6
+ const annotationOutputCss = "*,*::after,*::before{box-sizing:border-box}dso-annotation-output{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-annotation-header{align-items:center;background-color:#f2f2f2;clear:both;display:flex;margin-bottom:2px;margin-top:8px;padding-left:16px;padding-right:8px;padding-top:8px;padding-bottom:8px}.dso-annotation-header>[slot=title]{color:#000;font-size:1.25rem;margin-bottom:0;margin-top:0}.dso-annotation-header>:nth-child(2){margin-left:auto}dso-responsive-element[small] .dso-annotation-header,dso-responsive-element[medium] .dso-annotation-header{display:grid;row-gap:8px}dso-responsive-element[small] .dso-annotation-header *[slot=title],dso-responsive-element[medium] .dso-annotation-header *[slot=title]{grid-row:1;grid-column:1}dso-responsive-element[small] .dso-annotation-header *[slot=addons],dso-responsive-element[medium] .dso-annotation-header *[slot=addons]{grid-row:2;grid-column:1;margin-left:initial}dso-responsive-element[small] .dso-annotation-header .dso-annotation-close-button,dso-responsive-element[medium] .dso-annotation-header .dso-annotation-close-button{grid-row:1;grid-column:2;margin-left:8px;text-align:end}.dso-annotation-content{--link-color:currentColor;--link-hover-color:currentColor;--link-visited-color:currentColor;background-color:#f2f2f2;border-color:#f2f2f2;color:#191919;padding-left:16px;padding-right:8px;padding-top:8px;padding-bottom:8px}.dso-annotation-content a:is(.download,.download:hover,.download:focus-visible){background-image:url(\"./dso-icons.svg#img-download-zwart\")}.dso-annotation-content a:is(.extern,.extern:hover,.extern:focus-visible){background-image:url(\"./dso-icons.svg#img-external-link-zwart\")}.dso-annotation-content a:is([href^=\"tel:\"],[href^=\"tel:\"]:hover,[href^=\"tel:\"]:focus-visible){background-image:url(\"./dso-icons.svg#img-call-zwart\")}.dso-annotation-content a:is([href^=\"mailto:\"],[href^=\"mailto:\"]:hover,[href^=\"mailto:\"]:focus-visible){background-image:url(\"./dso-icons.svg#img-email-zwart\")}.dso-annotation-close-button{margin-left:32px}.dso-annotation-prefix{font-style:italic}";
7
7
 
8
8
  const AnnotationOutput = /*@__PURE__*/ proxyCustomElement(class AnnotationOutput extends HTMLElement {
9
9
  constructor() {
@@ -1 +1 @@
1
- {"file":"annotation-output.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,m6CAAm6C;;MCWl7C,gBAAgB;;;;;IAyBnB,kBAAa,GAAG,CAAC,CAAa;MACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;KAC1C,CAAC;;;gBAVK,KAAK;;EAYZ,MAAM;IACJ,QACE,kCACE,sBAAgB,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IACjD,IAAI,CAAC,gBAAgB,IAAI,YAAM,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,EAC5F,WAAK,KAAK,EAAC,uBAAuB,IAChC,YAAM,IAAI,EAAC,OAAO,GAAG,EACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,EACtB,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,0CAA0C,EAAC,OAAO,EAAE,IAAI,CAAC,aAAa,IAChG,gBAAU,IAAI,EAAC,OAAO,GAAY,EAClC,YAAM,KAAK,EAAC,SAAS,0BAA2B,CACzC,CACL,EACN,WAAK,KAAK,EAAC,wBAAwB,IACjC,eAAQ,CACJ,CACS,CACM,EACzB;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/annotation-output/annotation-output.scss?tag=dso-annotation-output","src/components/annotation-output/annotation-output.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n\r\n@include utilities.box-sizing();\r\n\r\ndso-annotation-output {\r\n display: block;\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-annotation-header {\r\n align-items: center;\r\n background-color: colors.$grijs-5;\r\n clear: both;\r\n display: flex;\r\n margin-bottom: 2px;\r\n margin-top: units.$u1;\r\n padding-left: units.$u2;\r\n padding-right: units.$u1;\r\n padding-top: units.$u1;\r\n padding-bottom: units.$u1;\r\n\r\n > [slot=\"title\"] {\r\n color: colors.$zwart;\r\n font-size: 1.25rem;\r\n margin-bottom: 0;\r\n margin-top: 0;\r\n }\r\n\r\n > :nth-child(2) {\r\n margin-left: auto;\r\n }\r\n}\r\n\r\ndso-responsive-element[small],\r\ndso-responsive-element[medium] {\r\n .dso-annotation-header {\r\n display: grid;\r\n row-gap: units.$u1;\r\n\r\n *[slot=\"title\"] {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n *[slot=\"addons\"] {\r\n grid-row: 2;\r\n grid-column: 1;\r\n margin-left: initial;\r\n }\r\n\r\n .dso-annotation-close-button {\r\n grid-row: 1;\r\n grid-column: 2;\r\n margin-left: units.$u1;\r\n text-align: end;\r\n }\r\n }\r\n}\r\n\r\n.dso-annotation-content {\r\n background-color: colors.$grijs-5;\r\n padding-left: units.$u2;\r\n padding-right: units.$u1;\r\n padding-top: units.$u1;\r\n padding-bottom: units.$u1;\r\n}\r\n\r\n.dso-annotation-close-button {\r\n margin-left: units.$u4;\r\n}\r\n\r\n.dso-annotation-prefix {\r\n font-style: italic;\r\n}\r\n","import { h, Component, ComponentInterface, Event, EventEmitter, Prop } from \"@stencil/core\";\r\n\r\nexport interface AnnotationOutputCloseEvent {\r\n originalEvent: Event;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-annotation-output\",\r\n styleUrl: \"annotation-output.scss\",\r\n // No shadowdom for a11y reasons (aria-controls being set inside another component)\r\n})\r\nexport class AnnotationOutput implements ComponentInterface {\r\n /**\r\n * The annotation-button that toggles this component should have the same identifier.\r\n */\r\n @Prop({ reflect: true })\r\n identifier!: string;\r\n\r\n /**\r\n * This text will be displayed above the annotation-output when opened\r\n */\r\n @Prop({ reflect: true })\r\n annotationPrefix?: string;\r\n\r\n /**\r\n * Set to `true` to show content.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * This event is emitted when the user activates the Annotation Button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoClose!: EventEmitter<AnnotationOutputCloseEvent>;\r\n\r\n private toggleHandler = (e: MouseEvent) => {\r\n this.dsoClose.emit({ originalEvent: e });\r\n };\r\n\r\n render() {\r\n return (\r\n <dso-responsive-element>\r\n <dso-expandable id={this.identifier} open={this.open}>\r\n {this.annotationPrefix && <span class=\"dso-annotation-prefix\">{this.annotationPrefix}</span>}\r\n <div class=\"dso-annotation-header\">\r\n <slot name=\"title\" />\r\n <slot name=\"addons\" />\r\n <button type=\"button\" class=\"dso-tertiary dso-annotation-close-button\" onClick={this.toggleHandler}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Toelichting sluiten</span>\r\n </button>\r\n </div>\r\n <div class=\"dso-annotation-content\">\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </dso-responsive-element>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"annotation-output.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,ioEAAioE;;MCWhpE,gBAAgB;;;;;IAyBnB,kBAAa,GAAG,CAAC,CAAa;MACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;KAC1C,CAAC;;;gBAVK,KAAK;;EAYZ,MAAM;IACJ,QACE,kCACE,sBAAgB,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IACjD,IAAI,CAAC,gBAAgB,IAAI,YAAM,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,EAC5F,WAAK,KAAK,EAAC,uBAAuB,IAChC,YAAM,IAAI,EAAC,OAAO,GAAG,EACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,EACtB,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,0CAA0C,EAAC,OAAO,EAAE,IAAI,CAAC,aAAa,IAChG,gBAAU,IAAI,EAAC,OAAO,GAAY,EAClC,YAAM,KAAK,EAAC,SAAS,0BAA2B,CACzC,CACL,EACN,WAAK,KAAK,EAAC,wBAAwB,IACjC,eAAQ,CACJ,CACS,CACM,EACzB;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/annotation-output/annotation-output.scss?tag=dso-annotation-output","src/components/annotation-output/annotation-output.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/global/mixins/set-colors.mixin\" as set-colors;\r\n\r\n@include utilities.box-sizing();\r\n\r\ndso-annotation-output {\r\n display: block;\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-annotation-header {\r\n align-items: center;\r\n background-color: colors.$grijs-5;\r\n clear: both;\r\n display: flex;\r\n margin-bottom: 2px;\r\n margin-top: units.$u1;\r\n padding-left: units.$u2;\r\n padding-right: units.$u1;\r\n padding-top: units.$u1;\r\n padding-bottom: units.$u1;\r\n\r\n > [slot=\"title\"] {\r\n color: colors.$zwart;\r\n font-size: 1.25rem;\r\n margin-bottom: 0;\r\n margin-top: 0;\r\n }\r\n\r\n > :nth-child(2) {\r\n margin-left: auto;\r\n }\r\n}\r\n\r\ndso-responsive-element[small],\r\ndso-responsive-element[medium] {\r\n .dso-annotation-header {\r\n display: grid;\r\n row-gap: units.$u1;\r\n\r\n *[slot=\"title\"] {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n *[slot=\"addons\"] {\r\n grid-row: 2;\r\n grid-column: 1;\r\n margin-left: initial;\r\n }\r\n\r\n .dso-annotation-close-button {\r\n grid-row: 1;\r\n grid-column: 2;\r\n margin-left: units.$u1;\r\n text-align: end;\r\n }\r\n }\r\n}\r\n\r\n.dso-annotation-content {\r\n @include set-colors.apply(colors.$grijs-5);\r\n\r\n padding-left: units.$u2;\r\n padding-right: units.$u1;\r\n padding-top: units.$u1;\r\n padding-bottom: units.$u1;\r\n}\r\n\r\n.dso-annotation-close-button {\r\n margin-left: units.$u4;\r\n}\r\n\r\n.dso-annotation-prefix {\r\n font-style: italic;\r\n}\r\n","import { h, Component, ComponentInterface, Event, EventEmitter, Prop } from \"@stencil/core\";\r\n\r\nexport interface AnnotationOutputCloseEvent {\r\n originalEvent: Event;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-annotation-output\",\r\n styleUrl: \"annotation-output.scss\",\r\n // No shadowdom for a11y reasons (aria-controls being set inside another component)\r\n})\r\nexport class AnnotationOutput implements ComponentInterface {\r\n /**\r\n * The annotation-button that toggles this component should have the same identifier.\r\n */\r\n @Prop({ reflect: true })\r\n identifier!: string;\r\n\r\n /**\r\n * This text will be displayed above the annotation-output when opened\r\n */\r\n @Prop({ reflect: true })\r\n annotationPrefix?: string;\r\n\r\n /**\r\n * Set to `true` to show content.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * This event is emitted when the user activates the Annotation Button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoClose!: EventEmitter<AnnotationOutputCloseEvent>;\r\n\r\n private toggleHandler = (e: MouseEvent) => {\r\n this.dsoClose.emit({ originalEvent: e });\r\n };\r\n\r\n render() {\r\n return (\r\n <dso-responsive-element>\r\n <dso-expandable id={this.identifier} open={this.open}>\r\n {this.annotationPrefix && <span class=\"dso-annotation-prefix\">{this.annotationPrefix}</span>}\r\n <div class=\"dso-annotation-header\">\r\n <slot name=\"title\" />\r\n <slot name=\"addons\" />\r\n <button type=\"button\" class=\"dso-tertiary dso-annotation-close-button\" onClick={this.toggleHandler}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Toelichting sluiten</span>\r\n </button>\r\n </div>\r\n <div class=\"dso-annotation-content\">\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </dso-responsive-element>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { c as clsx } from './clsx.js';
3
3
 
4
- const badgeCss = ":host{display:inline-block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-badge{background-color:#666;border:1px solid #666;border-radius:1em;color:#fff;display:inline-block;font-size:0.875em;line-height:1;min-width:1.5rem;padding:4px 8px;text-align:center}.dso-badge.badge-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#000}.dso-badge.badge-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-badge.badge-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-badge.badge-warning{background-color:#dcd400;border-color:#dcd400;color:#000}.dso-badge.badge-danger{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-badge.badge-error{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-badge.badge-outline{background-color:#fff;border-color:#191919;color:#191919}.dso-badge.badge-attention{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}";
4
+ const badgeCss = ":host{display:inline-block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-badge{border:1px solid;border-radius:1em;display:inline-block;font-size:0.875em;line-height:1;min-width:1.5rem;padding:4px 8px;text-align:center}.dso-badge{background-color:#666;border-color:#666;color:#fff}.dso-badge.badge-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.dso-badge.badge-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-badge.badge-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-badge.badge-warning{background-color:#dcd400;border-color:#dcd400;color:#191919}.dso-badge.badge-danger{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-badge.badge-error{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-badge.badge-outline{background-color:#fff;border-color:#191919;color:#191919}.dso-badge.badge-attention{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}";
5
5
 
6
6
  const Badge = /*@__PURE__*/ proxyCustomElement(class Badge extends HTMLElement {
7
7
  constructor() {
@@ -1 +1 @@
1
- {"file":"badge.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,qgCAAqgC;;MCQzgC,KAAK;;;;;;;EAOhB,MAAM;IACJ,QACE,YAAM,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IACvE,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge/badge.scss?tag=dso-badge&encapsulation=shadow","src/components/badge/badge.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/badge\";\r\n\r\n:host {\r\n display: inline-block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-badge {\r\n @include badge.root();\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-badge\",\r\n styleUrl: \"badge.scss\",\r\n shadow: true,\r\n})\r\nexport class Badge {\r\n /**\r\n * The status of the Badge.\r\n */\r\n @Prop()\r\n status?: \"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\" | \"outline\" | \"attention\";\r\n\r\n render() {\r\n return (\r\n <span class={clsx(\"dso-badge\", { [`badge-${this.status}`]: this.status })}>\r\n <slot></slot>\r\n </span>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"badge.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,miCAAmiC;;MCQviC,KAAK;;;;;;;EAOhB,MAAM;IACJ,QACE,YAAM,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IACvE,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge/badge.scss?tag=dso-badge&encapsulation=shadow","src/components/badge/badge.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/badge\";\r\n\r\n:host {\r\n display: inline-block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-badge {\r\n @include badge.root();\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-badge\",\r\n styleUrl: \"badge.scss\",\r\n shadow: true,\r\n})\r\nexport class Badge {\r\n /**\r\n * The status of the Badge.\r\n */\r\n @Prop()\r\n status?: \"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\" | \"outline\" | \"attention\";\r\n\r\n render() {\r\n return (\r\n <span class={clsx(\"dso-badge\", { [`badge-${this.status}`]: this.status })}>\r\n <slot></slot>\r\n </span>\r\n );\r\n }\r\n}\r\n"],"version":3}