@dso-toolkit/core 52.0.3 → 53.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +39 -1404
  2. package/dist/cjs/dso-action-list-item.cjs.entry.js +27 -0
  3. package/dist/cjs/dso-action-list.cjs.entry.js +20 -0
  4. package/dist/cjs/dso-annotation-output.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +18 -3
  8. package/dist/cjs/dso-expandable-heading.cjs.entry.js +6 -2
  9. package/dist/cjs/dso-expandable.cjs.entry.js +1433 -2
  10. package/dist/cjs/dso-header.cjs.entry.js +16 -1
  11. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +2 -2
  12. package/dist/cjs/dso-image-overlay.cjs.entry.js +2 -2
  13. package/dist/cjs/dso-info_2.cjs.entry.js +3 -2
  14. package/dist/cjs/dso-label.cjs.entry.js +1 -8
  15. package/dist/cjs/dso-list-button.cjs.entry.js +3 -3
  16. package/dist/cjs/dso-modal.cjs.entry.js +2 -2
  17. package/dist/cjs/dso-ozon-content.cjs.entry.js +2 -2
  18. package/dist/cjs/dso-table.cjs.entry.js +2 -2
  19. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  20. package/dist/cjs/dso-tooltip.cjs.entry.js +14 -12
  21. package/dist/cjs/dso-viewer-grid.cjs.entry.js +2 -2
  22. package/dist/cjs/expandable.interfaces-19b608b9.js +7 -0
  23. package/dist/cjs/{focus-trap.esm-c501d382.js → focus-trap.esm-a5b7273f.js} +134 -51
  24. package/dist/cjs/{has-overflow-b1b4f3f3.js → has-overflow-dd552ec8.js} +3 -4
  25. package/dist/cjs/index.cjs.js +67 -0
  26. package/dist/cjs/{index.esm-03a9e0b4.js → index.esm-0e935715.js} +97 -17
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/collection/collection-manifest.json +3 -1
  29. package/dist/collection/components/accordion/accordion.js +1 -1
  30. package/dist/collection/components/accordion/components/accordion-section.css +60 -10
  31. package/dist/collection/components/accordion/components/accordion-section.js +41 -100
  32. package/dist/collection/components/action-list/action-list.css +25 -0
  33. package/dist/collection/components/action-list/action-list.js +42 -0
  34. package/dist/collection/components/action-list/components/action-list-item.css +81 -0
  35. package/dist/collection/components/action-list/components/action-list-item.js +120 -0
  36. package/dist/collection/components/annotation-output/annotation-output.js +1 -1
  37. package/dist/collection/components/card-container/card-container.css +15 -1
  38. package/dist/collection/components/date-picker/date-picker.css +1 -1
  39. package/dist/collection/components/date-picker/date-picker.js +1 -1
  40. package/dist/collection/components/dropdown-menu/dropdown-menu.js +36 -1
  41. package/dist/collection/components/expandable/expandable.css +12 -1
  42. package/dist/collection/components/expandable/expandable.interfaces.js +3 -0
  43. package/dist/collection/components/expandable/expandable.js +246 -2
  44. package/dist/collection/components/expandable-heading/expandable-heading.css +34 -0
  45. package/dist/collection/components/expandable-heading/expandable-heading.js +28 -2
  46. package/dist/collection/components/header/header.js +18 -2
  47. package/dist/collection/components/label/label.js +1 -8
  48. package/dist/collection/components/list-button/list-button.css +2 -2
  49. package/dist/collection/components/modal/modal-ref.js +18 -0
  50. package/dist/collection/components/modal/modal.controller.js +47 -0
  51. package/dist/collection/components/modal/modal.js +3 -7
  52. package/dist/collection/components/ozon-content/ozon-content.css +8 -0
  53. package/dist/collection/components/selectable/selectable.css +22 -9
  54. package/dist/collection/components/selectable/selectable.js +2 -1
  55. package/dist/collection/components/tooltip/tooltip.js +13 -11
  56. package/dist/collection/index.js +2 -0
  57. package/dist/components/dropdown-menu.js +17 -1
  58. package/dist/components/dso-accordion-section.js +52 -1407
  59. package/dist/components/dso-action-list-item.d.ts +11 -0
  60. package/dist/components/dso-action-list-item.js +53 -0
  61. package/dist/components/dso-action-list.d.ts +11 -0
  62. package/dist/components/dso-action-list.js +36 -0
  63. package/dist/components/dso-annotation-output.js +1 -1
  64. package/dist/components/dso-card-container.js +1 -1
  65. package/dist/components/dso-date-picker.js +2 -2
  66. package/dist/components/dso-expandable-heading.js +9 -4
  67. package/dist/components/dso-header.js +18 -2
  68. package/dist/components/dso-label.js +1 -8
  69. package/dist/components/dso-list-button.js +1 -1
  70. package/dist/components/dso-ozon-content.js +1 -1
  71. package/dist/components/expandable.js +1440 -4
  72. package/dist/components/focus-trap.esm.js +133 -50
  73. package/dist/components/has-overflow.js +3 -4
  74. package/dist/components/index.d.ts +2 -0
  75. package/dist/components/index.esm.js +97 -17
  76. package/dist/components/index.js +71 -1
  77. package/dist/components/selectable.js +3 -2
  78. package/dist/components/tooltip.js +13 -11
  79. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  80. package/dist/dso-toolkit/index.esm.js +1 -1
  81. package/dist/dso-toolkit/{p-e4f667b3.entry.js → p-0b6fa7d3.entry.js} +1 -1
  82. package/dist/dso-toolkit/p-36224d6f.entry.js +1 -0
  83. package/dist/dso-toolkit/{p-9b07b034.entry.js → p-398a8e0b.entry.js} +1 -1
  84. package/dist/dso-toolkit/p-3b91c3e9.entry.js +1 -0
  85. package/dist/dso-toolkit/p-452b1234.js +1 -0
  86. package/dist/dso-toolkit/p-5950644a.js +5 -0
  87. package/dist/dso-toolkit/p-5de8b79a.entry.js +1 -0
  88. package/dist/dso-toolkit/p-5e50b616.entry.js +1 -0
  89. package/dist/dso-toolkit/p-69f37ab3.entry.js +1 -0
  90. package/dist/dso-toolkit/p-6a99d7f8.entry.js +1 -0
  91. package/dist/dso-toolkit/p-8a77030b.entry.js +1 -0
  92. package/dist/dso-toolkit/p-91963e3d.js +5 -0
  93. package/dist/dso-toolkit/p-96f44d35.entry.js +1 -0
  94. package/dist/dso-toolkit/p-975c172a.entry.js +1 -0
  95. package/dist/dso-toolkit/{p-092dde2f.entry.js → p-a1616935.entry.js} +1 -1
  96. package/dist/dso-toolkit/{p-ba330644.entry.js → p-bb90ea4c.entry.js} +1 -1
  97. package/dist/dso-toolkit/p-bf750b97.js +1 -0
  98. package/dist/dso-toolkit/{p-aab458c4.entry.js → p-c86a5bcb.entry.js} +1 -1
  99. package/dist/dso-toolkit/{p-f2b76233.entry.js → p-cf9b79df.entry.js} +1 -1
  100. package/dist/dso-toolkit/{p-43f3d736.entry.js → p-d10ec2b3.entry.js} +1 -1
  101. package/dist/dso-toolkit/p-e8a6ccf5.entry.js +1 -0
  102. package/dist/dso-toolkit/p-eaae698e.entry.js +1 -0
  103. package/dist/dso-toolkit/p-fa2f1a1c.entry.js +1 -0
  104. package/dist/dso-toolkit/p-fe7ca25f.entry.js +1 -0
  105. package/dist/esm/dso-accordion-section.entry.js +39 -1404
  106. package/dist/esm/dso-action-list-item.entry.js +23 -0
  107. package/dist/esm/dso-action-list.entry.js +16 -0
  108. package/dist/esm/dso-annotation-output.entry.js +1 -1
  109. package/dist/esm/dso-card-container.entry.js +1 -1
  110. package/dist/esm/dso-date-picker.entry.js +1 -1
  111. package/dist/esm/dso-dropdown-menu.entry.js +18 -3
  112. package/dist/esm/dso-expandable-heading.entry.js +7 -3
  113. package/dist/esm/dso-expandable.entry.js +1434 -3
  114. package/dist/esm/dso-header.entry.js +16 -1
  115. package/dist/esm/dso-helpcenter-panel.entry.js +2 -2
  116. package/dist/esm/dso-image-overlay.entry.js +2 -2
  117. package/dist/esm/dso-info_2.entry.js +3 -2
  118. package/dist/esm/dso-label.entry.js +1 -8
  119. package/dist/esm/dso-list-button.entry.js +3 -3
  120. package/dist/esm/dso-modal.entry.js +2 -2
  121. package/dist/esm/dso-ozon-content.entry.js +2 -2
  122. package/dist/esm/dso-table.entry.js +2 -2
  123. package/dist/esm/dso-toolkit.js +1 -1
  124. package/dist/esm/dso-tooltip.entry.js +14 -12
  125. package/dist/esm/dso-viewer-grid.entry.js +2 -2
  126. package/dist/esm/expandable.interfaces-9b1afbe8.js +5 -0
  127. package/dist/esm/{focus-trap.esm-94794d92.js → focus-trap.esm-2a49a38f.js} +134 -51
  128. package/dist/esm/{has-overflow-c44a8a0a.js → has-overflow-fdc85d8f.js} +3 -4
  129. package/dist/esm/{index.esm-8fc07ad8.js → index.esm-3d6c8190.js} +97 -17
  130. package/dist/esm/index.js +69 -0
  131. package/dist/esm/loader.js +1 -1
  132. package/dist/types/components/accordion/accordion.interfaces.d.ts +1 -1
  133. package/dist/types/components/accordion/components/accordion-section.d.ts +4 -8
  134. package/dist/types/components/action-list/action-list.d.ts +5 -0
  135. package/dist/types/components/action-list/components/action-list-item.d.ts +15 -0
  136. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +5 -0
  137. package/dist/types/components/expandable/expandable.d.ts +25 -1
  138. package/dist/types/components/expandable/expandable.interfaces.d.ts +10 -0
  139. package/dist/types/components/expandable-heading/expandable-heading.d.ts +2 -1
  140. package/dist/types/components/expandable-heading/expandable-heading.interfaces.d.ts +1 -0
  141. package/dist/types/components/header/header.d.ts +3 -0
  142. package/dist/types/components/label/label.d.ts +0 -1
  143. package/dist/types/components/modal/modal-ref.d.ts +8 -0
  144. package/dist/types/components/modal/modal.controller.d.ts +6 -0
  145. package/dist/types/components/modal/modal.d.ts +1 -2
  146. package/dist/types/components/modal/modal.interfaces.d.ts +12 -0
  147. package/dist/types/components.d.ts +82 -4
  148. package/dist/types/index.d.ts +2 -0
  149. package/package.json +11 -11
  150. package/dist/dso-toolkit/p-0fcdc369.entry.js +0 -1
  151. package/dist/dso-toolkit/p-147ec7bd.entry.js +0 -1
  152. package/dist/dso-toolkit/p-22f9240a.entry.js +0 -1
  153. package/dist/dso-toolkit/p-3635427a.js +0 -5
  154. package/dist/dso-toolkit/p-3b83e9c6.entry.js +0 -1
  155. package/dist/dso-toolkit/p-452c7fbb.entry.js +0 -1
  156. package/dist/dso-toolkit/p-4ae40ddc.entry.js +0 -1
  157. package/dist/dso-toolkit/p-4c8426b7.entry.js +0 -1
  158. package/dist/dso-toolkit/p-57ceabab.js +0 -5
  159. package/dist/dso-toolkit/p-9984079e.entry.js +0 -1
  160. package/dist/dso-toolkit/p-cece17a5.entry.js +0 -1
  161. package/dist/dso-toolkit/p-d3ed00f6.js +0 -1
  162. package/dist/dso-toolkit/p-e3bd7689.entry.js +0 -1
  163. package/dist/dso-toolkit/p-f3f0d6c9.entry.js +0 -1
