@dso-toolkit/core 35.0.0 → 36.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 (147) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +2 -2
  4. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-banner.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
  8. package/dist/cjs/dso-header.cjs.entry.js +16 -7
  9. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/dso-image-overlay.cjs.entry.js +4 -4
  13. package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
  15. package/dist/cjs/dso-label.cjs.entry.js +1 -1
  16. package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
  17. package/dist/cjs/dso-map-controls.cjs.entry.js +22 -19
  18. package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-ozon-content.cjs.entry.js +36 -24
  20. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
  22. package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
  23. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  24. package/dist/cjs/dso-tooltip.cjs.entry.js +8 -4
  25. package/dist/cjs/dso-tree-view.cjs.entry.js +9 -9
  26. package/dist/cjs/dso-viewer-grid.cjs.entry.js +4 -4
  27. package/dist/cjs/{focus-trap.esm-8d3e3fb6.js → focus-trap.esm-a85643b0.js} +102 -68
  28. package/dist/cjs/{index-5ea63531.js → index-dfb4ea62.js} +73 -64
  29. package/dist/cjs/index.esm-3520a2a6.js +427 -0
  30. package/dist/cjs/loader.cjs.js +2 -2
  31. package/dist/collection/collection-manifest.json +2 -2
  32. package/dist/collection/components/alert/alert.template.js +1 -1
  33. package/dist/collection/components/anchor/anchor.template.js +1 -1
  34. package/dist/collection/components/autosuggest/autosuggest.css +1 -1
  35. package/dist/collection/components/badge/badge.template.js +1 -1
  36. package/dist/collection/components/button/button.template.js +1 -1
  37. package/dist/collection/components/date-picker/date-picker.css +6 -6
  38. package/dist/collection/components/date-picker/date-picker.template.js +1 -1
  39. package/dist/collection/components/definition-list/definition-list.template.js +2 -2
  40. package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +1 -1
  41. package/dist/collection/components/header/header.css +1 -1
  42. package/dist/collection/components/header/header.js +38 -9
  43. package/dist/collection/components/header/header.template.js +4 -2
  44. package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +2 -2
  45. package/dist/collection/components/highlight-box/highlight-box.template.js +2 -2
  46. package/dist/collection/components/icon/icon.template.js +1 -1
  47. package/dist/collection/components/image-overlay/image-overlay.css +1 -1
  48. package/dist/collection/components/label/label.template.js +2 -2
  49. package/dist/collection/components/list/list.template.js +1 -1
  50. package/dist/collection/components/map-controls/map-controls.js +17 -19
  51. package/dist/collection/components/ozon-content/get-node-name.function.js +9 -0
  52. package/dist/collection/components/ozon-content/nodes/al.node.js +2 -1
  53. package/dist/collection/components/ozon-content/nodes/fallback.node.js +2 -1
  54. package/dist/collection/components/ozon-content/nodes/noot.node.js +15 -15
  55. package/dist/collection/components/ozon-content/ozon-content-mapper.js +9 -5
  56. package/dist/collection/components/ozon-content/ozon-content.css +76 -23
  57. package/dist/collection/components/progress-bar/progress-bar.template.js +1 -1
  58. package/dist/collection/components/progress-indicator/progress-indicator.template.js +1 -1
  59. package/dist/collection/components/selectable/selectable.css +7 -1
  60. package/dist/collection/components/selectable/selectable.template.js +1 -1
  61. package/dist/collection/components/toggletip/toggletip.template.js +2 -2
  62. package/dist/collection/components/tooltip/tooltip.css +1 -1
  63. package/dist/collection/components/tooltip/tooltip.template.js +1 -1
  64. package/dist/collection/components/tree-view/tree-item.js +7 -7
  65. package/dist/collection/components/tree-view/tree-view.css +86 -15
  66. package/dist/collection/components/viewer-grid/viewer-grid.css +2 -2
  67. package/dist/custom-elements/index.js +438 -216
  68. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  69. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  70. package/dist/dso-toolkit/p-016ed5a8.entry.js +1 -0
  71. package/dist/dso-toolkit/{p-c6f467b3.entry.js → p-0216f283.entry.js} +1 -1
  72. package/dist/dso-toolkit/{p-348414bf.entry.js → p-09bcacd0.entry.js} +1 -1
  73. package/dist/dso-toolkit/{p-2b6a3dfa.entry.js → p-117a31fe.entry.js} +1 -1
  74. package/dist/dso-toolkit/p-131d54e3.js +5 -0
  75. package/dist/dso-toolkit/{p-50b63cf4.entry.js → p-1eeadd3e.entry.js} +1 -1
  76. package/dist/dso-toolkit/{p-ad540748.entry.js → p-2279329b.entry.js} +1 -1
  77. package/dist/dso-toolkit/p-258e8371.entry.js +1 -0
  78. package/dist/dso-toolkit/{p-bc14cafd.entry.js → p-3ced438e.entry.js} +1 -1
  79. package/dist/dso-toolkit/{p-c54ecae1.entry.js → p-406b179d.entry.js} +1 -1
  80. package/dist/dso-toolkit/{p-225bbb28.entry.js → p-4b5f6b4c.entry.js} +1 -1
  81. package/dist/dso-toolkit/{p-3b493a2c.entry.js → p-527a85b6.entry.js} +1 -1
  82. package/dist/dso-toolkit/{p-94dffa65.entry.js → p-52f159e7.entry.js} +1 -1
  83. package/dist/dso-toolkit/{p-dc86d830.entry.js → p-58f5e092.entry.js} +1 -1
  84. package/dist/dso-toolkit/p-5e5fbd41.js +5 -0
  85. package/dist/dso-toolkit/{p-f0b67246.entry.js → p-639228f6.entry.js} +1 -1
  86. package/dist/dso-toolkit/{p-951f5872.entry.js → p-6a8452bd.entry.js} +1 -1
  87. package/dist/dso-toolkit/{p-4e573fc5.entry.js → p-98ef5f8c.entry.js} +1 -1
  88. package/dist/dso-toolkit/{p-94b79e43.entry.js → p-a1c9bb35.entry.js} +1 -1
  89. package/dist/dso-toolkit/{p-3c4dbd89.entry.js → p-a5008a4e.entry.js} +1 -1
  90. package/dist/dso-toolkit/{p-c95108fe.entry.js → p-a59dcbb0.entry.js} +1 -1
  91. package/dist/dso-toolkit/p-b06c275a.entry.js +1 -0
  92. package/dist/dso-toolkit/p-b4222d6e.entry.js +1 -0
  93. package/dist/dso-toolkit/{p-dad72605.js → p-b9eb3491.js} +1 -1
  94. package/dist/dso-toolkit/p-bec38cf5.entry.js +1 -0
  95. package/dist/dso-toolkit/{p-ad2210ad.entry.js → p-d0d3ca99.entry.js} +1 -1
  96. package/dist/dso-toolkit/{p-5037944e.entry.js → p-d72edd80.entry.js} +1 -1
  97. package/dist/dso-toolkit/{p-1fefbf8c.entry.js → p-e1934ab6.entry.js} +1 -1
  98. package/dist/esm/dso-alert.entry.js +1 -1
  99. package/dist/esm/dso-attachments-counter.entry.js +1 -1
  100. package/dist/esm/dso-autosuggest.entry.js +2 -2
  101. package/dist/esm/dso-badge.entry.js +1 -1
  102. package/dist/esm/dso-banner.entry.js +1 -1
  103. package/dist/esm/dso-date-picker.entry.js +2 -2
  104. package/dist/esm/dso-dropdown-menu.entry.js +2 -2
  105. package/dist/esm/dso-header.entry.js +16 -7
  106. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  107. package/dist/esm/dso-highlight-box.entry.js +1 -1
  108. package/dist/esm/dso-icon.entry.js +1 -1
  109. package/dist/esm/dso-image-overlay.entry.js +4 -4
  110. package/dist/esm/dso-info-button.entry.js +1 -1
  111. package/dist/esm/dso-info_2.entry.js +2 -2
  112. package/dist/esm/dso-label.entry.js +1 -1
  113. package/dist/esm/dso-map-base-layers.entry.js +1 -1
  114. package/dist/esm/dso-map-controls.entry.js +22 -19
  115. package/dist/esm/dso-map-overlays.entry.js +1 -1
  116. package/dist/esm/dso-ozon-content.entry.js +36 -24
  117. package/dist/esm/dso-progress-bar.entry.js +1 -1
  118. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  119. package/dist/esm/dso-toggletip.entry.js +1 -1
  120. package/dist/esm/dso-toolkit.js +2 -2
  121. package/dist/esm/dso-tooltip.entry.js +8 -4
  122. package/dist/esm/dso-tree-view.entry.js +9 -9
  123. package/dist/esm/dso-viewer-grid.entry.js +4 -4
  124. package/dist/esm/{focus-trap.esm-299989f2.js → focus-trap.esm-a01ad6c9.js} +102 -68
  125. package/dist/esm/{index-d54cae76.js → index-9ec8c07f.js} +73 -64
  126. package/dist/esm/index.esm-45465af7.js +422 -0
  127. package/dist/esm/loader.js +2 -2
  128. package/dist/types/components/header/header.d.ts +7 -1
  129. package/dist/types/components/header/header.template.d.ts +1 -1
  130. package/dist/types/components/ozon-content/get-node-name.function.d.ts +1 -0
  131. package/dist/types/components/ozon-content/nodes/noot.node.d.ts +2 -2
  132. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
  133. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +0 -1
  134. package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +0 -1
  135. package/dist/types/components/ozon-content/ozon-content.d.ts +0 -1
  136. package/dist/types/components.d.ts +3 -2
  137. package/dist/types/icon/dso-icon-sass-function.d.ts +1 -1
  138. package/package.json +28 -26
  139. package/dist/cjs/index.esm-2ac7081c.js +0 -267
  140. package/dist/dso-toolkit/p-44905fb1.js +0 -5
  141. package/dist/dso-toolkit/p-88bc5873.entry.js +0 -1
  142. package/dist/dso-toolkit/p-8b6e3abc.entry.js +0 -1
  143. package/dist/dso-toolkit/p-8bf3a60e.js +0 -5
  144. package/dist/dso-toolkit/p-a7306b7b.entry.js +0 -1
  145. package/dist/dso-toolkit/p-daa1e29d.entry.js +0 -1
  146. package/dist/dso-toolkit/p-f193c258.entry.js +0 -1
  147. package/dist/esm/index.esm-a1362957.js +0 -262
