@danske/sapphire-css 43.1.0 → 45.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.
@@ -16,6 +16,24 @@
16
16
  max-width: var(--sapphire-global-size-generic-480);
17
17
  }
18
18
 
19
+ .sapphire-breadcrumbs__item--static {
20
+ /* typography */
21
+ font-family: var(--sapphire-semantic-font-name-default);
22
+ font-weight: var(--sapphire-semantic-font-weight-default-regular);
23
+ font-size: var(--sapphire-semantic-size-font-control-md);
24
+ color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
25
+ text-transform: none;
26
+
27
+ /* sizing */
28
+ padding: 0 var(--sapphire-global-size-generic-50);
29
+ height: var(--sapphire-semantic-size-height-control-md);
30
+ min-width: var(--sapphire-global-size-generic-100);
31
+ max-width: fit-content; /* When part of flex layout the button will otherwise expand to full width of container when container has flex-direction 'column' */
32
+ flex-shrink: 0; /* When part of flex layout the button will otherwise be squashed */
33
+
34
+ align-content: center;
35
+ }
36
+
19
37
  .sapphire-breadcrumbs .sapphire-breadcrumbs__item:last-child {
20
38
  padding: 0 var(--sapphire-semantic-size-spacing-lg);
21
39
  }
@@ -29,6 +47,14 @@
29
47
  );
30
48
  }
31
49
 
50
+ .sapphire-breadcrumbs__item--static--sm {
51
+ height: var(--sapphire-semantic-size-height-control-sm);
52
+ min-width: var(--sapphire-global-size-generic-80);
53
+ padding: 0 var(--sapphire-semantic-size-spacing-md);
54
+ font-size: var(--sapphire-semantic-size-font-control-sm);
55
+ border-radius: var(--sapphire-semantic-size-height-control-sm);
56
+ }
57
+
32
58
  .sapphire-breadcrumbs.sapphire-breadcrumbs--lg
33
59
  .sapphire-breadcrumbs__item:last-child {
34
60
  padding: 0
@@ -38,6 +64,14 @@
38
64
  );
39
65
  }
40
66
 
67
+ .sapphire-breadcrumbs__item--static--lg {
68
+ height: var(--sapphire-semantic-size-height-control-lg);
69
+ min-width: var(--sapphire-global-size-generic-120);
70
+ padding: 0 var(--sapphire-semantic-size-spacing-xl);
71
+ font-size: var(--sapphire-semantic-size-font-control-lg);
72
+ border-radius: var(--sapphire-semantic-size-height-control-lg);
73
+ }
74
+
41
75
  /**
42
76
  * Breadcrumb separator
43
77
  */
@@ -1,8 +1,11 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-breadcrumbs": string;
3
3
  readonly "sapphire-breadcrumbs__item": string;
4
+ readonly "sapphire-breadcrumbs__item--static": string;
4
5
  readonly "sapphire-breadcrumbs--sm": string;
6
+ readonly "sapphire-breadcrumbs__item--static--sm": string;
5
7
  readonly "sapphire-breadcrumbs--lg": string;
8
+ readonly "sapphire-breadcrumbs__item--static--lg": string;
6
9
  readonly "sapphire-breadcrumbs__separator": string;
7
10
  };
8
11
  export = styles;
@@ -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,7 +11,7 @@
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-2xl);
14
+ border-radius: var(--sapphire-semantic-size-radius-md);
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);
@@ -29,7 +29,7 @@
29
29
  */
30
30
  -webkit-font-smoothing: antialiased;
31
31
  -moz-osx-font-smoothing: grayscale;
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
+ --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="6" ry="6" stroke-width="2" stroke-dasharray="5 6.01126518182488" stroke-dashoffset="4" stroke-linecap="butt"/%3e%3c/svg%3e');
33
33
  }
34
34
 
35
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 */
@@ -44,7 +44,7 @@
44
44
  mask: var(--mask-data);
45
45
  -webkit-mask: var(--mask-data);
46
46
  background: var(--sapphire-semantic-color-border-field-default);
47
- border-radius: var(--sapphire-semantic-size-radius-2xl);
47
+ border-radius: var(--sapphire-semantic-size-radius-md);
48
48
  transition-property: opacity, background-color, color;
49
49
  transition-duration: var(--sapphire-semantic-time-fade-quick);
50
50
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
@@ -1,10 +1,7 @@
1
1
  .sapphire-label {
2
- display: flex;
3
- align-items: center;
4
2
  min-height: var(--sapphire-semantic-size-height-control-xs);
5
3
  line-height: var(--sapphire-semantic-size-line-height-md);
6
4
  font-size: var(--sapphire-semantic-size-font-label-md);
7
- gap: var(--sapphire-semantic-size-spacing-3xs);
8
5
  }
9
6
 
