@danske/sapphire-css 43.0.0 → 44.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.
@@ -72,21 +72,29 @@
72
72
  margin-left: var(--sapphire-semantic-size-spacing-xs);
73
73
  }
74
74
 
75
+ .sapphire-checkbox__note,
75
76
  .sapphire-checkbox__error-text {
76
77
  display: block;
77
78
  font-family: var(--sapphire-semantic-font-name-default);
78
79
  font-weight: var(--sapphire-semantic-font-weight-default-regular);
79
80
  font-size: var(--sapphire-semantic-size-font-label-md);
80
81
  line-height: var(--sapphire-semantic-size-line-height-md);
81
- color: var(--sapphire-semantic-color-foreground-on-negative-subtle);
82
- margin-top: var(--sapphire-semantic-size-spacing-2xs);
83
-
82
+ margin-top: var(--sapphire-semantic-size-spacing-3xs);
84
83
  margin-left: calc(
85
84
  var(--sapphire-semantic-size-spacing-sm) +
86
85
  var(--sapphire-semantic-size-height-box-lg)
87
86
  );
88
87
  }
89
88
 
89
+ .sapphire-checkbox__note {
90
+ color: var(--sapphire-semantic-color-foreground-secondary);
91
+ }
92
+
93
+ .sapphire-checkbox__error-text {
94
+ color: var(--sapphire-semantic-color-foreground-on-negative-subtle);
95
+ }
96
+
97
+ .sapphire-checkbox__note--md,
90
98
  .sapphire-checkbox__error-text--md {
91
99
  font-size: var(--sapphire-semantic-size-font-label-sm);
92
100
  line-height: var(--sapphire-semantic-size-line-height-sm);
@@ -6,7 +6,9 @@ declare const styles: {
6
6
  readonly "sapphire-checkbox__required-indicator": string;
7
7
  readonly "sapphire-checkbox__optional-indicator": string;
8
8
  readonly "sapphire-checkbox--md": string;
9
+ readonly "sapphire-checkbox__note": string;
9
10
  readonly "sapphire-checkbox__error-text": string;
11
+ readonly "sapphire-checkbox__note--md": string;
10
12
  readonly "sapphire-checkbox__error-text--md": string;
11
13
  readonly "sapphire-checkbox__box": string;
12
14
  readonly "sapphire-checkbox__box-icon": string;
@@ -11,10 +11,11 @@
11
11
  height: var(--sapphire-global-size-generic-480);
12
12
  min-height: var(--sapphire-global-size-generic-480);
13
13
  padding: var(--sapphire-semantic-size-spacing-2xl);
14
- border-radius: var(--sapphire-semantic-size-radius-xl);
14
+ border-radius: var(--sapphire-semantic-size-radius-2xl);
15
15
  transition-property: opacity, background-color, color;
16
16
  transition-duration: var(--sapphire-semantic-time-fade-quick);
17
17
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
18
+ overflow: hidden;
18
19
  /* The below is meant to address a font rendering quirk in OSX where the text
19
20
  * looks bolder than intended due to subpixel rendering. This quirk generally
20
21
  * occurs for bold fonts on dark backgrounds but depending on the font, it
@@ -28,7 +29,7 @@
28
29
  */
29
30
  -webkit-font-smoothing: antialiased;
30
31
  -moz-osx-font-smoothing: grayscale;
31
- --mask-data: url('data:image/svg+xml,%3csvg stroke="black" width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"%3e%3crect width="100%25" height="100%25" fill="none" rx="12" ry="12" stroke-width="2" stroke-dasharray="6 6.01126518182488" stroke-dashoffset="4" stroke-linecap="butt"/%3e%3c/svg%3e');
32
+ --mask-data: url('data:image/svg+xml,%3csvg stroke="black" width="70%25" height="70%25" xmlns="http://www.w3.org/2000/svg"%3e%3crect width="100%25" height="100%25" fill="none" rx="12" ry="12" stroke-width="2" stroke-dasharray="6 6.01126518182488" stroke-dashoffset="4" stroke-linecap="butt"/%3e%3c/svg%3e');
32
33
  }
33
34
 
34
35
  /* The before is needed because the SVG image cannot take CSS var, so the background of the ::before is set to the correct color instead */
@@ -42,8 +43,8 @@
42
43
  /* Dashed borders cannot be customised, so we use a trick with the SVG image to customise it */
43
44
  mask: var(--mask-data);
44
45
  -webkit-mask: var(--mask-data);
45
- background: var(--sapphire-semantic-color-border-primary);
46
- border-radius: var(--sapphire-semantic-size-radius-xl);
46
+ background: var(--sapphire-semantic-color-border-field-default);
47
+ border-radius: var(--sapphire-semantic-size-radius-2xl);
47
48
  transition-property: opacity, background-color, color;
48
49
  transition-duration: var(--sapphire-semantic-time-fade-quick);
49
50
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
@@ -59,7 +60,7 @@
59
60
  .sapphire-dropzone:not(:disabled):not(.is-disabled):not(:active):not(
60
61
  .is-active
61
62
  ).is-hover {
62
- background: var(--sapphire-semantic-color-background-action-tertiary-hover);
63
+ background: none;
63
64
  }
64
65
 
65
66
  .sapphire-dropzone:not(:disabled):not(.is-disabled).sapphire-dropzone:active,
@@ -69,7 +70,20 @@
69
70
  .sapphire-dropzone:not(:disabled):not(
70
71
  .is-disabled
71
72
  ).sapphire-dropzone.is-active {
72
- background: var(--sapphire-semantic-color-background-action-tertiary-active);
73
+ background: none;
74
+ }
75
+
76
+ .sapphire-dropzone:not(:active):not(.is-disabled):not(
77
+ .is-active
78
+ ).is-hover::before,
79
+ .sapphire-dropzone:not(:active):not(.is-disabled):not(.is-active):not(
80
+ .js-hover
81
+ ):hover::before {
82
+ background: var(--sapphire-semantic-color-background-action-primary-hover);
83
+ }
84
+
85
+ .sapphire-dropzone.is-active::before {
86
+ background: var(--sapphire-semantic-color-background-action-primary-active);
73
87
  }
74
88
 
75
89
  .sapphire-dropzone:focus {
@@ -95,13 +109,11 @@
95
109
  }
96
110
 
97
111
  .sapphire-dropzone--dropping {
98
- background: var(
99
- --sapphire-semantic-color-background-action-select-secondary-default
100
- );
112
+ background: var(--sapphire-semantic-color-background-accent-subtle);
101
113
  }
102
114
 
103
115
  .sapphire-dropzone.sapphire-dropzone--dropping::before {
104
- background: var(--sapphire-semantic-color-border-accent);
116
+ background: var(--sapphire-semantic-color-foreground-on-accent-subtle);
105
117
  }
106
118
 
107
119
  .sapphire-dropzone__content {
@@ -116,10 +128,9 @@
116
128
  margin-bottom: var(--sapphire-semantic-size-spacing-control-vertical-lg);
117
129
  }
118
130
 
119
- .sapphire-dropzone--dropping .sapphire-dropzone__icon {
120
- color: var(
121
- --sapphire-semantic-color-foreground-action-on-select-secondary-default
122
- );
131
+ .sapphire-dropzone--dropping .sapphire-dropzone__icon,
132
+ .sapphire-dropzone--dropping .sapphire-dropzone__content * {
133
+ color: var(--sapphire-semantic-color-foreground-on-accent-subtle);
123
134
  }
124
135
 
125
136
  .sapphire-dropzone__heading {
@@ -224,8 +224,16 @@ instead of being applied on the list item itself */
224
224
  /* This was added to accommodate nowrap + hidden text overflow situation */
225
225
  min-width: 0;
226
226
  overflow-wrap: break-word;
227
+ gap: var(--sapphire-semantic-size-spacing-4xs);
227
228
  }
228
229
 
230
+ .sapphire-list__item-text-label {
231
+ color: var(--sapphire-semantic-color-foreground-secondary);
232
+ line-height: var(--sapphire-semantic-size-line-height-md);
233
+ font-size: var(--sapphire-semantic-size-font-body-sm);
234
+ }
235
+
236
+ /* TODO remove in v6 deprecated */
229
237
  .sapphire-list__item-text--reversedOrder {
230
238
  flex-direction: column-reverse;
231
239
  }
@@ -16,6 +16,7 @@ declare const styles: {
16
16
  readonly "sapphire-list__item-content-left": string;
17
17
  readonly "sapphire-list__item-content-right": string;
18
18
  readonly "sapphire-list__item-text": string;
19
+ readonly "sapphire-list__item-text-label": string;
19
20
  readonly "sapphire-list__item-text--reversedOrder": string;
20
21
  readonly "sapphire-list__item-text-primary": string;
21
22
  readonly "sapphire-list__item-text-secondary": string;
@@ -13,13 +13,18 @@
13
13
 
14
14
  .sapphire-modal-layout__header {
15
15
  display: flex;
16
- justify-content: space-between;
16
+ flex-direction: column;
17
17
  padding: var(--sapphire-semantic-size-spacing-xl)
18
18
  var(--sapphire-semantic-size-spacing-xl)
19
19
  var(--sapphire-semantic-size-spacing-xl)
20
20
  var(--sapphire-semantic-size-spacing-2xl);
21
21
  gap: var(--sapphire-semantic-size-spacing-sm);
22
- min-height: var(--sapphire-semantic-size-height-control-md);
22
+ }
23
+
24
+ .sapphire-modal-layout__header-content {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ gap: var(--sapphire-semantic-size-spacing-sm);
23
28
  }
24
29
 
25
30
  .sapphire-modal-layout__body {
@@ -53,11 +58,27 @@
53
58
  flex-direction: column;
54
59
  justify-content: center;
55
60
  word-break: break-word;
61
+ padding: var(--sapphire-semantic-size-spacing-2xs) 0;
56
62
  }
57
63
 
58
64
  .sapphire-modal-layout__subheading {
59
65
  color: var(--sapphire-semantic-color-foreground-secondary);
60
- margin-top: var(--sapphire-semantic-size-spacing-2xs);
66
+ margin-top: var(--sapphire-semantic-size-spacing-3xs);
67
+ line-height: var(--sapphire-semantic-size-line-height-sm);
68
+ }
69
+
70
+ .sapphire-modal-layout__extra-container {
71
+ flex: 1;
72
+ flex-basis: 100%;
73
+ display: flex;
74
+ flex-direction: column;
75
+ align-items: flex-start;
76
+ gap: var(--sapphire-semantic-size-spacing-sm);
77
+ margin-top: var(--sapphire-semantic-size-spacing-sm);
78
+ }
79
+
80
+ .sapphire-modal-layout__progress-container {
81
+ display: flex;
61
82
  }
62
83
 
63
84
  .sapphire-modal-layout__header-container + .sapphire-modal-layout__body {
@@ -2,12 +2,15 @@ declare const styles: {
2
2
  readonly "sapphire-modal-layout": string;
3
3
  readonly "sapphire-modal-layout__header-container": string;
4
4
  readonly "sapphire-modal-layout__header": string;
5
+ readonly "sapphire-modal-layout__header-content": string;
5
6
  readonly "sapphire-modal-layout__body": string;
6
7
  readonly "sapphire-modal-layout__body--no-padding": string;
7
8
  readonly "sapphire-modal-layout__footer-container": string;
8
9
  readonly "sapphire-modal-layout__footer": string;
9
10
  readonly "sapphire-modal-layout__heading-container": string;
10
11
  readonly "sapphire-modal-layout__subheading": string;
12
+ readonly "sapphire-modal-layout__extra-container": string;
13
+ readonly "sapphire-modal-layout__progress-container": string;
11
14
  readonly "sapphire-modal-layout__body--scrolled": string;
12
15
  readonly "sapphire-modal-layout__body--scrollable": string;
13
16
  readonly "sapphire-modal-layout__section": string;
@@ -5,6 +5,11 @@
5
5
  position: relative;
6
6
  }
7
7
 
8
+ .sapphire-radio-container {
9
+ display: inline-flex;
10
+ flex-flow: column;
11
+ }
12
+
8
13
  .sapphire-radio__input {
9
14
  margin: 0;
10
15
  overflow: visible;
@@ -163,3 +168,27 @@
163
168
  .sapphire-radio .sapphire-radio__input:disabled ~ .sapphire-radio__label {
164
169
  opacity: var(--sapphire-semantic-opacity-disabled);
165
170
  }
171
+
172
+ /* Note */
173
+ .sapphire-radio__note {
174
+ display: block;
175
+ font-family: var(--sapphire-semantic-font-name-default);
176
+ font-weight: var(--sapphire-semantic-font-weight-default-regular);
177
+ font-size: var(--sapphire-semantic-size-font-label-md);
178
+ line-height: var(--sapphire-semantic-size-line-height-md);
179
+ margin-top: var(--sapphire-semantic-size-spacing-3xs);
180
+ margin-left: calc(
181
+ var(--sapphire-semantic-size-spacing-sm) +
182
+ var(--sapphire-semantic-size-height-box-lg)
183
+ );
184
+ color: var(--sapphire-semantic-color-foreground-secondary);
185
+ }
186
+
187
+ .sapphire-radio__note--md {
188
+ font-size: var(--sapphire-semantic-size-font-label-sm);
189
+ line-height: var(--sapphire-semantic-size-line-height-sm);
190
+ margin-left: calc(
191
+ var(--sapphire-semantic-size-spacing-xs) +
192
+ var(--sapphire-semantic-size-height-box-lg)
193
+ );
194
+ }
@@ -1,5 +1,6 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-radio": string;
3
+ readonly "sapphire-radio-container": string;
3
4
  readonly "sapphire-radio__input": string;
4
5
  readonly "sapphire-radio__label": string;
5
6
  readonly "sapphire-radio--md": string;
@@ -10,6 +11,8 @@ declare const styles: {
10
11
  readonly "js-hover": string;
11
12
  readonly "is-focus": string;
12
13
  readonly "js-focus": string;
14
+ readonly "sapphire-radio__note": string;
15
+ readonly "sapphire-radio__note--md": string;
13
16
  };
14
17
  export = styles;
15
18
 
@@ -58,7 +58,10 @@
58
58
  }
59
59
 
60
60
  /* disabled */
61
- .sapphire-slider__track[data-disabled='true'] {
61
+ .sapphire-slider__track.is-disabled {
62
62
  opacity: var(--sapphire-semantic-opacity-disabled);
63
63
  cursor: not-allowed;
64
64
  }
65
+ .sapphire-slider__track.is-disabled .sapphire-slider__thumb {
66
+ cursor: not-allowed;
67
+ }
@@ -5,6 +5,7 @@ declare const styles: {
5
5
  readonly "sapphire-slider__track-fill": string;
6
6
  readonly "sapphire-slider__thumb": string;
7
7
  readonly "is-focus": string;
8
+ readonly "is-disabled": string;
8
9
  };
9
10
  export = styles;
10
11
 
@@ -10,9 +10,11 @@
10
10
  gap: var(--sapphire-semantic-size-spacing-sm);
11
11
  }
12
12
 
13
- .sapphire-switch--md {
14
- gap: var(--sapphire-semantic-size-spacing-2xs);
13
+ .sapphire-switch-container {
14
+ display: inline-flex;
15
+ flex-flow: column;
15
16
  }
17
+
16
18
  /**
17
19
  * hidden html input
18
20
  */
@@ -179,3 +181,27 @@
179
181
  ~ .sapphire-switch-track::after {
180
182
  left: calc(100% - var(--sapphire-semantic-size-height-control-2xs));
181
183
  }
184
+
185
+ /* Note */
186
+ .sapphire-switch__note {
187
+ display: block;
188
+ font-family: var(--sapphire-semantic-font-name-default);
189
+ font-weight: var(--sapphire-semantic-font-weight-default-regular);
190
+ font-size: var(--sapphire-semantic-size-font-label-md);
191
+ line-height: var(--sapphire-semantic-size-line-height-md);
192
+ margin-top: var(--sapphire-semantic-size-spacing-3xs);
193
+ margin-left: calc(
194
+ var(--sapphire-semantic-size-spacing-sm) +
195
+ var(--sapphire-global-size-generic-110)
196
+ );
197
+ color: var(--sapphire-semantic-color-foreground-secondary);
198
+ }
199
+
200
+ .sapphire-switch__note--md {
201
+ font-size: var(--sapphire-semantic-size-font-label-sm);
202
+ line-height: var(--sapphire-semantic-size-line-height-sm);
203
+ margin-left: calc(
204
+ var(--sapphire-semantic-size-spacing-sm) +
205
+ var(--sapphire-global-size-generic-80)
206
+ );
207
+ }
@@ -1,14 +1,17 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-switch": string;
3
- readonly "sapphire-switch--md": string;
3
+ readonly "sapphire-switch-container": string;
4
4
  readonly "sapphire-switch-input": string;
5
5
  readonly "sapphire-switch-label": string;
6
+ readonly "sapphire-switch--md": string;
6
7
  readonly "js-focus": string;
7
8
  readonly "sapphire-switch-track": string;
8
9
  readonly "is-focus": string;
9
10
  readonly "is-active": string;
10
11
  readonly "js-hover": string;
11
12
  readonly "is-hover": string;
13
+ readonly "sapphire-switch__note": string;
14
+ readonly "sapphire-switch__note--md": string;
12
15
  };
13
16
  export = styles;
14
17
 
@@ -420,15 +420,28 @@ th.sapphire-table__selectionCell:first-child {
420
420
  --sapphire-semantic-color-background-action-highlight
421
421
  );
422
422
  }
423
- .sapphire-table__row--highlighted::after {
423
+
424
+ /* TODO remove tbody in v6 */
425
+ .sapphire-table :has(> .sapphire-table__row--highlighted):not(tbody)::before {
424
426
  content: '';
425
- position: absolute;
426
- z-index: 2;
427
- left: 0;
427
+ position: sticky;
428
+ float: inline-start;
428
429
  height: 100%;
429
430
  width: var(--sapphire-semantic-size-border-md);
431
+ /* counter the shift for the checkbox */
432
+ margin-left: calc(-1 * var(--sapphire-semantic-size-border-md));
433
+ inset-inline-start: 0;
430
434
  background: var(--sapphire-semantic-color-border-accent);
431
435
  pointer-events: none;
436
+ z-index: 2;
437
+ }
438
+
439
+ /* TODO remove in v6 */
440
+ /* Targets non-virtualised tables */
441
+ tbody .sapphire-table__row--highlighted .sapphire-table__selectionCell,
442
+ tbody .sapphire-table__row--highlighted > .sapphire-table__cell:first-child {
443
+ box-shadow: inset var(--sapphire-semantic-size-border-md) 0 0 0
444
+ var(--sapphire-semantic-color-border-accent);
432
445
  }
433
446
 
434
447
  .sapphire-table__tfoot {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "43.0.0",
3
+ "version": "44.0.0",
4
4
  "description": "CSS implementation of the Sapphire Design System from Danske Bank A/S",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "sideEffects": false,
@@ -69,5 +69,5 @@
69
69
  "dependencies": {
70
70
  "@danske/sapphire-design-tokens": "^42.2.1"
71
71
  },
72
- "gitHead": "5447ed85a23a82d6d7339a1617296a648256ea3e"
72
+ "gitHead": "8e444e6b304060b29ba5ba3485086b0eddae52e1"
73
73
  }