@dso-toolkit/core 51.2.0 → 51.3.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 (165) hide show
  1. package/dist/cjs/annotation.service-e980f478.js +21 -0
  2. package/dist/cjs/dso-accordion.cjs.entry.js +2 -192
  3. package/dist/cjs/dso-annotation-button.cjs.entry.js +25 -0
  4. package/dist/cjs/dso-annotation-output.cjs.entry.js +35 -0
  5. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-card.cjs.entry.js +5 -3
  7. package/dist/cjs/dso-expandable-heading.cjs.entry.js +47 -0
  8. package/dist/cjs/dso-expandable.cjs.entry.js +20 -0
  9. package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -2
  10. package/dist/cjs/dso-label.cjs.entry.js +2 -2
  11. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  12. package/dist/cjs/index-71b733b1.js +196 -0
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +4 -0
  15. package/dist/collection/components/annotation-button/annotation-button.css +3 -0
  16. package/dist/collection/components/annotation-button/annotation-button.js +45 -0
  17. package/dist/collection/components/annotation-output/annotation-output.css +82 -0
  18. package/dist/collection/components/annotation-output/annotation-output.interfaces.js +1 -0
  19. package/dist/collection/components/annotation-output/annotation-output.js +126 -0
  20. package/dist/collection/components/badge/badge.css +5 -0
  21. package/dist/collection/components/badge/badge.js +2 -2
  22. package/dist/collection/components/card/card.css +0 -1
  23. package/dist/collection/components/card/card.js +22 -2
  24. package/dist/collection/components/expandable/expandable.css +24 -0
  25. package/dist/collection/components/expandable/expandable.js +42 -0
  26. package/dist/collection/components/expandable-heading/expandable-heading.css +145 -0
  27. package/dist/collection/components/expandable-heading/expandable-heading.interfaces.js +1 -0
  28. package/dist/collection/components/expandable-heading/expandable-heading.js +117 -0
  29. package/dist/collection/components/expandable-heading/heading.js +16 -0
  30. package/dist/collection/components/image-overlay/image-overlay.js +1 -3
  31. package/dist/collection/components/label/label.css +9 -8
  32. package/dist/collection/components/label/label.js +3 -3
  33. package/dist/collection/index.js +2 -0
  34. package/dist/collection/services/annotation.service.js +16 -0
  35. package/dist/components/annotation.service.js +19 -0
  36. package/dist/components/dso-accordion-section.js +1 -1
  37. package/dist/components/dso-accordion.js +2 -192
  38. package/dist/components/dso-annotation-button.d.ts +11 -0
  39. package/dist/components/dso-annotation-button.js +45 -0
  40. package/dist/components/dso-annotation-output.d.ts +11 -0
  41. package/dist/components/dso-annotation-output.js +69 -0
  42. package/dist/components/dso-autosuggest.js +1 -1
  43. package/dist/components/dso-badge.js +1 -1
  44. package/dist/components/dso-card.js +7 -4
  45. package/dist/components/dso-expandable-heading.d.ts +11 -0
  46. package/dist/components/dso-expandable-heading.js +77 -0
  47. package/dist/components/dso-expandable.d.ts +11 -0
  48. package/dist/components/dso-expandable.js +6 -0
  49. package/dist/components/dso-header.js +1 -1
  50. package/dist/components/dso-image-overlay.js +2 -4
  51. package/dist/components/dso-label.js +2 -2
  52. package/dist/components/dso-table.js +1 -1
  53. package/dist/components/expandable.js +33 -0
  54. package/dist/components/index.d.ts +4 -0
  55. package/dist/components/index.js +4 -0
  56. package/dist/components/index2.js +185 -61
  57. package/dist/components/index3.js +70 -0
  58. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  59. package/dist/dso-toolkit/p-09424a1d.entry.js +1 -0
  60. package/dist/dso-toolkit/{p-a9baa631.entry.js → p-0af9bfb1.entry.js} +1 -1
  61. package/dist/dso-toolkit/{p-0e5315a3.entry.js → p-0bc8885e.entry.js} +1 -1
  62. package/dist/dso-toolkit/{p-ce475f06.entry.js → p-0ca60778.entry.js} +1 -1
  63. package/dist/dso-toolkit/{p-746dc38a.entry.js → p-0fce0861.entry.js} +1 -1
  64. package/dist/dso-toolkit/{p-04ffcc93.entry.js → p-1854d6ed.entry.js} +1 -1
  65. package/dist/dso-toolkit/{p-a8cb2eae.entry.js → p-1aef13ee.entry.js} +1 -1
  66. package/dist/dso-toolkit/{p-19323600.entry.js → p-1cb94d7d.entry.js} +1 -1
  67. package/dist/dso-toolkit/{p-abbcbe6a.entry.js → p-1f0672f2.entry.js} +1 -1
  68. package/dist/dso-toolkit/{p-c846d208.entry.js → p-22f9240a.entry.js} +1 -1
  69. package/dist/dso-toolkit/p-2af58b20.entry.js +1 -0
  70. package/dist/dso-toolkit/{p-427f6d90.entry.js → p-3914ad70.entry.js} +1 -1
  71. package/dist/dso-toolkit/{p-67c4987c.entry.js → p-43f3d736.entry.js} +1 -1
  72. package/dist/dso-toolkit/p-452c7fbb.entry.js +1 -0
  73. package/dist/dso-toolkit/{p-3b8cbd05.entry.js → p-494fe8e5.entry.js} +1 -1
  74. package/dist/dso-toolkit/p-4b8535b7.js +1 -0
  75. package/dist/dso-toolkit/{p-ff72ee4c.entry.js → p-588bc4d7.entry.js} +1 -1
  76. package/dist/dso-toolkit/{p-c7ec6e6e.entry.js → p-5b7c0fa5.entry.js} +1 -1
  77. package/dist/dso-toolkit/p-67df25a7.entry.js +1 -0
  78. package/dist/dso-toolkit/p-6cdc1acd.entry.js +1 -0
  79. package/dist/dso-toolkit/{p-11176cb8.entry.js → p-82465cdc.entry.js} +1 -1
  80. package/dist/dso-toolkit/p-89b97fce.js +1 -0
  81. package/dist/dso-toolkit/{p-8aa39e7f.entry.js → p-8de85ae7.entry.js} +1 -1
  82. package/dist/dso-toolkit/{p-8e9f6355.entry.js → p-96efc763.entry.js} +1 -1
  83. package/dist/dso-toolkit/{p-8f35c8f8.js → p-98fd1658.js} +1 -1
  84. package/dist/dso-toolkit/p-9b07b034.entry.js +1 -0
  85. package/dist/dso-toolkit/p-ad0b38cf.entry.js +1 -0
  86. package/dist/dso-toolkit/{p-06b4f78d.entry.js → p-b337f001.entry.js} +1 -1
  87. package/dist/dso-toolkit/{p-6080bb9e.entry.js → p-ba0da696.entry.js} +1 -1
  88. package/dist/dso-toolkit/{p-520a2cdd.entry.js → p-c16ce11e.entry.js} +1 -1
  89. package/dist/dso-toolkit/p-c4c309b5.entry.js +1 -0
  90. package/dist/dso-toolkit/{p-655eff47.entry.js → p-c54ad578.entry.js} +1 -1
  91. package/dist/dso-toolkit/{p-35687d62.entry.js → p-d4772fb0.entry.js} +1 -1
  92. package/dist/dso-toolkit/{p-2fa96ac0.entry.js → p-d6ea8670.entry.js} +1 -1
  93. package/dist/dso-toolkit/{p-ec25868b.entry.js → p-d987ef37.entry.js} +1 -1
  94. package/dist/dso-toolkit/{p-92ad1cdb.entry.js → p-e00a3019.entry.js} +1 -1
  95. package/dist/dso-toolkit/{p-ec4501bb.entry.js → p-e4f667b3.entry.js} +1 -1
  96. package/dist/dso-toolkit/p-ee1acb32.entry.js +1 -0
  97. package/dist/dso-toolkit/{p-55142124.entry.js → p-efdf5c91.entry.js} +1 -1
  98. package/dist/dso-toolkit/p-f3f0d6c9.entry.js +1 -0
  99. package/dist/dso-toolkit/{p-76a1428a.entry.js → p-f8a08ba1.entry.js} +1 -1
  100. package/dist/dso-toolkit/{p-c2157b55.entry.js → p-fbb20550.entry.js} +1 -1
  101. package/dist/esm/annotation.service-d0add3fc.js +19 -0
  102. package/dist/esm/dso-accordion-section.entry.js +1 -1
  103. package/dist/esm/dso-accordion.entry.js +2 -192
  104. package/dist/esm/dso-alert.entry.js +1 -1
  105. package/dist/esm/dso-annotation-button.entry.js +21 -0
  106. package/dist/esm/dso-annotation-output.entry.js +31 -0
  107. package/dist/esm/dso-attachments-counter.entry.js +1 -1
  108. package/dist/esm/dso-autosuggest.entry.js +1 -1
  109. package/dist/esm/dso-badge.entry.js +2 -2
  110. package/dist/esm/dso-banner.entry.js +1 -1
  111. package/dist/esm/dso-card-container.entry.js +1 -1
  112. package/dist/esm/dso-card.entry.js +6 -4
  113. package/dist/esm/dso-date-picker.entry.js +1 -1
  114. package/dist/esm/dso-dropdown-menu.entry.js +1 -1
  115. package/dist/esm/dso-expandable-heading.entry.js +43 -0
  116. package/dist/esm/dso-expandable.entry.js +16 -0
  117. package/dist/esm/dso-header.entry.js +1 -1
  118. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  119. package/dist/esm/dso-highlight-box.entry.js +1 -1
  120. package/dist/esm/dso-icon.entry.js +1 -1
  121. package/dist/esm/dso-image-overlay.entry.js +2 -3
  122. package/dist/esm/dso-info-button.entry.js +1 -1
  123. package/dist/esm/dso-info_2.entry.js +1 -1
  124. package/dist/esm/dso-label.entry.js +3 -3
  125. package/dist/esm/dso-list-button.entry.js +1 -1
  126. package/dist/esm/dso-map-base-layers.entry.js +1 -1
  127. package/dist/esm/dso-map-controls.entry.js +1 -1
  128. package/dist/esm/dso-map-overlays.entry.js +1 -1
  129. package/dist/esm/dso-modal.entry.js +1 -1
  130. package/dist/esm/dso-ozon-content.entry.js +1 -1
  131. package/dist/esm/dso-pagination.entry.js +1 -1
  132. package/dist/esm/dso-progress-bar.entry.js +1 -1
  133. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  134. package/dist/esm/dso-responsive-element.entry.js +1 -1
  135. package/dist/esm/dso-slide-toggle.entry.js +1 -1
  136. package/dist/esm/dso-table.entry.js +1 -1
  137. package/dist/esm/dso-toggletip.entry.js +1 -1
  138. package/dist/esm/dso-toolkit.js +2 -2
  139. package/dist/esm/dso-tooltip.entry.js +1 -1
  140. package/dist/esm/dso-tree-view.entry.js +1 -1
  141. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  142. package/dist/esm/{index-1a4dda48.js → index-ac5a22a3.js} +1 -1
  143. package/dist/esm/index-d6ffb688.js +194 -0
  144. package/dist/esm/loader.js +2 -2
  145. package/dist/types/components/annotation-button/annotation-button.d.ts +7 -0
  146. package/dist/types/components/annotation-output/annotation-output.d.ts +12 -0
  147. package/dist/types/components/annotation-output/annotation-output.interfaces.d.ts +4 -0
  148. package/dist/types/components/badge/badge.d.ts +1 -1
  149. package/dist/types/components/card/card.d.ts +1 -0
  150. package/dist/types/components/expandable/expandable.d.ts +4 -0
  151. package/dist/types/components/expandable-heading/expandable-heading.d.ts +11 -0
  152. package/dist/types/components/expandable-heading/expandable-heading.interfaces.d.ts +5 -0
  153. package/dist/types/components/expandable-heading/heading.d.ts +9 -0
  154. package/dist/types/components/image-overlay/image-overlay.d.ts +0 -1
  155. package/dist/types/components/label/label.d.ts +1 -1
  156. package/dist/types/components.d.ts +97 -4
  157. package/dist/types/index.d.ts +2 -0
  158. package/dist/types/services/annotation.service.d.ts +10 -0
  159. package/package.json +2 -2
  160. package/dist/dso-toolkit/p-36cd87c4.entry.js +0 -1
  161. package/dist/dso-toolkit/p-46acc09f.entry.js +0 -1
  162. package/dist/dso-toolkit/p-6bd8515a.entry.js +0 -1
  163. package/dist/dso-toolkit/p-78ee23c5.entry.js +0 -1
  164. package/dist/dso-toolkit/p-9287b2f2.entry.js +0 -1
  165. package/dist/dso-toolkit/p-d7b2adc3.entry.js +0 -1
