@danske/sapphire-css 16.3.0 → 25.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 +1 -11
- 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/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 +136 -0
- package/components/field/field.module.css.d.ts +0 -1
- 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 +24 -51
- package/components/select/select.module.css.d.ts +1 -4
- 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 +10 -7
- 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
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
.sapphire-text {
|
|
2
|
+
font-family: var(--sapphire-text-font-name-default);
|
|
3
|
+
|
|
4
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
5
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
6
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
7
|
+
* can happen in other contexts as well.
|
|
8
|
+
*
|
|
9
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
10
|
+
*
|
|
11
|
+
* For more details see:
|
|
12
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
13
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
14
|
+
*/
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sapphire-text--strong {
|
|
20
|
+
font-weight: var(--sapphire-text-font-weight-strong);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.sapphire-text--underlined {
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Heading */
|
|
28
|
+
.sapphire-text--heading-1,
|
|
29
|
+
.sapphire-text--heading-2,
|
|
30
|
+
.sapphire-text--heading-3,
|
|
31
|
+
.sapphire-text--heading-4,
|
|
32
|
+
.sapphire-text--heading-5,
|
|
33
|
+
.sapphire-text--heading-6 {
|
|
34
|
+
margin-top: 0px;
|
|
35
|
+
margin-bottom: 0px;
|
|
36
|
+
color: var(--sapphire-text-color-content-heading);
|
|
37
|
+
line-height: var(--sapphire-text-size-line-height-heading);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.sapphire-text--heading-1 {
|
|
41
|
+
font-family: var(--sapphire-text-font-name-heading-default-1);
|
|
42
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-1);
|
|
43
|
+
font-size: var(--sapphire-text-size-font-heading-1);
|
|
44
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-1);
|
|
45
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sapphire-text--heading-2 {
|
|
49
|
+
font-family: var(--sapphire-text-font-name-heading-default-2);
|
|
50
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-2);
|
|
51
|
+
font-size: var(--sapphire-text-size-font-heading-2);
|
|
52
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-2);
|
|
53
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.sapphire-text--heading-3 {
|
|
57
|
+
font-family: var(--sapphire-text-font-name-heading-default-3);
|
|
58
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-3);
|
|
59
|
+
font-size: var(--sapphire-text-size-font-heading-3);
|
|
60
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-3);
|
|
61
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-3);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sapphire-text--heading-4 {
|
|
65
|
+
font-family: var(--sapphire-text-font-name-heading-default-4);
|
|
66
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-4);
|
|
67
|
+
font-size: var(--sapphire-text-size-font-heading-4);
|
|
68
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-4);
|
|
69
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-4);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.sapphire-text--heading-5 {
|
|
73
|
+
font-family: var(--sapphire-text-font-name-heading-default-5);
|
|
74
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-5);
|
|
75
|
+
font-size: var(--sapphire-text-size-font-heading-5);
|
|
76
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-5);
|
|
77
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-5);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.sapphire-text--heading-6 {
|
|
81
|
+
font-family: var(--sapphire-text-font-name-heading-default-6);
|
|
82
|
+
font-weight: var(--sapphire-text-font-weight-heading-default-6);
|
|
83
|
+
font-size: var(--sapphire-text-size-font-heading-6);
|
|
84
|
+
text-transform: var(--sapphire-text-font-text-transform-heading-default-6);
|
|
85
|
+
letter-spacing: var(--sapphire-text-font-letter-spacing-heading-default-6);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Alternative Heading */
|
|
89
|
+
|
|
90
|
+
.sapphire-text--heading-1.sapphire-text--heading-alternative {
|
|
91
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-1);
|
|
92
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-1);
|
|
93
|
+
text-transform: var(
|
|
94
|
+
--sapphire-text-font-text-transform-heading-alternative-1
|
|
95
|
+
);
|
|
96
|
+
letter-spacing: var(
|
|
97
|
+
--sapphire-text-font-letter-spacing-heading-alternative-1
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.sapphire-text--heading-2.sapphire-text--heading-alternative {
|
|
102
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-2);
|
|
103
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-2);
|
|
104
|
+
text-transform: var(
|
|
105
|
+
--sapphire-text-font-text-transform-heading-alternative-2
|
|
106
|
+
);
|
|
107
|
+
letter-spacing: var(
|
|
108
|
+
--sapphire-text-font-letter-spacing-heading-alternative-2
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sapphire-text--heading-3.sapphire-text--heading-alternative {
|
|
113
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-3);
|
|
114
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-3);
|
|
115
|
+
text-transform: var(
|
|
116
|
+
--sapphire-text-font-text-transform-heading-alternative-3
|
|
117
|
+
);
|
|
118
|
+
letter-spacing: var(
|
|
119
|
+
--sapphire-text-font-letter-spacing-heading-alternative-3
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.sapphire-text--heading-4.sapphire-text--heading-alternative {
|
|
124
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-4);
|
|
125
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-4);
|
|
126
|
+
text-transform: var(
|
|
127
|
+
--sapphire-text-font-text-transform-heading-alternative-4
|
|
128
|
+
);
|
|
129
|
+
letter-spacing: var(
|
|
130
|
+
--sapphire-text-font-letter-spacing-heading-alternative-4
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.sapphire-text--heading-5.sapphire-text--heading-alternative {
|
|
135
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-5);
|
|
136
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-5);
|
|
137
|
+
text-transform: var(
|
|
138
|
+
--sapphire-text-font-text-transform-heading-alternative-5
|
|
139
|
+
);
|
|
140
|
+
letter-spacing: var(
|
|
141
|
+
--sapphire-text-font-letter-spacing-heading-alternative-5
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.sapphire-text--heading-6.sapphire-text--heading-alternative {
|
|
146
|
+
font-family: var(--sapphire-text-font-name-heading-alternative-6);
|
|
147
|
+
font-weight: var(--sapphire-text-font-weight-heading-alternative-6);
|
|
148
|
+
text-transform: var(
|
|
149
|
+
--sapphire-text-font-text-transform-heading-alternative-6
|
|
150
|
+
);
|
|
151
|
+
letter-spacing: var(
|
|
152
|
+
--sapphire-text-font-letter-spacing-heading-alternative-6
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Subheading */
|
|
157
|
+
.sapphire-text--subheading-1,
|
|
158
|
+
.sapphire-text--subheading-2 {
|
|
159
|
+
color: var(--sapphire-text-color-content-subheading);
|
|
160
|
+
line-height: var(--sapphire-text-size-line-height-subheading);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.sapphire-text--subheading-1 {
|
|
164
|
+
font-size: var(--sapphire-text-size-font-subheading-1);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.sapphire-text--subheading-2 {
|
|
168
|
+
font-size: var(--sapphire-text-size-font-subheading-2);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Body text */
|
|
172
|
+
.sapphire-text--body-1,
|
|
173
|
+
.sapphire-text--body-2,
|
|
174
|
+
.sapphire-text--body-3 {
|
|
175
|
+
color: var(--sapphire-text-color-content-body);
|
|
176
|
+
line-height: var(--sapphire-text-size-line-height-body);
|
|
177
|
+
margin-top: 0px;
|
|
178
|
+
margin-bottom: 0px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.sapphire-text--body-1 {
|
|
182
|
+
font-size: var(--sapphire-text-size-font-body-1);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.sapphire-text--body-2 {
|
|
186
|
+
font-size: var(--sapphire-text-size-font-body-2);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.sapphire-text--body-3 {
|
|
190
|
+
font-size: var(--sapphire-text-size-font-body-3);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Caption text */
|
|
194
|
+
.sapphire-text--caption-1,
|
|
195
|
+
.sapphire-text--caption-2 {
|
|
196
|
+
color: var(--sapphire-text-color-content-caption);
|
|
197
|
+
font-weight: var(--sapphire-text-font-weight-caption);
|
|
198
|
+
line-height: var(--sapphire-text-size-line-height-caption);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.sapphire-text--caption-1 {
|
|
202
|
+
font-size: var(--sapphire-text-size-font-caption-1);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.sapphire-text--caption-2 {
|
|
206
|
+
font-size: var(--sapphire-text-size-font-caption-2);
|
|
207
|
+
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
.sapphire-text-field {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
font-family: var(--sapphire-text-field-font-name);
|
|
5
2
|
width: var(--sapphire-text-field-size-width-control);
|
|
6
|
-
|
|
3
|
+
box-shadow: inset 0px 0px 0px var(--sapphire-text-field-size-width-border)
|
|
4
|
+
var(--sapphire-text-field-color-border-default);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-radius: var(--sapphire-text-field-size-radius);
|
|
9
|
+
cursor: text;
|
|
10
|
+
color: var(--sapphire-text-field-color-content);
|
|
11
|
+
background-color: var(--sapphire-text-field-color-background);
|
|
12
|
+
height: var(--sapphire-text-field-size-height-field-l);
|
|
13
|
+
font-family: var(--sapphire-text-field-font-name);
|
|
14
|
+
font-size: var(--sapphire-text-field-size-font-content-l);
|
|
7
15
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
8
16
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
9
17
|
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
@@ -17,37 +25,11 @@
|
|
|
17
25
|
*/
|
|
18
26
|
-webkit-font-smoothing: antialiased;
|
|
19
27
|
-moz-osx-font-smoothing: grayscale;
|
|
20
|
-
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.sapphire-text-field__label-container {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: var(--sapphire-text-field-size-spacing-label-horizontal);
|
|
28
|
-
min-height: var(--sapphire-text-field-size-height-label);
|
|
29
|
-
margin-bottom: var(--sapphire-text-field-size-spacing-label-vertical);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sapphire-text-field__label-text {
|
|
33
|
-
font-size: var(--sapphire-text-field-size-font-label);
|
|
34
|
-
font-weight: var(--sapphire-text-field-size-font-weight-label);
|
|
35
|
-
line-height: var(--sapphire-text-field-size-line-height-label);
|
|
36
|
-
color: var(--sapphire-text-field-color-label);
|
|
37
28
|
}
|
|
38
29
|
|
|
39
|
-
.sapphire-text-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
border-radius: var(--sapphire-text-field-size-radius);
|
|
46
|
-
cursor: text;
|
|
47
|
-
color: var(--sapphire-text-field-color-content);
|
|
48
|
-
font-size: var(--sapphire-text-field-size-font-content);
|
|
49
|
-
height: var(--sapphire-text-field-size-height-field);
|
|
50
|
-
background-color: var(--sapphire-text-field-color-background);
|
|
30
|
+
.sapphire-text-field--medium {
|
|
31
|
+
height: var(--sapphire-text-field-size-height-field-m);
|
|
32
|
+
font-size: var(--sapphire-text-field-size-font-content-m);
|
|
51
33
|
}
|
|
52
34
|
|
|
53
35
|
.sapphire-text-field__input {
|
|
@@ -55,7 +37,7 @@
|
|
|
55
37
|
width: 100%;
|
|
56
38
|
height: 100%;
|
|
57
39
|
margin: 0;
|
|
58
|
-
padding: 0 var(--sapphire-text-field-size-spacing-control-horizontal);
|
|
40
|
+
padding: 0 var(--sapphire-text-field-size-spacing-control-horizontal-l);
|
|
59
41
|
line-height: var(--sapphire-text-field-size-line-height-content);
|
|
60
42
|
|
|
61
43
|
font-family: inherit;
|
|
@@ -70,6 +52,10 @@
|
|
|
70
52
|
outline: none;
|
|
71
53
|
}
|
|
72
54
|
|
|
55
|
+
.sapphire-text-field--medium .sapphire-text-field__input {
|
|
56
|
+
padding: 0 var(--sapphire-text-field-size-spacing-control-horizontal-m);
|
|
57
|
+
}
|
|
58
|
+
|
|
73
59
|
/**
|
|
74
60
|
* Placeholder
|
|
75
61
|
*/
|
|
@@ -78,12 +64,18 @@
|
|
|
78
64
|
color: var(--sapphire-text-field-color-placeholder);
|
|
79
65
|
}
|
|
80
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Input text alignment
|
|
69
|
+
*/
|
|
70
|
+
.sapphire-text-field__input--align-right {
|
|
71
|
+
text-align: right;
|
|
72
|
+
}
|
|
73
|
+
|
|
81
74
|
/**
|
|
82
75
|
* Single line
|
|
83
76
|
* (this supports a prefix/postfix)
|
|
84
77
|
*/
|
|
85
|
-
.sapphire-text-field:not(.sapphire-text-field--multiline)
|
|
86
|
-
.sapphire-text-field__input-container {
|
|
78
|
+
.sapphire-text-field:not(.sapphire-text-field--multiline) {
|
|
87
79
|
gap: var(--sapphire-text-field-size-spacing-control-gap);
|
|
88
80
|
}
|
|
89
81
|
|
|
@@ -93,23 +85,37 @@
|
|
|
93
85
|
|
|
94
86
|
.sapphire-text-field .sapphire-text-field__affix {
|
|
95
87
|
color: var(--sapphire-text-field-color-affix);
|
|
88
|
+
flex-shrink: 0;
|
|
96
89
|
}
|
|
97
90
|
|
|
98
91
|
.sapphire-text-field .sapphire-text-field__affix--icon {
|
|
99
|
-
width: var(--sapphire-text-field-size-affix-icon-width);
|
|
100
|
-
height: var(--sapphire-text-field-size-affix-icon-height);
|
|
92
|
+
width: var(--sapphire-text-field-size-affix-icon-width-l);
|
|
93
|
+
height: var(--sapphire-text-field-size-affix-icon-height-l);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sapphire-text-field--medium .sapphire-text-field__affix--icon {
|
|
97
|
+
width: var(--sapphire-text-field-size-affix-icon-width-m);
|
|
98
|
+
height: var(--sapphire-text-field-size-affix-icon-height-m);
|
|
101
99
|
}
|
|
102
100
|
|
|
103
|
-
.sapphire-text-field--with-prefix
|
|
104
|
-
padding-left: var(--sapphire-text-field-size-spacing-control-horizontal);
|
|
101
|
+
.sapphire-text-field--with-prefix {
|
|
102
|
+
padding-left: var(--sapphire-text-field-size-spacing-control-horizontal-l);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.sapphire-text-field--medium .sapphire-text-field--with-prefix {
|
|
106
|
+
padding-left: var(--sapphire-text-field-size-spacing-control-horizontal-m);
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
.sapphire-text-field--with-prefix .sapphire-text-field__input {
|
|
108
110
|
padding-left: 0;
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
.sapphire-text-field--with-postfix
|
|
112
|
-
padding-right: var(--sapphire-text-field-size-spacing-control-horizontal);
|
|
113
|
+
.sapphire-text-field--with-postfix {
|
|
114
|
+
padding-right: var(--sapphire-text-field-size-spacing-control-horizontal-l);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.sapphire-text-field--medium .sapphire-text-field--with-postfix {
|
|
118
|
+
padding-right: var(--sapphire-text-field-size-spacing-control-horizontal-m);
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
.sapphire-text-field--with-postfix .sapphire-text-field__input {
|
|
@@ -120,9 +126,8 @@
|
|
|
120
126
|
* Multiline
|
|
121
127
|
* (this does not support a prefix/postfix)
|
|
122
128
|
*/
|
|
123
|
-
.sapphire-text-field--multiline
|
|
129
|
+
.sapphire-text-field--multiline {
|
|
124
130
|
display: inline-block;
|
|
125
|
-
width: 100%;
|
|
126
131
|
line-height: 0;
|
|
127
132
|
height: unset;
|
|
128
133
|
padding: 0;
|
|
@@ -131,10 +136,20 @@
|
|
|
131
136
|
.sapphire-text-field--multiline .sapphire-text-field__input {
|
|
132
137
|
resize: none;
|
|
133
138
|
width: 100%;
|
|
134
|
-
padding: var(--sapphire-text-field-size-spacing-control-vertical)
|
|
135
|
-
var(--sapphire-text-field-size-spacing-control-horizontal);
|
|
139
|
+
padding: var(--sapphire-text-field-size-spacing-control-vertical-l)
|
|
140
|
+
var(--sapphire-text-field-size-spacing-control-horizontal-l);
|
|
141
|
+
scroll-padding-bottom: var(
|
|
142
|
+
--sapphire-text-field-size-spacing-control-vertical-l
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sapphire-text-field--medium
|
|
147
|
+
.sapphire-text-field--multiline
|
|
148
|
+
.sapphire-text-field__input {
|
|
149
|
+
padding: var(--sapphire-text-field-size-spacing-control-vertical-m)
|
|
150
|
+
var(--sapphire-text-field-size-spacing-control-horizontal-m);
|
|
136
151
|
scroll-padding-bottom: var(
|
|
137
|
-
--sapphire-text-field-size-spacing-control-vertical
|
|
152
|
+
--sapphire-text-field-size-spacing-control-vertical-m
|
|
138
153
|
);
|
|
139
154
|
}
|
|
140
155
|
|
|
@@ -146,63 +161,26 @@
|
|
|
146
161
|
resize: vertical;
|
|
147
162
|
}
|
|
148
163
|
|
|
149
|
-
/**
|
|
150
|
-
* Note
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
.sapphire-text-field__note-row {
|
|
154
|
-
display: flex;
|
|
155
|
-
justify-content: space-between;
|
|
156
|
-
font-size: var(--sapphire-text-field-size-font-note);
|
|
157
|
-
line-height: var(--sapphire-text-field-size-line-height-note);
|
|
158
|
-
color: var(--sapphire-text-field-color-note-default);
|
|
159
|
-
margin-top: var(--sapphire-text-field-size-spacing-note-vertical);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
164
|
.sapphire-text-field__counter {
|
|
163
165
|
color: var(--sapphire-text-field-color-counter-default);
|
|
164
166
|
padding-left: var(--sapphire-text-field-size-spacing-note-horizontal);
|
|
165
167
|
margin-left: auto;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
|
-
.sapphire-text-
|
|
169
|
-
|
|
170
|
-
font-size: var(--sapphire-text-field-size-font-note);
|
|
171
|
-
line-height: var(--sapphire-text-field-size-line-height-note);
|
|
172
|
-
color: var(--sapphire-text-field-color-note-default);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.sapphire-text-field--error .sapphire-text-field__note {
|
|
176
|
-
color: var(--sapphire-text-field-color-note-error);
|
|
170
|
+
.sapphire-text-field__counter--error {
|
|
171
|
+
color: var(--sapphire-text-field-color-counter-error);
|
|
177
172
|
}
|
|
178
173
|
|
|
179
|
-
.sapphire-text-field--error
|
|
174
|
+
.sapphire-text-field--error {
|
|
180
175
|
box-shadow: inset 0px 0px 0px var(--sapphire-text-field-size-width-border)
|
|
181
176
|
var(--sapphire-text-field-color-border-error);
|
|
182
177
|
}
|
|
183
178
|
|
|
184
|
-
.sapphire-text-field--counter-error .sapphire-text-field__counter {
|
|
185
|
-
color: var(--sapphire-text-field-color-counter-error);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
179
|
/**
|
|
189
180
|
* Focus
|
|
190
181
|
*/
|
|
191
|
-
.sapphire-text-field.is-focus
|
|
192
|
-
.sapphire-text-field
|
|
193
|
-
.sapphire-text-field--error .sapphire-text-field__input-container:focus-within {
|
|
182
|
+
.sapphire-text-field.is-focus,
|
|
183
|
+
.sapphire-text-field:focus-within {
|
|
194
184
|
box-shadow: inset 0px 0px 0px var(--sapphire-text-field-size-focus-ring)
|
|
195
185
|
var(--sapphire-text-field-color-focus-ring);
|
|
196
186
|
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Disabled
|
|
200
|
-
*/
|
|
201
|
-
.sapphire-text-field.is-disabled {
|
|
202
|
-
opacity: var(--sapphire-text-field-opacity-disabled);
|
|
203
|
-
cursor: not-allowed;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.sapphire-text-field.is-disabled .sapphire-text-field__input {
|
|
207
|
-
cursor: not-allowed;
|
|
208
|
-
}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-text-field": string;
|
|
3
|
-
readonly "sapphire-text-
|
|
4
|
-
readonly "sapphire-text-field__label-text": string;
|
|
5
|
-
readonly "sapphire-text-field__input-container": string;
|
|
3
|
+
readonly "sapphire-text-field--medium": string;
|
|
6
4
|
readonly "sapphire-text-field__input": string;
|
|
5
|
+
readonly "sapphire-text-field__input--align-right": string;
|
|
7
6
|
readonly "sapphire-text-field--multiline": string;
|
|
8
7
|
readonly "sapphire-text-field__affix": string;
|
|
9
8
|
readonly "sapphire-text-field__affix--icon": string;
|
|
10
9
|
readonly "sapphire-text-field--with-prefix": string;
|
|
11
10
|
readonly "sapphire-text-field--with-postfix": string;
|
|
12
11
|
readonly "sapphire-text-field--resizable": string;
|
|
13
|
-
readonly "sapphire-text-field__note-row": string;
|
|
14
12
|
readonly "sapphire-text-field__counter": string;
|
|
15
|
-
readonly "sapphire-text-
|
|
13
|
+
readonly "sapphire-text-field__counter--error": string;
|
|
16
14
|
readonly "sapphire-text-field--error": string;
|
|
17
|
-
readonly "sapphire-text-field--counter-error": string;
|
|
18
15
|
readonly "is-focus": string;
|
|
19
|
-
readonly "is-disabled": string;
|
|
20
16
|
};
|
|
21
17
|
export = styles;
|
|
22
18
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@keyframes fade-in-up {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
transform: translate3d(0, 100%, 0) translateX(-50%) scale(0.9);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
to {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
transform: translate3d(0, 0, 0) translateX(-50%) scale(1);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@keyframes fade-out {
|
|
14
|
+
from {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
to {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.sapphire-toast-container {
|
|
24
|
+
position: fixed;
|
|
25
|
+
bottom: var(--sapphire-toast-size-offset);
|
|
26
|
+
left: 50%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sapphire-toast {
|
|
30
|
+
position: absolute;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
|
|
33
|
+
/* absolute position & center */
|
|
34
|
+
transform: translateX(-50%);
|
|
35
|
+
|
|
36
|
+
/* let the text grow until max-width */
|
|
37
|
+
width: max-content;
|
|
38
|
+
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
max-width: var(--sapphire-toast-size-width-max);
|
|
41
|
+
min-width: var(--sapphire-toast-size-width-min);
|
|
42
|
+
box-shadow: var(--sapphire-toast-shadow);
|
|
43
|
+
border-radius: var(--sapphire-toast-size-radius);
|
|
44
|
+
animation-duration: var(--sapphire-toast-time-transition);
|
|
45
|
+
|
|
46
|
+
/* Ease-out Cubic */
|
|
47
|
+
animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
48
|
+
|
|
49
|
+
/* if implemented as focusable, we don't want the outline because this is not
|
|
50
|
+
* an an interactive element in itself */
|
|
51
|
+
outline: none;
|
|
52
|
+
|
|
53
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
54
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
55
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
56
|
+
* can happen in other contexts as well.
|
|
57
|
+
*
|
|
58
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
59
|
+
*
|
|
60
|
+
* For more details see:
|
|
61
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
62
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
63
|
+
*/
|
|
64
|
+
-webkit-font-smoothing: antialiased;
|
|
65
|
+
-moz-osx-font-smoothing: grayscale;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sapphire-toast--entering {
|
|
69
|
+
animation-name: fade-in-up;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* This represents the toast which appears immediately after the current one
|
|
73
|
+
* disappears */
|
|
74
|
+
.sapphire-toast--queued {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
animation-name: fade-in-up;
|
|
77
|
+
animation-delay: var(--sapphire-toast-time-transition);
|
|
78
|
+
animation-fill-mode: forwards;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.sapphire-toast--exiting {
|
|
82
|
+
animation-name: fade-out;
|
|
83
|
+
animation-fill-mode: forwards;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.sapphire-toast__content {
|
|
87
|
+
display: flex;
|
|
88
|
+
gap: var(--sapphire-toast-size-spacing-horizontal);
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
|
|
92
|
+
background-color: var(--sapphire-toast-color-background);
|
|
93
|
+
color: var(--sapphire-toast-color-content);
|
|
94
|
+
font-family: var(--sapphire-toast-font-name);
|
|
95
|
+
font-size: var(--sapphire-toast-size-font);
|
|
96
|
+
font-weight: var(--sapphire-toast-font-weight);
|
|
97
|
+
line-height: var(--sapphire-toast-size-line-height);
|
|
98
|
+
padding: var(--sapphire-toast-size-spacing-vertical)
|
|
99
|
+
var(--sapphire-toast-size-spacing-horizontal);
|
|
100
|
+
padding-right: var(--sapphire-toast-size-spacing-end);
|
|
101
|
+
}
|
|
@@ -8,17 +8,11 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.sapphire-tooltip {
|
|
11
|
-
|
|
11
|
+
display: inline-block;
|
|
12
12
|
box-shadow: var(--sapphire-tooltip-shadow);
|
|
13
|
-
color: var(--sapphire-tooltip-color-content);
|
|
14
|
-
line-height: var(--sapphire-tooltip-size-line-height);
|
|
15
13
|
max-width: var(--sapphire-tooltip-size-width-max);
|
|
16
14
|
border-radius: var(--sapphire-tooltip-size-radius);
|
|
17
|
-
|
|
18
|
-
font-weight: var(--sapphire-tooltip-font-weight);
|
|
19
|
-
font-size: var(--sapphire-tooltip-size-font);
|
|
20
|
-
padding: var(--sapphire-tooltip-size-spacing-vertical)
|
|
21
|
-
var(--sapphire-tooltip-size-spacing-horizontal);
|
|
15
|
+
overflow: hidden;
|
|
22
16
|
/* if implemented as focusable, we don't want the outline because this is not
|
|
23
17
|
* an an interactive element in itself */
|
|
24
18
|
outline: none;
|
|
@@ -39,3 +33,14 @@
|
|
|
39
33
|
-webkit-font-smoothing: antialiased;
|
|
40
34
|
-moz-osx-font-smoothing: grayscale;
|
|
41
35
|
}
|
|
36
|
+
|
|
37
|
+
.sapphire-tooltip__content {
|
|
38
|
+
background-color: var(--sapphire-tooltip-color-background);
|
|
39
|
+
color: var(--sapphire-tooltip-color-content);
|
|
40
|
+
font-family: var(--sapphire-tooltip-font-name);
|
|
41
|
+
font-weight: var(--sapphire-tooltip-font-weight);
|
|
42
|
+
font-size: var(--sapphire-tooltip-size-font);
|
|
43
|
+
line-height: var(--sapphire-tooltip-size-line-height);
|
|
44
|
+
padding: var(--sapphire-tooltip-size-spacing-vertical)
|
|
45
|
+
var(--sapphire-tooltip-size-spacing-horizontal);
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-css",
|
|
3
|
-
"version": "
|
|
4
|
-
"sideEffects": false,
|
|
3
|
+
"version": "25.1.0",
|
|
5
4
|
"description": "CSS implementation of the Sapphire Design System from Danske Bank A/S",
|
|
6
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"sideEffects": false,
|
|
7
7
|
"files": [
|
|
8
8
|
"/components/**/*.css",
|
|
9
9
|
"/components/**/*.d.ts",
|
|
10
10
|
"/themes/**/*.css",
|
|
11
|
+
"/themes/**/*.scss",
|
|
11
12
|
"/themes/**/*.js",
|
|
12
13
|
"/themes/**/*.d.ts",
|
|
13
14
|
"/build"
|
|
@@ -27,10 +28,11 @@
|
|
|
27
28
|
},
|
|
28
29
|
"scripts": {
|
|
29
30
|
"build": "yarn run build:types && yarn run build:themes",
|
|
30
|
-
"test": "yarn run test:stylelint",
|
|
31
|
+
"test": "yarn run test:stylelint && yarn run test:findUnusedTokens",
|
|
31
32
|
"test:stylelint": "stylelint components/**/*.module.css",
|
|
33
|
+
"test:findUnusedTokens": "stylelint components/**/*.module.css",
|
|
32
34
|
"watch:types": "yarn run types -- -w",
|
|
33
|
-
"storybook": "start-storybook -p 6007",
|
|
35
|
+
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6007",
|
|
34
36
|
"build:storybook": "build-storybook --docs -o dist",
|
|
35
37
|
"build:types": "tcm -p /**/*.module.css",
|
|
36
38
|
"build:themes": "yarn build:themes:esm && yarn build:themes:cjs",
|
|
@@ -43,8 +45,9 @@
|
|
|
43
45
|
"@babel/preset-env": "^7.20.2",
|
|
44
46
|
"@babel/preset-react": "^7.18.6",
|
|
45
47
|
"@babel/preset-typescript": "^7.18.6",
|
|
46
|
-
"
|
|
47
|
-
"@danske/sapphire-
|
|
48
|
+
"cross-env": "^7.0.3",
|
|
49
|
+
"@danske/sapphire-react": "3.0.0",
|
|
50
|
+
"@danske/sapphire-icons": "^2.0.0",
|
|
48
51
|
"@storybook/addon-essentials": "^6.5.13",
|
|
49
52
|
"@storybook/addon-links": "^6.5.13",
|
|
50
53
|
"@storybook/addons": "^6.5.13",
|
|
@@ -63,6 +66,6 @@
|
|
|
63
66
|
"typescript": "~4.6.4"
|
|
64
67
|
},
|
|
65
68
|
"dependencies": {
|
|
66
|
-
"@danske/sapphire-design-tokens": "^
|
|
69
|
+
"@danske/sapphire-design-tokens": "^35.2.0"
|
|
67
70
|
}
|
|
68
71
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@danske/sapphire-design-tokens/build/themes/default-dark/assets/fonts/danske/fontFace.css';
|
package/themes/default-dark.d.ts
CHANGED