@stokr/components-library 5.0.0 → 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.d.ts +38 -0
- package/dist/components/AddressItem/AddressItem.js +51 -0
- package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
- package/dist/components/AddressItem/AddressItem.styles.js +71 -0
- 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.d.ts +1 -0
- 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.d.ts +10 -4
- package/dist/components/Collapsible/Collapsible.js +6 -14
- package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
- package/dist/components/Collapsible/Collapsible.styles.js +33 -16
- 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 +15 -20
- package/dist/components/Country/FlagFor.d.ts +9 -0
- package/dist/components/Country/FlagFor.js +25 -0
- package/dist/components/Country/flagLoaders.d.ts +5 -0
- package/dist/components/Country/flagLoaders.js +270 -0
- package/dist/components/Country/flagStore.d.ts +6 -0
- package/dist/components/Country/flagStore.js +29 -0
- 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.d.ts +29 -0
- package/dist/components/FAQ/FAQ.js +18 -18
- package/dist/components/FAQ/FAQ.styles.d.ts +11 -3
- package/dist/components/FAQ/FAQ.styles.js +59 -10
- package/dist/components/Form/Form.styles.js +5 -5
- package/dist/components/Grid/Grid.styles.js +7 -7
- package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +13 -23
- package/dist/components/InfoBox/InfoBox.d.ts +15 -13
- package/dist/components/InfoBox/InfoBox.js +31 -14
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
- package/dist/components/Input/DatePickerInput.styles.js +23 -24
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +5 -2
- package/dist/components/Input/Input.styles.d.ts +4 -0
- package/dist/components/Input/Input.styles.js +77 -27
- 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.d.ts +57 -0
- package/dist/components/Input/Select.js +101 -106
- package/dist/components/Input/Select.styles.d.ts +89 -0
- package/dist/components/Input/Select.styles.js +115 -19
- package/dist/components/Input/TableFilterDropdown.js +5 -5
- package/dist/components/Input/Textarea.styles.js +11 -13
- package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
- package/dist/components/MaterialIcon/requiredIcons.js +2 -0
- 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.d.ts +51 -0
- package/dist/components/PanelCard/PanelCard.js +35 -0
- package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
- package/dist/components/PanelCard/PanelCard.styles.js +84 -0
- 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.d.ts +1 -0
- 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.d.ts +12 -0
- package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +39 -0
- package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
- package/dist/components/StepSidebar/StepProgress.js +14 -0
- package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
- package/dist/components/StepSidebar/StepProgress.styles.js +97 -0
- package/dist/components/StepSidebar/StepSidebar.d.ts +36 -0
- package/dist/components/StepSidebar/StepSidebar.js +58 -0
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +55 -0
- package/dist/components/StepSidebar/StepSidebar.styles.js +168 -0
- package/dist/components/StokrLoader/StokrLoader.d.ts +16 -2
- package/dist/components/StokrLoader/StokrLoader.js +170 -28
- 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 +26 -11
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +29 -12
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +103 -30
- 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/constants/chainLogos.d.ts +9 -0
- package/dist/constants/chainLogos.js +17 -0
- 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 +84 -7
- package/dist/index.js +24 -4
- package/dist/static/images/chains/avalanche.svg +7 -0
- package/dist/static/images/chains/avalanche.svg.js +4 -0
- package/dist/static/images/chains/ethereum.svg +14 -0
- package/dist/static/images/chains/ethereum.svg.js +4 -0
- package/dist/static/images/chains/liquid.svg +7 -0
- package/dist/static/images/chains/liquid.svg.js +4 -0
- package/dist/static/images/chains/solana.svg +29 -0
- package/dist/static/images/chains/solana.svg.js +4 -0
- package/dist/static/images/chains/stellar.svg +17 -0
- package/dist/static/images/chains/stellar.svg.js +4 -0
- package/dist/static/images/chains/tempo.svg +11 -0
- package/dist/static/images/chains/tempo.svg.js +4 -0
- package/dist/styles/borderedField.d.ts +11 -0
- package/dist/styles/borderedField.js +53 -0
- package/package.json +1 -1
- package/dist/static/images/globe.svg.js +0 -5
- package/dist/static/images/trash.svg +0 -17
- package/dist/static/images/trash.svg.js +0 -5
|
@@ -21,11 +21,11 @@ const TextBase = styled.div.withConfig({
|
|
|
21
21
|
].includes(props)
|
|
22
22
|
})`
|
|
23
23
|
display: block;
|
|
24
|
-
color: var(--
|
|
24
|
+
color: var(--text-${({ color, variant }) => color ?? (variant ? variantColor(variant) : "body")});
|
|
25
25
|
|
|
26
26
|
${({ variant }) => variant && `
|
|
27
27
|
margin: 0;
|
|
28
|
-
font-family: var(--
|
|
28
|
+
font-family: var(--font-family-base);
|
|
29
29
|
${text(variant)}
|
|
30
30
|
`}
|
|
31
31
|
|
|
@@ -33,11 +33,11 @@ const TextBase = styled.div.withConfig({
|
|
|
33
33
|
h2,
|
|
34
34
|
h3,
|
|
35
35
|
h5 {
|
|
36
|
-
color: ${({ color }) => color ? "inherit" : "var(--
|
|
36
|
+
color: ${({ color }) => color ? "inherit" : "var(--text-primary)"};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
h4 {
|
|
40
|
-
color: ${({ color }) => color ? "inherit" : "var(--
|
|
40
|
+
color: ${({ color }) => color ? "inherit" : "var(--text-secondary)"};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
${({ withMarginBottom }) => withMarginBottom && `
|
|
@@ -56,91 +56,57 @@ const TextBase = styled.div.withConfig({
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
+
/*
|
|
60
|
+
* Heading ladder of rich content (CMS): the only place that decides which kit style each heading level gets.
|
|
61
|
+
* Sizes come from the kit (switching mobile/desktop and type scale by itself), never from px values here.
|
|
62
|
+
*/
|
|
63
|
+
h1,
|
|
64
|
+
h2,
|
|
65
|
+
h3 {
|
|
66
|
+
font-family: var(--font-family-base);
|
|
67
|
+
${text("titleXl")}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
h4 {
|
|
71
|
+
font-family: var(--font-family-base);
|
|
72
|
+
${text("titleXs")}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
h5 {
|
|
76
|
+
font-family: var(--font-family-base);
|
|
77
|
+
${text("titleL")}
|
|
78
|
+
}
|
|
79
|
+
|
|
59
80
|
h1 {
|
|
60
|
-
font-family: var(--stokr-font-family-base);
|
|
61
|
-
font-weight: 800;
|
|
62
|
-
font-size: 22px;
|
|
63
|
-
line-height: 1.18;
|
|
64
|
-
letter-spacing: 0.8px;
|
|
65
|
-
text-transform: uppercase;
|
|
66
81
|
margin-top: 1em;
|
|
67
82
|
margin-bottom: 32px;
|
|
68
83
|
|
|
69
84
|
${breakpoint.Medium`
|
|
70
|
-
font-size: 34px;
|
|
71
|
-
letter-spacing: 1.5px;
|
|
72
85
|
margin-bottom: 45px;
|
|
73
86
|
`}
|
|
74
87
|
}
|
|
75
88
|
|
|
76
89
|
h2 {
|
|
77
|
-
font-family: var(--stokr-font-family-base);
|
|
78
|
-
font-weight: 300;
|
|
79
|
-
font-size: 34px;
|
|
80
|
-
line-height: 1.18em;
|
|
81
|
-
letter-spacing: 1.5px;
|
|
82
90
|
margin-top: 1em;
|
|
83
91
|
margin-bottom: 0.18em;
|
|
84
|
-
|
|
85
|
-
${breakpoint.Medium`
|
|
86
|
-
font-size: 42px;
|
|
87
|
-
`}
|
|
88
|
-
|
|
89
|
-
${breakpoint.Large`
|
|
90
|
-
font-size: 50px;
|
|
91
|
-
`}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
font-family: var(--stokr-font-family-base);
|
|
96
|
-
font-weight: 300;
|
|
97
|
-
font-size: 17px;
|
|
98
|
-
line-height: 1.27em;
|
|
99
|
-
letter-spacing: 0.8px;
|
|
94
|
+
h3 {
|
|
100
95
|
margin-top: 1em;
|
|
101
96
|
margin-bottom: 0.27em;
|
|
102
|
-
|
|
103
|
-
${breakpoint.Medium`
|
|
104
|
-
//font-size: 34px;
|
|
105
|
-
`}
|
|
106
|
-
|
|
107
|
-
${(props) => props.blockchainLoadingMsg && `
|
|
108
|
-
width: 100% !important;
|
|
109
|
-
`}
|
|
110
97
|
}
|
|
111
98
|
|
|
112
|
-
|
|
113
|
-
font-family: var(--stokr-font-family-base);
|
|
114
|
-
font-weight: 800;
|
|
115
|
-
font-size: 22px;
|
|
116
|
-
line-height: 1.27em;
|
|
117
|
-
letter-spacing: 0.8px;
|
|
99
|
+
h4 {
|
|
118
100
|
margin-top: 1em;
|
|
119
101
|
margin-bottom: 0.27em;
|
|
120
|
-
text-transform: uppercase;
|
|
121
102
|
|
|
122
|
-
${
|
|
123
|
-
|
|
103
|
+
${(props) => props.blockchainLoadingMsg && `
|
|
104
|
+
width: 100% !important;
|
|
124
105
|
`}
|
|
125
|
-
|
|
126
|
-
${breakpoint.Medium`${breakpoint.below.MLarge`
|
|
127
|
-
${(props) => props.responsiveFont && `
|
|
128
|
-
font-size: 22px;
|
|
129
|
-
`}
|
|
130
|
-
`}`}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
h5 {
|
|
134
|
-
font-family: var(--stokr-font-family-base);
|
|
135
|
-
font-weight: 800;
|
|
136
|
-
font-size: 22px;
|
|
137
|
-
line-height: 1.27em;
|
|
138
|
-
letter-spacing: 0.8px;
|
|
139
|
-
text-transform: uppercase;
|
|
140
106
|
}
|
|
141
107
|
|
|
142
108
|
p {
|
|
143
|
-
font-family: var(--
|
|
109
|
+
font-family: var(--font-family-base);
|
|
144
110
|
font-weight: 300;
|
|
145
111
|
font-size: 16px;
|
|
146
112
|
line-height: 1.5em;
|
|
@@ -166,12 +132,12 @@ const TextBase = styled.div.withConfig({
|
|
|
166
132
|
color: inherit;
|
|
167
133
|
|
|
168
134
|
&:hover {
|
|
169
|
-
color: var(--
|
|
135
|
+
color: var(--text-primary);
|
|
170
136
|
}
|
|
171
137
|
}
|
|
172
138
|
|
|
173
139
|
${(props) => props.success && `
|
|
174
|
-
color: var(--
|
|
140
|
+
color: var(--status-success-text);
|
|
175
141
|
`}
|
|
176
142
|
}
|
|
177
143
|
|
|
@@ -204,10 +170,10 @@ const Caption = styled.p.withConfig({
|
|
|
204
170
|
shouldForwardProp: (props) => !["center", "link"].includes(props)
|
|
205
171
|
})`
|
|
206
172
|
&&& {
|
|
207
|
-
font-family: var(--
|
|
173
|
+
font-family: var(--font-family-base);
|
|
208
174
|
font-weight: 300;
|
|
209
175
|
font-size: 9px;
|
|
210
|
-
color: var(--
|
|
176
|
+
color: var(--text-tertiary);
|
|
211
177
|
line-height: 1.78em;
|
|
212
178
|
letter-spacing: 0.4px;
|
|
213
179
|
|
|
@@ -230,10 +196,10 @@ const Caption = styled.p.withConfig({
|
|
|
230
196
|
a {
|
|
231
197
|
text-decoration: underline;
|
|
232
198
|
transition: color 0.2s;
|
|
233
|
-
color: var(--
|
|
199
|
+
color: var(--action-accent-bg);
|
|
234
200
|
|
|
235
201
|
&:hover {
|
|
236
|
-
color: var(--
|
|
202
|
+
color: var(--text-primary);
|
|
237
203
|
}
|
|
238
204
|
}
|
|
239
205
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
3
|
import { withGlyph, glyph } from "../MaterialIcon/glyph.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const withArrow = (props) => ({
|
|
5
6
|
children: withGlyph(glyph("chevron_right", false, 16), props.children)
|
|
6
7
|
});
|
|
7
8
|
const styles = css`
|
|
8
9
|
background: transparent;
|
|
9
|
-
color: var(--
|
|
10
|
+
color: var(--text-link);
|
|
10
11
|
border: none;
|
|
11
12
|
cursor: pointer;
|
|
12
13
|
position: relative;
|
|
13
|
-
font-family: var(--
|
|
14
|
-
|
|
15
|
-
font-size: 11px;
|
|
16
|
-
line-height: 14px;
|
|
17
|
-
text-transform: uppercase;
|
|
14
|
+
font-family: var(--font-family-base);
|
|
15
|
+
${text("label")}
|
|
18
16
|
display: inline-block;
|
|
19
17
|
padding-left: 18px;
|
|
20
18
|
padding-right: 6px;
|
|
@@ -27,7 +25,7 @@ const styles = css`
|
|
|
27
25
|
width: 16px;
|
|
28
26
|
height: 16px;
|
|
29
27
|
margin-top: -8px;
|
|
30
|
-
color: var(--
|
|
28
|
+
color: var(--color-red-500);
|
|
31
29
|
transform: ${(props) => props.reverse ? "rotate(180deg)" : "none"};
|
|
32
30
|
}
|
|
33
31
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const iconSize = 20;
|
|
3
4
|
const TimelineContainer = styled.div.withConfig({
|
|
4
5
|
shouldForwardProp: (props) => !["maxWidth"].includes(props)
|
|
@@ -40,32 +41,32 @@ const StepIcon = styled.div.withConfig({
|
|
|
40
41
|
switch (props.state) {
|
|
41
42
|
case "completed":
|
|
42
43
|
return css`
|
|
43
|
-
background-color: var(--
|
|
44
|
-
color: var(--
|
|
44
|
+
background-color: var(--status-success-icon);
|
|
45
|
+
color: var(--background-default);
|
|
45
46
|
`;
|
|
46
47
|
case "pending":
|
|
47
48
|
return css`
|
|
48
|
-
background-color: var(--
|
|
49
|
-
color: var(--
|
|
49
|
+
background-color: var(--status-warning-icon);
|
|
50
|
+
color: var(--background-default);
|
|
50
51
|
`;
|
|
51
52
|
case "failed":
|
|
52
53
|
case "cancelled":
|
|
53
54
|
return css`
|
|
54
|
-
background-color: var(--
|
|
55
|
-
color: var(--
|
|
55
|
+
background-color: var(--status-error-icon);
|
|
56
|
+
color: var(--background-default);
|
|
56
57
|
`;
|
|
57
58
|
case "inactive":
|
|
58
59
|
default:
|
|
59
60
|
return css`
|
|
60
61
|
background-color: transparent;
|
|
61
|
-
border: 1.5px solid var(--
|
|
62
|
-
color: var(--
|
|
62
|
+
border: 1.5px solid var(--border-subtle);
|
|
63
|
+
color: var(--text-tertiary);
|
|
63
64
|
`;
|
|
64
65
|
}
|
|
65
66
|
}}
|
|
66
67
|
|
|
67
68
|
> svg path {
|
|
68
|
-
stroke: var(--
|
|
69
|
+
stroke: var(--background-default);
|
|
69
70
|
}
|
|
70
71
|
`;
|
|
71
72
|
const ConnectingLine = styled.div.withConfig({
|
|
@@ -77,7 +78,7 @@ const ConnectingLine = styled.div.withConfig({
|
|
|
77
78
|
align-self: center;
|
|
78
79
|
|
|
79
80
|
${(props) => {
|
|
80
|
-
const lineColor = props.state === "completed" ? "var(--
|
|
81
|
+
const lineColor = props.state === "completed" ? "var(--status-success-icon)" : props.state === "pending" ? "var(--status-warning-icon)" : props.state === "failed" || props.state === "cancelled" ? "var(--status-error-icon)" : "var(--border-subtle)";
|
|
81
82
|
return css`
|
|
82
83
|
background-color: ${lineColor};
|
|
83
84
|
`;
|
|
@@ -96,12 +97,8 @@ const StepHeader = styled.div`
|
|
|
96
97
|
gap: 8px;
|
|
97
98
|
`;
|
|
98
99
|
const StepDate = styled.span`
|
|
99
|
-
color: var(--
|
|
100
|
-
|
|
101
|
-
font-weight: 400;
|
|
102
|
-
text-transform: uppercase;
|
|
103
|
-
line-height: 15px;
|
|
104
|
-
letter-spacing: 2px;
|
|
100
|
+
color: var(--text-primary);
|
|
101
|
+
${text("labelRegular")}
|
|
105
102
|
word-wrap: break-word;
|
|
106
103
|
`;
|
|
107
104
|
const StepTitle = styled.span.withConfig({
|
|
@@ -111,20 +108,17 @@ const StepTitle = styled.span.withConfig({
|
|
|
111
108
|
switch (props.state) {
|
|
112
109
|
case "inactive":
|
|
113
110
|
case "pending":
|
|
114
|
-
return "var(--
|
|
111
|
+
return "var(--text-tertiary)";
|
|
115
112
|
default:
|
|
116
|
-
return "var(--
|
|
113
|
+
return "var(--text-primary)";
|
|
117
114
|
}
|
|
118
115
|
}};
|
|
119
116
|
|
|
120
|
-
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
line-height: 24px;
|
|
123
|
-
letter-spacing: 0.6px;
|
|
117
|
+
${text("subtitleM")}
|
|
124
118
|
word-wrap: break-word;
|
|
125
119
|
`;
|
|
126
120
|
const StepCaption = styled.div`
|
|
127
|
-
color: var(--
|
|
121
|
+
color: var(--text-tertiary);
|
|
128
122
|
margin-top: 4px;
|
|
129
123
|
font-size: 12px;
|
|
130
124
|
font-weight: 400;
|
|
@@ -15,7 +15,7 @@ export type TooltipProps = {
|
|
|
15
15
|
close?: number;
|
|
16
16
|
};
|
|
17
17
|
showArrow?: boolean;
|
|
18
|
-
/** Arrow fill. Defaults to the
|
|
18
|
+
/** Arrow fill (any CSS colour, `var()` included). Defaults to the accent: blue in light, green in dark. */
|
|
19
19
|
arrowColor?: string;
|
|
20
20
|
maxWidth?: number | string;
|
|
21
21
|
/**
|
|
@@ -2,7 +2,6 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, isValidElement, cloneElement, useEffect, useLayoutEffect } from "react";
|
|
3
3
|
import { useFloating, autoUpdate, offset, flip, shift, arrow, useInteractions, useHover, safePolygon, useFocus, useClick, useDismiss, useRole, useTransitionStyles, useMergeRefs, FloatingPortal, FloatingArrow } from "@floating-ui/react";
|
|
4
4
|
import { TriggerWrapper, Bubble } from "./Tooltip.styles.js";
|
|
5
|
-
import { colors } from "../../design-system/tokens/colors.js";
|
|
6
5
|
const useIsomorphicLayoutEffect = typeof document === "undefined" ? useEffect : useLayoutEffect;
|
|
7
6
|
const PLACEMENTS = ["top", "bottom", "left", "right"];
|
|
8
7
|
const FORWARD_REF = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
@@ -130,7 +129,7 @@ const Tooltip = ({
|
|
|
130
129
|
width: ARROW_WIDTH,
|
|
131
130
|
height: ARROW_HEIGHT,
|
|
132
131
|
tipRadius: 1,
|
|
133
|
-
fill: arrowColor ||
|
|
132
|
+
style: { fill: arrowColor || "var(--action-accent-bg)" }
|
|
134
133
|
}
|
|
135
134
|
)
|
|
136
135
|
]
|
|
@@ -9,9 +9,10 @@ const Bubble = styled.div`
|
|
|
9
9
|
width: max-content;
|
|
10
10
|
max-width: ${({ $maxWidth }) => typeof $maxWidth === "number" ? `${$maxWidth}px` : $maxWidth};
|
|
11
11
|
padding: 12px;
|
|
12
|
+
border: 1px solid var(--elevation-border-lg);
|
|
12
13
|
border-radius: 10px;
|
|
13
|
-
background: var(--
|
|
14
|
-
color: var(--
|
|
14
|
+
background: var(--background-surface-raised);
|
|
15
|
+
color: var(--text-primary);
|
|
15
16
|
font-size: 14px;
|
|
16
17
|
line-height: 18px;
|
|
17
18
|
font-weight: 400;
|
|
@@ -21,9 +22,7 @@ const Bubble = styled.div`
|
|
|
21
22
|
/* tippy.css supplied these; without them macOS subpixel AA renders noticeably heavier. */
|
|
22
23
|
-webkit-font-smoothing: antialiased;
|
|
23
24
|
-moz-osx-font-smoothing: grayscale;
|
|
24
|
-
box-shadow:
|
|
25
|
-
0 0 12px 8px rgba(0, 0, 0, 0.03),
|
|
26
|
-
0 0 6px 3px rgba(0, 0, 0, 0.02);
|
|
25
|
+
box-shadow: var(--elevation-lg);
|
|
27
26
|
`;
|
|
28
27
|
export {
|
|
29
28
|
Bubble,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import dropdown from "../../static/images/arrow-down-black.svg.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
3
4
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
5
|
const Breakdown = styled.div.withConfig({
|
|
5
6
|
shouldForwardProp: (props) => ![
|
|
@@ -18,13 +19,10 @@ const Breakdown = styled.div.withConfig({
|
|
|
18
19
|
"active"
|
|
19
20
|
].includes(props)
|
|
20
21
|
})`
|
|
21
|
-
text
|
|
22
|
-
|
|
23
|
-
font-size: ${({ fontSize }) => fontSize ? `${fontSize}px` : "11px"};
|
|
22
|
+
${text("label")}
|
|
23
|
+
${({ fontSize }) => fontSize && `font-size: ${fontSize}px;`}
|
|
24
24
|
white-space: ${({ withWordWrap }) => withWordWrap ? "unset" : "nowrap"};
|
|
25
|
-
line-height: 2.18;
|
|
26
25
|
color: inherit;
|
|
27
|
-
font-weight: bolder;
|
|
28
26
|
strong {
|
|
29
27
|
font-weight: bold;
|
|
30
28
|
}
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
const _Logo = class _Logo extends PureComponent {
|
|
5
5
|
render() {
|
|
6
6
|
const { width, height } = this.props;
|
|
7
|
-
return /* @__PURE__ */ jsx("svg", { width, height, viewBox: "0 0 70 17", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("g", { id: "Symbols", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsx("g", { id: "Top-Nav-1024", transform: "translate(-32 -39)", style: { fill: "var(--
|
|
7
|
+
return /* @__PURE__ */ jsx("svg", { width, height, viewBox: "0 0 70 17", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("g", { id: "Symbols", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsx("g", { id: "Top-Nav-1024", transform: "translate(-32 -39)", style: { fill: "var(--text-primary)" }, children: /* @__PURE__ */ jsx("g", { id: "Top-Nav", children: /* @__PURE__ */ jsx("g", { id: "Logo", transform: "translate(32 39)", children: /* @__PURE__ */ jsxs("g", { id: "Group", children: [
|
|
8
8
|
/* @__PURE__ */ jsx(
|
|
9
9
|
"path",
|
|
10
10
|
{
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import liquid from "../static/images/chains/liquid.svg.js";
|
|
2
|
+
import ethereum from "../static/images/chains/ethereum.svg.js";
|
|
3
|
+
import stellar from "../static/images/chains/stellar.svg.js";
|
|
4
|
+
import solana from "../static/images/chains/solana.svg.js";
|
|
5
|
+
import tempo from "../static/images/chains/tempo.svg.js";
|
|
6
|
+
import avalanche from "../static/images/chains/avalanche.svg.js";
|
|
7
|
+
const chainLogos = {
|
|
8
|
+
liquid,
|
|
9
|
+
ethereum,
|
|
10
|
+
stellar,
|
|
11
|
+
solana,
|
|
12
|
+
tempo,
|
|
13
|
+
avalanche
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
chainLogos
|
|
17
|
+
};
|
|
@@ -10,13 +10,13 @@ html {
|
|
|
10
10
|
|
|
11
11
|
body {
|
|
12
12
|
margin: 0;
|
|
13
|
-
font-family: var(--
|
|
14
|
-
font-size: var(--
|
|
15
|
-
line-height: var(--
|
|
16
|
-
font-weight: var(--
|
|
17
|
-
letter-spacing: var(--
|
|
18
|
-
color: var(--
|
|
19
|
-
background-color: var(--
|
|
13
|
+
font-family: var(--font-family-base);
|
|
14
|
+
font-size: var(--text-body-m-size);
|
|
15
|
+
line-height: var(--text-body-m-line-height);
|
|
16
|
+
font-weight: var(--text-body-m-weight);
|
|
17
|
+
letter-spacing: var(--text-body-m-letter-spacing);
|
|
18
|
+
color: var(--text-body);
|
|
19
|
+
background-color: var(--background-default);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* Browsers give form controls their own font (Arial): take the page font. Zero specificity, any component still wins. */
|
|
@@ -25,17 +25,17 @@ body {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:where(strong, b) {
|
|
28
|
-
font-weight: var(--
|
|
28
|
+
font-weight: var(--font-weight-semibold);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* The accent pair flips as a unit: white on blue in light, black on the brand green in dark. */
|
|
32
32
|
::selection {
|
|
33
|
-
color: var(--
|
|
34
|
-
background-color: var(--
|
|
33
|
+
color: var(--action-accent-text);
|
|
34
|
+
background-color: var(--action-accent-bg);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
:where(:focus-visible) {
|
|
38
|
-
outline: 2px solid var(--
|
|
38
|
+
outline: 2px solid var(--border-focus);
|
|
39
39
|
outline-offset: 2px;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -46,8 +46,9 @@ body {
|
|
|
46
46
|
* it behaves like the old element selectors and never outranks a component.
|
|
47
47
|
*/
|
|
48
48
|
/* Normal specificity on purpose: `body {}` above is (0,0,1), a zero-specificity compat rule would lose to it. Nothing but the
|
|
49
|
-
body element itself matches this, so it cannot outrank a component.
|
|
50
|
-
(
|
|
49
|
+
body element itself matches this, so it cannot outrank a component. Only the size and line-height are left to the remotes
|
|
50
|
+
(10px text, tight line-height: keeps their `em` sizes exact; their `rem` values were converted to px). Weight, letter-spacing
|
|
51
|
+
and font family are the one shared body above, on the host and on every remote: do not override them here. */
|
|
51
52
|
body.mf-remote-route {
|
|
52
53
|
font-size: 10px;
|
|
53
54
|
line-height: 1;
|
|
@@ -69,6 +70,5 @@ body.mf-remote-route {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
:where(body.mf-remote-route) :where(a) {
|
|
72
|
-
font-weight: normal;
|
|
73
73
|
color: inherit;
|
|
74
74
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FontFamilyName, ScaleName, TextSpec } from './tokens/index';
|
|
2
|
+
export declare const kebab: (s: string) => string;
|
|
3
|
+
export declare const textVar: (name: string, prop: string) => string;
|
|
4
|
+
/** The 24 text styles of a scale as [kebab-case name, spec]. */
|
|
5
|
+
export declare const textEntries: (scale: ScaleName) => [string, TextSpec][];
|
|
6
|
+
/** Desktop `--text-*` declarations of a scale (they sit inside `:root`), headed by a comment naming the scale. */
|
|
7
|
+
export declare const typeScaleDesktopDeclarations: (scale: ScaleName) => string[];
|
|
8
|
+
/** Mobile overrides of a scale (they sit inside `@media (max-width: 767px) { :root { … } }`). */
|
|
9
|
+
export declare const typeScaleMobileDeclarations: (scale: ScaleName) => string[];
|
|
10
|
+
/** `@media` block that holds the mobile overrides, formatted as in generated/tokens.css. */
|
|
11
|
+
export declare const mobileBlock: (declarations: string[]) => string[];
|
|
12
|
+
/**
|
|
13
|
+
* CSS text of the `--text-<name>-*` variables of one scale (desktop in `:root`, mobile in the `@media` block), and
|
|
14
|
+
* nothing else: no colour, no font. For a dev switch that previews another scale: inject it in a `<style>` after the
|
|
15
|
+
* design-system stylesheet.
|
|
16
|
+
*/
|
|
17
|
+
export declare const typeScaleCss: (scale: ScaleName) => string;
|
|
18
|
+
/** The `@font-face` rules of a font family; `fileUrl` turns a file name of fonts/ into the url to load it from. */
|
|
19
|
+
export declare const fontFaceRules: (family: FontFamilyName, fileUrl: (file: string) => string) => string[];
|
|
20
|
+
/**
|
|
21
|
+
* Switches the font at runtime: the `:root { --font-family-base }` rule of `family` plus its `@font-face` rules.
|
|
22
|
+
* `urls` maps each woff2 file name of the family (e.g. `inter-latin.woff2`, `inter-latin-ext.woff2`) to the url to load
|
|
23
|
+
* it from, or is a function doing it. Inject it in a `<style>` after the design-system stylesheet.
|
|
24
|
+
*/
|
|
25
|
+
export declare const fontCss: (family: FontFamilyName, urls: Record<string, string> | ((file: string) => string)) => string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { fontFamilies, MOBILE_MAX_WIDTH, textNames, scales } from "./tokens/typography.js";
|
|
2
|
+
import { fontFaces } from "./tokens/fonts.js";
|
|
3
|
+
const indent = (lines) => lines.map((l) => ` ${l}`);
|
|
4
|
+
const kebab = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5
|
+
const textVar = (name, prop) => `--text-${name}-${prop}`;
|
|
6
|
+
const textVars = (name, s, desktop) => {
|
|
7
|
+
if (!s) return [];
|
|
8
|
+
const out = [];
|
|
9
|
+
if (s.size !== void 0) out.push(`${textVar(name, "size")}: ${s.size};`);
|
|
10
|
+
if (s.lineHeight !== void 0) out.push(`${textVar(name, "line-height")}: ${s.lineHeight};`);
|
|
11
|
+
if (s.weight !== void 0) out.push(`${textVar(name, "weight")}: ${s.weight};`);
|
|
12
|
+
if (s.letterSpacing !== void 0) out.push(`${textVar(name, "letter-spacing")}: ${s.letterSpacing};`);
|
|
13
|
+
if (desktop || s.uppercase !== void 0)
|
|
14
|
+
out.push(`${textVar(name, "transform")}: ${s.uppercase ? "uppercase" : "none"};`);
|
|
15
|
+
if (s.underline !== void 0) out.push(`${textVar(name, "decoration")}: ${s.underline ? "underline" : "none"};`);
|
|
16
|
+
return out;
|
|
17
|
+
};
|
|
18
|
+
const textEntries = (scale) => textNames.map((n) => [kebab(n), scales[scale][n]]);
|
|
19
|
+
const typeScaleDesktopDeclarations = (scale) => [
|
|
20
|
+
`/* type scale: ${scale} (desktop) */`,
|
|
21
|
+
...textEntries(scale).flatMap(([n, spec]) => textVars(n, spec.desktop, true))
|
|
22
|
+
];
|
|
23
|
+
const typeScaleMobileDeclarations = (scale) => textEntries(scale).flatMap(([n, spec]) => textVars(n, spec.mobile, false));
|
|
24
|
+
const mobileBlock = (declarations) => [
|
|
25
|
+
`@media (max-width: ${MOBILE_MAX_WIDTH}) {`,
|
|
26
|
+
" :root {",
|
|
27
|
+
...indent(indent(declarations)),
|
|
28
|
+
" }",
|
|
29
|
+
"}"
|
|
30
|
+
];
|
|
31
|
+
const typeScaleCss = (scale) => [
|
|
32
|
+
":root {",
|
|
33
|
+
...indent(typeScaleDesktopDeclarations(scale)),
|
|
34
|
+
"}",
|
|
35
|
+
"",
|
|
36
|
+
...mobileBlock(typeScaleMobileDeclarations(scale)),
|
|
37
|
+
""
|
|
38
|
+
].join("\n");
|
|
39
|
+
const face = (family, url, weight, style, range, stretch) => `@font-face {
|
|
40
|
+
font-family: '${family}';
|
|
41
|
+
font-style: ${style};
|
|
42
|
+
font-weight: ${weight};
|
|
43
|
+
${stretch ? " font-stretch: 100%;\n" : ""} font-display: swap;
|
|
44
|
+
src: url('${url}') format('woff2');
|
|
45
|
+
unicode-range: ${range};
|
|
46
|
+
}`;
|
|
47
|
+
const fontFaceRules = (family, fileUrl) => fontFaces[family].flatMap(
|
|
48
|
+
(set) => set.files.flatMap(
|
|
49
|
+
(f) => (
|
|
50
|
+
// Variable file: one face covering the whole weight range; static files: one face per weight.
|
|
51
|
+
(set.weightRange ? [`${set.weightRange[0]} ${set.weightRange[1]}`] : set.weights).map(
|
|
52
|
+
(w) => face(set.family, fileUrl(f.file), w, f.style, f.range, set.stretch)
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
const fontCss = (family, urls) => {
|
|
58
|
+
const fileUrl = typeof urls === "function" ? urls : (file) => {
|
|
59
|
+
const url = urls[file];
|
|
60
|
+
if (!url) throw new Error(`fontCss('${family}'): no url for ${file}`);
|
|
61
|
+
return url;
|
|
62
|
+
};
|
|
63
|
+
return [
|
|
64
|
+
`:root {
|
|
65
|
+
--font-family-base: ${fontFamilies[family]};
|
|
66
|
+
}`,
|
|
67
|
+
...fontFaceRules(family, fileUrl),
|
|
68
|
+
""
|
|
69
|
+
].join("\n\n");
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
fontCss,
|
|
73
|
+
fontFaceRules,
|
|
74
|
+
kebab,
|
|
75
|
+
mobileBlock,
|
|
76
|
+
textEntries,
|
|
77
|
+
textVar,
|
|
78
|
+
typeScaleCss,
|
|
79
|
+
typeScaleDesktopDeclarations,
|
|
80
|
+
typeScaleMobileDeclarations
|
|
81
|
+
};
|