dso-toolkit 38.0.0 → 38.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/Voorbeelden/20-Toepassingen/10-Aanvragen/activiteiten.config.yml +1 -0
- package/dist/library/@dso-toolkit/core/cjs/dso-dropdown-menu.cjs.entry.js +11 -28
- package/dist/library/@dso-toolkit/core/cjs/dso-ozon-content.cjs.entry.js +21 -2
- package/dist/library/@dso-toolkit/core/cjs/dso-toolkit.cjs.js +1 -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/dropdown-menu/dropdown-menu.js +12 -30
- 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/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 +38 -33
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
- 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/esm/dso-dropdown-menu.entry.js +12 -29
- package/dist/library/@dso-toolkit/core/esm/dso-ozon-content.entry.js +22 -3
- package/dist/library/@dso-toolkit/core/esm/dso-toolkit.js +1 -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/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/viewer-grid/viewer-grid.d.ts +4 -0
- 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 +21 -1
- 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/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/preview/activiteiten.html +1 -0
- 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/render/activiteiten.html +3 -2
- 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/styles/dso.css +29 -8
- 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-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/styles/dso.css +29 -8
- package/hydrate/index.js +39 -32
- 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.scss +1 -0
- package/libs/@dso-toolkit/css/src/components/shopping-cart/shopping-cart.scss +8 -3
- package/libs/@dso-toolkit/sources/src/components/form/content/checkboxes.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.models.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.stories.ts +21 -4
- 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.base-model.ts +0 -1
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group.model.ts +2 -1
- 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/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/mixins/anchor.scss +51 -0
- package/libs/@dso-toolkit/sources/src/styling/mixins.scss +1 -0
- package/package.json +3 -3
- package/reference/render/shopping-cart--items-non-collapsable.html +52 -0
- package/reference/render/shopping-cart--subitems-with-warning.html +1 -1
- package/src/styles/components/_form.scss +0 -3
- 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-723ef97b.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-723ef97b.entry.js +0 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import { DecoratorFunction } from '@storybook/addons';
|
|
2
|
+
|
|
1
3
|
import { bindTemplate, StorybookParameters, } from '../../stories-helpers';
|
|
2
4
|
|
|
3
5
|
import { formArgsMapper, formArgTypes } from './form.args';
|
|
4
|
-
|
|
5
|
-
import { Form, FormGroupInput, FormGroupInputDate } from './form.models';
|
|
6
|
-
import { formGroupInputArgsMapper, formGroupInputArgTypes } from './form-groups/input/form-group-input.args';
|
|
6
|
+
|
|
7
7
|
import { inputContent } from './content/input.content';
|
|
8
|
-
import {
|
|
8
|
+
import { checkboxesContent } from './content/checkboxes.content';
|
|
9
|
+
import { Form, FormGroupCheckboxes, FormGroupInput, FormGroupInputDate } from './form.models';
|
|
10
|
+
import { formGroupCheckboxesArgsMapper, formGroupCheckboxesArgTypes } from './form-groups/checkboxes/form-group-checkboxes.args';
|
|
11
|
+
import { formGroupInputArgsMapper, formGroupInputArgTypes } from './form-groups/input/form-group-input.args';
|
|
9
12
|
|
|
10
13
|
export interface FormParameters<TemplateFnReturnType> {
|
|
11
14
|
formTemplate: (form: Form<TemplateFnReturnType>) => TemplateFnReturnType;
|
|
12
15
|
formGroupDecorator: DecoratorFunction<TemplateFnReturnType>;
|
|
16
|
+
formGroupCheckboxesTemplate: (formGroupCheckboxes: FormGroupCheckboxes<TemplateFnReturnType>) => TemplateFnReturnType;
|
|
13
17
|
formGroupInputTemplate: (formGroupInput: FormGroupInput<TemplateFnReturnType> | FormGroupInputDate<TemplateFnReturnType>) => TemplateFnReturnType;
|
|
14
18
|
}
|
|
15
19
|
|
|
@@ -22,6 +26,7 @@ export function storiesOfForm<TemplateFnReturnType>(
|
|
|
22
26
|
{
|
|
23
27
|
formTemplate,
|
|
24
28
|
formGroupDecorator,
|
|
29
|
+
formGroupCheckboxesTemplate,
|
|
25
30
|
formGroupInputTemplate
|
|
26
31
|
}: FormParameters<TemplateFnReturnType>
|
|
27
32
|
) {
|
|
@@ -46,4 +51,16 @@ export function storiesOfForm<TemplateFnReturnType>(
|
|
|
46
51
|
.addDecorator(formGroupDecorator)
|
|
47
52
|
.add('input', bindTemplate(formGroupInputArgsMapper, formGroupInputTemplate)
|
|
48
53
|
);
|
|
54
|
+
|
|
55
|
+
storiesOf('Form/groups/checkboxes', mainModule)
|
|
56
|
+
.addParameters({
|
|
57
|
+
argTypes: formGroupCheckboxesArgTypes,
|
|
58
|
+
args: checkboxesContent,
|
|
59
|
+
docs: {
|
|
60
|
+
page: readme
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
.addDecorator(formGroupDecorator)
|
|
64
|
+
.add('checkboxes', bindTemplate(formGroupCheckboxesArgsMapper, formGroupCheckboxesTemplate)
|
|
65
|
+
);
|
|
49
66
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Selectable } from '../../selectable/selectable.models';
|
|
2
|
+
|
|
3
|
+
import { FormGroupBase } from './form-group.base-model';
|
|
4
|
+
|
|
5
|
+
export interface FormGroupCheckboxes<TemplateFnReturnType> extends FormGroupBase<TemplateFnReturnType> {
|
|
6
|
+
group: 'checkboxes',
|
|
7
|
+
selectables: Selectable<TemplateFnReturnType>[];
|
|
8
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormGroupCheckboxes } from './form-group-checkboxes.model';
|
|
1
2
|
import { FormGroupInput, FormGroupInputDate } from './form-group-input.model';
|
|
2
3
|
|
|
3
|
-
export type FormGroup<TemplateFnReturnType> = FormGroupInput<TemplateFnReturnType> | FormGroupInputDate<TemplateFnReturnType>;
|
|
4
|
+
export type FormGroup<TemplateFnReturnType> = FormGroupCheckboxes<TemplateFnReturnType> | FormGroupInput<TemplateFnReturnType> | FormGroupInputDate<TemplateFnReturnType>;
|
|
@@ -6,8 +6,10 @@ import { OzonContent } from "./ozon-content.models";
|
|
|
6
6
|
export interface OzonContentArgs {
|
|
7
7
|
content: string;
|
|
8
8
|
inline: boolean;
|
|
9
|
+
interactive: boolean;
|
|
9
10
|
deleted: boolean;
|
|
10
11
|
onAnchorClick: HandlerFunction;
|
|
12
|
+
onClick: HandlerFunction;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export const ozonContentArgTypes: ArgTypes<OzonContentArgs> = {
|
|
@@ -21,6 +23,11 @@ export const ozonContentArgTypes: ArgTypes<OzonContentArgs> = {
|
|
|
21
23
|
type: 'boolean'
|
|
22
24
|
}
|
|
23
25
|
},
|
|
26
|
+
interactive: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'boolean'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
24
31
|
deleted: {
|
|
25
32
|
control: {
|
|
26
33
|
type: 'boolean'
|
|
@@ -30,13 +37,19 @@ export const ozonContentArgTypes: ArgTypes<OzonContentArgs> = {
|
|
|
30
37
|
...noControl,
|
|
31
38
|
action: "anchorClick",
|
|
32
39
|
},
|
|
40
|
+
onClick: {
|
|
41
|
+
...noControl,
|
|
42
|
+
action: 'onClick'
|
|
43
|
+
}
|
|
33
44
|
};
|
|
34
45
|
|
|
35
46
|
export function ozonContentArgsMapper(a: OzonContentArgs): OzonContent {
|
|
36
47
|
return {
|
|
37
48
|
content: a.content,
|
|
38
49
|
inline: a.inline,
|
|
50
|
+
interactive: a.interactive,
|
|
39
51
|
deleted: a.deleted,
|
|
40
52
|
onAnchorClick: (e: any) => a.onAnchorClick(e.detail),
|
|
53
|
+
onClick: a.onClick
|
|
41
54
|
};
|
|
42
55
|
}
|
|
@@ -29,9 +29,10 @@ export function storiesOfOzonContent<TemplateFnReturnType>(
|
|
|
29
29
|
|
|
30
30
|
content.forEach((story) => {
|
|
31
31
|
stories.add(story.title, template, {
|
|
32
|
-
args: componentArgs<Omit<OzonContentArgs, 'onAnchorClick'>>({
|
|
32
|
+
args: componentArgs<Omit<OzonContentArgs, 'onAnchorClick' | 'onClick'>>({
|
|
33
33
|
content: story.content,
|
|
34
34
|
inline: false,
|
|
35
|
+
interactive: false,
|
|
35
36
|
deleted: false,
|
|
36
37
|
...story.args
|
|
37
38
|
}),
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ArgTypes } from '../../stories-helpers';
|
|
2
|
+
|
|
3
|
+
import { SearchBar } from './search-bar.models';
|
|
4
|
+
|
|
5
|
+
export interface SearchBarArgs {
|
|
6
|
+
label: string;
|
|
7
|
+
id: string;
|
|
8
|
+
icon: boolean;
|
|
9
|
+
hiddenLabel: boolean;
|
|
10
|
+
invalid: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
buttonLabel: string;
|
|
14
|
+
hideSearchButton: boolean;
|
|
15
|
+
resultsMessage?: string;
|
|
16
|
+
resultsHidden: boolean;
|
|
17
|
+
ariaDescribedBy?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const searchBarArgTypes: ArgTypes<SearchBarArgs> = {
|
|
21
|
+
label: {
|
|
22
|
+
control: {
|
|
23
|
+
type: 'text'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
id: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'text'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
icon: {
|
|
32
|
+
control: {
|
|
33
|
+
type: 'boolean'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
hiddenLabel: {
|
|
37
|
+
control: {
|
|
38
|
+
type: 'boolean'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
invalid: {
|
|
42
|
+
control: {
|
|
43
|
+
type: 'boolean'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
placeholder: {
|
|
47
|
+
control: {
|
|
48
|
+
type: 'text'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
value: {
|
|
52
|
+
control: {
|
|
53
|
+
type: 'text'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
buttonLabel: {
|
|
57
|
+
control: {
|
|
58
|
+
type: 'text'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
hideSearchButton: {
|
|
62
|
+
control: {
|
|
63
|
+
type: 'boolean'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
resultsMessage: {
|
|
67
|
+
control: {
|
|
68
|
+
type: 'text'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
resultsHidden: {
|
|
72
|
+
control: {
|
|
73
|
+
type: 'boolean'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
ariaDescribedBy: {
|
|
77
|
+
control: {
|
|
78
|
+
type: 'text'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export function searchBarArgsMapper(a: SearchBarArgs): SearchBar {
|
|
84
|
+
return {
|
|
85
|
+
label: a.label,
|
|
86
|
+
id: a.id,
|
|
87
|
+
icon: a.icon,
|
|
88
|
+
hiddenLabel: a.hiddenLabel,
|
|
89
|
+
invalid: a.invalid,
|
|
90
|
+
placeholder: a.placeholder,
|
|
91
|
+
value: a.value,
|
|
92
|
+
buttonLabel: a.buttonLabel,
|
|
93
|
+
hideSearchButton: a.hideSearchButton,
|
|
94
|
+
resultsMessage: a.resultsMessage,
|
|
95
|
+
resultsHidden: a.resultsHidden,
|
|
96
|
+
ariaDescribedBy: a.ariaDescribedBy,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SearchBar {
|
|
2
|
+
label: string;
|
|
3
|
+
id: string;
|
|
4
|
+
icon: boolean;
|
|
5
|
+
hiddenLabel: boolean;
|
|
6
|
+
invalid: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
buttonLabel: string;
|
|
10
|
+
hideSearchButton: boolean;
|
|
11
|
+
resultsMessage?: string;
|
|
12
|
+
resultsHidden: boolean;
|
|
13
|
+
ariaDescribedBy?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { bindTemplate, componentArgs, StorybookParameters } from '../../stories-helpers';
|
|
2
|
+
|
|
3
|
+
import { SearchBarArgs, searchBarArgsMapper, searchBarArgTypes } from './search-bar.args';
|
|
4
|
+
import { SearchBar } from './search-bar.models';
|
|
5
|
+
|
|
6
|
+
export interface SearchBarParameters<TemplateFnReturnType> {
|
|
7
|
+
searchBarTemplate: (searchBarProperties: SearchBar) => TemplateFnReturnType;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function storiesOfSearchBar<TemplateFnReturnType>(
|
|
11
|
+
{
|
|
12
|
+
module: mainModule,
|
|
13
|
+
storiesOf,
|
|
14
|
+
readme
|
|
15
|
+
}: StorybookParameters,
|
|
16
|
+
{
|
|
17
|
+
searchBarTemplate
|
|
18
|
+
}: SearchBarParameters<TemplateFnReturnType>
|
|
19
|
+
) {
|
|
20
|
+
const template = bindTemplate(searchBarArgsMapper, searchBarTemplate);
|
|
21
|
+
|
|
22
|
+
const stories = storiesOf('Search Bar', mainModule)
|
|
23
|
+
.addParameters({
|
|
24
|
+
docs: {
|
|
25
|
+
page: readme
|
|
26
|
+
},
|
|
27
|
+
args: componentArgs<SearchBarArgs>({
|
|
28
|
+
id: 'search-bar-id',
|
|
29
|
+
label: 'Label',
|
|
30
|
+
icon: true,
|
|
31
|
+
hiddenLabel: false,
|
|
32
|
+
invalid: false,
|
|
33
|
+
placeholder: 'Bv. boomkap',
|
|
34
|
+
value: '',
|
|
35
|
+
buttonLabel: 'Zoeken',
|
|
36
|
+
hideSearchButton: false,
|
|
37
|
+
ariaDescribedBy: '',
|
|
38
|
+
resultsMessage: '',
|
|
39
|
+
resultsHidden: false
|
|
40
|
+
}),
|
|
41
|
+
argTypes: searchBarArgTypes
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
stories.add(
|
|
45
|
+
'visual label with icon',
|
|
46
|
+
template
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
stories.add(
|
|
50
|
+
'visual label without icon',
|
|
51
|
+
template,
|
|
52
|
+
{
|
|
53
|
+
args: {
|
|
54
|
+
icon: false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
stories.add(
|
|
60
|
+
'placeholder with long text',
|
|
61
|
+
template,
|
|
62
|
+
{
|
|
63
|
+
args: {
|
|
64
|
+
placeholder: 'Placeholder with long text, long text, long text. Placeholder with long text, long text, long text. Placeholder with long text, long text, long text. Placeholder with long text, long text, long text. Placeholder with long text, long text, long text. Placeholder with long text, long text, long text.'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
stories.add(
|
|
70
|
+
'hidden label with icon',
|
|
71
|
+
template,
|
|
72
|
+
{
|
|
73
|
+
args: {
|
|
74
|
+
hiddenLabel: true,
|
|
75
|
+
icon: true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
stories.add(
|
|
81
|
+
'hidden label without icon',
|
|
82
|
+
template,
|
|
83
|
+
{
|
|
84
|
+
args: {
|
|
85
|
+
hiddenLabel: true,
|
|
86
|
+
icon: false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
stories.add(
|
|
92
|
+
'with value',
|
|
93
|
+
template,
|
|
94
|
+
{
|
|
95
|
+
args: {
|
|
96
|
+
value: 'Laan van Eik en Duinen 155'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
stories.add(
|
|
102
|
+
'invalid',
|
|
103
|
+
template,
|
|
104
|
+
{
|
|
105
|
+
args: {
|
|
106
|
+
invalid: true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
stories.add(
|
|
112
|
+
'hidden button',
|
|
113
|
+
template,
|
|
114
|
+
{
|
|
115
|
+
args: {
|
|
116
|
+
hideSearchButton: true
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
stories.add(
|
|
122
|
+
'with results message',
|
|
123
|
+
template,
|
|
124
|
+
{
|
|
125
|
+
args: {
|
|
126
|
+
resultsMessage: '7 gevonden resultaten'
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
stories.add(
|
|
132
|
+
'with hidden results message',
|
|
133
|
+
template,
|
|
134
|
+
{
|
|
135
|
+
args: {
|
|
136
|
+
resultsMessage: '7 gevonden resultaten',
|
|
137
|
+
resultsHidden: true
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
@@ -3,6 +3,7 @@ import { ArgTypes } from '../../stories-helpers';
|
|
|
3
3
|
import { ShoppingCart, ShoppingCartItem } from './shopping-cart.models';
|
|
4
4
|
|
|
5
5
|
export interface ShoppingCartArgs {
|
|
6
|
+
collapsable?: boolean;
|
|
6
7
|
collapsed?: boolean;
|
|
7
8
|
hideSummary?: boolean;
|
|
8
9
|
removeAll?: boolean;
|
|
@@ -13,6 +14,11 @@ export interface ShoppingCartArgs {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const shoppingCartArgTypes: ArgTypes<ShoppingCartArgs> = {
|
|
17
|
+
collapsable: {
|
|
18
|
+
control: {
|
|
19
|
+
type: 'boolean'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
16
22
|
collapsed: {
|
|
17
23
|
control: {
|
|
18
24
|
type: 'boolean'
|
|
@@ -53,6 +59,7 @@ export const shoppingCartArgTypes: ArgTypes<ShoppingCartArgs> = {
|
|
|
53
59
|
|
|
54
60
|
export function shoppingCartArgsMapper(a: ShoppingCartArgs): ShoppingCart {
|
|
55
61
|
return {
|
|
62
|
+
collapsable: a.collapsable,
|
|
56
63
|
collapsed: a.collapsed,
|
|
57
64
|
hideSummary: a.hideSummary,
|
|
58
65
|
removeAll: a.removeAll,
|
|
@@ -28,6 +28,7 @@ export function storiesOfShoppingCart<TemplateFnReturnType>(
|
|
|
28
28
|
},
|
|
29
29
|
argTypes: shoppingCartArgTypes,
|
|
30
30
|
args: componentArgs<ShoppingCartArgs>({
|
|
31
|
+
collapsable: true,
|
|
31
32
|
collapsed: false,
|
|
32
33
|
hideSummary: false,
|
|
33
34
|
removeAll: false,
|
|
@@ -64,6 +65,38 @@ export function storiesOfShoppingCart<TemplateFnReturnType>(
|
|
|
64
65
|
}
|
|
65
66
|
);
|
|
66
67
|
|
|
68
|
+
stories.add(
|
|
69
|
+
'items non-collapsable',
|
|
70
|
+
template,
|
|
71
|
+
{
|
|
72
|
+
args: componentArgs<Pick<ShoppingCartArgs, 'collapsable' | 'removeAll' | 'items'>>({
|
|
73
|
+
collapsable: false,
|
|
74
|
+
removeAll: true,
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
id: uuidv4(),
|
|
78
|
+
label: 'Milieubelastende activiteit - Melding',
|
|
79
|
+
subitems: [
|
|
80
|
+
{
|
|
81
|
+
label: 'Wasstraat of wasplaats'
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: uuidv4(),
|
|
87
|
+
label: 'Milieubelastende activiteit - Melding',
|
|
88
|
+
additive: 'Wasstraat om de hoek van garagebedrijf Jansen',
|
|
89
|
+
subitems: [
|
|
90
|
+
{
|
|
91
|
+
label: 'Wasstraat of wasplaats'
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
|
|
67
100
|
stories.add(
|
|
68
101
|
'remove all items option',
|
|
69
102
|
template,
|
|
@@ -9,6 +9,7 @@ interface ViewerGridArgs {
|
|
|
9
9
|
overlayOpen: boolean;
|
|
10
10
|
filterpanelOpen: boolean;
|
|
11
11
|
noOverlay: boolean;
|
|
12
|
+
initialMainSize?: "small" | "medium" | "large";
|
|
12
13
|
mainSizeChange: HandlerFunction;
|
|
13
14
|
closeOverlay: HandlerFunction;
|
|
14
15
|
filterpanelCancel: HandlerFunction;
|
|
@@ -48,6 +49,12 @@ export const viewerGridWithSearchResultsArgTypes: ArgTypes<ViewerGridWithSearchR
|
|
|
48
49
|
type: "boolean",
|
|
49
50
|
},
|
|
50
51
|
},
|
|
52
|
+
initialMainSize: {
|
|
53
|
+
options: [undefined, 'small', 'medium', 'large'],
|
|
54
|
+
control: {
|
|
55
|
+
type: 'select',
|
|
56
|
+
}
|
|
57
|
+
},
|
|
51
58
|
mainSizeChange: {
|
|
52
59
|
...noControl,
|
|
53
60
|
action: 'mainSizeChange'
|
|
@@ -4,6 +4,7 @@ interface ViewerGridDemoProperties {
|
|
|
4
4
|
filterpanelOpen: boolean;
|
|
5
5
|
overlayOpen: boolean;
|
|
6
6
|
noOverlay: boolean;
|
|
7
|
+
initialMainSize?: "small" | "medium" | "large";
|
|
7
8
|
mainSizeChange: (e: CustomEvent<ViewerGridChangeSizeEvent>) => void;
|
|
8
9
|
closeOverlay: (e: MouseEvent) => void;
|
|
9
10
|
filterpanelCancel: (e: MouseEvent) => void;
|
|
@@ -30,6 +31,7 @@ export interface ViewerGrid<TemplateFnReturnType> {
|
|
|
30
31
|
overlay: TemplateFnReturnType;
|
|
31
32
|
overlayOpen: boolean;
|
|
32
33
|
noOverlay: boolean;
|
|
34
|
+
initialMainSize?: "small" | "medium" | "large";
|
|
33
35
|
mainSizeChange: (e: CustomEvent<ViewerGridChangeSizeEvent>) => void;
|
|
34
36
|
closeOverlay: (e: MouseEvent) => void;
|
|
35
37
|
filterpanelCancel: (e: MouseEvent) => void;
|
|
@@ -87,6 +87,8 @@ export * from './components/progress-indicator/progress-indicator.models';
|
|
|
87
87
|
export * from './components/progress-indicator/progress-indicator.stories';
|
|
88
88
|
export * from './components/row-equal-heights/row-equal-heights.models';
|
|
89
89
|
export * from './components/row-equal-heights/row-equal-heights.stories';
|
|
90
|
+
export * from './components/search-bar/search-bar.models';
|
|
91
|
+
export * from './components/search-bar/search-bar.stories';
|
|
90
92
|
export * from './components/selectable/selectable.models';
|
|
91
93
|
export * from './components/selectable/selectable.stories';
|
|
92
94
|
export * from './components/shopping-cart/shopping-cart.models';
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
$dso-anchor-spacer-width: 4px;
|
|
2
|
-
$dso-anchor-visited-color: $mauve;
|
|
3
|
-
|
|
4
1
|
a {
|
|
5
|
-
|
|
6
|
-
color: $link-color;
|
|
7
|
-
text-decoration: underline;
|
|
8
|
-
|
|
9
|
-
&:hover,
|
|
10
|
-
&:focus {
|
|
11
|
-
color: $link-hover-color;
|
|
12
|
-
text-decoration: underline;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:active {
|
|
16
|
-
text-decoration: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&:visited {
|
|
20
|
-
color: $dso-anchor-visited-color;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&.download,
|
|
24
|
-
&.extern {
|
|
25
|
-
&::after {
|
|
26
|
-
content: "";
|
|
27
|
-
display: inline-block;
|
|
28
|
-
margin-left: $dso-anchor-spacer-width;
|
|
29
|
-
vertical-align: $dso-icon-vertical-align;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.download {
|
|
34
|
-
&::after {
|
|
35
|
-
@include di("download");
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.extern {
|
|
40
|
-
&::after {
|
|
41
|
-
@include di("external-link");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
2
|
+
@include anchor_root();
|
|
44
3
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
$dso-anchor-spacer-width: 4px;
|
|
2
|
+
$dso-anchor-visited-color: $mauve;
|
|
3
|
+
|
|
4
|
+
@mixin anchor_root($is-html-a-element: true, $with-modifiers: true) {
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
color: $link-color;
|
|
7
|
+
text-decoration: underline;
|
|
8
|
+
|
|
9
|
+
&:hover,
|
|
10
|
+
&:focus {
|
|
11
|
+
color: $link-hover-color;
|
|
12
|
+
text-decoration: underline;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:active {
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@if ($is-html-a-element) {
|
|
20
|
+
&:visited {
|
|
21
|
+
color: $dso-anchor-visited-color;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@else {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if ($with-modifiers) {
|
|
29
|
+
&.download,
|
|
30
|
+
&.extern {
|
|
31
|
+
&::after {
|
|
32
|
+
content: "";
|
|
33
|
+
display: inline-block;
|
|
34
|
+
margin-left: $dso-anchor-spacer-width;
|
|
35
|
+
vertical-align: $dso-icon-vertical-align;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.download {
|
|
40
|
+
&::after {
|
|
41
|
+
@include di("download");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.extern {
|
|
46
|
+
&::after {
|
|
47
|
+
@include di("external-link");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dso-toolkit",
|
|
3
3
|
"description": "DSO Toolkit and Component Library",
|
|
4
4
|
"license": "SEE LICENSE IN DISCLAIMER.txt",
|
|
5
|
-
"version": "38.
|
|
5
|
+
"version": "38.1.0",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "gulp",
|
|
8
8
|
"build": "gulp build",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@babel/core": "^7.17.9",
|
|
22
22
|
"@babel/preset-env": "^7.16.11",
|
|
23
|
-
"@dso-toolkit/core": "38.
|
|
23
|
+
"@dso-toolkit/core": "38.1.0",
|
|
24
24
|
"@dso-toolkit/css": "0.0.0",
|
|
25
25
|
"@dso-toolkit/sources": "0.0.0",
|
|
26
26
|
"@frctl/fractal": "1.5.13",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"hiff": "0.3.1",
|
|
45
45
|
"highlight.js": "^11.5.1",
|
|
46
46
|
"jquery": "^2.2.4",
|
|
47
|
-
"jquery-pjax": "
|
|
47
|
+
"jquery-pjax": "^2.0.1",
|
|
48
48
|
"prettier": "^2.6.2",
|
|
49
49
|
"pretty": "2.0.0",
|
|
50
50
|
"rollup": "^2.70.2",
|