@dso-toolkit/core 35.0.0 → 36.2.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.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +2 -2
- package/dist/cjs/dso-badge.cjs.entry.js +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +21 -12
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -3
- package/dist/cjs/dso-header.cjs.entry.js +16 -7
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +4 -4
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +22 -19
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +36 -24
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +8 -4
- package/dist/cjs/dso-tree-view.cjs.entry.js +9 -9
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +4 -4
- package/dist/cjs/{focus-trap.esm-8d3e3fb6.js → focus-trap.esm-a85643b0.js} +102 -68
- package/dist/cjs/{index-5ea63531.js → index-0a7c679a.js} +73 -67
- package/dist/cjs/index.esm-3520a2a6.js +427 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.template.js +1 -1
- package/dist/collection/components/anchor/anchor.template.js +1 -1
- package/dist/collection/components/autosuggest/autosuggest.css +1 -1
- package/dist/collection/components/badge/badge.template.js +1 -1
- package/dist/collection/components/button/button.template.js +1 -1
- package/dist/collection/components/date-picker/date-picker.css +9 -6
- package/dist/collection/components/date-picker/date-picker.js +21 -11
- package/dist/collection/components/date-picker/date-picker.template.js +1 -1
- package/dist/collection/components/definition-list/definition-list.template.js +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +1 -1
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +38 -9
- package/dist/collection/components/header/header.template.js +4 -2
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +2 -2
- package/dist/collection/components/highlight-box/highlight-box.template.js +2 -2
- package/dist/collection/components/icon/icon.template.js +1 -1
- package/dist/collection/components/image-overlay/image-overlay.css +1 -1
- package/dist/collection/components/label/label.template.js +2 -2
- package/dist/collection/components/list/list.template.js +1 -1
- package/dist/collection/components/map-controls/map-controls.js +17 -19
- package/dist/collection/components/ozon-content/get-node-name.function.js +9 -0
- package/dist/collection/components/ozon-content/nodes/al.node.js +2 -1
- package/dist/collection/components/ozon-content/nodes/fallback.node.js +2 -1
- package/dist/collection/components/ozon-content/nodes/noot.node.js +15 -15
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +9 -5
- package/dist/collection/components/ozon-content/ozon-content.css +76 -23
- package/dist/collection/components/progress-bar/progress-bar.template.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.template.js +1 -1
- package/dist/collection/components/selectable/selectable.css +7 -1
- package/dist/collection/components/selectable/selectable.template.js +1 -1
- package/dist/collection/components/toggletip/toggletip.template.js +2 -2
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.template.js +1 -1
- package/dist/collection/components/tree-view/tree-item.js +7 -7
- package/dist/collection/components/tree-view/tree-view.css +86 -15
- package/dist/collection/components/viewer-grid/viewer-grid.css +2 -2
- package/dist/custom-elements/index.js +460 -229
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-5037944e.entry.js → p-121c3588.entry.js} +1 -1
- package/dist/dso-toolkit/p-131d54e3.js +5 -0
- package/dist/dso-toolkit/p-1a3db1cd.entry.js +1 -0
- package/dist/dso-toolkit/p-1fd3d18d.entry.js +1 -0
- package/dist/dso-toolkit/{p-ad540748.entry.js → p-2a611af3.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2b6a3dfa.entry.js → p-3cb44a36.entry.js} +1 -1
- package/dist/dso-toolkit/{p-1fefbf8c.entry.js → p-4f904355.entry.js} +1 -1
- package/dist/dso-toolkit/p-5e5fbd41.js +5 -0
- package/dist/dso-toolkit/{p-4e573fc5.entry.js → p-5e614420.entry.js} +1 -1
- package/dist/dso-toolkit/p-72e47943.entry.js +1 -0
- package/dist/dso-toolkit/{p-50b63cf4.entry.js → p-746d70f9.entry.js} +1 -1
- package/dist/dso-toolkit/p-7abe091d.entry.js +1 -0
- package/dist/dso-toolkit/p-7b67e324.entry.js +1 -0
- package/dist/dso-toolkit/{p-3c4dbd89.entry.js → p-8bb8148f.entry.js} +1 -1
- package/dist/dso-toolkit/p-a58b3108.entry.js +1 -0
- package/dist/dso-toolkit/{p-225bbb28.entry.js → p-abd32847.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c6f467b3.entry.js → p-af8a4337.entry.js} +1 -1
- package/dist/dso-toolkit/{p-348414bf.entry.js → p-b29184e1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-bc14cafd.entry.js → p-b86128b3.entry.js} +1 -1
- package/dist/dso-toolkit/p-c62606a3.js +1 -0
- package/dist/dso-toolkit/{p-f0b67246.entry.js → p-d0d279cc.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c95108fe.entry.js → p-d1f62081.entry.js} +1 -1
- package/dist/dso-toolkit/{p-3b493a2c.entry.js → p-d6c47662.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c54ecae1.entry.js → p-daf049bd.entry.js} +1 -1
- package/dist/dso-toolkit/p-e01b1657.entry.js +1 -0
- package/dist/dso-toolkit/{p-94dffa65.entry.js → p-ea14647b.entry.js} +1 -1
- package/dist/dso-toolkit/{p-dc86d830.entry.js → p-efa4a33d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-951f5872.entry.js → p-efb7575f.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +2 -2
- package/dist/esm/dso-badge.entry.js +1 -1
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +21 -12
- package/dist/esm/dso-dropdown-menu.entry.js +3 -3
- package/dist/esm/dso-header.entry.js +16 -7
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +4 -4
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +22 -19
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +36 -24
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +3 -3
- package/dist/esm/dso-tooltip.entry.js +8 -4
- package/dist/esm/dso-tree-view.entry.js +9 -9
- package/dist/esm/dso-viewer-grid.entry.js +4 -4
- package/dist/esm/{focus-trap.esm-299989f2.js → focus-trap.esm-a01ad6c9.js} +102 -68
- package/dist/esm/{index-d54cae76.js → index-1602fde1.js} +73 -67
- package/dist/esm/index.esm-45465af7.js +422 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/date-picker/date-picker.d.ts +2 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +7 -1
- package/dist/types/components/header/header.template.d.ts +1 -1
- package/dist/types/components/ozon-content/get-node-name.function.d.ts +1 -0
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +2 -2
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content.d.ts +0 -1
- package/dist/types/components.d.ts +3 -2
- package/dist/types/icon/dso-icon-sass-function.d.ts +1 -1
- package/package.json +30 -26
- package/dist/cjs/index.esm-2ac7081c.js +0 -267
- package/dist/dso-toolkit/p-44905fb1.js +0 -5
- package/dist/dso-toolkit/p-88bc5873.entry.js +0 -1
- package/dist/dso-toolkit/p-8b6e3abc.entry.js +0 -1
- package/dist/dso-toolkit/p-8bf3a60e.js +0 -5
- package/dist/dso-toolkit/p-94b79e43.entry.js +0 -1
- package/dist/dso-toolkit/p-a7306b7b.entry.js +0 -1
- package/dist/dso-toolkit/p-ad2210ad.entry.js +0 -1
- package/dist/dso-toolkit/p-daa1e29d.entry.js +0 -1
- package/dist/dso-toolkit/p-dad72605.js +0 -1
- package/dist/dso-toolkit/p-f193c258.entry.js +0 -1
- package/dist/esm/index.esm-a1362957.js +0 -262
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* tabbable 5.3.1
|
|
5
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
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'];
|
|
8
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
9
|
+
var NoElement = typeof Element === 'undefined';
|
|
10
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
11
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
12
|
+
return element.getRootNode();
|
|
13
|
+
} : function (element) {
|
|
14
|
+
return element.ownerDocument;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @param {Element} el container to check in
|
|
18
|
+
* @param {boolean} includeContainer add container to check
|
|
19
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
20
|
+
* @returns {Element[]}
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
24
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
25
|
+
|
|
26
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
27
|
+
candidates.unshift(el);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
candidates = candidates.filter(filter);
|
|
31
|
+
return candidates;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @callback GetShadowRoot
|
|
35
|
+
* @param {Element} element to check for shadow root
|
|
36
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @typedef {Object} CandidatesScope
|
|
41
|
+
* @property {Element} scope contains inner candidates
|
|
42
|
+
* @property {Element[]} candidates
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @typedef {Object} IterativeOptions
|
|
47
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
48
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
49
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
50
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
51
|
+
* @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
56
|
+
* @param {boolean} includeContainer add container list to check
|
|
57
|
+
* @param {IterativeOptions} options
|
|
58
|
+
* @returns {Array.<Element|CandidatesScope>}
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
63
|
+
var candidates = [];
|
|
64
|
+
var elementsToCheck = Array.from(elements);
|
|
65
|
+
|
|
66
|
+
while (elementsToCheck.length) {
|
|
67
|
+
var element = elementsToCheck.shift();
|
|
68
|
+
|
|
69
|
+
if (element.tagName === 'SLOT') {
|
|
70
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
71
|
+
var assigned = element.assignedElements();
|
|
72
|
+
var content = assigned.length ? assigned : element.children;
|
|
73
|
+
var nestedCandidates = getCandidatesIteratively(content, true, options);
|
|
74
|
+
|
|
75
|
+
if (options.flatten) {
|
|
76
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
77
|
+
} else {
|
|
78
|
+
candidates.push({
|
|
79
|
+
scope: element,
|
|
80
|
+
candidates: nestedCandidates
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
// check candidate element
|
|
85
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
86
|
+
|
|
87
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
88
|
+
candidates.push(element);
|
|
89
|
+
} // iterate over shadow content if possible
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
|
|
93
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
94
|
+
|
|
95
|
+
if (shadowRoot) {
|
|
96
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
97
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
98
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
99
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
100
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
101
|
+
// _after_ we return from this recursive call
|
|
102
|
+
var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
103
|
+
|
|
104
|
+
if (options.flatten) {
|
|
105
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
106
|
+
} else {
|
|
107
|
+
candidates.push({
|
|
108
|
+
scope: element,
|
|
109
|
+
candidates: _nestedCandidates
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
114
|
+
// __without__ giving the element special scope treatment
|
|
115
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return candidates;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var getTabindex = function getTabindex(node, isScope) {
|
|
124
|
+
if (node.tabIndex < 0) {
|
|
125
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
126
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
127
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
128
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
129
|
+
// order, consider their tab index to be 0.
|
|
130
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
131
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
132
|
+
//
|
|
133
|
+
// isScope is positive for custom element with shadow root or slot that by default
|
|
134
|
+
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
135
|
+
// content to be inserted in the correct position
|
|
136
|
+
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return node.tabIndex;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
145
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
var isInput = function isInput(node) {
|
|
149
|
+
return node.tagName === 'INPUT';
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
153
|
+
return isInput(node) && node.type === 'hidden';
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
157
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
158
|
+
return child.tagName === 'SUMMARY';
|
|
159
|
+
});
|
|
160
|
+
return r;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
164
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
165
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
166
|
+
return nodes[i];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
172
|
+
if (!node.name) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
var radioScope = node.form || getRootNode(node);
|
|
177
|
+
|
|
178
|
+
var queryRadios = function queryRadios(name) {
|
|
179
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var radioSet;
|
|
183
|
+
|
|
184
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
185
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
186
|
+
} else {
|
|
187
|
+
try {
|
|
188
|
+
radioSet = queryRadios(node.name);
|
|
189
|
+
} catch (err) {
|
|
190
|
+
// eslint-disable-next-line no-console
|
|
191
|
+
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);
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
197
|
+
return !checked || checked === node;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
var isRadio = function isRadio(node) {
|
|
201
|
+
return isInput(node) && node.type === 'radio';
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
205
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
var isZeroArea = function isZeroArea(node) {
|
|
209
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
210
|
+
width = _node$getBoundingClie.width,
|
|
211
|
+
height = _node$getBoundingClie.height;
|
|
212
|
+
|
|
213
|
+
return width === 0 && height === 0;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
var isHidden = function isHidden(node, _ref) {
|
|
217
|
+
var displayCheck = _ref.displayCheck,
|
|
218
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
219
|
+
|
|
220
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
225
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
226
|
+
|
|
227
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
228
|
+
return true;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (!displayCheck || displayCheck === 'full') {
|
|
232
|
+
if (typeof getShadowRoot === 'function') {
|
|
233
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
234
|
+
// 'non-zero-area' fallback
|
|
235
|
+
var originalNode = node;
|
|
236
|
+
|
|
237
|
+
while (node) {
|
|
238
|
+
var parentElement = node.parentElement;
|
|
239
|
+
var rootNode = getRootNode(node);
|
|
240
|
+
|
|
241
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
242
|
+
) {
|
|
243
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
244
|
+
// fall back to a non-zero-area test
|
|
245
|
+
return isZeroArea(node);
|
|
246
|
+
} else if (node.assignedSlot) {
|
|
247
|
+
// iterate up slot
|
|
248
|
+
node = node.assignedSlot;
|
|
249
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
250
|
+
// cross shadow boundary
|
|
251
|
+
node = rootNode.host;
|
|
252
|
+
} else {
|
|
253
|
+
// iterate up normal dom
|
|
254
|
+
node = parentElement;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
node = originalNode;
|
|
259
|
+
} // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
260
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
261
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
262
|
+
// didn't find it sitting in an undisclosed shadow (or shadows are disabled) so now we
|
|
263
|
+
// can just test to see if it would normally be visible or not
|
|
264
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
265
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
266
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
267
|
+
// up the hierarchy either
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
return !node.getClientRects().length;
|
|
271
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
272
|
+
return isZeroArea(node);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return false;
|
|
276
|
+
}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
277
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
278
|
+
// fieldset
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
282
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
283
|
+
var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>
|
|
284
|
+
|
|
285
|
+
while (parentNode) {
|
|
286
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
287
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
288
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
289
|
+
var child = parentNode.children.item(i); // when the first <legend> (in document order) is found
|
|
290
|
+
|
|
291
|
+
if (child.tagName === 'LEGEND') {
|
|
292
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
293
|
+
// return whether `node` is a descendant of its first <legend>
|
|
294
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
295
|
+
}
|
|
296
|
+
} // the disabled <fieldset> containing `node` has no <legend>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
parentNode = parentNode.parentElement;
|
|
303
|
+
}
|
|
304
|
+
} // else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
305
|
+
// enabled/disabled state
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
return false;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
312
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
|
|
313
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return true;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
321
|
+
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return true;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* @param {Array.<Element|CandidatesScope>} candidates
|
|
329
|
+
* @returns Element[]
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
var sortByOrder = function sortByOrder(candidates) {
|
|
334
|
+
var regularTabbables = [];
|
|
335
|
+
var orderedTabbables = [];
|
|
336
|
+
candidates.forEach(function (item, i) {
|
|
337
|
+
var isScope = !!item.scope;
|
|
338
|
+
var element = isScope ? item.scope : item;
|
|
339
|
+
var candidateTabindex = getTabindex(element, isScope);
|
|
340
|
+
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
341
|
+
|
|
342
|
+
if (candidateTabindex === 0) {
|
|
343
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
344
|
+
} else {
|
|
345
|
+
orderedTabbables.push({
|
|
346
|
+
documentOrder: i,
|
|
347
|
+
tabIndex: candidateTabindex,
|
|
348
|
+
item: item,
|
|
349
|
+
isScope: isScope,
|
|
350
|
+
content: elements
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
355
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
356
|
+
return acc;
|
|
357
|
+
}, []).concat(regularTabbables);
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
var tabbable = function tabbable(el, options) {
|
|
361
|
+
options = options || {};
|
|
362
|
+
var candidates;
|
|
363
|
+
|
|
364
|
+
if (options.getShadowRoot) {
|
|
365
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
366
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
367
|
+
flatten: false,
|
|
368
|
+
getShadowRoot: options.getShadowRoot
|
|
369
|
+
});
|
|
370
|
+
} else {
|
|
371
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return sortByOrder(candidates);
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
var focusable = function focusable(el, options) {
|
|
378
|
+
options = options || {};
|
|
379
|
+
var candidates;
|
|
380
|
+
|
|
381
|
+
if (options.getShadowRoot) {
|
|
382
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
383
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
384
|
+
flatten: true,
|
|
385
|
+
getShadowRoot: options.getShadowRoot
|
|
386
|
+
});
|
|
387
|
+
} else {
|
|
388
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return candidates;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
var isTabbable = function isTabbable(node, options) {
|
|
395
|
+
options = options || {};
|
|
396
|
+
|
|
397
|
+
if (!node) {
|
|
398
|
+
throw new Error('No node provided');
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
409
|
+
|
|
410
|
+
var isFocusable = function isFocusable(node, options) {
|
|
411
|
+
options = options || {};
|
|
412
|
+
|
|
413
|
+
if (!node) {
|
|
414
|
+
throw new Error('No node provided');
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
exports.focusable = focusable;
|
|
425
|
+
exports.isFocusable = isFocusable;
|
|
426
|
+
exports.isTabbable = isTabbable;
|
|
427
|
+
exports.tabbable = tabbable;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a7c679a.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -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-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header.cjs",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[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]}]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"focused":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[32]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[2,"dso-ozon-content",{"content":[1],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"position":[1],"for":[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]}]]],["dso-info_2.cjs",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-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]}]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header.cjs",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[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]}]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"focused":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[32]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[2,"dso-ozon-content",{"content":[1],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"position":[1],"for":[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]}]]],["dso-info_2.cjs",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-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]}]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
2
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
3
3
|
export function alertTemplate({ status, message, onClick, withRoleAlert }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-alert status=${status} ?role-alert=${withRoleAlert}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
import { iconTemplate } from '../icon/icon.template';
|
|
4
4
|
export function anchorTemplate({ icon, iconMode, label, modifier, url }) {
|
|
5
5
|
return html `<a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function badgeTemplate({ status, message }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-badge status=${ifDefined(status)}>${message}</dso-badge>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
import { iconTemplate } from '../icon/icon.template';
|
|
4
4
|
export function buttonTemplate(button) {
|
|
5
5
|
return 'url' in button
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
text-align: left;
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
|
+
.dso-date:not(.dso-visible) .dso-date__dialog {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
21
24
|
|
|
22
25
|
.dso-date__input {
|
|
23
26
|
display: block;
|
|
@@ -96,7 +99,7 @@
|
|
|
96
99
|
top: 50%;
|
|
97
100
|
user-select: none;
|
|
98
101
|
width: 38px;
|
|
99
|
-
z-index:
|
|
102
|
+
z-index: 101;
|
|
100
103
|
}
|
|
101
104
|
.dso-date__toggle:disabled {
|
|
102
105
|
color: #afcf9d;
|
|
@@ -116,7 +119,7 @@
|
|
|
116
119
|
transition: transform 300ms ease, opacity 300ms ease, visibility 300ms ease;
|
|
117
120
|
visibility: hidden;
|
|
118
121
|
will-change: transform, opacity, visibility;
|
|
119
|
-
z-index:
|
|
122
|
+
z-index: 210;
|
|
120
123
|
}
|
|
121
124
|
@media (max-width: 35.9375em) {
|
|
122
125
|
.dso-date__dialog {
|
|
@@ -155,7 +158,7 @@
|
|
|
155
158
|
position: relative;
|
|
156
159
|
transform: none;
|
|
157
160
|
width: 100%;
|
|
158
|
-
z-index:
|
|
161
|
+
z-index: 210;
|
|
159
162
|
}
|
|
160
163
|
@media (max-width: 35.9375em) {
|
|
161
164
|
.dso-date__dialog-content {
|
|
@@ -233,7 +236,7 @@
|
|
|
233
236
|
text-align: center;
|
|
234
237
|
vertical-align: middle;
|
|
235
238
|
width: 38px;
|
|
236
|
-
z-index:
|
|
239
|
+
z-index: 100;
|
|
237
240
|
}
|
|
238
241
|
.dso-date__day.is-today {
|
|
239
242
|
background: transparent;
|
|
@@ -372,7 +375,7 @@
|
|
|
372
375
|
position: absolute;
|
|
373
376
|
top: 0;
|
|
374
377
|
width: 100%;
|
|
375
|
-
z-index:
|
|
378
|
+
z-index: 101;
|
|
376
379
|
}
|
|
377
380
|
.dso-date__select select:focus + .dso-date__select-label {
|
|
378
381
|
box-shadow: 0 0 0 2px #275937;
|
|
@@ -390,7 +393,7 @@
|
|
|
390
393
|
pointer-events: none;
|
|
391
394
|
position: relative;
|
|
392
395
|
width: 100%;
|
|
393
|
-
z-index:
|
|
396
|
+
z-index: 100;
|
|
394
397
|
}
|
|
395
398
|
.dso-date__select-label span {
|
|
396
399
|
font-size: 1.25rem;
|
|
@@ -41,6 +41,7 @@ export class DsoDatePicker {
|
|
|
41
41
|
this.activeFocus = false;
|
|
42
42
|
this.focusedDay = new Date();
|
|
43
43
|
this.open = false;
|
|
44
|
+
this.visible = false;
|
|
44
45
|
/**
|
|
45
46
|
* Public Property API
|
|
46
47
|
*/
|
|
@@ -309,12 +310,18 @@ export class DsoDatePicker {
|
|
|
309
310
|
* Show the calendar modal, moving focus to the calendar inside.
|
|
310
311
|
*/
|
|
311
312
|
async show() {
|
|
312
|
-
this.
|
|
313
|
-
|
|
314
|
-
if (typeof this.focusTimeoutId !== 'undefined') {
|
|
315
|
-
clearTimeout(this.focusTimeoutId);
|
|
313
|
+
if (typeof this.hideTimeoutId !== 'undefined') {
|
|
314
|
+
clearTimeout(this.hideTimeoutId);
|
|
316
315
|
}
|
|
317
|
-
this.
|
|
316
|
+
this.visible = true;
|
|
317
|
+
setTimeout(() => {
|
|
318
|
+
this.open = true;
|
|
319
|
+
this.setFocusedDay(parseDutchDate(this.value) || new Date());
|
|
320
|
+
if (typeof this.focusTimeoutId !== 'undefined') {
|
|
321
|
+
clearTimeout(this.focusTimeoutId);
|
|
322
|
+
}
|
|
323
|
+
this.focusTimeoutId = setTimeout(() => { var _a; return (_a = this.monthSelectNode) === null || _a === void 0 ? void 0 : _a.focus(); }, TRANSITION_MS);
|
|
324
|
+
});
|
|
318
325
|
}
|
|
319
326
|
/**
|
|
320
327
|
* Hide the calendar modal. Set `moveFocusToButton` to false to prevent focus
|
|
@@ -327,10 +334,12 @@ export class DsoDatePicker {
|
|
|
327
334
|
if (typeof this.focusTimeoutId !== 'undefined') {
|
|
328
335
|
clearTimeout(this.focusTimeoutId);
|
|
329
336
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
337
|
+
this.hideTimeoutId = setTimeout(() => {
|
|
338
|
+
if (moveFocusToButton && this.datePickerButton) {
|
|
339
|
+
this.datePickerButton.focus();
|
|
340
|
+
}
|
|
341
|
+
this.visible = false;
|
|
342
|
+
}, TRANSITION_MS + 200);
|
|
334
343
|
}
|
|
335
344
|
addDays(days) {
|
|
336
345
|
this.setFocusedDay(addDays(this.focusedDay, days));
|
|
@@ -399,7 +408,7 @@ export class DsoDatePicker {
|
|
|
399
408
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
400
409
|
}
|
|
401
410
|
return (h(Host, null,
|
|
402
|
-
h("div", { class:
|
|
411
|
+
h("div", { class: ({ 'dso-date': true, 'dso-visible': this.visible }) },
|
|
403
412
|
h("div", { class: "dso-date__input-wrapper" },
|
|
404
413
|
h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onKeyPress: this.handleKeyPress, onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }),
|
|
405
414
|
h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) },
|
|
@@ -644,7 +653,8 @@ export class DsoDatePicker {
|
|
|
644
653
|
static get states() { return {
|
|
645
654
|
"activeFocus": {},
|
|
646
655
|
"focusedDay": {},
|
|
647
|
-
"open": {}
|
|
656
|
+
"open": {},
|
|
657
|
+
"visible": {}
|
|
648
658
|
}; }
|
|
649
659
|
static get events() { return [{
|
|
650
660
|
"method": "dateChange",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function datePickerTemplate({ id, onDateChange, value, min, max, disabled, autofocus, direction }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-date-picker
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
-
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
4
4
|
import { listTemplate } from '../list/list.template';
|
|
5
5
|
function definitionTemplate({ term, descriptions }, useSrOnlyColon) {
|
|
6
6
|
return html `
|