dso-toolkit 62.30.1 → 63.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.
package/dist/index.js CHANGED
@@ -39,17 +39,15 @@ export * from "./components/icon";
39
39
  export * from "./components/image";
40
40
  export * from "./components/image-overlay";
41
41
  export * from "./components/info";
42
- export { storiesOfInfoButton } from "./components/info-button/info-button.stories-of.js";
43
- export { storiesOfInputNumber } from "./components/input-number/input-number.stories-of.js";
42
+ export * from "./components/info-button";
43
+ export * from "./components/input-number";
44
44
  export { storiesOfJustifyFormGroups, } from "./components/justify-form-groups/justify-form-groups.stories-of.js";
45
45
  export * from "./components/label";
46
- export { storiesOfLabelGroup } from "./components/label-group/label-group.stories-of.js";
46
+ export * from "./components/label-group";
47
47
  export * from "./components/legend-item";
48
- export { LinkListType } from "./components/link-list/link-list.models.js";
49
- export { storiesOfLinkList } from "./components/link-list/link-list.stories-of.js";
50
- export { Type } from "./components/list/list.models.js";
51
- export { storiesOfList } from "./components/list/list.stories-of.js";
52
- export { storiesOfListButton } from "./components/list-button/list-button.stories-of.js";
48
+ export * from "./components/link-list";
49
+ export * from "./components/list";
50
+ export * from "./components/list-button";
53
51
  export { storiesOfLogo } from "./components/logo/logo.stories-of.js";
54
52
  export * from "./components/mark-bar";
55
53
  export { storiesOfModal } from "./components/modal/modal.stories-of.js";
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": "62.30.1",
5
+ "version": "63.0.0",
6
6
  "scripts": {
7
7
  "watch": "gulp"
8
8
  },
@@ -58,13 +58,13 @@
58
58
  "list-stream": "^2.1.0",
59
59
  "markdown-to-jsx": "^7.4.7",
60
60
  "plugin-error": "^2.0.1",
61
- "postcss": "^8.4.39",
62
- "prettier": "^3.3.2",
61
+ "postcss": "^8.4.40",
62
+ "prettier": "^3.3.3",
63
63
  "react": "^18.3.1",
64
64
  "react-dom": "^18.3.1",
65
- "sass": "^1.77.7",
65
+ "sass": "^1.77.8",
66
66
  "through2": "^4.0.2",
67
- "typescript": "^5.5.3",
67
+ "typescript": "^5.5.4",
68
68
  "uuid": "^10.0.0",
69
69
  "vinyl-sourcemaps-apply": "^0.2.1"
70
70
  },
@@ -28,7 +28,6 @@ $tertiary-active-color: colors.$bosgroen-140;
28
28
  $buttons: ".dso-primary, .dso-secondary, .dso-tertiary";
29
29
  $not-dso-buttons: ":not(.dso-primary):not(.dso-secondary):not(.dso-tertiary)";
30
30
 
31
- // stylelint-disable string-no-newline -- Escaped new lines wanted to improve readability
32
31
  $button-adjacent: "\
33
32
  .dso-primary + .dso-primary,\
34
33
  .dso-primary + .dso-secondary,\
@@ -58,4 +57,3 @@ $button-adjacent-tertiary: "\
58
57
  \
59
58
  .dso-tertiary + .dso-tertiary,\
60
59
  ";
61
- // stylelint-enable
@@ -7,7 +7,7 @@
7
7
  @use "form.mixins" as css-form-mixins;
8
8
 
9
9
  #{css-form-variables.$form-selectors} {
10
- fieldset {
10
+ .dso-form-group-collection {
11
11
  margin-block-end: units.$u2;
12
12
 
13
13
  > legend {
@@ -15,37 +15,13 @@
15
15
 
16
16
  border-block-end: 0;
17
17
  margin-block-end: css-form-variables.$fieldset-separator-unit;
18
-
19
- h1,
20
- h2,
21
- h3,
22
- h4,
23
- h5,
24
- h6 {
25
- margin: 0;
26
- }
27
-
28
- + dso-alert,
29
- + .alert {
30
- margin-block-start: 0;
31
- }
32
18
  }
33
19
 
34
- + fieldset:not(.form-group) {
20
+ + .dso-form-group-collection {
35
21
  > legend {
36
22
  border-block-start: 1px solid css-form-variables.$fieldset-separator-color;
37
23
  padding-block-start: css-form-variables.$fieldset-separator-unit;
38
24
  }
39
25
  }
40
-
41
- fieldset {
42
- margin-block-end: 0;
43
- padding-block-end: 0;
44
-
45
- + fieldset {
46
- margin-block-start: 0;
47
- padding-block-start: 0;
48
- }
49
- }
50
26
  }
51
27
  }
@@ -41,19 +41,6 @@
41
41
  cursor: pointer;
42
42
  }
