@dso-toolkit/core 33.3.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +4 -228
- package/dist/cjs/dso-header.cjs.entry.js +2 -2
- 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-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 +5 -3
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +5 -3
- package/dist/cjs/dso-ozon-content.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +778 -0
- package/dist/cjs/{index-fcdfdd38.js → index-5ea63531.js} +26 -2
- package/dist/cjs/index.esm-2ac7081c.js +267 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/alert/alert.css +0 -3
- package/dist/collection/components/anchor/anchor.template.js +17 -0
- package/dist/collection/components/attachments-counter/attachments-counter.css +0 -4
- package/dist/collection/components/autosuggest/autosuggest.css +0 -3
- package/dist/collection/components/badge/badge.css +0 -3
- package/dist/collection/components/banner/banner.css +0 -3
- package/dist/collection/components/button/button.template.js +48 -0
- package/dist/collection/components/context/context.template.js +42 -0
- package/dist/collection/components/date-picker/date-picker.css +0 -3
- package/dist/collection/components/definition-list/definition-list.template.js +36 -0
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -3
- package/dist/collection/components/header/header.css +0 -6
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +0 -3
- package/dist/collection/components/highlight-box/highlight-box.css +0 -3
- package/dist/collection/components/icon/icon.css +0 -4
- package/dist/collection/components/info/info.css +1 -4
- package/dist/collection/components/info-button/info-button.css +0 -3
- package/dist/collection/components/label/label.css +0 -3
- package/dist/collection/components/label-group/label-group.template.js +7 -0
- package/dist/collection/components/list/list.template.js +37 -0
- package/dist/collection/components/map-base-layers/map-base-layers.css +4 -3
- package/dist/collection/components/map-base-layers/map-base-layers.js +5 -1
- package/dist/collection/components/map-controls/map-controls.css +0 -3
- package/dist/collection/components/map-controls/map-controls.template.js +11 -16
- package/dist/collection/components/map-overlays/map-overlays.css +4 -3
- package/dist/collection/components/map-overlays/map-overlays.js +5 -1
- package/dist/collection/components/ozon-content/ozon-content.css +0 -3
- package/dist/collection/components/progress-bar/progress-bar.css +0 -3
- package/dist/collection/components/progress-indicator/progress-indicator.css +0 -3
- package/dist/collection/components/selectable/selectable.css +0 -3
- package/dist/collection/components/toggletip/toggletip.css +0 -3
- package/dist/collection/components/tooltip/tooltip.css +0 -3
- package/dist/collection/components/tree-view/tree-view.css +3 -3
- package/dist/collection/components/viewer-grid/viewer-grid-document-header.template.js +39 -0
- package/dist/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +19 -0
- package/dist/collection/components/viewer-grid/viewer-grid-filterblok.template.js +28 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +251 -0
- package/dist/collection/components/viewer-grid/viewer-grid.js +127 -0
- package/dist/collection/components/viewer-grid/viewer-grid.template.js +23 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +824 -10
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-22bc904d.entry.js → p-06de0fa1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ff767c21.entry.js → p-10aa1fba.entry.js} +1 -1
- package/dist/dso-toolkit/p-17f073d1.entry.js +1 -0
- package/dist/dso-toolkit/{p-75233655.entry.js → p-1fefbf8c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a52d3623.entry.js → p-20856f91.entry.js} +1 -1
- package/dist/dso-toolkit/{p-262858dd.entry.js → p-2b6a3dfa.entry.js} +1 -1
- package/dist/dso-toolkit/{p-be5682cc.entry.js → p-348414bf.entry.js} +1 -1
- package/dist/dso-toolkit/{p-984551a8.entry.js → p-3b493a2c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-0a08ac9f.entry.js → p-4e573fc5.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c9c1bc8f.entry.js → p-5037944e.entry.js} +1 -1
- package/dist/dso-toolkit/p-7b006b11.entry.js +1 -0
- package/dist/dso-toolkit/p-8bf3a60e.js +5 -0
- package/dist/dso-toolkit/p-8f21d07d.entry.js +5 -0
- package/dist/dso-toolkit/{p-83f166b3.entry.js → p-94dffa65.entry.js} +1 -1
- package/dist/dso-toolkit/{p-b07991b9.entry.js → p-951f5872.entry.js} +1 -1
- package/dist/dso-toolkit/{p-7a043467.entry.js → p-a6c9e063.entry.js} +1 -1
- package/dist/dso-toolkit/{p-da3be034.entry.js → p-a7306b7b.entry.js} +1 -1
- package/dist/dso-toolkit/p-aadc4f8e.entry.js +1 -0
- package/dist/dso-toolkit/p-ad2210ad.entry.js +1 -0
- package/dist/dso-toolkit/{p-b5b946de.entry.js → p-bc14cafd.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4a78a31b.entry.js → p-c54ecae1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-72e4484a.entry.js → p-c95108fe.entry.js} +1 -1
- package/dist/dso-toolkit/{p-e814d644.entry.js → p-daa1e29d.entry.js} +1 -1
- package/dist/dso-toolkit/p-dad72605.js +1 -0
- package/dist/dso-toolkit/{p-2e7d535c.entry.js → p-dc86d830.entry.js} +1 -1
- package/dist/dso-toolkit/{p-19de4cc7.entry.js → p-f0b67246.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +2 -226
- package/dist/esm/dso-header.entry.js +2 -2
- 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-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 +5 -3
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +5 -3
- package/dist/esm/dso-ozon-content.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/dso-tooltip.entry.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +2 -2
- package/dist/esm/dso-viewer-grid.entry.js +774 -0
- package/dist/esm/{index-61410be2.js → index-d54cae76.js} +26 -2
- package/dist/esm/index.esm-a1362957.js +262 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/anchor/anchor.template.d.ts +2 -0
- package/dist/types/components/button/button.template.d.ts +2 -0
- package/dist/types/components/context/context.template.d.ts +3 -0
- package/dist/types/components/definition-list/definition-list.template.d.ts +3 -0
- package/dist/types/components/label-group/label-group.template.d.ts +2 -0
- package/dist/types/components/list/list.template.d.ts +3 -0
- package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +1 -0
- package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +1 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -0
- package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +2 -1
- package/dist/dso-toolkit/p-99b93d2e.entry.js +0 -5
- package/dist/dso-toolkit/p-a40eeb32.js +0 -1
- package/dist/dso-toolkit/p-affe82e6.entry.js +0 -1
- package/dist/dso-toolkit/p-b3e6d377.entry.js +0 -1
- package/dist/dso-toolkit/p-ec8b74f7.entry.js +0 -1
|
@@ -94,6 +94,7 @@ const HYDRATE_ID = 's-id';
|
|
|
94
94
|
const HYDRATED_STYLE_ID = 'sty-id';
|
|
95
95
|
const HYDRATE_CHILD_ID = 'c-id';
|
|
96
96
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
97
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
97
98
|
const createTime = (fnName, tagName = '') => {
|
|
98
99
|
{
|
|
99
100
|
return () => {
|
|
@@ -443,16 +444,36 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
443
444
|
}
|
|
444
445
|
catch (e) { }
|
|
445
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* Need to manually update attribute if:
|
|
449
|
+
* - memberName is not an attribute
|
|
450
|
+
* - if we are rendering the host element in order to reflect attribute
|
|
451
|
+
* - if it's a SVG, since properties might not work in <svg>
|
|
452
|
+
* - if the newValue is null/undefined or 'false'.
|
|
453
|
+
*/
|
|
454
|
+
let xlink = false;
|
|
455
|
+
{
|
|
456
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
|
|
457
|
+
memberName = ln;
|
|
458
|
+
xlink = true;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
446
461
|
if (newValue == null || newValue === false) {
|
|
447
462
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
448
|
-
{
|
|
463
|
+
if (xlink) {
|
|
464
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
449
467
|
elm.removeAttribute(memberName);
|
|
450
468
|
}
|
|
451
469
|
}
|
|
452
470
|
}
|
|
453
471
|
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
454
472
|
newValue = newValue === true ? '' : newValue;
|
|
455
|
-
{
|
|
473
|
+
if (xlink) {
|
|
474
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
456
477
|
elm.setAttribute(memberName, newValue);
|
|
457
478
|
}
|
|
458
479
|
}
|
|
@@ -1210,6 +1231,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1210
1231
|
}
|
|
1211
1232
|
}
|
|
1212
1233
|
else {
|
|
1234
|
+
{
|
|
1235
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1236
|
+
}
|
|
1213
1237
|
endPostUpdate();
|
|
1214
1238
|
}
|
|
1215
1239
|
{
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* tabbable 5.2.1
|
|
5
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
8
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
9
|
+
var matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
10
|
+
|
|
11
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
12
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
13
|
+
|
|
14
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
15
|
+
candidates.unshift(el);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
candidates = candidates.filter(filter);
|
|
19
|
+
return candidates;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var isContentEditable = function isContentEditable(node) {
|
|
23
|
+
return node.contentEditable === 'true';
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var getTabindex = function getTabindex(node) {
|
|
27
|
+
var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);
|
|
28
|
+
|
|
29
|
+
if (!isNaN(tabindexAttr)) {
|
|
30
|
+
return tabindexAttr;
|
|
31
|
+
} // Browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
32
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if (isContentEditable(node)) {
|
|
36
|
+
return 0;
|
|
37
|
+
} // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
38
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
39
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
40
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
41
|
+
// order, consider their tab index to be 0.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
if ((node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return node.tabIndex;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
52
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var isInput = function isInput(node) {
|
|
56
|
+
return node.tagName === 'INPUT';
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
60
|
+
return isInput(node) && node.type === 'hidden';
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
64
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
65
|
+
return child.tagName === 'SUMMARY';
|
|
66
|
+
});
|
|
67
|
+
return r;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
71
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
72
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
73
|
+
return nodes[i];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
79
|
+
if (!node.name) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var radioScope = node.form || node.ownerDocument;
|
|
84
|
+
|
|
85
|
+
var queryRadios = function queryRadios(name) {
|
|
86
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var radioSet;
|
|
90
|
+
|
|
91
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
92
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
93
|
+
} else {
|
|
94
|
+
try {
|
|
95
|
+
radioSet = queryRadios(node.name);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
// eslint-disable-next-line no-console
|
|
98
|
+
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);
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
104
|
+
return !checked || checked === node;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
var isRadio = function isRadio(node) {
|
|
108
|
+
return isInput(node) && node.type === 'radio';
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
112
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var isHidden = function isHidden(node, displayCheck) {
|
|
116
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
121
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
122
|
+
|
|
123
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!displayCheck || displayCheck === 'full') {
|
|
128
|
+
while (node) {
|
|
129
|
+
if (getComputedStyle(node).display === 'none') {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
node = node.parentElement;
|
|
134
|
+
}
|
|
135
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
136
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
137
|
+
width = _node$getBoundingClie.width,
|
|
138
|
+
height = _node$getBoundingClie.height;
|
|
139
|
+
|
|
140
|
+
return width === 0 && height === 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return false;
|
|
144
|
+
}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
145
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
146
|
+
// fieldset
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
150
|
+
if (isInput(node) || node.tagName === 'SELECT' || node.tagName === 'TEXTAREA' || node.tagName === 'BUTTON') {
|
|
151
|
+
var parentNode = node.parentElement;
|
|
152
|
+
|
|
153
|
+
while (parentNode) {
|
|
154
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
155
|
+
// look for the first <legend> as an immediate child of the disabled
|
|
156
|
+
// <fieldset>: if the node is in that legend, it'll be enabled even
|
|
157
|
+
// though the fieldset is disabled; otherwise, the node is in a
|
|
158
|
+
// secondary/subsequent legend, or somewhere else within the fieldset
|
|
159
|
+
// (however deep nested) and it'll be disabled
|
|
160
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
161
|
+
var child = parentNode.children.item(i);
|
|
162
|
+
|
|
163
|
+
if (child.tagName === 'LEGEND') {
|
|
164
|
+
if (child.contains(node)) {
|
|
165
|
+
return false;
|
|
166
|
+
} // the node isn't in the first legend (in doc order), so no matter
|
|
167
|
+
// where it is now, it'll be disabled
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
} // the node isn't in a legend, so no matter where it is now, it'll be disabled
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
parentNode = parentNode.parentElement;
|
|
179
|
+
}
|
|
180
|
+
} // else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
181
|
+
// enabled/disabled state
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
return false;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
188
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options.displayCheck) || // For a details element with a summary, the summary element gets the focus
|
|
189
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return true;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
197
|
+
if (!isNodeMatchingSelectorFocusable(options, node) || isNonTabbableRadio(node) || getTabindex(node) < 0) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return true;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var tabbable = function tabbable(el, options) {
|
|
205
|
+
options = options || {};
|
|
206
|
+
var regularTabbables = [];
|
|
207
|
+
var orderedTabbables = [];
|
|
208
|
+
var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
209
|
+
candidates.forEach(function (candidate, i) {
|
|
210
|
+
var candidateTabindex = getTabindex(candidate);
|
|
211
|
+
|
|
212
|
+
if (candidateTabindex === 0) {
|
|
213
|
+
regularTabbables.push(candidate);
|
|
214
|
+
} else {
|
|
215
|
+
orderedTabbables.push({
|
|
216
|
+
documentOrder: i,
|
|
217
|
+
tabIndex: candidateTabindex,
|
|
218
|
+
node: candidate
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
var tabbableNodes = orderedTabbables.sort(sortOrderedTabbables).map(function (a) {
|
|
223
|
+
return a.node;
|
|
224
|
+
}).concat(regularTabbables);
|
|
225
|
+
return tabbableNodes;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
var focusable = function focusable(el, options) {
|
|
229
|
+
options = options || {};
|
|
230
|
+
var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
231
|
+
return candidates;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var isTabbable = function isTabbable(node, options) {
|
|
235
|
+
options = options || {};
|
|
236
|
+
|
|
237
|
+
if (!node) {
|
|
238
|
+
throw new Error('No node provided');
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
249
|
+
|
|
250
|
+
var isFocusable = function isFocusable(node, options) {
|
|
251
|
+
options = options || {};
|
|
252
|
+
|
|
253
|
+
if (!node) {
|
|
254
|
+
throw new Error('No node provided');
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
exports.focusable = focusable;
|
|
265
|
+
exports.isFocusable = isFocusable;
|
|
266
|
+
exports.isTabbable = isTabbable;
|
|
267
|
+
exports.tabbable = tabbable;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5ea63531.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -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-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-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",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["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]}],[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],"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-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",{"overlayOpen":[4,"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",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["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]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"./components/progress-indicator/progress-indicator.js",
|
|
24
24
|
"./components/toggletip/toggletip.js",
|
|
25
25
|
"./components/tooltip/tooltip.js",
|
|
26
|
-
"./components/tree-view/tree-view.js"
|
|
26
|
+
"./components/tree-view/tree-view.js",
|
|
27
|
+
"./components/viewer-grid/viewer-grid.js"
|
|
27
28
|
],
|
|
28
29
|
"compiler": {
|
|
29
30
|
"name": "@stencil/core",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { html, nothing } from 'lit-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { iconTemplate } from '../icon/icon.template';
|
|
4
|
+
export function anchorTemplate({ icon, iconMode, label, modifier, url }) {
|
|
5
|
+
return html `<a
|
|
6
|
+
href=${url}
|
|
7
|
+
class=${ifDefined(modifier)}
|
|
8
|
+
target=${ifDefined((modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern')) ? '_blank' : undefined)}
|
|
9
|
+
rel=${ifDefined((modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern')) ? 'noopener noreferrer' : undefined)}
|
|
10
|
+
>${icon && iconMode !== 'after'
|
|
11
|
+
? iconTemplate(icon)
|
|
12
|
+
: nothing}${label}${(modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern'))
|
|
13
|
+
? html `<span class="sr-only">(Opent andere website in nieuw tabblad)</span>`
|
|
14
|
+
: nothing}${icon && iconMode === 'after'
|
|
15
|
+
? iconTemplate(icon)
|
|
16
|
+
: nothing}</a>`;
|
|
17
|
+
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
2
|
display: inline-block;
|
|
6
3
|
--di-paperclip-grijs: url("data:image/svg+xml,%3csvg id='paperclip' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M21.88%2c8.94%2c10%2c20.6A4.63%2c4.63%2c0%2c0%2c1%2c6.62%2c22h0a5.78%2c5.78%2c0%2c0%2c1-4.05-1.81%2c5.34%2c5.34%2c0%2c0%2c1%2c0-7.56l9.3-9.26a1%2c1%2c0%2c1%2c1%2c1.48%2c1.48l-9.3%2c9.26h0a3.26%2c3.26%2c0%2c0%2c0%2c0%2c4.6%2c3.79%2c3.79%2c0%2c0%2c0%2c2.58%2c1.21%2c2.55%2c2.55%2c0%2c0%2c0%2c1.85-.81h0L20.4%2c7.46a1.83%2c1.83%2c0%2c0%2c0%2c.5-1.39%2c2.24%2c2.24%2c0%2c0%2c0-.63-1.44%2c1.85%2c1.85%2c0%2c0%2c0-2.61%2c0h0L7.43%2c14.73a.48.48%2c0%2c0%2c0%2c0%2c.67.48.48%2c0%2c0%2c0%2c.34.14.46.46%2c0%2c0%2c0%2c.34-.14l7.36-7.28a1%2c1%2c0%2c0%2c1%2c1.48%2c0A1%2c1%2c0%2c0%2c1%2c17%2c9.6h0L9.6%2c16.88h0a2.66%2c2.66%2c0%2c0%2c1-3.65%2c0%2c2.55%2c2.55%2c0%2c0%2c1%2c0-3.63L16.17%2c3.15a4%2c4%2c0%2c0%2c1%2c5.59%2c0A4.31%2c4.31%2c0%2c0%2c1%2c23%2c6%2c3.89%2c3.89%2c0%2c0%2c1%2c21.88%2c8.94Z'/%3e %3c/svg%3e");
|
|
@@ -30,7 +27,6 @@
|
|
|
30
27
|
font-weight: 400;
|
|
31
28
|
text-decoration: none;
|
|
32
29
|
white-space: nowrap;
|
|
33
|
-
/* stylelint-disable-line declaration-property-value-disallowed-list */
|
|
34
30
|
}
|
|
35
31
|
.dso-attachments::after {
|
|
36
32
|
background: var(--dso-icon, var(--di-paperclip-grijs)) no-repeat;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
2
|
display: block;
|
|
6
3
|
--di-status-danger: url("data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e");
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { html, nothing } from 'lit-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { iconTemplate } from '../icon/icon.template';
|
|
4
|
+
export function buttonTemplate(button) {
|
|
5
|
+
return 'url' in button
|
|
6
|
+
? anchorElement(button)
|
|
7
|
+
: buttonElement(button);
|
|
8
|
+
}
|
|
9
|
+
function anchorElement({ url, label, modifier, id, icon, iconMode }) {
|
|
10
|
+
return html `
|
|
11
|
+
<a
|
|
12
|
+
href=${url}
|
|
13
|
+
class=${ifDefined(modifier)}
|
|
14
|
+
?id=${id}
|
|
15
|
+
>
|
|
16
|
+
${icon && !iconMode
|
|
17
|
+
? iconTemplate(icon)
|
|
18
|
+
: nothing}<span class=${ifDefined(iconMode === 'only' ? 'sr-only' : undefined)}>${label}</span>${(modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern'))
|
|
19
|
+
? html `<span class="sr-only">(Opent andere website in nieuw tabblad)</span>`
|
|
20
|
+
: nothing}${icon && iconMode
|
|
21
|
+
? iconTemplate(icon)
|
|
22
|
+
: nothing}
|
|
23
|
+
</a>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
function buttonElement({ variant, label, type, modifier, id, disabled, icon, iconMode, ariaDescribedby, ariaExpanded, ariaHaspopup, ariaRoledescription, onClick }) {
|
|
27
|
+
type !== null && type !== void 0 ? type : (type = 'button');
|
|
28
|
+
const className = variant ? `dso-${variant}` : modifier;
|
|
29
|
+
return html `
|
|
30
|
+
<button
|
|
31
|
+
type=${type}
|
|
32
|
+
id=${ifDefined(id)}
|
|
33
|
+
class=${ifDefined(className)}
|
|
34
|
+
?disabled=${disabled}
|
|
35
|
+
aria-describedby=${ifDefined(ariaDescribedby)}
|
|
36
|
+
aria-expanded=${ifDefined(ariaExpanded)}
|
|
37
|
+
aria-haspopup=${ifDefined(ariaHaspopup)}
|
|
38
|
+
aria-roledescription=${ifDefined(ariaRoledescription)}
|
|
39
|
+
@click=${ifDefined(onClick)}
|
|
40
|
+
>
|
|
41
|
+
${icon && !iconMode
|
|
42
|
+
? iconTemplate(icon)
|
|
43
|
+
: nothing}<span class=${ifDefined(iconMode === 'only' ? 'sr-only' : undefined)}>${label}</span>${icon && iconMode
|
|
44
|
+
? iconTemplate(icon)
|
|
45
|
+
: nothing}
|
|
46
|
+
</button>
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
function contextLabelTemplate(label, content, children) {
|
|
3
|
+
return html `
|
|
4
|
+
<div class="dso-context-wrapper">
|
|
5
|
+
<span class="dso-context-label">
|
|
6
|
+
${label}
|
|
7
|
+
</span>
|
|
8
|
+
<div class="dso-context-container">
|
|
9
|
+
${content}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
${children}
|
|
13
|
+
`;
|
|
14
|
+
}
|
|
15
|
+
function contextFieldsetTemplate(label, content, children) {
|
|
16
|
+
return html `
|
|
17
|
+
<fieldset>
|
|
18
|
+
<legend class="sr-only">
|
|
19
|
+
${label}
|
|
20
|
+
</legend>
|
|
21
|
+
<div class="dso-context-wrapper">
|
|
22
|
+
<span class="dso-context-label" aria-hidden="true">
|
|
23
|
+
${label}
|
|
24
|
+
</span>
|
|
25
|
+
<div class="dso-context-container">
|
|
26
|
+
${content}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
${children}
|
|
30
|
+
</fieldset>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
export function contextTemplate({ label, type, content, children }) {
|
|
34
|
+
switch (type) {
|
|
35
|
+
case 'label':
|
|
36
|
+
return contextLabelTemplate(label, content, children);
|
|
37
|
+
case 'legend':
|
|
38
|
+
return contextFieldsetTemplate(label, content, children);
|
|
39
|
+
default:
|
|
40
|
+
throw new TypeError('type can only be label or legend');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
4
|
+
import { listTemplate } from '../list/list.template';
|
|
5
|
+
function definitionTemplate({ term, descriptions }, useSrOnlyColon) {
|
|
6
|
+
return html `
|
|
7
|
+
<dt>
|
|
8
|
+
${term}${useSrOnlyColon
|
|
9
|
+
? html `<span class="sr-only">:</span>`
|
|
10
|
+
: ':'}
|
|
11
|
+
</dt>
|
|
12
|
+
${descriptions.map(description => html `
|
|
13
|
+
<dd>${definitionContentTemplate(description)}</dd>
|
|
14
|
+
`)}
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
function definitionContentTemplate(description) {
|
|
18
|
+
if ('content' in description) {
|
|
19
|
+
if (typeof description.content === 'string') {
|
|
20
|
+
return unsafeHTML(description.content);
|
|
21
|
+
}
|
|
22
|
+
return description.content;
|
|
23
|
+
}
|
|
24
|
+
return listTemplate(description.list);
|
|
25
|
+
}
|
|
26
|
+
export function definitionListTemplate({ modifier, definitions, useSrOnlyColon }) {
|
|
27
|
+
return html `
|
|
28
|
+
<dl class=${ifDefined(modifier)}>
|
|
29
|
+
${definitions.map(definition => (modifier === null || modifier === void 0 ? void 0 : modifier.split(' ').includes('dso-columns'))
|
|
30
|
+
? html `
|
|
31
|
+
<div>${definitionTemplate(definition, useSrOnlyColon)}</div>
|
|
32
|
+
`
|
|
33
|
+
: definitionTemplate(definition, useSrOnlyColon))}
|
|
34
|
+
</dl>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
|
-
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
5
1
|
:host {
|
|
6
2
|
--di-chevron-down-bosgroen: url("data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e");
|
|
7
3
|
--di-chevron-up-bosgroen: url("data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e");
|
|
@@ -178,7 +174,6 @@ dso-dropdown-menu .dso-dropdown-options li button {
|
|
|
178
174
|
padding: 3px 20px;
|
|
179
175
|
text-decoration: none;
|
|
180
176
|
white-space: nowrap;
|
|
181
|
-
/* stylelint-disable-line declaration-property-value-disallowed-list */
|
|
182
177
|
}
|
|
183
178
|
dso-dropdown-menu .dso-dropdown-options li a:hover, dso-dropdown-menu .dso-dropdown-options li a:focus, dso-dropdown-menu .dso-dropdown-options li a:active,
|
|
184
179
|
dso-dropdown-menu .dso-dropdown-options li button:hover,
|
|
@@ -389,7 +384,6 @@ dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li + li {
|
|
|
389
384
|
line-height: 1;
|
|
390
385
|
margin-top: 8px;
|
|
391
386
|
padding: 16px 0;
|
|
392
|
-
/* stylelint-disable-next-line declaration-property-value-disallowed-list */
|
|
393
387
|
white-space: nowrap;
|
|
394
388
|
}
|
|
395
389
|
.dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus, .dso-nav.dso-nav-main > li > a:active {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
2
|
display: block;
|
|
6
3
|
--di-times: url("data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e");
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
2
|
--di-external-link-grijs90: url("data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e");
|
|
6
3
|
--di-download-grijs90: url("data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e");
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
|
-
--di-times-
|
|
2
|
+
--di-times-grijs90: url("data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e");
|
|
6
3
|
display: block;
|
|
7
4
|
background-color: #f2f2f2;
|
|
8
5
|
padding: 16px 32px 16px 16px;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable value-keyword-case */
|
|
2
|
-
/* stylelint-disable string-no-newline */
|
|
3
|
-
/* stylelint-enable */
|
|
4
1
|
:host {
|
|
5
2
|
display: inline-block;
|
|
6
3
|
--di-info: url("data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e");
|