@danske/sapphire-css 42.0.0 → 42.1.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.
@@ -170,7 +170,7 @@ a.sapphire-button {
170
170
  color: var(--sapphire-semantic-color-foreground-action-on-secondary-active);
171
171
  }
172
172
 
173
- /* ## Tertiary (undocumented) */
173
+ /* ## Tertiary */
174
174
  .sapphire-button--tertiary {
175
175
  background: var(--sapphire-semantic-color-background-action-tertiary-default);
176
176
  color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
@@ -215,12 +215,16 @@ a.sapphire-button {
215
215
  .sapphire-button--text:not(:disabled):not(.is-disabled):not(:active):not(
216
216
  .is-active
217
217
  ).is-hover {
218
+ text-decoration: underline;
219
+ text-decoration-thickness: var(--sapphire-semantic-size-border-sm);
218
220
  color: var(--sapphire-semantic-color-foreground-action-link-hover);
219
221
  }
220
222
 
221
223
  .sapphire-button--text:not(:disabled):not(.is-disabled).is-active,
222
224
  .sapphire-button--text:not(:disabled):not(.is-disabled):active,
223
225
  .sapphire-button--text:not(:disabled):not(.is-disabled):focus-visible:active {
226
+ text-decoration: underline;
227
+ text-decoration-thickness: var(--sapphire-semantic-size-border-sm);
224
228
  color: var(--sapphire-semantic-color-foreground-action-link-active);
225
229
  }
226
230
 
@@ -92,17 +92,17 @@
92
92
  }
93
93
 
94
94
  .sapphire-calendar__table--with-week-numbers th:first-child {
95
- padding-right: var(--sapphire-semantic-size-spacing-2xs);
95
+ padding-right: var(--sapphire-semantic-size-spacing-xs);
96
96
  border-right: var(--sapphire-semantic-size-border-sm) solid
97
97
  var(--sapphire-semantic-color-border-secondary);
98
98
  }
99
99
 
100
100
  .sapphire-calendar__table--with-week-numbers th:first-child + td {
101
- padding-left: var(--sapphire-semantic-size-spacing-2xs);
101
+ padding-left: var(--sapphire-semantic-size-spacing-xs);
102
102
  }
103
103
 
104
104
  .sapphire-calendar__table-head-cell {
105
- height: var(--sapphire-semantic-size-height-control-sm);
105
+ height: var(--sapphire-semantic-size-height-control-md);
106
106
  text-align: center;
107
107
  padding: 0;
108
108
  }
@@ -117,12 +117,12 @@
117
117
  position: relative;
118
118
  display: flex;
119
119
  flex-direction: column;
120
- gap: var(--sapphire-semantic-size-spacing-md);
120
+ gap: var(--sapphire-semantic-size-spacing-sm);
121
121
  border-left: var(--sapphire-semantic-size-border-sm) solid
122
122
  var(--sapphire-semantic-color-border-secondary);
123
- margin-left: var(--sapphire-semantic-size-spacing-md);
123
+ margin-left: var(--sapphire-semantic-size-spacing-sm);
124
124
  padding-top: var(--sapphire-semantic-size-spacing-2xs);
125
- padding-left: var(--sapphire-semantic-size-spacing-xl);
125
+ padding-left: var(--sapphire-semantic-size-spacing-lg);
126
126
  padding-right: var(--sapphire-semantic-size-spacing-4xs);
127
127
  }
128
128
 
@@ -160,7 +160,7 @@
160
160
  }
161
161
 
162
162
  .sapphire-calendar__button .sapphire-calendar__button-text {
163
- font-size: var(--sapphire-semantic-size-font-body-sm);
163
+ font-size: var(--sapphire-semantic-size-font-body-md);
164
164
  color: var(--sapphire-semantic-color-foreground-primary);
165
165
  font-weight: var(--sapphire-semantic-font-weight-default-regular);
166
166
  background: var(--sapphire-semantic-color-background-action-tertiary-default);
@@ -176,6 +176,12 @@
176
176
  padding: 0 var(--sapphire-semantic-size-spacing-lg);
177
177
  }
178
178
 
