@stokr/components-library 5.0.1 → 5.0.2
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 +8 -8
- package/dist/components/AddressItem/AddressItem.styles.js +9 -9
- package/dist/components/AdminDashboard/Table/Table.styles.js +18 -25
- package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
- package/dist/components/BackButton/BackButton.styles.js +15 -15
- package/dist/components/BasicTable/BasicTable.styles.js +6 -8
- package/dist/components/BlogPost/BlogPost.styles.js +9 -13
- package/dist/components/Button/Button.styles.d.ts +1 -1
- package/dist/components/Button/Button.styles.js +122 -11
- package/dist/components/Button/GlareButton.js +1 -1
- package/dist/components/Card/Card.styles.js +3 -4
- package/dist/components/CardTabs/CardTabs.styles.js +17 -17
- package/dist/components/ChartLegend/ChartLegend.styles.js +6 -7
- package/dist/components/Checkbox/Checkbox.styles.js +10 -11
- package/dist/components/Checklist/ChecklistCard.js +3 -3
- package/dist/components/Checklist/ChecklistCard.styles.js +7 -20
- package/dist/components/Chips/Chip.js +2 -2
- package/dist/components/Chips/Chip.styles.js +6 -10
- package/dist/components/Collapsible/Collapsible.styles.js +14 -14
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +5 -5
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +5 -5
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +2 -2
- package/dist/components/Country/CountrySelect.js +6 -6
- package/dist/components/CryptoAddress/CryptoAddress.d.ts +6 -2
- package/dist/components/CryptoAddress/CryptoAddress.js +2 -2
- package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +2 -1
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +20 -27
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +2 -2
- package/dist/components/FAQ/FAQ.styles.js +15 -20
- package/dist/components/Form/Form.styles.js +5 -5
- package/dist/components/Grid/Grid.styles.js +7 -7
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +10 -22
- package/dist/components/InfoBox/InfoBox.d.ts +2 -2
- package/dist/components/InfoBox/InfoBox.js +5 -3
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
- package/dist/components/Input/DatePickerInput.styles.js +23 -24
- package/dist/components/Input/Input.styles.js +24 -30
- package/dist/components/Input/InputPassword.styles.js +11 -11
- package/dist/components/Input/InputWithButton.styles.js +5 -5
- package/dist/components/Input/MultiSelect.js +17 -17
- package/dist/components/Input/OtpInput.js +1 -1
- package/dist/components/Input/RangeInput.js +2 -2
- package/dist/components/Input/SearchInput.styles.js +10 -10
- package/dist/components/Input/Select.js +21 -16
- package/dist/components/Input/Select.styles.js +24 -28
- package/dist/components/Input/TableFilterDropdown.js +5 -5
- package/dist/components/Input/Textarea.styles.js +11 -13
- package/dist/components/MenuNav/MenuNav.styles.js +2 -5
- package/dist/components/Modal/Modal.styles.js +25 -31
- package/dist/components/Modal/PaymentModal.js +7 -7
- package/dist/components/Modal/SideModal.styles.js +8 -8
- package/dist/components/Modal/SideModalParts.js +15 -16
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +5 -8
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -2
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/Number/Number.styles.js +2 -2
- package/dist/components/Pagination/Pagination.styles.js +7 -7
- package/dist/components/PanelCard/PanelCard.styles.js +17 -17
- package/dist/components/Payment/DetailRows.js +1 -1
- package/dist/components/Payment/DetailsToggle.js +4 -6
- package/dist/components/Payment/PaymentDetailsCard.js +29 -53
- package/dist/components/Payment/PaymentDisplay.js +12 -20
- package/dist/components/Payment/PaymentPendingCard.d.ts +1 -1
- package/dist/components/Payment/PaymentPendingCard.js +10 -13
- package/dist/components/Payment/PaymentSuccessCard.js +6 -9
- package/dist/components/Payment/TimerComponent.js +5 -4
- package/dist/components/Process/Process.styles.js +7 -13
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -10
- package/dist/components/ProfileBox/ProfileBox.styles.js +5 -7
- package/dist/components/Radio/Radio.styles.js +8 -9
- package/dist/components/RefreshButton/RefreshButton.styles.js +5 -5
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +3 -5
- package/dist/components/Section/Section.styles.js +16 -18
- package/dist/components/SectionTitle/SectionTitle.styles.d.ts +4 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +4 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +3 -3
- package/dist/components/Snackbar/Snackbar.styles.js +8 -10
- package/dist/components/SpanButton/SpanButton.styles.js +2 -2
- package/dist/components/StatusDot/StatusDot.d.ts +1 -1
- package/dist/components/StatusDot/StatusDot.js +5 -5
- package/dist/components/StatusDot/StatusDot.styles.js +2 -5
- package/dist/components/StatusTag/StatusTag.js +1 -1
- package/dist/components/StatusTag/StatusTag.styles.js +4 -4
- package/dist/components/StepController/StepController.styles.js +7 -7
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +6 -8
- package/dist/components/StepSidebar/StepProgress.styles.js +18 -27
- package/dist/components/StepSidebar/StepSidebar.styles.js +14 -20
- package/dist/components/StokrLoader/StokrLoader.js +41 -13
- package/dist/components/StokrLoader/loaderSession.d.ts +14 -0
- package/dist/components/StokrLoader/loaderSession.js +30 -0
- package/dist/components/Switch/Switch.styles.js +12 -14
- package/dist/components/TabsNav/TabsNav.styles.js +7 -9
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -1
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +30 -35
- package/dist/components/Text/Text.styles.d.ts +2 -1
- package/dist/components/Text/Text.styles.js +36 -70
- package/dist/components/TextLink/TextLink.styles.js +5 -7
- package/dist/components/Timeline/Timeline.styles.js +17 -23
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -2
- package/dist/components/Tooltip/Tooltip.styles.js +4 -5
- package/dist/components/breakdown/Breakdown.js +3 -5
- package/dist/components/logo/Logo.js +1 -1
- package/dist/design-system/css/base.css +14 -14
- package/dist/design-system/css-builders.d.ts +25 -0
- package/dist/design-system/css-builders.js +81 -0
- package/dist/design-system/generated/fonts.css +0 -49
- package/dist/design-system/generated/text-classes.css +123 -123
- package/dist/design-system/generated/text-styles.d.ts +24 -24
- package/dist/design-system/generated/text-styles.js +123 -123
- package/dist/design-system/generated/tokens.css +417 -412
- package/dist/design-system/index.d.ts +2 -1
- package/dist/design-system/styled/build-theme.js +1 -1
- package/dist/design-system/tokens/colors.d.ts +1 -1
- package/dist/design-system/tokens/colors.js +1 -1
- package/dist/design-system/tokens/fonts.d.ts +6 -2
- package/dist/design-system/tokens/fonts.js +1 -1
- package/dist/design-system/tokens/semantic.d.ts +15 -3
- package/dist/design-system/tokens/semantic.js +5 -1
- package/dist/design-system/tokens/typography.d.ts +1 -1
- package/dist/design-system/tokens/typography.js +64 -41
- package/dist/index.d.ts +11 -1
- package/dist/index.js +3 -0
- package/dist/styles/borderedField.d.ts +1 -1
- package/dist/styles/borderedField.js +13 -13
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { glyph, withGlyph } from "../MaterialIcon/glyph.js";
|
|
3
3
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const Container = styled.div`
|
|
5
6
|
position: relative;
|
|
6
7
|
`;
|
|
@@ -47,11 +48,7 @@ const Title = styled.div.withConfig({
|
|
|
47
48
|
shouldForwardProp: (props) => !["color"].includes(props)
|
|
48
49
|
})`
|
|
49
50
|
float: left;
|
|
50
|
-
|
|
51
|
-
font-size: 11px;
|
|
52
|
-
line-height: 24px;
|
|
53
|
-
letter-spacing: 2px;
|
|
54
|
-
text-transform: uppercase;
|
|
51
|
+
${text("label")}
|
|
55
52
|
padding-right: 20px;
|
|
56
53
|
color: ${(props) => props.color};
|
|
57
54
|
`;
|
|
@@ -59,8 +56,8 @@ const Status = styled.span`
|
|
|
59
56
|
display: inline-block;
|
|
60
57
|
vertical-align: top;
|
|
61
58
|
padding: 0px 16px;
|
|
62
|
-
background-color: var(--
|
|
63
|
-
color: var(--
|
|
59
|
+
background-color: var(--action-primary-bg);
|
|
60
|
+
color: var(--action-primary-text);
|
|
64
61
|
font-weight: 600;
|
|
65
62
|
font-size: 8px;
|
|
66
63
|
letter-spacing: 1.78px;
|
|
@@ -88,7 +85,7 @@ const Address = styled.span.attrs((props) => ({
|
|
|
88
85
|
font-size: 11px;
|
|
89
86
|
line-height: 16px;
|
|
90
87
|
margin-right: 6px;
|
|
91
|
-
color: var(--
|
|
88
|
+
color: var(--text-primary);
|
|
92
89
|
transition: color 0.2s;
|
|
93
90
|
cursor: pointer;
|
|
94
91
|
|
|
@@ -97,7 +94,7 @@ const Address = styled.span.attrs((props) => ({
|
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
&:hover {
|
|
100
|
-
color: var(--
|
|
97
|
+
color: var(--action-accent-bg);
|
|
101
98
|
}
|
|
102
99
|
`;
|
|
103
100
|
styled.span`
|
|
@@ -105,14 +102,14 @@ styled.span`
|
|
|
105
102
|
cursor: pointer;
|
|
106
103
|
|
|
107
104
|
&:hover {
|
|
108
|
-
color: var(--
|
|
105
|
+
color: var(--action-accent-bg);
|
|
109
106
|
}
|
|
110
107
|
`;
|
|
111
108
|
const CopyToClipboardButton = styled.span.attrs({
|
|
112
109
|
children: glyph("content_copy")
|
|
113
110
|
})`
|
|
114
111
|
display: inline-flex;
|
|
115
|
-
color: var(--
|
|
112
|
+
color: var(--text-primary);
|
|
116
113
|
cursor: pointer;
|
|
117
114
|
height: 1em;
|
|
118
115
|
width: 1em;
|
|
@@ -136,14 +133,10 @@ const InfoBox = styled.div`
|
|
|
136
133
|
`}
|
|
137
134
|
`;
|
|
138
135
|
const Value = styled.div.withConfig({
|
|
139
|
-
shouldForwardProp: (props) => !["
|
|
136
|
+
shouldForwardProp: (props) => !["textStyle", "childMarginLeft"].includes(props)
|
|
140
137
|
})`
|
|
141
138
|
position: relative;
|
|
142
|
-
|
|
143
|
-
font-size: 22px;
|
|
144
|
-
font-size: ${(props) => props.fontSize}px;
|
|
145
|
-
line-height: 28px;
|
|
146
|
-
letter-spacing: 0.4px;
|
|
139
|
+
${({ textStyle = "titleL" }) => text(textStyle)}
|
|
147
140
|
|
|
148
141
|
strong {
|
|
149
142
|
font-weight: normal;
|
|
@@ -203,7 +196,7 @@ const CheckMark = styled.div`
|
|
|
203
196
|
top: 50%;
|
|
204
197
|
right: 0;
|
|
205
198
|
margin-top: -7px;
|
|
206
|
-
border: 1px solid var(--
|
|
199
|
+
border: 1px solid var(--border-default);
|
|
207
200
|
border-radius: 7px;
|
|
208
201
|
background-color: transparent;
|
|
209
202
|
transition:
|
|
@@ -230,7 +223,7 @@ const CheckMark = styled.div`
|
|
|
230
223
|
margin-top: -2px;
|
|
231
224
|
margin-left: -2px;
|
|
232
225
|
border-radius: 2px;
|
|
233
|
-
background-color: var(--
|
|
226
|
+
background-color: var(--action-accent-bg);
|
|
234
227
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
|
|
235
228
|
}
|
|
236
229
|
`;
|
|
@@ -275,14 +268,14 @@ const Radio = styled.div.withConfig({
|
|
|
275
268
|
}
|
|
276
269
|
|
|
277
270
|
${CheckMark} {
|
|
278
|
-
border-color: var(--
|
|
279
|
-
background-color: var(--
|
|
271
|
+
border-color: var(--border-subtle) !important;
|
|
272
|
+
background-color: var(--action-disabled-secondary-bg) !important;
|
|
280
273
|
}
|
|
281
274
|
}
|
|
282
275
|
|
|
283
276
|
&:checked + label {
|
|
284
277
|
&:before {
|
|
285
|
-
background-color: var(--
|
|
278
|
+
background-color: var(--color-red-500) !important;
|
|
286
279
|
}
|
|
287
280
|
|
|
288
281
|
${CheckMark} {
|
|
@@ -301,11 +294,11 @@ const Radio = styled.div.withConfig({
|
|
|
301
294
|
&:hover + label,
|
|
302
295
|
& + label:hover {
|
|
303
296
|
&:before {
|
|
304
|
-
background-color: var(--
|
|
297
|
+
background-color: var(--action-secondary-bg-hover);
|
|
305
298
|
}
|
|
306
299
|
|
|
307
300
|
${CheckMark} {
|
|
308
|
-
border-color: var(--
|
|
301
|
+
border-color: var(--border-focus);
|
|
309
302
|
}
|
|
310
303
|
}
|
|
311
304
|
}
|
|
@@ -332,14 +325,14 @@ styled.button`
|
|
|
332
325
|
height: 40px;
|
|
333
326
|
outline: none;
|
|
334
327
|
margin-left: 10px;
|
|
335
|
-
border: 1px solid var(--
|
|
328
|
+
border: 1px solid var(--border-subtle);
|
|
336
329
|
border-radius: 20px;
|
|
337
|
-
color: var(--
|
|
330
|
+
color: var(--action-negative-text);
|
|
338
331
|
transition: color 0.2s;
|
|
339
332
|
|
|
340
333
|
&:focus,
|
|
341
334
|
&:hover {
|
|
342
|
-
color: var(--
|
|
335
|
+
color: var(--action-accent-bg);
|
|
343
336
|
}
|
|
344
337
|
`;
|
|
345
338
|
export {
|
|
@@ -50,11 +50,11 @@ const InfoBox = styled.div.withConfig({
|
|
|
50
50
|
max-width: 100%;
|
|
51
51
|
|
|
52
52
|
${(props) => props.refresh && `
|
|
53
|
-
color: var(--
|
|
53
|
+
color: var(--action-accent-bg);
|
|
54
54
|
`};
|
|
55
55
|
|
|
56
56
|
${(props) => props.failed && `
|
|
57
|
-
color: var(--
|
|
57
|
+
color: var(--status-error-text);
|
|
58
58
|
`};
|
|
59
59
|
`;
|
|
60
60
|
const spin = keyframes`
|
|
@@ -27,7 +27,7 @@ const FaqDropdownIcon = styled.span.attrs({
|
|
|
27
27
|
height: 16px;
|
|
28
28
|
font-size: 16px;
|
|
29
29
|
top: 22px;
|
|
30
|
-
right: var(--
|
|
30
|
+
right: var(--space-5);
|
|
31
31
|
margin-top: 0;
|
|
32
32
|
`}
|
|
33
33
|
`;
|
|
@@ -41,16 +41,16 @@ const FaqItem = styled.div.withConfig({
|
|
|
41
41
|
${(props) => props.$variant === "bordered" && css`
|
|
42
42
|
padding: 0;
|
|
43
43
|
border: ${BORDERED_BORDER};
|
|
44
|
-
border-radius: var(--
|
|
45
|
-
background: var(--
|
|
46
|
-
box-shadow: var(--
|
|
44
|
+
border-radius: var(--radius-lg);
|
|
45
|
+
background: var(--background-default);
|
|
46
|
+
box-shadow: var(--elevation-xs);
|
|
47
47
|
|
|
48
48
|
.ReactCollapse--collapse {
|
|
49
49
|
transition: height 0.3s ease;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
& + & {
|
|
53
|
-
margin-top: var(--
|
|
53
|
+
margin-top: var(--space-2);
|
|
54
54
|
}
|
|
55
55
|
`}
|
|
56
56
|
|
|
@@ -66,12 +66,9 @@ const FaqTitle = styled.button.withConfig({
|
|
|
66
66
|
display: block;
|
|
67
67
|
width: 100%;
|
|
68
68
|
position: relative;
|
|
69
|
-
font-family: var(--
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
line-height: 24px;
|
|
73
|
-
letter-spacing: 0.4px;
|
|
74
|
-
color: var(--stokr-text-primary);
|
|
69
|
+
font-family: var(--font-family-base);
|
|
70
|
+
${text("subtitleM")}
|
|
71
|
+
color: var(--text-primary);
|
|
75
72
|
padding: 0;
|
|
76
73
|
margin: 0;
|
|
77
74
|
outline: 0;
|
|
@@ -87,21 +84,19 @@ const FaqTitle = styled.button.withConfig({
|
|
|
87
84
|
|
|
88
85
|
${(props) => props.$variant === "bordered" && css`
|
|
89
86
|
${text("subtitleS")}
|
|
90
|
-
padding: var(--
|
|
91
|
-
border-radius: var(--
|
|
87
|
+
padding: var(--space-5) 52px var(--space-5) var(--space-5);
|
|
88
|
+
border-radius: var(--radius-lg);
|
|
92
89
|
cursor: pointer;
|
|
93
90
|
transition: padding-bottom 0.3s ease;
|
|
94
|
-
${props.isActive && `padding-bottom: var(--
|
|
91
|
+
${props.isActive && `padding-bottom: var(--space-3);`}
|
|
95
92
|
|
|
96
93
|
&:hover {
|
|
97
|
-
color: var(--
|
|
94
|
+
color: var(--text-primary);
|
|
98
95
|
}
|
|
99
96
|
`}
|
|
100
97
|
|
|
101
98
|
${(props) => props.uppercase && `
|
|
102
|
-
text
|
|
103
|
-
font-weight:700;
|
|
104
|
-
letter-spacing: 0.6px;
|
|
99
|
+
${text("titleXs")}
|
|
105
100
|
`}
|
|
106
101
|
|
|
107
102
|
${({ white }) => white && `
|
|
@@ -162,11 +157,11 @@ const FaqText = styled.div.withConfig({
|
|
|
162
157
|
`}
|
|
163
158
|
|
|
164
159
|
${(props) => props.$variant === "bordered" && css`
|
|
165
|
-
padding: 0 var(--
|
|
160
|
+
padding: 0 var(--space-5) var(--space-5);
|
|
166
161
|
font-size: 14px;
|
|
167
162
|
line-height: 20px;
|
|
168
163
|
font-weight: 400;
|
|
169
|
-
color: var(--
|
|
164
|
+
color: var(--text-primary);
|
|
170
165
|
|
|
171
166
|
ul {
|
|
172
167
|
margin: 0;
|
|
@@ -12,14 +12,14 @@ const FormField = styled.div`
|
|
|
12
12
|
const FormInfo = styled.div.withConfig({
|
|
13
13
|
shouldForwardProp: (props) => !["styledId", "center", "marginTop", "marginBottom"].includes(props)
|
|
14
14
|
})`
|
|
15
|
-
font-family: var(--
|
|
15
|
+
font-family: var(--font-family-base);
|
|
16
16
|
font-weight: ${(props) => props.styleID ? `400` : `300`};
|
|
17
17
|
// All font-weight: 300;
|
|
18
18
|
// ID font-weight: 400;
|
|
19
19
|
font-size: 9px;
|
|
20
20
|
line-height: 1.78em;
|
|
21
21
|
letter-spacing: 0.4px;
|
|
22
|
-
color: var(--
|
|
22
|
+
color: var(--text-primary);
|
|
23
23
|
opacity: ${(props) => props.styleID ? `1` : `0.5`};
|
|
24
24
|
// All opacity: 0.5;
|
|
25
25
|
// ID opacity: 1;
|
|
@@ -36,7 +36,7 @@ const FormInfo = styled.div.withConfig({
|
|
|
36
36
|
transition: color 0.2s;
|
|
37
37
|
|
|
38
38
|
&:hover {
|
|
39
|
-
color: var(--
|
|
39
|
+
color: var(--action-accent-bg);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
`;
|
|
@@ -44,7 +44,7 @@ const FormError = styled.div.withConfig({
|
|
|
44
44
|
shouldForwardProp: (props) => !["show", "styleSuf", "withMarginLeft", "withTopSpacing"].includes(props)
|
|
45
45
|
})`
|
|
46
46
|
display: none;
|
|
47
|
-
font-family: var(--
|
|
47
|
+
font-family: var(--font-family-base);
|
|
48
48
|
font-weight: 300;
|
|
49
49
|
font-size: 11px;
|
|
50
50
|
line-height: 12px;
|
|
@@ -56,7 +56,7 @@ const FormError = styled.div.withConfig({
|
|
|
56
56
|
// ID, IIS & VD top: 2px;
|
|
57
57
|
margin-bottom: -12px;
|
|
58
58
|
letter-spacing: 0.4px;
|
|
59
|
-
color: var(--
|
|
59
|
+
color: var(--status-error-text);
|
|
60
60
|
|
|
61
61
|
${(props) => props.show && "display: block;"}
|
|
62
62
|
//from SUF
|
|
@@ -59,8 +59,8 @@ const Row = styled.div.withConfig({
|
|
|
59
59
|
${breakpoint.MLarge`
|
|
60
60
|
${(props) => props.main && `
|
|
61
61
|
z-index: 0;
|
|
62
|
-
min-height: calc(100vh - var(--
|
|
63
|
-
padding-top: var(--
|
|
62
|
+
min-height: calc(100vh - var(--layout-footer-height));
|
|
63
|
+
padding-top: var(--layout-header-height);
|
|
64
64
|
`}
|
|
65
65
|
`}
|
|
66
66
|
|
|
@@ -156,20 +156,20 @@ const Column = styled.div.withConfig({
|
|
|
156
156
|
|
|
157
157
|
${(props) => props.mainFixed && `
|
|
158
158
|
position: fixed;
|
|
159
|
-
top: var(--
|
|
159
|
+
top: var(--layout-header-height);
|
|
160
160
|
left: 0;
|
|
161
|
-
height: calc(100% - var(--
|
|
161
|
+
height: calc(100% - var(--layout-header-height));
|
|
162
162
|
`}
|
|
163
163
|
|
|
164
164
|
${(props) => props.mainRelative && `
|
|
165
165
|
position: relative;
|
|
166
166
|
margin-left: ${grid((props.full || 16) - props.part, props.full || 16)};
|
|
167
|
-
border-left: 1px solid var(--
|
|
167
|
+
border-left: 1px solid var(--border-subtle);
|
|
168
168
|
//padding: 54px 0 42px;
|
|
169
169
|
`}
|
|
170
170
|
|
|
171
171
|
${(props) => props.withBorder && `
|
|
172
|
-
border-left: 1px solid var(--
|
|
172
|
+
border-left: 1px solid var(--border-subtle);
|
|
173
173
|
`}
|
|
174
174
|
`}
|
|
175
175
|
`;
|
|
@@ -196,7 +196,7 @@ const FlexGrid = styled.div.withConfig({
|
|
|
196
196
|
flex-wrap: wrap;
|
|
197
197
|
|
|
198
198
|
${(props) => props.borderBottom && `
|
|
199
|
-
border-bottom: 1px solid var(--
|
|
199
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
200
200
|
`}
|
|
201
201
|
`;
|
|
202
202
|
export {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const SectionHeaderRoot = styled.div`
|
|
3
4
|
display: flex;
|
|
4
5
|
align-items: center;
|
|
5
6
|
gap: 8px;
|
|
6
|
-
color: var(--
|
|
7
|
-
|
|
8
|
-
line-height: 24px;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
letter-spacing: 0.6px;
|
|
7
|
+
color: var(--action-accent-bg);
|
|
8
|
+
${text("subtitleM")}
|
|
11
9
|
margin-bottom: 12px;
|
|
12
10
|
`;
|
|
13
11
|
const SectionHeaderIconWrap = styled.span`
|
|
@@ -25,31 +23,21 @@ const SectionHeaderIconWrap = styled.span`
|
|
|
25
23
|
`;
|
|
26
24
|
const FieldLabel = styled.p`
|
|
27
25
|
margin: 0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
letter-spacing: 2px;
|
|
31
|
-
text-transform: uppercase;
|
|
32
|
-
color: var(--stokr-text-primary);
|
|
33
|
-
font-weight: 400;
|
|
26
|
+
${text("labelRegular")}
|
|
27
|
+
color: var(--text-primary);
|
|
34
28
|
`;
|
|
35
29
|
const FieldValue = styled.p`
|
|
36
30
|
margin: 0 0 4px;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
font-weight: 600;
|
|
40
|
-
color: var(--stokr-text-primary);
|
|
41
|
-
letter-spacing: 0.5px;
|
|
31
|
+
${text("subtitleS")}
|
|
32
|
+
color: var(--text-primary);
|
|
42
33
|
`;
|
|
43
34
|
const CountryRowRoot = styled.div`
|
|
44
35
|
display: flex;
|
|
45
36
|
align-items: center;
|
|
46
37
|
gap: 10px;
|
|
47
38
|
padding: 6px 0;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
font-weight: 600;
|
|
51
|
-
color: var(--stokr-text-primary);
|
|
52
|
-
letter-spacing: 0.5px;
|
|
39
|
+
${text("subtitleS")}
|
|
40
|
+
color: var(--text-primary);
|
|
53
41
|
`;
|
|
54
42
|
const FlagSlot = styled.span`
|
|
55
43
|
display: inline-flex;
|
|
@@ -63,7 +51,7 @@ const FlagSlot = styled.span`
|
|
|
63
51
|
const CountryCode = styled.span`
|
|
64
52
|
font-family: monospace;
|
|
65
53
|
font-size: 12px;
|
|
66
|
-
color: var(--
|
|
54
|
+
color: var(--text-tertiary);
|
|
67
55
|
margin-left: auto;
|
|
68
56
|
`;
|
|
69
57
|
const ResidencyItemRoot = styled.div`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
/** The kit's statuses; each maps to its `--
|
|
3
|
-
export type InfoBoxVariant = 'warning' | 'info' | 'error' | 'success';
|
|
2
|
+
/** The kit's statuses; each maps to its `--status-<variant>-*` tokens. `info-blue` is the blue banner (no border). */
|
|
3
|
+
export type InfoBoxVariant = 'warning' | 'info' | 'info-blue' | 'error' | 'success';
|
|
4
4
|
export interface InfoBoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
5
5
|
/** Kit status: sets the background, left bar, icon and text colours. `success` is the Figma done state. */
|
|
6
6
|
variant?: InfoBoxVariant;
|
|
@@ -2,8 +2,10 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
4
4
|
import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
|
|
5
|
-
const
|
|
5
|
+
const VARIANTS = ["warning", "info", "info-blue", "error", "success"];
|
|
6
|
+
const status = (variant, part) => `var(--status-${variant}-${part})`;
|
|
6
7
|
const BANNER = { padding: "12px 20px 12px 16px", gap: "12px", align: "center", leftBorder: true };
|
|
8
|
+
const INFO_BLUE = { ...BANNER, leftBorder: false };
|
|
7
9
|
const SUCCESS = { padding: "12px", gap: "8px", align: "flex-start", leftBorder: false };
|
|
8
10
|
const Container = styled.div`
|
|
9
11
|
position: relative;
|
|
@@ -62,8 +64,8 @@ const Title = styled.div`
|
|
|
62
64
|
font-weight: 600;
|
|
63
65
|
`;
|
|
64
66
|
const InfoBox = ({ variant = "warning", title, children, icon, noLeftBorder, ...rest }) => {
|
|
65
|
-
const resolved =
|
|
66
|
-
const layout = resolved === "success" ? SUCCESS : BANNER;
|
|
67
|
+
const resolved = VARIANTS.includes(variant) ? variant : "warning";
|
|
68
|
+
const layout = resolved === "success" ? SUCCESS : resolved === "info-blue" ? INFO_BLUE : BANNER;
|
|
67
69
|
const renderIcon = () => {
|
|
68
70
|
if (icon) return /* @__PURE__ */ jsx(CustomIconWrapper, { children: icon });
|
|
69
71
|
if (resolved === "success") {
|
|
@@ -34,11 +34,11 @@ const Icon = styled.span.withConfig({
|
|
|
34
34
|
vertical-align: middle;
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
line-height: 16px;
|
|
37
|
-
color: var(--
|
|
37
|
+
color: var(--text-tertiary);
|
|
38
38
|
transition: color 0.2s;
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
color: var(--
|
|
41
|
+
color: var(--action-accent-bg);
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
44
44
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const InputWrapper = styled.div`
|
|
3
4
|
position: relative;
|
|
4
5
|
display: flex;
|
|
@@ -16,14 +17,14 @@ const ClearButton = styled.button.withConfig({
|
|
|
16
17
|
cursor: pointer;
|
|
17
18
|
padding: 4px 8px;
|
|
18
19
|
font-size: 16px;
|
|
19
|
-
color: var(--
|
|
20
|
+
color: var(--text-tertiary);
|
|
20
21
|
line-height: 1;
|
|
21
22
|
display: flex;
|
|
22
23
|
align-items: center;
|
|
23
24
|
justify-content: center;
|
|
24
25
|
|
|
25
26
|
&:hover {
|
|
26
|
-
color: var(--
|
|
27
|
+
color: var(--text-primary);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
${(props) => props.dashboard && css`
|
|
@@ -35,7 +36,7 @@ const ClearButton = styled.button.withConfig({
|
|
|
35
36
|
const DateInput = styled.input.withConfig({
|
|
36
37
|
shouldForwardProp: (props) => !["dashboard", "hasLabel"].includes(props)
|
|
37
38
|
})`
|
|
38
|
-
font-family: var(--
|
|
39
|
+
font-family: var(--font-family-base);
|
|
39
40
|
display: block;
|
|
40
41
|
width: 100%;
|
|
41
42
|
height: 40px;
|
|
@@ -49,8 +50,8 @@ const DateInput = styled.input.withConfig({
|
|
|
49
50
|
outline: 0;
|
|
50
51
|
border: 0;
|
|
51
52
|
border-top: 1px solid transparent;
|
|
52
|
-
border-bottom: 1px solid var(--
|
|
53
|
-
color: var(--
|
|
53
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
54
|
+
color: var(--text-primary);
|
|
54
55
|
background-color: transparent;
|
|
55
56
|
transition: border-color 0.2s;
|
|
56
57
|
|
|
@@ -58,7 +59,7 @@ const DateInput = styled.input.withConfig({
|
|
|
58
59
|
&:hover {
|
|
59
60
|
box-shadow: none;
|
|
60
61
|
border-top-color: transparent;
|
|
61
|
-
border-bottom-color: var(--
|
|
62
|
+
border-bottom-color: var(--border-focus);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
&::placeholder {
|
|
@@ -70,16 +71,16 @@ const DateInput = styled.input.withConfig({
|
|
|
70
71
|
border: 0;
|
|
71
72
|
padding: 0;
|
|
72
73
|
height: 22px;
|
|
73
|
-
font-family: var(--
|
|
74
|
+
font-family: var(--font-family-base);
|
|
74
75
|
font-weight: 300;
|
|
75
76
|
font-size: 14px;
|
|
76
77
|
line-height: 22px;
|
|
77
78
|
letter-spacing: 0.53px;
|
|
78
79
|
text-transform: normal;
|
|
79
|
-
color: var(--
|
|
80
|
+
color: var(--text-primary);
|
|
80
81
|
|
|
81
82
|
&::placeholder {
|
|
82
|
-
color: var(--
|
|
83
|
+
color: var(--text-tertiary);
|
|
83
84
|
opacity: 1;
|
|
84
85
|
}
|
|
85
86
|
|
|
@@ -95,7 +96,7 @@ const DatePickerOverlay = styled.div`
|
|
|
95
96
|
.rdp {
|
|
96
97
|
position: absolute;
|
|
97
98
|
z-index: 20;
|
|
98
|
-
background-color: var(--
|
|
99
|
+
background-color: var(--background-surface-raised);
|
|
99
100
|
margin: 0;
|
|
100
101
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
101
102
|
padding: 12px;
|
|
@@ -103,13 +104,13 @@ const DatePickerOverlay = styled.div`
|
|
|
103
104
|
min-width: fit-content;
|
|
104
105
|
|
|
105
106
|
/* v9 CSS Variables */
|
|
106
|
-
--rdp-accent-color: var(--
|
|
107
|
-
--rdp-accent-background-color: var(--
|
|
107
|
+
--rdp-accent-color: var(--action-accent-bg);
|
|
108
|
+
--rdp-accent-background-color: var(--action-accent-bg);
|
|
108
109
|
--rdp-day-height: 32px;
|
|
109
110
|
--rdp-day-width: 32px;
|
|
110
|
-
--rdp-selected-font: 600 13px var(--
|
|
111
|
-
--rdp-weekday-font: 600 11px var(--
|
|
112
|
-
--rdp-font-family: var(--
|
|
111
|
+
--rdp-selected-font: 600 13px var(--font-family-base);
|
|
112
|
+
--rdp-weekday-font: 600 11px var(--font-family-base);
|
|
113
|
+
--rdp-font-family: var(--font-family-base);
|
|
113
114
|
|
|
114
115
|
/* Remove outline on selected */
|
|
115
116
|
--rdp-selected-border: none;
|
|
@@ -125,8 +126,8 @@ const DatePickerOverlay = styled.div`
|
|
|
125
126
|
/* Selected day - filled blue circle */
|
|
126
127
|
.rdp-selected .rdp-day_button,
|
|
127
128
|
.rdp-day_button[aria-selected='true'] {
|
|
128
|
-
background-color: var(--
|
|
129
|
-
color: var(--
|
|
129
|
+
background-color: var(--action-accent-bg) !important;
|
|
130
|
+
color: var(--action-accent-text) !important;
|
|
130
131
|
border: none !important;
|
|
131
132
|
outline: none !important;
|
|
132
133
|
}
|
|
@@ -134,15 +135,13 @@ const DatePickerOverlay = styled.div`
|
|
|
134
135
|
/* Today's date */
|
|
135
136
|
.rdp-today:not(.rdp-selected) .rdp-day_button {
|
|
136
137
|
font-weight: 700;
|
|
137
|
-
color: var(--
|
|
138
|
+
color: var(--action-accent-bg);
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
/* Weekday headers - uppercase */
|
|
141
142
|
.rdp-weekday {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
text-transform: uppercase;
|
|
145
|
-
color: var(--stokr-text-primary);
|
|
143
|
+
${text("label")}
|
|
144
|
+
color: var(--text-primary);
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
/* Month caption */
|
|
@@ -152,10 +151,10 @@ const DatePickerOverlay = styled.div`
|
|
|
152
151
|
|
|
153
152
|
/* Navigation buttons */
|
|
154
153
|
.rdp-chevron {
|
|
155
|
-
fill: var(--
|
|
154
|
+
fill: var(--text-tertiary);
|
|
156
155
|
|
|
157
156
|
&:hover {
|
|
158
|
-
fill: var(--
|
|
157
|
+
fill: var(--text-primary);
|
|
159
158
|
background: transparent;
|
|
160
159
|
}
|
|
161
160
|
}
|