dso-toolkit 40.1.0 → 41.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/components/Componenten/form-elements/group-search-bar.config.yml +2 -0
  2. package/components/Componenten/form-elements/group-search-bar.njk +1 -1
  3. package/components/Voorbeelden/10-Patronen/zoeken-in-lijst-cards.njk +5 -4
  4. package/dist/library/@dso-toolkit/core/cjs/dso-pagination.cjs.entry.js +7 -7
  5. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.js +7 -7
  6. package/dist/library/@dso-toolkit/core/custom-elements/index.js +7 -7
  7. package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
  8. package/dist/library/@dso-toolkit/core/dso-toolkit/p-b1dc8d76.entry.js +1 -0
  9. package/dist/library/@dso-toolkit/core/esm/dso-pagination.entry.js +7 -7
  10. package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.interfaces.d.ts +2 -0
  11. package/dist/library/components/detail/form--autocomplete.html +1 -1
  12. package/dist/library/components/detail/form--form-horizontal.html +2 -2
  13. package/dist/library/components/detail/form--form-vertical.html +2 -2
  14. package/dist/library/components/detail/form--header-in-legend.html +1 -1
  15. package/dist/library/components/detail/form--multi-page.html +1 -1
  16. package/dist/library/components/detail/form--sections.html +1 -1
  17. package/dist/library/components/detail/form--simple-form.html +1 -1
  18. package/dist/library/components/detail/form--single-page.html +1 -1
  19. package/dist/library/components/detail/form.html +3 -3
  20. package/dist/library/components/detail/group-search-bar--default.html +2 -2
  21. package/dist/library/components/detail/group-search-bar--search-bar-allmessages.html +4 -3
  22. package/dist/library/components/detail/group-search-bar--search-bar-error.html +4 -3
  23. package/dist/library/components/detail/group-search-bar--search-bar-help.html +2 -2
  24. package/dist/library/components/detail/group-search-bar--search-bar-infobutton-expanded.html +2 -2
  25. package/dist/library/components/detail/group-search-bar--search-bar-infobutton.html +2 -2
  26. package/dist/library/components/detail/group-search-bar--search-bar-static-info.html +2 -2
  27. package/dist/library/components/detail/group-search-bar.html +12 -10
  28. package/dist/library/components/detail/zoeken-in-lijst-cards.html +10 -8
  29. package/dist/library/components/preview/form--form-horizontal.html +2 -2
  30. package/dist/library/components/preview/form--form-vertical.html +2 -2
  31. package/dist/library/components/preview/form.html +4 -4
  32. package/dist/library/components/preview/group-search-bar--default.html +1 -1
  33. package/dist/library/components/preview/group-search-bar--search-bar-allmessages.html +2 -2
  34. package/dist/library/components/preview/group-search-bar--search-bar-error.html +2 -2
  35. package/dist/library/components/preview/group-search-bar--search-bar-help.html +1 -1
  36. package/dist/library/components/preview/group-search-bar--search-bar-infobutton-expanded.html +1 -1
  37. package/dist/library/components/preview/group-search-bar--search-bar-infobutton.html +1 -1
  38. package/dist/library/components/preview/group-search-bar--search-bar-static-info.html +1 -1
  39. package/dist/library/components/preview/group-search-bar.html +9 -9
  40. package/dist/library/components/preview/zoeken-in-lijst-cards.html +8 -6
  41. package/dist/library/components/render/form--form-horizontal.html +1 -1
  42. package/dist/library/components/render/form--form-vertical.html +1 -1
  43. package/dist/library/components/render/form.html +2 -2
  44. package/dist/library/components/render/group-search-bar--default.html +1 -1
  45. package/dist/library/components/render/group-search-bar--search-bar-allmessages.html +2 -2
  46. package/dist/library/components/render/group-search-bar--search-bar-error.html +2 -2
  47. package/dist/library/components/render/group-search-bar--search-bar-help.html +1 -1
  48. package/dist/library/components/render/group-search-bar--search-bar-infobutton-expanded.html +1 -1
  49. package/dist/library/components/render/group-search-bar--search-bar-infobutton.html +1 -1
  50. package/dist/library/components/render/group-search-bar--search-bar-static-info.html +1 -1
  51. package/dist/library/components/render/group-search-bar.html +9 -9
  52. package/dist/library/components/render/zoeken-in-lijst-cards.html +5 -4
  53. package/dist/library/styles/dso.css +62 -73
  54. package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  55. package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-b1dc8d76.entry.js +1 -0
  56. package/dist/toolkit/styles/dso.css +62 -73
  57. package/hydrate/index.js +7 -7
  58. package/libs/@dso-toolkit/css/src/components/form/form-group.scss +22 -13
  59. package/libs/@dso-toolkit/css/src/components/form/form-groups/search-bar/form-group-search-bar.scss +17 -0
  60. package/libs/@dso-toolkit/css/src/components/form/form.scss +1 -0
  61. package/libs/@dso-toolkit/css/src/components/justify-form-groups/justify-form-groups.scss +26 -0
  62. package/libs/@dso-toolkit/css/src/components/search-bar/search-bar.scss +5 -0
  63. package/libs/@dso-toolkit/css/src/dso.scss +1 -0
  64. package/libs/@dso-toolkit/sources/src/components/form/content/search-bar.content.ts +12 -0
  65. package/libs/@dso-toolkit/sources/src/components/form/form-groups/search-bar/form-group-search-bar.args.ts +124 -0
  66. package/libs/@dso-toolkit/sources/src/components/form/form.models.ts +1 -0
  67. package/libs/@dso-toolkit/sources/src/components/form/form.stories.ts +17 -1
  68. package/libs/@dso-toolkit/sources/src/components/form/models/form-group-search-bar.model.ts +7 -0
  69. package/libs/@dso-toolkit/sources/src/components/form/models/form-group.model.ts +13 -1
  70. package/libs/@dso-toolkit/sources/src/components/form/models/form.model.ts +0 -1
  71. package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.args.ts +15 -0
  72. package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.content.ts +44 -0
  73. package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.models.ts +7 -0
  74. package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.stories.ts +33 -0
  75. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.args.ts +4 -1
  76. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.models.ts +2 -0
  77. package/libs/@dso-toolkit/sources/src/components/search-bar/search-bar.models.ts +7 -6
  78. package/libs/@dso-toolkit/sources/src/index.ts +2 -0
  79. package/libs/@dso-toolkit/sources/src/styling/global/table.scss +9 -0
  80. package/libs/bootstrap/_forms.scss +0 -1
  81. package/package.json +2 -2
  82. package/reference/render/form--form-horizontal.html +1 -1
  83. package/reference/render/form--form-vertical.html +1 -1
  84. package/reference/render/group-search-bar--default.html +1 -1
  85. package/reference/render/group-search-bar--search-bar-allmessages.html +2 -2
  86. package/reference/render/group-search-bar--search-bar-error.html +2 -2
  87. package/reference/render/group-search-bar--search-bar-help.html +1 -1
  88. package/reference/render/group-search-bar--search-bar-infobutton-expanded.html +1 -1
  89. package/reference/render/group-search-bar--search-bar-infobutton.html +1 -1
  90. package/reference/render/group-search-bar--search-bar-static-info.html +1 -1
  91. package/reference/render/zoeken-in-lijst-cards.html +5 -4
  92. package/src/styles/components/_form.scss +0 -31
  93. package/src/styles/dso.scss +1 -1
  94. package/src/styles/mixins/_dso-variables.scss +0 -3
  95. package/dist/library/@dso-toolkit/core/dso-toolkit/p-4a41728e.entry.js +0 -1
  96. package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-4a41728e.entry.js +0 -1
  97. package/src/styles/components/_search-bar.scss +0 -32