43
43
 
44
- &:focus {
45
- & + label {
46
- &.dso-primary {
47
- background-color: button.$primary-hover-background-color;
48
- }
49
-
50
- &.dso-secondary {
51
- background-color: button.$secondary-hover-background-color;
52
- color: button.$secondary-hover-color;
53
- }
54
- }
55
- }
56
-
57
44
  &[disabled] {
58
45
  + label {
59
46
  cursor: default;
@@ -71,6 +58,12 @@
71
58
  }
72
59
  }
73
60
  }
61
+
62
+ &:focus-within {
63
+ label {
64
+ @include utilities.focus-outline();
65
+ }
66
+ }
74
67
  }
75
68
 
76
69
  .dso-filelist {
@@ -1,4 +1,4 @@
1
- @use "fieldset";
1
+ @use "form-group-collection";
2
2
 
3
3
  @use "form-horizontal";
4
4
  @use "form-group";
package/src/dso.scss CHANGED
@@ -88,9 +88,6 @@
88
88
  @use "components/viewer-grid/viewer-grid";
89
89
  @use "components/whitebox/whitebox";
90
90
 
91
- // Legacy
92
- @use "legacy/legacy-panel";
93
-
94
91
  // Very global and generic styling
95
92
  @use "utilities" as utilities-mixins;
96
93
 
@@ -50,9 +50,11 @@
50
50
  border: 0;
51
51
  }
52
52
 