10
7
  .sapphire-label--md {
@@ -15,14 +12,22 @@
15
12
  .sapphire-label__text {
16
13
  font-weight: var(--sapphire-semantic-font-weight-default-medium);
17
14
  color: var(--sapphire-semantic-color-foreground-primary);
15
+ vertical-align: middle;
18
16
  }
19
17
 
20
18
  .sapphire-label__required-indicator {
21
19
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.99999 0.583344C4.41421 0.583344 4.74999 0.91913 4.74999 1.33334V3.22127L6.6017 2.62001C6.99567 2.49208 7.41874 2.70775 7.54666 3.10172C7.67459 3.49568 7.45892 3.91876 7.06495 4.04668L5.21363 4.64782L6.3601 6.22585C6.60356 6.56096 6.52927 7.02998 6.19416 7.27345C5.85905 7.51691 5.39002 7.44262 5.14656 7.10751L3.99999 5.52935L2.85343 7.10751C2.60996 7.44262 2.14094 7.51691 1.80583 7.27345C1.47072 7.02998 1.39642 6.56096 1.63989 6.22585L2.78636 4.64782L0.935036 4.04668C0.541071 3.91876 0.325401 3.49568 0.453323 3.10172C0.581246 2.70775 1.00432 2.49208 1.39829 2.62001L3.24999 3.22127V1.33334C3.24999 0.91913 3.58578 0.583344 3.99999 0.583344Z' fill='%23DD3254'/%3E%3C/svg%3E%0A");
22
20
  width: 8px; /* Hard coded, since it's linked to the svg above */
23
21
  height: 8px; /* Hard coded, since it's linked to the svg above */
22
+ margin-left: var(--sapphire-semantic-size-spacing-3xs);
23
+ display: inline-block;
24
24
  }
25
25
 
26
26
  .sapphire-label__optional-indicator {
27
27
  color: var(--sapphire-semantic-color-foreground-secondary);
28
+ margin-left: var(--sapphire-semantic-size-spacing-3xs);
29
+ }
30
+
31
+ .sapphire-label__help-button {
32
+ margin-left: var(--sapphire-semantic-size-spacing-3xs);
28
33
  }
@@ -4,6 +4,7 @@ declare const styles: {
4
4
  readonly "sapphire-label__text": string;
5
5
  readonly "sapphire-label__required-indicator": string;
6
6
  readonly "sapphire-label__optional-indicator": string;
7
+ readonly "sapphire-label__help-button": string;
7
8
  };
8
9
  export = styles;
9
10
 
@@ -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;
@@ -112,7 +112,8 @@
112
112
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
113
113
  }
114
114
 
115
- .sapphire-listbox--selection .sapphire-listbox__content {
115
+ .sapphire-listbox--selection
116
+ .sapphire-listbox__content:not(.sapphire-listbox__content--empty) {
116
117
  /*
117
118
  * In this case, the right-side "checkmark" icon column should always take
118
119
  * space even if the checkmark isn't there. This is to make sure the listbox
@@ -122,6 +123,15 @@
122
123
  grid-template-columns: [left-icon] var(--sapphire-semantic-size-icon-sm) [text-content] 1fr [right-icon] auto;
123
124
  }
124
125
 
126
+ .sapphire-listbox__content--empty {
127
+ grid-template-columns: 1fr;
128
+ justify-items: center;
129
+ cursor: default;
130
+ }
131
+ .sapphire-listbox__item:has(.sapphire-listbox__content--empty) {
132
+ cursor: default;
133
+ }
134
+
125
135
  /* Icon content */
126
136
  .sapphire-listbox__icon {
127
137
  line-height: 0;
@@ -210,6 +220,10 @@
210
220
  );
211
221
  }
212
222
 
223
+ .sapphire-listbox > .sapphire-listbox__separator:first-child {
224
+ display: none;
225
+ }
226
+
213
227
  /* Focus */
214
228
 
215
229
  .sapphire-listbox__item:not(.is-disabled).is-focus .sapphire-listbox__content,
@@ -5,6 +5,7 @@ declare const styles: {
5
5
  readonly "sapphire-listbox__secondary-text": string;
6
6
  readonly "sapphire-listbox__content": string;
7
7
  readonly "sapphire-listbox--selection": string;
8
+ readonly "sapphire-listbox__content--empty": string;
8
9
  readonly "sapphire-listbox__icon": string;
9
10
  readonly "sapphire-listbox__text-container": string;
10
11
  readonly "sapphire-listbox__primary-text": 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;
@@ -1,4 +1,4 @@
1
- /* Progress bar Track styles */
1
+ /* ProgressIndicator Track styles */
2
2
  .sapphire-progress {
3
3
  height: 3px;
4
4
  width: 100%;
@@ -11,7 +11,7 @@
11
11
  display: flex;
12
12
  }
13
13
 
14
- /* Progress bar Progress styles */
14
+ /* ProgressIndicator Progress styles */
15
15
  .sapphire-progress--indicator {
16
16
  height: 100%;
17
17
  background: var(--sapphire-semantic-color-background-progress-fill);
@@ -19,7 +19,7 @@
19
19
  var(--sapphire-semantic-transitions-dynamic);
20
20
  }
21
21
 
22
- /* Progress bar Segmented styles */
22
+ /* ProgressIndicator Segmented styles */
23
23
  .sapphire-progress--segments {
24
24
  position: absolute;
25
25
  width: 100%;
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "43.1.0",
3
+ "version": "45.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": "fcf8d5c8a3962dcc624ffd02cc607673cb91bd96"
72
+ "gitHead": "956d65c795c2bffc1e4cc153c7721e94c35827c9"
73
73
  }