@danske/sapphire-css 26.6.1 → 27.0.1

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.
@@ -28,6 +28,7 @@
28
28
  padding: var(--sapphire-list-spacing-item-vertical-default)
29
29
  var(--sapphire-list-spacing-item-horizontal-default);
30
30
  background-color: var(--sapphire-list-color-background-item-default);
31
+ outline: none;
31
32
  }
32
33
 
33
34
  .sapphire-list__item:has(.sapphire-list__item-content-wrapper) {
@@ -51,7 +52,6 @@
51
52
 
52
53
  /* Counterstyling anything passed as custom content wrapper */
53
54
  text-decoration: none;
54
- cursor: pointer;
55
55
  background-color: inherit;
56
56
  color: inherit;
57
57
  font-family: inherit;
@@ -69,13 +69,11 @@
69
69
  );
70
70
  }
71
71
 
72
+ .sapphire-list__item:disabled .sapphire-list__item-content-wrapper,
73
+ .sapphire-list__item[aria-disabled='true'] .sapphire-list__item-content-wrapper,
72
74
  .sapphire-list__item-content-wrapper:disabled,
73
75
  .sapphire-list__item-content-wrapper[aria-disabled='true'] {
74
76
  cursor: not-allowed;
75
- }
76
-
77
- .sapphire-list__item-content-wrapper:disabled > *,
78
- .sapphire-list__item-content-wrapper[aria-disabled='true'] > * {
79
77
  opacity: var(--sapphire-list-opacity-disabled);
80
78
  }
81
79
 
@@ -118,6 +116,7 @@
118
116
  .sapphire-list
119
117
  .sapphire-list__item-content-wrapper:not(.js-hover):not([aria-disabled='true']):not(:disabled):hover {
120
118
  background-color: var(--sapphire-list-color-background-item-hover);
119
+ cursor: pointer;
121
120
  }
122
121
 
123
122
  /*
@@ -9,8 +9,8 @@
9
9
  align-items: center;
10
10
  border-radius: var(--sapphire-text-field-size-radius);
11
11
  cursor: text;
12
- color: var(--sapphire-text-field-color-content);
13
- background-color: var(--sapphire-text-field-color-background);
12
+ color: var(--sapphire-text-field-color-content-control);
13
+ background-color: var(--sapphire-text-field-color-background-control);
14
14
  height: var(--sapphire-text-field-size-height-field-l);
15
15
  font-family: var(--sapphire-text-field-font-name);
16
16
  font-size: var(--sapphire-text-field-size-font-content-l);
@@ -85,44 +85,56 @@
85
85
  * Prefix/postfix
86
86
  */
87
87
 