@@ -0,0 +1,422 @@
1
+ /*!
2
+ * tabbable 5.3.1
3
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
+ */
5
+ var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
6
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
7
+ var NoElement = typeof Element === 'undefined';
8
+ var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
9
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
10
+ return element.getRootNode();
11
+ } : function (element) {
12
+ return element.ownerDocument;
13
+ };
14
+ /**
15
+ * @param {Element} el container to check in
16
+ * @param {boolean} includeContainer add container to check
17
+ * @param {(node: Element) => boolean} filter filter candidates
18
+ * @returns {Element[]}
19
+ */
20
+
21
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
22
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
23
+
24
+ if (includeContainer && matches.call(el, candidateSelector)) {
25
+ candidates.unshift(el);
26
+ }
27
+
28
+ candidates = candidates.filter(filter);
29
+ return candidates;
30
+ };
31
+ /**
32
+ * @callback GetShadowRoot
33
+ * @param {Element} element to check for shadow root
34
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
35
+ */
36
+
37
+ /**
38
+ * @typedef {Object} CandidatesScope
39
+ * @property {Element} scope contains inner candidates
40
+ * @property {Element[]} candidates
41
+ */
42
+
43
+ /**
44
+ * @typedef {Object} IterativeOptions
45
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
46
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
47
+ * or a boolean stating if it has an undisclosed shadow root
48
+ * @property {(node: Element) => boolean} filter filter candidates
49
+ * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list
50
+ */
51
+
52
+ /**
53
+ * @param {Element[]} elements list of element containers to match candidates from
54
+ * @param {boolean} includeContainer add container list to check
55
+ * @param {IterativeOptions} options
56
+ * @returns {Array.<Element|CandidatesScope>}
57
+ */
58
+
59
+
60
+ var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
61
+ var candidates = [];
62
+ var elementsToCheck = Array.from(elements);
63
+
64
+ while (elementsToCheck.length) {
65
+ var element = elementsToCheck.shift();
66
+
67
+ if (element.tagName === 'SLOT') {
68
+ // add shadow dom slot scope (slot itself cannot be focusable)
69
+ var assigned = element.assignedElements();
70
+ var content = assigned.length ? assigned : element.children;
71
+ var nestedCandidates = getCandidatesIteratively(content, true, options);
72
+
73
+ if (options.flatten) {
74
+ candidates.push.apply(candidates, nestedCandidates);
75
+ } else {
76
+ candidates.push({
77
+ scope: element,
78
+ candidates: nestedCandidates
79
+ });
80
+ }
81
+ } else {
82
+ // check candidate element
83
+ var validCandidate = matches.call(element, candidateSelector);
84
+
85
+ if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
86
+ candidates.push(element);
87
+ } // iterate over shadow content if possible
88
+
89
+
90
+ var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
91
+ typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
92
+
93
+ if (shadowRoot) {
94
+ // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
95
+ // shadow exists, so look at light dom children as fallback BUT create a scope for any
96
+ // child candidates found because they're likely slotted elements (elements that are
97
+ // children of the web component element (which has the shadow), in the light dom, but
98
+ // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
99
+ // _after_ we return from this recursive call
100
+ var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
101
+
102
+ if (options.flatten) {
103
+ candidates.push.apply(candidates, _nestedCandidates);
104
+ } else {
105
+ candidates.push({
106
+ scope: element,
107
+ candidates: _nestedCandidates
108
+ });
109
+ }
110
+ } else {
111
+ // there's not shadow so just dig into the element's (light dom) children
112
+ // __without__ giving the element special scope treatment
113
+ elementsToCheck.unshift.apply(elementsToCheck, element.children);
114
+ }
115
+ }
116
+ }
117
+
118
+ return candidates;
119
+ };
120
+
121
+ var getTabindex = function getTabindex(node, isScope) {
122
+ if (node.tabIndex < 0) {
123
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
124
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
125
+ // yet they are still part of the regular tab order; in FF, they get a default
126
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
127
+ // order, consider their tab index to be 0.
128
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
129
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
130
+ //
131
+ // isScope is positive for custom element with shadow root or slot that by default
132
+ // have tabIndex -1, but need to be sorted by document order in order for their
133
+ // content to be inserted in the correct position
134
+ if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
135
+ return 0;
136
+ }
137
+ }
138
+
139
+ return node.tabIndex;
140
+ };
141
+
142
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
143
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
144
+ };
145
+
146
+ var isInput = function isInput(node) {
147
+ return node.tagName === 'INPUT';
148
+ };
149
+
150
+ var isHiddenInput = function isHiddenInput(node) {
151
+ return isInput(node) && node.type === 'hidden';
152
+ };
153
+
154
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
155
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
156
+ return child.tagName === 'SUMMARY';
157
+ });
158
+ return r;
159
+ };
160
+
161
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
162
+ for (var i = 0; i < nodes.length; i++) {
163
+ if (nodes[i].checked && nodes[i].form === form) {
164
+ return nodes[i];
165
+ }
166
+ }
167
+ };
168
+
169
+ var isTabbableRadio = function isTabbableRadio(node) {
170
+ if (!node.name) {
171
+ return true;
172
+ }
173
+
174
+ var radioScope = node.form || getRootNode(node);
175
+
176
+ var queryRadios = function queryRadios(name) {
177
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
178
+ };
179
+
180
+ var radioSet;
181
+
182
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
183
+ radioSet = queryRadios(window.CSS.escape(node.name));
184
+ } else {
185
+ try {
186
+ radioSet = queryRadios(node.name);
187
+ } catch (err) {
188
+ // eslint-disable-next-line no-console
189
+ console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
190
+ return false;
191
+ }
192
+ }
193
+
194
+ var checked = getCheckedRadio(radioSet, node.form);
195
+ return !checked || checked === node;
196
+ };
197
+
198
+ var isRadio = function isRadio(node) {
199
+ return isInput(node) && node.type === 'radio';
200
+ };
201
+
202
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
203
+ return isRadio(node) && !isTabbableRadio(node);
204
+ };
205
+
206
+ var isZeroArea = function isZeroArea(node) {
207
+ var _node$getBoundingClie = node.getBoundingClientRect(),
208
+ width = _node$getBoundingClie.width,
209
+ height = _node$getBoundingClie.height;
210
+
211
+ return width === 0 && height === 0;
212
+ };
213
+
214
+ var isHidden = function isHidden(node, _ref) {
215
+ var displayCheck = _ref.displayCheck,
216
+ getShadowRoot = _ref.getShadowRoot;
217
+
218
+ if (getComputedStyle(node).visibility === 'hidden') {
219
+ return true;
220
+ }
221
+
222
+ var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
223
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
224
+
225
+ if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
226
+ return true;
227
+ }
228
+
229
+ if (!displayCheck || displayCheck === 'full') {
230
+ if (typeof getShadowRoot === 'function') {
231
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
232
+ // 'non-zero-area' fallback
233
+ var originalNode = node;
234
+
235
+ while (node) {
236
+ var parentElement = node.parentElement;
237
+ var rootNode = getRootNode(node);
238
+
239
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
240
+ ) {
241
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
242
+ // fall back to a non-zero-area test
243
+ return isZeroArea(node);
244
+ } else if (node.assignedSlot) {
245
+ // iterate up slot
246
+ node = node.assignedSlot;
247
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
248
+ // cross shadow boundary
249
+ node = rootNode.host;
250
+ } else {
251
+ // iterate up normal dom
252
+ node = parentElement;
253
+ }
254
+ }
255
+
256
+ node = originalNode;
257
+ } // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
258
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
259
+ // it might be a falsy value, which means shadow DOM support is disabled
260
+ // didn't find it sitting in an undisclosed shadow (or shadows are disabled) so now we
261
+ // can just test to see if it would normally be visible or not
262
+ // this works wherever the node is: if there's at least one client rect, it's
263
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
264
+ // node itself is hidden in place of its contents; and there's no need to search
265
+ // up the hierarchy either
266
+
267
+
268
+ return !node.getClientRects().length;
269
+ } else if (displayCheck === 'non-zero-area') {
270
+ return isZeroArea(node);
271
+ }
272
+
273
+ return false;
274
+ }; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
275
+ // unless they are in the _first_ <legend> element of the top-most disabled
276
+ // fieldset
277
+
278
+
279
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
280
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
281
+ var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>
282
+
283
+ while (parentNode) {
284
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
285
+ // look for the first <legend> among the children of the disabled <fieldset>
286
+ for (var i = 0; i < parentNode.children.length; i++) {
287
+ var child = parentNode.children.item(i); // when the first <legend> (in document order) is found
288
+
289
+ if (child.tagName === 'LEGEND') {
290
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
291
+ // return whether `node` is a descendant of its first <legend>
292
+ return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
293
+ }
294
+ } // the disabled <fieldset> containing `node` has no <legend>
295
+
296
+
297
+ return true;
298
+ }
299
+
300
+ parentNode = parentNode.parentElement;
301
+ }
302
+ } // else, node's tabbable/focusable state should not be affected by a fieldset's
303
+ // enabled/disabled state
304
+
305
+
306
+ return false;
307
+ };
308
+
309
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
310
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
311
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
312
+ return false;
313
+ }
314
+
315
+ return true;
316
+ };
317
+
318
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
319
+ if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
320
+ return false;
321
+ }
322
+
323
+ return true;
324
+ };
325
+ /**
326
+ * @param {Array.<Element|CandidatesScope>} candidates
327
+ * @returns Element[]
328
+ */
329
+
330
+
331
+ var sortByOrder = function sortByOrder(candidates) {
332
+ var regularTabbables = [];
333
+ var orderedTabbables = [];
334
+ candidates.forEach(function (item, i) {
335
+ var isScope = !!item.scope;
336
+ var element = isScope ? item.scope : item;
337
+ var candidateTabindex = getTabindex(element, isScope);
338
+ var elements = isScope ? sortByOrder(item.candidates) : element;
339
+
340
+ if (candidateTabindex === 0) {
341
+ isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
342
+ } else {
343
+ orderedTabbables.push({
344
+ documentOrder: i,
345
+ tabIndex: candidateTabindex,
346
+ item: item,
347
+ isScope: isScope,
348
+ content: elements
349
+ });
350
+ }
351
+ });
352
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
353
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
354
+ return acc;
355
+ }, []).concat(regularTabbables);
356
+ };
357
+
358
+ var tabbable = function tabbable(el, options) {
359
+ options = options || {};
360
+ var candidates;
361
+
362
+ if (options.getShadowRoot) {
363
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
364
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
365
+ flatten: false,
366
+ getShadowRoot: options.getShadowRoot
367
+ });
368
+ } else {
369
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
370
+ }
371
+
372
+ return sortByOrder(candidates);
373
+ };
374
+
375
+ var focusable = function focusable(el, options) {
376
+ options = options || {};
377
+ var candidates;
378
+
379
+ if (options.getShadowRoot) {
380
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
381
+ filter: isNodeMatchingSelectorFocusable.bind(null, options),
382
+ flatten: true,
383
+ getShadowRoot: options.getShadowRoot
384
+ });
385
+ } else {
386
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
387
+ }
388
+
389
+ return candidates;
390
+ };
391
+
392
+ var isTabbable = function isTabbable(node, options) {
393
+ options = options || {};
394
+
395
+ if (!node) {
396
+ throw new Error('No node provided');
397
+ }
398
+
399
+ if (matches.call(node, candidateSelector) === false) {
400
+ return false;
401
+ }
402
+
403
+ return isNodeMatchingSelectorTabbable(options, node);
404
+ };
405
+
406
+ var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
407
+
408
+ var isFocusable = function isFocusable(node, options) {
409
+ options = options || {};
410
+
411
+ if (!node) {
412
+ throw new Error('No node provided');
413
+ }
414
+
415
+ if (matches.call(node, focusableCandidateSelector) === false) {
416
+ return false;
417
+ }
418
+
419
+ return isNodeMatchingSelectorFocusable(options, node);
420
+ };
421
+
422
+ export { isFocusable as a, focusable as f, isTabbable as i, tabbable as t };
@@ -1,7 +1,7 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-d54cae76.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-9ec8c07f.js';
2
2
 