@@ -0,0 +1,26 @@
1
+ .dso-justify-form-groups {
2
+ display: flex;
3
+
4
+ > div {
5
+ flex: 1 1 0;
6
+ padding-left: $u1;
7
+
8
+ &:first-child {
9
+ padding-left: 0;
10
+ }
11
+
12
+ &.dso-form-buttons {
13
+ align-self: flex-end;
14
+ flex: 0 0 0;
15
+ }
16
+ }
17
+
18
+ .form-group {
19
+ &,
20
+ + .form-group,
21
+ + .dso-form-buttons {
22
+ margin-bottom: 0;
23
+ margin-top: 0;
24
+ }
25
+ }
26
+ }
@@ -1,5 +1,6 @@
1
1
  $dso-search-bar-height: $u5;
2
2
  $dso-search-bar-invalid-input-border-color: $dso-danger-color;
3
+ $dso-search-bar-focus-border-width: 1px;
3
4
 
4
5
  .dso-search-bar {
5
6
  display: flex;
@@ -151,5 +152,9 @@ $dso-search-bar-invalid-input-border-color: $dso-danger-color;
151
152
 
152
153
  &.dso-invalid .dso-search-bar-input input {
153
154
  border-color: $dso-search-bar-invalid-input-border-color;
155
+
156
+ &:focus {
157
+ box-shadow: inset 0 0 0 $dso-search-bar-focus-border-width $dso-search-bar-invalid-input-border-color;
158
+ }
154
159
  }
155
160
  }
