@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,5 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { borderedFieldLabel, borderedFieldBox, borderedFieldText, borderedFieldPlaceholder, borderedFieldFocus, borderedFieldError, borderedFieldDisabled, BORDERED_BORDER } from "../../styles/borderedField.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
3
4
|
const Label = styled.label.withConfig({
|
|
4
5
|
shouldForwardProp: (props) => !["autoHeightLabel", "isUp", "active", "error"].includes(props)
|
|
5
6
|
})`
|
|
@@ -8,18 +9,12 @@ const Label = styled.label.withConfig({
|
|
|
8
9
|
position: absolute;
|
|
9
10
|
left: 0;
|
|
10
11
|
top: -2px;
|
|
11
|
-
|
|
12
|
+
${text("labelRegular")}
|
|
12
13
|
height: 12px;
|
|
13
|
-
|
|
14
|
-
line-height: 20px;
|
|
15
|
-
letter-spacing: 2px;
|
|
16
|
-
text-transform: uppercase;
|
|
17
|
-
color: var(--stokr-text-primary);
|
|
14
|
+
color: var(--text-primary);
|
|
18
15
|
pointer-events: none;
|
|
19
16
|
transform: translateY(15px);
|
|
20
|
-
transition:
|
|
21
|
-
transform 0.2s,
|
|
22
|
-
font-size 0.2s;
|
|
17
|
+
transition: transform 0.2s;
|
|
23
18
|
|
|
24
19
|
${(props) => props.autoHeightLabel && `
|
|
25
20
|
height:auto;
|
|
@@ -27,16 +22,15 @@ const Label = styled.label.withConfig({
|
|
|
27
22
|
`}
|
|
28
23
|
|
|
29
24
|
${(props) => props.isUp && `
|
|
30
|
-
font-size: 10px;
|
|
31
25
|
transform: translateY(0);
|
|
32
26
|
`}
|
|
33
27
|
|
|
34
28
|
${(props) => props.active && `
|
|
35
|
-
color: var(--
|
|
29
|
+
color: var(--border-focus);
|
|
36
30
|
`}
|
|
37
31
|
|
|
38
32
|
${(props) => props.error && `
|
|
39
|
-
color: var(--
|
|
33
|
+
color: var(--status-error-text);
|
|
40
34
|
`}
|
|
41
35
|
|
|
42
36
|
${(props) => props.$variant === "bordered" && css`
|
|
@@ -48,7 +42,7 @@ const Label = styled.label.withConfig({
|
|
|
48
42
|
transform: none;
|
|
49
43
|
pointer-events: auto;
|
|
50
44
|
${borderedFieldLabel}
|
|
51
|
-
color: ${props.error ? "var(--
|
|
45
|
+
color: ${props.error ? "var(--status-error-text)" : "var(--text-primary)"};
|
|
52
46
|
`}
|
|
53
47
|
`;
|
|
54
48
|
const InputWrap = styled.div.withConfig({
|
|
@@ -58,7 +52,7 @@ const InputWrap = styled.div.withConfig({
|
|
|
58
52
|
|
|
59
53
|
& > input {
|
|
60
54
|
z-index: 0;
|
|
61
|
-
font-family: var(--
|
|
55
|
+
font-family: var(--font-family-base);
|
|
62
56
|
display: block;
|
|
63
57
|
width: 100%;
|
|
64
58
|
height: 40px;
|
|
@@ -71,8 +65,8 @@ const InputWrap = styled.div.withConfig({
|
|
|
71
65
|
border: 0;
|
|
72
66
|
outline: 0;
|
|
73
67
|
border-top: 1px solid transparent;
|
|
74
|
-
border-bottom: 1px solid var(--
|
|
75
|
-
color: var(--
|
|
68
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
69
|
+
color: var(--text-primary);
|
|
76
70
|
background-color: transparent;
|
|
77
71
|
transition: border-color 0.2s;
|
|
78
72
|
|
|
@@ -84,7 +78,7 @@ const InputWrap = styled.div.withConfig({
|
|
|
84
78
|
&:focus,
|
|
85
79
|
&:hover {
|
|
86
80
|
border-top-color: transparent;
|
|
87
|
-
border-bottom-color: var(--
|
|
81
|
+
border-bottom-color: var(--border-focus);
|
|
88
82
|
}
|
|
89
83
|
|
|
90
84
|
&::placeholder {
|
|
@@ -95,11 +89,11 @@ const InputWrap = styled.div.withConfig({
|
|
|
95
89
|
|
|
96
90
|
${(props) => props.disabled && css`
|
|
97
91
|
& > input {
|
|
98
|
-
color: var(--
|
|
92
|
+
color: var(--text-tertiary);
|
|
99
93
|
&:focus,
|
|
100
94
|
&:hover {
|
|
101
95
|
border-top-color: transparent;
|
|
102
|
-
border-bottom-color: var(--
|
|
96
|
+
border-bottom-color: var(--border-subtle);
|
|
103
97
|
}
|
|
104
98
|
}
|
|
105
99
|
`}
|
|
@@ -109,16 +103,16 @@ const InputWrap = styled.div.withConfig({
|
|
|
109
103
|
border: 0;
|
|
110
104
|
padding: 0;
|
|
111
105
|
height: 22px;
|
|
112
|
-
font-family: var(--
|
|
106
|
+
font-family: var(--font-family-base);
|
|
113
107
|
font-weight: 300;
|
|
114
108
|
font-size: 14px;
|
|
115
109
|
line-height: 22px;
|
|
116
110
|
letter-spacing: 0.53px;
|
|
117
111
|
text-transform: normal;
|
|
118
|
-
color: var(--
|
|
112
|
+
color: var(--text-primary);
|
|
119
113
|
|
|
120
114
|
&::placeholder {
|
|
121
|
-
color: var(--
|
|
115
|
+
color: var(--text-tertiary);
|
|
122
116
|
opacity: 1;
|
|
123
117
|
}
|
|
124
118
|
|
|
@@ -130,7 +124,7 @@ const InputWrap = styled.div.withConfig({
|
|
|
130
124
|
`}
|
|
131
125
|
|
|
132
126
|
${(props) => props.error && `
|
|
133
|
-
color: var(--
|
|
127
|
+
color: var(--status-error-text);
|
|
134
128
|
`}
|
|
135
129
|
|
|
136
130
|
${(props) => props.$variant === "bordered" && css`
|
|
@@ -144,7 +138,7 @@ const InputWrap = styled.div.withConfig({
|
|
|
144
138
|
}
|
|
145
139
|
|
|
146
140
|
&:hover {
|
|
147
|
-
border-color: var(--
|
|
141
|
+
border-color: var(--border-subtle);
|
|
148
142
|
}
|
|
149
143
|
|
|
150
144
|
&:focus {
|
|
@@ -177,20 +171,20 @@ const Wrapper = styled.div.withConfig({
|
|
|
177
171
|
|
|
178
172
|
input:-webkit-autofill {
|
|
179
173
|
border: none;
|
|
180
|
-
border-bottom: 1px solid var(--
|
|
181
|
-
box-shadow: 0 0 0px 1000px var(--
|
|
174
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
175
|
+
box-shadow: 0 0 0px 1000px var(--background-default) inset;
|
|
182
176
|
transition: background-color 5000s ease-in-out 0s;
|
|
183
177
|
}
|
|
184
178
|
|
|
185
179
|
${(props) => props.inverted && css`
|
|
186
180
|
${Label} {
|
|
187
|
-
color: var(--
|
|
181
|
+
color: var(--brand-pure-white);
|
|
188
182
|
opacity: 0.4;
|
|
189
183
|
}
|
|
190
184
|
${InputWrap} {
|
|
191
185
|
& > input {
|
|
192
|
-
color: var(--
|
|
193
|
-
border-bottom-color: var(--
|
|
186
|
+
color: var(--brand-pure-white);
|
|
187
|
+
border-bottom-color: var(--brand-pure-white);
|
|
194
188
|
|
|
195
189
|
&:focus,
|
|
196
190
|
&:hover {
|
|
@@ -203,7 +197,7 @@ const Wrapper = styled.div.withConfig({
|
|
|
203
197
|
${(props) => props.$variant === "bordered" && css`
|
|
204
198
|
input:-webkit-autofill {
|
|
205
199
|
border: ${BORDERED_BORDER};
|
|
206
|
-
border-radius: var(--
|
|
200
|
+
border-radius: var(--radius-lg);
|
|
207
201
|
}
|
|
208
202
|
`}
|
|
209
203
|
`;
|
|
@@ -22,7 +22,7 @@ const ShowPassword = styled.button`
|
|
|
22
22
|
text-align: right;
|
|
23
23
|
|
|
24
24
|
&:hover {
|
|
25
|
-
color: var(--
|
|
25
|
+
color: var(--action-accent-bg);
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
28
28
|
const CapslockIndicator = styled.div`
|
|
@@ -31,7 +31,7 @@ const CapslockIndicator = styled.div`
|
|
|
31
31
|
right: 2px;
|
|
32
32
|
|
|
33
33
|
& > svg {
|
|
34
|
-
fill: var(--
|
|
34
|
+
fill: var(--text-primary);
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
const PasswordStrengthWrap = styled.div`
|
|
@@ -48,7 +48,7 @@ const PasswordStrengthIndicator = styled.div`
|
|
|
48
48
|
height: 6px;
|
|
49
49
|
border-radius: 3px;
|
|
50
50
|
margin: 3px 4px;
|
|
51
|
-
background-color: var(--
|
|
51
|
+
background-color: var(--border-subtle);
|
|
52
52
|
`;
|
|
53
53
|
const PasswordStrengthText = styled.div`
|
|
54
54
|
display: inline-block;
|
|
@@ -58,7 +58,7 @@ const PasswordStrengthText = styled.div`
|
|
|
58
58
|
line-height: 12px;
|
|
59
59
|
letter-spacing: 0.4px;
|
|
60
60
|
font-style: italic;
|
|
61
|
-
color: var(--
|
|
61
|
+
color: var(--text-primary);
|
|
62
62
|
`;
|
|
63
63
|
styled.div`
|
|
64
64
|
&&& > .DayPickerInput {
|
|
@@ -69,7 +69,7 @@ styled.div`
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&&& > .DayPickerInput > input {
|
|
72
|
-
font-family: var(--
|
|
72
|
+
font-family: var(--font-family-base);
|
|
73
73
|
display: block;
|
|
74
74
|
width: 100%;
|
|
75
75
|
height: 40px;
|
|
@@ -83,8 +83,8 @@ styled.div`
|
|
|
83
83
|
outline: 0;
|
|
84
84
|
border: 0;
|
|
85
85
|
border-top: 1px solid transparent;
|
|
86
|
-
border-bottom: 1px solid var(--
|
|
87
|
-
color: var(--
|
|
86
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
87
|
+
color: var(--text-primary);
|
|
88
88
|
background-color: transparent;
|
|
89
89
|
transition: border-color 0.2s;
|
|
90
90
|
|
|
@@ -92,7 +92,7 @@ styled.div`
|
|
|
92
92
|
&:hover {
|
|
93
93
|
box-shadow: none;
|
|
94
94
|
border-top-color: transparent;
|
|
95
|
-
border-bottom-color: var(--
|
|
95
|
+
border-bottom-color: var(--border-focus);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
&::placeholder {
|
|
@@ -132,7 +132,7 @@ const PasswordStrengthIndicators = styled.div.withConfig({
|
|
|
132
132
|
${(props) => props.passwordStrength === PasswordStrength.WEAK && css`
|
|
133
133
|
${PasswordStrengthIndicator} {
|
|
134
134
|
&:nth-child(1) {
|
|
135
|
-
background-color: var(--
|
|
135
|
+
background-color: var(--status-error-icon);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
`}
|
|
@@ -141,7 +141,7 @@ const PasswordStrengthIndicators = styled.div.withConfig({
|
|
|
141
141
|
${PasswordStrengthIndicator} {
|
|
142
142
|
&:nth-child(1),
|
|
143
143
|
&:nth-child(2) {
|
|
144
|
-
background-color: var(--
|
|
144
|
+
background-color: var(--status-warning-icon);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
`}
|
|
@@ -151,7 +151,7 @@ const PasswordStrengthIndicators = styled.div.withConfig({
|
|
|
151
151
|
&:nth-child(1),
|
|
152
152
|
&:nth-child(2),
|
|
153
153
|
&:nth-child(3) {
|
|
154
|
-
background-color: var(--
|
|
154
|
+
background-color: var(--status-success-icon);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
`}
|
|
@@ -10,7 +10,7 @@ const Container = styled.div.withConfig({
|
|
|
10
10
|
${(props) => props.separatorTop && `
|
|
11
11
|
padding-top: 20px;
|
|
12
12
|
margin-top: 20px;
|
|
13
|
-
border-top: 1px solid var(--
|
|
13
|
+
border-top: 1px solid var(--border-subtle);
|
|
14
14
|
`}
|
|
15
15
|
`;
|
|
16
16
|
const InputWrap = styled.div`
|
|
@@ -30,21 +30,21 @@ const Input = styled.input`
|
|
|
30
30
|
width: 100%;
|
|
31
31
|
padding: 9px 23px;
|
|
32
32
|
padding-right: 63px;
|
|
33
|
-
font-family: var(--
|
|
33
|
+
font-family: var(--font-family-base);
|
|
34
34
|
font-size: 14px;
|
|
35
35
|
line-height: 20px;
|
|
36
|
-
border: 1px solid var(--
|
|
36
|
+
border: 1px solid var(--border-subtle);
|
|
37
37
|
border-radius: 20px;
|
|
38
38
|
outline: 0;
|
|
39
39
|
transition: border-color 0.2s;
|
|
40
40
|
|
|
41
41
|
&:focus,
|
|
42
42
|
&:hover {
|
|
43
|
-
border: 1px solid var(--
|
|
43
|
+
border: 1px solid var(--border-focus);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&::placeholder {
|
|
47
|
-
color: var(--
|
|
47
|
+
color: var(--text-tertiary);
|
|
48
48
|
opacity: 1;
|
|
49
49
|
}
|
|
50
50
|
`;
|
|
@@ -13,8 +13,8 @@ const CountBadge = styled.span`
|
|
|
13
13
|
min-width: 18px;
|
|
14
14
|
height: 18px;
|
|
15
15
|
padding: 0 6px;
|
|
16
|
-
background-color: var(--
|
|
17
|
-
color: var(--
|
|
16
|
+
background-color: var(--action-primary-bg);
|
|
17
|
+
color: var(--action-primary-text);
|
|
18
18
|
border-radius: 10px;
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
font-weight: 600;
|
|
@@ -28,7 +28,7 @@ const CheckboxWrapperDiv = styled.div`
|
|
|
28
28
|
transition: background-color 0.15s ease;
|
|
29
29
|
|
|
30
30
|
&:hover {
|
|
31
|
-
background-color: var(--
|
|
31
|
+
background-color: var(--action-outline-bg-hover);
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
34
|
const CheckboxDiv = styled.div.withConfig({
|
|
@@ -36,13 +36,13 @@ const CheckboxDiv = styled.div.withConfig({
|
|
|
36
36
|
})`
|
|
37
37
|
width: 14px;
|
|
38
38
|
height: 14px;
|
|
39
|
-
border: 1px solid ${(props) => props.isSelected ? "var(--
|
|
39
|
+
border: 1px solid ${(props) => props.isSelected ? "var(--text-primary)" : "var(--text-tertiary)"};
|
|
40
40
|
border-radius: 3px;
|
|
41
41
|
margin-right: 12px;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
justify-content: center;
|
|
45
|
-
background-color: ${(props) => props.isSelected ? "var(--
|
|
45
|
+
background-color: ${(props) => props.isSelected ? "var(--brand-pure-white)" : "var(--brand-pure-white)"};
|
|
46
46
|
transition: all 0.15s ease;
|
|
47
47
|
flex-shrink: 0;
|
|
48
48
|
|
|
@@ -54,12 +54,12 @@ const CheckboxDiv = styled.div.withConfig({
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
svg path {
|
|
57
|
-
stroke: var(--
|
|
57
|
+
stroke: var(--action-accent-bg);
|
|
58
58
|
}
|
|
59
59
|
`;
|
|
60
60
|
const OptionLabel = styled.span`
|
|
61
61
|
font-size: 14px;
|
|
62
|
-
color: var(--
|
|
62
|
+
color: var(--text-primary);
|
|
63
63
|
font-weight: 400;
|
|
64
64
|
letter-spacing: 0.6px;
|
|
65
65
|
line-height: 1.5;
|
|
@@ -71,7 +71,7 @@ const OptionLabel = styled.span`
|
|
|
71
71
|
`;
|
|
72
72
|
const PlaceholderText = styled.span`
|
|
73
73
|
font-size: 14px;
|
|
74
|
-
color: var(--
|
|
74
|
+
color: var(--text-primary);
|
|
75
75
|
font-weight: 400;
|
|
76
76
|
`;
|
|
77
77
|
const CheckboxOption = (props) => {
|
|
@@ -176,23 +176,23 @@ const MultiSelect = (props) => {
|
|
|
176
176
|
alignItems: "center",
|
|
177
177
|
// minHeight: '44px',
|
|
178
178
|
padding: "0 10px",
|
|
179
|
-
backgroundColor: "var(--
|
|
180
|
-
border: `1px solid ${state.isFocused ? "var(--
|
|
179
|
+
backgroundColor: "var(--background-default)",
|
|
180
|
+
border: `1px solid ${state.isFocused ? "var(--border-default)" : "var(--border-subtle)"}`,
|
|
181
181
|
borderRadius: "10px",
|
|
182
182
|
boxShadow: "none",
|
|
183
183
|
cursor: "pointer",
|
|
184
184
|
"&:hover": {
|
|
185
|
-
borderColor: "var(--
|
|
185
|
+
borderColor: "var(--border-default)"
|
|
186
186
|
}
|
|
187
187
|
}),
|
|
188
188
|
menu: (baseStyle) => ({
|
|
189
189
|
...baseStyle,
|
|
190
190
|
marginTop: "4px",
|
|
191
191
|
zIndex: 1e3,
|
|
192
|
-
backgroundColor: "var(--
|
|
192
|
+
backgroundColor: "var(--background-surface-raised)",
|
|
193
193
|
borderRadius: "8px",
|
|
194
194
|
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
195
|
-
border: `1px solid var(--
|
|
195
|
+
border: `1px solid var(--border-subtle)`,
|
|
196
196
|
overflow: "hidden",
|
|
197
197
|
minWidth: minMenuWidth,
|
|
198
198
|
maxWidth: maxMenuWidth,
|
|
@@ -207,15 +207,15 @@ const MultiSelect = (props) => {
|
|
|
207
207
|
// When using checkboxes, padding is handled by CheckboxOption
|
|
208
208
|
// Otherwise, add padding for the default option
|
|
209
209
|
padding: showCheckboxes ? 0 : "12px 16px",
|
|
210
|
-
backgroundColor: state.isFocused ? "var(--
|
|
211
|
-
color: "var(--
|
|
210
|
+
backgroundColor: state.isFocused ? "var(--action-outline-bg-hover)" : "transparent",
|
|
211
|
+
color: "var(--text-primary)",
|
|
212
212
|
cursor: "pointer",
|
|
213
213
|
fontWeight: state.isSelected ? 600 : 400,
|
|
214
214
|
whiteSpace: "nowrap",
|
|
215
215
|
overflow: "hidden",
|
|
216
216
|
textOverflow: "ellipsis",
|
|
217
217
|
"&:active": {
|
|
218
|
-
backgroundColor: "var(--
|
|
218
|
+
backgroundColor: "var(--action-outline-bg-hover)"
|
|
219
219
|
}
|
|
220
220
|
}),
|
|
221
221
|
valueContainer: (baseStyle) => ({
|
|
@@ -236,7 +236,7 @@ const MultiSelect = (props) => {
|
|
|
236
236
|
...baseStyle,
|
|
237
237
|
margin: 0,
|
|
238
238
|
padding: 0,
|
|
239
|
-
color: "var(--
|
|
239
|
+
color: "var(--text-primary)"
|
|
240
240
|
}),
|
|
241
241
|
indicatorsContainer: (baseStyle) => ({
|
|
242
242
|
...baseStyle,
|
|
@@ -7,7 +7,7 @@ import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
|
7
7
|
const inputStyle = {
|
|
8
8
|
outline: "none",
|
|
9
9
|
border: "none",
|
|
10
|
-
borderBottom: `1.5px solid var(--
|
|
10
|
+
borderBottom: `1.5px solid var(--border-strong)`,
|
|
11
11
|
padding: "10px",
|
|
12
12
|
paddingBottom: "2px",
|
|
13
13
|
minWidth: 30,
|
|
@@ -30,7 +30,7 @@ const RangeInput = ({
|
|
|
30
30
|
borderRadius: "10px",
|
|
31
31
|
background: getTrackBackground({
|
|
32
32
|
values: [value],
|
|
33
|
-
colors: ["var(--
|
|
33
|
+
colors: ["var(--action-accent-bg)", "var(--border-subtle)"],
|
|
34
34
|
min,
|
|
35
35
|
max
|
|
36
36
|
})
|
|
@@ -47,7 +47,7 @@ const RangeInput = ({
|
|
|
47
47
|
...props.style,
|
|
48
48
|
height: "24px",
|
|
49
49
|
width: "24px",
|
|
50
|
-
backgroundColor: "var(--
|
|
50
|
+
backgroundColor: "var(--action-accent-bg)",
|
|
51
51
|
borderRadius: "50%",
|
|
52
52
|
border: "4px solid white"
|
|
53
53
|
}
|
|
@@ -16,8 +16,8 @@ const SearchInputWrapper = styled.div.withConfig({
|
|
|
16
16
|
transition: all 0.2s ease;
|
|
17
17
|
|
|
18
18
|
/* Default filled variant */
|
|
19
|
-
background-color: ${(props) => props.variant === "outlined" ? "transparent" : "var(--
|
|
20
|
-
border: ${(props) => props.variant === "outlined" ? `1px solid var(--
|
|
19
|
+
background-color: ${(props) => props.variant === "outlined" ? "transparent" : "var(--background-surface)"};
|
|
20
|
+
border: ${(props) => props.variant === "outlined" ? `1px solid var(--border-subtle)` : "1px solid transparent"};
|
|
21
21
|
|
|
22
22
|
${(props) => props.disabled && `
|
|
23
23
|
opacity: 0.6;
|
|
@@ -25,13 +25,13 @@ const SearchInputWrapper = styled.div.withConfig({
|
|
|
25
25
|
`}
|
|
26
26
|
|
|
27
27
|
&:focus-within {
|
|
28
|
-
background-color: ${(props) => props.variant === "outlined" ? "transparent" : "var(--
|
|
29
|
-
border-color: ${(props) => props.variant === "outlined" ? "var(--
|
|
30
|
-
box-shadow: ${(props) => props.variant === "outlined" ? "none" : `0 0 0 2px var(--
|
|
28
|
+
background-color: ${(props) => props.variant === "outlined" ? "transparent" : "var(--background-default)"};
|
|
29
|
+
border-color: ${(props) => props.variant === "outlined" ? "var(--border-default)" : "transparent"};
|
|
30
|
+
box-shadow: ${(props) => props.variant === "outlined" ? "none" : `0 0 0 2px var(--border-subtle)`};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&:hover {
|
|
34
|
-
border-color: ${(props) => props.variant === "outlined" ? "var(--
|
|
34
|
+
border-color: ${(props) => props.variant === "outlined" ? "var(--border-default)" : "transparent"};
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
const SearchIconWrapper = styled.div`
|
|
@@ -39,7 +39,7 @@ const SearchIconWrapper = styled.div`
|
|
|
39
39
|
align-items: center;
|
|
40
40
|
justify-content: center;
|
|
41
41
|
margin-right: 12px;
|
|
42
|
-
color: var(--
|
|
42
|
+
color: var(--text-tertiary);
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
width: 16px;
|
|
45
45
|
height: 16px;
|
|
@@ -50,7 +50,7 @@ const SearchIconWrapper = styled.div`
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
${SearchInputWrapper}:focus-within & {
|
|
53
|
-
color: var(--
|
|
53
|
+
color: var(--text-primary);
|
|
54
54
|
}
|
|
55
55
|
`;
|
|
56
56
|
const SearchInputField = styled.input`
|
|
@@ -61,13 +61,13 @@ const SearchInputField = styled.input`
|
|
|
61
61
|
font-size: 14px;
|
|
62
62
|
font-weight: 400;
|
|
63
63
|
line-height: 18px;
|
|
64
|
-
color: var(--
|
|
64
|
+
color: var(--text-primary);
|
|
65
65
|
width: 100%;
|
|
66
66
|
min-width: 0;
|
|
67
67
|
letter-spacing: 0.6px;
|
|
68
68
|
|
|
69
69
|
&::placeholder {
|
|
70
|
-
color: var(--
|
|
70
|
+
color: var(--text-tertiary);
|
|
71
71
|
opacity: 1;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -22,10 +22,10 @@ const buildBorderedOptionStyle = (_base, state) => asStyle({
|
|
|
22
22
|
fontSize: 14,
|
|
23
23
|
lineHeight: "20px",
|
|
24
24
|
border: 0,
|
|
25
|
-
color: "var(--
|
|
25
|
+
color: "var(--text-primary)",
|
|
26
26
|
transition: "background-color 0.12s ease",
|
|
27
27
|
fontWeight: state.isSelected ? 600 : 400,
|
|
28
|
-
backgroundColor: state.isFocused ? "var(--
|
|
28
|
+
backgroundColor: state.isFocused ? "var(--background-surface)" : "transparent"
|
|
29
29
|
});
|
|
30
30
|
const buildOptionStyle = (multiple) => (base, state) => {
|
|
31
31
|
if (multiple) {
|
|
@@ -35,19 +35,24 @@ const buildOptionStyle = (multiple) => (base, state) => {
|
|
|
35
35
|
fontSize: 13,
|
|
36
36
|
lineHeight: "18px",
|
|
37
37
|
border: 0,
|
|
38
|
-
color: "var(--
|
|
38
|
+
color: "var(--text-primary)",
|
|
39
39
|
transition: "background-color 0.12s ease",
|
|
40
40
|
fontWeight: state.isSelected ? 600 : 400,
|
|
41
|
-
backgroundColor: state.isSelected ? "var(--
|
|
41
|
+
backgroundColor: state.isSelected ? "var(--action-secondary-bg)" : state.isFocused ? "var(--background-surface)" : "transparent"
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
return asStyle({
|
|
45
45
|
...base,
|
|
46
46
|
cursor: "pointer",
|
|
47
|
-
|
|
47
|
+
/* Same box as `SelectOption` (the base would inherit the page font size, 10px in a remote). */
|
|
48
|
+
padding: "8px 0 8px 4px",
|
|
49
|
+
fontSize: 12,
|
|
50
|
+
lineHeight: "18px",
|
|
51
|
+
border: 0,
|
|
52
|
+
color: "var(--text-primary)",
|
|
48
53
|
backgroundColor: "transparent",
|
|
49
54
|
fontWeight: state.isSelected || state.isFocused ? "bold" : "normal",
|
|
50
|
-
":active": { backgroundColor: "var(--
|
|
55
|
+
":active": { backgroundColor: "var(--action-secondary-bg)" }
|
|
51
56
|
});
|
|
52
57
|
};
|
|
53
58
|
const extrasOf = (props) => props.selectProps;
|
|
@@ -157,17 +162,17 @@ const Select = (props) => {
|
|
|
157
162
|
zIndex: 1e3,
|
|
158
163
|
overflow: "hidden",
|
|
159
164
|
border: BORDERED_BORDER,
|
|
160
|
-
borderRadius: "var(--
|
|
165
|
+
borderRadius: "var(--radius-lg)",
|
|
161
166
|
boxShadow: "none",
|
|
162
|
-
backgroundColor: "var(--
|
|
167
|
+
backgroundColor: "var(--background-default)"
|
|
163
168
|
}),
|
|
164
169
|
option: buildBorderedOptionStyle,
|
|
165
170
|
valueContainer: (base) => ({ ...base, padding: 0 }),
|
|
166
|
-
singleValue: (base) => ({ ...base, margin: 0, color: "var(--
|
|
171
|
+
singleValue: (base) => ({ ...base, margin: 0, color: "var(--text-primary)" }),
|
|
167
172
|
placeholder: (base, state) => ({
|
|
168
173
|
...base,
|
|
169
174
|
margin: 0,
|
|
170
|
-
color: state.isMulti && state.selectProps.menuIsOpen && state.selectProps.value ? "var(--
|
|
175
|
+
color: state.isMulti && state.selectProps.menuIsOpen && state.selectProps.value ? "var(--text-secondary)" : "var(--text-tertiary)",
|
|
171
176
|
maxWidth: "100%",
|
|
172
177
|
overflow: "hidden",
|
|
173
178
|
whiteSpace: "nowrap",
|
|
@@ -177,12 +182,12 @@ const Select = (props) => {
|
|
|
177
182
|
...base,
|
|
178
183
|
margin: 0,
|
|
179
184
|
padding: 0,
|
|
180
|
-
color: "var(--
|
|
185
|
+
color: "var(--text-primary)"
|
|
181
186
|
}),
|
|
182
187
|
dropdownIndicator: (base) => ({
|
|
183
188
|
...base,
|
|
184
189
|
padding: 0,
|
|
185
|
-
color: "var(--
|
|
190
|
+
color: "var(--text-primary)"
|
|
186
191
|
}),
|
|
187
192
|
clearIndicator: (base) => ({ ...base, padding: "0 8px" })
|
|
188
193
|
} : {
|
|
@@ -191,18 +196,18 @@ const Select = (props) => {
|
|
|
191
196
|
...base,
|
|
192
197
|
marginTop: 0,
|
|
193
198
|
zIndex: 1e3,
|
|
194
|
-
backgroundColor: "var(--
|
|
199
|
+
backgroundColor: "var(--background-surface-raised)"
|
|
195
200
|
}),
|
|
196
201
|
option: buildOptionStyle(multiple),
|
|
197
202
|
singleValue: (base, state) => ({
|
|
198
203
|
...base,
|
|
199
|
-
color: state.isDisabled ? "var(--
|
|
204
|
+
color: state.isDisabled ? "var(--text-tertiary)" : "var(--text-primary)"
|
|
200
205
|
}),
|
|
201
|
-
input: (base) => ({ ...base, color: "var(--
|
|
206
|
+
input: (base) => ({ ...base, color: "var(--text-primary)" }),
|
|
202
207
|
// While open, a multiple select shows who is selected here (see `overview`): readable text, one line.
|
|
203
208
|
placeholder: (base, state) => ({
|
|
204
209
|
...base,
|
|
205
|
-
color: state.isMulti && state.selectProps.menuIsOpen && state.selectProps.value ? "var(--
|
|
210
|
+
color: state.isMulti && state.selectProps.menuIsOpen && state.selectProps.value ? "var(--text-secondary)" : "var(--text-tertiary)",
|
|
206
211
|
maxWidth: "100%",
|
|
207
212
|
overflow: "hidden",
|
|
208
213
|
whiteSpace: "nowrap",
|