@@ -0,0 +1,145 @@
1
+ h1,
2
+ .h1,
3
+ h2,
4
+ .h2,
5
+ h3,
6
+ .h3 {
7
+ margin-bottom: 16px;
8
+ margin-top: 24px;
9
+ }
10
+
11
+ h1,
12
+ .h1 {
13
+ line-height: 1.25;
14
+ }
15
+
16
+ h1 {
17
+ color: #275937;
18
+ font-size: 2rem;
19
+ font-weight: 700;
20
+ }
21
+
22
+ h2,
23
+ .h2 {
24
+ line-height: 1.33;
25
+ }
26
+
27
+ h2 {
28
+ color: #275937;
29
+ font-size: 1.5rem;
30
+ font-weight: 700;
31
+ }
32
+
33
+ h3,
34
+ .h3 {
35
+ line-height: 1.2;
36
+ }
37
+
38
+ h3 {
39
+ color: #275937;
40
+ font-size: 1.25rem;
41
+ font-weight: 600;
42
+ }
43
+
44
+ h4,
45
+ .h4,
46
+ h5,
47
+ .h5,
48
+ h6,
49
+ .h6 {
50
+ margin-bottom: 16px;
51
+ margin-top: 12px;
52
+ }
53
+
54
+ h4,
55
+ .h4 {
56
+ line-height: 1.5;
57
+ }
58
+
59
+ h4 {
60
+ color: #275937;
61
+ font-size: 1rem;
62
+ font-weight: 600;
63
+ }
64
+
65
+ h5,
66
+ .h5 {
67
+ line-height: 1.5;
68
+ }
69
+
70
+ h5 {
71
+ color: #191919;
72
+ font-size: 1rem;
73
+ font-weight: 600;
74
+ }
75
+
76
+ h6,
77
+ .h6 {
78
+ line-height: 1.5;
79
+ }
80
+
81
+ :host {
82
+ display: block;
83
+ }
84
+
85
+ *,
86
+ *::after,
87
+ *::before {
88
+ box-sizing: border-box;
89
+ }
90
+
91
+ .sr-only {
92
+ position: absolute;
93
+ width: 1px;
94
+ height: 1px;
95
+ padding: 0;
96
+ margin: -1px;
97
+ overflow: hidden;
98
+ clip: rect(0, 0, 0, 0);
99
+ border: 0;
100
+ }
101
+
102
+ .expandable-heading {
103
+ align-items: center;
104
+ display: flex;
105
+ margin-bottom: 8px;
106
+ margin-top: 8px;
107
+ }
108
+ .expandable-heading h2,
109
+ .expandable-heading h3,
110
+ .expandable-heading h4,
111
+ .expandable-heading h5,
112
+ .expandable-heading h6 {
113
+ font-size: 1rem;
114
+ margin-bottom: 0;
115
+ margin-right: 8px;
116
+ margin-top: 0;
117
+ }
118
+ .expandable-heading button {
119
+ align-items: flex-start;
120
+ cursor: pointer;
121
+ background-color: transparent;
122
+ border: 0;
123
+ color: inherit;
124
+ display: flex;
125
+ line-height: 24px;
126
+ font-size: inherit;
127
+ font-weight: inherit;
128
+ padding: 0;
129
+ text-align: left;
130
+ }
131
+ .expandable-heading button > dso-icon {
132
+ flex-shrink: 0;
133
+ }
134
+ .expandable-heading.dso-expandable-heading-black button {
135
+ color: #000;
136
+ }
137
+
138
+ dso-expandable {
139
+ padding-left: 24px;
140
+ }
141
+
142
+ .addons-end {
143
+ display: inline-block;
144
+ margin-left: auto;
145
+ }
@@ -0,0 +1,117 @@
1
+ import { Fragment, h } from "@stencil/core";
2
+ import clsx from "clsx";
3
+ import { v4 as uuidv4 } from "uuid";
4
+ import { Heading } from "./heading";
5
+ export class ExpandableHeading {
6
+ constructor() {
7
+ this.identifier = uuidv4();
8
+ this.open = undefined;
9
+ this.heading = "h2";
10
+ this.color = "default";
11
+ }
12
+ toggle(e) {
13
+ this.open = !this.open;
14
+ this.dsoToggle.emit({ originalEvent: e, open: this.open });
15
+ }
16
+ render() {
17
+ const expandableProperties = this.open ? { open: true } : {};
18
+ return (h(Fragment, null, h("div", { class: clsx("expandable-heading", this.color === "black" ? "dso-expandable-heading-black" : "") }, h(Heading, { heading: this.heading }, h("button", { type: "button", "aria-expanded": this.open ? "true" : "false", "aria-controls": this.identifier, onClick: (e) => this.toggle(e) }, h("dso-icon", { icon: this.open ? "chevron-down" : "chevron-right" }), h("slot", { name: "title" }))), h("slot", { name: "addons-start" }), h("div", { class: "addons-end" }, h("slot", { name: "addons-end" }))), h("dso-expandable", Object.assign({ id: this.identifier }, expandableProperties), h("slot", null))));
19
+ }
20
+ static get is() { return "dso-expandable-heading"; }
21
+ static get encapsulation() { return "shadow"; }
22
+ static get originalStyleUrls() {
23
+ return {
24
+ "$": ["expandable-heading.scss"]
25
+ };
26
+ }
27
+ static get styleUrls() {
28
+ return {
29
+ "$": ["expandable-heading.css"]
30
+ };
31
+ }
32
+ static get properties() {
33
+ return {
34
+ "open": {
35
+ "type": "boolean",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "boolean",
39
+ "resolved": "boolean | undefined",
40
+ "references": {}
41
+ },
42
+ "required": false,
43
+ "optional": true,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": ""
47
+ },
48
+ "attribute": "open",
49
+ "reflect": false
50
+ },
51
+ "heading": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "HeadingTags",
56
+ "resolved": "\"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
57
+ "references": {
58
+ "HeadingTags": {
59
+ "location": "import",
60
+ "path": "./expandable-heading.interfaces"
61
+ }
62
+ }
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ },
70
+ "attribute": "heading",
71
+ "reflect": false,
72
+ "defaultValue": "\"h2\""
73
+ },
74
+ "color": {
75
+ "type": "string",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "\"default\" | \"black\"",
79
+ "resolved": "\"black\" | \"default\"",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": false,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "attribute": "color",
89
+ "reflect": false,
90
+ "defaultValue": "\"default\""
91
+ }
92
+ };
93
+ }
94
+ static get events() {
95
+ return [{
96
+ "method": "dsoToggle",
97
+ "name": "dsoToggle",
98
+ "bubbles": true,
99
+ "cancelable": true,
100
+ "composed": true,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ },
105
+ "complexType": {
106
+ "original": "ExpandableHeadingToggleEvent",
107
+ "resolved": "ExpandableHeadingToggleEvent",
108
+ "references": {
109
+ "ExpandableHeadingToggleEvent": {
110
+ "location": "import",
111
+ "path": "./expandable-heading.interfaces"
112
+ }
113
+ }
114
+ }
115
+ }];
116
+ }
117
+ }
@@ -0,0 +1,16 @@
1
+ import { h } from "@stencil/core";
2
+ export const Heading = ({ heading, ref, className }, children) => {
3
+ switch (heading) {
4
+ default:
5
+ case "h2":
6
+ return (h("h2", { ref: ref, class: className }, children));
7
+ case "h3":
8
+ return (h("h3", { ref: ref, class: className }, children));
9
+ case "h4":
10
+ return (h("h4", { ref: ref, class: className }, children));
11
+ case "h5":
12
+ return (h("h5", { ref: ref, class: className }, children));
13
+ case "h6":
14
+ return (h("h6", { ref: ref, class: className }, children));
15
+ }
16
+ };
@@ -6,7 +6,6 @@ export class ImageOverlay {
6
6
  this.titelSlot = null;
7
7
  this.bijschriftSlot = null;
8
8
  this.active = false;
9
- this.focused = false;
10
9
  this.zoomable = false;
11
10
  }