@@ -41,6 +41,7 @@
41
41
  @import "components/info/info";
42
42
  @import "components/info-button/info-button";
43
43
  @import "components/input-number/input-number";
44
+ @import "components/justify-form-groups/justify-form-groups";
44
45
  @import "components/label/label";
45
46
  @import "components/label-group/label-group";
46
47
  @import "components/link-list/link-list";
@@ -0,0 +1,12 @@
1
+ import { FormGroupSearchBarArgs } from '../form-groups/search-bar/form-group-search-bar.args';
2
+
3
+ export const searchBarContent: Omit<FormGroupSearchBarArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
4
+ id: 'mijn-id',
5
+ label: 'Search bar',
6
+ infoButtonLabel: 'Toelichting bij veld',
7
+ infoActive: false,
8
+ infoText: '<div class="dso-rich-content"><p>Rich text</p></div>',
9
+ infoFixed: false,
10
+ searchBarValue: 'een waarde',
11
+ searchBarButtonLabel: 'Zoeken'
12
+ };
@@ -0,0 +1,124 @@
1
+ import { HandlerFunction } from '@storybook/addon-actions';
2
+
3
+ import { ArgTypes, noControl } from '../../../../stories-helpers';
4
+
5
+ import { SearchBar } from '../../../search-bar/search-bar.models';
6
+
7
+ import { FormGroupSearchBar } from '../../form.models';
8
+
9
+ export interface FormGroupSearchBarArgs {
10
+ id: string;
11
+ label: string;
12
+ errorText?: string;
13
+ helpText?: string;
14
+ infoButtonHandler: HandlerFunction;
15
+ infoButtonLabel: string;
16
+ infoActive: boolean;
17
+ infoText: string;
18
+ infoCloseHandler: HandlerFunction;
19
+ infoFixed: boolean;
20
+ state?: 'invalid' | 'valid';
21
+ searchBarValue: string;
22
+ searchBarButtonLabel: string;
23
+ }
24
+
25
+ export const formGroupSearchBarArgTypes: ArgTypes<FormGroupSearchBarArgs> = {
26
+ id: {
27
+ control: {
28
+ type: 'text'
29
+ }
30
+ },
31
+ label: {
32
+ control: {
33
+ type: 'text'
34
+ }
35
+ },
36
+ errorText: {
37
+ control: {
38
+ type: 'text'
39
+ }
40
+ },
41
+ helpText: {
42
+ control: {
43
+ type: 'text'
44
+ }
45
+ },
46
+ infoActive: {
47
+ control: {
48
+ type: 'boolean'
49
+ }
50
+ },
51
+ infoButtonHandler: {
52
+ ...noControl,
53
+ action: 'infoButton click'
54
+ },
55
+ infoButtonLabel: {
56
+ control: {
57
+ type: 'text'
58
+ }
59
+ },
60
+ infoText: {
61
+ control: {
62
+ type: 'text'
63
+ }
64
+ },
65
+ infoCloseHandler: {
66
+ ...noControl,
67
+ action: 'info close click'
68
+ },
69
+ infoFixed: {
70
+ control: {
71
+ type: 'boolean'
72
+ }
73
+ },
74
+ state: {
75
+ options: [undefined, 'invalid', 'valid'],
76
+ control: {
77
+ type: 'select'
78
+ }
79
+ },
80
+ searchBarValue: {
81
+ control: {
82
+ type: 'text'
83
+ }
84
+ },
85
+ searchBarButtonLabel: {
86
+ control: {
87
+ type: 'text'
88
+ }
89
+ }
90
+ };
91
+
92
+ export function formGroupSearchBarArgsMapper(a: FormGroupSearchBarArgs): FormGroupSearchBar<any>{
93
+ return {
94
+ group: 'search-bar',
95
+ id: a.id,
96
+ label: a.label,
97
+ errorText: a.errorText,
98
+ helpText: a.helpText,
99
+ infoButton: a.infoButtonLabel && a.infoText
100
+ ? {
101
+ onClick: a.infoButtonHandler,
102
+ active: a.infoActive,
103
+ label: a.infoButtonLabel
104
+ }
105
+ : undefined,
106
+ info: a.infoButtonLabel && a.infoText
107
+ ? {
108
+ active: a.infoActive,
109
+ fixed: a.infoFixed,
110
+ onClose: a.infoCloseHandler,
111
+ richContent: a.infoText
112
+ }
113
+ : undefined,
114
+ state: a.state,
115
+ searchBar: {
116
+ value: a.searchBarValue,
117
+ id: a.id,
118
+ buttonLabel: a.searchBarButtonLabel,
119
+ hideSearchButton: true,
120
+ icon: true,
121
+ clearButton: true
122
+ }
123
+ };
124
+ }
@@ -4,6 +4,7 @@ export * from './models/form-group-files.model';
4
4
  export * from './models/form-group-input.model';