88
- .sapphire-text-field .sapphire-text-field__affix {
88
+ .sapphire-text-field:has(.sapphire-text-field__prefix)
89
+ .sapphire-text-field__input {
90
+ padding-left: 0;
91
+ }
92
+
93
+ .sapphire-text-field .sapphire-text-field__prefix {
89
94
  color: var(--sapphire-text-field-color-affix);
90
95
  flex-shrink: 0;
91
96
  z-index: 1;
97
+ margin-left: var(--sapphire-text-field-size-spacing-control-horizontal-l);
92
98
  }
93
99
 
94
- .sapphire-text-field .sapphire-text-field__affix--icon {
95
- width: var(--sapphire-text-field-size-affix-icon-width-l);
96
- height: var(--sapphire-text-field-size-affix-icon-height-l);
100
+ .sapphire-text-field--medium .sapphire-text-field__prefix {
101
+ margin-left: var(--sapphire-text-field-size-spacing-control-horizontal-m);
97
102
  }
98
103
 
99
- .sapphire-text-field--medium .sapphire-text-field__affix--icon {
100
- width: var(--sapphire-text-field-size-affix-icon-width-m);
101
- height: var(--sapphire-text-field-size-affix-icon-height-m);
102
- }
104
+ /**
105
+ * Postfix
106
+ */
103
107
 
104
- .sapphire-text-field--with-prefix {
105
- padding-left: var(--sapphire-text-field-size-spacing-control-horizontal-l);
108
+ .sapphire-text-field:has(.sapphire-text-field__postfix)
109
+ .sapphire-text-field__input {
110
+ padding-right: 0;
106
111
  }
107
112
 
108
- .sapphire-text-field--medium .sapphire-text-field--with-prefix {
109
- padding-left: var(--sapphire-text-field-size-spacing-control-horizontal-m);
113
+ .sapphire-text-field .sapphire-text-field__postfix {
114
+ color: var(--sapphire-text-field-color-affix);
115
+ flex-shrink: 0;
116
+ z-index: 1;
117
+ margin-right: var(--sapphire-text-field-size-spacing-control-horizontal-l);
110
118
  }
111
119
 
112
- .sapphire-text-field--with-prefix .sapphire-text-field__input {
113
- padding-left: 0;
120
+ .sapphire-text-field--medium .sapphire-text-field__postfix {
121
+ margin-right: var(--sapphire-text-field-size-spacing-control-horizontal-m);
114
122
  }
115
123
 
116
- .sapphire-text-field--with-postfix {
117
- padding-right: var(--sapphire-text-field-size-spacing-control-horizontal-l);
118
- }
124
+ /**
125
+ * Prefix/postfix icon
126
+ */
119
127
 
120
- .sapphire-text-field--medium .sapphire-text-field--with-postfix {
121
- padding-right: var(--sapphire-text-field-size-spacing-control-horizontal-m);
128
+ .sapphire-text-field .sapphire-text-field__prefix--icon,
129
+ .sapphire-text-field .sapphire-text-field__postfix--icon {
130
+ width: var(--sapphire-text-field-size-affix-icon-width-l);
131
+ height: var(--sapphire-text-field-size-affix-icon-height-l);
122
132
  }
123
133
 
124
- .sapphire-text-field--with-postfix .sapphire-text-field__input {
125
- padding-right: 0;
134
+ .sapphire-text-field--medium .sapphire-text-field__prefix--icon,
135
+ .sapphire-text-field--medium .sapphire-text-field__postfix--icon {
136
+ width: var(--sapphire-text-field-size-affix-icon-width-m);
137
+ height: var(--sapphire-text-field-size-affix-icon-height-m);
126
138
  }
127
139
 
128
140
  /**
@@ -199,5 +211,78 @@
199
211
  * or focusing on the list of browser autofilling suggestions.
200
212
  */
201
213
  box-shadow: 0 0 0 var(--sapphire-text-field-size-height-field-l) inset
202
- var(--sapphire-text-field-color-background) !important;
214
+ var(--sapphire-text-field-color-background-control) !important;
215
+ }
216
+
217
+ /**
218
+ * Stepper
219
+ *
220
+ * This is used in some numeric inputs
221
+ */
222
+ .sapphire-text-field__stepper {
223
+ display: flex;
224
+ flex-direction: column;
225
+ justify-items: stretch;
226
+ padding: var(--sapphire-text-field-size-spacing-control-stepper)
227
+ calc(
228
+ var(--sapphire-text-field-size-spacing-control-stepper) +
229
+ var(--sapphire-text-field-size-width-border)
230
+ );
231
+ gap: var(--sapphire-text-field-size-spacing-control-stepper);
232
+ }
233
+
234
+ .sapphire-text-field:has(.sapphire-text-field__stepper)
235
+ .sapphire-text-field__postfix {
236
+ margin-right: 0;
237
+ }
238
+
239
+ .sapphire-text-field__stepper-button {
240
+ display: flex;
241
+ align-items: center;
242
+ justify-content: center;
243
+ width: var(--sapphire-text-field-size-width-stepper-l);
244
+
245
+ /* In Safari buttons get a 2px border
246
+ * https://github.com/necolas/normalize.css/blob/master/normalize.css#L160-L169
247
+ */
248
+ margin: 0;
249
+ padding: 0;
250
+
251
+ 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' */
252
+ flex-shrink: 0; /* When part of flex layout the button will otherwise be squashed */
253
+
254
+ /* shape */
255
+ border-radius: var(
256
+ --sapphire-text-field-size-radius
257
+ ); /* same as the control */
258
+ border-style: solid;
259
+ border-width: 0;
260
+ border-color: transparent;
261
+
262
+ /* transition */
263
+ /* we don't want to transition outline-offset */
264
+ transition-property: opacity, background-color, color;
265
+ transition-duration: var(--sapphire-text-field-time-transition);
266
+ transition-timing-function: ease-in-out;
267
+ cursor: pointer;
268
+
269
+ /* color */
270
+ background-color: var(--sapphire-text-field-color-background-stepper-default);
271
+ color: var(--sapphire-text-field-color-content-stepper-default);
272
+ }
273
+
274
+ .sapphire-text-field__stepper-button:not(:active):not(.is-active):not(.js-hover):hover,
275
+ .sapphire-text-field__stepper-button:not(:active):not(.is-active).is-hover {
276
+ background-color: var(--sapphire-text-field-color-background-stepper-hover);
277
+ color: var(--sapphire-text-field-color-content-stepper-hover);
278
+ }
279
+
280
+ .sapphire-text-field__stepper-button.is-active,
281
+ .sapphire-text-field__stepper-button:active {
282
+ background-color: var(--sapphire-text-field-color-background-stepper-active);
283
+ color: var(--sapphire-text-field-color-content-stepper-active);
284
+ }
285
+
286
+ .sapphire-text-field--medium.sapphire-text-field__stepper-button {
287
+ width: var(--sapphire-text-field-size-width-stepper-m);
203
288
  }
@@ -4,15 +4,20 @@ declare const styles: {
4
4
  readonly "sapphire-text-field__input": string;
5
5
  readonly "sapphire-text-field__input--align-right": string;
6
6
  readonly "sapphire-text-field--multiline": string;
7
- readonly "sapphire-text-field__affix": string;
8
- readonly "sapphire-text-field__affix--icon": string;
9
- readonly "sapphire-text-field--with-prefix": string;
10
- readonly "sapphire-text-field--with-postfix": string;
7
+ readonly "sapphire-text-field__prefix": string;
8
+ readonly "sapphire-text-field__postfix": string;
9
+ readonly "sapphire-text-field__prefix--icon": string;
10
+ readonly "sapphire-text-field__postfix--icon": string;
11
11
  readonly "sapphire-text-field--resizable": string;
12
12
  readonly "sapphire-text-field__counter": string;
13
13
  readonly "sapphire-text-field__counter--error": string;
14
14
  readonly "sapphire-text-field--error": string;
15
15
  readonly "is-focus": string;
16
+ readonly "sapphire-text-field__stepper": string;
17
+ readonly "sapphire-text-field__stepper-button": string;
18
+ readonly "is-active": string;
19
+ readonly "js-hover": string;
20
+ readonly "is-hover": string;
16
21
  };
17
22
  export = styles;
18
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "26.6.1",
3
+ "version": "27.0.1",
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,
@@ -66,7 +66,7 @@
66
66
  "typescript": "~4.6.4"
67
67
  },
68
68
  "dependencies": {
69
- "@danske/sapphire-design-tokens": "^36.1.0"
69
+ "@danske/sapphire-design-tokens": "^37.0.0"
70
70
  },
71
- "gitHead": "18d399194b252d505e09222e08996991f1a9d68a"
71
+ "gitHead": "ed8a61f0521fe4e7601d6b962e677cd9e151a401"
72
72
  }