12
11
  loadListener(event) {
@@ -67,7 +66,7 @@ export class ImageOverlay {
67
66
  render() {
68
67
  var _a;
69
68
  const { src, alt } = (_a = this.host.querySelector("img")) !== null && _a !== void 0 ? _a : {};
70
- return (h(Host, { tabindex: this.focused || !this.zoomable ? -1 : 0, onFocus: () => { var _a; return (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, this.active && src && alt && (h("div", { class: "dimmer" }, h("div", { class: "wrapper", ref: (element) => (this.wrapperElement = element) }, h("div", { class: "titel", hidden: !this.titelSlot }, h("slot", { name: "titel" })), h("img", { src: src, alt: alt }), h("button", { type: "button", class: "close", onClick: () => (this.active = false) }, h("dso-icon", { icon: "times" }), h("span", null, "Sluiten")), h("div", { class: "figuur-bijschrift", hidden: !this.bijschriftSlot }, h("slot", { name: "bijschrift" }))))), h("slot", null), this.zoomable && (h("button", { type: "button", class: "open", ref: (element) => (this.buttonElement = element), onClick: () => (this.active = true), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }, h("dso-icon", { icon: "external-link" }), h("span", null, "Afbeelding vergroot weergeven")))));
69
+ return (h(Host, { onClick: () => { var _a; return (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, this.active && src && alt && (h("div", { class: "dimmer" }, h("div", { class: "wrapper", ref: (element) => (this.wrapperElement = element) }, h("div", { class: "titel", hidden: !this.titelSlot }, h("slot", { name: "titel" })), h("img", { src: src, alt: alt }), h("button", { type: "button", class: "close", onClick: () => (this.active = false) }, h("dso-icon", { icon: "times" }), h("span", null, "Sluiten")), h("div", { class: "figuur-bijschrift", hidden: !this.bijschriftSlot }, h("slot", { name: "bijschrift" }))))), h("slot", null), this.zoomable && (h("button", { type: "button", class: "open", ref: (element) => (this.buttonElement = element), onClick: () => (this.active = true) }, h("dso-icon", { icon: "external-link" }), h("span", null, "Afbeelding vergroot weergeven")))));
71
70
  }
72
71
  componentDidRender() {
73
72
  var _a, _b;
@@ -105,7 +104,6 @@ export class ImageOverlay {
105
104
  static get states() {
106
105
  return {
107
106
  "active": {},
108
- "focused": {},
109
107
  "zoomable": {}
110
108
  };
111
109
  }
@@ -27,8 +27,6 @@
27
27
  display: inline-block;
28
28
  line-height: 1.5;
29
29
  max-width: 100%;
30
- }
31
- .dso-label:not(.dso-label-bright) {
32
30
  padding: 4px 8px;
33
31
  }
34
32
  .dso-label:focus-within, .dso-label.dso-hover {
@@ -54,10 +52,6 @@
54
52
  .dso-label button > svg.di {
55
53
  display: block;
56
54
  }
57
- .dso-label.dso-compact {
58
- border: 0;
59
- padding: 0 8px;
60
- }
61
55
  .dso-label.dso-label-info {
62
56
  background-color: #6ca4d9;
63
57
  color: #191919;
@@ -85,8 +79,15 @@
85
79
  .dso-label.dso-label-bright {
86
80
  background-color: #fff;
87
81
  color: #191919;
88
- border: 1px solid #ccc;
89
- padding: 3px 7px;
82
+ outline: 1px solid #ccc;
83
+ outline-offset: -1px;
84
+ }
85
+ .dso-label.dso-label-attention {
86
+ background-color: #8b4a6a;
87
+ color: #fff;
88
+ }
89
+ .dso-label.dso-compact {
90
+ padding: 0 8px;
90
91
  }
91
92
  .dso-label.dso-hover .dso-label-content {
92
93
  text-decoration: line-through;
@@ -90,7 +90,7 @@ export class Label {
90
90
  "dso-hover": this.removeHover || this.removeFocus,
91
91
  }) }, h("slot", { name: "symbol" }), status && h("span", { class: "sr-only" }, status, ": "), h("span", { class: clsx("dso-label-content", {
92
92
  "dso-truncate": !!this.truncate,
93
- }), ref: (element) => (this.labelContent = element), tabindex: this.truncate && this.truncatedContent ? 0 : -1, onMouseEnter: () => (this.textHover = true), onMouseLeave: () => (this.textHover = false), onFocus: () => (this.textFocus = true), onBlur: () => (this.textFocus = false) }, h("slot", null)), this.removable && (h("button", { type: "button", onClick: (e) => this.dsoRemoveClick.emit(e), onMouseEnter: () => (this.removeHover = true), onMouseLeave: () => (this.removeHover = false), onFocus: () => (this.removeFocus = true), onBlur: () => (this.removeFocus = false) }, h("span", { class: "sr-only" }, "Verwijder: ", this.labelText), h("dso-icon", { icon: "times" })))), h("dso-tooltip", { stateless: true, id: "toggle-anchor", active: !!this.truncatedContent && (this.textHover || this.textFocus), position: "top", strategy: "absolute" }, this.truncatedContent)));
93
+ }), ref: (element) => (this.labelContent = element), tabindex: this.truncate && this.truncatedContent ? 0 : undefined, onMouseEnter: () => (this.textHover = true), onMouseLeave: () => (this.textHover = false), onFocus: () => (this.textFocus = true), onBlur: () => (this.textFocus = false) }, h("slot", null)), this.removable && (h("button", { type: "button", onClick: (e) => this.dsoRemoveClick.emit(e), onMouseEnter: () => (this.removeHover = true), onMouseLeave: () => (this.removeHover = false), onFocus: () => (this.removeFocus = true), onBlur: () => (this.removeFocus = false) }, h("span", { class: "sr-only" }, "Verwijder: ", this.labelText), h("dso-icon", { icon: "times" })))), h("dso-tooltip", { stateless: true, id: "toggle-anchor", active: !!this.truncatedContent && (this.textHover || this.textFocus), position: "top", strategy: "absolute" }, this.truncatedContent)));
94
94
  }
