@danske/sapphire-css 49.1.0 → 50.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.
@@ -0,0 +1,6 @@
1
+ .sapphire-amount {
2
+ display: inline-flex;
3
+ flex-direction: row;
4
+ align-items: baseline;
5
+ gap: var(--sapphire-semantic-size-spacing-3xs);
6
+ }
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "sapphire-amount": string;
3
+ };
4
+ export = styles;
5
+
@@ -80,6 +80,11 @@
80
80
  flex-grow: 1;
81
81
  }
82
82
 
83
+ .sapphire-button--stretch:not(:has(.sapphire-button__icon)),
84
+ .sapphire-button--stretch-left-align:not(:has(.sapphire-button__icon)) {
85
+ padding: 0 var(--sapphire-semantic-size-spacing-xs);
86
+ }
87
+
83
88
  .sapphire-button--stretch-left-align .sapphire-button__content {
84
89
  text-align: start;
85
90
  }
@@ -3,6 +3,7 @@ declare const styles: {
3
3
  readonly "sapphire-button__content": string;
4
4
  readonly "sapphire-button--stretch": string;
5
5
  readonly "sapphire-button--stretch-left-align": string;
6
+ readonly "sapphire-button__icon": string;
6
7
  readonly "is-disabled": string;
7
8
  readonly "is-focus": string;
8
9
  readonly "js-focus": string;
@@ -21,7 +22,6 @@ declare const styles: {
21
22
  readonly "sapphire-button--danger-text": string;
22
23
  readonly "sapphire-button--selected": string;
23
24
  readonly "sapphire-button--unselected": string;
24
- readonly "sapphire-button__icon": string;
25
25
  readonly "sapphire-button--lg": string;
26
26
  readonly "sapphire-button--sm": string;
27
27
  };
@@ -56,6 +56,10 @@
56
56
  width: auto !important;
57
57
  }
58
58
 
59
+ .sapphire-button-group--stretch.sapphire-button-group--vertical > * {
60
+ width: auto !important;
61
+ }
62
+
59
63
  .sapphire-button-group--stretch.sapphire-button-group--stretch-auto-vertical.sapphire-button-group:has(
60
64
  > *:nth-child(3)
61
65
  ) {
@@ -73,6 +73,7 @@
73
73
  line-height: 0;
74
74
  width: var(--sapphire-semantic-size-icon-md);
75
75
  height: var(--sapphire-semantic-size-icon-md);
76
+ color: var(--sapphire-semantic-color-foreground-secondary);
76
77
  }
77
78
 
78
79
  .sapphire-select--md .sapphire-select__icon-container {
@@ -145,6 +146,12 @@
145
146
  var(--sapphire-semantic-color-border-field-hover);
146
147
  }
147
148
 
149
+ .sapphire-select:not(.is-disabled).is-hover .sapphire-select__icon-container,
150
+ .sapphire-select:not(.is-disabled):not(.js-hover):hover
151
+ .sapphire-select__icon-container {
152
+ color: var(--sapphire-semantic-color-foreground-primary);
153
+ }
154
+
148
155
  /**
149
156
  * Focus
150
157
  */
@@ -162,3 +169,10 @@
162
169
  cursor: not-allowed;
163
170
  opacity: var(--sapphire-semantic-opacity-disabled);
164
171
  }
172
+
173
+ /**
174
+ * Open state
175
+ */
176
+ .sapphire-select--open .sapphire-select__icon-container {
177
+ color: var(--sapphire-semantic-color-foreground-primary);
178
+ }
@@ -13,6 +13,7 @@ declare const styles: {
13
13
  readonly "is-focus": string;
14
14
  readonly "is-hover": string;
15
15
  readonly "js-hover": string;
16
+ readonly "sapphire-select--open": string;
16
17
  };
17
18
  export = styles;
18
19
 
@@ -162,8 +162,7 @@
162
162
  );
163
163
  }
164
164
 
165
- .sapphire-text-field--md
166
- .sapphire-text-field--multiline
165
+ .sapphire-text-field--md.sapphire-text-field--multiline
167
166
  .sapphire-text-field__input {
168
167
  padding: var(--sapphire-semantic-size-spacing-control-vertical-md)
169
168
  var(--sapphire-semantic-size-spacing-control-horizontal-md);
@@ -180,6 +179,15 @@
180
179
  resize: vertical;
181
180
  }
182
181
 
