@dso-toolkit/core 32.2.0 → 33.3.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-autosuggest.cjs.entry.js +7 -71
- package/dist/cjs/dso-date-picker.cjs.entry.js +10 -10
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +16 -2
- package/dist/cjs/dso-header.cjs.entry.js +101 -0
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-label.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +3 -4
- package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-overlays.cjs.entry.js +5 -8
- package/dist/cjs/dso-toggletip.cjs.entry.js +2 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +168 -75
- package/dist/cjs/dso-tree-view.cjs.entry.js +5 -4
- package/dist/cjs/index-794ad37a.js +72 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/autosuggest/autosuggest.js +19 -1
- package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
- package/dist/collection/components/date-picker/date-picker.js +10 -10
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +4 -0
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -1
- package/dist/collection/components/header/header.css +439 -0
- package/dist/collection/components/header/header.js +294 -0
- package/dist/collection/components/header/header.template.js +32 -0
- package/dist/collection/components/info-button/info-button.css +1 -0
- package/dist/collection/components/label/label.js +2 -1
- package/dist/collection/components/map-base-layers/map-base-layers.js +6 -27
- package/dist/collection/components/map-controls/map-controls.css +18 -8
- package/dist/collection/components/map-controls/map-controls.js +10 -11
- package/dist/collection/components/map-controls/map-controls.template.js +5 -8
- package/dist/collection/components/map-overlays/map-overlays.js +9 -35
- package/dist/collection/components/toggletip/toggletip.css +4 -0
- package/dist/collection/components/toggletip/toggletip.js +1 -0
- package/dist/collection/components/tooltip/tooltip.css +34 -12
- package/dist/collection/components/tooltip/tooltip.js +19 -4
- package/dist/collection/components/tooltip/tooltip.template.js +3 -5
- package/dist/collection/components/tree-view/tree-item.js +3 -2
- package/dist/collection/components/tree-view/tree-view.css +33 -5
- package/dist/collection/components/tree-view/tree-view.js +11 -11
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +318 -114
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-0a08ac9f.entry.js +1 -0
- package/dist/dso-toolkit/p-1805f5b0.js +1 -0
- package/dist/dso-toolkit/p-22bc904d.entry.js +1 -0
- package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-4a78a31b.entry.js} +1 -1
- package/dist/dso-toolkit/p-72e4484a.entry.js +1 -0
- package/dist/dso-toolkit/p-7a043467.entry.js +1 -0
- package/dist/dso-toolkit/{p-e2dc97c4.entry.js → p-984551a8.entry.js} +1 -1
- package/dist/dso-toolkit/{p-12f7e7d7.entry.js → p-99b93d2e.entry.js} +1 -1
- package/dist/dso-toolkit/p-b3e6d377.entry.js +1 -0
- package/dist/dso-toolkit/p-da3be034.entry.js +1 -0
- package/dist/dso-toolkit/p-e814d644.entry.js +1 -0
- package/dist/dso-toolkit/p-ec8b74f7.entry.js +1 -0
- package/dist/dso-toolkit/p-ff767c21.entry.js +1 -0
- package/dist/esm/dso-autosuggest.entry.js +6 -70
- package/dist/esm/dso-date-picker.entry.js +10 -10
- package/dist/esm/dso-dropdown-menu.entry.js +16 -2
- package/dist/esm/dso-header.entry.js +97 -0
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-label.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +3 -4
- package/dist/esm/dso-map-controls.entry.js +2 -2
- package/dist/esm/dso-map-overlays.entry.js +5 -8
- package/dist/esm/dso-toggletip.entry.js +2 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +168 -75
- package/dist/esm/dso-tree-view.entry.js +5 -4
- package/dist/esm/index-f2bf58ce.js +70 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +5 -0
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/types/components/header/header.d.ts +36 -0
- package/dist/types/components/header/header.template.d.ts +2 -0
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
- package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +5 -1
- package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
- package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
- package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +6 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components/tree-view/tree-item.d.ts +4 -4
- package/dist/types/components/tree-view/tree-view.d.ts +12 -9
- package/dist/types/components/tree-view/tree-view.interfaces.d.ts +14 -4
- package/dist/types/components/tree-view/tree-view.template.d.ts +1 -1
- package/dist/types/components.d.ts +45 -15
- package/package.json +3 -9
- package/dist/dso-toolkit/p-08427682.entry.js +0 -1
- package/dist/dso-toolkit/p-39dae284.entry.js +0 -1
- package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
- package/dist/dso-toolkit/p-9e9f8bcf.entry.js +0 -1
- package/dist/dso-toolkit/p-ad8f467f.entry.js +0 -1
- package/dist/dso-toolkit/p-e03d7741.entry.js +0 -1
- package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
- package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
/* stylelint-disable value-keyword-case */
|
|
2
2
|
/* stylelint-disable string-no-newline */
|
|
3
3
|
/* stylelint-enable */
|
|
4
|
-
:host(
|
|
5
|
-
|
|
4
|
+
:host(.hidden) {
|
|
5
|
+
visibility: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host-context(dso-toggletip) {
|
|
9
|
+
color: red !important;
|
|
10
|
+
}
|
|
11
|
+
:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow {
|
|
12
|
+
margin-left: 3px;
|
|
13
|
+
}
|
|
14
|
+
:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow {
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
}
|
|
17
|
+
:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow {
|
|
18
|
+
margin-left: 3px;
|
|
19
|
+
}
|
|
20
|
+
:host-context(dso-toggletip) *[data-popper-placement=left] {
|
|
21
|
+
margin-right: -8px !important;
|
|
22
|
+
}
|
|
23
|
+
:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow {
|
|
24
|
+
margin-top: 0;
|
|
6
25
|
}
|
|
7
26
|
|
|
8
27
|
*,
|
|
@@ -36,7 +55,7 @@
|
|
|
36
55
|
z-index: 1070;
|
|
37
56
|
}
|
|
38
57
|
.tooltip.in {
|
|
39
|
-
opacity:
|
|
58
|
+
opacity: 1;
|
|
40
59
|
}
|
|
41
60
|
.tooltip .tooltip-inner {
|
|
42
61
|
background-color: #fff;
|
|
@@ -55,7 +74,6 @@
|
|
|
55
74
|
border-color: transparent;
|
|
56
75
|
border-style: solid;
|
|
57
76
|
height: 0;
|
|
58
|
-
position: absolute;
|
|
59
77
|
width: 0;
|
|
60
78
|
}
|
|
61
79
|
.tooltip[data-popper-placement=top] {
|
|
@@ -66,8 +84,9 @@
|
|
|
66
84
|
border-top-color: #fff;
|
|
67
85
|
border-width: 6px 6px 0;
|
|
68
86
|
bottom: 0;
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
}
|
|
88
|
+
.tooltip[data-popper-placement=top] .tooltip-arrow {
|
|
89
|
+
margin-left: -3px;
|
|
71
90
|
}
|
|
72
91
|
.tooltip[data-popper-placement=right] {
|
|
73
92
|
margin-left: 3px;
|
|
@@ -77,8 +96,9 @@
|
|
|
77
96
|
border-right-color: #fff;
|
|
78
97
|
border-width: 6px 6px 6px 0;
|
|
79
98
|
left: 0;
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
}
|
|
100
|
+
.tooltip[data-popper-placement=right] .tooltip-arrow {
|
|
101
|
+
margin-top: -3px;
|
|
82
102
|
}
|
|
83
103
|
.tooltip[data-popper-placement=bottom] {
|
|
84
104
|
margin-top: 3px;
|
|
@@ -87,10 +107,11 @@
|
|
|
87
107
|
.tooltip[data-popper-placement=bottom] .tooltip-arrow {
|
|
88
108
|
border-bottom-color: #fff;
|
|
89
109
|
border-width: 0 6px 6px;
|
|
90
|
-
left: 50%;
|
|
91
|
-
margin-left: -6px;
|
|
92
110
|
top: 0;
|
|
93
111
|
}
|
|
112
|
+
.tooltip[data-popper-placement=bottom] .tooltip-arrow {
|
|
113
|
+
margin-left: -3px;
|
|
114
|
+
}
|
|
94
115
|
.tooltip[data-popper-placement=left] {
|
|
95
116
|
margin-left: -3px;
|
|
96
117
|
padding: 0 6px;
|
|
@@ -98,7 +119,8 @@
|
|
|
98
119
|
.tooltip[data-popper-placement=left] .tooltip-arrow {
|
|
99
120
|
border-left-color: #fff;
|
|
100
121
|
border-width: 6px 0 6px 6px;
|
|
101
|
-
margin-top: -6px;
|
|
102
122
|
right: 0;
|
|
103
|
-
|
|
123
|
+
}
|
|
124
|
+
.tooltip[data-popper-placement=left] .tooltip-arrow {
|
|
125
|
+
margin-top: -3px;
|
|
104
126
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { createPopper } from '@popperjs/core';
|
|
1
|
+
import { beforeWrite, createPopper } from '@popperjs/core';
|
|
2
|
+
import maxSize from 'popper-max-size-modifier';
|
|
2
3
|
import { h, Component, Element, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
@@ -18,6 +19,19 @@ export class Tooltip {
|
|
|
18
19
|
*/
|
|
19
20
|
this.active = false;
|
|
20
21
|
this.hidden = true;
|
|
22
|
+
this.applyMaxSize = {
|
|
23
|
+
name: 'applyMaxSize',
|
|
24
|
+
enabled: true,
|
|
25
|
+
phase: beforeWrite,
|
|
26
|
+
requires: ['maxSize'],
|
|
27
|
+
fn({ state }) {
|
|
28
|
+
let { width } = state.modifiersData.maxSize;
|
|
29
|
+
if (width < 160) {
|
|
30
|
+
width = 160;
|
|
31
|
+
}
|
|
32
|
+
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), { maxWidth: `${width}px` });
|
|
33
|
+
},
|
|
34
|
+
};
|
|
21
35
|
}
|
|
22
36
|
/**
|
|
23
37
|
* Activate the tooltip (Sets the `active` attribute)
|
|
@@ -75,7 +89,8 @@ export class Tooltip {
|
|
|
75
89
|
}
|
|
76
90
|
this.target = this.getTarget();
|
|
77
91
|
this.popper = createPopper(this.target, tooltip, {
|
|
78
|
-
placement: this.position
|
|
92
|
+
placement: this.position,
|
|
93
|
+
modifiers: [maxSize, this.applyMaxSize],
|
|
79
94
|
});
|
|
80
95
|
this.callbacks = {
|
|
81
96
|
activate: () => (this.active = true),
|
|
@@ -107,9 +122,9 @@ export class Tooltip {
|
|
|
107
122
|
}
|
|
108
123
|
}
|
|
109
124
|
render() {
|
|
110
|
-
return (h(Host, { hidden: this.hidden },
|
|
125
|
+
return (h(Host, { class: { 'hidden': this.hidden } },
|
|
111
126
|
h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" },
|
|
112
|
-
!this.noArrow && h("div", { class: "tooltip-arrow" }),
|
|
127
|
+
!this.noArrow && h("div", { "data-popper-arrow": true, class: "tooltip-arrow" }),
|
|
113
128
|
h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) },
|
|
114
129
|
h("slot", null)))));
|
|
115
130
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
2
|
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
3
|
export function tooltipTemplate({ active, position, label, id }) {
|
|
4
|
-
return html
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
</dso-tooltip>
|
|
8
|
-
`;
|
|
4
|
+
return html `<dso-tooltip position=${position} for=${ifDefined(id)} ?active=${active}>
|
|
5
|
+
${label}
|
|
6
|
+
</dso-tooltip>`;
|
|
9
7
|
}
|
|
@@ -2,13 +2,14 @@ import { h, Fragment } from '@stencil/core';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
export const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
|
|
4
4
|
var _a, _b, _c;
|
|
5
|
-
return (h("li", { key: item.
|
|
5
|
+
return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
|
|
6
6
|
h("div", { class: "tree-branch-control" }, item.hasItems
|
|
7
7
|
?
|
|
8
8
|
h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
9
9
|
h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
|
|
10
10
|
: h("dso-icon", null)),
|
|
11
|
-
h("p", { class:
|
|
11
|
+
h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
12
|
+
item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
|
|
12
13
|
item.href
|
|
13
14
|
? h("a", { href: item.href, tabindex: "-1" }, item.label)
|
|
14
15
|
: h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
|
|
@@ -19,25 +19,53 @@
|
|
|
19
19
|
display: inline-block;
|
|
20
20
|
margin: 8px 0;
|
|
21
21
|
}
|
|
22
|
-
:host .tree-content
|
|
23
|
-
|
|
22
|
+
:host .tree-content.active {
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
}
|
|
25
|
+
:host .tree-content.active:hover {
|
|
26
|
+
text-decoration: underline;
|
|
27
|
+
}
|
|
28
|
+
:host .tree-content.active a {
|
|
24
29
|
text-decoration: none;
|
|
25
30
|
}
|
|
26
|
-
:host .tree-content
|
|
27
|
-
color: #
|
|
31
|
+
:host .tree-content.selected {
|
|
32
|
+
color: #191919;
|
|
33
|
+
font-weight: 700;
|
|
28
34
|
text-decoration: underline;
|
|
29
35
|
}
|
|
36
|
+
:host .tree-content.selected:hover, :host .tree-content.selected:focus {
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
}
|
|
39
|
+
:host .tree-content a, :host .tree-content a:visited {
|
|
40
|
+
color: #191919;
|
|
41
|
+
text-decoration: underline;
|
|
42
|
+
}
|
|
43
|
+
:host .tree-content a:hover, :host .tree-content a:focus {
|
|
44
|
+
color: #191919;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
}
|
|
30
47
|
:host .tree-content a:active {
|
|
31
48
|
text-decoration: none;
|
|
32
49
|
}
|
|
33
50
|
:host .tree-content dso-icon {
|
|
34
|
-
vertical-align: text-bottom;
|
|
35
51
|
font-size: 0.75em;
|
|
36
52
|
margin-left: 0.5em;
|
|
53
|
+
vertical-align: text-bottom;
|
|
37
54
|
}
|
|
38
55
|
|
|
39
56
|
*,
|
|
40
57
|
*::after,
|
|
41
58
|
*::before {
|
|
42
59
|
box-sizing: border-box;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sr-only {
|
|
63
|
+
position: absolute;
|
|
64
|
+
width: 1px;
|
|
65
|
+
height: 1px;
|
|
66
|
+
padding: 0;
|
|
67
|
+
margin: -1px;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
clip: rect(0, 0, 0, 0);
|
|
70
|
+
border: 0;
|
|
43
71
|
}
|
|
@@ -55,7 +55,7 @@ export class TreeView {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
TreeView.setFocus(tree, contentElement);
|
|
58
|
-
this.clickItem.emit([...ancestors, item]);
|
|
58
|
+
this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (item.open) {
|
|
@@ -158,8 +158,8 @@ export class TreeView {
|
|
|
158
158
|
"type": "unknown",
|
|
159
159
|
"mutable": false,
|
|
160
160
|
"complexType": {
|
|
161
|
-
"original": "TreeViewItem
|
|
162
|
-
"resolved": "TreeViewItem
|
|
161
|
+
"original": "TreeViewItem[]",
|
|
162
|
+
"resolved": "TreeViewItem[]",
|
|
163
163
|
"references": {
|
|
164
164
|
"TreeViewItem": {
|
|
165
165
|
"location": "import",
|
|
@@ -186,8 +186,8 @@ export class TreeView {
|
|
|
186
186
|
"text": "Emitted when a tree view item is opened.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the\nroot to the item that is emitting the open event. The consumer of the event is responsible for updating\nthe TreeView's collection (usually set the open state on the last TreeViewItem in path)."
|
|
187
187
|
},
|
|
188
188
|
"complexType": {
|
|
189
|
-
"original": "TreeViewItem
|
|
190
|
-
"resolved": "TreeViewItem
|
|
189
|
+
"original": "TreeViewItem[]",
|
|
190
|
+
"resolved": "TreeViewItem[]",
|
|
191
191
|
"references": {
|
|
192
192
|
"TreeViewItem": {
|
|
193
193
|
"location": "import",
|
|
@@ -206,8 +206,8 @@ export class TreeView {
|
|
|
206
206
|
"text": "Emitted when a tree view item is closed.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the\nroot to the item that is emitting the close event. The consumer of the event is responsible for updating\nthe TreeView's collection (usually set the closed state on the last TreeViewItem in path)."
|
|
207
207
|
},
|
|
208
208
|
"complexType": {
|
|
209
|
-
"original": "TreeViewItem
|
|
210
|
-
"resolved": "TreeViewItem
|
|
209
|
+
"original": "TreeViewItem[]",
|
|
210
|
+
"resolved": "TreeViewItem[]",
|
|
211
211
|
"references": {
|
|
212
212
|
"TreeViewItem": {
|
|
213
213
|
"location": "import",
|
|
@@ -223,13 +223,13 @@ export class TreeView {
|
|
|
223
223
|
"composed": true,
|
|
224
224
|
"docs": {
|
|
225
225
|
"tags": [],
|
|
226
|
-
"text": "Emitted when a tree view item is clicked.\nThe `detail` property of the `CustomEvent`\u00A0will contain the complete path of TreeViewItems from the
|
|
226
|
+
"text": "Emitted when a tree view item is clicked.\nThe `detail` property of the `CustomEvent`\u00A0will contain an object with:\n`path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event.\n`originalEvent` = the original click event.\nThe consumer of the event is responsible for updating the TreeView's collection (usually set the active\nstate on the last TreeViewItem in path and clear all other active item states)."
|
|
227
227
|
},
|
|
228
228
|
"complexType": {
|
|
229
|
-
"original": "
|
|
230
|
-
"resolved": "
|
|
229
|
+
"original": "TreeViewPointerEvent",
|
|
230
|
+
"resolved": "TreeViewPointerEvent",
|
|
231
231
|
"references": {
|
|
232
|
-
"
|
|
232
|
+
"TreeViewPointerEvent": {
|
|
233
233
|
"location": "import",
|
|
234
234
|
"path": "./tree-view.interfaces"
|
|
235
235
|
}
|
|
@@ -44,6 +44,12 @@ export const DsoDropdownMenu: {
|
|
|
44
44
|
new (): DsoDropdownMenu;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
interface DsoHeader extends Components.DsoHeader, HTMLElement {}
|
|
48
|
+
export const DsoHeader: {
|
|
49
|
+
prototype: DsoHeader;
|
|
50
|
+
new (): DsoHeader;
|
|
51
|
+
};
|
|
52
|
+
|
|
47
53
|
interface DsoHelpcenterPanel extends Components.DsoHelpcenterPanel, HTMLElement {}
|
|
48
54
|
export const DsoHelpcenterPanel: {
|
|
49
55
|
prototype: DsoHelpcenterPanel;
|