95
95
  static get is() { return "dso-label"; }
96
96
  static get encapsulation() { return "shadow"; }
@@ -144,8 +144,8 @@ export class Label {
144
144
  "type": "string",
145
145
  "mutable": false,
146
146
  "complexType": {
147
- "original": "\"primary\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"error\" | \"bright\"",
148
- "resolved": "\"bright\" | \"danger\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
147
+ "original": "\"primary\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"error\" | \"bright\" | \"attention\"",
148
+ "resolved": "\"attention\" | \"bright\" | \"danger\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
149
149
  "references": {}
150
150
  },
151
151
  "required": false,
@@ -1,7 +1,9 @@
1
1
  export * from "./components/accordion/accordion.interfaces";
2
+ export * from "./components/annotation-output/annotation-output.interfaces";
2
3
  export * from "./components/autosuggest/autosuggest.interfaces";
3
4
  export * from "./components/card/card.interfaces";
4
5
  export * from "./components/date-picker/date-picker.interfaces";
6
+ export * from "./components/expandable-heading/expandable-heading.interfaces";
5
7
  export * from "./components/header/header.interfaces";
6
8
  export * from "./components/info-button/info-button.interfaces";
7
9
  export * from "./components/list-button/list-button.interfaces";
@@ -0,0 +1,16 @@
1
+ import { createStore } from "@stencil/store";
2
+ export class AnnotationService {
3
+ static get state() {
4
+ if (!this._state) {
5
+ AnnotationService.initializeStore();
6
+ }
7
+ return this._state;
8
+ }
9
+ static toggle(id) {
10
+ this._state[id] = !this._state[id];
11
+ }
12
+ static initializeStore() {
13
+ const { state } = createStore({});
14
+ AnnotationService._state = state;
15
+ }
16
+ }
@@ -0,0 +1,19 @@
1
+ import { c as createStore } from './index2.js';
2
+
3
+ class AnnotationService {
4
+ static get state() {
5
+ if (!this._state) {
6
+ AnnotationService.initializeStore();
7
+ }
8
+ return this._state;
9
+ }
10
+ static toggle(id) {
11
+ this._state[id] = !this._state[id];
12
+ }
13
+ static initializeStore() {
14
+ const { state } = createStore({});
15
+ AnnotationService._state = state;
16
+ }
17
+ }
18
+
19
+ export { AnnotationService as A };
@@ -1,5 +1,5 @@
1
1
  import { h, proxyCustomElement, HTMLElement, forceUpdate, Host, Fragment } from '@stencil/core/internal/client';
2
- import { d as debounce_1 } from './index2.js';
2
+ import { d as debounce_1 } from './index3.js';
3
3
  import { d as defineCustomElement$2 } from './icon.js';
4
4
 
5
5
  /*
@@ -1,195 +1,5 @@
1
- import { getRenderingRef, forceUpdate, proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
-
3
- const appendToMap = (map, propName, value) => {
4
- const items = map.get(propName);
5
- if (!items) {
6
- map.set(propName, [value]);
7
- }
8
- else if (!items.includes(value)) {
9
- items.push(value);
10
- }
11
- };
12
- const debounce = (fn, ms) => {
13
- let timeoutId;
14
- return (...args) => {
15
- if (timeoutId) {
16
- clearTimeout(timeoutId);
17
- }
18
- timeoutId = setTimeout(() => {
19
- timeoutId = 0;
20
- fn(...args);
21
- }, ms);
22
- };
23
- };
24
-
25
- /**
26
- * Check if a possible element isConnected.
27
- * The property might not be there, so we check for it.
28
- *
29
- * We want it to return true if isConnected is not a property,
30
- * otherwise we would remove these elements and would not update.
31
- *
32
- * Better leak in Edge than to be useless.
33
- */
34
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
- const cleanupElements = debounce((map) => {
36
- for (let key of map.keys()) {
37
- map.set(key, map.get(key).filter(isConnected));
38
- }
39
- }, 2000);
40
- const stencilSubscription = () => {
41
- if (typeof getRenderingRef !== 'function') {
42
- // If we are not in a stencil project, we do nothing.
43
- // This function is not really exported by @stencil/core.
44
- return {};
45
- }
46
- const elmsToUpdate = new Map();
47
- return {
48
- dispose: () => elmsToUpdate.clear(),
49
- get: (propName) => {
50
- const elm = getRenderingRef();
51
- if (elm) {
52
- appendToMap(elmsToUpdate, propName, elm);
53
- }
54
- },
55
- set: (propName) => {
56
- const elements = elmsToUpdate.get(propName);
57
- if (elements) {
58
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
- }
60
- cleanupElements(elmsToUpdate);
61
- },
62
- reset: () => {
63
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
- cleanupElements(elmsToUpdate);
65
- },
66
- };
67
- };
68
-
69
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
- const unwrappedState = unwrap(defaultState);
72
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
- const handlers = {
74
- dispose: [],
75
- get: [],
76
- set: [],
77
- reset: [],
78
- };
79
- const reset = () => {
80
- var _a;
81
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
- // otherwise, the state won't be properly reset
83
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
- handlers.reset.forEach((cb) => cb());
85
- };
86
- const dispose = () => {
87
- // Call first dispose as resetting the state would
88
- // cause less updates ;)
89
- handlers.dispose.forEach((cb) => cb());
90
- reset();
91
- };
92
- const get = (propName) => {
93
- handlers.get.forEach((cb) => cb(propName));
94
- return states.get(propName);
95
- };
96
- const set = (propName, value) => {
97
- const oldValue = states.get(propName);
98
- if (shouldUpdate(value, oldValue, propName)) {
99
- states.set(propName, value);
100
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
- }
102
- };
103
- const state = (typeof Proxy === 'undefined'
104
- ? {}
105
- : new Proxy(unwrappedState, {
106
- get(_, propName) {
107
- return get(propName);
108
- },
109
- ownKeys(_) {
110
- return Array.from(states.keys());
111
- },
112
- getOwnPropertyDescriptor() {
113
- return {
114
- enumerable: true,
115
- configurable: true,
116
- };
117
- },
118
- has(_, propName) {
119
- return states.has(propName);
120
- },
121
- set(_, propName, value) {
122
- set(propName, value);
123
- return true;
124
- },
125
- }));
126
- const on = (eventName, callback) => {
127
- handlers[eventName].push(callback);
128
- return () => {
129
- removeFromArray(handlers[eventName], callback);
130
- };
131
- };
132
- const onChange = (propName, cb) => {
133
- const unSet = on('set', (key, newValue) => {
134
- if (key === propName) {
135
- cb(newValue);
136
- }
137
- });
138
- // We need to unwrap the defaultState because it might be a function.
139
- // Otherwise we might not be sending the right reset value.
140
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
- return () => {
142
- unSet();
143
- unReset();
144
- };
145
- };
146
- const use = (...subscriptions) => {
147
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
- if (subscription.set) {
149
- unsubs.push(on('set', subscription.set));
150
- }
151
- if (subscription.get) {
152
- unsubs.push(on('get', subscription.get));
153
- }
154
- if (subscription.reset) {
155
- unsubs.push(on('reset', subscription.reset));
156
- }
157
- if (subscription.dispose) {
158
- unsubs.push(on('dispose', subscription.dispose));
159
- }
160
- return unsubs;
161
- }, []);
162
- return () => unsubs.forEach((unsub) => unsub());
163
- };
164
- const forceUpdate = (key) => {
165
- const oldValue = states.get(key);
166
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
- };
168
- return {
169
- state,
170
- get,
171
- set,
172
- on,
173
- onChange,
174
- use,
175
- dispose,
176
- reset,
177
- forceUpdate,
178
- };
179
- };
180
- const removeFromArray = (array, item) => {
181
- const index = array.indexOf(item);
182
- if (index >= 0) {
183
- array[index] = array[array.length - 1];
184
- array.length--;
185
- }
186
- };
187
-
188
- const createStore = (defaultState, shouldUpdate) => {
189
- const map = createObservableMap(defaultState, shouldUpdate);
190
- map.use(stencilSubscription());
191
- return map;
192
- };
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { c as createStore } from './index2.js';
193
3
 
