@danske/sapphire-css 39.0.0 → 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 +165 -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
|
@@ -16,10 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
/* typography */
|
|
18
18
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
19
|
-
font-weight: var(--sapphire-semantic-font-weight-default-
|
|
19
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
20
20
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
21
21
|
text-transform: none;
|
|
22
|
-
letter-spacing: 0.01em;
|
|
23
22
|
|
|
24
23
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
25
24
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -50,9 +49,9 @@
|
|
|
50
49
|
|
|
51
50
|
/* transition */
|
|
52
51
|
/* we don't want to transition outline-offset */
|
|
53
|
-
transition-property: opacity, background
|
|
52
|
+
transition-property: opacity, background, color;
|
|
54
53
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
55
|
-
transition-timing-function:
|
|
54
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
56
55
|
cursor: pointer;
|
|
57
56
|
}
|
|
58
57
|
|
|
@@ -63,6 +62,9 @@
|
|
|
63
62
|
vertical-align: middle;
|
|
64
63
|
white-space: nowrap;
|
|
65
64
|
|
|
65
|
+
/* for when there are icons inside the button */
|
|
66
|
+
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
67
|
+
|
|
66
68
|
/* In Safari buttons get a 2px border
|
|
67
69
|
* https://github.com/necolas/normalize.css/blob/master/normalize.css#L160-L169
|
|
68
70
|
*/
|
|
@@ -92,20 +94,6 @@ a.sapphire-button {
|
|
|
92
94
|
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
/* Button with icon */
|
|
96
|
-
.sapphire-button--with-left-icon {
|
|
97
|
-
min-width: var(--sapphire-global-size-generic-100);
|
|
98
|
-
}
|
|
99
|
-
.sapphire-button--with-right-icon {
|
|
100
|
-
min-width: var(--sapphire-global-size-generic-100);
|
|
101
|
-
}
|
|
102
|
-
.sapphire-button--with-right-icon .sapphire-button__icon {
|
|
103
|
-
margin-left: var(--sapphire-semantic-size-spacing-20);
|
|
104
|
-
}
|
|
105
|
-
.sapphire-button--with-left-icon .sapphire-button__icon {
|
|
106
|
-
margin-right: var(--sapphire-semantic-size-spacing-20);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
97
|
/* Button loading */
|
|
110
98
|
.sapphire-button--loading {
|
|
111
99
|
cursor: not-allowed;
|
|
@@ -120,17 +108,10 @@ a.sapphire-button {
|
|
|
120
108
|
visibility: hidden;
|
|
121
109
|
}
|
|
122
110
|
|
|
123
|
-
|
|
124
|
-
* Skin rules
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
|
-
/* ### Variant: Primary */
|
|
128
|
-
/* ## Style: Default */
|
|
111
|
+
/* ## Primary */
|
|
129
112
|
.sapphire-button--primary {
|
|
130
|
-
background
|
|
131
|
-
|
|
132
|
-
);
|
|
133
|
-
color: var(--sapphire-semantic-color-content-action-primary-default);
|
|
113
|
+
background: var(--sapphire-semantic-color-background-action-primary-default);
|
|
114
|
+
color: var(--sapphire-semantic-color-foreground-action-on-primary-default);
|
|
134
115
|
}
|
|
135
116
|
.sapphire-button--primary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
136
117
|
.is-active
|
|
@@ -138,33 +119,28 @@ a.sapphire-button {
|
|
|
138
119
|
.sapphire-button--primary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
139
120
|
.is-active
|
|
140
121
|
).is-hover {
|
|
141
|
-
background
|
|
142
|
-
--sapphire-semantic-color-background-action-primary-hover
|
|
143
|
-
);
|
|
122
|
+
background: var(--sapphire-semantic-color-background-action-primary-hover);
|
|
144
123
|
}
|
|
145
124
|
.sapphire-button--primary.is-focus,
|
|
146
125
|
.sapphire-button--primary:not(.js-focus):focus-visible {
|
|
147
|
-
background
|
|
148
|
-
|
|
149
|
-
);
|
|
126
|
+
background: var(--sapphire-semantic-color-background-action-primary-default);
|
|
127
|
+
color: var(--sapphire-semantic-color-foreground-action-on-primary-default);
|
|
150
128
|
}
|
|
151
129
|
.sapphire-button--primary:not(:disabled):not(.is-disabled).is-active,
|
|
152
130
|
.sapphire-button--primary:not(:disabled):not(.is-disabled):active,
|
|
153
131
|
.sapphire-button--primary:not(:disabled):not(
|
|
154
132
|
.is-disabled
|
|
155
133
|
):focus-visible:active {
|
|
156
|
-
background
|
|
157
|
-
|
|
158
|
-
);
|
|
134
|
+
background: var(--sapphire-semantic-color-background-action-primary-active);
|
|
135
|
+
color: var(--sapphire-semantic-color-foreground-action-on-primary-active);
|
|
159
136
|
}
|
|
160
137
|
|
|
161
|
-
/*
|
|
162
|
-
/* ## Style: Default */
|
|
138
|
+
/* ## Secondary */
|
|
163
139
|
.sapphire-button--secondary {
|
|
164
|
-
background
|
|
140
|
+
background: var(
|
|
165
141
|
--sapphire-semantic-color-background-action-secondary-default
|
|
166
142
|
);
|
|
167
|
-
color: var(--sapphire-semantic-color-
|
|
143
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
|
|
168
144
|
}
|
|
169
145
|
|
|
170
146
|
.sapphire-button--secondary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
@@ -173,17 +149,16 @@ a.sapphire-button {
|
|
|
173
149
|
.sapphire-button--secondary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
174
150
|
.is-active
|
|
175
151
|
).is-hover {
|
|
176
|
-
background
|
|
177
|
-
|
|
178
|
-
);
|
|
179
|
-
color: var(--sapphire-semantic-color-content-action-secondary-hover);
|
|
152
|
+
background: var(--sapphire-semantic-color-background-action-secondary-hover);
|
|
153
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-hover);
|
|
180
154
|
}
|
|
181
155
|
|
|
182
156
|
.sapphire-button--secondary.is-focus,
|
|
183
157
|
.sapphire-button--secondary:not(.js-focus):focus-visible {
|
|
184
|
-
background
|
|
158
|
+
background: var(
|
|
185
159
|
--sapphire-semantic-color-background-action-secondary-default
|
|
186
160
|
);
|
|
161
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
|
|
187
162
|
}
|
|
188
163
|
|
|
189
164
|
.sapphire-button--secondary:not(:disabled):not(.is-disabled).is-active,
|
|
@@ -191,82 +166,14 @@ a.sapphire-button {
|
|
|
191
166
|
.sapphire-button--secondary:not(:disabled):not(
|
|
192
167
|
.is-disabled
|
|
193
168
|
):focus-visible:active {
|
|
194
|
-
background
|
|
195
|
-
|
|
196
|
-
);
|
|
197
|
-
color: var(--sapphire-semantic-color-content-action-secondary-active);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* ## Style: Ghost */
|
|
201
|
-
.sapphire-button--secondary-ghost {
|
|
202
|
-
background-color: var(
|
|
203
|
-
--sapphire-semantic-color-background-action-secondary-ghost-default
|
|
204
|
-
);
|
|
205
|
-
color: var(--sapphire-semantic-color-content-action-secondary-default);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(
|
|
209
|
-
:active
|
|
210
|
-
):not(.is-active):not(.js-hover):hover,
|
|
211
|
-
.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(
|
|
212
|
-
:active
|
|
213
|
-
):not(.is-active).is-hover {
|
|
214
|
-
background-color: var(
|
|
215
|
-
--sapphire-semantic-color-background-action-secondary-ghost-hover
|
|
216
|
-
);
|
|
217
|
-
color: var(--sapphire-semantic-color-content-action-secondary-hover);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.sapphire-button--secondary-ghost.is-focus,
|
|
221
|
-
.sapphire-button--secondary-ghost:not(.js-focus):focus-visible {
|
|
222
|
-
background-color: var(
|
|
223
|
-
--sapphire-semantic-color-background-action-secondary-ghost-default
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled).is-active,
|
|
228
|
-
.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):active,
|
|
229
|
-
.sapphire-button--secondary-ghost:not(:disabled):not(
|
|
230
|
-
.is-disabled
|
|
231
|
-
):focus-visible:active {
|
|
232
|
-
background-color: var(
|
|
233
|
-
--sapphire-semantic-color-background-action-secondary-ghost-active
|
|
234
|
-
);
|
|
235
|
-
color: var(--sapphire-semantic-color-content-action-secondary-active);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* ## Style: Text */
|
|
239
|
-
.sapphire-button--secondary-text {
|
|
240
|
-
color: var(--sapphire-semantic-color-content-action-secondary-default);
|
|
241
|
-
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
242
|
-
background: var(--sapphire-semantic-color-background-action-secondary-text);
|
|
243
|
-
padding: 0;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(
|
|
247
|
-
:active
|
|
248
|
-
):not(.is-active):not(.js-hover):hover,
|
|
249
|
-
.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(
|
|
250
|
-
:active
|
|
251
|
-
):not(.is-active).is-hover {
|
|
252
|
-
color: var(--sapphire-semantic-color-content-action-secondary-hover);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.sapphire-button--secondary-text:not(:disabled):not(.is-disabled).is-active,
|
|
256
|
-
.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):active,
|
|
257
|
-
.sapphire-button--secondary-text:not(:disabled):not(
|
|
258
|
-
.is-disabled
|
|
259
|
-
):focus-visible:active {
|
|
260
|
-
color: var(--sapphire-semantic-color-content-action-secondary-active);
|
|
169
|
+
background: var(--sapphire-semantic-color-background-action-secondary-active);
|
|
170
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-active);
|
|
261
171
|
}
|
|
262
172
|
|
|
263
|
-
/*
|
|
264
|
-
/* ## Style: Default */
|
|
173
|
+
/* ## Tertiary (undocumented) */
|
|
265
174
|
.sapphire-button--tertiary {
|
|
266
|
-
background
|
|
267
|
-
|
|
268
|
-
);
|
|
269
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-default);
|
|
175
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-default);
|
|
176
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
|
|
270
177
|
}
|
|
271
178
|
|
|
272
179
|
.sapphire-button--tertiary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
@@ -275,17 +182,14 @@ a.sapphire-button {
|
|
|
275
182
|
.sapphire-button--tertiary:not(:disabled):not(.is-disabled):not(:active):not(
|
|
276
183
|
.is-active
|
|
277
184
|
).is-hover {
|
|
278
|
-
background
|
|
279
|
-
|
|
280
|
-
);
|
|
281
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-hover);
|
|
185
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-hover);
|
|
186
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-hover);
|
|
282
187
|
}
|
|
283
188
|
|
|
284
189
|
.sapphire-button--tertiary.is-focus,
|
|
285
190
|
.sapphire-button--tertiary:not(.js-focus):focus-visible {
|
|
286
|
-
background
|
|
287
|
-
|
|
288
|
-
);
|
|
191
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-default);
|
|
192
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
|
|
289
193
|
}
|
|
290
194
|
|
|
291
195
|
.sapphire-button--tertiary:not(:disabled):not(.is-disabled).is-active,
|
|
@@ -293,82 +197,37 @@ a.sapphire-button {
|
|
|
293
197
|
.sapphire-button--tertiary:not(:disabled):not(
|
|
294
198
|
.is-disabled
|
|
295
199
|
):focus-visible:active {
|
|
296
|
-
background
|
|
297
|
-
|
|
298
|
-
);
|
|
299
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/* ## Style: Ghost */
|
|
303
|
-
.sapphire-button--tertiary-ghost {
|
|
304
|
-
background-color: var(
|
|
305
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-default
|
|
306
|
-
);
|
|
307
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-default);
|
|
200
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-active);
|
|
201
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-active);
|
|
308
202
|
}
|
|
309
203
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(
|
|
314
|
-
:active
|
|
315
|
-
):not(.is-active).is-hover {
|
|
316
|
-
background-color: var(
|
|
317
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-hover
|
|
318
|
-
);
|
|
319
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-hover);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.sapphire-button--tertiary-ghost.is-focus,
|
|
323
|
-
.sapphire-button--tertiary-ghost:not(.js-focus):focus-visible {
|
|
324
|
-
background-color: var(
|
|
325
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-default
|
|
326
|
-
);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled).is-active,
|
|
330
|
-
.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):active,
|
|
331
|
-
.sapphire-button--tertiary-ghost:not(:disabled):not(
|
|
332
|
-
.is-disabled
|
|
333
|
-
):focus-visible:active {
|
|
334
|
-
background-color: var(
|
|
335
|
-
--sapphire-semantic-color-background-action-tertiary-ghost-active
|
|
336
|
-
);
|
|
337
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/* ## Style: Text */
|
|
341
|
-
.sapphire-button--tertiary-text {
|
|
342
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-default);
|
|
204
|
+
/* ## text */
|
|
205
|
+
.sapphire-button--text {
|
|
206
|
+
color: var(--sapphire-semantic-color-foreground-action-link-default);
|
|
343
207
|
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
344
|
-
background:
|
|
208
|
+
background: transparent;
|
|
345
209
|
padding: 0;
|
|
346
210
|
}
|
|
347
211
|
|
|
348
|
-
.sapphire-button--
|
|
349
|
-
|
|
350
|
-
):not(.
|
|
351
|
-
.sapphire-button--
|
|
352
|
-
|
|
353
|
-
)
|
|
354
|
-
color: var(--sapphire-semantic-color-
|
|
212
|
+
.sapphire-button--text:not(:disabled):not(.is-disabled):not(:active):not(
|
|
213
|
+
.is-active
|
|
214
|
+
):not(.js-hover):hover,
|
|
215
|
+
.sapphire-button--text:not(:disabled):not(.is-disabled):not(:active):not(
|
|
216
|
+
.is-active
|
|
217
|
+
).is-hover {
|
|
218
|
+
color: var(--sapphire-semantic-color-foreground-action-link-hover);
|
|
355
219
|
}
|
|
356
220
|
|
|
357
|
-
.sapphire-button--
|
|
358
|
-
.sapphire-button--
|
|
359
|
-
.sapphire-button--
|
|
360
|
-
|
|
361
|
-
):focus-visible:active {
|
|
362
|
-
color: var(--sapphire-semantic-color-content-action-tertiary-active);
|
|
221
|
+
.sapphire-button--text:not(:disabled):not(.is-disabled).is-active,
|
|
222
|
+
.sapphire-button--text:not(:disabled):not(.is-disabled):active,
|
|
223
|
+
.sapphire-button--text:not(:disabled):not(.is-disabled):focus-visible:active {
|
|
224
|
+
color: var(--sapphire-semantic-color-foreground-action-link-active);
|
|
363
225
|
}
|
|
364
226
|
|
|
365
|
-
/*
|
|
366
|
-
/* ## Style: Default */
|
|
227
|
+
/* ## Danger */
|
|
367
228
|
.sapphire-button--danger {
|
|
368
|
-
background
|
|
369
|
-
|
|
370
|
-
);
|
|
371
|
-
color: var(--sapphire-semantic-color-content-action-danger-default);
|
|
229
|
+
background: var(--sapphire-semantic-color-background-action-danger-default);
|
|
230
|
+
color: var(--sapphire-semantic-color-foreground-action-on-danger-default);
|
|
372
231
|
}
|
|
373
232
|
|
|
374
233
|
.sapphire-button--danger:not(:disabled):not(.is-disabled):not(:active):not(
|
|
@@ -377,71 +236,122 @@ a.sapphire-button {
|
|
|
377
236
|
.sapphire-button--danger:not(:disabled):not(.is-disabled):not(:active):not(
|
|
378
237
|
.is-active
|
|
379
238
|
).is-hover {
|
|
380
|
-
background
|
|
381
|
-
|
|
382
|
-
);
|
|
383
|
-
color: var(--sapphire-semantic-color-content-action-danger-hover);
|
|
239
|
+
background: var(--sapphire-semantic-color-background-action-danger-hover);
|
|
240
|
+
color: var(--sapphire-semantic-color-foreground-action-on-danger-hover);
|
|
384
241
|
}
|
|
385
242
|
|
|
386
243
|
.sapphire-button--danger.is-focus,
|
|
387
244
|
.sapphire-button--danger:not(.js-focus):focus-visible {
|
|
388
|
-
background
|
|
389
|
-
|
|
390
|
-
);
|
|
245
|
+
background: var(--sapphire-semantic-color-background-action-danger-default);
|
|
246
|
+
color: var(--sapphire-semantic-color-foreground-action-on-danger-default);
|
|
391
247
|
}
|
|
392
248
|
|
|
393
249
|
.sapphire-button--danger:not(:disabled):not(.is-disabled).is-active,
|
|
394
250
|
.sapphire-button--danger:not(:disabled):not(.is-disabled):active,
|
|
395
251
|
.sapphire-button--danger:not(:disabled):not(.is-disabled):focus-visible:active {
|
|
396
|
-
background
|
|
397
|
-
|
|
252
|
+
background: var(--sapphire-semantic-color-background-action-danger-active);
|
|
253
|
+
color: var(--sapphire-semantic-color-foreground-action-on-danger-active);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* ## Danger Secondary */
|
|
257
|
+
.sapphire-button--danger-secondary {
|
|
258
|
+
background: var(
|
|
259
|
+
--sapphire-semantic-color-background-action-danger-secondary-default
|
|
260
|
+
);
|
|
261
|
+
color: var(
|
|
262
|
+
--sapphire-semantic-color-foreground-action-on-danger-secondary-default
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.sapphire-button--danger-secondary:not(:disabled):not(.is-disabled):not(
|
|
267
|
+
:active
|
|
268
|
+
):not(.is-active):not(.js-hover):hover,
|
|
269
|
+
.sapphire-button--danger-secondary:not(:disabled):not(.is-disabled):not(
|
|
270
|
+
:active
|
|
271
|
+
):not(.is-active).is-hover {
|
|
272
|
+
background: var(
|
|
273
|
+
--sapphire-semantic-color-background-action-danger-secondary-hover
|
|
274
|
+
);
|
|
275
|
+
color: var(
|
|
276
|
+
--sapphire-semantic-color-foreground-action-on-danger-secondary-hover
|
|
398
277
|
);
|
|
399
|
-
color: var(--sapphire-semantic-color-content-action-danger-active);
|
|
400
278
|
}
|
|
401
279
|
|
|
402
|
-
|
|
403
|
-
.sapphire-button--danger-
|
|
404
|
-
background
|
|
405
|
-
--sapphire-semantic-color-background-action-danger-
|
|
280
|
+
.sapphire-button--danger-secondary.is-focus,
|
|
281
|
+
.sapphire-button--danger-secondary:not(.js-focus):focus-visible {
|
|
282
|
+
background: var(
|
|
283
|
+
--sapphire-semantic-color-background-action-danger-secondary-default
|
|
284
|
+
);
|
|
285
|
+
color: var(
|
|
286
|
+
--sapphire-semantic-color-foreground-action-on-danger-secondary-default
|
|
406
287
|
);
|
|
407
|
-
color: var(--sapphire-semantic-color-content-action-danger-default);
|
|
408
288
|
}
|
|
409
289
|
|
|
410
|
-
.sapphire-button--danger-
|
|
290
|
+
.sapphire-button--danger-secondary:not(:disabled):not(.is-disabled).is-active,
|
|
291
|
+
.sapphire-button--danger-secondary:not(:disabled):not(.is-disabled):active,
|
|
292
|
+
.sapphire-button--danger-secondary:not(:disabled):not(
|
|
293
|
+
.is-disabled
|
|
294
|
+
):focus-visible:active {
|
|
295
|
+
background: var(
|
|
296
|
+
--sapphire-semantic-color-background-action-danger-secondary-active
|
|
297
|
+
);
|
|
298
|
+
color: var(
|
|
299
|
+
--sapphire-semantic-color-foreground-action-on-danger-secondary-active
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* ## Danger Tertiary */
|
|
304
|
+
.sapphire-button--danger-tertiary {
|
|
305
|
+
background: var(
|
|
306
|
+
--sapphire-semantic-color-background-action-danger-tertiary-default
|
|
307
|
+
);
|
|
308
|
+
color: var(
|
|
309
|
+
--sapphire-semantic-color-foreground-action-on-danger-tertiary-default
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.sapphire-button--danger-tertiary:not(:disabled):not(.is-disabled):not(
|
|
411
314
|
:active
|
|
412
315
|
):not(.is-active):not(.js-hover):hover,
|
|
413
|
-
.sapphire-button--danger-
|
|
316
|
+
.sapphire-button--danger-tertiary:not(:disabled):not(.is-disabled):not(
|
|
414
317
|
:active
|
|
415
318
|
):not(.is-active).is-hover {
|
|
416
|
-
background
|
|
417
|
-
--sapphire-semantic-color-background-action-danger-
|
|
319
|
+
background: var(
|
|
320
|
+
--sapphire-semantic-color-background-action-danger-tertiary-hover
|
|
321
|
+
);
|
|
322
|
+
color: var(
|
|
323
|
+
--sapphire-semantic-color-foreground-action-on-danger-tertiary-hover
|
|
418
324
|
);
|
|
419
|
-
color: var(--sapphire-semantic-color-content-action-danger-hover);
|
|
420
325
|
}
|
|
421
326
|
|
|
422
|
-
.sapphire-button--danger-
|
|
423
|
-
.sapphire-button--danger-
|
|
424
|
-
background
|
|
425
|
-
--sapphire-semantic-color-background-action-danger-
|
|
327
|
+
.sapphire-button--danger-tertiary.is-focus,
|
|
328
|
+
.sapphire-button--danger-tertiary:not(.js-focus):focus-visible {
|
|
329
|
+
background: var(
|
|
330
|
+
--sapphire-semantic-color-background-action-danger-tertiary-default
|
|
331
|
+
);
|
|
332
|
+
color: var(
|
|
333
|
+
--sapphire-semantic-color-foreground-action-on-danger-tertiary-default
|
|
426
334
|
);
|
|
427
335
|
}
|
|
428
336
|
|
|
429
|
-
.sapphire-button--danger-
|
|
430
|
-
.sapphire-button--danger-
|
|
431
|
-
.sapphire-button--danger-
|
|
337
|
+
.sapphire-button--danger-tertiary:not(:disabled):not(.is-disabled).is-active,
|
|
338
|
+
.sapphire-button--danger-tertiary:not(:disabled):not(.is-disabled):active,
|
|
339
|
+
.sapphire-button--danger-tertiary:not(:disabled):not(
|
|
432
340
|
.is-disabled
|
|
433
341
|
):focus-visible:active {
|
|
434
|
-
background
|
|
435
|
-
--sapphire-semantic-color-background-action-danger-
|
|
342
|
+
background: var(
|
|
343
|
+
--sapphire-semantic-color-background-action-danger-tertiary-active
|
|
344
|
+
);
|
|
345
|
+
color: var(
|
|
346
|
+
--sapphire-semantic-color-foreground-action-on-danger-tertiary-active
|
|
436
347
|
);
|
|
437
|
-
color: var(--sapphire-semantic-color-content-action-danger-active);
|
|
438
348
|
}
|
|
439
349
|
|
|
440
|
-
/* ##
|
|
350
|
+
/* ## Danger text */
|
|
441
351
|
.sapphire-button--danger-text {
|
|
442
|
-
color: var(--sapphire-semantic-color-
|
|
352
|
+
color: var(--sapphire-semantic-color-foreground-action-danger-default);
|
|
443
353
|
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
444
|
-
background:
|
|
354
|
+
background: transparent;
|
|
445
355
|
padding: 0;
|
|
446
356
|
}
|
|
447
357
|
|
|
@@ -451,7 +361,7 @@ a.sapphire-button {
|
|
|
451
361
|
.sapphire-button--danger-text:not(:disabled):not(.is-disabled):not(:active):not(
|
|
452
362
|
.is-active
|
|
453
363
|
).is-hover {
|
|
454
|
-
color: var(--sapphire-semantic-color-
|
|
364
|
+
color: var(--sapphire-semantic-color-foreground-action-danger-hover);
|
|
455
365
|
}
|
|
456
366
|
|
|
457
367
|
.sapphire-button--danger-text:not(:disabled):not(.is-disabled).is-active,
|
|
@@ -459,17 +369,19 @@ a.sapphire-button {
|
|
|
459
369
|
.sapphire-button--danger-text:not(:disabled):not(
|
|
460
370
|
.is-disabled
|
|
461
371
|
):focus-visible:active {
|
|
462
|
-
color: var(--sapphire-semantic-color-
|
|
372
|
+
color: var(--sapphire-semantic-color-foreground-action-danger-active);
|
|
463
373
|
}
|
|
464
374
|
|
|
465
375
|
/**
|
|
466
376
|
* Toggle Button
|
|
467
377
|
*/
|
|
468
378
|
.sapphire-button--selected {
|
|
469
|
-
background
|
|
470
|
-
--sapphire-semantic-color-background-
|
|
379
|
+
background: var(
|
|
380
|
+
--sapphire-semantic-color-background-action-select-secondary-default
|
|
381
|
+
);
|
|
382
|
+
color: var(
|
|
383
|
+
--sapphire-semantic-color-foreground-action-on-select-secondary-default
|
|
471
384
|
);
|
|
472
|
-
color: var(--sapphire-semantic-color-content-selection-selected-default);
|
|
473
385
|
}
|
|
474
386
|
.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(
|
|
475
387
|
.is-active
|
|
@@ -477,14 +389,20 @@ a.sapphire-button {
|
|
|
477
389
|
.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(
|
|
478
390
|
.is-active
|
|
479
391
|
).is-hover {
|
|
480
|
-
background
|
|
481
|
-
--sapphire-semantic-color-background-
|
|
392
|
+
background: var(
|
|
393
|
+
--sapphire-semantic-color-background-action-select-secondary-hover
|
|
394
|
+
);
|
|
395
|
+
color: var(
|
|
396
|
+
--sapphire-semantic-color-foreground-action-on-select-secondary-hover
|
|
482
397
|
);
|
|
483
398
|
}
|
|
484
399
|
.sapphire-button--selected.is-focus,
|
|
485
400
|
.sapphire-button--selected:not(.js-focus):focus-visible {
|
|
486
|
-
background
|
|
487
|
-
--sapphire-semantic-color-background-
|
|
401
|
+
background: var(
|
|
402
|
+
--sapphire-semantic-color-background-action-select-secondary-default
|
|
403
|
+
);
|
|
404
|
+
color: var(
|
|
405
|
+
--sapphire-semantic-color-foreground-action-on-select-secondary-default
|
|
488
406
|
);
|
|
489
407
|
}
|
|
490
408
|
.sapphire-button--selected:not(:disabled):not(.is-disabled).is-active,
|
|
@@ -492,17 +410,19 @@ a.sapphire-button {
|
|
|
492
410
|
.sapphire-button--selected:not(:disabled):not(
|
|
493
411
|
.is-disabled
|
|
494
412
|
):focus-visible:active {
|
|
495
|
-
background
|
|
496
|
-
--sapphire-semantic-color-background-
|
|
413
|
+
background: var(
|
|
414
|
+
--sapphire-semantic-color-background-action-select-secondary-active
|
|
415
|
+
);
|
|
416
|
+
color: var(
|
|
417
|
+
--sapphire-semantic-color-foreground-action-on-select-secondary-active
|
|
497
418
|
);
|
|
498
|
-
color: var(--sapphire-semantic-color-content-selection-selected-active);
|
|
499
419
|
}
|
|
500
420
|
|
|
501
421
|
.sapphire-button--unselected {
|
|
502
|
-
background
|
|
503
|
-
--sapphire-semantic-color-background-
|
|
422
|
+
background: var(
|
|
423
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
504
424
|
);
|
|
505
|
-
color: var(--sapphire-semantic-color-
|
|
425
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
|
|
506
426
|
}
|
|
507
427
|
.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(
|
|
508
428
|
.is-active
|
|
@@ -510,46 +430,42 @@ a.sapphire-button {
|
|
|
510
430
|
.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(
|
|
511
431
|
.is-active
|
|
512
432
|
).is-hover {
|
|
513
|
-
background
|
|
514
|
-
|
|
515
|
-
);
|
|
433
|
+
background: var(--sapphire-semantic-color-background-action-secondary-hover);
|
|
434
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-hover);
|
|
516
435
|
}
|
|
517
436
|
.sapphire-button--unselected.is-focus,
|
|
518
437
|
.sapphire-button--unselected:not(.js-focus):focus-visible {
|
|
519
|
-
background
|
|
520
|
-
--sapphire-semantic-color-background-
|
|
438
|
+
background: var(
|
|
439
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
521
440
|
);
|
|
441
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-default);
|
|
522
442
|
}
|
|
523
443
|
.sapphire-button--unselected:not(:disabled):not(.is-disabled).is-active,
|
|
524
444
|
.sapphire-button--unselected:not(:disabled):not(.is-disabled):active,
|
|
525
445
|
.sapphire-button--unselected:not(:disabled):not(
|
|
526
446
|
.is-disabled
|
|
527
447
|
):focus-visible:active {
|
|
528
|
-
background
|
|
529
|
-
|
|
530
|
-
);
|
|
531
|
-
color: var(--sapphire-semantic-color-content-selection-unselected-active);
|
|
448
|
+
background: var(--sapphire-semantic-color-background-action-secondary-active);
|
|
449
|
+
color: var(--sapphire-semantic-color-foreground-action-on-secondary-active);
|
|
532
450
|
}
|
|
533
451
|
|
|
534
452
|
/**
|
|
535
453
|
* Icon
|
|
454
|
+
* Technically, there's a design guideline that disallows icons in small
|
|
455
|
+
* buttons, but it works anyway.
|
|
536
456
|
*/
|
|
537
457
|
.sapphire-button__icon {
|
|
538
458
|
display: flex;
|
|
539
459
|
flex-direction: column;
|
|
540
460
|
justify-content: center;
|
|
541
461
|
align-items: center;
|
|
542
|
-
height: var(--sapphire-semantic-size-icon-md);
|
|
543
|
-
width: var(--sapphire-semantic-size-icon-md);
|
|
544
|
-
}
|
|
545
|
-
.sapphire-button--lg .sapphire-button__icon {
|
|
546
|
-
height: var(--sapphire-semantic-size-icon-lg);
|
|
547
|
-
width: var(--sapphire-semantic-size-icon-lg);
|
|
548
|
-
}
|
|
549
|
-
.sapphire-button--sm .sapphire-button__icon {
|
|
550
462
|
height: var(--sapphire-semantic-size-icon-sm);
|
|
551
463
|
width: var(--sapphire-semantic-size-icon-sm);
|
|
552
464
|
}
|
|
465
|
+
.sapphire-button--lg .sapphire-button__icon {
|
|
466
|
+
height: var(--sapphire-semantic-size-icon-md);
|
|
467
|
+
width: var(--sapphire-semantic-size-icon-md);
|
|
468
|
+
}
|
|
553
469
|
|
|
554
470
|
/**
|
|
555
471
|
* Size variations
|
|
@@ -560,12 +476,11 @@ a.sapphire-button {
|
|
|
560
476
|
.sapphire-button--lg {
|
|
561
477
|
height: var(--sapphire-semantic-size-height-control-lg);
|
|
562
478
|
min-width: var(--sapphire-global-size-generic-120);
|
|
563
|
-
padding: 0 var(--sapphire-semantic-size-spacing-
|
|
564
|
-
font-size: var(--sapphire-semantic-size-font-control-
|
|
479
|
+
padding: 0 var(--sapphire-semantic-size-spacing-xl);
|
|
480
|
+
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
565
481
|
border-radius: var(--sapphire-semantic-size-height-control-lg);
|
|
566
482
|
}
|
|
567
|
-
.sapphire-button--lg.sapphire-button--
|
|
568
|
-
.sapphire-button--lg.sapphire-button--tertiary-text,
|
|
483
|
+
.sapphire-button--lg.sapphire-button--text,
|
|
569
484
|
.sapphire-button--lg.sapphire-button--danger-text {
|
|
570
485
|
padding: 0;
|
|
571
486
|
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
@@ -577,13 +492,15 @@ a.sapphire-button {
|
|
|
577
492
|
.sapphire-button--sm {
|
|
578
493
|
height: var(--sapphire-semantic-size-height-control-sm);
|
|
579
494
|
min-width: var(--sapphire-global-size-generic-80);
|
|
580
|
-
padding: 0 var(--sapphire-semantic-size-spacing-
|
|
495
|
+
padding: 0 var(--sapphire-semantic-size-spacing-md);
|
|
581
496
|
font-size: var(--sapphire-semantic-size-font-control-sm);
|
|
582
497
|
border-radius: var(--sapphire-semantic-size-height-control-sm);
|
|
583
498
|
}
|
|
584
|
-
.sapphire-button--sm.sapphire-button--
|
|
585
|
-
.sapphire-button--sm.sapphire-button--tertiary-text,
|
|
499
|
+
.sapphire-button--sm.sapphire-button--text,
|
|
586
500
|
.sapphire-button--sm.sapphire-button--danger-text {
|
|
587
501
|
padding: 0;
|
|
588
502
|
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
589
503
|
}
|
|
504
|
+
.sapphire-button--sm .sapphire-button__content {
|
|
505
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
506
|
+
}
|