@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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
position: relative;
|
|
5
5
|
max-width: 100%;
|
|
6
|
+
cursor: pointer;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
.sapphire-checkbox__input {
|
|
@@ -22,7 +23,6 @@
|
|
|
22
23
|
|
|
23
24
|
cursor: pointer;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
26
|
.sapphire-checkbox__label {
|
|
27
27
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
28
28
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
-webkit-font-smoothing: antialiased;
|
|
39
39
|
-moz-osx-font-smoothing: grayscale;
|
|
40
40
|
|
|
41
|
-
margin-left: var(--sapphire-semantic-size-spacing-
|
|
42
|
-
font-size: var(--sapphire-semantic-size-font-control-
|
|
43
|
-
color: var(--sapphire-semantic-color-
|
|
41
|
+
margin-left: var(--sapphire-semantic-size-spacing-sm);
|
|
42
|
+
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
43
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
44
44
|
line-height: var(--sapphire-semantic-size-height-control-xs);
|
|
45
45
|
display: inline-flex;
|
|
46
46
|
align-items: center;
|
|
47
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
47
|
+
gap: var(--sapphire-semantic-size-spacing-3xs);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.sapphire-checkbox__label:empty {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.sapphire-checkbox__optional-indicator {
|
|
61
|
-
color: var(--sapphire-semantic-color-
|
|
61
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.sapphire-checkbox--md .sapphire-checkbox__label {
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
73
73
|
font-size: var(--sapphire-semantic-size-font-label-md);
|
|
74
74
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
75
|
-
color: var(--sapphire-semantic-color-
|
|
76
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
75
|
+
color: var(--sapphire-semantic-color-foreground-on-negative-subtle);
|
|
76
|
+
margin-top: var(--sapphire-semantic-size-spacing-2xs);
|
|
77
77
|
|
|
78
78
|
margin-left: calc(
|
|
79
|
-
var(--sapphire-semantic-size-spacing-
|
|
79
|
+
var(--sapphire-semantic-size-spacing-sm) +
|
|
80
80
|
var(--sapphire-semantic-size-height-box-lg)
|
|
81
81
|
);
|
|
82
82
|
}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
font-size: var(--sapphire-semantic-size-font-label-sm);
|
|
86
86
|
line-height: var(--sapphire-semantic-size-line-height-sm);
|
|
87
87
|
margin-left: calc(
|
|
88
|
-
var(--sapphire-semantic-size-spacing-
|
|
88
|
+
var(--sapphire-semantic-size-spacing-sm) +
|
|
89
89
|
var(--sapphire-semantic-size-height-box-md)
|
|
90
90
|
);
|
|
91
91
|
}
|
|
@@ -98,10 +98,11 @@
|
|
|
98
98
|
width: var(--sapphire-semantic-size-height-box-lg);
|
|
99
99
|
height: var(--sapphire-semantic-size-height-box-lg);
|
|
100
100
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
101
|
-
border: var(--sapphire-semantic-size-border-
|
|
102
|
-
var(--sapphire-semantic-color-border-
|
|
103
|
-
background
|
|
104
|
-
transition: all var(--sapphire-semantic-time-fade-quick)
|
|
101
|
+
border: var(--sapphire-semantic-size-border-sm) solid
|
|
102
|
+
var(--sapphire-semantic-color-border-field-default);
|
|
103
|
+
background: var(--sapphire-semantic-color-background-field);
|
|
104
|
+
transition: all var(--sapphire-semantic-time-fade-quick)
|
|
105
|
+
var(--sapphire-semantic-transitions-fade);
|
|
105
106
|
flex-shrink: 0;
|
|
106
107
|
display: inline-flex;
|
|
107
108
|
justify-content: center;
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
.sapphire-checkbox__box:has(~ .sapphire-checkbox__label:not(:empty)) {
|
|
112
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
113
|
+
margin-top: var(--sapphire-semantic-size-spacing-4xs);
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
.sapphire-checkbox--md .sapphire-checkbox__box {
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
.sapphire-checkbox__box-icon {
|
|
121
122
|
display: inherit;
|
|
122
123
|
line-height: 0;
|
|
123
|
-
color: var(--sapphire-semantic-color-
|
|
124
|
+
color: var(--sapphire-semantic-color-foreground-action-on-select-default);
|
|
124
125
|
margin: calc(var(--sapphire-semantic-size-border-md) * -1);
|
|
125
126
|
height: var(--sapphire-semantic-size-height-box-lg);
|
|
126
127
|
width: var(--sapphire-semantic-size-height-box-lg);
|
|
@@ -132,9 +133,7 @@
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
.sapphire-checkbox--error .sapphire-checkbox__box {
|
|
135
|
-
border-color: var(
|
|
136
|
-
--sapphire-semantic-color-background-negative-primary-default
|
|
137
|
-
);
|
|
136
|
+
border-color: var(--sapphire-semantic-color-border-negative-default);
|
|
138
137
|
}
|
|
139
138
|
|
|
140
139
|
/* Checked (same UI as indeterminate) */
|
|
@@ -142,97 +141,134 @@
|
|
|
142
141
|
.sapphire-checkbox--checked .sapphire-checkbox__box,
|
|
143
142
|
.sapphire-checkbox--indeterminate .sapphire-checkbox__box {
|
|
144
143
|
border-width: var(--sapphire-global-size-generic-0);
|
|
145
|
-
background
|
|
146
|
-
--sapphire-semantic-color-background-action-primary-default
|
|
147
|
-
);
|
|
144
|
+
background: var(--sapphire-semantic-color-background-action-select-default);
|
|
148
145
|
}
|
|
149
146
|
|
|
150
147
|
.sapphire-checkbox--checked.sapphire-checkbox--error .sapphire-checkbox__box,
|
|
151
148
|
.sapphire-checkbox--indeterminate.sapphire-checkbox--error
|
|
152
149
|
.sapphire-checkbox__box {
|
|
153
|
-
background
|
|
154
|
-
--sapphire-semantic-color-background-negative-primary-default
|
|
155
|
-
);
|
|
150
|
+
background: var(--sapphire-semantic-color-background-action-danger-default);
|
|
156
151
|
}
|
|
157
152
|
|
|
158
153
|
/* HOVER */
|
|
159
154
|
|
|
160
155
|
/* Hover when not checked */
|
|
161
156
|
|
|
162
|
-
.sapphire-checkbox:not(:active):not(.is-active):not(
|
|
157
|
+
.sapphire-checkbox:not(:active):not(.is-disabled):not(.is-active):not(
|
|
163
158
|
.sapphire-checkbox--checked
|
|
164
159
|
).is-hover
|
|
165
160
|
.sapphire-checkbox__box,
|
|
166
|
-
.sapphire-checkbox:not(:active):not(.is-active):not(
|
|
161
|
+
.sapphire-checkbox:not(:active):not(.is-disabled):not(.is-active):not(
|
|
167
162
|
.sapphire-checkbox--checked
|
|
168
163
|
):not(.js-hover):hover
|
|
169
|
-
.sapphire-
|
|
170
|
-
|
|
171
|
-
border-color: var(--sapphire-semantic-color-border-control-hover);
|
|
164
|
+
.sapphire-checkbox__box {
|
|
165
|
+
border-color: var(--sapphire-semantic-color-border-field-hover);
|
|
172
166
|
}
|
|
173
167
|
|
|
174
|
-
.sapphire-checkbox--error:not(:active):not(.is-active):not(
|
|
168
|
+
.sapphire-checkbox--error:not(:active):not(.is-disabled):not(.is-active):not(
|
|
175
169
|
.sapphire-checkbox--checked
|
|
176
170
|
).is-hover
|
|
177
171
|
.sapphire-checkbox__box,
|
|
178
|
-
.sapphire-checkbox--error:not(:active):not(.is-active):not(
|
|
172
|
+
.sapphire-checkbox--error:not(:active):not(.is-disabled):not(.is-active):not(
|
|
179
173
|
.sapphire-checkbox--checked
|
|
180
174
|
):not(.js-hover):hover
|
|
181
|
-
.sapphire-
|
|
182
|
-
|
|
183
|
-
border-color: var(
|
|
184
|
-
--sapphire-semantic-color-background-negative-primary-hover
|
|
185
|
-
);
|
|
175
|
+
.sapphire-checkbox__box {
|
|
176
|
+
border-color: var(--sapphire-semantic-color-border-negative-hover);
|
|
186
177
|
}
|
|
187
178
|
|
|
188
179
|
/* Hover when checked (same UI as indeterminate) */
|
|
189
180
|
|
|
190
|
-
.sapphire-checkbox--checked:not(:active):not(.is-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
.sapphire-checkbox__input:not(:disabled)
|
|
194
|
-
~ .sapphire-checkbox__box,
|
|
195
|
-
.sapphire-checkbox--indeterminate:not(:active):not(.is-active).is-hover
|
|
181
|
+
.sapphire-checkbox--checked:not(:active):not(.is-disabled):not(
|
|
182
|
+
.is-active
|
|
183
|
+
).is-hover
|
|
196
184
|
.sapphire-checkbox__box,
|
|
197
|
-
.sapphire-checkbox--
|
|
185
|
+
.sapphire-checkbox--checked:not(:active):not(.is-disabled):not(.is-active):not(
|
|
198
186
|
.js-hover
|
|
199
187
|
):hover
|
|
200
|
-
.sapphire-
|
|
201
|
-
|
|
188
|
+
.sapphire-checkbox__box,
|
|
189
|
+
.sapphire-checkbox--indeterminate:not(:active):not(.is-disabled):not(
|
|
190
|
+
.is-active
|
|
191
|
+
).is-hover
|
|
192
|
+
.sapphire-checkbox__box,
|
|
193
|
+
.sapphire-checkbox--indeterminate:not(:active):not(.is-disabled):not(
|
|
194
|
+
.is-active
|
|
195
|
+
):not(.js-hover):hover
|
|
196
|
+
.sapphire-checkbox__box {
|
|
202
197
|
background-color: var(
|
|
203
|
-
--sapphire-semantic-color-background-action-
|
|
198
|
+
--sapphire-semantic-color-background-action-select-hover
|
|
204
199
|
);
|
|
205
200
|
}
|
|
206
201
|
|
|
207
202
|
.sapphire-checkbox--checked.sapphire-checkbox--error:not(:active):not(
|
|
208
|
-
.is-
|
|
209
|
-
).is-hover
|
|
203
|
+
.is-disabled
|
|
204
|
+
):not(.is-active).is-hover
|
|
210
205
|
.sapphire-checkbox__box,
|
|
211
206
|
.sapphire-checkbox--checked.sapphire-checkbox--error:not(:active):not(
|
|
212
|
-
.is-
|
|
213
|
-
):not(.js-hover):hover
|
|
214
|
-
.sapphire-
|
|
215
|
-
~ .sapphire-checkbox__box,
|
|
207
|
+
.is-disabled
|
|
208
|
+
):not(.is-active):not(.js-hover):hover
|
|
209
|
+
.sapphire-checkbox__box,
|
|
216
210
|
.sapphire-checkbox--indeterminate.sapphire-checkbox--error:not(:active):not(
|
|
217
|
-
.is-
|
|
218
|
-
).is-hover
|
|
211
|
+
.is-disabled
|
|
212
|
+
):not(.is-active).is-hover
|
|
219
213
|
.sapphire-checkbox__box,
|
|
220
214
|
.sapphire-checkbox--indeterminate.sapphire-checkbox--error:not(:active):not(
|
|
221
|
-
.is-
|
|
222
|
-
):not(.js-hover):hover
|
|
215
|
+
.is-disabled
|
|
216
|
+
):not(.is-active):not(.js-hover):hover
|
|
217
|
+
.sapphire-checkbox__box {
|
|
218
|
+
background: var(--sapphire-semantic-color-background-action-danger-hover);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* ACTIVE */
|
|
222
|
+
|
|
223
|
+
/* Active when not checked */
|
|
224
|
+
|
|
225
|
+
.sapphire-checkbox:not(.sapphire-checkbox--checked).is-active
|
|
226
|
+
.sapphire-checkbox__box,
|
|
227
|
+
.sapphire-checkbox:not(.sapphire-checkbox--checked):active
|
|
223
228
|
.sapphire-checkbox__input:not(:disabled)
|
|
224
229
|
~ .sapphire-checkbox__box {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
border-color: var(--sapphire-semantic-color-border-field-active);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.sapphire-checkbox--error:not(.sapphire-checkbox--checked).is-active
|
|
234
|
+
.sapphire-checkbox__box,
|
|
235
|
+
.sapphire-checkbox--error:not(.sapphire-checkbox--checked):active
|
|
236
|
+
.sapphire-checkbox__input:not(:disabled)
|
|
237
|
+
~ .sapphire-checkbox__box {
|
|
238
|
+
border-color: var(--sapphire-semantic-color-border-negative-active);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Active when checked (same UI as indeterminate) */
|
|
242
|
+
|
|
243
|
+
.sapphire-checkbox--checked.is-active .sapphire-checkbox__box,
|
|
244
|
+
.sapphire-checkbox--checked:active
|
|
245
|
+
.sapphire-checkbox__input:not(:disabled)
|
|
246
|
+
~ .sapphire-checkbox__box,
|
|
247
|
+
.sapphire-checkbox--indeterminate.is-active .sapphire-checkbox__box,
|
|
248
|
+
.sapphire-checkbox--indeterminate:active
|
|
249
|
+
.sapphire-checkbox__input:not(:disabled)
|
|
250
|
+
~ .sapphire-checkbox__box {
|
|
251
|
+
background: var(--sapphire-semantic-color-background-action-select-active);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.sapphire-checkbox--checked.sapphire-checkbox--error.is-active
|
|
255
|
+
.sapphire-checkbox__box,
|
|
256
|
+
.sapphire-checkbox--checked.sapphire-checkbox--error:active
|
|
257
|
+
.sapphire-checkbox__input:not(:disabled)
|
|
258
|
+
~ .sapphire-checkbox__box,
|
|
259
|
+
.sapphire-checkbox--indeterminate.sapphire-checkbox--error.is-active
|
|
260
|
+
.sapphire-checkbox__box,
|
|
261
|
+
.sapphire-checkbox--indeterminate.sapphire-checkbox--error:active
|
|
262
|
+
.sapphire-checkbox__input:not(:disabled)
|
|
263
|
+
~ .sapphire-checkbox__box {
|
|
264
|
+
background: var(--sapphire-semantic-color-background-action-danger-active);
|
|
228
265
|
}
|
|
229
266
|
|
|
230
267
|
/* FOCUS */
|
|
231
268
|
|
|
232
269
|
.sapphire-checkbox.is-focus .sapphire-checkbox__box,
|
|
233
|
-
.sapphire-checkbox:not(.js-focus)
|
|
234
|
-
.sapphire-
|
|
235
|
-
~ .sapphire-checkbox__box {
|
|
270
|
+
.sapphire-checkbox:not(.js-focus):has(input:focus-visible)
|
|
271
|
+
.sapphire-checkbox__box {
|
|
236
272
|
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
237
273
|
var(--sapphire-semantic-color-focus-ring);
|
|
238
274
|
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
@@ -240,15 +276,12 @@
|
|
|
240
276
|
|
|
241
277
|
/* DISABLED */
|
|
242
278
|
|
|
279
|
+
.sapphire-checkbox.is-disabled,
|
|
243
280
|
.sapphire-checkbox__input:disabled {
|
|
244
281
|
cursor: not-allowed;
|
|
245
282
|
}
|
|
246
283
|
|
|
247
|
-
.sapphire-checkbox
|
|
248
|
-
|
|
249
|
-
~ .sapphire-checkbox__box,
|
|
250
|
-
.sapphire-checkbox:not(.sapphire-checkbox--no-disabled)
|
|
251
|
-
.sapphire-checkbox__input:disabled
|
|
252
|
-
~ .sapphire-checkbox__label {
|
|
284
|
+
.sapphire-checkbox.is-disabled .sapphire-checkbox__box,
|
|
285
|
+
.sapphire-checkbox.is-disabled .sapphire-checkbox__label {
|
|
253
286
|
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
254
287
|
}
|
|
@@ -12,12 +12,12 @@ declare const styles: {
|
|
|
12
12
|
readonly "sapphire-checkbox--error": string;
|
|
13
13
|
readonly "sapphire-checkbox--checked": string;
|
|
14
14
|
readonly "sapphire-checkbox--indeterminate": string;
|
|
15
|
+
readonly "is-disabled": string;
|
|
15
16
|
readonly "is-active": string;
|
|
16
17
|
readonly "is-hover": string;
|
|
17
18
|
readonly "js-hover": string;
|
|
18
19
|
readonly "is-focus": string;
|
|
19
20
|
readonly "js-focus": string;
|
|
20
|
-
readonly "sapphire-checkbox--no-disabled": string;
|
|
21
21
|
};
|
|
22
22
|
export = styles;
|
|
23
23
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
.sapphire-contextual-help {
|
|
2
|
-
color: var(--sapphire-semantic-color-
|
|
3
|
-
line-height: var(--sapphire-global-size-line-height-
|
|
2
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
3
|
+
line-height: var(--sapphire-global-size-line-height-md);
|
|
4
4
|
max-width: var(--sapphire-global-size-generic-750);
|
|
5
5
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
6
6
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
7
|
-
font-size: var(--sapphire-semantic-size-font-
|
|
8
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
9
|
-
var(--sapphire-semantic-size-spacing-
|
|
7
|
+
font-size: var(--sapphire-semantic-size-font-body-sm);
|
|
8
|
+
padding: var(--sapphire-semantic-size-spacing-lg)
|
|
9
|
+
var(--sapphire-semantic-size-spacing-lg);
|
|
10
10
|
/* if implemented as focusable, we don't want the outline because this is not
|
|
11
11
|
* an an interactive element in itself */
|
|
12
12
|
outline: none;
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.sapphire-contextual-help__header {
|
|
30
|
-
padding-bottom: var(--sapphire-semantic-size-spacing-
|
|
30
|
+
padding-bottom: var(--sapphire-semantic-size-spacing-sm);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.sapphire-contextual-help__footer {
|
|
34
|
-
padding-top: var(--sapphire-semantic-size-spacing-
|
|
34
|
+
padding-top: var(--sapphire-semantic-size-spacing-2xs);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.sapphire-contextual-help--no-max-width {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
grid-auto-flow: column;
|
|
6
6
|
align-items: center;
|
|
7
7
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
8
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
8
|
+
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
|
|
11
|
-
--sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-
|
|
11
|
+
--sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-md);
|
|
12
12
|
|
|
13
13
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
14
14
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
var(--sapphire-dateField-icon-size) 1fr
|
|
33
33
|
var(--sapphire-dateField-icon-size);
|
|
34
34
|
|
|
35
|
-
height: var(--sapphire-semantic-size-height-
|
|
35
|
+
height: var(--sapphire-semantic-size-height-control-lg);
|
|
36
36
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
37
37
|
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-lg);
|
|
38
38
|
border: var(--sapphire-semantic-size-border-sm) solid
|
|
39
39
|
var(--sapphire-semantic-color-border-field-default);
|
|
40
|
-
background
|
|
40
|
+
background: var(--sapphire-semantic-color-background-field);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.sapphire-date-field--no-calendar {
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.sapphire-date-field--md {
|
|
60
|
-
--sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-
|
|
60
|
+
--sapphire-dateField-icon-size: var(--sapphire-semantic-size-icon-sm);
|
|
61
61
|
|
|
62
|
-
height: var(--sapphire-semantic-size-height-
|
|
62
|
+
height: var(--sapphire-semantic-size-height-control-md);
|
|
63
63
|
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
64
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
64
|
+
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.sapphire-date-field--range {
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
.sapphire-date-field__input-group {
|
|
72
72
|
display: grid;
|
|
73
73
|
grid-template-columns: min-content var(--sapphire-dateField-icon-size) min-content;
|
|
74
|
-
|
|
74
|
+
align-items: center;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.sapphire-date-field--md .sapphire-date-field__input-group {
|
|
78
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
78
|
+
gap: var(--sapphire-semantic-size-spacing-4xs);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.sapphire-date-field__input {
|
|
@@ -83,10 +83,18 @@
|
|
|
83
83
|
align-items: center;
|
|
84
84
|
height: 100%;
|
|
85
85
|
cursor: text;
|
|
86
|
-
font-size: var(--sapphire-semantic-size-font-control-
|
|
86
|
+
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
87
87
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
.sapphire-date-field__range-separator {
|
|
91
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
92
|
+
text-align: center;
|
|
93
|
+
}
|
|
94
|
+
.sapphire-date-field__range-separator::after {
|
|
95
|
+
content: '—';
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
.sapphire-date-field--md .sapphire-date-field__input {
|
|
91
99
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
92
100
|
}
|
|
@@ -95,14 +103,14 @@
|
|
|
95
103
|
* Editable segments
|
|
96
104
|
*/
|
|
97
105
|
.sapphire-date-field__segment {
|
|
98
|
-
color: var(--sapphire-semantic-color-
|
|
106
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
99
107
|
border-radius: var(--sapphire-semantic-size-radius-xs);
|
|
100
108
|
transition-property: color, background-color;
|
|
101
109
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
102
|
-
transition-timing-function:
|
|
110
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
103
111
|
text-align: right;
|
|
104
112
|
text-transform: uppercase;
|
|
105
|
-
padding: 0 var(--sapphire-semantic-size-spacing-
|
|
113
|
+
padding: 0 var(--sapphire-semantic-size-spacing-4xs);
|
|
106
114
|
caret-color: transparent;
|
|
107
115
|
}
|
|
108
116
|
|
|
@@ -113,19 +121,19 @@
|
|
|
113
121
|
|
|
114
122
|
.sapphire-date-field__segment:not(:disabled):not(.is-disabled):focus,
|
|
115
123
|
.sapphire-date-field__segment:not(:disabled):not(.is-disabled).is-focus {
|
|
116
|
-
color: var(--sapphire-semantic-color-
|
|
117
|
-
background
|
|
118
|
-
--sapphire-semantic-color-background-action-secondary-
|
|
124
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
125
|
+
background: var(
|
|
126
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
119
127
|
);
|
|
120
128
|
outline: none;
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
.sapphire-date-field__segment::selection {
|
|
124
|
-
background
|
|
132
|
+
background: transparent;
|
|
125
133
|
}
|
|
126
134
|
|
|
127
135
|
.sapphire-date-field__segment--filled {
|
|
128
|
-
color: var(--sapphire-semantic-color-
|
|
136
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
/**
|
|
@@ -135,13 +143,18 @@
|
|
|
135
143
|
padding: 0;
|
|
136
144
|
}
|
|
137
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Hover
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
.sapphire-date-field:not(.sapphire-date-field--error).is-hover,
|
|
151
|
+
.sapphire-date-field:not(.sapphire-date-field--error):not(.js-hover):hover {
|
|
152
|
+
border: var(--sapphire-semantic-size-border-sm) solid
|
|
153
|
+
var(--sapphire-semantic-color-border-field-hover);
|
|
154
|
+
}
|
|
155
|
+
|
|
138
156
|
/**
|
|
139
157
|
* Focus
|
|
140
|
-
*
|
|
141
|
-
* NOTE
|
|
142
|
-
* At the time of this writing only Firefox doesn't support :has selector by
|
|
143
|
-
* default https://caniuse.com/?search=%3Ahas
|
|
144
|
-
* But this is not a crucial aspect of the UI and we can live with this for a time.
|
|
145
158
|
*/
|
|
146
159
|
.sapphire-date-field:has(.sapphire-date-field__segment:focus),
|
|
147
160
|
.sapphire-date-field:has(.sapphire-date-field__segment.is-focus) {
|
|
@@ -154,7 +167,7 @@
|
|
|
154
167
|
* Hover
|
|
155
168
|
*/
|
|
156
169
|
.sapphire-date-field--error {
|
|
157
|
-
border-color: var(--sapphire-semantic-color-border-
|
|
170
|
+
border-color: var(--sapphire-semantic-color-border-negative-default);
|
|
158
171
|
}
|
|
159
172
|
|
|
160
173
|
/**
|
|
@@ -188,13 +201,13 @@
|
|
|
188
201
|
/* we don't want to transition outline-offset */
|
|
189
202
|
transition-property: color;
|
|
190
203
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
191
|
-
transition-timing-function:
|
|
204
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
192
205
|
cursor: pointer;
|
|
193
206
|
|
|
194
207
|
height: var(--sapphire-dateField-icon-size);
|
|
195
208
|
width: var(--sapphire-dateField-icon-size);
|
|
196
|
-
background
|
|
197
|
-
color: var(--sapphire-semantic-color-
|
|
209
|
+
background: transparent;
|
|
210
|
+
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
198
211
|
}
|
|
199
212
|
|
|
200
213
|
.sapphire-date-field__button--clear {
|
|
@@ -223,7 +236,7 @@
|
|
|
223
236
|
.sapphire-date-field__button:not(:disabled):not(.is-disabled):not(:active):not(
|
|
224
237
|
.is-active
|
|
225
238
|
).is-hover {
|
|
226
|
-
color: var(--sapphire-semantic-color-
|
|
239
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
227
240
|
}
|
|
228
241
|
|
|
229
242
|
/**
|
|
@@ -247,5 +260,5 @@
|
|
|
247
260
|
.sapphire-date-field__button:not(:disabled):not(
|
|
248
261
|
.is-disabled
|
|
249
262
|
):focus-visible:active {
|
|
250
|
-
color: var(--sapphire-semantic-color-
|
|
263
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
251
264
|
}
|
|
@@ -6,18 +6,19 @@ declare const styles: {
|
|
|
6
6
|
readonly "sapphire-date-field--range": string;
|
|
7
7
|
readonly "sapphire-date-field__input-group": string;
|
|
8
8
|
readonly "sapphire-date-field__input": string;
|
|
9
|
+
readonly "sapphire-date-field__range-separator": string;
|
|
9
10
|
readonly "sapphire-date-field__segment": string;
|
|
10
11
|
readonly "is-disabled": string;
|
|
11
12
|
readonly "is-focus": string;
|
|
12
13
|
readonly "sapphire-date-field__segment--filled": string;
|
|
13
14
|
readonly "sapphire-date-field__segment--separator": string;
|
|
14
15
|
readonly "sapphire-date-field--error": string;
|
|
16
|
+
readonly "is-hover": string;
|
|
17
|
+
readonly "js-hover": string;
|
|
15
18
|
readonly "sapphire-date-field__button": string;
|
|
16
19
|
readonly "sapphire-date-field__button--clear": string;
|
|
17
20
|
readonly "sapphire-date-field__icon": string;
|
|
18
21
|
readonly "is-active": string;
|
|
19
|
-
readonly "js-hover": string;
|
|
20
|
-
readonly "is-hover": string;
|
|
21
22
|
readonly "js-focus": string;
|
|
22
23
|
};
|
|
23
24
|
export = styles;
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
.sapphire-dialog {
|
|
22
22
|
border-radius: var(--sapphire-semantic-size-radius-lg);
|
|
23
|
-
background
|
|
23
|
+
background: var(--sapphire-semantic-color-background-surface);
|
|
24
24
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
25
|
-
color: var(--sapphire-semantic-color-
|
|
25
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
overflow: hidden;
|
|
28
28
|
max-height: 90vh;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
animation-name: fade-in;
|
|
37
37
|
animation-duration: var(--sapphire-semantic-time-fade-default);
|
|
38
|
-
animation-timing-function:
|
|
38
|
+
animation-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
39
39
|
animation-fill-mode: forwards;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
7
7
|
cursor: pointer;
|
|
8
|
-
background
|
|
8
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-default);
|
|
9
9
|
width: var(--sapphire-global-size-generic-800);
|
|
10
10
|
min-width: var(--sapphire-global-size-generic-800);
|
|
11
|
-
height: var(--sapphire-global-size-generic-
|
|
12
|
-
min-height: var(--sapphire-global-size-generic-
|
|
13
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
14
|
-
border-radius: var(--sapphire-semantic-size-radius-
|
|
11
|
+
height: var(--sapphire-global-size-generic-480);
|
|
12
|
+
min-height: var(--sapphire-global-size-generic-480);
|
|
13
|
+
padding: var(--sapphire-semantic-size-spacing-2xl);
|
|
14
|
+
border-radius: var(--sapphire-semantic-size-radius-xl);
|
|
15
15
|
transition-property: opacity, background-color, color;
|
|
16
16
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
17
|
-
transition-timing-function:
|
|
17
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
18
18
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
19
19
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
20
20
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
/* Dashed borders cannot be customised, so we use a trick with the SVG image to customise it */
|
|
43
43
|
mask: var(--mask-data);
|
|
44
44
|
-webkit-mask: var(--mask-data);
|
|
45
|
-
background: var(--sapphire-semantic-color-border-primary
|
|
46
|
-
border-radius: var(--sapphire-semantic-size-radius-
|
|
45
|
+
background: var(--sapphire-semantic-color-border-primary);
|
|
46
|
+
border-radius: var(--sapphire-semantic-size-radius-xl);
|
|
47
47
|
transition-property: opacity, background-color, color;
|
|
48
48
|
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
49
|
-
transition-timing-function:
|
|
49
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.sapphire-dropzone.sapphire-dropzone--error::before {
|
|
53
|
-
background: var(--sapphire-semantic-color-
|
|
53
|
+
background: var(--sapphire-semantic-color-foreground-negative);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.sapphire-dropzone:not(:disabled):not(.is-disabled):not(:active):not(
|
|
@@ -59,9 +59,7 @@
|
|
|
59
59
|
.sapphire-dropzone:not(:disabled):not(.is-disabled):not(:active):not(
|
|
60
60
|
.is-active
|
|
61
61
|
).is-hover {
|
|
62
|
-
background
|
|
63
|
-
--sapphire-semantic-color-background-action-secondary-hover
|
|
64
|
-
);
|
|
62
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-hover);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
.sapphire-dropzone:not(:disabled):not(.is-disabled).sapphire-dropzone:active,
|
|
@@ -71,9 +69,7 @@
|
|
|
71
69
|
.sapphire-dropzone:not(:disabled):not(
|
|
72
70
|
.is-disabled
|
|
73
71
|
).sapphire-dropzone.is-active {
|
|
74
|
-
background
|
|
75
|
-
--sapphire-semantic-color-background-selection-unselected-active
|
|
76
|
-
);
|
|
72
|
+
background: var(--sapphire-semantic-color-background-action-tertiary-active);
|
|
77
73
|
}
|
|
78
74
|
|
|
79
75
|
.sapphire-dropzone:focus {
|
|
@@ -100,12 +96,12 @@
|
|
|
100
96
|
|
|
101
97
|
.sapphire-dropzone--dropping {
|
|
102
98
|
background: var(
|
|
103
|
-
--sapphire-semantic-color-background-
|
|
99
|
+
--sapphire-semantic-color-background-action-select-secondary-default
|
|
104
100
|
);
|
|
105
101
|
}
|
|
106
102
|
|
|
107
103
|
.sapphire-dropzone.sapphire-dropzone--dropping::before {
|
|
108
|
-
background: var(--sapphire-semantic-color-
|
|
104
|
+
background: var(--sapphire-semantic-color-border-accent);
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
.sapphire-dropzone__content {
|
|
@@ -116,12 +112,14 @@
|
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
.sapphire-dropzone__icon {
|
|
119
|
-
color: var(--sapphire-semantic-color-
|
|
115
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
|
|
120
116
|
margin-bottom: var(--sapphire-semantic-size-spacing-control-vertical-lg);
|
|
121
117
|
}
|
|
122
118
|
|
|
123
119
|
.sapphire-dropzone--dropping .sapphire-dropzone__icon {
|
|
124
|
-
color: var(
|
|
120
|
+
color: var(
|
|
121
|
+
--sapphire-semantic-color-foreground-action-on-select-secondary-default
|
|
122
|
+
);
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
.sapphire-dropzone__heading {
|
|
@@ -129,5 +127,5 @@
|
|
|
129
127
|
}
|
|
130
128
|
|
|
131
129
|
.sapphire-dropzone--error .sapphire-dropzone__paragraph > * {
|
|
132
|
-
color: var(--sapphire-semantic-color-
|
|
130
|
+
color: var(--sapphire-semantic-color-foreground-negative);
|
|
133
131
|
}
|