53
- @mixin focus-outline() {
53
+ @mixin focus-outline($offset: units.$focus-outline-offset) {
54
54
  border-radius: units.$focus-border-radius;
55
- outline-offset: units.$focus-outline-offset;
55
+ @if $offset != 0 {
56
+ outline-offset: $offset;
57
+ }
56
58
  outline: units.$focus-outline-width solid colors.$focus-outline-color;
57
59
  }
58
60
 
@@ -1,339 +0,0 @@
1
- @use "../utilities";
2
- @use "../variables/colors";
3
- @use "../variables/scaffolding";
4
- @use "../variables/states";
5
- @use "../variables/typography";
6
- @use "../components/rich-content";
7
- @use "../components/table";
8
-
9
- $panel-bg: #fff !default;
10
- $panel-body-padding: 15px !default;
11
- $panel-heading-padding: 10px 15px !default;
12
- $panel-footer-padding: $panel-heading-padding !default;
13
- $panel-border-radius: scaffolding.$border-radius-base !default;
14
-
15
- //** Border color for elements within panels
16
- $panel-inner-border: #ddd !default;
17
- $panel-footer-bg: #f5f5f5 !default;
18
-
19
- $panel-default-text: colors.$grijs-80 !default;
20
- $panel-default-border: #ddd !default;
21
- $panel-default-heading-bg: #f5f5f5 !default;
22
-
23
- $panel-primary-text: #fff !default;
24
- $panel-primary-border: colors.$bosgroen !default;
25
- $panel-primary-heading-bg: colors.$bosgroen !default;
26
-
27
- $panel-success-text: states.$success-text !default;
28
- $panel-success-border: states.$success-border !default;
29
- $panel-success-heading-bg: states.$success-bg !default;
30
-
31
- $panel-info-text: states.$info-text !default;
32
- $panel-info-border: states.$info-border !default;
33
- $panel-info-heading-bg: states.$info-bg !default;
34
-
35
- $panel-warning-text: states.$warning-text !default;
36
- $panel-warning-border: states.$warning-border !default;
37
- $panel-warning-heading-bg: states.$warning-bg !default;
38
-
39
- $panel-danger-text: states.$danger-text !default;
40
- $panel-danger-border: states.$danger-border !default;
41
- $panel-danger-heading-bg: states.$danger-bg !default;
42
-
43
- @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
44
- border-color: $border;
45
-
46
- & > .panel-heading {
47
- color: $heading-text-color;
48
- background-color: $heading-bg-color;
49
- border-color: $heading-border;
50
-
51
- + .panel-collapse > .panel-body {
52
- border-block-start-color: $border;
53
- }
54
- .badge {
55
- color: $heading-bg-color;
56
- background-color: $heading-text-color;
57
- }
58
- }
59
- & > .panel-footer {
60
- + .panel-collapse > .panel-body {
61
- border-block-end-color: $border;
62
- }
63
- }
64
- }
65
-
66
- // Base class
67
- .panel {
68
- margin-block-end: typography.$line-height-computed;
69
- background-color: $panel-bg;
70
- border: 1px solid transparent;
71
- border-radius: $panel-border-radius;
72
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
73
-
74
- // List groups in panels
75
- // By default, space out list group content from panel headings to account for
76
- // any kind of custom content between the two.
77
-
78
- > .list-group,
79
- > .panel-collapse > .list-group {
80
- margin-block-end: 0;
81
-
82
- .list-group-item {
83
- border-width: 1px 0;
84
- border-radius: 0;
85
- }
86
-
87
- // Add border top radius for first one
88
- &:first-child {
89
- .list-group-item:first-child {
90
- border-block-start: 0;
91
- border-start-start-radius: $panel-border-radius - 1;
92
- border-start-end-radius: $panel-border-radius - 1;
93
- }
94
- }
95
-
96
- // Add border bottom radius for last one
97
- &:last-child {
98
- .list-group-item:last-child {
99
- border-block-end: 0;
100
- border-end-end-radius: $panel-border-radius - 1;
101
- border-end-start-radius: $panel-border-radius - 1;
102
- }
103
- }
104
- }
105
- > .panel-heading + .panel-collapse > .list-group {
106
- .list-group-item:first-child {
107
- border-start-start-radius: 0;
108
- border-start-end-radius: 0;
109
- }
110
- }
111
-
112
- // Tables in panels
113
- // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
114
- // watch it go full width.
115
-
116
- > .table,
117
- > .table-responsive > .table,
118
- > .panel-collapse > .table {
119
- margin-block-end: 0;
120
-
121
- caption {
122
- padding-inline-end: $panel-body-padding;
123
- padding-inline-start: $panel-body-padding;
124
- }
125
- }
126
- // Add border top radius for first one
127
- > .table:first-child,
128
- > .table-responsive:first-child > .table:first-child {
129
- border-start-start-radius: $panel-border-radius - 1;
130
- border-start-end-radius: $panel-border-radius - 1;
131
-
132
- > thead:first-child,
133
- > tbody:first-child {
134
- > tr:first-child {
135
- border-start-start-radius: $panel-border-radius - 1;
136
- border-start-end-radius: $panel-border-radius - 1;
137
-
138
- td:first-child,
139
- th:first-child {
140
- border-start-start-radius: $panel-border-radius - 1;
141
- }
142
- td:last-child,
143
- th:last-child {
144
- border-start-end-radius: $panel-border-radius - 1;
145
- }
146
- }
147
- }
148
- }
149
- // Add border bottom radius for last one
150
- > .table:last-child,
151
- > .table-responsive:last-child > .table:last-child {
152
- border-end-end-radius: $panel-border-radius - 1;
153
- border-end-start-radius: $panel-border-radius - 1;
154
-
155
- > tbody:last-child,
156
- > tfoot:last-child {
157
- > tr:last-child {
158
- border-end-end-radius: $panel-border-radius - 1;
159
- border-end-start-radius: $panel-border-radius - 1;
160
-
161
- td:first-child,
162
- th:first-child {
163
- border-end-start-radius: $panel-border-radius - 1;
164
- }
165
- td:last-child,
166
- th:last-child {
167
- border-end-end-radius: $panel-border-radius - 1;
168
- }
169
- }
170
- }
171
- }
172
- > .panel-body + .table,
173
- > .panel-body + .table-responsive,
174
- > .table + .panel-body,
175
- > .table-responsive + .panel-body {
176
- border-block-start: 1px solid table.$border-color;
177
- }
178
- > .table > tbody:first-child > tr:first-child th,
179
- > .table > tbody:first-child > tr:first-child td {
180
- border-block-start: 0;
181
- }
182
- > .table-bordered,
183
- > .table-responsive > .table-bordered {
184
- border: 0;
185
- > thead,
186
- > tbody,
187
- > tfoot {
188
- > tr {
189
- > th:first-child,
190
- > td:first-child {
191
- border-inline-start: 0;
192
- }
193
- > th:last-child,
194
- > td:last-child {
195
- border-inline-end: 0;
196
- }
197
- }
198
- }
199
- > thead,
200
- > tbody {
201
- > tr:first-child {
202
- > td,
203
- > th {
204
- border-block-end: 0;
205
- }
206
- }
207
- }
208
- > tbody,
209
- > tfoot {
210
- > tr:last-child {
211
- > td,
212
- > th {
213
- border-block-end: 0;
214
- }
215
- }
216
- }
217
- }
218
- > .table-responsive {
219
- margin-block-end: 0;
220
- border: 0;
221
- }
222
- }
223
-
224
- // Panel contents
225
- .panel-body {
226
- @include utilities.clearfix();
227
- @include rich-content.children();
228
-
229
- padding: $panel-body-padding;
230
- padding-block-end: 0;
231
- }
232
-
233
- // Optional heading
234
- .panel-heading {
235
- padding: $panel-heading-padding;
236
- border-block-end: 1px solid transparent;
237
- border-start-start-radius: $panel-border-radius - 1;
238
- border-start-end-radius: $panel-border-radius - 1;
239
- }
240
-
241
- // Within heading, strip any `h*` tag of its default margins for spacing.
242
- .panel-title {
243
- margin-block-start: 0;
244
- margin-block-end: 0;
245
- font-size: typography.$font-size-base * 1.125;
246
- color: inherit;
247
-
248
- > a,
249
- > small,
250
- > .small,
251
- > small > a,
252
- > .small > a {
253
- color: inherit;
254
- }
255
- }
256
-
257
- // Optional footer (stays gray in every modifier class)
258
- .panel-footer {
259
- padding: $panel-footer-padding;
260
- background-color: $panel-footer-bg;
261
- border-end-start-radius: $panel-border-radius - 1;
262
- border-end-end-radius: $panel-border-radius - 1;
263
- border-block-start: 1px solid $panel-inner-border;
264
- }
265
-
266
- // Collapse space between when there's no additional content.
267
- .panel-heading + .list-group {
268
- .list-group-item:first-child {
269
- border-block-start-width: 0;
270
- }
271
- }
272
- .list-group + .panel-footer {
273
- border-block-start-width: 0;
274
- }
275
-
276
- // Collapsible panels (aka, accordion)
277
- // Wrap a series of panels in `.panel-group` to turn them into an accordion with
278
- // the help of our collapse JavaScript plugin.
279
-
280
- .panel-group {
281
- margin-block-end: typography.$line-height-computed;
282
-
283
- // Tighten up margin so it's only between panels
284
- .panel {
285
- margin-block-end: 0;
286
- border-radius: $panel-border-radius;
287
-
288
- + .panel {
289
- margin-block-start: 5px;
290
- }
291
- }
292
-
293
- .panel-heading {
294
- border-block-end: 0;
295
-
296
- + .panel-collapse > .panel-body,
297
- + .panel-collapse > .list-group {
298
- border-block-start: 1px solid $panel-inner-border;
299
- }
300
- }
301
-
302
- .panel-footer {
303
- border-block-start: 0;
304
- + .panel-collapse .panel-body {
305
- border-block-end: 1px solid $panel-inner-border;
306
- }
307
- }
308
- }
309
-
310
- // Contextual variations
311
- .panel-default {
312
- @include panel-variant($panel-default-border, $panel-default-text, $panel-default-heading-bg, $panel-default-border);
313
- }
314
- .panel-primary {
315
- @include panel-variant($panel-primary-border, $panel-primary-text, $panel-primary-heading-bg, $panel-primary-border);
316
- }
317
- .panel-success {
318
- @include panel-variant($panel-success-border, $panel-success-text, $panel-success-heading-bg, $panel-success-border);
319
- }
320
- .panel-info {
321
- @include panel-variant($panel-info-border, $panel-info-text, $panel-info-heading-bg, $panel-info-border);
322
- }
323
- .panel-warning {
324
- @include panel-variant($panel-warning-border, $panel-warning-text, $panel-warning-heading-bg, $panel-warning-border);
325
- }
326
- .panel-danger {
327
- @include panel-variant($panel-danger-border, $panel-danger-text, $panel-danger-heading-bg, $panel-danger-border);
328
- }
329
-
330
- .panel-heading,
331
- .panel-footer {
332
- > :first-child {
333
- margin-block-start: 0;
334
- }
335
-
336
- > :last-child {
337
- margin-block-end: 0;
338
- }
339
- }