179
+ .sapphire-calendar__table-container--md
180
+ .sapphire-calendar__button
181
+ .sapphire-calendar__button-text {
182
+ font-size: var(--sapphire-semantic-size-font-body-sm);
183
+ }
184
+
179
185
  .sapphire-calendar__header-title {
180
186
  font-weight: var(--sapphire-semantic-font-weight-default-medium);
181
187
  font-size: var(--sapphire-semantic-size-font-body-md);
@@ -33,8 +33,8 @@
33
33
  var(--sapphire-dateField-icon-size);
34
34
 
35
35
  height: var(--sapphire-semantic-size-height-control-lg);
36
- border-radius: var(--sapphire-semantic-size-radius-sm);
37
- padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-lg);
36
+ border-radius: var(--sapphire-semantic-size-radius-md);
37
+ padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
38
38
  border: var(--sapphire-semantic-size-border-sm) solid
39
39
  var(--sapphire-semantic-color-border-field-default);
40
40
  background: var(--sapphire-semantic-color-background-field);
@@ -46,6 +46,10 @@
46
46
  var(--sapphire-dateField-icon-size);
47
47
  }
48
48
 
49
+ .sapphire-date-field--no-calendar {
50
+ padding-left: var(--sapphire-semantic-size-spacing-control-horizontal-lg);
51
+ }
52
+
49
53
  .sapphire-date-field--no-clear-button {
50
54
  grid-template-columns:
51
55
  var(--sapphire-dateField-icon-size)
@@ -56,14 +60,6 @@
56
60
  grid-template-columns: 1fr;
57
61
  }
58
62
 
59
- .sapphire-date-field--md {
60
- --sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-sm);
61
-
62
- height: var(--sapphire-semantic-size-height-control-md);
63
- padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
64
- gap: var(--sapphire-semantic-size-spacing-xs);
65
- }
66
-
67
63
  .sapphire-date-field--range {
68
64
  width: var(--sapphire-global-size-generic-960);
69
65
  }
@@ -74,10 +70,6 @@
74
70
  align-items: center;
75
71
  }
76
72
 
77
- .sapphire-date-field--md .sapphire-date-field__input-group {
78
- gap: var(--sapphire-semantic-size-spacing-4xs);
79
- }
80
-
81
73
  .sapphire-date-field__input {
82
74
  display: flex;
83
75
  align-items: center;
@@ -95,6 +87,22 @@
95
87
  content: '—';
96
88
  }
97
89
 
90
+ /**
91
+ * Medium size
92
+ */
93
+ .sapphire-date-field--md {
94
+ --sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-sm);
95
+
96
+ height: var(--sapphire-semantic-size-height-control-md);
97
+ padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
98
+ gap: var(--sapphire-semantic-size-spacing-xs);
99
+ border-radius: var(--sapphire-semantic-size-radius-sm);
100
+ }
101
+
102
+ .sapphire-date-field--md .sapphire-date-field__input-group {
103
+ gap: var(--sapphire-semantic-size-spacing-4xs);
104
+ }
105
+
98
106
  .sapphire-date-field--md .sapphire-date-field__input {
99
107
  font-size: var(--sapphire-semantic-size-font-control-md);
100
108
  }