@@ -1,17 +1,66 @@
1
1
  'use strict';
2
2
 
3
3
  /*!
4
- * tabbable 6.0.1
4
+ * tabbable 6.1.2
5
5
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
6
6
  */
7
- 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'];
7
+ // NOTE: separate `:not()` selectors has broader browser support than the newer
8
+ // `:not([inert], [inert] *)` (Feb 2023)
9
+ // CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
10
+ // the entire query to fail, resulting in no nodes found, which will break a lot
11
+ // of things... so we have to rely on JS to identify nodes inside an inert container
12
+ var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
8
13
  var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
9
14
  var NoElement = typeof Element === 'undefined';
10
15
  var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
11
16
  var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
12
- return element.getRootNode();
17
+ var _element$getRootNode;
18
+ return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
13
19
  } : function (element) {
14
- return element.ownerDocument;
20
+ return element === null || element === void 0 ? void 0 : element.ownerDocument;
21
+ };
22
+
23
+ /**
24
+ * Determines if a node is inert or in an inert ancestor.
25
+ * @param {Element} [node]
26
+ * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
27
+ * see if any of them are inert. If false, only `node` itself is considered.
28
+ * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
29
+ * False if `node` is falsy.
30
+ */
31
+ var isInert = function isInert(node, lookUp) {
32
+ var _node$getAttribute;
33
+ if (lookUp === void 0) {
34
+ lookUp = true;
35
+ }
36
+ // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
37
+ // JS API property; we have to check the attribute, which can either be empty or 'true';
38
+ // if it's `null` (not specified) or 'false', it's an active element
39
+ var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
40
+ var inert = inertAtt === '' || inertAtt === 'true';
41
+
42
+ // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
43
+ // if it weren't for `matches()` not being a function on shadow roots; the following
44
+ // code works for any kind of node
45
+ // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
46
+ // so it likely would not support `:is([inert] *)` either...
47
+ var result = inert || lookUp && node && isInert(node.parentNode); // recursive
48
+
49
+ return result;
50
+ };
51
+
52
+ /**
53
+ * Determines if a node's content is editable.
54
+ * @param {Element} [node]
55
+ * @returns True if it's content-editable; false if it's not or `node` is falsy.
56
+ */
57
+ var isContentEditable = function isContentEditable(node) {
58
+ var _node$getAttribute2;
59
+ // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
60
+ // to use the attribute directly to check for this, which can either be empty or 'true';
61
+ // if it's `null` (not specified) or 'false', it's a non-editable element
62
+ var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
63
+ return attValue === '' || attValue === 'true';
15
64
  };