3
3
  /*
4
- Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
4
+ Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
5
5
  */
6
6
  const patchEsm = () => {
7
7
  return promiseResolve();
@@ -1,3 +1,8 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
+ export interface HeaderMenuItemClickEvent {
3
+ originalEvent: MouseEvent;
4
+ menuItem: HeaderMenuItem;
5
+ }
1
6
  export interface HeaderMenuItem {
2
7
  label: string;
3
8
  url: string;
@@ -16,6 +21,7 @@ export declare class Header {
16
21
  host: HTMLElement;
17
22
  hasSubLogo: boolean;
18
23
  overflowMenuItems: number;
24
+ menuItemClick: EventEmitter<HeaderMenuItemClickEvent>;
19
25
  watchUseDropDownMenu(value: "always" | "never" | "auto"): void;
20
26
  wrapper: HTMLDivElement | undefined;
21
27
  nav: HTMLUListElement | undefined;
@@ -31,6 +37,6 @@ export declare class Header {
31
37
  };
32
38
  connectedCallback(): void;
33
39
  disconnectedCallback(): void;
34
- MenuItem(item: HeaderMenuItem): any;
40
+ MenuItem: (item: HeaderMenuItem) => any;
35
41
  render(): any;
36
42
  }
@@ -1,2 +1,2 @@
1
1
  import { Header } from "@dso-toolkit/sources";
2
- export declare function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, }: Header): import("lit-html").TemplateResult<1>;
2
+ export declare function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, menuItemClick, }: Header): import("lit-html").TemplateResult<1>;
@@ -0,0 +1 @@
1
+ export declare function getNodeName(node: Node): string;
@@ -3,6 +3,6 @@ import { OzonContentNode } from '../ozon-content-node.interface';
3
3
  export declare class OzonContentNootNode implements OzonContentNode {
4
4
  name: string;
5
5
  handles: string[];
6
- identify(node: Element): string | undefined;
7
- render(node: Element, { mapNodeToJsx, state: noteIsOpen, setState }: OzonContentNodeContext<boolean>): any;
6
+ identify(): string | undefined;
7
+ render(node: Element, { mapNodeToJsx, state: openNoteId, setState }: OzonContentNodeContext<string | undefined>): any;
8
8
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { OzonContentContext } from './ozon-content-context.interface';
3
2
  export declare class Mapper {
4
3
  private cache;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface OzonContentNodeContext<T = unknown> {
3
2
  path: Node[];
4
3
  mapNodeToJsx(node: Node | Node[] | NodeList): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { OzonContentNodeContext } from './ozon-content-node-context.interface';
3
2
  export interface OzonContentNode<T = unknown> {
4
3
  name: string | string[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
3
2
  import { OzonContentAnchorClick } from './ozon-content.interfaces';
4
3
  import { OzonContentNodeState } from './ozon-content-node-state.interface';
@@ -7,7 +7,7 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Suggestion } from "./components/autosuggest/autosuggest";
9
9
  import { DsoDatePickerChangeEvent, DsoDatePickerDirection, DsoDatePickerFocusEvent, DsoDatePickerKeyboardEvent } from "./components/date-picker/date-picker";
10
- import { HeaderMenuItem } from "./components/header/header";
10
+ import { HeaderMenuItem, HeaderMenuItemClickEvent } from "./components/header/header";
11
11
  import { InfoButtonToggleEvent } from "./components/info-button/info-button";
12
12
  import { BaseLayer, BaseLayerChangeEvent } from "./components/map-base-layers/map-base-layers.interfaces";
13
13
  import { Overlay, OverlayChangeEvent } from "./components/map-overlays/map-overlays.interfaces";
@@ -549,7 +549,8 @@ declare namespace LocalJSX {
549
549
  "isLoggedIn"?: boolean;
550
550
  "loginUrl"?: string;
551
551
  "logoutUrl"?: string;
552
- "mainMenu": HeaderMenuItem[];
552
+ "mainMenu"?: HeaderMenuItem[];
553
+ "onMenuItemClick"?: (event: CustomEvent<HeaderMenuItemClickEvent>) => void;
553
554
  "useDropDownMenu"?: "always" | "never" | "auto";
554
555
  "userHomeUrl"?: string;
555
556
  "userProfileName"?: string;
@@ -1,4 +1,4 @@
1
1
  import { instance as sass } from '@stencil/sass';
2
2
  export declare const dsoIcon: {
3
- 'dso-icon($icon, $variant: null)': (sassIconAlias: typeof sass.types.SassType, sassVariant: typeof sass.types.String | typeof sass.types.Null) => import("sass").types.String;
3
+ 'dso-icon($icon, $variant: null)': (sassIconAlias: typeof sass.types.String, sassVariant: typeof sass.types.String | typeof sass.types.Null) => import("sass").types.String;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "35.0.0",
3
+ "version": "36.0.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -26,45 +26,47 @@
26
26
  "bin_build-storybook": "build-storybook"
27
27
  },
28
28
  "devDependencies": {
29
- "@babel/core": "^7.15.8",
29
+ "@babel/core": "^7.17.9",
30
30
  "@dso-toolkit/sources": "0.0.0",
31
- "@popperjs/core": "^2.11.2",
32
- "@stencil/core": "2.9.0",
33
- "@stencil/react-output-target": "0.1.0",
31
+ "@popperjs/core": "^2.11.5",
32
+ "@stencil/core": "2.10.0",
33
+ "@stencil/react-output-target": "^0.3.1",
34
34
  "@stencil/sass": "1.5.2",
35
- "@storybook/addon-a11y": "6.3.12",
36
- "@storybook/addon-essentials": "6.3.12",
37
- "@storybook/addons": "6.3.12",
38
- "@storybook/web-components": "6.3.12",
39
- "@types/concurrently": "^6.3.0",
35
+ "@storybook/addon-a11y": "6.4.22",
36
+ "@storybook/addon-essentials": "6.4.22",
37
+ "@storybook/addons": "6.4.22",
38
+ "@storybook/builder-webpack5": "6.4.22",
39
+ "@storybook/manager-webpack5": "6.4.22",
40
+ "@storybook/web-components": "6.4.22",
41
+ "@types/concurrently": "^7.0.0",
40
42
  "@types/debounce": "^1.2.1",
41
- "@types/sass": "1.16.1",
42
- "@types/uuid": "^8.3.1",
43
- "@types/validator": "^13.6.5",
43
+ "@types/sass": "^1.43.1",
44
+ "@types/uuid": "^8.3.4",
45
+ "@types/validator": "^13.7.2",
44
46
  "@whitespace/storybook-addon-html": "5.0.0",
45
- "axe-core": "^4.3.3",
46
- "babel-loader": "^8.2.2",
47
+ "axe-core": "^4.4.1",
48
+ "babel-loader": "^8.2.5",
47
49
  "cheerio": "1.0.0-rc.10",
48
50
  "clsx": "1.1.1",
49
- "concurrently": "^6.3.0",
51
+ "concurrently": "^7.1.0",
50
52
  "cross-env": "^7.0.3",
51
53
  "debounce": "^1.2.1",
52
54
  "escape-string-regexp": "^5.0.0",
53
- "focus-trap": "^6.7.3",
54
- "http-proxy-middleware": "^2.0.1",
55
- "lit-html": "^2.0.1",
56
- "mini-svg-data-uri": "1.4.3",
57
- "minimist": "^1.2.5",
55
+ "focus-trap": "^6.8.1",
56
+ "http-proxy-middleware": "^2.0.6",
57
+ "lit-html": "^2.2.2",
58
+ "mini-svg-data-uri": "1.4.4",
59
+ "minimist": "^1.2.6",
58
60
  "popper-max-size-modifier": "^0.2.0",
59
61
  "react": "^17.0.2",
60
62
  "react-dom": "^17.0.2",
61
63
  "rimraf": "^3.0.2",
62
64
  "stencil-inline-svg": "1.1.0",
63
- "tabbable": "^5.2.1",
64
- "typescript": "4.4.4",
65
+ "tabbable": "^5.3.1",
66
+ "typescript": "^4.5.0",
65
67
  "uuid": "^8.3.2",
66
- "validator": "^13.6.0",
67
- "wait-on": "^6.0.0",
68
- "webpack": "^5.58.2"
68
+ "validator": "^13.7.0",
69
+ "wait-on": "^6.0.1",
70
+ "webpack": "^5.72.0"
69
71
  }
70
72
  }