@@ -2,11 +2,11 @@ declare const styles: {
2
2
  readonly "sapphire-date-field": string;
3
3
  readonly "sapphire-date-field--no-calendar": string;
4
4
  readonly "sapphire-date-field--no-clear-button": string;
5
- readonly "sapphire-date-field--md": string;
6
5
  readonly "sapphire-date-field--range": string;
7
6
  readonly "sapphire-date-field__input-group": string;
8
7
  readonly "sapphire-date-field__input": string;
9
8
  readonly "sapphire-date-field__range-separator": string;
9
+ readonly "sapphire-date-field--md": string;
10
10
  readonly "sapphire-date-field__segment": string;
11
11
  readonly "is-disabled": string;
12
12
  readonly "is-focus": string;
@@ -1,5 +1,5 @@
1
1
  .sapphire-label {
2
- display: inline-flex;
2
+ display: flex;
3
3
  align-items: center;
4
4
  min-height: var(--sapphire-semantic-size-height-control-xs);
5
5
  line-height: var(--sapphire-semantic-size-line-height-md);
@@ -19,10 +19,11 @@
19
19
  cursor: pointer;
20
20
  border-radius: var(--sapphire-semantic-size-radius-xs);
21
21
 
22
- text-decoration-skip-ink: none;
23
-
24
22
  outline: none;
25
23
  color: var(--sapphire-semantic-color-foreground-action-link-default);
24
+
25
+ text-decoration: underline;
26
+ text-decoration-thickness: var(--sapphire-semantic-size-border-sm);
26
27
  }
27
28
 
28
29
  /* Disabled state for all variants */
@@ -156,10 +156,10 @@ instead of being applied on the list item itself */
156
156
  /*
157
157
  * Hover
158
158
  */
159
- .sapphire-list__item--interactive.is-hover:not(.is-active),
159
+ .sapphire-list__item--interactive.is-hover:not(.is-active):not(:has(.is-hover)),
160
160
  .sapphire-list__item--interactive:not(.js-hover):not(
161
161
  [aria-disabled='true']
162
- ):not(:disabled):not(:active):hover {
162
+ ):not(:disabled):not(:active):not(:has(:hover)):hover {
163
163
  background: var(--sapphire-semantic-color-background-action-tertiary-hover);
164
164
  }
165
165
 
@@ -182,13 +182,12 @@ instead of being applied on the list item itself */
182
182
 
183
183
  /* Active */
184
184
 
185
- .sapphire-list__item--interactive:not(.is-disabled).is-active,
185
+ .sapphire-list__item--interactive:not(.is-disabled).is-active:not(
186
+ :has(.is-active)
187
+ ),
186
188
  .sapphire-list__item--interactive:not([aria-disabled='true']):not(
187
189
  :disabled
188
- ):active,
189
- .sapphire-list__item--interactive:not([aria-disabled='true']):not(
190
- :disabled
191
- ):focus-visible:active {
190
+ ):not(:has(:active)):active {
192
191
  background-color: var(
193
192
  --sapphire-semantic-color-background-action-secondary-hover
194
193
  );
@@ -81,3 +81,36 @@
81
81
  border-top: var(--sapphire-semantic-size-border-sm) solid
82
82
  var(--sapphire-semantic-color-border-secondary);
83
83
  }
84
+
85
+ .sapphire-modal-layout__section {
86
+ margin: 0;
87
+ padding: 0;
88
+ border: none;
89
+ }
90
+
91
+ .sapphire-modal-layout__section-title {
92
+ margin-left: calc(
93
+ var(--sapphire-semantic-size-spacing-container-horizontal-md) * -1
94
+ );
95
+ width: calc(
96
+ 100% + (var(--sapphire-semantic-size-spacing-container-horizontal-md) * 2)
97
+ );
98
+ padding: 0 var(--sapphire-semantic-size-spacing-container-horizontal-md);
99
+ min-height: var(--sapphire-global-size-generic-100);
100
+ background-color: var(--sapphire-semantic-color-background-surface);
101
+ display: flex;
102
+ align-items: center;
103
+ position: sticky;
104
+ top: 0;
105
+ }
106
+
107
+ /*
108
+ * Fix for section semi-transparent background not looking good when scrolled.
109
+ */
110
+ .sapphire-modal-layout__section-title::before {
111
+ content: '';
112
+ background: var(--sapphire-semantic-color-background-neutral-subtle);
113
+ position: absolute;
114
+ inset: 0;
115
+ z-index: -1;
116
+ }
@@ -10,6 +10,8 @@ declare const styles: {
10
10
  readonly "sapphire-modal-layout__subheading": string;
11
11
  readonly "sapphire-modal-layout__body--scrolled": string;
12
12
  readonly "sapphire-modal-layout__body--scrollable": string;
13
+ readonly "sapphire-modal-layout__section": string;
14
+ readonly "sapphire-modal-layout__section-title": string;
13
15
  };
14
16
  export = styles;
15
17
 
@@ -3,7 +3,7 @@
3
3
  height: 3px;
4
4
  width: 100%;
5
5
  overflow: hidden;
6
- background: var(--sapphire-semantic-color-background-accent-subtle);
6
+ background: var(--sapphire-semantic-color-background-progress-track);
7
7
  position: relative;
8
8
  }