5
5
  export * from './models/form-group-input-number.model';
6
6
  export * from './models/form-group-radios.model';
7
+ export * from './models/form-group-search-bar.model';
7
8
  export * from './models/form-group-select.model';
8
9
  export * from './models/form-group-static.model';
9
10
  export * from './models/form-group-textarea.model';
@@ -10,16 +10,18 @@ import { filesContent } from './content/files.content';
10
10
  import { inputContent } from './content/input.content';
11
11
  import { inputNumberContent } from './content/input-number.content';
12
12
  import { radiosContent } from './content/radios.content';
13
+ import { searchBarContent } from './content/search-bar.content';
13
14
  import { selectContent } from './content/select.content';
14
15
  import { staticContent } from './content/static.content';
15
16
  import { textareaContent } from './content/textarea.content';
16
- import { Form, FormGroupCheckboxes, FormGroupConfirm, FormGroupFiles, FormGroupInput, FormGroupInputDate, FormGroupInputNumber, FormGroupRadios, FormGroupStatic, FormGroupSelect, FormGroupTextarea } from './form.models';
17
+ import { Form, FormGroupCheckboxes, FormGroupConfirm, FormGroupFiles, FormGroupInput, FormGroupInputDate, FormGroupInputNumber, FormGroupRadios, FormGroupSearchBar, FormGroupSelect, FormGroupStatic, FormGroupTextarea } from './form.models';
17
18
  import { formGroupCheckboxesArgsMapper, formGroupCheckboxesArgTypes } from './form-groups/checkboxes/form-group-checkboxes.args';
18
19
  import { formGroupConfirmArgsMapper, formGroupConfirmArgTypes } from './form-groups/confirm/form-group-confirm.args';
19
20
  import { formGroupFilesArgsMapper, formGroupFilesArgTypes } from './form-groups/files/form-group-files.args';
20
21
  import { formGroupInputArgsMapper, formGroupInputArgTypes } from './form-groups/input/form-group-input.args';
21
22
  import { formGroupInputNumberArgsMapper, formGroupInputNumberArgTypes } from './form-groups/input-number/form-group-input-number.args';
22
23
  import { formGroupRadiosArgsMapper, formGroupRadiosArgTypes } from './form-groups/radios/form-group-radios.args';
24
+ import { formGroupSearchBarArgsMapper, formGroupSearchBarArgTypes } from './form-groups/search-bar/form-group-search-bar.args';
23
25
  import { formGroupSelectArgsMapper, formGroupSelectArgTypes } from './form-groups/select/form-group-select.args';
24
26
  import { formGroupStaticArgsMapper, formGroupStaticArgTypes } from './form-groups/static/form-group-static.args';
25
27
  import { formGroupTextareaArgsMapper, formGroupTextareaArgTypes } from './form-groups/textarea/form-group-textarea.args';
