@dso-toolkit/core 47.0.1 → 49.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +1509 -62
  2. package/dist/cjs/dso-accordion.cjs.entry.js +24 -4
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +57 -47
  4. package/dist/cjs/dso-date-picker.cjs.entry.js +3 -2
  5. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
  6. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
  9. package/dist/cjs/dso-label.cjs.entry.js +2 -2
  10. package/dist/cjs/dso-modal.cjs.entry.js +4 -7
  11. package/dist/cjs/dso-ozon-content.cjs.entry.js +3 -3
  12. package/dist/cjs/dso-table.cjs.entry.js +3 -5
  13. package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  15. package/dist/cjs/dso-tooltip.cjs.entry.js +14 -22
  16. package/dist/cjs/dso-viewer-grid.cjs.entry.js +8 -3
  17. package/dist/cjs/{focus-trap.esm-d83fd673.js → focus-trap.esm-c501d382.js} +82 -155
  18. package/dist/cjs/loader.cjs.js +2 -2
  19. package/dist/collection/collection-manifest.json +8 -8
  20. package/dist/collection/components/accordion/accordion.js +29 -6
  21. package/dist/collection/components/accordion/components/accordion-section.css +27 -4
  22. package/dist/collection/components/accordion/components/accordion-section.interfaces.js +6 -0
  23. package/dist/collection/components/accordion/components/accordion-section.js +179 -64
  24. package/dist/collection/components/accordion/components/handles/element.handle.js +7 -0
  25. package/dist/collection/components/accordion/components/handles/heading.handle.js +14 -0
  26. package/dist/collection/components/accordion/components/handles/icon.handle.js +13 -0
  27. package/dist/collection/components/accordion/components/handles/index.js +4 -0
  28. package/dist/collection/components/accordion/components/handles/state-icon.handle.js +15 -0
  29. package/dist/collection/components/autosuggest/autosuggest.interfaces.js +1 -0
  30. package/dist/collection/components/autosuggest/autosuggest.js +61 -49
  31. package/dist/collection/components/banner/banner.js +1 -1
  32. package/dist/collection/components/card-container/card-container.js +1 -1
  33. package/dist/collection/components/date-picker/date-picker.interfaces.js +1 -0
  34. package/dist/collection/components/date-picker/date-picker.js +19 -11
  35. package/dist/collection/components/dropdown-menu/dropdown-menu.js +2 -2
  36. package/dist/collection/components/header/header.js +2 -6
  37. package/dist/collection/components/icon/icon.js +95 -95
  38. package/dist/collection/components/info-button/info-button.interfaces.js +1 -0
  39. package/dist/collection/components/info-button/info-button.js +2 -1
  40. package/dist/collection/components/label/label.js +2 -2
  41. package/dist/collection/components/modal/modal.css +103 -75
  42. package/dist/collection/components/modal/modal.interfaces.js +1 -0
  43. package/dist/collection/components/modal/modal.js +5 -7
  44. package/dist/collection/components/ozon-content/nodes/noot.node.js +1 -1
  45. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -1
  46. package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
  47. package/dist/collection/components/selectable/selectable.css +18 -1
  48. package/dist/collection/components/selectable/selectable.interfaces.js +1 -0
  49. package/dist/collection/components/selectable/selectable.js +3 -2
  50. package/dist/collection/components/table/table.css +49 -16
  51. package/dist/collection/components/table/table.js +2 -4
  52. package/dist/collection/components/toggletip/toggletip.js +1 -1
  53. package/dist/collection/components/tooltip/tooltip.js +14 -43
  54. package/dist/collection/components/tree-view/tree-view.js +8 -2
  55. package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -0
  56. package/dist/collection/components/viewer-grid/viewer-grid.js +19 -11
  57. package/dist/collection/index.js +13 -0
  58. package/dist/components/clsx.m.js +3 -0
  59. package/dist/components/create-identifier.js +15 -0
  60. package/dist/components/dropdown-menu.js +151 -0
  61. package/dist/components/dso-accordion-section.d.ts +11 -0
  62. package/dist/components/dso-accordion-section.js +1594 -0
  63. package/dist/components/dso-accordion.d.ts +11 -0
  64. package/dist/components/dso-accordion.js +336 -0
  65. package/dist/components/dso-alert.d.ts +11 -0
  66. package/dist/components/dso-alert.js +55 -0
  67. package/dist/components/dso-attachments-counter.d.ts +11 -0
  68. package/dist/components/dso-attachments-counter.js +42 -0
  69. package/dist/components/dso-autosuggest.d.ts +11 -0
  70. package/dist/components/dso-autosuggest.js +309 -0
  71. package/dist/components/dso-badge.d.ts +11 -0
  72. package/dist/components/dso-badge.js +37 -0
  73. package/dist/components/dso-banner.d.ts +11 -0
  74. package/dist/components/dso-banner.js +37 -0
  75. package/dist/components/dso-card-container.d.ts +11 -0
  76. package/dist/components/dso-card-container.js +36 -0
  77. package/dist/components/dso-card.d.ts +11 -0
  78. package/dist/components/dso-card.js +66 -0
  79. package/dist/components/dso-date-picker.d.ts +11 -0
  80. package/dist/components/dso-date-picker.js +682 -0
  81. package/dist/components/dso-dropdown-menu.d.ts +11 -0
  82. package/dist/components/dso-dropdown-menu.js +6 -0
  83. package/dist/components/dso-header.d.ts +11 -0
  84. package/dist/components/dso-header.js +159 -0
  85. package/dist/components/dso-helpcenter-panel.d.ts +11 -0
  86. package/dist/components/dso-helpcenter-panel.js +127 -0
  87. package/dist/components/dso-highlight-box.d.ts +11 -0
  88. package/dist/components/dso-highlight-box.js +55 -0
  89. package/dist/components/dso-icon.d.ts +11 -0
  90. package/dist/components/dso-icon.js +6 -0
  91. package/dist/components/dso-image-overlay.d.ts +11 -0
  92. package/dist/components/dso-image-overlay.js +129 -0
  93. package/dist/components/dso-info-button.d.ts +11 -0
  94. package/dist/components/dso-info-button.js +6 -0
  95. package/dist/components/dso-info.d.ts +11 -0
  96. package/dist/components/dso-info.js +6 -0
  97. package/dist/components/dso-label.d.ts +11 -0
  98. package/dist/components/dso-label.js +156 -0
  99. package/dist/components/dso-map-base-layers.d.ts +11 -0
  100. package/dist/components/dso-map-base-layers.js +80 -0
  101. package/dist/components/dso-map-controls.d.ts +11 -0
  102. package/dist/components/dso-map-controls.js +86 -0
  103. package/dist/components/dso-map-overlays.d.ts +11 -0
  104. package/dist/components/dso-map-overlays.js +81 -0
  105. package/dist/components/dso-modal.d.ts +11 -0
  106. package/dist/components/dso-modal.js +85 -0
  107. package/dist/components/dso-ozon-content.d.ts +11 -0
  108. package/dist/components/dso-ozon-content.js +507 -0
  109. package/dist/components/dso-pagination.d.ts +11 -0
  110. package/dist/components/dso-pagination.js +159 -0
  111. package/dist/components/dso-progress-bar.d.ts +11 -0
  112. package/dist/components/dso-progress-bar.js +42 -0
  113. package/dist/components/dso-progress-indicator.d.ts +11 -0
  114. package/dist/components/dso-progress-indicator.js +6 -0
  115. package/dist/components/dso-responsive-element.d.ts +11 -0
  116. package/dist/components/dso-responsive-element.js +6 -0
  117. package/dist/components/dso-selectable.d.ts +11 -0
  118. package/dist/components/dso-selectable.js +6 -0
  119. package/dist/components/dso-table.d.ts +11 -0
  120. package/dist/components/dso-table.js +111 -0
  121. package/dist/components/dso-toggletip.d.ts +11 -0
  122. package/dist/components/dso-toggletip.js +90 -0
  123. package/dist/components/dso-tooltip.d.ts +11 -0
  124. package/dist/components/dso-tooltip.js +6 -0
  125. package/dist/components/dso-tree-view.d.ts +11 -0
  126. package/dist/components/dso-tree-view.js +227 -0
  127. package/dist/components/dso-viewer-grid.d.ts +11 -0
  128. package/dist/components/dso-viewer-grid.js +171 -0
  129. package/dist/components/focus-trap.esm.js +688 -0
  130. package/dist/components/icon.js +663 -0
  131. package/dist/components/index.d.ts +55 -0
  132. package/dist/components/index.esm.js +458 -0
  133. package/dist/components/index.js +35 -0
  134. package/dist/components/index2.js +70 -0
  135. package/dist/components/info-button.js +56 -0
  136. package/dist/components/info.js +42 -0
  137. package/dist/components/is-modified-event.js +4 -0
  138. package/dist/components/progress-indicator.js +44 -0
  139. package/dist/components/responsive-element.js +67 -0
  140. package/dist/components/selectable.js +108 -0
  141. package/dist/components/tooltip.js +2047 -0
  142. package/dist/components/v4.js +66 -0
  143. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  144. package/dist/dso-toolkit/p-04ffcc93.entry.js +1 -0
  145. package/dist/dso-toolkit/{p-e0a37d82.entry.js → p-06b4f78d.entry.js} +1 -1
  146. package/dist/dso-toolkit/{p-2b83a825.entry.js → p-35687d62.entry.js} +1 -1
  147. package/dist/dso-toolkit/p-52bc72d0.entry.js +1 -0
  148. package/dist/dso-toolkit/p-57ceabab.js +5 -0
  149. package/dist/dso-toolkit/p-655eff47.entry.js +1 -0
  150. package/dist/dso-toolkit/p-672c8323.entry.js +1 -0
  151. package/dist/dso-toolkit/p-7f8be9bc.entry.js +1 -0
  152. package/dist/dso-toolkit/p-80575700.entry.js +1 -0
  153. package/dist/dso-toolkit/p-8e9f6355.entry.js +1 -0
  154. package/dist/dso-toolkit/p-a8cb2eae.entry.js +1 -0
  155. package/dist/dso-toolkit/p-bcd19ae7.entry.js +1 -0
  156. package/dist/dso-toolkit/p-d31805a9.entry.js +1 -0
  157. package/dist/dso-toolkit/{p-dcc74039.entry.js → p-d7b2adc3.entry.js} +1 -1
  158. package/dist/dso-toolkit/p-d8ba8db6.entry.js +1 -0
  159. package/dist/dso-toolkit/{p-800e1267.entry.js → p-daee3252.entry.js} +1 -1
  160. package/dist/esm/dso-accordion-section.entry.js +1510 -63
  161. package/dist/esm/dso-accordion.entry.js +24 -4
  162. package/dist/esm/dso-autosuggest.entry.js +57 -47
  163. package/dist/esm/dso-date-picker.entry.js +3 -2
  164. package/dist/esm/dso-dropdown-menu.entry.js +2 -2
  165. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  166. package/dist/esm/dso-image-overlay.entry.js +1 -1
  167. package/dist/esm/dso-info_2.entry.js +2 -2
  168. package/dist/esm/dso-label.entry.js +2 -2
  169. package/dist/esm/dso-modal.entry.js +5 -8
  170. package/dist/esm/dso-ozon-content.entry.js +3 -3
  171. package/dist/esm/dso-table.entry.js +3 -5
  172. package/dist/esm/dso-toggletip.entry.js +1 -1
  173. package/dist/esm/dso-toolkit.js +2 -2
  174. package/dist/esm/dso-tooltip.entry.js +14 -22
  175. package/dist/esm/dso-viewer-grid.entry.js +8 -3
  176. package/dist/esm/{focus-trap.esm-33203b60.js → focus-trap.esm-94794d92.js} +82 -155
  177. package/dist/esm/loader.js +2 -2
  178. package/dist/types/components/accordion/accordion.d.ts +7 -2
  179. package/dist/types/components/accordion/accordion.interfaces.d.ts +6 -3
  180. package/dist/types/components/accordion/components/accordion-section.d.ts +19 -3
  181. package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +3 -0
  182. package/dist/types/components/accordion/components/handles/element.handle.d.ts +6 -0
  183. package/dist/types/components/accordion/components/handles/heading.handle.d.ts +6 -0
  184. package/dist/types/components/accordion/components/handles/icon.handle.d.ts +7 -0
  185. package/dist/types/components/accordion/components/handles/index.d.ts +4 -0
  186. package/dist/types/components/accordion/components/handles/state-icon.handle.d.ts +5 -0
  187. package/dist/types/components/autosuggest/autosuggest.d.ts +2 -15
  188. package/dist/types/components/autosuggest/autosuggest.interfaces.d.ts +14 -0
  189. package/dist/types/components/date-picker/date-picker.d.ts +2 -15
  190. package/dist/types/components/date-picker/date-picker.interfaces.d.ts +14 -0
  191. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
  192. package/dist/types/components/header/header.d.ts +2 -2
  193. package/dist/types/components/header/header.interfaces.d.ts +1 -0
  194. package/dist/types/components/info-button/info-button.d.ts +1 -4
  195. package/dist/types/components/info-button/info-button.interfaces.d.ts +4 -0
  196. package/dist/types/components/map-overlays/map-overlays.d.ts +1 -1
  197. package/dist/types/components/modal/modal.d.ts +2 -4
  198. package/dist/types/components/modal/modal.interfaces.d.ts +3 -0
  199. package/dist/types/components/selectable/selectable.d.ts +1 -2
  200. package/dist/types/components/selectable/selectable.interfaces.d.ts +2 -0
  201. package/dist/types/components/table/table.d.ts +1 -1
  202. package/dist/types/components/tooltip/tooltip.d.ts +0 -8
  203. package/dist/types/components/tree-view/tree-item.d.ts +1 -1
  204. package/dist/types/components/tree-view/tree-view.d.ts +2 -2
  205. package/dist/types/components/viewer-grid/viewer-grid.d.ts +5 -16
  206. package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +15 -0
  207. package/dist/types/components.d.ts +29 -30
  208. package/dist/types/index.d.ts +13 -0
  209. package/package.json +20 -25
  210. package/dist/custom-elements/index.d.ts +0 -243
  211. package/dist/custom-elements/index.js +0 -7555
  212. package/dist/dso-toolkit/p-0917f18a.entry.js +0 -1
  213. package/dist/dso-toolkit/p-0c8cd0d8.entry.js +0 -1
  214. package/dist/dso-toolkit/p-203fc66c.entry.js +0 -1
  215. package/dist/dso-toolkit/p-39a33b89.entry.js +0 -1
  216. package/dist/dso-toolkit/p-3ab4441a.entry.js +0 -1
  217. package/dist/dso-toolkit/p-44c0bb3e.entry.js +0 -1
  218. package/dist/dso-toolkit/p-89d262b7.js +0 -5
  219. package/dist/dso-toolkit/p-9aa3fa9d.entry.js +0 -1
  220. package/dist/dso-toolkit/p-ba253bcd.entry.js +0 -1
  221. package/dist/dso-toolkit/p-e43e39cf.entry.js +0 -1
  222. package/dist/dso-toolkit/p-e8b22546.entry.js +0 -1
  223. package/dist/dso-toolkit/p-f93b7c7a.entry.js +0 -1
