dso-toolkit 56.0.0 → 57.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 (30) hide show
  1. package/CHANGELOG.md +2526 -0
  2. package/dist/dso-icons.svg +155 -147
  3. package/dist/dso.css +320 -600
  4. package/package.json +1 -1
  5. package/src/components/accordion/accordion.scss +20 -7
  6. package/src/components/accordion/accordion.variables.scss +2 -0
  7. package/src/components/alert/alert.mixins.scss +2 -2
  8. package/src/components/button/button.mixins.scss +12 -5
  9. package/src/components/button/button.scss +0 -54
  10. package/src/components/button/button.variables.scss +2 -22
  11. package/src/components/button/readme.md +3 -3
  12. package/src/components/button-row/button-row.scss +8 -3
  13. package/src/components/dropdown-menu/dropdown-menu.mixins.scss +2 -4
  14. package/src/components/dropdown-menu/dropdown-menu.scss +6 -12
  15. package/src/components/form/form-buttons/form-buttons.scss +1 -2
  16. package/src/components/form/form-groups/files/form-group-files.scss +0 -4
  17. package/src/components/headings/headings.mixins.scss +1 -1
  18. package/src/components/headings/headings.scss +1 -1
  19. package/src/components/highlight-box/highlight-box.mixins.scss +2 -4
  20. package/src/components/info/info.mixins.scss +4 -4
  21. package/src/components/list/list.scss +32 -0
  22. package/src/components/list/readme.md +7 -0
  23. package/src/components/list-button/list-button.scss +3 -3
  24. package/src/components/modal/modal.mixins.scss +2 -4
  25. package/src/components/modal/modal.scss +2 -4
  26. package/src/components/rich-content/rich-content.scss +2 -2
  27. package/src/components/shopping-cart/shopping-cart.scss +1 -2
  28. package/src/components/table/table.scss +1 -2
  29. package/src/global/spacing.scss +46 -0
  30. package/src/variables/units.scss +5 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dso-toolkit",
3
3
  "description": "DSO Toolkit",
4
4
  "license": "SEE LICENSE IN DISCLAIMER.txt",
5
- "version": "56.0.0",
5
+ "version": "57.0.0",
6
6
  "scripts": {
7
7
  "watch": "gulp"
8
8
  },
@@ -75,7 +75,8 @@
75
75
  }
76
76
  }
77
77
 
78
- &.dso-accordion-compact {
78
+ &.dso-accordion-compact,
79
+ &.dso-accordion-compact-black {
79
80
  &,
80
81
  .dso-nested-accordion .dso-accordion {
81
82
  @include accordion-theme-compact.compact();
@@ -98,7 +99,7 @@
98
99
 
99
100
  a,
100
101
  button {
101
- align-items: baseline;
102
+ align-items: center;
102
103
  background-color: transparent;
103
104
  border: 0;
104
105
  display: flex;
@@ -144,6 +145,21 @@
144
145
  }
145
146
  }
146
147
 
148
+ // Create space between sections of the default accordion
149
+ // ------------------------------------------------------
150
+ :where(.dso-accordion-section) {
151
+ & + & {
152
+ margin-block-start: units.$u1 * 0.5;
153
+ }
154
+ }
155
+
156
+ // exceptions to the rule ^^:
157
+ :where(.dso-accordion-compact, .dso-accordion-neutral, .dso-accordion-compact-black) {
158
+ + :where(.dso-accordion-section) {
159
+ margin-block-start: 0;
160
+ }
161
+ }
162
+
147
163
  .dso-accordion-section {
148
164
  .dso-section-handle,
149
165
  > h1.dso-section-handle,
@@ -160,10 +176,6 @@
160
176
  }
161
177
  }
162
178
 
163
- &:not(.dso-accordion-compact):not(.dso-accordion-neutral) + .dso-accordion-section {
164
- margin-top: units.$u1 * 0.5;
165
- }
166
-
167
179
  &.dso-success,
168
180
  &.dso-error,
169
181
  &.dso-danger,
@@ -253,7 +265,8 @@ dso-accordion-section {
253
265
  margin-bottom: 0;
254
266
  }
255
267
 
256
- &.dso-accordion-compact:last-child {
268
+ &.dso-accordion-compact:last-child,
269
+ &.dso-accordion-compact-black:last-child {
257
270
  border-bottom: 1px solid accordion.$compact-border-color;
258
271
  }
259
272
  }
@@ -17,6 +17,8 @@ $compact-color: colors.$grasgroen;
17
17
  $compact-border-color: colors.$grijs-20;
18
18
  $compact-border-width: 1px;
19
19
 
20
+ $compact-black-color: colors.$zwart;
21
+
20
22
  $neutral-color: colors.$zwart;
21
23
  $neutral-border-color: colors.$bosgroen;
22
24
 
@@ -30,7 +30,7 @@
30
30
  margin-top: units.$u1;
31
31
  }