@@ -34,6 +36,7 @@ export interface FormParameters<TemplateFnReturnType> {
34
36
  formGroupInputTemplate: (formGroupInput: FormGroupInput<TemplateFnReturnType> | FormGroupInputDate<TemplateFnReturnType>) => TemplateFnReturnType;
35
37
  formGroupInputNumberTemplate: (formGroupInputNumber: FormGroupInputNumber<TemplateFnReturnType>) => TemplateFnReturnType;
36
38
  formGroupRadiosTemplate: (formGroupRadios: FormGroupRadios<TemplateFnReturnType>) => TemplateFnReturnType;
39
+ formGroupSearchBarTemplate: (formGroupSearchBar: FormGroupSearchBar<TemplateFnReturnType>) => TemplateFnReturnType;
37
40
  formGroupSelectTemplate: (formGroupSelect: FormGroupSelect<TemplateFnReturnType>) => TemplateFnReturnType;
38
41
  formGroupStaticTemplate: (formGroupStatic: FormGroupStatic<TemplateFnReturnType>) => TemplateFnReturnType;
39
42
  formGroupTextareaTemplate: (formGroupTextarea: FormGroupTextarea<TemplateFnReturnType>) => TemplateFnReturnType;
@@ -54,6 +57,7 @@ export function storiesOfForm<TemplateFnReturnType>(
54
57
  formGroupInputTemplate,
55
58
  formGroupInputNumberTemplate,
56
59
  formGroupRadiosTemplate,
60
+ formGroupSearchBarTemplate,
57
61
  formGroupSelectTemplate,
58
62
  formGroupStaticTemplate,
59
63
  formGroupTextareaTemplate
@@ -141,6 +145,18 @@ export function storiesOfForm<TemplateFnReturnType>(
141
145
  .add('radios', bindTemplate(formGroupRadiosArgsMapper, formGroupRadiosTemplate)
142
146
  );
143
147
 
148
+ storiesOf('Form/groups/search bar', mainModule)
149
+ .addParameters({
150
+ argTypes: formGroupSearchBarArgTypes,
151
+ args: searchBarContent,
152
+ docs: {
153
+ page: readme
154
+ }
155
+ })
156
+ .addDecorator(formGroupDecorator)
157
+ .add('search bar', bindTemplate(formGroupSearchBarArgsMapper, formGroupSearchBarTemplate)
158
+ );
159
+
144
160
  storiesOf('Form/groups/select', mainModule)
145
161
  .addParameters({
146
162
  argTypes: formGroupSelectArgTypes,
@@ -0,0 +1,7 @@
1
+ import { SearchBar } from '../../search-bar/search-bar.models';
2
+ import { FormGroupBase } from './form-group.base-model';
3
+
4
+ export interface FormGroupSearchBar<TemplateFnReturnType> extends FormGroupBase<TemplateFnReturnType> {
5
+ group: 'search-bar',
6
+ searchBar: SearchBar
7
+ }
@@ -4,7 +4,19 @@ import { FormGroupFiles } from './form-group-files.model';
4
4
  import { FormGroupInput, FormGroupInputDate } from './form-group-input.model';
5
5
  import { FormGroupInputNumber } from './form-group-input-number.model';
6
6
  import { FormGroupRadios } from './form-group-radios.model';
7
+ import { FormGroupSearchBar } from './form-group-search-bar.model';
8
+ import { FormGroupSelect } from './form-group-select.model';
7
9
  import { FormGroupStatic } from './form-group-static.model';
8
10
  import { FormGroupTextarea } from './form-group-textarea.model';
9
11
 
10
- export type FormGroup<TemplateFnReturnType> = FormGroupCheckboxes<TemplateFnReturnType> | FormGroupConfirm<TemplateFnReturnType> | FormGroupInput<TemplateFnReturnType> | FormGroupInputNumber<TemplateFnReturnType> | FormGroupInputDate<TemplateFnReturnType> | FormGroupRadios<TemplateFnReturnType> | FormGroupTextarea<TemplateFnReturnType>;
12
+ export type FormGroup<TemplateFnReturnType> = FormGroupCheckboxes<TemplateFnReturnType> |
13
+ FormGroupConfirm<TemplateFnReturnType> |
14
+ FormGroupFiles<TemplateFnReturnType> |
15
+ FormGroupInput<TemplateFnReturnType> |
16
+ FormGroupInputNumber<TemplateFnReturnType> |
17
+ FormGroupInputDate<TemplateFnReturnType> |
18
+ FormGroupRadios<TemplateFnReturnType> |
19
+ FormGroupSearchBar<TemplateFnReturnType> |
20
+ FormGroupSelect<TemplateFnReturnType> |
21
+ FormGroupStatic<TemplateFnReturnType> |
22
+ FormGroupTextarea<TemplateFnReturnType>;
@@ -4,6 +4,5 @@ export interface Form<TemplateFnReturnType> {
4
4
  legend?: string;
5
5
  legendHeading?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined;
6
6
  mode?: 'vertical' | 'horizontal';
7
-
8
7
  formGroups: FormGroup<TemplateFnReturnType>[] | TemplateFnReturnType;
9
8
  }
@@ -0,0 +1,15 @@
1
+ import { ArgTypes } from '../../stories-helpers';
2
+
3
+ import { content } from './justify-form-groups.content';
4
+
5
+ import { JustifyFormGroups } from './justify-form-groups.models';
6
+
7
+ export interface JustifyFormGroupsArgs {
8
+ }
9
+
10
+ export const justifyFormGroupsArgTypes: ArgTypes<JustifyFormGroupsArgs> = {
11
+ };
12
+
13
+ export function justifyFormGroupsArgsMapper(a: JustifyFormGroupsArgs): JustifyFormGroups<any> {
14
+ return content;
15
+ }
@@ -0,0 +1,44 @@
1
+ import { JustifyFormGroups } from './justify-form-groups.models';
2
+
3
+ export const content: JustifyFormGroups<unknown> = {
4
+ formGroups: [
5
+ {
6
+ group: 'select',
7
+ label: 'Type',
8
+ id: 'type',
9
+ items: [
10
+ {
11
+ value: 'rd',
12
+ label: 'RD'
13
+ },
14
+ {
15
+ value: 'wgs84',
16
+ selected: true,
17
+ label: 'WGS84'
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ group: 'input',
23
+ label: 'Lattitude',
24
+ type: 'text',
25
+ id: 'lattitude',
26
+ value: '52.07066496'
27
+ },
28
+ {
29
+ group: 'input',
30
+ label: 'Longitude',
31
+ type: 'text',
32
+ id: 'lattitude',
33
+ value: '4.26389251'
34
+ }
35
+ ],
36
+ buttons: [
37
+ {
38
+ type: 'button',
39
+ modifier: 'dso-secondary btn-sm',
40
+ variant: null,
41
+ label: 'Zoeken'
42
+ }
43
+ ]
44
+ };
@@ -0,0 +1,7 @@
1
+ import { Button } from '../button/button.models';
2
+ import { FormGroup } from '../form/models/form-group.model';
3
+
4
+ export interface JustifyFormGroups<TemplateFnReturnType> {
5
+ formGroups: FormGroup<TemplateFnReturnType>[];
6
+ buttons: Button[];
7
+ }
@@ -0,0 +1,33 @@
1
+ import { bindTemplate, StorybookParameters } from '../../stories-helpers';
2
+
3
+ import { justifyFormGroupsArgsMapper, justifyFormGroupsArgTypes } from './justify-form-groups.args';
4
+ import { JustifyFormGroups } from './justify-form-groups.models';
5
+
6
+ export interface JustifyFormGroupsParameters<TemplateFnReturnType> {
7
+ justifyFormGroupsTemplate: (justifyFormGroupsProperties: JustifyFormGroups<TemplateFnReturnType>) => TemplateFnReturnType;
8
+ }
9
+
10
+ export function storiesOfJustifyFormGroups<TemplateFnReturnType>(
11
+ {
12
+ module: mainModule,
13
+ storiesOf,
14
+ readme
15
+ }: StorybookParameters,
16
+ {
17
+ justifyFormGroupsTemplate: JustifyFormGroups
18
+ }: JustifyFormGroupsParameters<TemplateFnReturnType>
19
+ ) {
20
+ const template = bindTemplate(justifyFormGroupsArgsMapper, JustifyFormGroups);
21
+
22
+ const stories = storiesOf('Form/justify form groups', mainModule)
23
+ .addParameters({
24
+ docs: {
25
+ page: readme
26
+ }
27
+ });
28
+
29
+ stories.add(
30
+ 'justify form groups',
31
+ template
32
+ );
33
+ }
@@ -29,7 +29,10 @@ export function paginationArgsMapper(a: PaginationArgs): Pagination {
29
29
  return {
30
30
  totalPages: a.totalPages,
31
31
  currentPage: a.currentPage,
32
- onSelectPage: a.onSelectPage,
32
+ onSelectPage: (event) => {
33
+ event.detail.originalEvent.preventDefault();
34
+ a.onSelectPage(event);
35
+ },
33
36
  formatHref: page => '#' + page,
34
37
  };
35
38
  }
@@ -3,6 +3,8 @@ export interface PaginationSelectPageEvent {
3
3
  page: number;
4
4
  /** The original pointer event */
5
5
  originalEvent: MouseEvent;
6
+ /** True when user selected the page holding Ctrl, Alt or other modifiers. Can be used to determine navigation. */
7
+ isModifiedEvent: boolean;
6
8
  }
7
9
 
8
10
  export interface Pagination {
@@ -1,14 +1,15 @@
1
1
  export interface SearchBar {
2
- label: string;
2
+ label?: string;
3
3
  id: string;
4
- icon: boolean;
5
- hiddenLabel: boolean;
6
- invalid: boolean;
4
+ icon?: boolean;
5
+ hiddenLabel?: boolean;
6
+ invalid?: boolean;
7
7
  placeholder?: string;
8
8
  value?: string;
9
9
  buttonLabel: string;
10
- hideSearchButton: boolean;
10
+ hideSearchButton?: boolean;
11
11
  resultsMessage?: string;
12
- resultsHidden: boolean;
12
+ resultsHidden?: boolean;
13
13
  ariaDescribedBy?: string;
14
+ clearButton?: boolean;
14
15
  }
@@ -66,6 +66,8 @@ export * from './components/info/info.models';
66
66
  export * from './components/info/info.stories';
67
67
  export * from './components/input-number/input-number.models';
68
68
  export * from './components/input-number/input-number.stories';
69
+ export * from './components/justify-form-groups/justify-form-groups.models';
70
+ export * from './components/justify-form-groups/justify-form-groups.stories';
69
71
  export * from './components/label/label.models';
70
72
  export * from './components/label/label.stories';
71
73
  export * from './components/label-group/label-group.models';
@@ -11,6 +11,8 @@ $table-border-color: $grijs-20;
11
11
  $table-link-color: $grijs-90;
12
12
  $table-header-border-color: $grijs-60;
13
13
 
14
+ $table-filter-wrapper-width: 320px;
15
+
14
16
  caption {
15
17
  color: $text-muted;
16
18
  padding-bottom: $table-cell-padding;
@@ -210,3 +212,10 @@ table {
210
212
  @include table-responsive();
211
213
  }
212
214
  }
215
+
216
+ .dso-table-filter-wrapper {
217
+ .dso-search-bar {
218
+ margin-bottom: $u2;
219
+ width: $table-filter-wrapper-width - $u4;
220
+ }
221
+ }
@@ -260,7 +260,6 @@ textarea.form-control {
260
260
  // labels on narrow viewports stack the same as a default form example.
261
261
  @media (min-width: $screen-sm-min) {
262
262
  .control-label {
263
- padding-top: ($padding-base-vertical + 1); // Default padding plus a border
264
263
  margin-bottom: 0;
265
264
  text-align: right;
266
265
  }
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": "40.1.0",
5
+ "version": "41.0.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": "40.1.0",
23
+ "@dso-toolkit/core": "41.0.0",
24
24
  "@dso-toolkit/css": "0.0.0",
25
25
  "@dso-toolkit/sources": "0.0.0",
26
26
  "@frctl/fractal": "1.5.13",
@@ -192,7 +192,7 @@
192
192
  </fieldset>
193
193
  <fieldset>
194
194
  <legend>Filter op type</legend>
195
- <div class="form-group dso-filter">
195
+ <div class="form-group dso-form-group-search-bar">
196
196
  <div class="dso-label-container">
197
197
  <label for="form-horizontal-filter_type" class="control-label">
198
198
  Type
@@ -192,7 +192,7 @@
192
192
  </fieldset>
193
193
  <fieldset>
194
194
  <legend>Filter op type</legend>
195
- <div class="form-group dso-filter">
195
+ <div class="form-group dso-form-group-search-bar">
196
196
  <div class="dso-label-container">
197
197
  <label for="form-vertical-filter_type" class="control-label">
198
198
  Type
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter">
1
+ <div class="form-group dso-form-group-search-bar">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar" class="control-label">
4
4
  Search bar - Default
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter dso-invalid">
1
+ <div class="form-group dso-form-group-search-bar dso-invalid">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-allmessages" class="control-label">
4
4
  Search bar - Alle meldingen
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  </div>
17
17
  <div class="dso-field-container">
18
- <div class="dso-search-bar">
18
+ <div class="dso-search-bar dso-invalid">
19
19
  <div class="dso-search-bar-input">
20
20
  <span class="dso-search-icon" aria-hidden="true"></span><input type="text" aria-describedby="errorTextId_search-bar-allmessages helpTextId_search-bar-allmessages infoTextId_search-bar-allmessages" id="search-bar-error" placeholder="Bv. boomkap" aria-invalid="true" />
21
21
  <button type="button">
@@ -1,11 +1,11 @@
1
- <div class="form-group dso-filter dso-invalid">
1
+ <div class="form-group dso-form-group-search-bar dso-invalid">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-error" class="control-label">
4
4
  Search bar - Invalid
5
5
  </label>
6
6
  </div>
7
7
  <div class="dso-field-container">
8
- <div class="dso-search-bar">
8
+ <div class="dso-search-bar dso-invalid">
9
9
  <div class="dso-search-bar-input">
10
10
  <span class="dso-search-icon" aria-hidden="true"></span><input type="text" aria-describedby="errorTextId_search-bar-error" id="search-bar-error" placeholder="Bv. boomkap" aria-invalid="true" />
11
11
  <button type="button">
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter">
1
+ <div class="form-group dso-form-group-search-bar">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-help" class="control-label">
4
4
  Search bar - Default
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter">
1
+ <div class="form-group dso-form-group-search-bar">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-infobutton-expanded" class="control-label">
4
4
  Search bar - Default
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter">
1
+ <div class="form-group dso-form-group-search-bar">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-infobutton" class="control-label">
4
4
  Search bar - Default
@@ -1,4 +1,4 @@
1
- <div class="form-group dso-filter">
1
+ <div class="form-group dso-form-group-search-bar">
2
2
  <div class="dso-label-container">
3
3
  <label for="search-bar-static-info" class="control-label">
4
4
  Search bar - Default
@@ -159,11 +159,12 @@
159
159
  <fieldset>
160
160
  <legend hidden></legend>
161
161
  <fieldset class="form-group dso-checkboxes">
162
- <legend class="dso-label-container">
163
- <label class="control-label">
162
+ <legend class="sr-only">Selecteer uw gewenste filter</legend>
163
+ <div class="dso-label-container">
164
+ <span class="control-label" aria-hidden="true">
164
165
  Selecteer uw gewenste filter
165
- </label>
166
- </legend>
166
+ </span>
167
+ </div>
167
168
  <div class="dso-field-container">
168
169
  <div class="dso-selectable">
169
170
  <input type="checkbox" id="aanhanger-0" name="aanhanger" value="bak" checked>
@@ -2,37 +2,6 @@
2
2
 
3
3
  @use "@dso-toolkit/css/src/components/form/form.variables" as variables;
4
4
 
5
- .form,
6
- form,
7
- .dso-section-body {
8
- .dso-justify-form-groups {
9
- display: flex;
10
-
11
- > div {
12
- flex: 1 1 0;
13
- padding-left: $u1;
14
-
15
- &:first-child {
16
- padding-left: 0;
17
- }
18
-
19
- &.dso-form-buttons {
20
- align-self: flex-end;
21
- flex: 0 0 0;
22
- }
23
- }
24
-
25
- .form-group {
26
- &,
27
- + .form-group,
28
- + .dso-form-buttons {
29
- margin-bottom: 0;
30
- margin-top: 0;
31
- }
32
- }
33
- }
34
- }
35
-
36
5
  .dso-form-buttons {
37
6
  @include clearfix();
38
7
 
@@ -46,7 +46,7 @@
46
46
  // @import "components/progress-bar"; -> Moved to @dso-toolkit/styling
47
47
  // @import "components/progress-indicator"; -> Moved to @dso-toolkit/sources
48
48
  // @import "components/rich-content"; -> Moved to @dso-toolkit/sources/src/styling/global/headings
49
- @import "components/search-bar";
49
+ // @import "components/search-bar"; -> Moved to @dso-toolkit/css/src/components/form/form-group/search-bar/form-group-search-bar
50
50
  // @import "components/selectable"; // -> Moved to @dso-toolkit/styling
51
51
  // @import "components/shopping-cart"; -> Moved to @dso-toolkit/css/src/components/shopping-cart
52
52
  // @import "components/step-counter"; -> Moved to @dso-toolkit/styling