@@ -0,0 +1,309 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
2
+ import { d as debounce_1 } from './index2.js';
3
+ import { d as defineCustomElement$2 } from './progress-indicator.js';
4
+ import { v as v4 } from './v4.js';
5
+
6
+ function escapeStringRegexp(string) {
7
+ if (typeof string !== 'string') {
8
+ throw new TypeError('Expected a string');
9
+ }
10
+
11
+ // Escape characters with special meaning either inside or outside character sets.
12
+ // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
13
+ return string
14
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
15
+ .replace(/-/g, '\\x2d');
16
+ }
17
+
18
+ const autosuggestCss = ".sc-dso-autosuggest-h{display:block;position:relative}ul.sc-dso-autosuggest,.autosuggest-progress-box.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-top:2px;padding:4px 0;position:absolute;left:0;right:0;top:100%;z-index:200}.autosuggest-progress-box.sc-dso-autosuggest{padding:12px 8px}ul.sc-dso-autosuggest{padding:8px 0}ul.sc-dso-autosuggest li.sc-dso-autosuggest{display:flex;justify-content:space-between;padding:4px 16px}li[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#39870c}li[aria-selected=true].sc-dso-autosuggest,li[aria-selected=true].sc-dso-autosuggest .type.sc-dso-autosuggest{color:#fff}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest{color:#666}";
19
+
20
+ const Autosuggest = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
+ constructor() {
22
+ super();
23
+ this.__registerHost();
24
+ this.dsoSelect = createEvent(this, "dsoSelect", 7);
25
+ this.dsoChange = createEvent(this, "dsoChange", 7);
26
+ this.dsoSearch = createEvent(this, "dsoSearch", 7);
27
+ this.listboxId = v4();
28
+ this.inputId = v4();
29
+ this.labelId = v4();
30
+ this.debouncedEmitValue = debounce_1((value) => {
31
+ this.dsoChange.emit(value);
32
+ this.debouncedShowLoading();
33
+ }, 200);
34
+ this.debouncedShowLoading = debounce_1(() => {
35
+ if (this.inputValue) {
36
+ this.showLoading = true;
37
+ }
38
+ }, this.loadingDelayed);
39
+ this.inputValue = "";
40
+ this.onInput = (event) => {
41
+ if (!(event.target instanceof HTMLInputElement)) {
42
+ throw new Error("event.target is not instanceof HTMLInputElement");
43
+ }
44
+ this.showLoading = !this.loadingDelayed;
45
+ this.inputValue = event.target.value;
46
+ this.debouncedEmitValue(event.target.value.match(/(\S+)/g) ? event.target.value : "");
47
+ };
48
+ this.onFocusIn = () => {
49
+ if (this.suggestOnFocus) {
50
+ this.openSuggestions();
51
+ }
52
+ };
53
+ this.onKeyDown = (event) => {
54
+ if (event.defaultPrevented || this.loading) {
55
+ return;
56
+ }
57
+ switch (event.key) {
58
+ case "ArrowDown":
59
+ if (!this.showSuggestions) {
60
+ this.openSuggestions("first");
61
+ }
62
+ else {
63
+ this.selectNextSuggestion();
64
+ }
65
+ break;
66
+ case "ArrowUp":
67
+ if (!this.showSuggestions) {
68
+ this.openSuggestions("last");
69
+ }
70
+ else {
71
+ this.selectPreviousSuggestion();
72
+ }
73
+ break;
74
+ case "Tab":
75
+ this.closeSuggestions();
76
+ return;
77
+ case "Escape":
78
+ this.closeSuggestions();
79
+ break;
80
+ case "Enter":
81
+ this.pickSelectedValue();
82
+ break;
83
+ default:
84
+ return;
85
+ }
86
+ event.preventDefault();
87
+ };
88
+ this.suggestions = null;
89
+ this.loading = false;
90
+ this.loadingLabel = "Een moment geduld.";
91
+ this.loadingDelayed = undefined;
92
+ this.notFoundLabel = undefined;
93
+ this.suggestOnFocus = false;
94
+ this.showSuggestions = false;
95
+ this.selectedSuggestion = undefined;
96
+ this.notFound = false;
97
+ this.showLoading = false;
98
+ }
99
+ suggestionsWatcher() {
100
+ this.resetSelectedSuggestion();
101
+ if ((!this.showSuggestions || !this.notFound) && this.inputValue) {
102
+ this.openSuggestions();
103
+ }
104
+ else if ((this.showSuggestions || this.notFound) && !this.inputValue) {
105
+ this.closeSuggestions();
106
+ }
107
+ }
108
+ onDocumentClick(event) {
109
+ if ((this.showSuggestions || this.notFound) &&
110
+ this.listbox &&
111
+ event.target instanceof Node &&
112
+ !this.listbox.contains(event.target) &&
113
+ this.input !== event.target) {
114
+ this.closeSuggestions();
115
+ }
116
+ }
117
+ connectedCallback() {
118
+ setTimeout(() => {
119
+ const input = this.host.querySelector('input[type="text"]');
120
+ if (!(input instanceof HTMLInputElement)) {
121
+ throw new ReferenceError("Mandatory text input not found");
122
+ }
123
+ this.input = input;
124
+ if (input.id) {
125
+ this.inputId = input.id;
126
+ }
127
+ else {
128
+ input.id = this.inputId;
129
+ }
130
+ if (!this.input.labels || this.input.labels.length < 1) {
131
+ throw new ReferenceError("Mandatory label for text input not found");
132
+ }
133
+ const label = this.input.labels[0];
134
+ if (label.id) {
135
+ this.labelId = label.id;
136
+ }
137
+ else {
138
+ label.id = this.labelId;
139
+ }
140
+ this.input.setAttribute("role", "combobox");
141
+ this.input.setAttribute("aria-haspopup", "listbox");
142
+ this.input.setAttribute("aria-controls", this.listboxId);
143
+ this.input.setAttribute("aria-expanded", "false");
144
+ this.input.setAttribute("autocomplete", "off");
145
+ this.input.setAttribute("aria-autocomplete", "list");
146
+ this.input.setAttribute("aria-activedescendant", "");
147
+ this.input.addEventListener("input", this.onInput);
148
+ this.input.addEventListener("keydown", this.onKeyDown);
149
+ this.input.addEventListener("focusin", this.onFocusIn);
150
+ });
151
+ }
152
+ disconnectedCallback() {
153
+ var _a, _b, _c;
154
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.removeEventListener("input", this.onInput);
155
+ (_b = this.input) === null || _b === void 0 ? void 0 : _b.removeEventListener("keydown", this.onKeyDown);
156
+ (_c = this.input) === null || _c === void 0 ? void 0 : _c.removeEventListener("focusin", this.onFocusIn);
157
+ }
158
+ markTerms(suggestionValue, terms) {
159
+ if (!suggestionValue || !terms || terms.length === 0) {
160
+ return [""];
161
+ }
162
+ const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, "gi");
163
+ return suggestionValue.split(termRegex).map((valuePart) => {
164
+ if (!valuePart) {
165
+ return "";
166
+ }
167
+ if (termRegex.test(valuePart)) {
168
+ return h("mark", null, valuePart);
169
+ }
170
+ if (terms.length === 1) {
171
+ return h("span", null, valuePart);
172
+ }
173
+ return this.markTerms(valuePart, terms.slice(1));
174
+ });
175
+ }
176
+ selectSuggestion(suggestion) {
177
+ var _a;
178
+ this.selectedSuggestion = suggestion;
179
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", this.listboxItemId(suggestion));
180
+ }
181
+ selectFirstSuggestion() {
182
+ var _a;
183
+ if (!this.suggestions) {
184
+ return;
185
+ }
186
+ this.selectedSuggestion = this.suggestions[0];
187
+ if (this.selectedSuggestion) {
188
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", this.listboxItemId(this.selectedSuggestion));
189
+ }
190
+ }
191
+ selectLastSuggestion() {
192
+ var _a;
193
+ if (!this.suggestions) {
194
+ return;
195
+ }
196
+ this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];
197
+ if (this.selectedSuggestion) {
198
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", this.listboxItemId(this.selectedSuggestion));
199
+ }
200
+ }
201
+ selectNextSuggestion() {
202
+ var _a, _b;
203
+ if (!this.suggestions) {
204
+ return;
205
+ }
206
+ const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;
207
+ this.selectedSuggestion = (_a = this.suggestions[index + 1]) !== null && _a !== void 0 ? _a : this.suggestions[0];
208
+ if (this.selectedSuggestion) {
209
+ (_b = this.input) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-activedescendant", this.listboxItemId(this.selectedSuggestion));
210
+ }
211
+ }
212
+ selectPreviousSuggestion() {
213
+ var _a, _b;
214
+ if (!this.suggestions) {
215
+ return;
216
+ }
217
+ const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;
218
+ this.selectedSuggestion = (_a = this.suggestions[index - 1]) !== null && _a !== void 0 ? _a : this.suggestions[this.suggestions.length - 1];
219
+ if (this.selectedSuggestion) {
220
+ (_b = this.input) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-activedescendant", this.listboxItemId(this.selectedSuggestion));
221
+ }
222
+ }
223
+ resetSelectedSuggestion() {
224
+ var _a;
225
+ this.showLoading = !this.loadingDelayed;
226
+ this.notFound = false;
227
+ this.selectedSuggestion = undefined;
228
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", "");
229
+ }
230
+ openSuggestions(selectSuggestion) {
231
+ var _a, _b, _c, _d;
232
+ this.showSuggestions = (_a = (this.suggestions && this.suggestions.length > 0)) !== null && _a !== void 0 ? _a : false;
233
+ this.notFound = (_c = ((_b = this.suggestions) === null || _b === void 0 ? void 0 : _b.length) === 0) !== null && _c !== void 0 ? _c : false;
234
+ (_d = this.input) === null || _d === void 0 ? void 0 : _d.setAttribute("aria-expanded", (this.showSuggestions || this.notFound).toString());
235
+ if (this.showSuggestions && selectSuggestion === "first") {
236
+ this.selectFirstSuggestion();
237
+ }
238
+ else if (this.showSuggestions && selectSuggestion === "last") {
239
+ this.selectLastSuggestion();
240
+ }
241
+ }
242
+ closeSuggestions() {
243
+ var _a;
244
+ this.showSuggestions = false;
245
+ this.notFound = false;
246
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-expanded", "false");
247
+ this.selectFirstSuggestion();
248
+ }
249
+ pickSelectedValue() {
250
+ var _a;
251
+ if (this.selectedSuggestion && this.showSuggestions) {
252
+ this.dsoSelect.emit(this.selectedSuggestion);
253
+ }
254
+ else {
255
+ this.dsoSearch.emit((_a = this.input) === null || _a === void 0 ? void 0 : _a.value);
256
+ }
257
+ this.closeSuggestions();
258
+ }
259
+ listboxItemId(suggestion) {
260
+ if (!this.suggestions) {
261
+ return "";
262
+ }
263
+ return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;
264
+ }
265
+ render() {
266
+ var _a, _b;
267
+ const terms = (_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value.split(" ").filter((t) => t)) !== null && _b !== void 0 ? _b : [];
268
+ return (h(Fragment, null, h("slot", null), this.loading && this.showLoading ? (h("div", { class: "autosuggest-progress-box" }, h("dso-progress-indicator", { label: this.loadingLabel }))) : (h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: (element) => (this.listbox = element), hidden: !this.showSuggestions && !this.notFound }, this.showSuggestions && this.suggestions ? (this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value }, h("span", { class: "value" }, this.markTerms(suggestion.value, terms)), suggestion.type ? h("span", { class: "type" }, suggestion.type) : undefined)))) : this.notFound ? (h("li", null, h("span", { class: "value" }, !this.notFoundLabel ? (this.markTerms(`${this.inputValue} is niet gevonden.`, terms)) : (h("span", null, this.notFoundLabel))))) : undefined))));
269
+ }
270
+ get host() { return this; }
271
+ static get watchers() { return {
272
+ "suggestions": ["suggestionsWatcher"]
273
+ }; }
274
+ static get style() { return autosuggestCss; }
275
+ }, [6, "dso-autosuggest", {
276
+ "suggestions": [16],
277
+ "loading": [4],
278
+ "loadingLabel": [1, "loading-label"],
279
+ "loadingDelayed": [2, "loading-delayed"],
280
+ "notFoundLabel": [1, "not-found-label"],
281
+ "suggestOnFocus": [4, "suggest-on-focus"],
282
+ "showSuggestions": [32],
283
+ "selectedSuggestion": [32],
284
+ "notFound": [32],
285
+ "showLoading": [32]
286
+ }, [[4, "click", "onDocumentClick"]]]);
287
+ function defineCustomElement$1() {
288
+ if (typeof customElements === "undefined") {
289
+ return;
290
+ }
291
+ const components = ["dso-autosuggest", "dso-progress-indicator"];
292
+ components.forEach(tagName => { switch (tagName) {
293
+ case "dso-autosuggest":
294
+ if (!customElements.get(tagName)) {
295
+ customElements.define(tagName, Autosuggest);
296
+ }
297
+ break;
298
+ case "dso-progress-indicator":
299
+ if (!customElements.get(tagName)) {
300
+ defineCustomElement$2();
301
+ }
302
+ break;
303
+ } });
304
+ }
305
+
306
+ const DsoAutosuggest = Autosuggest;
307
+ const defineCustomElement = defineCustomElement$1;
308
+
309
+ export { DsoAutosuggest, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoBadge extends Components.DsoBadge, HTMLElement {}
4
+ export const DsoBadge: {
5
+ prototype: DsoBadge;
6
+ new (): DsoBadge;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,37 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { c as clsx } from './clsx.m.js';
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:#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-outline{background-color:#fff;border-color:#191919;color:#191919}";
5
+
6
+ const Badge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this.status = undefined;
12
+ }
13
+ render() {
14
+ return (h("span", { class: clsx("dso-badge", { [`badge-${this.status}`]: this.status }) }, h("slot", null)));
15
+ }
16
+ static get style() { return badgeCss; }
17
+ }, [1, "dso-badge", {
18
+ "status": [1]
19
+ }]);
20
+ function defineCustomElement$1() {
21
+ if (typeof customElements === "undefined") {
22
+ return;
23
+ }
24
+ const components = ["dso-badge"];
25
+ components.forEach(tagName => { switch (tagName) {
26
+ case "dso-badge":
27
+ if (!customElements.get(tagName)) {
28
+ customElements.define(tagName, Badge);
29
+ }
30
+ break;
31
+ } });
32
+ }
33
+
34
+ const DsoBadge = Badge;
35
+ const defineCustomElement = defineCustomElement$1;
36
+
37
+ export { DsoBadge, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoBanner extends Components.DsoBanner, HTMLElement {}
4
+ export const DsoBanner: {
5
+ prototype: DsoBanner;
6
+ new (): DsoBanner;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,37 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { c as clsx } from './clsx.m.js';
3
+
4
+ const bannerCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.dso-banner{padding:16px 0;position:relative}";
5
+
6
+ const Banner = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this.status = undefined;
12
+ }
13
+ render() {
14
+ return (h("section", { class: clsx("dso-banner", `alert-${this.status}`), role: "alert" }, h("slot", null)));
15
+ }
16
+ static get style() { return bannerCss; }
17
+ }, [1, "dso-banner", {
18
+ "status": [513]
19
+ }]);
20
+ function defineCustomElement$1() {
21
+ if (typeof customElements === "undefined") {
22
+ return;
23
+ }
24
+ const components = ["dso-banner"];
25
+ components.forEach(tagName => { switch (tagName) {
26
+ case "dso-banner":
27
+ if (!customElements.get(tagName)) {
28
+ customElements.define(tagName, Banner);
29
+ }
30
+ break;
31
+ } });
32
+ }
33
+
34
+ const DsoBanner = Banner;
35
+ const defineCustomElement = defineCustomElement$1;
36
+
37
+ export { DsoBanner, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoCardContainer extends Components.DsoCardContainer, HTMLElement {}
4
+ export const DsoCardContainer: {
5
+ prototype: DsoCardContainer;
6
+ new (): DsoCardContainer;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,36 @@
1
+ import { proxyCustomElement, HTMLElement, h, Fragment } from '@stencil/core/internal/client';
2
+
3
+ const cardContainerCss = ":host .dso-card-list{padding-left:0;list-style:none;border-bottom:1px solid #ccc;margin-top:-1px}:host .dso-card-grid{display:grid;gap:32px;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr}";
4
+
5
+ const CardContainer = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.mode = "list";
11
+ }
12
+ render() {
13
+ return (h(Fragment, null, this.mode === "list" && (h("ul", { class: "dso-card-list" }, h("slot", null))), this.mode === "grid" && (h("div", { class: "dso-card-grid" }, h("slot", null)))));
14
+ }
15
+ static get style() { return cardContainerCss; }
16
+ }, [1, "dso-card-container", {
17
+ "mode": [513]
18
+ }]);
19
+ function defineCustomElement$1() {
20
+ if (typeof customElements === "undefined") {
21
+ return;
22
+ }
23
+ const components = ["dso-card-container"];
24
+ components.forEach(tagName => { switch (tagName) {
25
+ case "dso-card-container":
26
+ if (!customElements.get(tagName)) {
27
+ customElements.define(tagName, CardContainer);
28
+ }
29
+ break;
30
+ } });
31
+ }
32
+
33
+ const DsoCardContainer = CardContainer;
34
+ const defineCustomElement = defineCustomElement$1;
35
+
36
+ export { DsoCardContainer, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoCard extends Components.DsoCard, HTMLElement {}
4
+ export const DsoCard: {
5
+ prototype: DsoCard;
6
+ new (): DsoCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,66 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { i as isModifiedEvent } from './is-modified-event.js';
3
+
4
+ const cardCss = ":host .dso-card-selectable,:host .dso-card-image{grid-row:span 2}*,*::after,*::before{box-sizing:border-box}:host{display:block}:host .dso-card-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}@media screen and (max-width: 480px){:host .dso-card-heading{flex-wrap:wrap}}:host .dso-card-image{margin-right:8px}";
5
+
6
+ const Card = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this.dsoCardClicked = createEvent(this, "dsoCardClicked", 7);
12
+ this.isSelectable = false;
13
+ this.hasImage = false;
14
+ }
15
+ clickEventHandler(e) {
16
+ if (!(e.target instanceof HTMLElement)) {
17
+ return;
18
+ }
19
+ let element = e.target;
20
+ while (element !== this.host && element !== null) {
21
+ if (element instanceof HTMLButtonElement ||
22
+ element instanceof HTMLAnchorElement ||
23
+ element instanceof HTMLInputElement ||
24
+ element === null) {
25
+ return;
26
+ }
27
+ if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {
28
+ element = element.parentNode.host;
29
+ }
30
+ else {
31
+ element = element.parentElement;
32
+ }
33
+ }
34
+ return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
35
+ }
36
+ componentWillLoad() {
37
+ this.isSelectable = this.host.querySelector("*[slot = 'selectable']") !== null;
38
+ this.hasImage = this.host.querySelector("*[slot = 'image']") !== null;
39
+ }
40
+ render() {
41
+ return (h(Host, { onClick: (e) => this.clickEventHandler(e) }, h("div", { class: "dso-card-selectable", hidden: !this.isSelectable }, h("slot", { name: "selectable" })), h("div", { class: "dso-card-image", hidden: !this.hasImage }, h("slot", { name: "image" })), h("div", { class: "dso-card-heading" }, h("slot", { name: "heading" }), h("slot", { name: "interactions" })), h("div", { class: "dso-card-content" }, h("slot", { name: "content" }))));
42
+ }
43
+ get host() { return this; }
44
+ static get style() { return cardCss; }
45
+ }, [1, "dso-card", {
46
+ "isSelectable": [516, "is-selectable"],
47
+ "hasImage": [516, "has-image"]
48
+ }]);
49
+ function defineCustomElement$1() {
50
+ if (typeof customElements === "undefined") {
51
+ return;
52
+ }
53
+ const components = ["dso-card"];
54
+ components.forEach(tagName => { switch (tagName) {
55
+ case "dso-card":
56
+ if (!customElements.get(tagName)) {
57
+ customElements.define(tagName, Card);
58
+ }
59
+ break;
60
+ } });
61
+ }
62
+
63
+ const DsoCard = Card;
64
+ const defineCustomElement = defineCustomElement$1;
65
+
66
+ export { DsoCard, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoDatePicker extends Components.DsoDatePicker, HTMLElement {}
4
+ export const DsoDatePicker: {
5
+ prototype: DsoDatePicker;
6
+ new (): DsoDatePicker;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;