dso-toolkit 37.0.0 → 38.1.1
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/components/Componenten/highlight-box/highlight-box.config.yml +8 -6
- package/components/Componenten/rich-content/rich-content.njk +8 -6
- package/components/Componenten/shopping-cart/shopping-cart.config.yml +12 -0
- package/components/Componenten/shopping-cart/shopping-cart.filters.js +0 -3
- package/components/Componenten/shopping-cart/shopping-cart.njk +12 -8
- package/components/Componenten/tooltip/tooltip.njk +1 -1
- package/components/Componenten/tooltip-css/tooltip-css.njk +1 -1
- package/components/Voorbeelden/20-Toepassingen/10-Aanvragen/activiteiten.config.yml +1 -0
- package/dist/library/@dso-toolkit/core/cjs/dso-autosuggest.cjs.entry.js +17 -7
- package/dist/library/@dso-toolkit/core/cjs/dso-dropdown-menu.cjs.entry.js +11 -28
- package/dist/library/@dso-toolkit/core/cjs/dso-helpcenter-panel.cjs.entry.js +2 -2
- package/dist/library/@dso-toolkit/core/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-ozon-content.cjs.entry.js +22 -3
- package/dist/library/@dso-toolkit/core/cjs/dso-toggletip.cjs.entry.js +1 -2
- package/dist/library/@dso-toolkit/core/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-tooltip.cjs.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-viewer-grid.cjs.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/cjs/loader.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.css +11 -2
- package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.js +55 -8
- package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.stories.js +8 -6
- package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.template.js +4 -1
- package/dist/library/@dso-toolkit/core/collection/components/dropdown-menu/dropdown-menu.js +12 -30
- package/dist/library/@dso-toolkit/core/collection/components/helpcenter-panel/helpcenter-panel.css +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/helpcenter-panel/helpcenter-panel.js +4 -4
- package/dist/library/@dso-toolkit/core/collection/components/highlight-box/highlight-box.css +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/highlight-box/highlight-box.stories.js +8 -6
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/noot.node.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.css +14 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.js +58 -2
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.template.js +4 -1
- package/dist/library/@dso-toolkit/core/collection/components/selectable/selectable.template.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/toggletip/toggletip.js +1 -2
- package/dist/library/@dso-toolkit/core/collection/components/tooltip/tooltip.js +24 -2
- package/dist/library/@dso-toolkit/core/collection/components/tooltip/tooltip.template.js +2 -2
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.js +27 -1
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.stories.js +4 -2
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.template.js +4 -1
- package/dist/library/@dso-toolkit/core/custom-elements/index.js +67 -49
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-d6c47662.entry.js → p-14fc5767.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-7b67e324.entry.js → p-150fe323.entry.js} +1 -1
- package/dist/{toolkit/core/packages/core/dist/dso-toolkit/p-2daedd0a.entry.js → library/@dso-toolkit/core/dso-toolkit/p-1e92e29d.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-2f64bded.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-49938275.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-7f41f2a1.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-a8cf15cf.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-e1496a15.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/esm/dso-autosuggest.entry.js +17 -7
- package/dist/library/@dso-toolkit/core/esm/dso-dropdown-menu.entry.js +12 -29
- package/dist/library/@dso-toolkit/core/esm/dso-helpcenter-panel.entry.js +2 -2
- package/dist/library/@dso-toolkit/core/esm/dso-highlight-box.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-ozon-content.entry.js +23 -4
- package/dist/library/@dso-toolkit/core/esm/dso-toggletip.entry.js +1 -2
- package/dist/library/@dso-toolkit/core/esm/dso-toolkit.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-tooltip.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/esm/dso-viewer-grid.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/esm/loader.js +1 -1
- package/dist/library/@dso-toolkit/core/types/components/autosuggest/autosuggest.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/library/@dso-toolkit/core/types/components/dropdown-menu/dropdown-menu.d.ts +0 -3
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.d.ts +14 -1
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.interfaces.d.ts +3 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.template.d.ts +1 -1
- package/dist/library/@dso-toolkit/core/types/components/tooltip/tooltip.d.ts +4 -0
- package/dist/library/@dso-toolkit/core/types/components/tooltip/tooltip.template.d.ts +1 -1
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid.d.ts +5 -2
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid.template.d.ts +1 -1
- package/dist/library/@dso-toolkit/core/types/components.d.ts +46 -2
- package/dist/library/components/detail/activiteiten.html +2 -0
- package/dist/library/components/detail/form--autocomplete.html +1 -1
- package/dist/library/components/detail/form--form-horizontal.html +1 -1
- package/dist/library/components/detail/form--form-vertical.html +1 -1
- package/dist/library/components/detail/form--multi-page.html +1 -1
- package/dist/library/components/detail/form--sections.html +1 -1
- package/dist/library/components/detail/form--simple-form.html +1 -1
- package/dist/library/components/detail/form--single-page.html +1 -1
- package/dist/library/components/detail/form.html +1 -1
- package/dist/library/components/detail/highlight-box--bordered.html +20 -14
- package/dist/library/components/detail/highlight-box--default.html +20 -14
- package/dist/library/components/detail/highlight-box--icon-indicator.html +20 -14
- package/dist/library/components/detail/highlight-box--link-list.html +8 -6
- package/dist/library/components/detail/highlight-box--step-indicator.html +20 -14
- package/dist/library/components/detail/highlight-box--white-drop-shadow.html +20 -14
- package/dist/library/components/detail/highlight-box--yellow.html +20 -14
- package/dist/library/components/detail/highlight-box.html +128 -90
- package/dist/library/components/detail/rich-content.html +16 -12
- package/dist/library/components/detail/shopping-cart--default.html +13 -8
- package/dist/library/components/detail/shopping-cart--items-collapsed.html +14 -8
- package/dist/library/components/detail/shopping-cart--items-edit.html +14 -8
- package/dist/library/components/detail/shopping-cart--items-expanded.html +14 -8
- package/dist/library/components/detail/shopping-cart--items-non-collapsable.html +1614 -0
- package/dist/library/components/detail/shopping-cart--subitems-hidden-summary.html +13 -8
- package/dist/library/components/detail/shopping-cart--subitems-with-warning.html +15 -9
- package/dist/library/components/detail/shopping-cart--subitems.html +14 -8
- package/dist/library/components/detail/shopping-cart.html +119 -9
- package/dist/library/components/detail/tooltip--default.html +3 -3
- package/dist/library/components/detail/tooltip--tooltip-bottom.html +5 -3
- package/dist/library/components/detail/tooltip--tooltip-left.html +5 -3
- package/dist/library/components/detail/tooltip--tooltip-right-small.html +3 -3
- package/dist/library/components/detail/tooltip--tooltip-right.html +3 -3
- package/dist/library/components/detail/tooltip-css--default.html +2 -2
- package/dist/library/components/detail/tooltip-css--tooltip-bottom.html +2 -2
- package/dist/library/components/detail/tooltip-css--tooltip-left.html +2 -2
- package/dist/library/components/detail/tooltip-css--tooltip-right-small.html +2 -2
- package/dist/library/components/detail/tooltip-css--tooltip-right.html +2 -2
- package/dist/library/components/detail/tooltip-css.html +6 -6
- package/dist/library/components/detail/tooltip.html +15 -11
- package/dist/library/components/preview/activiteiten.html +1 -0
- package/dist/library/components/preview/highlight-box--bordered.html +12 -8
- package/dist/library/components/preview/highlight-box--default.html +12 -8
- package/dist/library/components/preview/highlight-box--icon-indicator.html +12 -8
- package/dist/library/components/preview/highlight-box--step-indicator.html +12 -8
- package/dist/library/components/preview/highlight-box--white-drop-shadow.html +12 -8
- package/dist/library/components/preview/highlight-box--yellow.html +12 -8
- package/dist/library/components/preview/highlight-box.html +90 -66
- package/dist/library/components/preview/rich-content.html +15 -8
- package/dist/library/components/preview/shopping-cart--items-collapsed.html +3 -2
- package/dist/library/components/preview/shopping-cart--items-edit.html +3 -2
- package/dist/library/components/preview/shopping-cart--items-expanded.html +3 -2
- package/dist/library/components/preview/shopping-cart--items-non-collapsable.html +112 -0
- package/dist/library/components/preview/shopping-cart--subitems-with-warning.html +3 -2
- package/dist/library/components/preview/shopping-cart--subitems.html +3 -2
- package/dist/library/components/preview/shopping-cart.html +118 -10
- package/dist/library/components/preview/tooltip--default.html +1 -1
- package/dist/library/components/preview/tooltip--tooltip-bottom.html +1 -1
- package/dist/library/components/preview/tooltip--tooltip-left.html +1 -1
- package/dist/library/components/preview/tooltip--tooltip-right-small.html +1 -1
- package/dist/library/components/preview/tooltip--tooltip-right.html +1 -1
- package/dist/library/components/preview/tooltip-css--default.html +1 -1
- package/dist/library/components/preview/tooltip-css--tooltip-bottom.html +1 -1
- package/dist/library/components/preview/tooltip-css--tooltip-left.html +1 -1
- package/dist/library/components/preview/tooltip-css--tooltip-right-small.html +1 -1
- package/dist/library/components/preview/tooltip-css--tooltip-right.html +1 -1
- package/dist/library/components/preview/tooltip-css.html +5 -5
- package/dist/library/components/preview/tooltip.html +5 -5
- package/dist/library/components/render/activiteiten.html +3 -2
- package/dist/library/components/render/highlight-box--bordered.html +4 -2
- package/dist/library/components/render/highlight-box--default.html +4 -2
- package/dist/library/components/render/highlight-box--icon-indicator.html +4 -2
- package/dist/library/components/render/highlight-box--step-indicator.html +4 -2
- package/dist/library/components/render/highlight-box--white-drop-shadow.html +4 -2
- package/dist/library/components/render/highlight-box--yellow.html +4 -2
- package/dist/library/components/render/highlight-box.html +24 -12
- package/dist/library/components/render/rich-content.html +8 -6
- package/dist/library/components/render/shopping-cart--items-collapsed.html +3 -2
- package/dist/library/components/render/shopping-cart--items-edit.html +3 -2
- package/dist/library/components/render/shopping-cart--items-expanded.html +3 -2
- package/dist/library/components/render/shopping-cart--items-non-collapsable.html +96 -0
- package/dist/library/components/render/shopping-cart--subitems-with-warning.html +3 -2
- package/dist/library/components/render/shopping-cart--subitems.html +3 -2
- package/dist/library/components/render/shopping-cart.html +118 -10
- package/dist/library/components/render/tooltip--default.html +1 -1
- package/dist/library/components/render/tooltip--tooltip-bottom.html +1 -1
- package/dist/library/components/render/tooltip--tooltip-left.html +1 -1
- package/dist/library/components/render/tooltip--tooltip-right-small.html +1 -1
- package/dist/library/components/render/tooltip--tooltip-right.html +1 -1
- package/dist/library/components/render/tooltip-css--default.html +1 -1
- package/dist/library/components/render/tooltip-css--tooltip-bottom.html +1 -1
- package/dist/library/components/render/tooltip-css--tooltip-left.html +1 -1
- package/dist/library/components/render/tooltip-css--tooltip-right-small.html +1 -1
- package/dist/library/components/render/tooltip-css--tooltip-right.html +1 -1
- package/dist/library/components/render/tooltip-css.html +5 -5
- package/dist/library/components/render/tooltip.html +5 -5
- package/dist/library/styles/dso.css +56 -19
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-d6c47662.entry.js → p-14fc5767.entry.js} +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-7b67e324.entry.js → p-150fe323.entry.js} +1 -1
- package/dist/{library/@dso-toolkit/core/dso-toolkit/p-2daedd0a.entry.js → toolkit/core/packages/core/dist/dso-toolkit/p-1e92e29d.entry.js} +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-2f64bded.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-49938275.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-7f41f2a1.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-a8cf15cf.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-e1496a15.entry.js +1 -0
- package/dist/toolkit/styles/dso.css +56 -19
- package/hydrate/index.js +70 -47
- package/libs/@dso-toolkit/css/src/components/form/form-groups/checkboxes/form-group-checkboxes.scss +19 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/radios/form-group-radios.scss +33 -0
- package/libs/@dso-toolkit/css/src/components/form/form.scss +2 -0
- package/libs/@dso-toolkit/css/src/components/list/list.scss +1 -1
- package/libs/@dso-toolkit/css/src/components/modal/modal.scss +1 -1
- package/libs/@dso-toolkit/css/src/components/rich-content/rich-content.scss +1 -1
- package/libs/@dso-toolkit/css/src/components/shopping-cart/shopping-cart.scss +8 -3
- package/libs/@dso-toolkit/sources/src/components/autosuggest/autosuggest.args.ts +12 -0
- package/libs/@dso-toolkit/sources/src/components/autosuggest/autosuggest.models.ts +2 -0
- package/libs/@dso-toolkit/sources/src/components/autosuggest/autosuggest.stories.ts +6 -3
- package/libs/@dso-toolkit/sources/src/components/form/content/checkboxes.content.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/radios.content.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/checkboxes/form-group-checkboxes.args.ts +138 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/radios/form-group-radios.args.ts +138 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.models.ts +2 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.stories.ts +38 -5
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-checkboxes.model.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-radios.model.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group.base-model.ts +0 -1
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group.model.ts +3 -1
- package/libs/@dso-toolkit/sources/src/components/highlight-box/highlight-box.scss +1 -2
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.args.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.content.ts +2 -1
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.models.ts +3 -1
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.stories.ts +2 -1
- package/libs/@dso-toolkit/sources/src/components/search-bar/search-bar.args.ts +98 -0
- package/libs/@dso-toolkit/sources/src/components/search-bar/search-bar.models.ts +14 -0
- package/libs/@dso-toolkit/sources/src/components/search-bar/search-bar.stories.ts +141 -0
- package/libs/@dso-toolkit/sources/src/components/selectable/selectable.models.ts +1 -1
- package/libs/@dso-toolkit/sources/src/components/shopping-cart/shopping-cart.args.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/shopping-cart/shopping-cart.models.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/shopping-cart/shopping-cart.stories.ts +33 -0
- package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.args.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.models.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.args.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.models.ts +2 -0
- package/libs/@dso-toolkit/sources/src/index.ts +2 -0
- package/libs/@dso-toolkit/sources/src/styling/global/a.scss +1 -42
- package/libs/@dso-toolkit/sources/src/styling/global/dl.scss +1 -1
- package/libs/@dso-toolkit/sources/src/styling/global/table.scss +1 -1
- package/libs/@dso-toolkit/sources/src/styling/mixins/anchor.scss +51 -0
- package/libs/@dso-toolkit/sources/src/styling/mixins/rich-content.scss +1 -1
- package/libs/@dso-toolkit/sources/src/styling/mixins.scss +1 -0
- package/package.json +3 -3
- package/reference/render/highlight-box--bordered.html +4 -2
- package/reference/render/highlight-box--default.html +4 -2
- package/reference/render/highlight-box--icon-indicator.html +4 -2
- package/reference/render/highlight-box--step-indicator.html +4 -2
- package/reference/render/highlight-box--white-drop-shadow.html +4 -2
- package/reference/render/highlight-box--yellow.html +4 -2
- package/reference/render/rich-content.html +8 -6
- package/reference/render/shopping-cart--items-non-collapsable.html +52 -0
- package/reference/render/shopping-cart--subitems-with-warning.html +1 -1
- package/reference/render/tooltip--default.html +1 -1
- package/reference/render/tooltip--tooltip-bottom.html +1 -1
- package/reference/render/tooltip--tooltip-left.html +1 -1
- package/reference/render/tooltip--tooltip-right-small.html +1 -1
- package/reference/render/tooltip--tooltip-right.html +1 -1
- package/reference/render/tooltip-css--default.html +1 -1
- package/reference/render/tooltip-css--tooltip-bottom.html +1 -1
- package/reference/render/tooltip-css--tooltip-left.html +1 -1
- package/reference/render/tooltip-css--tooltip-right-small.html +1 -1
- package/reference/render/tooltip-css--tooltip-right.html +1 -1
- package/src/styles/components/_form.scss +1 -21
- package/src/styles/components/_jumbotron.scss +1 -1
- package/src/styles/components/_panel.scss +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-0e535c2b.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-1a3db1cd.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-1dc02e51.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-50c71bd2.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-d1f62081.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-0e535c2b.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-1a3db1cd.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-1dc02e51.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-50c71bd2.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-d1f62081.entry.js +0 -1
|
@@ -12,6 +12,14 @@ export class Autosuggest {
|
|
|
12
12
|
* the original object that was used to create the suggestion.
|
|
13
13
|
*/
|
|
14
14
|
this.suggestions = [];
|
|
15
|
+
/**
|
|
16
|
+
* Shows progress indicator when fetching results.
|
|
17
|
+
*/
|
|
18
|
+
this.loading = false;
|
|
19
|
+
/**
|
|
20
|
+
* To override progress indicator's default loading label.
|
|
21
|
+
*/
|
|
22
|
+
this.loadingLabel = "Een moment geduld.";
|
|
15
23
|
/**
|
|
16
24
|
* Whether the previous suggestions will be presented when the input gets focus again.
|
|
17
25
|
*/
|
|
@@ -33,7 +41,7 @@ export class Autosuggest {
|
|
|
33
41
|
}
|
|
34
42
|
};
|
|
35
43
|
this.onKeyDown = (event) => {
|
|
36
|
-
if (event.defaultPrevented) {
|
|
44
|
+
if (event.defaultPrevented || this.loading) {
|
|
37
45
|
return;
|
|
38
46
|
}
|
|
39
47
|
switch (event.key) {
|
|
@@ -209,13 +217,16 @@ export class Autosuggest {
|
|
|
209
217
|
const terms = this.input.value.split(' ').filter(t => t);
|
|
210
218
|
return (h(Fragment, null,
|
|
211
219
|
h("slot", null),
|
|
212
|
-
|
|
213
|
-
?
|
|
214
|
-
h("
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
:
|
|
218
|
-
|
|
220
|
+
this.loading
|
|
221
|
+
? h("div", { class: "autosuggest-progress-box" },
|
|
222
|
+
h("dso-progress-indicator", { label: this.loadingLabel }))
|
|
223
|
+
: h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions }, this.showSuggestions
|
|
224
|
+
? this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value },
|
|
225
|
+
h("span", { class: "value" }, this.markTerms(suggestion.value, terms)),
|
|
226
|
+
suggestion.type
|
|
227
|
+
? (h("span", { class: "type" }, suggestion.type))
|
|
228
|
+
: undefined)))
|
|
229
|
+
: undefined)));
|
|
219
230
|
}
|
|
220
231
|
static get is() { return "dso-autosuggest"; }
|
|
221
232
|
static get encapsulation() { return "scoped"; }
|
|
@@ -246,6 +257,42 @@ export class Autosuggest {
|
|
|
246
257
|
},
|
|
247
258
|
"defaultValue": "[]"
|
|
248
259
|
},
|
|
260
|
+
"loading": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Shows progress indicator when fetching results."
|
|
273
|
+
},
|
|
274
|
+
"attribute": "loading",
|
|
275
|
+
"reflect": false,
|
|
276
|
+
"defaultValue": "false"
|
|
277
|
+
},
|
|
278
|
+
"loadingLabel": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"mutable": false,
|
|
281
|
+
"complexType": {
|
|
282
|
+
"original": "string",
|
|
283
|
+
"resolved": "string | undefined",
|
|
284
|
+
"references": {}
|
|
285
|
+
},
|
|
286
|
+
"required": false,
|
|
287
|
+
"optional": true,
|
|
288
|
+
"docs": {
|
|
289
|
+
"tags": [],
|
|
290
|
+
"text": "To override progress indicator's default loading label."
|
|
291
|
+
},
|
|
292
|
+
"attribute": "loading-label",
|
|
293
|
+
"reflect": false,
|
|
294
|
+
"defaultValue": "\"Een moment geduld.\""
|
|
295
|
+
},
|
|
249
296
|
"suggestOnFocus": {
|
|
250
297
|
"type": "boolean",
|
|
251
298
|
"mutable": false,
|
package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.stories.js
CHANGED
|
@@ -3,7 +3,7 @@ import { storiesOf } from "@storybook/web-components";
|
|
|
3
3
|
import { html } from 'lit-html';
|
|
4
4
|
import { autosuggestTemplate } from "./autosuggest.template";
|
|
5
5
|
import readme from "./readme.md";
|
|
6
|
-
const autosuggestConnector = ([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus]) => ({
|
|
6
|
+
const autosuggestConnector = ([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel]) => ({
|
|
7
7
|
suggestions: [],
|
|
8
8
|
onChange: function (e) {
|
|
9
9
|
onChange(e);
|
|
@@ -15,26 +15,28 @@ const autosuggestConnector = ([fetchSuggestions, onSelect, onChange, onSearch, s
|
|
|
15
15
|
},
|
|
16
16
|
onSelect,
|
|
17
17
|
onSearch,
|
|
18
|
-
suggestOnFocus
|
|
18
|
+
suggestOnFocus,
|
|
19
|
+
loading,
|
|
20
|
+
loadingLabel
|
|
19
21
|
});
|
|
20
22
|
storiesOfAutosuggest({
|
|
21
23
|
module,
|
|
22
24
|
storiesOf,
|
|
23
25
|
readme,
|
|
24
26
|
}, {
|
|
25
|
-
autosuggestDemoTemplate: (fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus) => html `
|
|
27
|
+
autosuggestDemoTemplate: (fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel) => html `
|
|
26
28
|
<label for="autosuggestInputId">Label voor input</label>
|
|
27
|
-
${autosuggestTemplate(autosuggestConnector([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus]), html `
|
|
29
|
+
${autosuggestTemplate(autosuggestConnector([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel]), html `
|
|
28
30
|
<input id="autosuggestInputId" type="text" class="form-control">
|
|
29
31
|
`)}
|
|
30
32
|
<pre id="suggestions-demo">[]</pre>
|
|
31
33
|
`,
|
|
32
|
-
autosuggestInSearchBarTemplate: (fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus) => html `
|
|
34
|
+
autosuggestInSearchBarTemplate: (fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel) => html `
|
|
33
35
|
<div class="dso-search-bar">
|
|
34
36
|
<div class="dso-search-bar-input">
|
|
35
37
|
<label for="search-bar--with-value">Label</label>
|
|
36
38
|
<span class="dso-search-icon" aria-hidden="true"></span>
|
|
37
|
-
${autosuggestTemplate(autosuggestConnector([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus]), html `
|
|
39
|
+
${autosuggestTemplate(autosuggestConnector([fetchSuggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel]), html `
|
|
38
40
|
<input type="text" id="search-bar--with-value" placeholder="Bijvoorbeeld 'Rotterdam'">
|
|
39
41
|
`)}
|
|
40
42
|
<button type="button">
|
package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.template.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel }, children) {
|
|
3
4
|
return html `
|
|
4
5
|
<dso-autosuggest
|
|
5
6
|
.suggestions=${suggestions}
|
|
@@ -7,6 +8,8 @@ export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch,
|
|
|
7
8
|
@dsoChange=${onChange}
|
|
8
9
|
@dsoSearch=${onSearch}
|
|
9
10
|
?suggest-on-focus=${suggestOnFocus}
|
|
11
|
+
?loading=${loading}
|
|
12
|
+
loading-label=${ifDefined(loadingLabel)}
|
|
10
13
|
>
|
|
11
14
|
${children}
|
|
12
15
|
</dso-autosuggest>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Prop,
|
|
1
|
+
import { Component, h, Prop, Element, Host } from "@stencil/core";
|
|
2
2
|
import { tabbable } from "tabbable";
|
|
3
3
|
import { v4 as uuidv4 } from "uuid";
|
|
4
4
|
export class DropdownMenu {
|
|
@@ -60,14 +60,6 @@ export class DropdownMenu {
|
|
|
60
60
|
get tabbables() {
|
|
61
61
|
return tabbable(this.host).filter((e) => e !== this.button);
|
|
62
62
|
}
|
|
63
|
-
openWatch(open) {
|
|
64
|
-
if (open) {
|
|
65
|
-
this.openPopup();
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
this.closePopup();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
63
|
connectedCallback() {
|
|
72
64
|
this.button.setAttribute("aria-haspopup", "menu");
|
|
73
65
|
this.button.setAttribute("aria-expanded", "false");
|
|
@@ -89,9 +81,6 @@ export class DropdownMenu {
|
|
|
89
81
|
li.setAttribute("role", "none");
|
|
90
82
|
}
|
|
91
83
|
}
|
|
92
|
-
if (this.open) {
|
|
93
|
-
this.openPopup();
|
|
94
|
-
}
|
|
95
84
|
}
|
|
96
85
|
componentDidRender() {
|
|
97
86
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
@@ -105,20 +94,17 @@ export class DropdownMenu {
|
|
|
105
94
|
}
|
|
106
95
|
}
|
|
107
96
|
}
|
|
108
|
-
}
|
|
109
|
-
openPopup() {
|
|
110
|
-
this.host.setAttribute("tabindex", "-1");
|
|
111
|
-
this.host.addEventListener("keydown", this.keyDownListener);
|
|
112
|
-
this.host.addEventListener("focusout", this.focusOutListener);
|
|
113
|
-
this.button.setAttribute("aria-expanded", "true");
|
|
114
|
-
this.tabbables.forEach((tabbable) => tabbable.addEventListener("click", this.escape));
|
|
115
|
-
}
|
|
116
|
-
closePopup() {
|
|
117
97
|
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
120
|
-
|
|
121
|
-
|
|
98
|
+
this.button.setAttribute("aria-expanded", this.open ? "true" : "false");
|
|
99
|
+
if (this.open) {
|
|
100
|
+
this.host.addEventListener("keydown", this.keyDownListener);
|
|
101
|
+
}
|
|
102
|
+
this.tabbables.forEach((tabbable) => {
|
|
103
|
+
tabbable.removeEventListener("click", this.escape);
|
|
104
|
+
if (this.open) {
|
|
105
|
+
tabbable.addEventListener("click", this.escape);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
122
108
|
}
|
|
123
109
|
getActiveElement(root = document) {
|
|
124
110
|
const activeEl = root.activeElement;
|
|
@@ -145,7 +131,7 @@ export class DropdownMenu {
|
|
|
145
131
|
tabs[nextIndex].focus();
|
|
146
132
|
}
|
|
147
133
|
render() {
|
|
148
|
-
return (h(
|
|
134
|
+
return (h(Host, { onFocusout: this.focusOutListener, tabindex: this.open ? "-1" : undefined },
|
|
149
135
|
h("slot", { name: "toggle" }),
|
|
150
136
|
h("div", { hidden: !this.open },
|
|
151
137
|
h("slot", null))));
|
|
@@ -215,8 +201,4 @@ export class DropdownMenu {
|
|
|
215
201
|
}
|
|
216
202
|
}; }
|
|
217
203
|
static get elementRef() { return "host"; }
|
|
218
|
-
static get watchers() { return [{
|
|
219
|
-
"propName": "open",
|
|
220
|
-
"methodName": "openWatch"
|
|
221
|
-
}]; }
|
|
222
204
|
}
|
package/dist/library/@dso-toolkit/core/collection/components/helpcenter-panel/helpcenter-panel.js
CHANGED
|
@@ -29,13 +29,13 @@ export class HelpcenterPanel {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return (h(Fragment, null,
|
|
32
|
-
h("button", { type: "button", onClick: this.openClick, class: `open-button ${this.isOpen}
|
|
32
|
+
h("button", { type: "button", onClick: this.openClick, class: `open-button ${this.isOpen}`, "aria-expanded": "false", "aria-haspopup": "dialog" },
|
|
33
33
|
h("dso-icon", { icon: "help" }),
|
|
34
34
|
h("span", null, this.label)),
|
|
35
35
|
h("div", { class: `wrapper ${this.visibility}` },
|
|
36
|
-
h("div", { class: "dimscreen" }),
|
|
37
|
-
h("div", { class: `iframe-container ${this.slideState}
|
|
38
|
-
h("button", { type: "button", class: `close-button ${this.isOpen}`, onClick: this.closeClick },
|
|
36
|
+
h("div", { class: "dimscreen", onClick: this.closeClick }),
|
|
37
|
+
h("div", { class: `iframe-container ${this.slideState}`, "aria-live": "polite" }, this.loadIframe ? h("iframe", { src: this.url }) : h("div", null)),
|
|
38
|
+
h("button", { type: "button", class: `close-button ${this.isOpen}`, onClick: this.closeClick, "aria-expanded": "true" },
|
|
39
39
|
h("span", { class: "sr-only" }, "sluiten")))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "dso-helpcenter-panel"; }
|
package/dist/library/@dso-toolkit/core/collection/components/highlight-box/highlight-box.stories.js
CHANGED
|
@@ -11,12 +11,14 @@ const richContent = html `
|
|
|
11
11
|
<p>Het Opleverdossier (zie voor een nadere omschrijving van de informatieproducten de volgende paragrafen) is de, door gebruikers gewenste, centrale registratie waarin alle informatie over een bouwwerk is opgenomen. Het gaat hierbij om de tekeningen, berekeningen en de resultaten van de kwaliteitsborging (zoals toetsen en inspecties).</p>
|
|
12
12
|
<p>De <a href="#">Bouwregelgeving</a> is een database met alle bouwregelgeving in Nederland, die op zodanige wijze moet zijn ingericht en ontsloten dat die voldoet aan de eisen van de Omgevingswet (3B's), en daarmee bruikbaar is in de ontwerp- en toetsingsfase van ieder bouwwerk.</p>
|
|
13
13
|
<p>Het derde informatieproduct zijn de Vergunningvrije bouwwerken, hierin zijn opgenomen de (bekende) bouwwerken die vergunningvrij, maar niet regelvrij, zijn gerealiseerd. Het vierde en vooralsnog laatste informatieproduct is de Digitaliseringshulp, een service voor het centraal en gestandaardiseerd digitaliseren van documenten.</p>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
<div class="dso-button-row">
|
|
15
|
+
<a href="#" class="btn btn-primary">Primaire button</a>
|
|
16
|
+
<a href="#" class="btn btn-default">Secundaire button</a>
|
|
17
|
+
<a href="#" class="btn btn-link btn-align">
|
|
18
|
+
Tertiaire button
|
|
19
|
+
${iconTemplate({ icon: 'chevron-down' })}
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
20
22
|
</div>
|
|
21
23
|
`;
|
|
22
24
|
storiesOfHighlightBox({
|
package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/noot.node.js
CHANGED
|
@@ -21,7 +21,7 @@ export class OzonContentNootNode {
|
|
|
21
21
|
return (h(Fragment, null,
|
|
22
22
|
h("sup", null,
|
|
23
23
|
h("button", { type: "button", class: "toggle-note", id: noteControlsId, onClick: () => setState === null || setState === void 0 ? void 0 : setState(openNoteId === noteId ? undefined : noteId), onBlur: () => setState === null || setState === void 0 ? void 0 : setState(undefined), "aria-expanded": openNoteId === noteId ? 'true' : 'false' }, nootNummer)),
|
|
24
|
-
h("dso-tooltip", { active: openNoteId === noteId, for: noteControlsId, stateless: true },
|
|
24
|
+
h("dso-tooltip", { active: openNoteId === noteId, for: noteControlsId, stateless: true, descriptive: true },
|
|
25
25
|
h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al')))))));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
text-decoration: line-through !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
:host([interactive]) {
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
color: #39870c;
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
:host([interactive]):hover, :host([interactive]):focus {
|
|
20
|
+
color: #676cb0;
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
}
|
|
23
|
+
:host([interactive]):active {
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
13
27
|
.deleted-start,
|
|
14
28
|
.deleted-end {
|
|
15
29
|
position: absolute;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { h, Component, Event, Prop, State } from '@stencil/core';
|
|
1
|
+
import { h, Component, Element, Event, Prop, State, Host } from '@stencil/core';
|
|
2
|
+
import { isTabbable } from 'tabbable';
|
|
2
3
|
import { Mapper } from './ozon-content-mapper';
|
|
3
4
|
export class OzonContent {
|
|
4
5
|
constructor() {
|
|
@@ -10,9 +11,25 @@ export class OzonContent {
|
|
|
10
11
|
* Marks content as deleted using visual and accessible clues.
|
|
11
12
|
*/
|
|
12
13
|
this.deleted = false;
|
|
14
|
+
/**
|
|
15
|
+
* Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements.
|
|
16
|
+
*
|
|
17
|
+
* **Do not** use this without an accessible companion element! `interactive` is only
|
|
18
|
+
* meant to ease the use of the companion element for mouse/touch users.
|
|
19
|
+
*/
|
|
20
|
+
this.interactive = false;
|
|
13
21
|
this.state = {};
|
|
14
22
|
this.mapper = new Mapper();
|
|
15
23
|
}
|
|
24
|
+
handleHostOnClick(e) {
|
|
25
|
+
if (!this.interactive) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const doIt = e.composedPath().find(e => e === this.host || (e instanceof HTMLElement && isTabbable(e))) === this.host;
|
|
29
|
+
if (doIt) {
|
|
30
|
+
this.dsoClick.emit({ originalEvent: e });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
16
33
|
render() {
|
|
17
34
|
var _a;
|
|
18
35
|
const context = {
|
|
@@ -27,7 +44,7 @@ export class OzonContent {
|
|
|
27
44
|
transformed,
|
|
28
45
|
h("span", { class: "deleted-end" }, "Einde verwijderd element")));
|
|
29
46
|
}
|
|
30
|
-
return transformed;
|
|
47
|
+
return (h(Host, { onClick: (e) => this.handleHostOnClick(e) }, transformed));
|
|
31
48
|
}
|
|
32
49
|
static get is() { return "dso-ozon-content"; }
|
|
33
50
|
static get encapsulation() { return "scoped"; }
|
|
@@ -90,6 +107,24 @@ export class OzonContent {
|
|
|
90
107
|
"attribute": "deleted",
|
|
91
108
|
"reflect": true,
|
|
92
109
|
"defaultValue": "false"
|
|
110
|
+
},
|
|
111
|
+
"interactive": {
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "boolean",
|
|
116
|
+
"resolved": "boolean",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements.\n\n**Do not** use this without an accessible companion element! `interactive` is only\nmeant to ease the use of the companion element for mouse/touch users."
|
|
124
|
+
},
|
|
125
|
+
"attribute": "interactive",
|
|
126
|
+
"reflect": true,
|
|
127
|
+
"defaultValue": "false"
|
|
93
128
|
}
|
|
94
129
|
}; }
|
|
95
130
|
static get states() { return {
|
|
@@ -115,5 +150,26 @@ export class OzonContent {
|
|
|
115
150
|
}
|
|
116
151
|
}
|
|
117
152
|
}
|
|
153
|
+
}, {
|
|
154
|
+
"method": "dsoClick",
|
|
155
|
+
"name": "dsoClick",
|
|
156
|
+
"bubbles": true,
|
|
157
|
+
"cancelable": true,
|
|
158
|
+
"composed": true,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "These events are only emitted when the component is `interactive`."
|
|
162
|
+
},
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "OzonContentClick",
|
|
165
|
+
"resolved": "OzonContentClick",
|
|
166
|
+
"references": {
|
|
167
|
+
"OzonContentClick": {
|
|
168
|
+
"location": "import",
|
|
169
|
+
"path": "./ozon-content.interfaces"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
118
173
|
}]; }
|
|
174
|
+
static get elementRef() { return "host"; }
|
|
119
175
|
}
|
package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.template.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
export function ozonContentTemplate({ content, inline, interactive, deleted, onAnchorClick, onClick }) {
|
|
3
4
|
return html `
|
|
4
5
|
<dso-ozon-content
|
|
5
6
|
.content=${content}
|
|
6
7
|
?inline=${inline}
|
|
8
|
+
?interactive=${interactive}
|
|
7
9
|
?deleted=${deleted}
|
|
8
10
|
@anchorClick=${onAnchorClick}
|
|
11
|
+
@dsoClick=${ifDefined(interactive ? onClick : undefined)}
|
|
9
12
|
></dso-ozon-content>
|
|
10
13
|
`;
|
|
11
14
|
}
|
package/dist/library/@dso-toolkit/core/collection/components/selectable/selectable.template.js
CHANGED
|
@@ -15,7 +15,7 @@ export function selectableTemplate({ type, id, name, label, value, required, inv
|
|
|
15
15
|
?checked=${checked}
|
|
16
16
|
?indeterminate=${indeterminate}
|
|
17
17
|
?info-fixed=${info === null || info === void 0 ? void 0 : info.fixed}
|
|
18
|
-
@dsoChange=${(e) => onChange(e.detail)}
|
|
18
|
+
@dsoChange=${(e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.detail)}
|
|
19
19
|
>
|
|
20
20
|
${label}
|
|
21
21
|
${(_a = info === null || info === void 0 ? void 0 : info.richContent) !== null && _a !== void 0 ? _a : nothing}
|
|
@@ -43,12 +43,11 @@ export class Toggletip {
|
|
|
43
43
|
throw Error("button not found");
|
|
44
44
|
}
|
|
45
45
|
this.button = button;
|
|
46
|
-
this.host.setAttribute("tabindex", "-1");
|
|
47
46
|
}
|
|
48
47
|
render() {
|
|
49
48
|
return (h(Fragment, null,
|
|
50
49
|
h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }),
|
|
51
|
-
h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small },
|
|
50
|
+
h("dso-tooltip", { stateless: true, descriptive: true, for: "toggle", active: this.active, position: this.position, small: this.small },
|
|
52
51
|
h("slot", null))));
|
|
53
52
|
}
|
|
54
53
|
static get is() { return "dso-toggletip"; }
|
|
@@ -6,6 +6,10 @@ import clsx from 'clsx';
|
|
|
6
6
|
const transitionDuration = 150;
|
|
7
7
|
export class Tooltip {
|
|
8
8
|
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* Defines if the tooltip is descriptive. A descriptive tooltip contains a meaningful message. Tooltips that are not descriptive are hidden from screenreaders using `aria-hidden`.
|
|
11
|
+
*/
|
|
12
|
+
this.descriptive = false;
|
|
9
13
|
/**
|
|
10
14
|
* Set position of tooltip relative to target
|
|
11
15
|
*/
|
|
@@ -123,9 +127,9 @@ export class Tooltip {
|
|
|
123
127
|
}
|
|
124
128
|
render() {
|
|
125
129
|
return (h(Host, { class: { 'hidden': this.hidden } },
|
|
126
|
-
h("div", { class: clsx('tooltip', { in: this.active })
|
|
130
|
+
h("div", { class: clsx('tooltip', { in: this.active }) },
|
|
127
131
|
!this.noArrow && h("div", { "data-popper-arrow": true, class: "tooltip-arrow" }),
|
|
128
|
-
h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) },
|
|
132
|
+
h("div", { "aria-hidden": !this.descriptive || undefined, class: clsx('tooltip-inner', { 'dso-small': this.small }) },
|
|
129
133
|
h("slot", null)))));
|
|
130
134
|
}
|
|
131
135
|
getTarget() {
|
|
@@ -158,6 +162,24 @@ export class Tooltip {
|
|
|
158
162
|
"$": ["tooltip.css"]
|
|
159
163
|
}; }
|
|
160
164
|
static get properties() { return {
|
|
165
|
+
"descriptive": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "boolean",
|
|
170
|
+
"resolved": "boolean",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": false,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": "Defines if the tooltip is descriptive. A descriptive tooltip contains a meaningful message. Tooltips that are not descriptive are hidden from screenreaders using `aria-hidden`."
|
|
178
|
+
},
|
|
179
|
+
"attribute": "descriptive",
|
|
180
|
+
"reflect": true,
|
|
181
|
+
"defaultValue": "false"
|
|
182
|
+
},
|
|
161
183
|
"position": {
|
|
162
184
|
"type": "string",
|
|
163
185
|
"mutable": false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
2
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
-
export function tooltipTemplate({ active, position, label, id }) {
|
|
4
|
-
return html `<dso-tooltip position=${position} for=${ifDefined(id)} ?active=${active}>
|
|
3
|
+
export function tooltipTemplate({ active, descriptive, position, label, id }) {
|
|
4
|
+
return html `<dso-tooltip ?descriptive=${ifDefined(descriptive)} position=${position} for=${ifDefined(id)} ?active=${active}>
|
|
5
5
|
${label}
|
|
6
6
|
</dso-tooltip>`;
|
|
7
7
|
}
|
|
@@ -6,7 +6,11 @@ export class ViewerGrid {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.filterpanelOpen = false;
|
|
8
8
|
this.overlayOpen = false;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Size of the main content panel when component loads. Changing this attribute afterwards has no effect.
|
|
11
|
+
*/
|
|
12
|
+
this.initialMainSize = "large";
|
|
13
|
+
this.mainSize = this.initialMainSize;
|
|
10
14
|
this.filterpanelSlot = null;
|
|
11
15
|
this.overlaySlot = null;
|
|
12
16
|
this.shrinkMain = () => {
|
|
@@ -163,6 +167,28 @@ export class ViewerGrid {
|
|
|
163
167
|
"attribute": "overlay-open",
|
|
164
168
|
"reflect": true,
|
|
165
169
|
"defaultValue": "false"
|
|
170
|
+
},
|
|
171
|
+
"initialMainSize": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "MainSize",
|
|
176
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
177
|
+
"references": {
|
|
178
|
+
"MainSize": {
|
|
179
|
+
"location": "local"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Size of the main content panel when component loads. Changing this attribute afterwards has no effect."
|
|
188
|
+
},
|
|
189
|
+
"attribute": "initial-main-size",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "\"large\""
|
|
166
192
|
}
|
|
167
193
|
}; }
|
|
168
194
|
static get states() { return {
|
package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.stories.js
CHANGED
|
@@ -263,9 +263,10 @@ storiesOfViewerGrid({
|
|
|
263
263
|
storiesOf,
|
|
264
264
|
readme,
|
|
265
265
|
}, {
|
|
266
|
-
viewerGridWithSearchResultsDemoTemplate: ({ closeOverlay, filterpanelOpen, overlayOpen, noOverlay, filterpanelApply, mainSizeChange, filterpanelCancel, filterblokDeleteActiveFilter, allOptions, documentHeaderFeatureAction, documentHeaderFeaturesOpen, documentHeaderMapAction, }) => viewerGridTemplate({
|
|
266
|
+
viewerGridWithSearchResultsDemoTemplate: ({ closeOverlay, filterpanelOpen, overlayOpen, noOverlay, filterpanelApply, initialMainSize, mainSizeChange, filterpanelCancel, filterblokDeleteActiveFilter, allOptions, documentHeaderFeatureAction, documentHeaderFeaturesOpen, documentHeaderMapAction, }) => viewerGridTemplate({
|
|
267
267
|
closeOverlay,
|
|
268
268
|
filterpanelOpen,
|
|
269
|
+
initialMainSize,
|
|
269
270
|
mainSizeChange,
|
|
270
271
|
filterpanel,
|
|
271
272
|
overlayOpen,
|
|
@@ -276,10 +277,11 @@ storiesOfViewerGrid({
|
|
|
276
277
|
map,
|
|
277
278
|
overlay
|
|
278
279
|
}),
|
|
279
|
-
viewerGridWithTilesDemoTemplate: ({ closeOverlay, tiles, filterpanelOpen, overlayOpen, mainSizeChange, noOverlay, filterpanelApply, filterpanelCancel, }) => viewerGridTemplate({
|
|
280
|
+
viewerGridWithTilesDemoTemplate: ({ closeOverlay, tiles, filterpanelOpen, overlayOpen, initialMainSize, mainSizeChange, noOverlay, filterpanelApply, filterpanelCancel, }) => viewerGridTemplate({
|
|
280
281
|
closeOverlay,
|
|
281
282
|
filterpanelOpen,
|
|
282
283
|
filterpanel,
|
|
284
|
+
initialMainSize,
|
|
283
285
|
mainSizeChange,
|
|
284
286
|
filterpanelApply,
|
|
285
287
|
filterpanelCancel,
|
package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.template.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { html } from "lit-html";
|
|
2
|
-
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
export function viewerGridTemplate({ filterpanel, main, map, overlay, noOverlay, filterpanelOpen, overlayOpen, initialMainSize, mainSizeChange, filterpanelApply, filterpanelCancel, closeOverlay, }) {
|
|
3
4
|
return noOverlay
|
|
4
5
|
? html `
|
|
5
6
|
<dso-viewer-grid
|
|
6
7
|
?overlay-open=${overlayOpen}
|
|
8
|
+
initial-main-size=${ifDefined(initialMainSize)}
|
|
7
9
|
@closeOverlay=${closeOverlay}
|
|
8
10
|
>
|
|
9
11
|
<div slot="main">${main}</div>
|
|
@@ -14,6 +16,7 @@ export function viewerGridTemplate({ filterpanel, main, map, overlay, noOverlay,
|
|
|
14
16
|
<dso-viewer-grid
|
|
15
17
|
?filterpanel-open=${filterpanelOpen}
|
|
16
18
|
?overlay-open=${overlayOpen}
|
|
19
|
+
initial-main-size=${ifDefined(initialMainSize)}
|
|
17
20
|
@mainSizeChange=${mainSizeChange}
|
|
18
21
|
@closeOverlay=${closeOverlay}
|
|
19
22
|
@filterpanelApply=${filterpanelApply}
|