16
65
 
17
66
  /**
@@ -21,6 +70,11 @@ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (elemen
21
70
  * @returns {Element[]}
22
71
  */
23
72
  var getCandidates = function getCandidates(el, includeContainer, filter) {
73
+ // even if `includeContainer=false`, we still have to check it for inertness because
74
+ // if it's inert, all its children are inert
75
+ if (isInert(el)) {
76
+ return [];
77
+ }
24
78
  var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
25
79
  if (includeContainer && matches.call(el, candidateSelector)) {
26
80
  candidates.unshift(el);
@@ -68,6 +122,11 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
68
122
  var elementsToCheck = Array.from(elements);
69
123
  while (elementsToCheck.length) {
70
124
  var element = elementsToCheck.shift();
125
+ if (isInert(element, false)) {
126
+ // no need to look up since we're drilling down
127
+ // anything inside this container will also be inert
128
+ continue;
129
+ }
71
130
  if (element.tagName === 'SLOT') {
72
131
  // add shadow dom slot scope (slot itself cannot be focusable)
73
132
  var assigned = element.assignedElements();
@@ -92,7 +151,11 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
92
151
  var shadowRoot = element.shadowRoot ||
93
152
  // check for an undisclosed shadow
94
153
  typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
95
- var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
154
+
155
+ // no inert look up because we're already drilling down and checking for inertness
156
+ // on the way down, so all containers to this root node should have already been
157
+ // vetted as non-inert
158
+ var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
96
159
  if (shadowRoot && validShadowRoot) {
97
160
  // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
98
161
  // shadow exists, so look at light dom children as fallback BUT create a scope for any
@@ -131,7 +194,7 @@ var getTabindex = function getTabindex(node, isScope) {
131
194
  // isScope is positive for custom element with shadow root or slot that by default
132
195
  // have tabIndex -1, but need to be sorted by document order in order for their
133
196
  // 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))) {
197
+ if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
135
198
  return 0;
136
199
  }
137
200
  }
@@ -191,7 +254,7 @@ var isNonTabbableRadio = function isNonTabbableRadio(node) {
191
254
 
192
255
  // determines if a node is ultimately attached to the window's document
193
256
  var isNodeAttached = function isNodeAttached(node) {
194
- var _nodeRootHost;
257
+ var _nodeRoot;
195
258
  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
196
259
  // (but NOT _the_ document; see second 'If' comment below for more).
197
260
  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
@@ -211,15 +274,28 @@ var isNodeAttached = function isNodeAttached(node) {
211
274
  // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
212
275
  // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
213
276
  // node is actually detached.
214
- var nodeRootHost = getRootNode(node).host;
215
- var attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && _nodeRootHost.ownerDocument.contains(nodeRootHost) || node.ownerDocument.contains(node));
216
- while (!attached && nodeRootHost) {
217
- var _nodeRootHost2;
218
- // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
219
- // which means we need to get the host's host and check if that parent host is contained
220
- // in (i.e. attached to) the document
221
- nodeRootHost = getRootNode(nodeRootHost).host;
222
- attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && _nodeRootHost2.ownerDocument.contains(nodeRootHost));
277
+ // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
278
+ // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
279
+ // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
280
+ // `ownerDocument` will be `null`, hence the optional chaining on it.
281
+ var nodeRoot = node && getRootNode(node);
282
+ var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
283
+
284
+ // in some cases, a detached node will return itself as the root instead of a document or
285
+ // shadow root object, in which case, we shouldn't try to look further up the host chain
286
+ var attached = false;
287
+ if (nodeRoot && nodeRoot !== node) {
288
+ var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
289
+ attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
290
+ while (!attached && nodeRootHost) {
291
+ var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
292
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
293
+ // which means we need to get the host's host and check if that parent host is contained
294
+ // in (i.e. attached to) the document
295
+ nodeRoot = getRootNode(nodeRootHost);
296
+ nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
297
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
298
+ }
223
299
  }
224
300
  return attached;
225
301
  };
@@ -354,7 +430,11 @@ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
354
430
  return false;
355
431
  };
356
432
  var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
357
- if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
433
+ if (node.disabled ||
434
+ // we must do an inert look up to filter out any elements inside an inert ancestor
435
+ // because we're limited in the type of selectors we can use in JSDom (see related
436
+ // note related to `candidateSelectors`)
437
+ isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
358
438
  // For a details element with a summary, the summary element gets the focus
359
439
  isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
360
440
  return false;
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"truncateLabel":[64],"syncLabelText":[64]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
17
+ return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"hover":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1],"editAction":[1,"edit-action"]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"truncateLabel":[64],"syncLabelText":[64]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item.cjs",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-action-list.cjs",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32],"getAnimeInstance":[64],"getBodyHeight":[64]}]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "entries": [
3
- "./components/modal/modal.js",
4
3
  "./components/accordion/accordion.js",
5
4
  "./components/accordion/components/accordion-section.js",
5
+ "./components/action-list/action-list.js",
6
+ "./components/action-list/components/action-list-item.js",
6
7
  "./components/alert/alert.js",
7
8
  "./components/annotation-button/annotation-button.js",
8
9
  "./components/annotation-output/annotation-output.js",
@@ -28,6 +29,7 @@
28
29
  "./components/map-base-layers/map-base-layers.js",
29
30
  "./components/map-controls/map-controls.js",
30
31
  "./components/map-overlays/map-overlays.js",
32
+ "./components/modal/modal.js",
31
33
  "./components/ozon-content/ozon-content.js",
32
34
  "./components/pagination/pagination.js",
33
35
  "./components/progress-bar/progress-bar.js",
@@ -129,7 +129,7 @@ export class Accordion {
129
129
  "mutable": false,
130
130
  "complexType": {
131
131
  "original": "AccordionVariant",
132
- "resolved": "\"compact\" | \"conclusion\" | \"default\" | undefined",
132
+ "resolved": "\"compact\" | \"conclusion\" | \"default\" | \"neutral\" | undefined",
133
133
  "references": {
134
134
  "AccordionVariant": {
135
135
  "location": "import",
@@ -43,7 +43,7 @@
43
43
  }
44
44
  :host .dso-section-handle > button,
45
45
  :host .dso-section-handle > a {
46
- align-items: center;
46
+ align-items: flex-start;
47
47
  background-color: transparent;
48
48
  border: 0;
49
49
  cursor: pointer;
@@ -88,10 +88,6 @@
88
88
  margin-left: 16px;
89
89
  }
90
90
 
91
- :host([open]) .dso-section-body {
92
- position: inherit;
93
- visibility: inherit;
94
- }
95
91
  :host([open]) .dso-section-handle > button .dso-section-handle-chevron:first-child,
96
92
  :host([open]) .dso-section-handle > a .dso-section-handle-chevron:first-child {
97
93
  transform: rotate(90deg);
@@ -105,11 +101,6 @@
105
101
  background-color: #fff;
106
102
  border-top: 0;
107
103
  margin-top: -4px;
108
- overflow-y: hidden;
109
- }
110
- .dso-section-body:not(.dso-animate-ready) {
111
- position: absolute;
112
- visibility: hidden;
113
104
  }
114
105
  .dso-section-body .dso-section-body-content {
115
106
  padding: 20px 16px 16px;
@@ -245,4 +236,63 @@
245
236
 
246
237
  :host(.dso-accordion-conclusion.dso-nested-accordion[open]) {
247
238
  background-color: #fff;
239
+ }
240
+
241
+ :host(.dso-accordion-neutral) .dso-section-handle {
242
+ background-color: transparent;
243
+ border: none;
244
+ border-radius: 4px;
245
+ margin-block-end: 2px;
246
+ }
247
+ :host(.dso-accordion-neutral) .dso-section-handle a,
248
+ :host(.dso-accordion-neutral) .dso-section-handle button {
249
+ color: #000;
250
+ padding: 5px 16px 5px 0;
251
+ }
252
+ :host(.dso-accordion-neutral) .dso-section-handle a:hover, :host(.dso-accordion-neutral) .dso-section-handle a:active, :host(.dso-accordion-neutral) .dso-section-handle a.active,
253
+ :host(.dso-accordion-neutral) .dso-section-handle button:hover,
254
+ :host(.dso-accordion-neutral) .dso-section-handle button:active,
255
+ :host(.dso-accordion-neutral) .dso-section-handle button.active {
256
+ color: #000;
257
+ }
258
+ :host(.dso-accordion-neutral) .dso-section-handle a .info-icon,
259
+ :host(.dso-accordion-neutral) .dso-section-handle button .info-icon {
260
+ color: #39870c;
261
+ margin-inline-start: 8px;
262
+ }
263
+ :host(.dso-accordion-neutral) .dso-section-body {
264
+ background-color: transparent;
265
+ border: 1px solid #275937;
266
+ box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.5);
267
+ margin-block: 0;
268
+ }
269
+ :host(.dso-accordion-neutral) .dso-section-body.dso-animate-ready {
270
+ transition: margin-block 260ms cubic-bezier(0.4, 0, 0.2, 1);
271
+ }
272
+ :host(.dso-accordion-neutral) .dso-section-body .dso-section-body-content {
273
+ padding: 16px 32px 24px 32px;
274
+ }
275
+
276
+ :host(.dso-accordion-neutral[open]) > .dso-section-handle {
277
+ background-color: transparant;
278
+ border-radius: 0;
279
+ border-top-left-radius: 4px;
280
+ border-top-right-radius: 4px;
281
+ }
282
+ :host(.dso-accordion-neutral[open]) > .dso-section-handle a,
283
+ :host(.dso-accordion-neutral[open]) > .dso-section-handle button {
284
+ color: #000;
285
+ }
286
+ :host(.dso-accordion-neutral[open]) > .dso-section-handle a dso-attachments-counter,
287
+ :host(.dso-accordion-neutral[open]) > .dso-section-handle button dso-attachments-counter {
288
+ --dso-attachments-counter-color: #fff;
289
+ --dso-icon: var(--di-paperclip-wit);
290
+ }
291
+ :host(.dso-accordion-neutral[open]) .dso-section-body {
292
+ margin-block-end: 16px;
293
+ margin-block-start: 2px;
294
+ }
295
+
296
+ :host(.dso-accordion-neutral.dso-nested-accordion[open]) .dso-section-body {
297
+ background-color: #e5e5e5;
248
298
  }
@@ -1,6 +1,5 @@
1
1
  import { h, forceUpdate, Fragment, Host, } from "@stencil/core";
2
- import anime from "animejs";
3
- import debounce from "debounce";
2
+ import { isExpandable } from "../../expandable/expandable.interfaces";
4
3
  import { stateMap } from "./accordion-section.interfaces";
5
4
  import { Handle, HandleElement, HandleIcon } from "./handles";
6
5
  export class AccordionSection {
@@ -14,9 +13,7 @@ export class AccordionSection {
14
13
  this.status = undefined;
15
14
  this.open = false;
16
15
  this.hasNestedSection = false;
17
- }
18
- toggleOpen() {
19
- this.activateAnimation();
16
+ this.hover = false;
20
17
  }
21
18
  componentWillLoad() {
22
19
  const accordion = this.host.parentElement;
@@ -28,18 +25,6 @@ export class AccordionSection {
28
25
  forceUpdate(this.host);
29
26
  });
30
27
  }
31
- this.prepareAnimationResizeObserver();
32
- }
33
- componentDidLoad() {
34
- var _a, _b;
35
- const bodyContentElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dso-section-body-content");
36
- if (bodyContentElement) {
37
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(bodyContentElement);
38
- }
39
- }
40
- disconnectedCallback() {
41
- var _a;
42
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
43
28
  }
44
29
  /** Toggle this section.
45
30
  * @param scrollIntoView boolean - defaults to true
@@ -56,6 +41,10 @@ export class AccordionSection {
56
41
  async scrollSectionIntoView() {
57
42
  await this.scrollIntoViewWhenNeeded(false);
58
43
  }
44
+ get isNeutral() {
45
+ var _a;
46
+ return ((_a = this.accordionState) === null || _a === void 0 ? void 0 : _a.variant) === "neutral";
47
+ }
59
48
  async scrollIntoViewWhenNeeded(sectionToggled) {
60
49
  var _a, _b, _c;
61
50
  AccordionSection.scrollCandidate = undefined;
@@ -64,12 +53,13 @@ export class AccordionSection {
64
53
  if (!bodyClientRect || !headingClientRect || !this.accordionState) {
65
54
  return;
66
55
  }
67
- const waitForAnimationBeforeScrolling = (state) => {
68
- var _a;
69
- const sectionBottomOffsetTop = this.host.offsetTop + headingClientRect.height + (this.open ? (_a = this.bodyHeight) !== null && _a !== void 0 ? _a : 0 : 0);
56
+ const waitForAnimationBeforeScrolling = async (state) => {
57
+ var _a, _b;
58
+ this.bodyHeight = await ((_a = this.expandable) === null || _a === void 0 ? void 0 : _a.getBodyHeight());
59
+ const sectionBottomOffsetTop = this.host.offsetTop + headingClientRect.height + (this.open ? (_b = this.bodyHeight) !== null && _b !== void 0 ? _b : 0 : 0);
70
60
  return (sectionToggled && (sectionBottomOffsetTop > document.documentElement.scrollHeight || state.allowMultipleOpen));
71
61
  };
72
- if (waitForAnimationBeforeScrolling(this.accordionState)) {
62
+ if (await waitForAnimationBeforeScrolling(this.accordionState)) {
73
63
  AccordionSection.scrollCandidate = this.host;
74
64
  return;
75
65
  }
@@ -92,6 +82,33 @@ export class AccordionSection {
92
82
  });
93
83
  }
94
84
  }
85
+ setAnimationBehaviour(event, section) {
86
+ const expandableElement = event.target;
87
+ if (!(expandableElement instanceof HTMLElement)) {
88
+ return;
89
+ }
90
+ if (isExpandable(expandableElement)) {
91
+ this.expandable = expandableElement;
92
+ this.expandable.getAnimeInstance().then((animeInstance) => {
93
+ if (animeInstance) {
94
+ animeInstance.update;
95
+ animeInstance.changeComplete = async () => {
96
+ if (!section) {
97
+ return;
98
+ }
99
+ const accordion = section.parentElement;
100
+ if (isAccordion(accordion)) {
101
+ accordion === null || accordion === void 0 ? void 0 : accordion.animationEnd(section);
102
+ }
103
+ if (AccordionSection.scrollCandidate === this.host) {
104
+ AccordionSection.scrollCandidate = undefined;
105
+ await this.scrollSectionIntoView();
106
+ }
107
+ };
108
+ }
109
+ });
110
+ }
111
+ }
95
112
  async toggle(e) {
96
113
  var _a;
97
114
  e === null || e === void 0 ? void 0 : e.preventDefault();
@@ -110,78 +127,7 @@ export class AccordionSection {
110
127
  ["dso-accordion-" + variant]: true,
111
128
  "dso-nested-accordion": this.hasNestedSection,
112
129
  "dso-accordion-reverse-align": reverseAlign !== null && reverseAlign !== void 0 ? reverseAlign : false,
113
- }, hidden: !variant }, h(Handle, { heading: this.heading, ref: (element) => (this.sectionHeading = element) }, h(HandleElement, { handleUrl: this.handleUrl, onClick: async (event) => await this.toggle(event), open: this.open }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("span", null, this.handleTitle), h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" }))) : (h(Fragment, null, h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.state && h("span", { class: "sr-only" }, stateMap[this.state]), h("span", null, this.handleTitle), hasAddons && (h("div", { class: "dso-section-handle-addons" }, this.status && h("span", { class: "dso-status" }, this.status), h(HandleIcon, { state: this.state, icon: this.icon, attachmentCount: this.attachmentCount }))))))), h("div", { class: { "dso-section-body": true, "dso-animate-ready": !!this.animeInstance }, ref: (element) => (this.sectionBody = element), "aria-hidden": this.open ? "false" : "true" }, h("div", { class: "dso-section-body-content" }, h("slot", null)))));
114
- }
115
- prepareAnimationResizeObserver() {
116
- this.resizeObserver = new ResizeObserver(debounce(([entry]) => {
117
- // entry.contentRect does not include padding, so we use getBoundingClientRect.
118
- const height = entry.target.getBoundingClientRect().height;
119
- if (this.bodyHeight !== height) {
120
- this.bodyHeight = height;
121
- this.instantiateAnimation();
122
- }
123
- }, 150));
124
- }
125
- instantiateAnimation() {
126
- this.animeInstance = anime({
127
- targets: this.sectionBody,
128
- height: 4,
129
- easing: "cubicBezier(0.4, 0, 0.2, 1)",
130
- duration: 260,
131
- autoplay: false,
132
- direction: "normal",
133
- changeComplete: async () => {
134
- var _a;
135
- (_a = this.accordion) === null || _a === void 0 ? void 0 : _a.animationEnd(this.host);
136
- if (AccordionSection.scrollCandidate === this.host) {
137
- AccordionSection.scrollCandidate = undefined;
138
- await this.scrollSectionIntoView();
139
- }
140
- },
141
- begin: () => {
142
- if (this.sectionBody) {
143
- if (this.open) {
144
- this.sectionBody.style.visibility = "";
145
- this.sectionBody.style.position = "";
146
- this.sectionBody.style.bottom = "";
147
- }
148
- }
149
- },
150
- complete: () => {
151
- if (this.sectionBody) {
152
- this.sectionBody.style.height = "";
153
- if (!this.open) {
154
- this.sectionBody.style.visibility = "hidden";
155
- this.sectionBody.style.position = "absolute";
156
- this.sectionBody.style.bottom = "100%";
157
- }
158
- }
159
- },
160
- });
161
- if (!this.open) {
162
- this.animeInstance.reverse();
163
- this.animeInstance.play();
164
- }
165
- if (this.sectionBody) {
166
- this.sectionBody.style.height = "";
167
- }
168
- }
169
- activateAnimation() {
170
- if (this.animeInstance) {
171
- if (this.animeInstance.progress > 0 && this.animeInstance.progress < 100) {
172
- this.animeInstance.reverse();
173
- }
174
- else {
175
- if (this.open) {
176
- this.animeInstance.direction = "reverse";
177
- this.animeInstance.play();
178
- }
179
- else {
180
- this.animeInstance.direction = "normal";
181
- this.animeInstance.play();
182
- }
183
- }
184
- }
130
+ }, hidden: !variant, onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, h(Handle, { heading: this.heading, ref: (element) => (this.sectionHeading = element) }, h(HandleElement, { handleUrl: this.handleUrl, onClick: async (event) => await this.toggle(event), open: this.open }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("span", null, this.handleTitle), h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" }))) : (h(Fragment, null, h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.state && h("span", { class: "sr-only" }, stateMap[this.state]), h("span", null, this.handleTitle, this.isNeutral && (h("dso-icon", { class: "info-icon", icon: this.open || this.hover ? "info-active" : "info" }))), hasAddons && (h("div", { class: "dso-section-handle-addons" }, this.status && h("span", { class: "dso-status" }, this.status), h(HandleIcon, { state: this.state, icon: this.icon, attachmentCount: this.attachmentCount }))))))), h("dso-expandable", { class: "dso-section-body", open: this.open, enableAnimation: true, minimumHeight: this.isNeutral ? 0 : 4, onAnimationInstantiated: (e) => this.setAnimationBehaviour(e, this.host) }, h("div", { slot: "expandable-content", class: "dso-section-body-content", ref: (element) => (this.sectionBody = element) }, h("slot", null)))));
185
131
  }
186
132
  static get is() { return "dso-accordion-section"; }
187
133
  static get encapsulation() { return "shadow"; }
@@ -349,7 +295,8 @@ export class AccordionSection {
349
295
  }
350
296
  static get states() {
351
297
  return {
352
- "hasNestedSection": {}
298
+ "hasNestedSection": {},
299
+ "hover": {}
353
300
  };
354
301
  }
355
302
  static get methods() {
@@ -398,12 +345,6 @@ export class AccordionSection {
398
345
  };
399
346
  }
400
347
  static get elementRef() { return "host"; }
401
- static get watchers() {
402
- return [{
403
- "propName": "open",
404
- "methodName": "toggleOpen"
405
- }];
406
- }
407
348
  }
408
349
  function isAccordion(element) {
409
350
  return element instanceof HTMLElement && "getState" in element;
@@ -0,0 +1,25 @@
1
+ :host {
2
+ background-color: #e1ecf7;
3
+ display: block;
4
+ padding-block: 16px;
5
+ padding-inline-start: 16px;
6
+ padding-inline-end: 96px;
7
+ }
8
+
9
+ *,
10
+ *::after,
11
+ *::before {
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ h2 {
16
+ color: #275937;
17
+ color: #275937;
18
+ font-size: 1.5rem;
19
+ font-weight: 700;
20
+ margin-block: 0 16px;
21
+ }
22
+
23
+ .dso-action-list-content {
24
+ padding-inline-start: 80px;
25
+ }
@@ -0,0 +1,42 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class ActionList {
3
+ constructor() {
4
+ this.listTitle = undefined;
5
+ }
6
+ render() {
7
+ return (h(Host, null, h("h2", null, this.listTitle), h("div", { class: "dso-action-list-content" }, h("slot", null))));
8
+ }
9
+ static get is() { return "dso-action-list"; }
10
+ static get encapsulation() { return "shadow"; }
11
+ static get originalStyleUrls() {
12
+ return {
13
+ "$": ["action-list.scss"]
14
+ };
15
+ }
16
+ static get styleUrls() {
17
+ return {
18
+ "$": ["action-list.css"]
19
+ };
20
+ }
21
+ static get properties() {
22
+ return {
23
+ "listTitle": {
24
+ "type": "string",
25
+ "mutable": false,
26
+ "complexType": {
27
+ "original": "string",
28
+ "resolved": "string",
29
+ "references": {}
30
+ },
31
+ "required": true,
32
+ "optional": false,
33
+ "docs": {
34
+ "tags": [],
35
+ "text": ""
36
+ },
37
+ "attribute": "list-title",
38
+ "reflect": false
39
+ }
40
+ };
41
+ }
42
+ }