@danske/sapphire-css 32.2.0 → 33.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 -1
- package/build/themes/cjs/default.js +2 -1
- package/build/themes/cjs/index.d.ts +2 -1
- package/build/themes/esm/default-dark.js +1 -1
- package/build/themes/esm/default.js +2 -1
- package/build/themes/esm/index.d.ts +2 -1
- package/components/accordion/accordion.module.css +38 -40
- package/components/avatar/avatar.module.css +61 -51
- package/components/avatar/avatar.module.css.d.ts +4 -4
- package/components/backdrop/backdrop.module.css +3 -3
- package/components/badge/badge.module.css +257 -135
- package/components/badge/badge.module.css.d.ts +3 -3
- package/components/button/button.module.css +200 -400
- package/components/button/button.module.css.d.ts +6 -7
- package/components/buttonGroup/buttonGroup.module.css +6 -6
- package/components/buttonGroup/buttonGroup.module.css.d.ts +2 -2
- package/components/calendar/calendar.module.css +90 -86
- package/components/checkbox/checkbox.module.css +59 -51
- package/components/checkbox/checkbox.module.css.d.ts +2 -2
- package/components/contextualHelp/contextualHelp.module.css +13 -10
- package/components/dateField/dateField.module.css +66 -64
- package/components/dateField/dateField.module.css.d.ts +1 -1
- package/components/dialog/dialog.module.css +13 -13
- package/components/dialog/dialog.module.css.d.ts +4 -4
- package/components/dropzone/dropzone.module.css +29 -23
- package/components/feedbackMessage/feedbackMessage.module.css +15 -15
- package/components/field/field.module.css +16 -16
- package/components/field/field.module.css.d.ts +1 -1
- package/components/fieldGroup/fieldGroup.module.css +4 -4
- package/components/fieldGroup/fieldGroup.module.css.d.ts +1 -1
- package/components/heading/heading.module.css +37 -85
- package/components/icon/icon.module.css +12 -12
- package/components/icon/icon.module.css.d.ts +4 -4
- package/components/iconButton/iconButton.module.css +130 -366
- package/components/iconButton/iconButton.module.css.d.ts +7 -8
- package/components/label/label.module.css +11 -11
- package/components/label/label.module.css.d.ts +1 -1
- package/components/labeledValue/labeledValue.module.css +7 -7
- package/components/labeledValue/labeledValue.module.css.d.ts +2 -2
- package/components/link/link.module.css +22 -22
- package/components/link/link.module.css.d.ts +2 -2
- package/components/list/list.module.css +41 -31
- package/components/listbox/listbox.module.css +80 -66
- package/components/listbox/listbox.module.css.d.ts +2 -2
- package/components/modalLayout/modalLayout.module.css +9 -11
- package/components/notificationBadge/notificationBadge.module.css +23 -25
- package/components/notificationBadge/notificationBadge.module.css.d.ts +3 -3
- package/components/pagination/pagination.module.css +16 -16
- package/components/panel/panel.module.css +4 -4
- package/components/panel/panel.module.css.d.ts +1 -1
- package/components/paragraph/paragraph.module.css +8 -8
- package/components/paragraph/paragraph.module.css.d.ts +2 -2
- package/components/popover/popover.module.css +6 -6
- package/components/radio/radio.module.css +32 -32
- package/components/radio/radio.module.css.d.ts +1 -1
- package/components/searchField/searchField.module.css +41 -45
- package/components/searchField/searchField.module.css.d.ts +1 -2
- package/components/segmentedControl/segmentedControl.module.css +33 -35
- package/components/segmentedControl/segmentedControl.module.css.d.ts +2 -2
- package/components/select/select.module.css +32 -32
- package/components/select/select.module.css.d.ts +1 -1
- package/components/skeleton/skeleton.module.css +6 -8
- package/components/spinner/spinner.module.css +22 -22
- package/components/spinner/spinner.module.css.d.ts +4 -4
- package/components/surface/surface.module.css +3 -7
- package/components/surface/surface.module.css.d.ts +0 -1
- package/components/switch/switch.module.css +45 -39
- package/components/switch/switch.module.css.d.ts +1 -1
- package/components/table/table.module.css +66 -54
- package/components/tabs/tabs.module.css +46 -45
- package/components/tabs/tabs.module.css.d.ts +2 -2
- package/components/tag/tag.module.css +32 -24
- package/components/text/text.module.css +48 -96
- package/components/textField/textField.module.css +78 -72
- package/components/textField/textField.module.css.d.ts +1 -1
- package/components/toast/toast.module.css +17 -19
- package/components/tooltip/tooltip.module.css +12 -12
- package/package.json +3 -3
- package/themes/default-dark.js +1 -1
- package/themes/default.js +2 -1
- package/themes/index.d.ts +2 -1
- package/build/themes/cjs/june-dark.d.ts +0 -5
- package/build/themes/cjs/june-dark.js +0 -13
- package/build/themes/cjs/june.d.ts +0 -5
- package/build/themes/cjs/june.js +0 -13
- package/build/themes/esm/june-dark.d.ts +0 -5
- package/build/themes/esm/june-dark.js +0 -8
- package/build/themes/esm/june.d.ts +0 -5
- package/build/themes/esm/june.js +0 -8
- package/themes/default-dark.css +0 -2
- package/themes/june-dark.css +0 -3
- package/themes/june-dark.d.ts +0 -5
- package/themes/june-dark.js +0 -13
- package/themes/june-dark.scss +0 -3
- package/themes/june.css +0 -3
- package/themes/june.d.ts +0 -5
- package/themes/june.js +0 -13
- package/themes/june.scss +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.sapphire-radio {
|
|
2
2
|
display: inline-flex;
|
|
3
|
-
font-family: var(--sapphire-
|
|
3
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
position: relative;
|
|
6
6
|
}
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.sapphire-radio__label {
|
|
22
|
-
margin-left: var(--sapphire-
|
|
23
|
-
font-size: var(--sapphire-
|
|
24
|
-
line-height: var(--sapphire-
|
|
25
|
-
color: var(--sapphire-
|
|
22
|
+
margin-left: var(--sapphire-semantic-size-spacing-20);
|
|
23
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
24
|
+
line-height: var(--sapphire-semantic-size-height-control-xs);
|
|
25
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
26
26
|
|
|
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
|
|
@@ -39,52 +39,52 @@
|
|
|
39
39
|
-moz-osx-font-smoothing: grayscale;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.sapphire-radio--
|
|
43
|
-
font-size: var(--sapphire-
|
|
44
|
-
line-height: var(--sapphire-
|
|
42
|
+
.sapphire-radio--md .sapphire-radio__label {
|
|
43
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
44
|
+
line-height: var(--sapphire-semantic-size-height-control-2xs);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/* The radio box */
|
|
48
48
|
|
|
49
49
|
.sapphire-radio__box {
|
|
50
50
|
box-sizing: border-box;
|
|
51
|
-
background-color: var(
|
|
52
|
-
|
|
53
|
-
);
|
|
54
|
-
width: var(--sapphire-radio-size-width-box-l);
|
|
55
|
-
height: var(--sapphire-radio-size-height-box-l);
|
|
51
|
+
background-color: var(--sapphire-semantic-color-background-control-default);
|
|
52
|
+
width: var(--sapphire-semantic-size-height-box-lg);
|
|
53
|
+
height: var(--sapphire-semantic-size-height-box-lg);
|
|
56
54
|
flex-shrink: 0;
|
|
57
55
|
border-radius: 50%;
|
|
58
|
-
border: var(--sapphire-
|
|
59
|
-
var(--sapphire-
|
|
56
|
+
border: var(--sapphire-semantic-size-border-md) solid
|
|
57
|
+
var(--sapphire-semantic-color-border-control-default);
|
|
60
58
|
position: relative;
|
|
61
|
-
margin-top: var(--sapphire-
|
|
59
|
+
margin-top: var(--sapphire-semantic-size-spacing-5);
|
|
62
60
|
|
|
63
61
|
transition-property: background-color, border-color, border-width;
|
|
64
|
-
transition-duration: var(--sapphire-
|
|
62
|
+
transition-duration: var(--sapphire-semantic-time-fade-quick);
|
|
65
63
|
transition-timing-function: ease-in-out;
|
|
66
64
|
}
|
|
67
65
|
|
|
68
|
-
.sapphire-radio--
|
|
69
|
-
width: var(--sapphire-
|
|
70
|
-
height: var(--sapphire-
|
|
66
|
+
.sapphire-radio--md .sapphire-radio__box {
|
|
67
|
+
width: var(--sapphire-semantic-size-height-box-md);
|
|
68
|
+
height: var(--sapphire-semantic-size-height-box-md);
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
.sapphire-radio--checked .sapphire-radio__box {
|
|
74
|
-
border-color: var(
|
|
72
|
+
border-color: var(
|
|
73
|
+
--sapphire-semantic-color-background-action-primary-default
|
|
74
|
+
);
|
|
75
75
|
border-width: calc(
|
|
76
76
|
(
|
|
77
|
-
var(--sapphire-
|
|
78
|
-
var(--sapphire-
|
|
77
|
+
var(--sapphire-semantic-size-height-box-lg) -
|
|
78
|
+
var(--sapphire-global-size-generic-20)
|
|
79
79
|
) / 2
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.sapphire-radio--
|
|
83
|
+
.sapphire-radio--md.sapphire-radio--checked .sapphire-radio__box {
|
|
84
84
|
border-width: calc(
|
|
85
85
|
(
|
|
86
|
-
var(--sapphire-
|
|
87
|
-
var(--sapphire-
|
|
86
|
+
var(--sapphire-semantic-size-height-box-md) -
|
|
87
|
+
var(--sapphire-global-size-generic-15)
|
|
88
88
|
) / 2
|
|
89
89
|
);
|
|
90
90
|
}
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
):hover
|
|
107
107
|
.sapphire-radio__input:not(:disabled)
|
|
108
108
|
~ .sapphire-radio__box {
|
|
109
|
-
border-color: var(--sapphire-
|
|
109
|
+
border-color: var(--sapphire-semantic-color-border-control-hover);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/* Hover when checked */
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
.sapphire-radio--checked:not(:active):not(.is-active):not(.js-hover):hover
|
|
117
117
|
.sapphire-radio__input:not(:disabled)
|
|
118
118
|
~ .sapphire-radio__box {
|
|
119
|
-
border-color: var(--sapphire-
|
|
119
|
+
border-color: var(--sapphire-semantic-color-background-action-primary-hover);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/* FOCUS */
|
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
.sapphire-radio:not(.js-focus)
|
|
126
126
|
.sapphire-radio__input:focus-visible
|
|
127
127
|
~ .sapphire-radio__box {
|
|
128
|
-
outline: var(--sapphire-
|
|
129
|
-
var(--sapphire-
|
|
130
|
-
outline-offset: var(--sapphire-
|
|
128
|
+
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
129
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
130
|
+
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/* DISABLED */
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
.sapphire-radio:not(.sapphire-radio--no-disabled)
|
|
143
143
|
.sapphire-radio__input:disabled
|
|
144
144
|
~ .sapphire-radio__label {
|
|
145
|
-
opacity: var(--sapphire-
|
|
145
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
146
146
|
}
|
|
@@ -2,7 +2,7 @@ declare const styles: {
|
|
|
2
2
|
readonly "sapphire-radio": string;
|
|
3
3
|
readonly "sapphire-radio__input": string;
|
|
4
4
|
readonly "sapphire-radio__label": string;
|
|
5
|
-
readonly "sapphire-radio--
|
|
5
|
+
readonly "sapphire-radio--md": string;
|
|
6
6
|
readonly "sapphire-radio__box": string;
|
|
7
7
|
readonly "sapphire-radio--checked": string;
|
|
8
8
|
readonly "is-active": string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.sapphire-search-field {
|
|
2
2
|
box-sizing: border-box;
|
|
3
|
-
font-family: var(--sapphire-
|
|
4
|
-
width: var(--sapphire-
|
|
3
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
4
|
+
width: var(--sapphire-semantic-size-width-control-default);
|
|
5
5
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
6
6
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
7
7
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -17,23 +17,19 @@
|
|
|
17
17
|
-moz-osx-font-smoothing: grayscale;
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
align-items: center;
|
|
20
|
-
gap: var(--sapphire-
|
|
21
|
-
border-radius: var(--sapphire-
|
|
20
|
+
gap: var(--sapphire-semantic-size-spacing-20);
|
|
21
|
+
border-radius: var(--sapphire-semantic-size-height-input-lg);
|
|
22
22
|
cursor: text;
|
|
23
|
-
color: var(--sapphire-
|
|
24
|
-
font-size: var(--sapphire-
|
|
25
|
-
height: var(--sapphire-
|
|
26
|
-
background-color: var(--sapphire-search-field-color-background-default);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.sapphire-search-field--surface-secondary {
|
|
23
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
24
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
25
|
+
height: var(--sapphire-semantic-size-height-input-lg);
|
|
30
26
|
background-color: var(
|
|
31
|
-
--sapphire-
|
|
27
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
32
28
|
);
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
.sapphire-search-field .sapphire-search-field__input:last-child {
|
|
36
|
-
padding-right: var(--sapphire-
|
|
32
|
+
padding-right: var(--sapphire-semantic-size-spacing-40);
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
.sapphire-search-field__input {
|
|
@@ -41,10 +37,10 @@
|
|
|
41
37
|
flex: 1;
|
|
42
38
|
height: 100%;
|
|
43
39
|
min-width: 0;
|
|
44
|
-
font-weight: var(--sapphire-
|
|
45
|
-
caret-color: var(--sapphire-
|
|
40
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
41
|
+
caret-color: var(--sapphire-semantic-color-background-action-primary-default);
|
|
46
42
|
position: relative;
|
|
47
|
-
padding-left: var(--sapphire-
|
|
43
|
+
padding-left: var(--sapphire-semantic-size-height-input-lg);
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
/**
|
|
@@ -52,7 +48,7 @@
|
|
|
52
48
|
*/
|
|
53
49
|
.sapphire-search-field__input::placeholder {
|
|
54
50
|
opacity: 1; /* some browsers set a lower than 1 opacity */
|
|
55
|
-
color: var(--sapphire-
|
|
51
|
+
color: var(--sapphire-semantic-color-content-default-secondary);
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
/**
|
|
@@ -60,15 +56,15 @@
|
|
|
60
56
|
*/
|
|
61
57
|
.sapphire-search-field.is-focus,
|
|
62
58
|
.sapphire-search-field:focus-within {
|
|
63
|
-
box-shadow: inset 0 0 0 var(--sapphire-
|
|
64
|
-
var(--sapphire-
|
|
59
|
+
box-shadow: inset 0 0 0 var(--sapphire-semantic-size-focus-ring)
|
|
60
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
/**
|
|
68
64
|
* Disabled
|
|
69
65
|
*/
|
|
70
66
|
.sapphire-search-field.is-disabled {
|
|
71
|
-
opacity: var(--sapphire-
|
|
67
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
72
68
|
cursor: not-allowed;
|
|
73
69
|
}
|
|
74
70
|
|
|
@@ -88,24 +84,24 @@
|
|
|
88
84
|
display: flex;
|
|
89
85
|
justify-content: center;
|
|
90
86
|
align-items: center;
|
|
91
|
-
height: var(--sapphire-
|
|
92
|
-
width: var(--sapphire-
|
|
93
|
-
color: var(--sapphire-
|
|
87
|
+
height: var(--sapphire-semantic-size-height-input-lg);
|
|
88
|
+
width: var(--sapphire-semantic-size-height-input-lg);
|
|
89
|
+
color: var(--sapphire-semantic-color-content-default-secondary);
|
|
94
90
|
cursor: default;
|
|
95
91
|
flex-shrink: 0;
|
|
96
92
|
|
|
97
|
-
transition: transform var(--sapphire-
|
|
93
|
+
transition: transform var(--sapphire-semantic-time-fade-quick);
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
.sapphire-search-field__button:not(.js-hover):hover,
|
|
101
97
|
.sapphire-search-field__button.is-hover {
|
|
102
|
-
color: var(--sapphire-
|
|
98
|
+
color: var(--sapphire-global-color-sapphire-650);
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
.sapphire-search-field__button:active,
|
|
106
102
|
.sapphire-search-field__button:not(.js-hover):active,
|
|
107
103
|
.sapphire-search-field__button.is-active {
|
|
108
|
-
color: var(--sapphire-
|
|
104
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
.sapphire-search-field.is-disabled .sapphire-search-field__button,
|
|
@@ -127,11 +123,11 @@
|
|
|
127
123
|
opacity: 0;
|
|
128
124
|
width: 0; /* To not cover the input when invisible. */
|
|
129
125
|
transform: scale(0.85);
|
|
130
|
-
transition: transform var(--sapphire-
|
|
131
|
-
opacity var(--sapphire-
|
|
132
|
-
width var(--sapphire-
|
|
126
|
+
transition: transform var(--sapphire-semantic-time-fade-quick),
|
|
127
|
+
opacity var(--sapphire-semantic-time-fade-quick),
|
|
128
|
+
width var(--sapphire-semantic-time-fade-quick)
|
|
133
129
|
/* Zero duration will kill the transition */
|
|
134
|
-
var(--sapphire-
|
|
130
|
+
var(--sapphire-semantic-time-fade-quick)
|
|
135
131
|
/* Delaying to prevent width transition*/;
|
|
136
132
|
}
|
|
137
133
|
|
|
@@ -139,34 +135,34 @@
|
|
|
139
135
|
* Search icon
|
|
140
136
|
*/
|
|
141
137
|
.sapphire-search-field__icon {
|
|
142
|
-
color: var(--sapphire-
|
|
138
|
+
color: var(--sapphire-semantic-color-content-default-secondary);
|
|
143
139
|
display: inline-flex; /* Not to take more height than the icon */
|
|
144
140
|
position: absolute;
|
|
145
|
-
margin-left: var(--sapphire-
|
|
141
|
+
margin-left: var(--sapphire-semantic-size-spacing-40);
|
|
146
142
|
}
|
|
147
143
|
|
|
148
144
|
/**
|
|
149
145
|
* Medium Size
|
|
150
146
|
*/
|
|
151
|
-
.sapphire-search-field--
|
|
152
|
-
font-size: var(--sapphire-
|
|
153
|
-
height: var(--sapphire-
|
|
154
|
-
border-radius: var(--sapphire-
|
|
147
|
+
.sapphire-search-field--md {
|
|
148
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
149
|
+
height: var(--sapphire-semantic-size-height-input-md);
|
|
150
|
+
border-radius: var(--sapphire-semantic-size-height-input-lg);
|
|
155
151
|
}
|
|
156
152
|
|
|
157
|
-
.sapphire-search-field--
|
|
158
|
-
padding-left: var(--sapphire-
|
|
153
|
+
.sapphire-search-field--md .sapphire-search-field__input {
|
|
154
|
+
padding-left: var(--sapphire-semantic-size-height-input-md);
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
.sapphire-search-field--
|
|
162
|
-
height: var(--sapphire-
|
|
163
|
-
width: var(--sapphire-
|
|
157
|
+
.sapphire-search-field--md .sapphire-search-field__button {
|
|
158
|
+
height: var(--sapphire-semantic-size-height-input-md);
|
|
159
|
+
width: var(--sapphire-semantic-size-height-input-md);
|
|
164
160
|
}
|
|
165
161
|
|
|
166
|
-
.sapphire-search-field--
|
|
167
|
-
padding-right: var(--sapphire-
|
|
162
|
+
.sapphire-search-field--md .sapphire-search-field__input:last-child {
|
|
163
|
+
padding-right: var(--sapphire-semantic-size-spacing-30);
|
|
168
164
|
}
|
|
169
165
|
|
|
170
|
-
.sapphire-search-field--
|
|
171
|
-
margin-left: var(--sapphire-
|
|
166
|
+
.sapphire-search-field--md .sapphire-search-field__icon {
|
|
167
|
+
margin-left: var(--sapphire-semantic-size-spacing-30);
|
|
172
168
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-search-field": string;
|
|
3
|
-
readonly "sapphire-search-field--surface-secondary": string;
|
|
4
3
|
readonly "sapphire-search-field__input": string;
|
|
5
4
|
readonly "is-focus": string;
|
|
6
5
|
readonly "is-disabled": string;
|
|
@@ -10,7 +9,7 @@ declare const styles: {
|
|
|
10
9
|
readonly "is-active": string;
|
|
11
10
|
readonly "sapphire-search-field__input--empty": string;
|
|
12
11
|
readonly "sapphire-search-field__icon": string;
|
|
13
|
-
readonly "sapphire-search-field--
|
|
12
|
+
readonly "sapphire-search-field--md": string;
|
|
14
13
|
};
|
|
15
14
|
export = styles;
|
|
16
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.sapphire-segmented-control {
|
|
2
2
|
display: flex;
|
|
3
|
-
height: var(--sapphire-
|
|
3
|
+
height: var(--sapphire-semantic-size-height-control-md);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.sapphire-segmented-control--stretch
|
|
@@ -24,35 +24,34 @@
|
|
|
24
24
|
display: inline-flex;
|
|
25
25
|
position: relative;
|
|
26
26
|
height: 100%;
|
|
27
|
-
background-color: var(--sapphire-
|
|
28
|
-
border-radius: var(--sapphire-
|
|
29
|
-
padding: var(--sapphire-
|
|
27
|
+
background-color: var(--sapphire-global-color-sapphire-50);
|
|
28
|
+
border-radius: var(--sapphire-semantic-size-height-control-lg);
|
|
29
|
+
padding: var(--sapphire-global-size-static-5);
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.sapphire-segmented-control__glider {
|
|
34
34
|
position: absolute;
|
|
35
|
-
top: var(--sapphire-
|
|
35
|
+
top: var(--sapphire-global-size-static-5);
|
|
36
36
|
left: 0;
|
|
37
|
-
height: calc(100% - var(--sapphire-
|
|
37
|
+
height: calc(100% - var(--sapphire-global-size-static-5) * 2);
|
|
38
38
|
display: block;
|
|
39
|
-
background-color: var(--sapphire-
|
|
40
|
-
box-shadow: var(--sapphire-
|
|
39
|
+
background-color: var(--sapphire-semantic-color-background-surface);
|
|
40
|
+
box-shadow: var(--sapphire-global-shadow-sm);
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
z-index: 1;
|
|
43
|
-
border-radius: var(--sapphire-
|
|
43
|
+
border-radius: var(--sapphire-semantic-size-height-control-lg);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.sapphire-segmented-control__glider--with-transition {
|
|
47
|
-
transition: width var(--sapphire-
|
|
48
|
-
|
|
49
|
-
left var(--sapphire-segmented-control-time-transition) ease-in-out;
|
|
47
|
+
transition: width var(--sapphire-semantic-time-motion-quick) ease-in-out,
|
|
48
|
+
left var(--sapphire-semantic-time-motion-quick) ease-in-out;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
.sapphire-segmented-control__button {
|
|
53
|
-
font-family: var(--sapphire-
|
|
54
|
-
font-weight: var(--sapphire-
|
|
55
|
-
font-size: var(--sapphire-
|
|
52
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
53
|
+
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
54
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
56
55
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
57
56
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
58
57
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -71,10 +70,10 @@
|
|
|
71
70
|
margin: 0;
|
|
72
71
|
border: 0;
|
|
73
72
|
height: 100%;
|
|
74
|
-
min-width: var(--sapphire-
|
|
75
|
-
padding: 0 var(--sapphire-
|
|
73
|
+
min-width: var(--sapphire-global-size-generic-120);
|
|
74
|
+
padding: 0 var(--sapphire-semantic-size-spacing-50);
|
|
76
75
|
background-color: transparent;
|
|
77
|
-
color: var(--sapphire-
|
|
76
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
78
77
|
cursor: pointer;
|
|
79
78
|
outline: none;
|
|
80
79
|
z-index: 2;
|
|
@@ -82,23 +81,22 @@
|
|
|
82
81
|
align-items: center;
|
|
83
82
|
justify-content: center;
|
|
84
83
|
position: relative;
|
|
85
|
-
transition: color var(--sapphire-
|
|
86
|
-
ease-in-out;
|
|
84
|
+
transition: color var(--sapphire-semantic-time-motion-quick) ease-in-out;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
.sapphire-segmented-control__button--active {
|
|
90
|
-
color: var(--sapphire-
|
|
88
|
+
color: var(--sapphire-semantic-color-content-link-primary-default);
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
.sapphire-segmented-control__button--disabled {
|
|
94
|
-
opacity: var(--sapphire-
|
|
92
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
95
93
|
cursor: not-allowed;
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
.sapphire-segmented-control.focus-visible:focus-within
|
|
99
97
|
.sapphire-segmented-control__glider {
|
|
100
|
-
outline: var(--sapphire-
|
|
101
|
-
var(--sapphire-
|
|
98
|
+
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
99
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
/* Manual keyboard navigation */
|
|
@@ -109,9 +107,9 @@
|
|
|
109
107
|
|
|
110
108
|
.sapphire-segmented-control--manual-keyboard-activation.focus-visible
|
|
111
109
|
.sapphire-segmented-control__button:focus {
|
|
112
|
-
outline: var(--sapphire-
|
|
113
|
-
var(--sapphire-
|
|
114
|
-
border-radius: var(--sapphire-
|
|
110
|
+
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
111
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
112
|
+
border-radius: var(--sapphire-semantic-size-height-control-lg);
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
.sapphire-segmented-control.focus-visible:focus-within.sapphire-segmented-control--manual-keyboard-activation
|
|
@@ -120,20 +118,20 @@
|
|
|
120
118
|
}
|
|
121
119
|
|
|
122
120
|
/* Sizes */
|
|
123
|
-
.sapphire-segmented-control--
|
|
124
|
-
height: var(--sapphire-
|
|
121
|
+
.sapphire-segmented-control--lg {
|
|
122
|
+
height: var(--sapphire-semantic-size-height-control-lg);
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
.sapphire-segmented-control--
|
|
128
|
-
font-size: var(--sapphire-
|
|
125
|
+
.sapphire-segmented-control--lg .sapphire-segmented-control__button {
|
|
126
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
129
127
|
}
|
|
130
128
|
|
|
131
|
-
.sapphire-segmented-control--
|
|
132
|
-
height: var(--sapphire-
|
|
129
|
+
.sapphire-segmented-control--sm {
|
|
130
|
+
height: var(--sapphire-semantic-size-height-control-sm);
|
|
133
131
|
}
|
|
134
132
|
|
|
135
|
-
.sapphire-segmented-control--
|
|
136
|
-
font-size: var(--sapphire-
|
|
133
|
+
.sapphire-segmented-control--sm .sapphire-segmented-control__button {
|
|
134
|
+
font-size: var(--sapphire-semantic-size-font-control-sm);
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
/* Radio-specific */
|
|
@@ -12,8 +12,8 @@ declare const styles: {
|
|
|
12
12
|
readonly "sapphire-segmented-control__button--disabled": string;
|
|
13
13
|
readonly "focus-visible": string;
|
|
14
14
|
readonly "sapphire-segmented-control--manual-keyboard-activation": string;
|
|
15
|
-
readonly "sapphire-segmented-control--
|
|
16
|
-
readonly "sapphire-segmented-control--
|
|
15
|
+
readonly "sapphire-segmented-control--lg": string;
|
|
16
|
+
readonly "sapphire-segmented-control--sm": string;
|
|
17
17
|
readonly "sapphire-segmented-control__radio-input": string;
|
|
18
18
|
};
|
|
19
19
|
export = styles;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.sapphire-select {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-block;
|
|
4
|
-
color: var(--sapphire-
|
|
5
|
-
width: var(--sapphire-
|
|
6
|
-
font-family: var(--sapphire-
|
|
4
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
5
|
+
width: var(--sapphire-semantic-size-width-control-default);
|
|
6
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
7
7
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
8
8
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
9
9
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -22,60 +22,60 @@
|
|
|
22
22
|
.sapphire-select__button {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
|
-
height: var(--sapphire-
|
|
25
|
+
height: var(--sapphire-semantic-size-height-input-lg);
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
cursor: pointer;
|
|
28
|
-
padding: 0 var(--sapphire-
|
|
28
|
+
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-lg);
|
|
29
29
|
border: none;
|
|
30
|
-
background-color: var(--sapphire-
|
|
30
|
+
background-color: var(--sapphire-semantic-color-background-field-default);
|
|
31
31
|
width: 100%;
|
|
32
32
|
outline: 0;
|
|
33
33
|
text-align: left;
|
|
34
34
|
color: inherit;
|
|
35
35
|
font-family: inherit;
|
|
36
36
|
box-shadow: inset 0px 0px 0px 1px
|
|
37
|
-
var(--sapphire-
|
|
38
|
-
border-radius: var(--sapphire-
|
|
39
|
-
gap: var(--sapphire-
|
|
37
|
+
var(--sapphire-semantic-color-border-field-default);
|
|
38
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
39
|
+
gap: var(--sapphire-semantic-size-spacing-30);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.sapphire-select--
|
|
43
|
-
height: var(--sapphire-
|
|
44
|
-
padding: 0 var(--sapphire-
|
|
45
|
-
gap: var(--sapphire-
|
|
42
|
+
.sapphire-select--md .sapphire-select__button {
|
|
43
|
+
height: var(--sapphire-semantic-size-height-input-md);
|
|
44
|
+
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
45
|
+
gap: var(--sapphire-semantic-size-spacing-20);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.sapphire-select__value {
|
|
49
49
|
flex: 1 0 0;
|
|
50
50
|
min-width: 0;
|
|
51
|
-
font-size: var(--sapphire-
|
|
51
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
52
52
|
width: 100%;
|
|
53
|
-
font-weight: var(--sapphire-
|
|
53
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
54
54
|
overflow: hidden;
|
|
55
55
|
text-overflow: ellipsis;
|
|
56
56
|
white-space: nowrap;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.sapphire-select--
|
|
60
|
-
font-size: var(--sapphire-
|
|
59
|
+
.sapphire-select--md .sapphire-select__value {
|
|
60
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.sapphire-select__placeholder {
|
|
64
64
|
overflow: hidden;
|
|
65
65
|
text-overflow: ellipsis;
|
|
66
66
|
white-space: nowrap;
|
|
67
|
-
color: var(--sapphire-
|
|
67
|
+
color: var(--sapphire-semantic-color-content-default-secondary);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.sapphire-select__icon-container {
|
|
71
71
|
line-height: 0;
|
|
72
|
-
width: var(--sapphire-
|
|
73
|
-
height: var(--sapphire-
|
|
72
|
+
width: var(--sapphire-semantic-size-icon-lg);
|
|
73
|
+
height: var(--sapphire-semantic-size-icon-lg);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.sapphire-select--
|
|
77
|
-
width: var(--sapphire-
|
|
78
|
-
height: var(--sapphire-
|
|
76
|
+
.sapphire-select--md .sapphire-select__icon-container {
|
|
77
|
+
width: var(--sapphire-semantic-size-icon-md);
|
|
78
|
+
height: var(--sapphire-semantic-size-icon-md);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
|
|
85
85
|
.sapphire-select__prefix {
|
|
86
86
|
display: inherit; /* because this will not be a div */
|
|
87
|
-
font-size: var(--sapphire-
|
|
87
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.sapphire-select--
|
|
91
|
-
font-size: var(--sapphire-
|
|
90
|
+
.sapphire-select--md .sapphire-select__prefix {
|
|
91
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/*
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
all: inherit;
|
|
101
101
|
}
|
|
102
102
|
.sapphire-select__search-input::placeholder {
|
|
103
|
-
color: var(--sapphire-
|
|
103
|
+
color: var(--sapphire-semantic-color-content-default-secondary);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.sapphire-select__native-select {
|
|
@@ -119,20 +119,20 @@
|
|
|
119
119
|
*/
|
|
120
120
|
.sapphire-select--error:not(.is-disabled) .sapphire-select__button {
|
|
121
121
|
box-shadow: inset 0px 0px 0px 1px
|
|
122
|
-
var(--sapphire-
|
|
122
|
+
var(--sapphire-semantic-color-border-field-error);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/*
|
|
126
126
|
* Focus
|
|
127
127
|
*/
|
|
128
128
|
.sapphire-select:not(.is-disabled).is-focus .sapphire-select__button {
|
|
129
|
-
box-shadow: inset 0px 0px 0px var(--sapphire-
|
|
130
|
-
var(--sapphire-
|
|
129
|
+
box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-focus-ring)
|
|
130
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.sapphire-select--error:not(.is-disabled).is-focus .sapphire-select__button {
|
|
134
|
-
box-shadow: inset 0px 0px 0px var(--sapphire-
|
|
135
|
-
var(--sapphire-
|
|
134
|
+
box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-focus-ring)
|
|
135
|
+
var(--sapphire-semantic-color-border-field-error);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
.sapphire-select.is-disabled .sapphire-select__button {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-select": string;
|
|
3
3
|
readonly "sapphire-select__button": string;
|
|
4
|
-
readonly "sapphire-select--
|
|
4
|
+
readonly "sapphire-select--md": string;
|
|
5
5
|
readonly "sapphire-select__value": string;
|
|
6
6
|
readonly "sapphire-select__placeholder": string;
|
|
7
7
|
readonly "sapphire-select__icon-container": string;
|