182
+ .sapphire-text-field--multiline.sapphire-text-field--resizable
183
+ .sapphire-text-field__input::-webkit-resizer {
184
+ -webkit-appearance: none;
185
+ 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='M7.81501 0.184985C8.06166 0.431632 8.06166 0.831526 7.81501 1.07817L1.07817 7.81501C0.831526 8.06166 0.431632 8.06166 0.184985 7.81501C-0.0616617 7.56837 -0.0616617 7.16847 0.184985 6.92183L6.92183 0.184985C7.16847 -0.0616617 7.56837 -0.0616617 7.81501 0.184985ZM7.81501 4.39551C8.06166 4.64216 8.06166 5.04205 7.81501 5.2887L5.2887 7.81501C5.04205 8.06166 4.64216 8.06166 4.39551 7.81501C4.14886 7.56837 4.14886 7.16847 4.39551 6.92183L6.92183 4.39551C7.16847 4.14886 7.56837 4.14886 7.81501 4.39551Z' fill='%23002346' fill-opacity='0.64'/%3E%3C/svg%3E");
186
+ background-repeat: no-repeat;
187
+ background-position: right var(--sapphire-semantic-size-spacing-3xs) bottom
188
+ var(--sapphire-semantic-size-spacing-3xs);
189
+ }
190
+
183
191
  .sapphire-text-field__counter {
184
192
  color: var(--sapphire-semantic-color-foreground-secondary);
185
193
  margin-left: auto;
@@ -197,7 +205,8 @@
197
205
  /**
198
206
  * Disabled
199
207
  */
200
- .sapphire-text-field:has([disabled]) {
208
+ .sapphire-text-field:has(input[disabled]),
209
+ .sapphire-text-field:has(textarea[disabled]) {
201
210
  cursor: not-allowed;
202
211
  opacity: var(--sapphire-semantic-opacity-disabled);
203
212
  }
@@ -205,12 +214,14 @@
205
214
  /**
206
215
  * Hover
207
216
  */
208
- .sapphire-text-field:not(:has([disabled])):not(.sapphire-text-field--error):not(
209
- .is-focus
210
- ):not(:focus-within).is-hover,
211
- .sapphire-text-field:not(:has([disabled])):not(.sapphire-text-field--error):not(
212
- .is-focus
213
- ):not(:focus-within):not(.js-hover):hover {
217
+ .sapphire-text-field:not(:has(input[disabled])):not(
218
+ :has(textarea[disabled])
219
+ ):not(.sapphire-text-field--error):not(.is-focus):not(:focus-within).is-hover,
220
+ .sapphire-text-field:not(:has(input[disabled])):not(
221
+ :has(textarea[disabled])
222
+ ):not(.sapphire-text-field--error):not(.is-focus):not(:focus-within):not(
223
+ .js-hover
224
+ ):hover {
214
225
  outline: solid var(--sapphire-semantic-size-border-sm)
215
226
  var(--sapphire-semantic-color-border-field-hover);
216
227
  }
@@ -255,14 +266,14 @@
255
266
  */
256
267
  .sapphire-text-field__stepper {
257
268
  display: flex;
258
- flex-direction: column;
269
+ flex-direction: row;
259
270
  justify-items: stretch;
260
- padding: var(--sapphire-semantic-size-spacing-4xs)
271
+ padding: var(--sapphire-semantic-size-spacing-sm)
261
272
  calc(
262
- var(--sapphire-semantic-size-spacing-4xs) +
273
+ var(--sapphire-semantic-size-spacing-sm) +
263
274
  var(--sapphire-semantic-size-border-sm)
264
275
  );
265
- gap: var(--sapphire-semantic-size-spacing-4xs);
276
+ gap: var(--sapphire-semantic-size-spacing-sm);
266
277
  }
267
278
 
268
279
  .sapphire-text-field:has(.sapphire-text-field__stepper)
@@ -301,24 +312,20 @@
301
312
  cursor: pointer;
302
313
 
303
314
  /* color */
304
- background: var(
305
- --sapphire-semantic-color-background-action-secondary-default
306
- );
307
- color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
315
+ background: none;
316
+ color: var(--sapphire-semantic-color-foreground-secondary);
308
317
  }
309
318
 
310
319
  .sapphire-text-field__stepper-button:not(:active):not(.is-active):not(
311
320
  .js-hover
312
321
  ):hover,
313
322
  .sapphire-text-field__stepper-button:not(:active):not(.is-active).is-hover {
314
- background: var(--sapphire-semantic-color-background-action-secondary-hover);
315
- color: var(--sapphire-semantic-color-foreground-action-on-secondary-hover);
323
+ color: var(--sapphire-semantic-color-foreground-primary);
316
324
  }
317
325
 
318
326
  .sapphire-text-field__stepper-button.is-active,
319
327
  .sapphire-text-field__stepper-button:active {
320
- background: var(--sapphire-semantic-color-background-action-secondary-active);
321
- color: var(--sapphire-semantic-color-foreground-action-on-secondary-active);
328
+ color: var(--sapphire-semantic-color-foreground-primary);
322
329
  }
323
330
 
324
331
  .sapphire-text-field--md.sapphire-text-field__stepper-button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "49.1.0",
3
+ "version": "50.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.3.0"
70
+ "@danske/sapphire-design-tokens": "^42.4.0"
71
71
  },
72
- "gitHead": "88e11202ab17bb9830ba1f261d631ab24edf57d2"
72
+ "gitHead": "6e7cb3028dc134adc624e161700df8cb3bc3bfb7"
73
73
  }