9
9
 
@@ -14,7 +14,7 @@
14
14
  /* Progress bar Progress styles */
15
15
  .sapphire-progress--indicator {
16
16
  height: 100%;
17
- background: var(--sapphire-semantic-color-background-accent);
17
+ background: var(--sapphire-semantic-color-background-progress-fill);
18
18
  transition: width var(--sapphire-semantic-time-motion-default)
19
19
  var(--sapphire-semantic-transitions-dynamic);
20
20
  }
@@ -24,7 +24,8 @@
24
24
  height: var(--sapphire-semantic-size-height-control-lg);
25
25
  box-sizing: border-box;
26
26
  cursor: pointer;
27
- padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-lg);
27
+ padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md) 0
28
+ var(--sapphire-semantic-size-spacing-control-horizontal-lg);
28
29
  border: none;
29
30
  background: var(--sapphire-semantic-color-background-field);
30
31
  width: 100%;
@@ -34,11 +35,12 @@
34
35
  font-family: inherit;
35
36
  box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-border-sm)
36
37
  var(--sapphire-semantic-color-border-field-default);
37
- border-radius: var(--sapphire-semantic-size-radius-sm);
38
+ border-radius: var(--sapphire-semantic-size-radius-md);
38
39
  gap: var(--sapphire-semantic-size-spacing-sm);
39
40
  }
40
41
 
41
42
  .sapphire-select--md .sapphire-select__button {
43
+ border-radius: var(--sapphire-semantic-size-radius-sm);
42
44
  height: var(--sapphire-semantic-size-height-control-md);
43
45
  padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
44
46
  gap: var(--sapphire-semantic-size-spacing-xs);
@@ -88,6 +90,11 @@
88
90
  color: var(--sapphire-semantic-color-foreground-secondary);
89
91
  }
90
92
 
93
+ .sapphire-select:not(.sapphire-select--md)
94
+ .sapphire-select__button:has(.sapphire-select__prefix) {
95
+ padding-left: var(--sapphire-semantic-size-spacing-control-horizontal-md);
96
+ }
97
+
91
98
  .sapphire-select--md .sapphire-select__prefix {
92
99
  font-size: var(--sapphire-semantic-size-font-control-md);
93
100
  }
@@ -0,0 +1,64 @@
1
+ .sapphire-slider {
2
+ height: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--sapphire-semantic-size-spacing-xs);
6
+ justify-content: center;
7
+ width: fit-content;
8
+ }
9
+
10
+ .sapphire-slider__track {
11
+ position: relative;
12
+ width: var(--sapphire-semantic-size-width-field);
13
+ height: var(--sapphire-semantic-size-height-control-2xs);
14
+ touch-action: none;
15
+ }
16
+
17
+ .sapphire-slider__track-remaining {
18
+ content: '';
19
+ display: block;
20
+ position: absolute;
21
+ background: var(--sapphire-semantic-color-background-progress-track);
22
+ height: var(--sapphire-global-size-generic-10);
23
+ border-radius: var(--sapphire-semantic-size-radius-sm);
24
+ width: var(--sapphire-semantic-size-width-field);
25
+ top: 50%;
26
+ transform: translateY(-50%);
27
+ }
28
+
29
+ .sapphire-slider__track-fill {
30
+ position: absolute;
31
+ content: '';
32
+ display: block;
33
+ background: var(--sapphire-semantic-color-background-progress-fill);
34
+ height: var(--sapphire-global-size-generic-10);
35
+ border-radius: var(--sapphire-semantic-size-radius-sm);
36
+ width: 100%;
37
+ top: 50%;
38
+ transform: translateY(-50%);
39
+ }
40
+
41
+ .sapphire-slider__thumb {
42
+ position: absolute;
43
+ transform: translate(-50%, -50%);
44
+ top: 50%;
45
+ cursor: grab;
46
+ width: var(--sapphire-semantic-size-height-control-2xs);
47
+ height: var(--sapphire-semantic-size-height-control-2xs);
48
+ border-radius: var(--sapphire-semantic-size-radius-xl);
49
+ background: var(--sapphire-semantic-color-background-progress-fill);
50
+ forced-color-adjust: none;
51
+ }
52
+
53
+ /* focused */
54
+ .sapphire-slider__thumb.is-focus {
55
+ outline: var(--sapphire-semantic-size-focus-ring) solid
56
+ var(--sapphire-semantic-color-focus-ring);
57
+ outline-offset: var(--sapphire-semantic-size-focus-ring);
58
+ }
59
+
60
+ /* disabled */
61
+ .sapphire-slider__track[data-disabled='true'] {
62
+ opacity: var(--sapphire-semantic-opacity-disabled);
63
+ cursor: not-allowed;
64
+ }
@@ -0,0 +1,10 @@
1
+ declare const styles: {
2
+ readonly "sapphire-slider": string;
3
+ readonly "sapphire-slider__track": string;
4
+ readonly "sapphire-slider__track-remaining": string;
5
+ readonly "sapphire-slider__track-fill": string;
6
+ readonly "sapphire-slider__thumb": string;
7
+ readonly "is-focus": string;
8
+ };
9
+ export = styles;
10
+
@@ -61,7 +61,7 @@
61
61
  margin-top: 0px;