32
32
 
33
- #{button.$buttons} {
33
+ .dso-alert-button {
34
34
  background-color: rgba(25, 25, 25, 0.05);
35
35
  border-radius: button.$border-radius;
36
36
  border: 1px solid transparent;
@@ -46,7 +46,7 @@
46
46
 
47
47
  a {
48
48
  &,
49
- &:not(.btn):visited {
49
+ &:not(.dso-alert-button):visited {
50
50
  color: colors.$zwart;
51
51
  }
52
52
 
@@ -48,7 +48,7 @@
48
48
  }
49
49
  }
50
50
 
51
- &.btn-sm {
51
+ &.dso-small {
52
52
  @include small();
53
53
  }
54
54
 
@@ -156,7 +156,7 @@
156
156
  display: inline-block;
157
157
  font-size: 1em;
158
158
  font-weight: 500;
159
- margin-bottom: 0; // For input.btn
159
+ margin-bottom: 0;
160
160
  text-decoration: none;
161
161
  touch-action: manipulation;
162
162
  text-align: left;
@@ -296,7 +296,7 @@
296
296
  }
297
297
  }
298
298
 
299
- &.btn-sm:hover {
299
+ &.dso-small:hover {
300
300
  &::before {
301
301
  height: units.$u2;
302
302
  width: units.$u2;
@@ -317,7 +317,7 @@
317
317
  }
318
318
  }
319
319
 
320
- &.btn-sm:hover {
320
+ &.dso-small:hover {
321
321
  &::after {
322
322
  height: units.$u2;
323
323
  width: units.$u2;
@@ -372,12 +372,19 @@
372
372
  }
373
373
  }
374
374
 
375
- &.btn-align {
375
+ &.dso-align {
376
376
  line-height: calc(1.5em - 1px);
377
377
  padding: button-variables.$tertiary-padding-horizontal 0;
378
378
  position: relative;
379
379
  }
380
380
 
381
+ &.dso-truncate {
382
+ max-width: 100%;
383
+ overflow: hidden;
384
+ text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.
385
+ white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.
386
+ }
387
+
381
388
  &.dso-spinner-left {
382
389
  &::before {
383
390
  @include _spinner-icon($color: colors.$grasgroen, $valign: middle, $position: left);
@@ -71,58 +71,6 @@ button {
71
71
  @include button-mixins.element();
72
72
  }
73
73
 
74
- .btn {
75
- @include button-mixins.base();
76
- }
77
-
78
- .btn-primary {
79
- @include button-mixins.primary($base-styling: false);
80
-
81
- background-color: colors.$invalid-color;
82
- }
83
-
84
- a.btn-primary {
85
- @include button-mixins.anchor-primary();
86
-
87
- background-color: colors.$invalid-color;
88
- }
89
-
90
- .btn-default {
91
- @include button-mixins.secondary($base-styling: false);
92
-
93
- background-color: colors.$invalid-color;
94
- }
95
-
96
- a.btn-default {
97
- @include button-mixins.anchor-secondary();
98
-
99
- background-color: colors.$invalid-color;
100
- }
101
-
102
- .btn-link {
103
- @include button-mixins.tertiary($base-styling: false);
104
-
105
- background-color: colors.$invalid-color;
106
- }
107
-
108
- a.btn-link {
109
- @include button-mixins.anchor-tertiary();
110
-
111
- background-color: colors.$invalid-color;
112
- }
113
-
114
- .btn-block {
115
- @include button-mixins.block(".btn-block");
116
- }
117
-
118
- input[type="submit"],
119
- input[type="reset"],
120
- input[type="button"] {
121
- &.btn-block {
122
- width: 100%;
123
- }
124
- }
125
-
126
74
  a,
127
75
  button,
128
76
  label {
@@ -189,11 +137,9 @@ a {
189
137
  }
190
138
  }
191
139
 
192
- .btn:not(.dso-list-button),
193
140
  .dso-primary,
194
141
  .dso-secondary,
195
142
  .dso-tertiary {
196
- + .btn:not(.dso-list-button),
197
143
  + .dso-primary,
198
144
  + .dso-secondary,
199
145
  + .dso-tertiary {
@@ -25,57 +25,37 @@ $tertiary-color: colors.$grasgroen;
25
25
  $tertiary-hover-color: colors.$bosgroen;
26
26
  $tertiary-active-color: colors.$bosgroen-140;
27
27
 
28
- $buttons: ".btn, .dso-primary, .dso-secondary, .dso-tertiary";
29
- $not-dso-buttons: ":not(.btn):not(.dso-primary):not(.dso-secondary):not(.dso-tertiary)";
28
+ $buttons: ".dso-primary, .dso-secondary, .dso-tertiary";
29
+ $not-dso-buttons: ":not(.dso-primary):not(.dso-secondary):not(.dso-tertiary)";
30
30
 
31
31
  // stylelint-disable string-no-newline -- Escaped new lines wanted to improve readability
32
32
  $button-adjacent: "\
33
- .btn + .btn,\
34
- .btn + .dso-primary,\
35
- .btn + .dso-secondary,\
36
- .btn + .dso-tertiary,\
37
- \
38
- .dso-primary + .btn,\
39
33
  .dso-primary + .dso-primary,\
40
34
  .dso-primary + .dso-secondary,\
41
35
  .dso-primary + .dso-tertiary,\
42
36
  \
43
- .dso-secondary + .btn,\
44
37
  .dso-secondary + .dso-primary,\
45
38
  .dso-secondary + .dso-secondary,\
46
39
  .dso-secondary + .dso-tertiary,\
47
40
  \
48
- .dso-tertiary + .btn,\
49
41
  .dso-tertiary + .dso-primary,\
50
42
  .dso-tertiary + .dso-secondary,\
51
43
  .dso-tertiary + .dso-tertiary\
52
44
  ";
53
45
 
54
46
  $button-adjacent-secondary: "\
55
- .btn + .dso-secondary,\
56
- .btn + .btn-default,\
57
- \
58
47
  .dso-primary + .dso-secondary,\
59
- .dso-primary + .btn-default,\
60
48
  \
61
49
  .dso-secondary + .dso-secondary,\
62
- .dso-secondary + .btn-default,\
63
50
  \
64
51
  .dso-tertiary + .dso-secondary,\
65
- .dso-tertiary + .btn-default\
66
52
  ";
67
53
 
68
54
  $button-adjacent-tertiary: "\
69
- .btn + .dso-tertiary,\
70
- .btn + .btn-link,\
71
- \
72
55
  .dso-primary + .dso-tertiary,\
73
- .dso-primary + .btn-link,\
74
56
  \
75
57
  .dso-secondary + .dso-tertiary,\
76
- .dso-secondary + .btn-link,\
77
58
  \
78
59
  .dso-tertiary + .dso-tertiary,\
79
- .dso-tertiary + .btn-link\
80
60
  ";
81
61
  // stylelint-enable
@@ -2,9 +2,9 @@
2
2
 
3
3
  Kan ook op `a` worden gebruikt: `a.dso-primary`, `a.dso-secondary`, `a.dso-tertiary`.
4
4
 
5
- Het label van de button staat altijd in een `<span>`.
5
+ Het label van de button staat altijd in een `<span>`. Naast de label `<span>` kan een Icon staan.
6
6
 
7
7
  ## Modifiers
8
8
 
9
- - `.btn-sm`
10
- - `.btn-block`
9
+ - `.dso-small`: Om de button compacter te maken.
10
+ - `.dso-align`: Met deze modifier kunnen tertiare buttons verticaal worden uitgelijnd met primary en secondary buttons.
@@ -6,15 +6,12 @@
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
8
  gap: units.$u2;
9
- margin: units.$u2 0 units.$u4;
10
9
 
11
- .btn:not(.dso-list-button),
12
10
  .dso-primary,
13
11
  .dso-secondary,
14
12
  .dso-tertiary {
15
13
  white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- No text wrap after icon
16
14
 
17
- + .btn:not(.dso-list-button),
18
15
  + .dso-primary,
19
16
  + .dso-secondary,
20
17
  + .dso-tertiary {
@@ -31,4 +28,12 @@
31
28
  color: colors.$zwart;
32
29
  }
33
30
  }
31
+
32
+ &.dso-align-right {
33
+ justify-content: flex-end;
34
+ }
35
+
36
+ &.dso-align-center {
37
+ justify-content: center;
38
+ }
34
39
  }
@@ -18,8 +18,7 @@
18
18
  > button:not(.dso-primary):not(.dso-secondary):not(.dso-tertiary),
19
19
  > .dso-primary,
20
20
  > .dso-secondary,
21
- > .dso-tertiary,
22
- > .btn {
21
+ > .dso-tertiary {
23
22
  position: relative;
24
23
 
25
24
  &::after {
@@ -29,8 +28,7 @@
29
28
  }
30
29
 
31
30
  > .dso-primary,
32
- > .dso-secondary,
33
- > .btn {
31
+ > .dso-secondary {
34
32
  &::after {
35
33
  margin-left: units.$u1;
36
34
  }
@@ -5,15 +5,13 @@
5
5
  @use "../dropdown-menu";
6
6
 
7
7
  @mixin icons() {
8
- > .dso-primary,
9
- > .btn-primary {
8
+ > .dso-primary {
10
9
  &::after {
11
10
  @include di.base("chevron-down-wit");
12
11
  }
13
12
  }
14
13
 
15
- > .dso-secondary,
16
- > .btn-default {
14
+ > .dso-secondary {
17
15
  &::after {
18
16
  @include di.base("chevron-down");
19
17
  }
@@ -26,8 +24,7 @@
26
24
  }
27
25
 
28
26
  > button:not(.dso-primary):not(.dso-secondary):not(.dso-tertiary),
29
- > .dso-tertiary,
30
- > .btn-link {
27
+ > .dso-tertiary {
31
28
  &::after {
32
29
  @include di.base("chevron-down");
33
30
 
@@ -45,15 +42,13 @@
45
42
  }
46
43
 
47
44
  @mixin icons-open() {
48
- > .dso-primary,
49
- > .btn-primary {
45
+ > .dso-primary {
50
46
  &::after {
51
47
  @include di.variant("chevron-up-wit");
52
48
  }
53
49
  }
54
50
 
55
- > .dso-secondary,
56
- > .btn-default {
51
+ > .dso-secondary {
57
52
  &::after {
58
53
  @include di.variant("chevron-up");
59
54
  }
@@ -64,8 +59,7 @@
64
59
  }
65
60
 
66
61
  > button:not(.dso-primary):not(.dso-secondary):not(.dso-tertiary),
67
- > .dso-tertiary,
68
- > .btn-link {
62
+ > .dso-tertiary {
69
63
  &::after {
70
64
  @include di.variant("chevron-up");
71
65
  }
@@ -15,8 +15,7 @@
15
15
 
16
16
  a,
17
17
  button {
18
- &.dso-tertiary,
19
- &.btn-link {
18
+ &.dso-tertiary {
20
19
  line-height: typography.$line-height-base;
21
20
  padding: button.$vertical-padding 0; // $horizontal??
22
21
  }
@@ -118,10 +118,6 @@
118
118
  margin: #{units.$u1 * 0.5} 0 #{units.$u1 * 0.5} units.$u1;
119
119
  }
120
120
 
121
- button.btn-link {
122
- color: colors.$grijs-90;
123
- }
124
-
125
121
  @media screen and (max-width: media-query-breakpoints.$screen-sm-max) {
126
122
  @include utilities.clearfix();
127
123
 
@@ -1,6 +1,6 @@
1
- @use "../../variables/units";
2
1
  @use "../../variables/colors";
3
2
  @use "../../variables/typography";
3
+ @use "../../variables/units";
4
4
 
5
5
  @mixin base() {
6
6
  color: colors.$bosgroen;
@@ -1,6 +1,6 @@
1
- @use "../../variables/units";
2
1
  @use "../../variables/colors";
3
2
  @use "../../variables/typography";
3
+ @use "../../variables/units";
4
4
  @use "../headings";
5
5
 
6
6
  h1,
@@ -59,8 +59,7 @@
59
59
  margin-bottom: 0 !important;
60
60
  }
61
61
 
62
- .dso-tertiary:not([disabled]),
63
- .btn-link:not([disabled]) {
62
+ .dso-tertiary:not([disabled]) {
64
63
  &:hover {
65
64
  &,
66
65
  dso-icon,
@@ -72,8 +71,7 @@
72
71
  }
73
72
 
74
73
  @mixin exoticChildren() {
75
- .dso-tertiary:not([disabled]),
76
- .btn-link:not([disabled]) {
74
+ .dso-tertiary:not([disabled]) {
77
75
  color: colors.$zwart;
78
76
  }
79
77
 
@@ -30,12 +30,13 @@
30
30
  }
31
31
 
32
32
  a {
33
- &#{button.$not-dso-buttons},
34
33
  &:hover,
35
34
  &:focus,
36
35
  &:active,
37
36
  &:visited {
38
- color: colors.$zwart;
37
+ &#{button.$not-dso-buttons} {
38
+ color: colors.$zwart;
39
+ }
39
40
  }
40
41
 
41
42
  &:active {
@@ -43,8 +44,7 @@
43
44
  }
44
45
  }
45
46
 
46
- .dso-tertiary:not([disabled]),
47
- .btn-link:not([disabled]) {
47
+ .dso-tertiary:not([disabled]) {
48
48
  color: colors.$zwart;
49
49
 
50
50
  &:hover,
@@ -2,6 +2,7 @@
2
2
  @use "../../variables/media-query-breakpoints";
3
3
  @use "../rich-content";
4
4
  @use "../list";
5
+ @use "../../di";
5
6
 
6
7
  @use "list.variables" as css-list-variables;
7
8
 
@@ -93,3 +94,34 @@ ol {
93
94
  @include list.unstyled();
94
95
  }
95
96
  }
97
+
98
+ ul {
99
+ > li.dso-forbidden,
100
+ > li.dso-status-warning {
101
+ list-style: none;
102
+ position: relative;
103
+
104
+ &::before {
105
+ background-position: center;
106
+ background-size: cover;
107
+ content: "";
108
+ height: 1em;
109
+ left: -1.2em;
110
+ position: absolute;
111
+ top: 0.25em;
112
+ width: 1em;
113
+ }
114
+ }
115
+
116
+ > li.dso-forbidden {
117
+ &::before {
118
+ @include di.variant("forbidden-rood");
119
+ }
120
+ }
121
+
122
+ > li.dso-status-warning {
123
+ &::before {
124
+ @include di.variant("status-warning");
125
+ }
126
+ }
127
+ }
@@ -1 +1,8 @@
1
1
  # `ul`, `ol`, `.list-group`, `ul.dso-columns-list`, `ol.dso-columns-list`
2
+
3
+ ## Status
4
+
5
+ Een List Item (`<li>`) kan een status hebben. Een status bestaat uit een icon en een toelichting. De status wordt met een modifier class op het List Item gezet.
6
+
7
+ - Forbidden (`dso-forbidden`)
8
+ - Status Warning (`dso-status-warning`)
@@ -4,7 +4,7 @@
4
4
  @use "../../variables/colors";
5
5
  @use "../../variables/units";
6
6
 
7
- .dso-btn-group {
7
+ .dso-button-group {
8
8
  @include list-button.button-group(".dso-input-number", ".dso-list-button");
9
9
  }
10
10
 
@@ -14,9 +14,9 @@
14
14
  }
15
15
 
16
16
  .dso-list-button,
17
- .dso-btn-group {
17
+ .dso-button-group {
18
18
  + .dso-list-button,
19
- + .dso-btn-group {
19
+ + .dso-button-group {
20
20
  @include list-button.sibling();
21
21
  }
22
22
  }
@@ -129,8 +129,7 @@
129
129
  margin-top: units.$u1;
130
130
  }
131
131
 
132
- &.dso-tertiary,
133
- &.btn-link {
132
+ &.dso-tertiary {
134
133
  &,
135
134
  span {
136
135
  float: none;
@@ -182,8 +181,7 @@
182
181
  margin-top: units.$u1;
183
182
  }
184
183
 
185
- &.dso-tertiary,
186
- &.btn-link {
184
+ &.dso-tertiary {
187
185
  &,
188
186
  span {
189
187
  float: none;
@@ -40,8 +40,7 @@ body.dso-modal-open {
40
40
  }
41
41
 
42
42
  .dso-footer {
43
- .dso-tertiary,
44
- .btn-link {
43
+ .dso-tertiary {
45
44
  float: left;
46
45
  line-height: calc(1.5em - 1px);
47
46
  padding: button.$vertical-padding 0;
@@ -58,8 +57,7 @@ dso-modal {
58
57
  div[slot="footer"] {
59
58
  @include modal.modal-wide-buttons();
60
59
 
61
- .dso-tertiary,
62
- .btn-link {
60
+ .dso-tertiary {
63
61
  float: left;
64
62
  line-height: calc(1.5em - 1px);
65
63
  padding: button.$vertical-padding 0;
@@ -3,11 +3,11 @@
3
3
  .dso-rich-content {
4
4
  @include rich-content.children();
5
5
 
6
- > :first-child:not(hr) {
6
+ > :first-child:not(hr, .dso-button-row) {
7
7
  margin-top: rich-content.$margin-bottom * 0.5;
8
8
  }
9
9
 
10
- > :last-child:not(hr) {
10
+ > :last-child:not(hr, .dso-button-row) {
11
11
  margin-bottom: rich-content.$margin-bottom * 0.5;
12
12
  }
13
13
  }
@@ -178,8 +178,7 @@
178
178
  }
179
179
 
180
180
  // demo
181
- .dso-secondary,
182
- .btn-default {
181
+ .dso-secondary {
183
182
  font-size: 16px;
184
183
  padding: 6px 12px;
185
184
  }
@@ -41,8 +41,7 @@ table.table,
41
41
  max-width: 100%;
42
42
  width: 100%;
43
43
 
44
- .dso-tertiary,
45
- .btn-link {
44
+ .dso-tertiary {
46
45
  position: relative;
47
46
  top: -2px;
48
47
  white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- These actions are always accomponied by icons, we always want the icon next to the text