@danske/sapphire-css 16.3.0 → 26.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -12
- package/build/themes/cjs/default-dark.d.ts +3 -2
- package/build/themes/cjs/default-dark.js +5 -1
- package/build/themes/cjs/default.d.ts +3 -2
- package/build/themes/cjs/default.js +5 -1
- package/build/themes/cjs/index.d.ts +4 -0
- package/build/themes/cjs/june-dark.d.ts +3 -2
- package/build/themes/cjs/june-dark.js +5 -1
- package/build/themes/cjs/june.d.ts +3 -2
- package/build/themes/cjs/june.js +5 -1
- package/build/themes/esm/default-dark.d.ts +3 -2
- package/build/themes/esm/default-dark.js +5 -1
- package/build/themes/esm/default.d.ts +3 -2
- package/build/themes/esm/default.js +5 -1
- package/build/themes/esm/index.d.ts +4 -0
- package/build/themes/esm/june-dark.d.ts +3 -2
- package/build/themes/esm/june-dark.js +5 -1
- package/build/themes/esm/june.d.ts +3 -2
- package/build/themes/esm/june.js +5 -1
- package/components/accordion/accordion.module.css +163 -0
- package/components/avatar/avatar.module.css +137 -0
- package/components/badge/badge.module.css +246 -79
- package/components/badge/badge.module.css.d.ts +42 -10
- package/components/button/button.module.css +401 -74
- package/components/button/button.module.css.d.ts +11 -5
- package/components/buttonGroup/buttonGroup.module.css +20 -4
- package/components/buttonGroup/buttonGroup.module.css.d.ts +2 -1
- package/components/calendar/calendar.module.css +9 -2
- package/components/calendar/calendar.module.css.d.ts +1 -2
- package/components/checkbox/checkbox.module.css +44 -11
- package/components/checkbox/checkbox.module.css.d.ts +3 -0
- package/components/dateField/dateField.module.css +81 -86
- package/components/dateField/dateField.module.css.d.ts +3 -6
- package/components/dialog/dialog.module.css +34 -15
- package/components/dialog/dialog.module.css.d.ts +2 -2
- package/components/field/field.module.css +164 -0
- package/components/fieldGroup/fieldGroup.module.css +8 -54
- package/components/fieldGroup/fieldGroup.module.css.d.ts +4 -8
- package/components/icon/icon.module.css +11 -6
- package/components/icon/icon.module.css.d.ts +1 -0
- package/components/iconButton/iconButton.module.css +356 -70
- package/components/iconButton/iconButton.module.css.d.ts +8 -4
- package/components/label/label.module.css +29 -0
- package/components/link/link.module.css +71 -13
- package/components/link/link.module.css.d.ts +7 -2
- package/components/list/list.module.css +47 -21
- package/components/list/list.module.css.d.ts +1 -1
- package/components/listbox/listbox.module.css +53 -13
- package/components/listbox/listbox.module.css.d.ts +3 -1
- package/components/notificationBadge/notificationBadge.module.css +126 -0
- package/components/panel/panel.module.css +32 -14
- package/components/panel/panel.module.css.d.ts +3 -2
- package/components/paragraph/paragraph.module.css +4 -7
- package/components/paragraph/paragraph.module.css.d.ts +1 -2
- package/components/radio/radio.module.css +34 -9
- package/components/radio/radio.module.css.d.ts +2 -0
- package/components/searchField/searchField.module.css +43 -19
- package/components/searchField/searchField.module.css.d.ts +2 -0
- package/components/segmentedControl/segmentedControl.module.css +7 -7
- package/components/select/select.module.css +22 -63
- package/components/select/select.module.css.d.ts +1 -5
- package/components/spinner/spinner.module.css +64 -0
- package/components/surface/surface.module.css +5 -1
- package/components/surface/surface.module.css.d.ts +1 -0
- package/components/switch/switch.module.css +44 -44
- package/components/switch/switch.module.css.d.ts +1 -0
- package/components/table/table.module.css +22 -40
- package/components/tabs/tabs.module.css +155 -23
- package/components/tabs/tabs.module.css.d.ts +9 -2
- package/components/text/text.module.css +207 -0
- package/components/textField/textField.module.css +67 -89
- package/components/textField/textField.module.css.d.ts +3 -7
- package/components/toast/toast.module.css +101 -0
- package/components/tooltip/tooltip.module.css +13 -8
- package/components/tooltip/tooltip.module.css.d.ts +1 -0
- package/package.json +13 -9
- package/themes/default-dark.assets.css +1 -0
- package/themes/default-dark.d.ts +3 -2
- package/themes/default-dark.js +5 -1
- package/themes/default-dark.tokens.scss +1 -0
- package/themes/default.assets.css +1 -0
- package/themes/default.d.ts +3 -2
- package/themes/default.js +5 -1
- package/themes/default.tokens.scss +1 -0
- package/themes/index.d.ts +4 -0
- package/themes/june-dark.d.ts +3 -2
- package/themes/june-dark.js +5 -1
- package/themes/june-dark.scss +3 -0
- package/themes/june.d.ts +3 -2
- package/themes/june.js +5 -1
- package/themes/june.scss +3 -0
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
.sapphire-calendar__header-title {
|
|
36
36
|
margin: 0 auto;
|
|
37
|
+
color: var(--sapphire-calendar-color-content-default);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.sapphire-calendar__tables-row {
|
|
@@ -155,8 +156,7 @@
|
|
|
155
156
|
padding: 0 var(--sapphire-calendar-size-spacing-title-horizontal);
|
|
156
157
|
}
|
|
157
158
|
|
|
158
|
-
.sapphire-calendar__header-title
|
|
159
|
-
.sapphire-calendar__button--title .sapphire-calendar__button-text {
|
|
159
|
+
.sapphire-calendar__header-title {
|
|
160
160
|
font-weight: var(--sapphire-calendar-font-weight-title);
|
|
161
161
|
font-size: var(--sapphire-calendar-size-font-title);
|
|
162
162
|
}
|
|
@@ -371,6 +371,13 @@
|
|
|
371
371
|
overflow: initial;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
.sapphire-calendar__grid-page-animation .exit-active {
|
|
375
|
+
/* The calendar page that's transitioning out should not accept any pointer event. Otherwise
|
|
376
|
+
there can be edge cases where quickly hovering over the grid area while page is being changed
|
|
377
|
+
can move focus to the page that's about to be removed from dom, which causes focus to get lost */
|
|
378
|
+
pointer-events: none;
|
|
379
|
+
}
|
|
380
|
+
|
|
374
381
|
/* Next page animation, applied on the wrapper, when next grid(s) are animating in */
|
|
375
382
|
.sapphire-calendar__grid-page-animation--next .enter {
|
|
376
383
|
transform: translateX(100%);
|
|
@@ -19,7 +19,6 @@ declare const styles: {
|
|
|
19
19
|
readonly "sapphire-calendar__week-number": string;
|
|
20
20
|
readonly "sapphire-calendar__button": string;
|
|
21
21
|
readonly "sapphire-calendar__button-text": string;
|
|
22
|
-
readonly "sapphire-calendar__button--title": string;
|
|
23
22
|
readonly "sapphire-calendar__button--day": string;
|
|
24
23
|
readonly "is-disabled": string;
|
|
25
24
|
readonly "is-focus": string;
|
|
@@ -38,9 +37,9 @@ declare const styles: {
|
|
|
38
37
|
readonly "sapphire-calendar__grid-page-animation": string;
|
|
39
38
|
readonly "enter": string;
|
|
40
39
|
readonly "exit": string;
|
|
40
|
+
readonly "exit-active": string;
|
|
41
41
|
readonly "sapphire-calendar__grid-page-animation--next": string;
|
|
42
42
|
readonly "enter-active": string;
|
|
43
|
-
readonly "exit-active": string;
|
|
44
43
|
readonly "sapphire-calendar__grid-page-animation--prev": string;
|
|
45
44
|
};
|
|
46
45
|
export = styles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.sapphire-checkbox {
|
|
2
2
|
font-family: var(--sapphire-checkbox-font-label-name);
|
|
3
3
|
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
4
|
position: relative;
|
|
6
5
|
max-width: 100%;
|
|
7
6
|
}
|
|
@@ -40,25 +39,41 @@
|
|
|
40
39
|
-moz-osx-font-smoothing: grayscale;
|
|
41
40
|
|
|
42
41
|
margin-left: var(--sapphire-checkbox-size-spacing-label);
|
|
43
|
-
font-size: var(--sapphire-checkbox-size-font-
|
|
42
|
+
font-size: var(--sapphire-checkbox-size-font-content-l);
|
|
44
43
|
color: var(--sapphire-checkbox-color-label);
|
|
45
|
-
line-height: var(--sapphire-checkbox-size-height-label);
|
|
44
|
+
line-height: var(--sapphire-checkbox-size-height-label-l);
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
.sapphire-checkbox__label:empty {
|
|
49
48
|
margin-left: 0;
|
|
50
49
|
}
|
|
51
50
|
|
|
51
|
+
.sapphire-checkbox--medium .sapphire-checkbox__label {
|
|
52
|
+
font-size: var(--sapphire-checkbox-size-font-content-m);
|
|
53
|
+
line-height: var(--sapphire-checkbox-size-height-label-m);
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
.sapphire-checkbox__error-text {
|
|
53
57
|
display: block;
|
|
54
58
|
font-family: var(--sapphire-checkbox-font-error-text-name);
|
|
55
59
|
font-weight: var(--sapphire-checkbox-font-error-text-weight);
|
|
56
|
-
font-size: var(--sapphire-checkbox-size-font-error-text);
|
|
60
|
+
font-size: var(--sapphire-checkbox-size-font-error-text-l);
|
|
61
|
+
line-height: var(--sapphire-checkbox-size-line-height-error-text-l);
|
|
57
62
|
color: var(--sapphire-checkbox-color-error-text);
|
|
58
63
|
margin-top: var(--sapphire-checkbox-size-spacing-error-text-vertical);
|
|
64
|
+
|
|
65
|
+
margin-left: calc(
|
|
66
|
+
var(--sapphire-checkbox-size-spacing-label) +
|
|
67
|
+
var(--sapphire-checkbox-size-width-box-l)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sapphire-checkbox__error-text--medium {
|
|
72
|
+
font-size: var(--sapphire-checkbox-size-font-error-text-m);
|
|
73
|
+
line-height: var(--sapphire-checkbox-size-line-height-error-text-m);
|
|
59
74
|
margin-left: calc(
|
|
60
75
|
var(--sapphire-checkbox-size-spacing-label) +
|
|
61
|
-
var(--sapphire-checkbox-size-width-box)
|
|
76
|
+
var(--sapphire-checkbox-size-width-box-m)
|
|
62
77
|
);
|
|
63
78
|
}
|
|
64
79
|
|
|
@@ -67,8 +82,8 @@
|
|
|
67
82
|
.sapphire-checkbox__box {
|
|
68
83
|
box-sizing: border-box;
|
|
69
84
|
position: relative;
|
|
70
|
-
width: var(--sapphire-checkbox-size-width-box);
|
|
71
|
-
height: var(--sapphire-checkbox-size-height-box);
|
|
85
|
+
width: var(--sapphire-checkbox-size-width-box-l);
|
|
86
|
+
height: var(--sapphire-checkbox-size-height-box-l);
|
|
72
87
|
border-radius: var(--sapphire-checkbox-size-radius);
|
|
73
88
|
border: var(--sapphire-checkbox-size-width-border-unchecked) solid
|
|
74
89
|
var(--sapphire-checkbox-color-border-unchecked-default);
|
|
@@ -80,13 +95,27 @@
|
|
|
80
95
|
align-items: center;
|
|
81
96
|
}
|
|
82
97
|
|
|
98
|
+
.sapphire-checkbox__box:has(~ .sapphire-checkbox__label:not(:empty)) {
|
|
99
|
+
margin-top: var(--sapphire-checkbox-size-spacing-box);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sapphire-checkbox--medium .sapphire-checkbox__box {
|
|
103
|
+
width: var(--sapphire-checkbox-size-width-box-m);
|
|
104
|
+
height: var(--sapphire-checkbox-size-height-box-m);
|
|
105
|
+
}
|
|
106
|
+
|
|
83
107
|
.sapphire-checkbox__box-icon {
|
|
84
108
|
display: inherit;
|
|
85
109
|
line-height: 0;
|
|
86
110
|
color: var(--sapphire-checkbox-color-icon);
|
|
87
111
|
margin: calc(var(--sapphire-checkbox-size-width-border-unchecked) * -1);
|
|
88
|
-
height: var(--sapphire-checkbox-size-height-box);
|
|
89
|
-
width: var(--sapphire-checkbox-size-width-box);
|
|
112
|
+
height: var(--sapphire-checkbox-size-height-box-l);
|
|
113
|
+
width: var(--sapphire-checkbox-size-width-box-l);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.sapphire-checkbox--medium .sapphire-checkbox__box-icon {
|
|
117
|
+
height: var(--sapphire-checkbox-size-height-box-m);
|
|
118
|
+
width: var(--sapphire-checkbox-size-width-box-m);
|
|
90
119
|
}
|
|
91
120
|
|
|
92
121
|
.sapphire-checkbox--error .sapphire-checkbox__box {
|
|
@@ -176,7 +205,11 @@
|
|
|
176
205
|
cursor: not-allowed;
|
|
177
206
|
}
|
|
178
207
|
|
|
179
|
-
.sapphire-
|
|
180
|
-
.sapphire-checkbox__input:disabled
|
|
208
|
+
.sapphire-checkbox:not(.sapphire-checkbox--no-disabled)
|
|
209
|
+
.sapphire-checkbox__input:disabled
|
|
210
|
+
~ .sapphire-checkbox__box,
|
|
211
|
+
.sapphire-checkbox:not(.sapphire-checkbox--no-disabled)
|
|
212
|
+
.sapphire-checkbox__input:disabled
|
|
213
|
+
~ .sapphire-checkbox__label {
|
|
181
214
|
opacity: var(--sapphire-checkbox-opacity-disabled);
|
|
182
215
|
}
|
|
@@ -2,7 +2,9 @@ declare const styles: {
|
|
|
2
2
|
readonly "sapphire-checkbox": string;
|
|
3
3
|
readonly "sapphire-checkbox__input": string;
|
|
4
4
|
readonly "sapphire-checkbox__label": string;
|
|
5
|
+
readonly "sapphire-checkbox--medium": string;
|
|
5
6
|
readonly "sapphire-checkbox__error-text": string;
|
|
7
|
+
readonly "sapphire-checkbox__error-text--medium": string;
|
|
6
8
|
readonly "sapphire-checkbox__box": string;
|
|
7
9
|
readonly "sapphire-checkbox__box-icon": string;
|
|
8
10
|
readonly "sapphire-checkbox--error": string;
|
|
@@ -13,6 +15,7 @@ declare const styles: {
|
|
|
13
15
|
readonly "js-hover": string;
|
|
14
16
|
readonly "is-focus": string;
|
|
15
17
|
readonly "js-focus": string;
|
|
18
|
+
readonly "sapphire-checkbox--no-disabled": string;
|
|
16
19
|
};
|
|
17
20
|
export = styles;
|
|
18
21
|
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
.sapphire-date-field {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: grid;
|
|
4
4
|
font-family: var(--sapphire-date-field-font-name);
|
|
5
|
-
|
|
5
|
+
grid-auto-flow: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
line-height: var(--sapphire-date-field-size-line-height-content);
|
|
8
|
+
gap: var(--sapphire-date-field-size-spacing-control-gap);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
width: var(--sapphire-date-field-size-width-control-default);
|
|
6
11
|
|
|
7
12
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
8
13
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -17,60 +22,82 @@
|
|
|
17
22
|
*/
|
|
18
23
|
-webkit-font-smoothing: antialiased;
|
|
19
24
|
-moz-osx-font-smoothing: grayscale;
|
|
20
|
-
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.sapphire-date-field__label {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: var(--sapphire-date-field-size-spacing-label-horizontal);
|
|
28
|
-
min-height: var(--sapphire-date-field-size-height-label);
|
|
29
|
-
margin-bottom: var(--sapphire-date-field-size-spacing-label-vertical);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sapphire-date-field__label-text {
|
|
33
|
-
font-size: var(--sapphire-date-field-size-font-label);
|
|
34
|
-
font-weight: var(--sapphire-date-field-size-font-weight-label);
|
|
35
|
-
line-height: var(--sapphire-date-field-size-line-height-label);
|
|
36
|
-
color: var(--sapphire-date-field-color-content-label);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.sapphire-date-field__content {
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
display: grid;
|
|
42
|
-
grid-auto-flow: column;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: var(--sapphire-date-field-size-spacing-control-gap);
|
|
45
25
|
/*
|
|
46
26
|
* The right-side "clear" button column should always take space even if the
|
|
47
27
|
* button isn't there. This is to make sure the field doesn't jump when the
|
|
48
28
|
* "clear" button appears in the last column.
|
|
49
29
|
*/
|
|
50
|
-
grid-template-columns:
|
|
51
|
-
|
|
30
|
+
grid-template-columns:
|
|
31
|
+
var(--sapphire-date-field-size-width-button-l) auto
|
|
32
|
+
var(--sapphire-date-field-size-width-button-l);
|
|
33
|
+
|
|
34
|
+
height: var(--sapphire-date-field-size-height-field-l);
|
|
52
35
|
border-radius: var(--sapphire-date-field-size-radius-field);
|
|
53
|
-
padding: 0 var(--sapphire-date-field-size-spacing-control-horizontal);
|
|
36
|
+
padding: 0 var(--sapphire-date-field-size-spacing-control-horizontal-l);
|
|
54
37
|
border: var(--sapphire-date-field-size-width-border) solid
|
|
55
38
|
var(--sapphire-date-field-color-border-default);
|
|
56
39
|
background-color: var(--sapphire-date-field-color-background-field);
|
|
57
40
|
}
|
|
58
41
|
|
|
42
|
+
.sapphire-date-field--medium {
|
|
43
|
+
grid-template-columns:
|
|
44
|
+
var(--sapphire-date-field-size-width-button-m) auto
|
|
45
|
+
var(--sapphire-date-field-size-width-button-m);
|
|
46
|
+
|
|
47
|
+
height: var(--sapphire-date-field-size-height-field-m);
|
|
48
|
+
padding: 0 var(--sapphire-date-field-size-spacing-control-horizontal-m);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sapphire-date-field--range {
|
|
52
|
+
width: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.sapphire-date-field.sapphire-date-field--range {
|
|
56
|
+
grid-template-columns:
|
|
57
|
+
var(--sapphire-date-field-size-width-button-l) min-content
|
|
58
|
+
var(--sapphire-date-field-size-width-button-l)
|
|
59
|
+
min-content var(--sapphire-date-field-size-width-button-l);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sapphire-date-field--medium.sapphire-date-field--range {
|
|
63
|
+
grid-template-columns:
|
|
64
|
+
var(--sapphire-date-field-size-width-button-m) min-content
|
|
65
|
+
var(--sapphire-date-field-size-width-button-m)
|
|
66
|
+
min-content var(--sapphire-date-field-size-width-button-m);
|
|
67
|
+
}
|
|
68
|
+
|
|
59
69
|
.sapphire-date-field__input {
|
|
60
70
|
display: flex;
|
|
61
71
|
align-items: center;
|
|
62
72
|
height: 100%;
|
|
63
73
|
cursor: text;
|
|
64
|
-
|
|
65
|
-
font-size: var(--sapphire-date-field-size-font-content);
|
|
74
|
+
font-size: var(--sapphire-date-field-size-font-content-l);
|
|
66
75
|
font-weight: var(--sapphire-date-field-size-font-weight-input);
|
|
76
|
+
min-width: var(--sapphire-date-field-size-min-width-field-l);
|
|
77
|
+
}
|
|
78
|
+
.sapphire-date-field__input:first-of-type {
|
|
79
|
+
margin-left: var(--sapphire-date-field-size-spacing-icon-l);
|
|
80
|
+
}
|
|
81
|
+
.sapphire-date-field__input:last-of-type {
|
|
82
|
+
margin-right: var(--sapphire-date-field-size-spacing-icon-l);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sapphire-date-field--medium .sapphire-date-field__input {
|
|
86
|
+
font-size: var(--sapphire-date-field-size-font-content-m);
|
|
87
|
+
min-width: var(--sapphire-date-field-size-min-width-field-m);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.sapphire-date-field--medium .sapphire-date-field__input:first-of-type {
|
|
91
|
+
margin-left: var(--sapphire-date-field-size-spacing-icon-m);
|
|
92
|
+
}
|
|
93
|
+
.sapphire-date-field--medium .sapphire-date-field__input:last-of-type {
|
|
94
|
+
margin-right: var(--sapphire-date-field-size-spacing-icon-m);
|
|
67
95
|
}
|
|
68
96
|
|
|
69
97
|
/**
|
|
70
98
|
* Editable segments
|
|
71
99
|
*/
|
|
72
100
|
.sapphire-date-field__segment {
|
|
73
|
-
padding: 0 var(--sapphire-date-field-size-spacing-segment-horizontal);
|
|
74
101
|
color: var(--sapphire-date-field-color-content-segment-placeholder);
|
|
75
102
|
border-radius: var(--sapphire-date-field-size-radius-segment);
|
|
76
103
|
transition-property: color, background-color;
|
|
@@ -78,6 +105,7 @@
|
|
|
78
105
|
transition-timing-function: ease-in-out;
|
|
79
106
|
text-align: right;
|
|
80
107
|
text-transform: uppercase;
|
|
108
|
+
padding: 0 var(--sapphire-date-field-size-spacing-segment-horizontal);
|
|
81
109
|
}
|
|
82
110
|
|
|
83
111
|
.sapphire-date-field__segment:focus,
|
|
@@ -95,34 +123,6 @@
|
|
|
95
123
|
color: var(--sapphire-date-field-color-content-segment-unselected);
|
|
96
124
|
}
|
|
97
125
|
|
|
98
|
-
/**
|
|
99
|
-
* Note
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
.sapphire-date-field__note-row {
|
|
103
|
-
display: flex;
|
|
104
|
-
justify-content: space-between;
|
|
105
|
-
font-size: var(--sapphire-date-field-size-font-note);
|
|
106
|
-
line-height: var(--sapphire-date-field-size-line-height-note);
|
|
107
|
-
color: var(--sapphire-date-field-color-content-note-default);
|
|
108
|
-
margin-top: var(--sapphire-date-field-size-spacing-note-vertical);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.sapphire-date-field__note {
|
|
112
|
-
display: block;
|
|
113
|
-
font-size: var(--sapphire-date-field-size-font-note);
|
|
114
|
-
line-height: var(--sapphire-date-field-size-line-height-note);
|
|
115
|
-
color: var(--sapphire-date-field-color-content-note-default);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.sapphire-date-field--error .sapphire-date-field__note {
|
|
119
|
-
color: var(--sapphire-date-field-color-content-note-error);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.sapphire-date-field--error .sapphire-date-field__content {
|
|
123
|
-
border-color: var(--sapphire-date-field-color-border-error);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
126
|
/**
|
|
127
127
|
* Focus
|
|
128
128
|
*
|
|
@@ -131,24 +131,18 @@
|
|
|
131
131
|
* default https://caniuse.com/?search=%3Ahas
|
|
132
132
|
* But this is not a crucial aspect of the UI and we can live with this for a time.
|
|
133
133
|
*/
|
|
134
|
-
.sapphire-date-
|
|
135
|
-
.sapphire-date-
|
|
134
|
+
.sapphire-date-field:has(.sapphire-date-field__segment:focus),
|
|
135
|
+
.sapphire-date-field:has(.sapphire-date-field__segment.is-focus) {
|
|
136
136
|
outline: var(--sapphire-date-field-size-focus-ring) solid
|
|
137
137
|
var(--sapphire-date-field-color-focus-ring);
|
|
138
138
|
outline-offset: calc(-1 * var(--sapphire-date-field-size-focus-ring));
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
142
|
+
* Hover
|
|
143
143
|
*/
|
|
144
|
-
.sapphire-date-field
|
|
145
|
-
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.sapphire-date-field.is-disabled .sapphire-date-field__button,
|
|
150
|
-
.sapphire-date-field.is-disabled .sapphire-date-field__input {
|
|
151
|
-
cursor: not-allowed;
|
|
144
|
+
.sapphire-date-field--error {
|
|
145
|
+
border-color: var(--sapphire-date-field-color-border-error);
|
|
152
146
|
}
|
|
153
147
|
|
|
154
148
|
/**
|
|
@@ -185,18 +179,28 @@
|
|
|
185
179
|
transition-timing-function: ease-in-out;
|
|
186
180
|
cursor: pointer;
|
|
187
181
|
|
|
188
|
-
height: var(--sapphire-date-field-size-height-button);
|
|
189
|
-
width: var(--sapphire-date-field-size-width-button);
|
|
182
|
+
height: var(--sapphire-date-field-size-height-button-l);
|
|
183
|
+
width: var(--sapphire-date-field-size-width-button-l);
|
|
190
184
|
background-color: transparent;
|
|
191
185
|
color: var(--sapphire-date-field-color-content-button-default);
|
|
192
186
|
}
|
|
193
187
|
|
|
188
|
+
.sapphire-date-field--medium .sapphire-date-field__button {
|
|
189
|
+
height: var(--sapphire-date-field-size-height-button-m);
|
|
190
|
+
width: var(--sapphire-date-field-size-width-button-m);
|
|
191
|
+
}
|
|
192
|
+
|
|
194
193
|
/**
|
|
195
194
|
* Icon (button)
|
|
196
195
|
*/
|
|
197
196
|
.sapphire-date-field__icon {
|
|
198
|
-
height: var(--sapphire-date-field-size-icon);
|
|
199
|
-
width: var(--sapphire-date-field-size-icon);
|
|
197
|
+
height: var(--sapphire-date-field-size-icon-l);
|
|
198
|
+
width: var(--sapphire-date-field-size-icon-l);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.sapphire-date-field--medium .sapphire-date-field__icon {
|
|
202
|
+
height: var(--sapphire-date-field-size-icon-m);
|
|
203
|
+
width: var(--sapphire-date-field-size-icon-m);
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
/**
|
|
@@ -220,15 +224,6 @@
|
|
|
220
224
|
var(--sapphire-date-field-color-focus-ring);
|
|
221
225
|
}
|
|
222
226
|
|
|
223
|
-
/**
|
|
224
|
-
* Disabled (buttons)
|
|
225
|
-
*/
|
|
226
|
-
.sapphire-date-field__button:disabled,
|
|
227
|
-
.sapphire-date-field__button.is-disabled {
|
|
228
|
-
opacity: var(--sapphire-date-field-opacity-disabled);
|
|
229
|
-
cursor: not-allowed;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
227
|
/**
|
|
233
228
|
* Active (buttons)
|
|
234
229
|
*/
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-date-field": string;
|
|
3
|
-
readonly "sapphire-date-
|
|
4
|
-
readonly "sapphire-date-
|
|
5
|
-
readonly "sapphire-date-field__content": string;
|
|
3
|
+
readonly "sapphire-date-field--medium": string;
|
|
4
|
+
readonly "sapphire-date-field--range": string;
|
|
6
5
|
readonly "sapphire-date-field__input": string;
|
|
7
6
|
readonly "sapphire-date-field__segment": string;
|
|
8
7
|
readonly "is-focus": string;
|
|
9
8
|
readonly "sapphire-date-field__segment--filled": string;
|
|
10
|
-
readonly "sapphire-date-field__note-row": string;
|
|
11
|
-
readonly "sapphire-date-field__note": string;
|
|
12
9
|
readonly "sapphire-date-field--error": string;
|
|
13
|
-
readonly "is-disabled": string;
|
|
14
10
|
readonly "sapphire-date-field__button": string;
|
|
15
11
|
readonly "sapphire-date-field__icon": string;
|
|
12
|
+
readonly "is-disabled": string;
|
|
16
13
|
readonly "is-active": string;
|
|
17
14
|
readonly "js-hover": string;
|
|
18
15
|
readonly "is-hover": string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
.sapphire-dialog {
|
|
2
2
|
border-radius: var(--sapphire-dialog-size-radius);
|
|
3
|
-
background-color: var(--sapphire-dialog-color-background
|
|
3
|
+
background-color: var(--sapphire-dialog-color-background);
|
|
4
|
+
font-family: var(--sapphire-dialog-font-name);
|
|
5
|
+
color: var(--sapphire-dialog-color-content);
|
|
4
6
|
box-sizing: border-box;
|
|
5
7
|
overflow: hidden;
|
|
6
8
|
max-height: 90vh;
|
|
@@ -13,15 +15,15 @@
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.sapphire-dialog--small {
|
|
16
|
-
width: var(--sapphire-dialog-size-width-
|
|
18
|
+
width: var(--sapphire-dialog-size-width-s);
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
.sapphire-dialog--medium {
|
|
20
|
-
width: var(--sapphire-dialog-size-width-
|
|
22
|
+
width: var(--sapphire-dialog-size-width-m);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
.sapphire-dialog--large {
|
|
24
|
-
width: var(--sapphire-dialog-size-width-
|
|
26
|
+
width: var(--sapphire-dialog-size-width-l);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
.sapphire-dialog-header {
|
|
@@ -41,11 +43,6 @@
|
|
|
41
43
|
var(--sapphire-dialog-size-spacing-header-left-passive);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
.sapphire-dialog--scrolled .sapphire-dialog-header {
|
|
45
|
-
box-shadow: 0 var(--sapphire-dialog-size-border) 0
|
|
46
|
-
var(--sapphire-dialog-color-border-scrollable);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
46
|
.sapphire-dialog-close-button-container {
|
|
50
47
|
align-self: flex-start;
|
|
51
48
|
}
|
|
@@ -56,6 +53,7 @@
|
|
|
56
53
|
var(--sapphire-dialog-size-spacing-body-bottom-default)
|
|
57
54
|
var(--sapphire-dialog-size-spacing-body-left-default);
|
|
58
55
|
overflow-y: auto;
|
|
56
|
+
overflow-x: hidden;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
.sapphire-dialog--passive .sapphire-dialog-body {
|
|
@@ -72,10 +70,31 @@
|
|
|
72
70
|
var(--sapphire-dialog-size-spacing-footer-left-default);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
|
-
.sapphire-dialog
|
|
76
|
-
border-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
.sapphire-dialog-header + .sapphire-dialog-body {
|
|
74
|
+
/** invisible line wrap attached only for visual consistency, once we get attached border-bottom with scrolled content **/
|
|
75
|
+
border-top: var(--sapphire-dialog-size-border) solid transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.sapphire-dialog-header + .sapphire-dialog-body.sapphire-dialog-body--scrolled {
|
|
79
|
+
border-top: var(--sapphire-dialog-size-border) solid
|
|
80
|
+
var(--sapphire-dialog-color-separator);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sapphire-dialog-body + .sapphire-dialog-footer {
|
|
84
|
+
/** invisible line wrap attached only for visual consistency, once we get attached border-bottom with scrolled content **/
|
|
85
|
+
border-top: var(--sapphire-dialog-size-border) solid transparent;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.sapphire-dialog-body.sapphire-dialog-body--scrollable
|
|
89
|
+
+ .sapphire-dialog-footer {
|
|
90
|
+
border-top: var(--sapphire-dialog-size-border) solid
|
|
91
|
+
var(--sapphire-dialog-color-separator);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sapphire-dialog:has(.sapphire-dialog-body--scrollable)
|
|
95
|
+
> .sapphire-dialog-footer {
|
|
96
|
+
padding: var(--sapphire-dialog-size-spacing-footer-top-scrollable)
|
|
97
|
+
var(--sapphire-dialog-size-spacing-footer-right-scrollable)
|
|
98
|
+
var(--sapphire-dialog-size-spacing-footer-bottom-scrollable)
|
|
99
|
+
var(--sapphire-dialog-size-spacing-footer-left-scrollable);
|
|
81
100
|
}
|
|
@@ -5,11 +5,11 @@ declare const styles: {
|
|
|
5
5
|
readonly "sapphire-dialog--large": string;
|
|
6
6
|
readonly "sapphire-dialog-header": string;
|
|
7
7
|
readonly "sapphire-dialog--passive": string;
|
|
8
|
-
readonly "sapphire-dialog--scrolled": string;
|
|
9
8
|
readonly "sapphire-dialog-close-button-container": string;
|
|
10
9
|
readonly "sapphire-dialog-body": string;
|
|
11
10
|
readonly "sapphire-dialog-footer": string;
|
|
12
|
-
readonly "sapphire-dialog--
|
|
11
|
+
readonly "sapphire-dialog-body--scrolled": string;
|
|
12
|
+
readonly "sapphire-dialog-body--scrollable": string;
|
|
13
13
|
};
|
|
14
14
|
export = styles;
|
|
15
15
|
|