62
62
  margin-bottom: 0px;
63
63
  line-height: var(--sapphire-global-size-line-height-sm);
64
- letter-spacing: -1%;
64
+ letter-spacing: -0.01em;
65
65
  }
66
66
 
67
67
  .sapphire-text--heading-2xl {
@@ -6,7 +6,7 @@
6
6
  overflow-x: hidden;
7
7
  display: flex;
8
8
  align-items: center;
9
- border-radius: var(--sapphire-semantic-size-radius-sm);
9
+ border-radius: var(--sapphire-semantic-size-radius-md);
10
10
  cursor: text;
11
11
  color: var(--sapphire-semantic-color-foreground-primary);
12
12
  background: var(--sapphire-semantic-color-background-field);
@@ -29,6 +29,7 @@
29
29
  }
30
30
 
31
31
  .sapphire-text-field--md {
32
+ border-radius: var(--sapphire-semantic-size-radius-sm);
32
33
  height: var(--sapphire-semantic-size-height-control-md);
33
34
  font-size: var(--sapphire-semantic-size-font-control-md);
34
35
  }
@@ -95,7 +96,8 @@
95
96
  color: var(--sapphire-semantic-color-foreground-secondary);
96
97
  flex-shrink: 0;
97
98
  z-index: 1;
98
- margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-lg);
99
+ /* the margin below is "md" on purpose - only when there's a prefix/postfix */
100
+ margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-md);
99
101
  }
100
102
 
101
103
  .sapphire-text-field--md .sapphire-text-field__prefix {
@@ -115,7 +117,8 @@
115
117
  color: var(--sapphire-semantic-color-foreground-secondary);
116
118
  flex-shrink: 0;
117
119
  z-index: 1;
118
- margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-lg);
120
+ /* the margin below is "md" on purpose - only when there's a prefix/postfix */
121
+ margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-md);
119
122
  }
120
123
 
121
124
  .sapphire-text-field--md .sapphire-text-field__postfix {
@@ -224,7 +227,7 @@
224
227
  * or focusing on the list of browser autofilling suggestions.
225
228
  */
226
229
  box-shadow: 0 0 0 var(--sapphire-semantic-size-height-control-lg) inset
227
- var(--sapphire-semantic-color-background-surface) !important;
230
+ var(--sapphire-semantic-color-background-field) !important;
228
231
  }
229
232
 
230
233
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "42.0.0",
3
+ "version": "42.1.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,
@@ -67,7 +67,7 @@
67
67
  "typescript": "~4.6.4"
68
68
  },
69
69
  "dependencies": {
70
- "@danske/sapphire-design-tokens": "^42.1.1"
70
+ "@danske/sapphire-design-tokens": "^42.2.0"
71
71
  },
72
- "gitHead": "afb5a25463f39012c3599e6242c8d308786d11e1"
72
+ "gitHead": "1eefb683b16687ab3fc99c15fffb03a3eca522c5"
73
73
  }