194
4
  const accordionCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}";
195
5
 
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoAnnotationButton extends Components.DsoAnnotationButton, HTMLElement {}
4
+ export const DsoAnnotationButton: {
5
+ prototype: DsoAnnotationButton;
6
+ new (): DsoAnnotationButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,45 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { A as AnnotationService } from './annotation.service.js';
3
+ import { d as defineCustomElement$2 } from './icon.js';
4
+
5
+ const annotationButtonCss = "dso-annotation-button{display:block}";
6
+
7
+ const AnnotationButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.identifier = undefined;
12
+ }
13
+ componentDidLoad() {
14
+ this.annotationOutput = document.querySelector(`dso-annotation-output[identifier='${this.identifier}']`);
15
+ }
16
+ render() {
17
+ return (h("button", { type: "button", class: "dso-tertiary", "aria-controls": this.identifier, "aria-expanded": AnnotationService.state[this.identifier] ? "true" : "false", onClick: (e) => { var _a; return (_a = this.annotationOutput) === null || _a === void 0 ? void 0 : _a.toggleAnnotation(e, this.identifier); } }, h("dso-icon", { icon: "label" }), h("span", { class: "sr-only" }, "Toelichting bekijken")));
18
+ }
19
+ static get style() { return annotationButtonCss; }
20
+ }, [0, "dso-annotation-button", {
21
+ "identifier": [1]
22
+ }]);
23
+ function defineCustomElement$1() {
24
+ if (typeof customElements === "undefined") {
25
+ return;
26
+ }
27
+ const components = ["dso-annotation-button", "dso-icon"];
28
+ components.forEach(tagName => { switch (tagName) {
29
+ case "dso-annotation-button":
30
+ if (!customElements.get(tagName)) {
31
+ customElements.define(tagName, AnnotationButton);
32
+ }
33
+ break;
34
+ case "dso-icon":
35
+ if (!customElements.get(tagName)) {
36
+ defineCustomElement$2();
37
+ }
38
+ break;
39
+ } });
40
+ }
41
+
42
+ const DsoAnnotationButton = AnnotationButton;
43
+ const defineCustomElement = defineCustomElement$1;
44
+
45
+ export { DsoAnnotationButton, defineCustomElement };