@danske/sapphire-css 39.0.1 → 40.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.
- package/build/themes/cjs/default-dark.js +1 -0
- package/build/themes/cjs/default.js +1 -0
- package/build/themes/cjs/index.d.ts +1 -0
- package/build/themes/esm/default-dark.js +1 -0
- package/build/themes/esm/default.js +1 -0
- package/build/themes/esm/index.d.ts +1 -0
- package/components/accordion/accordion.module.css +26 -26
- package/components/avatar/avatar.module.css +55 -78
- package/components/avatar/avatar.module.css.d.ts +16 -21
- package/components/backdrop/backdrop.module.css +5 -5
- package/components/badge/badge.module.css +76 -324
- package/components/badge/badge.module.css.d.ts +16 -34
- package/components/button/button.module.css +180 -263
- package/components/button/button.module.css.d.ts +4 -8
- package/components/buttonGroup/buttonGroup.module.css +39 -13
- package/components/calendar/calendar.module.css +64 -125
- package/components/calendar/calendar.module.css.d.ts +0 -7
- package/components/checkbox/checkbox.module.css +102 -69
- package/components/checkbox/checkbox.module.css.d.ts +1 -1
- package/components/contextualHelp/contextualHelp.module.css +7 -7
- package/components/dateField/dateField.module.css +42 -29
- package/components/dateField/dateField.module.css.d.ts +3 -2
- package/components/dialog/dialog.module.css +3 -3
- package/components/dropzone/dropzone.module.css +19 -21
- package/components/feedbackMessage/feedbackMessage.module.css +2 -40
- package/components/feedbackMessage/feedbackMessage.module.css.d.ts +0 -6
- package/components/field/field.module.css +22 -13
- package/components/field/field.module.css.d.ts +2 -2
- package/components/fieldGroup/fieldGroup.module.css +3 -3
- package/components/filterDropdown/filterDropdown.module.css +1 -1
- package/components/flag/flag.module.css +6 -6
- package/components/icon/icon.module.css +31 -4
- package/components/icon/icon.module.css.d.ts +6 -0
- package/components/iconButton/iconButton.module.css +237 -189
- package/components/iconButton/iconButton.module.css.d.ts +2 -3
- package/components/label/label.module.css +4 -5
- package/components/link/link.module.css +24 -54
- package/components/link/link.module.css.d.ts +1 -4
- package/components/list/list.module.css +20 -33
- package/components/listbox/listbox.module.css +109 -131
- package/components/listbox/listbox.module.css.d.ts +2 -4
- package/components/modalLayout/modalLayout.module.css +11 -12
- package/components/notificationBadge/notificationBadge.module.css +18 -15
- package/components/pagination/pagination.module.css +9 -9
- package/components/panel/panel.module.css +3 -1
- package/components/popover/popover.module.css +3 -2
- package/components/radio/radio.module.css +32 -9
- package/components/searchField/searchField.module.css +24 -25
- package/components/segmentedControl/segmentedControl.module.css +15 -17
- package/components/select/select.module.css +34 -18
- package/components/select/select.module.css.d.ts +2 -0
- package/components/skeleton/skeleton.module.css +5 -2
- package/components/spinner/spinner.module.css +3 -3
- package/components/surface/surface.module.css +2 -2
- package/components/switch/switch.module.css +49 -46
- package/components/switch/switch.module.css.d.ts +2 -2
- package/components/table/table.module.css +164 -136
- package/components/table/table.module.css.d.ts +5 -6
- package/components/tabs/tabs.module.css +24 -20
- package/components/tag/tag.module.css +16 -30
- package/components/tag/tag.module.css.d.ts +1 -1
- package/components/text/text.module.css +69 -82
- package/components/text/text.module.css.d.ts +19 -14
- package/components/textField/textField.module.css +45 -35
- package/components/textField/textField.module.css.d.ts +2 -2
- package/components/toast/toast.module.css +33 -153
- package/components/toast/toast.module.css.d.ts +2 -6
- package/components/tooltip/tooltip.module.css +7 -6
- package/package.json +4 -4
- package/themes/default-dark.js +1 -0
- package/themes/default.js +1 -0
- package/themes/index.d.ts +1 -0
- package/components/heading/heading.module.css +0 -95
- package/components/heading/heading.module.css.d.ts +0 -12
- package/components/labeledValue/labeledValue.module.css +0 -10
- package/components/labeledValue/labeledValue.module.css.d.ts +0 -7
- package/components/paragraph/paragraph.module.css +0 -32
- package/components/paragraph/paragraph.module.css.d.ts +0 -7
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
10
10
|
cursor: text;
|
|
11
|
-
color: var(--sapphire-semantic-color-
|
|
12
|
-
background
|
|
13
|
-
height: var(--sapphire-semantic-size-height-
|
|
11
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
12
|
+
background: var(--sapphire-semantic-color-background-field);
|
|
13
|
+
height: var(--sapphire-semantic-size-height-control-lg);
|
|
14
14
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
15
|
-
font-size: var(--sapphire-semantic-size-font-control-
|
|
15
|
+
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
16
16
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
17
17
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
18
18
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.sapphire-text-field--md {
|
|
32
|
-
height: var(--sapphire-semantic-size-height-
|
|
32
|
+
height: var(--sapphire-semantic-size-height-control-md);
|
|
33
33
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
font-size: inherit;
|
|
46
46
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
47
47
|
|
|
48
|
-
caret-color: var(--sapphire-semantic-color-cursor-default);
|
|
49
48
|
color: inherit;
|
|
50
49
|
|
|
51
|
-
background
|
|
50
|
+
background: transparent;
|
|
52
51
|
border: none;
|
|
53
52
|
outline: none;
|
|
54
53
|
}
|
|
@@ -62,7 +61,7 @@
|
|
|
62
61
|
*/
|
|
63
62
|
.sapphire-text-field__input::placeholder {
|
|
64
63
|
opacity: 1; /* some browsers set a lower than 1 opacity */
|
|
65
|
-
color: var(--sapphire-semantic-color-
|
|
64
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
/**
|
|
@@ -77,7 +76,10 @@
|
|
|
77
76
|
* (this supports a prefix/postfix)
|
|
78
77
|
*/
|
|
79
78
|
.sapphire-text-field:not(.sapphire-text-field--multiline) {
|
|
80
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
79
|
+
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
80
|
+
}
|
|
81
|
+
.sapphire-text-field--md:not(.sapphire-text-field--multiline) {
|
|
82
|
+
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
/**
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
.sapphire-text-field .sapphire-text-field__prefix {
|
|
93
|
-
color: var(--sapphire-semantic-color-
|
|
95
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
94
96
|
flex-shrink: 0;
|
|
95
97
|
z-index: 1;
|
|
96
98
|
margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-lg);
|
|
@@ -110,7 +112,7 @@
|
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
.sapphire-text-field .sapphire-text-field__postfix {
|
|
113
|
-
color: var(--sapphire-semantic-color-
|
|
115
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
114
116
|
flex-shrink: 0;
|
|
115
117
|
z-index: 1;
|
|
116
118
|
margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-lg);
|
|
@@ -126,14 +128,14 @@
|
|
|
126
128
|
|
|
127
129
|
.sapphire-text-field .sapphire-text-field__prefix--icon,
|
|
128
130
|
.sapphire-text-field .sapphire-text-field__postfix--icon {
|
|
129
|
-
width: var(--sapphire-semantic-size-icon-
|
|
130
|
-
height: var(--sapphire-semantic-size-icon-
|
|
131
|
+
width: var(--sapphire-semantic-size-icon-md);
|
|
132
|
+
height: var(--sapphire-semantic-size-icon-md);
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
.sapphire-text-field--md .sapphire-text-field__prefix--icon,
|
|
134
136
|
.sapphire-text-field--md .sapphire-text-field__postfix--icon {
|
|
135
|
-
width: var(--sapphire-semantic-size-icon-
|
|
136
|
-
height: var(--sapphire-semantic-size-icon-
|
|
137
|
+
width: var(--sapphire-semantic-size-icon-sm);
|
|
138
|
+
height: var(--sapphire-semantic-size-icon-sm);
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
/**
|
|
@@ -176,18 +178,30 @@
|
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
.sapphire-text-field__counter {
|
|
179
|
-
color: var(--sapphire-semantic-color-
|
|
180
|
-
padding-left: var(--sapphire-semantic-size-spacing-20);
|
|
181
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
181
182
|
margin-left: auto;
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
.sapphire-text-field__counter--error {
|
|
185
|
-
color: var(--sapphire-semantic-color-
|
|
186
|
+
color: var(--sapphire-semantic-color-foreground-negative);
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
.sapphire-text-field--error {
|
|
189
190
|
outline: solid var(--sapphire-semantic-size-border-sm)
|
|
190
|
-
var(--sapphire-semantic-color-border-
|
|
191
|
+
var(--sapphire-semantic-color-border-negative-default);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Hover
|
|
196
|
+
*/
|
|
197
|
+
.sapphire-text-field:not(:has([disabled])):not(.sapphire-text-field--error):not(
|
|
198
|
+
.is-focus
|
|
199
|
+
):not(:focus-within).is-hover,
|
|
200
|
+
.sapphire-text-field:not(:has([disabled])):not(.sapphire-text-field--error):not(
|
|
201
|
+
.is-focus
|
|
202
|
+
):not(:focus-within):not(.js-hover):hover {
|
|
203
|
+
outline: solid var(--sapphire-semantic-size-border-sm)
|
|
204
|
+
var(--sapphire-semantic-color-border-field-hover);
|
|
191
205
|
}
|
|
192
206
|
|
|
193
207
|
/**
|
|
@@ -209,7 +223,7 @@
|
|
|
209
223
|
* Fixes the state when the field is focused and the user is hovering
|
|
210
224
|
* or focusing on the list of browser autofilling suggestions.
|
|
211
225
|
*/
|
|
212
|
-
box-shadow: 0 0 0 var(--sapphire-semantic-size-height-
|
|
226
|
+
box-shadow: 0 0 0 var(--sapphire-semantic-size-height-control-lg) inset
|
|
213
227
|
var(--sapphire-semantic-color-background-surface) !important;
|
|
214
228
|
}
|
|
215
229
|
|
|
@@ -222,12 +236,12 @@
|
|
|
222
236
|
display: flex;
|
|
223
237
|
flex-direction: column;
|
|
224
238
|
justify-items: stretch;
|
|
225
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
239
|
+
padding: var(--sapphire-semantic-size-spacing-4xs)
|
|
226
240
|
calc(
|
|
227
|
-
var(--sapphire-semantic-size-spacing-
|
|
241
|
+
var(--sapphire-semantic-size-spacing-4xs) +
|
|
228
242
|
var(--sapphire-semantic-size-border-sm)
|
|
229
243
|
);
|
|
230
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
244
|
+
gap: var(--sapphire-semantic-size-spacing-4xs);
|
|
231
245
|
}
|
|
232
246
|
|
|
233
247
|
.sapphire-text-field:has(.sapphire-text-field__stepper)
|
|
@@ -262,32 +276,28 @@
|
|
|
262
276
|
/* we don't want to transition outline-offset */
|
|
263
277
|
transition-property: opacity, background-color, color;
|
|
264
278
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
265
|
-
transition-timing-function:
|
|
279
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
266
280
|
cursor: pointer;
|
|
267
281
|
|
|
268
282
|
/* color */
|
|
269
|
-
background
|
|
270
|
-
--sapphire-semantic-color-background-action-
|
|
283
|
+
background: var(
|
|
284
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
271
285
|
);
|
|
272
|
-
color: var(--sapphire-semantic-color-
|
|
286
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
|
|
273
287
|
}
|
|
274
288
|
|
|
275
289
|
.sapphire-text-field__stepper-button:not(:active):not(.is-active):not(
|
|
276
290
|
.js-hover
|
|
277
291
|
):hover,
|
|
278
292
|
.sapphire-text-field__stepper-button:not(:active):not(.is-active).is-hover {
|
|
279
|
-
background
|
|
280
|
-
|
|
281
|
-
);
|
|
282
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-hover);
|
|
293
|
+
background: var(--sapphire-semantic-color-background-action-secondary-hover);
|
|
294
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-hover);
|
|
283
295
|
}
|
|
284
296
|
|
|
285
297
|
.sapphire-text-field__stepper-button.is-active,
|
|
286
298
|
.sapphire-text-field__stepper-button:active {
|
|
287
|
-
background
|
|
288
|
-
|
|
289
|
-
);
|
|
290
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
299
|
+
background: var(--sapphire-semantic-color-background-action-secondary-active);
|
|
300
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-active);
|
|
291
301
|
}
|
|
292
302
|
|
|
293
303
|
.sapphire-text-field--md.sapphire-text-field__stepper-button {
|
|
@@ -13,11 +13,11 @@ declare const styles: {
|
|
|
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 "is-hover": string;
|
|
17
|
+
readonly "js-hover": string;
|
|
16
18
|
readonly "sapphire-text-field__stepper": string;
|
|
17
19
|
readonly "sapphire-text-field__stepper-button": string;
|
|
18
20
|
readonly "is-active": string;
|
|
19
|
-
readonly "js-hover": string;
|
|
20
|
-
readonly "is-hover": string;
|
|
21
21
|
};
|
|
22
22
|
export = styles;
|
|
23
23
|
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
--sapphire-toast-horizontal-transform: -50%;
|
|
37
37
|
bottom: 0;
|
|
38
38
|
left: 50%;
|
|
39
|
-
margin-bottom: var(--sapphire-semantic-size-spacing-
|
|
39
|
+
margin-bottom: var(--sapphire-semantic-size-spacing-md);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.sapphire-toast-container--bottom-left {
|
|
43
43
|
--sapphire-toast-horizontal-transform: 0%;
|
|
44
44
|
bottom: 0;
|
|
45
45
|
left: 0;
|
|
46
|
-
margin-bottom: var(--sapphire-semantic-size-spacing-
|
|
47
|
-
margin-left: var(--sapphire-semantic-size-spacing-
|
|
46
|
+
margin-bottom: var(--sapphire-semantic-size-spacing-md);
|
|
47
|
+
margin-left: var(--sapphire-semantic-size-spacing-md);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.sapphire-toast-container--bottom-right {
|
|
51
51
|
--sapphire-toast-horizontal-transform: 0%;
|
|
52
52
|
bottom: 0;
|
|
53
53
|
right: 0;
|
|
54
|
-
margin-bottom: var(--sapphire-semantic-size-spacing-
|
|
55
|
-
margin-right: var(--sapphire-semantic-size-spacing-
|
|
54
|
+
margin-bottom: var(--sapphire-semantic-size-spacing-md);
|
|
55
|
+
margin-right: var(--sapphire-semantic-size-spacing-md);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.sapphire-toast-container--top {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
--sapphire-toast-horizontal-transform: -50%;
|
|
61
61
|
top: 0;
|
|
62
62
|
left: 50%;
|
|
63
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
63
|
+
margin-top: var(--sapphire-semantic-size-spacing-md);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.sapphire-toast-container--top-left {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
--sapphire-toast-horizontal-transform: 0%;
|
|
69
69
|
top: 0;
|
|
70
70
|
left: 0;
|
|
71
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
72
|
-
margin-left: var(--sapphire-semantic-size-spacing-
|
|
71
|
+
margin-top: var(--sapphire-semantic-size-spacing-md);
|
|
72
|
+
margin-left: var(--sapphire-semantic-size-spacing-md);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.sapphire-toast-container--top-right {
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
--sapphire-toast-horizontal-transform: 0%;
|
|
78
78
|
top: 0;
|
|
79
79
|
right: 0;
|
|
80
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
81
|
-
margin-right: var(--sapphire-semantic-size-spacing-
|
|
80
|
+
margin-top: var(--sapphire-semantic-size-spacing-md);
|
|
81
|
+
margin-right: var(--sapphire-semantic-size-spacing-md);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/************************************************************/
|
|
@@ -96,12 +96,10 @@
|
|
|
96
96
|
overflow: hidden;
|
|
97
97
|
max-width: var(--sapphire-global-size-generic-1400);
|
|
98
98
|
min-width: var(--sapphire-global-size-generic-750);
|
|
99
|
-
|
|
100
|
-
border-radius: var(--sapphire-semantic-size-radius-popover);
|
|
99
|
+
border-radius: var(--sapphire-semantic-size-radius-lg);
|
|
101
100
|
animation-duration: var(--sapphire-semantic-time-motion-default);
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
102
|
+
animation-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
105
103
|
|
|
106
104
|
/* if implemented as focusable, we don't want the outline because this is not
|
|
107
105
|
* an an interactive element in itself */
|
|
@@ -142,160 +140,42 @@
|
|
|
142
140
|
|
|
143
141
|
.sapphire-toast__content {
|
|
144
142
|
display: flex;
|
|
145
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
146
|
-
align-items: center;
|
|
143
|
+
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
144
|
+
/* align-items: center; */
|
|
147
145
|
justify-content: space-between;
|
|
148
146
|
|
|
149
147
|
overflow-wrap: anywhere;
|
|
150
|
-
background
|
|
151
|
-
color: var(--sapphire-semantic-color-
|
|
148
|
+
background: var(--sapphire-semantic-color-background-surface);
|
|
149
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
152
150
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
153
|
-
font-size: var(--sapphire-
|
|
154
|
-
font-weight: var(--sapphire-semantic-font-weight-default-
|
|
151
|
+
font-size: var(--sapphire-semantic-size-font-body-sm);
|
|
152
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
155
153
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
156
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
157
|
-
var(--sapphire-semantic-size-spacing-40);
|
|
158
|
-
padding-right: var(--sapphire-semantic-size-spacing-20);
|
|
154
|
+
padding: var(--sapphire-semantic-size-spacing-sm);
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
.sapphire-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.sapphire-toast__title--with-icon {
|
|
157
|
+
.sapphire-toast__text-content {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
168
160
|
flex: 1;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Close Button
|
|
173
|
-
*
|
|
174
|
-
* This is a special button, not matching any of our existing buttons or icon
|
|
175
|
-
* buttons and these are only meant to be used in the toast component.
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
.sapphire-toast__close-button {
|
|
179
|
-
box-sizing: border-box;
|
|
180
|
-
display: inline-flex;
|
|
181
|
-
align-items: center;
|
|
182
161
|
justify-content: center;
|
|
183
|
-
|
|
184
|
-
white-space: nowrap;
|
|
185
|
-
|
|
186
|
-
/* In Safari buttons get a 2px border
|
|
187
|
-
* https://github.com/necolas/normalize.css/blob/master/normalize.css#L160-L169
|
|
188
|
-
*/
|
|
189
|
-
margin: 0;
|
|
190
|
-
padding: 0;
|
|
191
|
-
|
|
192
|
-
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
193
|
-
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
194
|
-
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
195
|
-
* can happen in other contexts as well.
|
|
196
|
-
*
|
|
197
|
-
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
198
|
-
*
|
|
199
|
-
* For more details see:
|
|
200
|
-
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
201
|
-
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
202
|
-
*/
|
|
203
|
-
-webkit-font-smoothing: antialiased;
|
|
204
|
-
-moz-osx-font-smoothing: grayscale;
|
|
205
|
-
|
|
206
|
-
/* sizing */
|
|
207
|
-
height: var(--sapphire-semantic-size-height-control-sm);
|
|
208
|
-
width: var(--sapphire-semantic-size-height-control-sm);
|
|
209
|
-
flex-shrink: 0; /* When part of flex layout the button will otherwise be squashed */
|
|
210
|
-
|
|
211
|
-
/* shape */
|
|
212
|
-
border-radius: var(--sapphire-semantic-size-height-control-sm);
|
|
213
|
-
border-style: solid;
|
|
214
|
-
border-width: 0;
|
|
215
|
-
border-color: transparent;
|
|
216
|
-
|
|
217
|
-
/* transition */
|
|
218
|
-
/* we don't want to transition outline-offset */
|
|
219
|
-
transition-property: opacity, background-color, color;
|
|
220
|
-
animation-duration: var(--sapphire-semantic-time-motion-default);
|
|
221
|
-
transition-timing-function: ease-in-out;
|
|
222
|
-
cursor: pointer;
|
|
223
|
-
|
|
224
|
-
background-color: var(
|
|
225
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-default
|
|
226
|
-
);
|
|
227
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-default);
|
|
162
|
+
padding: var(--sapphire-semantic-size-spacing-2xs);
|
|
228
163
|
}
|
|
229
164
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
*/
|
|
233
|
-
.sapphire-toast__close-button:not(:disabled):not(:active):not(.is-active):not(
|
|
234
|
-
.js-hover
|
|
235
|
-
):hover,
|
|
236
|
-
.sapphire-toast__close-button:not(:disabled):not(:active):not(
|
|
237
|
-
.is-active
|
|
238
|
-
).is-hover {
|
|
239
|
-
background-color: var(
|
|
240
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-hover
|
|
241
|
-
);
|
|
242
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-default);
|
|
165
|
+
.sapphire-toast__text-content > :nth-child(1 of :not(:only-child)) {
|
|
166
|
+
font-weight: var(--sapphire-semantic-font-weight-default-medium);
|
|
243
167
|
}
|
|
244
168
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
.sapphire-toast__close-button:focus {
|
|
249
|
-
outline: none;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.sapphire-toast__close-button.is-focus,
|
|
253
|
-
.sapphire-toast__close-button:not(.js-focus):focus-visible {
|
|
254
|
-
background-color: var(
|
|
255
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-default
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Active (button)
|
|
261
|
-
*/
|
|
262
|
-
.sapphire-toast__close-button:not(:disabled).is-active,
|
|
263
|
-
.sapphire-toast__close-button:not(:disabled):active,
|
|
264
|
-
.sapphire-toast__close-button:not(:disabled):focus-visible:active {
|
|
265
|
-
background-color: var(
|
|
266
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-active
|
|
267
|
-
);
|
|
268
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
169
|
+
.sapphire-toast__content--success {
|
|
170
|
+
background: var(--sapphire-semantic-color-background-positive);
|
|
171
|
+
color: var(--sapphire-semantic-color-foreground-on-positive);
|
|
269
172
|
}
|
|
270
173
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Hover (button)
|
|
277
|
-
*/
|
|
278
|
-
.sapphire-toast__content--success
|
|
279
|
-
.sapphire-toast__close-button:not(:disabled):not(:active):not(.is-active):not(
|
|
280
|
-
.js-hover
|
|
281
|
-
):hover,
|
|
282
|
-
.sapphire-toast__content--success
|
|
283
|
-
.sapphire-toast__close-button:not(:disabled):not(:active):not(
|
|
284
|
-
.is-active
|
|
285
|
-
).is-hover {
|
|
286
|
-
background-color: var(--sapphire-global-color-green-400);
|
|
287
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-hover);
|
|
174
|
+
.sapphire-toast__content--error {
|
|
175
|
+
background: var(--sapphire-semantic-color-background-negative);
|
|
176
|
+
color: var(--sapphire-semantic-color-foreground-on-negative);
|
|
288
177
|
}
|
|
289
178
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
*/
|
|
293
|
-
.sapphire-toast__content--success
|
|
294
|
-
.sapphire-toast__close-button:not(:disabled).is-active,
|
|
295
|
-
.sapphire-toast__content--success
|
|
296
|
-
.sapphire-toast__close-button:not(:disabled):active,
|
|
297
|
-
.sapphire-toast__content--success
|
|
298
|
-
.sapphire-toast__close-button:not(:disabled):focus-visible:active {
|
|
299
|
-
background-color: var(--sapphire-global-color-green-300);
|
|
300
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
179
|
+
.sapphire-toast__title--with-icon {
|
|
180
|
+
flex: 1;
|
|
301
181
|
}
|
|
@@ -13,14 +13,10 @@ declare const styles: {
|
|
|
13
13
|
readonly "sapphire-toast--exiting": string;
|
|
14
14
|
readonly "fade-out": string;
|
|
15
15
|
readonly "sapphire-toast__content": string;
|
|
16
|
+
readonly "sapphire-toast__text-content": string;
|
|
16
17
|
readonly "sapphire-toast__content--success": string;
|
|
18
|
+
readonly "sapphire-toast__content--error": string;
|
|
17
19
|
readonly "sapphire-toast__title--with-icon": string;
|
|
18
|
-
readonly "sapphire-toast__close-button": string;
|
|
19
|
-
readonly "is-active": string;
|
|
20
|
-
readonly "js-hover": string;
|
|
21
|
-
readonly "is-hover": string;
|
|
22
|
-
readonly "is-focus": string;
|
|
23
|
-
readonly "js-focus": string;
|
|
24
20
|
};
|
|
25
21
|
export = styles;
|
|
26
22
|
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* an an interactive element in itself */
|
|
19
19
|
outline: none;
|
|
20
20
|
|
|
21
|
-
animation: fade-in var(--sapphire-semantic-time-fade-quick)
|
|
21
|
+
animation: fade-in var(--sapphire-semantic-time-fade-quick)
|
|
22
|
+
var(--sapphire-semantic-transitions-fade);
|
|
22
23
|
|
|
23
24
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
24
25
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -36,12 +37,12 @@
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
.sapphire-tooltip__content {
|
|
39
|
-
background
|
|
40
|
-
color: var(--sapphire-semantic-color-
|
|
40
|
+
background: var(--sapphire-semantic-color-background-surface);
|
|
41
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
41
42
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
42
43
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
43
|
-
font-size: var(--sapphire-
|
|
44
|
+
font-size: var(--sapphire-semantic-size-font-body-sm);
|
|
44
45
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
45
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
46
|
-
var(--sapphire-semantic-size-spacing-
|
|
46
|
+
padding: var(--sapphire-semantic-size-spacing-3xs)
|
|
47
|
+
var(--sapphire-semantic-size-spacing-xs);
|
|
47
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "40.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,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-env": "^7.20.2",
|
|
46
46
|
"@babel/preset-react": "^7.18.6",
|
|
47
47
|
"@babel/preset-typescript": "^7.18.6",
|
|
48
|
-
"@danske/sapphire-icons": "^
|
|
48
|
+
"@danske/sapphire-icons": "^3.0.0",
|
|
49
49
|
"@danske/sapphire-react": "^4.3.0",
|
|
50
50
|
"@mdx-js/react": "^1.6.22",
|
|
51
51
|
"@storybook/addon-essentials": "^6.5.13",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "~4.6.4"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@danske/sapphire-design-tokens": "^
|
|
70
|
+
"@danske/sapphire-design-tokens": "^42.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "09163d6ba43ad1cb4eef0f62060664840493fd01"
|
|
73
73
|
}
|
package/themes/default-dark.js
CHANGED
|
@@ -7,6 +7,7 @@ require("@danske/sapphire-design-tokens/build/themes/default-dark/assets/fonts/d
|
|
|
7
7
|
var tokens_module_css_1 = __importDefault(require("@danske/sapphire-design-tokens/build/themes/default-dark/css/tokens.module.css"));
|
|
8
8
|
var theme = {
|
|
9
9
|
themeClassName: tokens_module_css_1["default"]['sapphire-theme-default-dark'],
|
|
10
|
+
themeSecondaryModifierClassName: tokens_module_css_1["default"]['sapphire-theme--secondary'],
|
|
10
11
|
themeContrastModifierClassName: tokens_module_css_1["default"]['sapphire-theme--contrast']
|
|
11
12
|
};
|
|
12
13
|
exports["default"] = theme;
|
package/themes/default.js
CHANGED
|
@@ -8,6 +8,7 @@ var tokens_module_css_1 = __importDefault(require("@danske/sapphire-design-token
|
|
|
8
8
|
var theme = {
|
|
9
9
|
themeClassName: tokens_module_css_1["default"]['sapphire-theme-default'],
|
|
10
10
|
themeSecondaryModifierClassName: tokens_module_css_1["default"]['sapphire-theme--secondary'],
|
|
11
|
+
themeTertiaryModifierClassName: tokens_module_css_1["default"]['sapphire-theme--tertiary'],
|
|
11
12
|
themeContrastModifierClassName: tokens_module_css_1["default"]['sapphire-theme--contrast']
|
|
12
13
|
};
|
|
13
14
|
exports["default"] = theme;
|
package/themes/index.d.ts
CHANGED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
.sapphire-heading {
|
|
2
|
-
/* not able to find specification in sketch docs for margin,
|
|
3
|
-
will update this once specifications are established */
|
|
4
|
-
margin-top: 0px;
|
|
5
|
-
margin-bottom: 0px;
|
|
6
|
-
|
|
7
|
-
line-height: var(--sapphire-global-size-line-height-sm);
|
|
8
|
-
|
|
9
|
-
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
10
|
-
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
11
|
-
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
12
|
-
* can happen in other contexts as well.
|
|
13
|
-
*
|
|
14
|
-
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
15
|
-
*
|
|
16
|
-
* For more details see:
|
|
17
|
-
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
18
|
-
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
19
|
-
*/
|
|
20
|
-
-webkit-font-smoothing: antialiased;
|
|
21
|
-
-moz-osx-font-smoothing: grayscale;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* heading levels */
|
|
25
|
-
.sapphire-heading--level1 {
|
|
26
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
27
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
28
|
-
font-size: var(--sapphire-global-size-font-220);
|
|
29
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sapphire-heading--level2 {
|
|
33
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
34
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
35
|
-
font-size: var(--sapphire-global-size-font-150);
|
|
36
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.sapphire-heading--level3 {
|
|
40
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
41
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
42
|
-
font-size: var(--sapphire-global-size-font-130);
|
|
43
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.sapphire-heading--level4 {
|
|
47
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
48
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
49
|
-
font-size: var(--sapphire-global-size-font-112);
|
|
50
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.sapphire-heading--level5 {
|
|
54
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
55
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
56
|
-
font-size: var(--sapphire-global-size-font-106);
|
|
57
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.sapphire-heading--level6 {
|
|
61
|
-
font-family: var(--sapphire-semantic-font-name-default);
|
|
62
|
-
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
63
|
-
font-size: var(--sapphire-global-size-font-100);
|
|
64
|
-
color: var(--sapphire-semantic-color-content-default-primary);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.sapphire-heading--level1.sapphire-heading--alternative {
|
|
68
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
69
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.sapphire-heading--level2.sapphire-heading--alternative {
|
|
73
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
74
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.sapphire-heading--level3.sapphire-heading--alternative {
|
|
78
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
79
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.sapphire-heading--level4.sapphire-heading--alternative {
|
|
83
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
84
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.sapphire-heading--level5.sapphire-heading--alternative {
|
|
88
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
89
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.sapphire-heading--level6.sapphire-heading--alternative {
|
|
93
|
-
font-family: var(--sapphire-semantic-font-name-display);
|
|
94
|
-
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
95
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const styles: {
|
|
2
|
-
readonly "sapphire-heading": string;
|
|
3
|
-
readonly "sapphire-heading--level1": string;
|
|
4
|
-
readonly "sapphire-heading--level2": string;
|
|
5
|
-
readonly "sapphire-heading--level3": string;
|
|
6
|
-
readonly "sapphire-heading--level4": string;
|
|
7
|
-
readonly "sapphire-heading--level5": string;
|
|
8
|
-
readonly "sapphire-heading--level6": string;
|
|
9
|
-
readonly "sapphire-heading--alternative": string;
|
|
10
|
-
};
|
|
11
|
-
export = styles;
|
|
12
|
-
|