@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,13 +1,14 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { SelectWrapper } from "../Input/Select.styles.js";
|
|
3
3
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const Card = styled.div.withConfig({
|
|
5
6
|
shouldForwardProp: (props) => !["lessPadding", "lessPaddingHorizontal", "lessPaddingVertical", "chartPadding", "noPadding", "grow"].includes(
|
|
6
7
|
props
|
|
7
8
|
)
|
|
8
9
|
})`
|
|
9
10
|
padding: 28px 22px;
|
|
10
|
-
background: var(--
|
|
11
|
+
background: var(--background-default);
|
|
11
12
|
|
|
12
13
|
${breakpoint.Medium`
|
|
13
14
|
padding: 40px 50px;
|
|
@@ -46,9 +47,7 @@ const Card = styled.div.withConfig({
|
|
|
46
47
|
`}
|
|
47
48
|
`;
|
|
48
49
|
const CardTitle = styled.div`
|
|
49
|
-
|
|
50
|
-
line-height: 22px;
|
|
51
|
-
font-weight: 600;
|
|
50
|
+
${text("subtitleM")}
|
|
52
51
|
`;
|
|
53
52
|
const CardTitleContainer = styled.div`
|
|
54
53
|
display: flex;
|
|
@@ -43,8 +43,8 @@ const TabList = styled.div`
|
|
|
43
43
|
position: relative;
|
|
44
44
|
display: flex;
|
|
45
45
|
width: 100%;
|
|
46
|
-
background: var(--
|
|
47
|
-
box-shadow: inset 0 -1px 0 var(--
|
|
46
|
+
background: var(--background-surface);
|
|
47
|
+
box-shadow: inset 0 -1px 0 var(--border-subtle);
|
|
48
48
|
|
|
49
49
|
${({ $scrollMarginTop }) => $scrollMarginTop && css`
|
|
50
50
|
[role='tab'] {
|
|
@@ -65,7 +65,7 @@ const TabList = styled.div`
|
|
|
65
65
|
`;
|
|
66
66
|
const TabHighlight = styled(TabHighlightBase)`
|
|
67
67
|
bottom: -1px;
|
|
68
|
-
background: var(--
|
|
68
|
+
background: var(--background-default);
|
|
69
69
|
`;
|
|
70
70
|
const FitHighlight = styled.span`
|
|
71
71
|
position: absolute;
|
|
@@ -76,7 +76,7 @@ const FitHighlight = styled.span`
|
|
|
76
76
|
z-index: 0;
|
|
77
77
|
width: var(--tab-width);
|
|
78
78
|
transform: translateX(var(--tab-left));
|
|
79
|
-
background: var(--
|
|
79
|
+
background: var(--background-default);
|
|
80
80
|
pointer-events: none;
|
|
81
81
|
transition:
|
|
82
82
|
transform 553ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
@@ -95,7 +95,7 @@ const Tab = styled.button`
|
|
|
95
95
|
side padding looks the same as Figma's 32px while not forcing a tab wider. */
|
|
96
96
|
flex: 1 1 0;
|
|
97
97
|
min-width: 0;
|
|
98
|
-
padding: var(--
|
|
98
|
+
padding: var(--space-4) var(--space-2);
|
|
99
99
|
border: none;
|
|
100
100
|
cursor: pointer;
|
|
101
101
|
background: transparent;
|
|
@@ -105,19 +105,19 @@ const Tab = styled.button`
|
|
|
105
105
|
opacity: 0.5;
|
|
106
106
|
}
|
|
107
107
|
/* Figma: closed tabs in #9b9b9b, a lighter grey than the tertiary text token. */
|
|
108
|
-
color: ${({ $active }) => $active ? "var(--
|
|
108
|
+
color: ${({ $active }) => $active ? "var(--text-primary)" : "var(--text-tertiary)"};
|
|
109
109
|
|
|
110
110
|
${({ $fit, $stretch, $filled }) => $fit && css`
|
|
111
111
|
flex: 0 0 auto;
|
|
112
|
-
padding: var(--
|
|
112
|
+
padding: var(--space-4) var(--space-8);
|
|
113
113
|
white-space: nowrap;
|
|
114
|
-
background: ${$filled ? "var(--
|
|
114
|
+
background: ${$filled ? "var(--background-default)" : "transparent"};
|
|
115
115
|
|
|
116
116
|
/* Figma mobile: the tabs share the row (still scrolling once the labels outgrow it). */
|
|
117
117
|
${$stretch && css`
|
|
118
118
|
${breakpoint.below.MLarge`
|
|
119
119
|
flex: 1 0 auto;
|
|
120
|
-
padding: var(--
|
|
120
|
+
padding: var(--space-4) var(--space-5);
|
|
121
121
|
`}
|
|
122
122
|
`}
|
|
123
123
|
`}
|
|
@@ -127,7 +127,7 @@ const TabDivider = styled.div`
|
|
|
127
127
|
z-index: 1;
|
|
128
128
|
flex: 0 0 1px;
|
|
129
129
|
width: 1px;
|
|
130
|
-
background: var(--
|
|
130
|
+
background: var(--border-subtle);
|
|
131
131
|
|
|
132
132
|
${({ $edge }) => $edge && css`
|
|
133
133
|
${breakpoint.below.MLarge`
|
|
@@ -139,19 +139,19 @@ const TabCard = styled.div`
|
|
|
139
139
|
display: flex;
|
|
140
140
|
flex-direction: column;
|
|
141
141
|
overflow: hidden;
|
|
142
|
-
background: var(--
|
|
143
|
-
border: 1px solid var(--
|
|
144
|
-
border-radius: var(--
|
|
145
|
-
box-shadow: var(--
|
|
142
|
+
background: var(--background-default);
|
|
143
|
+
border: 1px solid var(--border-subtle);
|
|
144
|
+
border-radius: var(--radius-lg);
|
|
145
|
+
box-shadow: var(--elevation-xs);
|
|
146
146
|
`;
|
|
147
147
|
const TabCardBody = styled.div`
|
|
148
148
|
display: flex;
|
|
149
149
|
flex-direction: column;
|
|
150
|
-
gap: var(--
|
|
151
|
-
padding: var(--
|
|
150
|
+
gap: var(--space-4);
|
|
151
|
+
padding: var(--space-6);
|
|
152
152
|
|
|
153
153
|
${breakpoint.below.MLarge`
|
|
154
|
-
padding: var(--
|
|
154
|
+
padding: var(--space-4);
|
|
155
155
|
`}
|
|
156
156
|
`;
|
|
157
157
|
export {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
3
4
|
const Items = styled.div`
|
|
4
5
|
display: block;
|
|
5
6
|
margin: -16px 0;
|
|
@@ -40,16 +41,14 @@ styled.div`
|
|
|
40
41
|
const LargeText = styled.div.withConfig({
|
|
41
42
|
shouldForwardProp: (props) => !["isPositive", "isLink"].includes(props)
|
|
42
43
|
})`
|
|
43
|
-
|
|
44
|
-
font-size: 22px;
|
|
45
|
-
line-height: 28px;
|
|
44
|
+
${text("titleL")}
|
|
46
45
|
|
|
47
46
|
${(props) => props.isPositive && `
|
|
48
|
-
color: var(--
|
|
47
|
+
color: var(--status-success-text);
|
|
49
48
|
`}
|
|
50
49
|
|
|
51
50
|
${(props) => props.isPositive === false && `
|
|
52
|
-
color: var(--
|
|
51
|
+
color: var(--status-error-text);
|
|
53
52
|
`}
|
|
54
53
|
|
|
55
54
|
${(props) => props.isLink && `
|
|
@@ -88,12 +87,12 @@ const MarketDataCol = styled.div.withConfig({
|
|
|
88
87
|
border-right: 5px solid transparent;
|
|
89
88
|
${(props) => props.isPositive && `
|
|
90
89
|
border-bottom: 7px solid
|
|
91
|
-
var(--
|
|
90
|
+
var(--status-success-icon);
|
|
92
91
|
`}
|
|
93
92
|
|
|
94
93
|
${(props) => props.isPositive === false && `
|
|
95
94
|
border-top: 7px solid
|
|
96
|
-
var(--
|
|
95
|
+
var(--status-error-icon);
|
|
97
96
|
`}
|
|
98
97
|
}
|
|
99
98
|
`;
|
|
@@ -9,7 +9,6 @@ const Label = styled(Label$1)`
|
|
|
9
9
|
position: relative;
|
|
10
10
|
top: 0;
|
|
11
11
|
transform: none;
|
|
12
|
-
font-size: 10px;
|
|
13
12
|
margin-bottom: 5px;
|
|
14
13
|
`;
|
|
15
14
|
const Input = styled.div`
|
|
@@ -31,7 +30,7 @@ const Input = styled.div`
|
|
|
31
30
|
display: inline-block;
|
|
32
31
|
max-width: 100%;
|
|
33
32
|
padding-left: 28px;
|
|
34
|
-
font-family: var(--
|
|
33
|
+
font-family: var(--font-family-base);
|
|
35
34
|
font-size: 12px;
|
|
36
35
|
line-height: 16px;
|
|
37
36
|
font-weight: 300;
|
|
@@ -43,7 +42,7 @@ const Input = styled.div`
|
|
|
43
42
|
font-size: 12px;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
${(props) => props.$error && `color: var(--
|
|
45
|
+
${(props) => props.$error && `color: var(--status-error-text)`};
|
|
47
46
|
|
|
48
47
|
&:before {
|
|
49
48
|
content: '';
|
|
@@ -54,7 +53,7 @@ const Input = styled.div`
|
|
|
54
53
|
width: 16px;
|
|
55
54
|
height: 16px;
|
|
56
55
|
border-radius: 3px;
|
|
57
|
-
border: 1px solid var(--
|
|
56
|
+
border: 1px solid var(--border-default);
|
|
58
57
|
background-color: transparent;
|
|
59
58
|
box-shadow: none;
|
|
60
59
|
transition:
|
|
@@ -66,7 +65,7 @@ const Input = styled.div`
|
|
|
66
65
|
height: 20px;
|
|
67
66
|
border-radius: 4px;
|
|
68
67
|
`}
|
|
69
|
-
${(props) => props.$disabled && `background-color: var(--
|
|
68
|
+
${(props) => props.$disabled && `background-color: var(--action-disabled-secondary-bg);`}
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
> [data-icon] {
|
|
@@ -75,7 +74,7 @@ const Input = styled.div`
|
|
|
75
74
|
left: -1px;
|
|
76
75
|
width: 18px;
|
|
77
76
|
height: 18px;
|
|
78
|
-
color: var(--
|
|
77
|
+
color: var(--action-accent-text);
|
|
79
78
|
opacity: 0;
|
|
80
79
|
clip-path: inset(0 100% 0 0);
|
|
81
80
|
transition:
|
|
@@ -91,20 +90,20 @@ const Input = styled.div`
|
|
|
91
90
|
|
|
92
91
|
&:hover + label {
|
|
93
92
|
&:before {
|
|
94
|
-
border-color: ${(props) => props.$disabled ? "none" : "var(--
|
|
93
|
+
border-color: ${(props) => props.$disabled ? "none" : "var(--border-strong)"};
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
&:focus-visible + label:before {
|
|
99
98
|
box-shadow:
|
|
100
|
-
0 0 0 2px var(--
|
|
101
|
-
0 0 0 4px var(--
|
|
99
|
+
0 0 0 2px var(--background-default),
|
|
100
|
+
0 0 0 4px var(--border-focus);
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
&:checked + label {
|
|
105
104
|
&:before {
|
|
106
|
-
background-color: ${(props) => props.$disabled ? "var(--
|
|
107
|
-
border-color: ${(props) => props.$disabled ? "var(--
|
|
105
|
+
background-color: ${(props) => props.$disabled ? "var(--action-disabled-accent-bg)" : "var(--action-accent-bg)"};
|
|
106
|
+
border-color: ${(props) => props.$disabled ? "var(--action-disabled-accent-bg)" : "var(--action-accent-bg)"};
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
> [data-icon] {
|
|
@@ -8,15 +8,15 @@ const ICON_MAP = {
|
|
|
8
8
|
done: {
|
|
9
9
|
material: "check",
|
|
10
10
|
weight: 600,
|
|
11
|
-
color: "var(--
|
|
11
|
+
color: "var(--status-success-icon)"
|
|
12
12
|
},
|
|
13
13
|
missing: {
|
|
14
14
|
icon: /* @__PURE__ */ jsx(SvgWarningFilled, {}),
|
|
15
|
-
color: "var(--
|
|
15
|
+
color: "var(--status-warning-icon)"
|
|
16
16
|
},
|
|
17
17
|
in_progress: {
|
|
18
18
|
material: "search_activity",
|
|
19
|
-
color: "var(--
|
|
19
|
+
color: "var(--text-tertiary)"
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
const ChecklistCard = ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
3
4
|
const CardContainer = styled.div.withConfig({
|
|
4
5
|
shouldForwardProp: (props) => !["isClickable"].includes(props)
|
|
@@ -6,9 +7,9 @@ const CardContainer = styled.div.withConfig({
|
|
|
6
7
|
display: flex;
|
|
7
8
|
flex-direction: column;
|
|
8
9
|
align-items: flex-start;
|
|
9
|
-
border: 1px solid var(--
|
|
10
|
+
border: 1px solid var(--border-subtle);
|
|
10
11
|
border-radius: 8px;
|
|
11
|
-
background: var(--
|
|
12
|
+
background: var(--background-default);
|
|
12
13
|
padding: 32px 32px 32px 32px;
|
|
13
14
|
min-width: 320px;
|
|
14
15
|
min-height: 220px;
|
|
@@ -36,31 +37,17 @@ const IconBlock = styled.div`
|
|
|
36
37
|
margin-bottom: 32px;
|
|
37
38
|
`;
|
|
38
39
|
const IconCopy = styled.span`
|
|
39
|
-
|
|
40
|
-
font-weight: 400;
|
|
41
|
-
letter-spacing: 2px;
|
|
40
|
+
${text("labelRegular")}
|
|
42
41
|
margin-left: 8px;
|
|
43
|
-
line-height: 16px;
|
|
44
|
-
text-transform: uppercase;
|
|
45
42
|
`;
|
|
46
43
|
const CardTitle = styled.div`
|
|
47
44
|
margin-bottom: 32px;
|
|
48
|
-
text-
|
|
49
|
-
color: var(--stokr-text-primary);
|
|
50
|
-
font-weight: 800;
|
|
45
|
+
color: var(--text-primary);
|
|
51
46
|
word-wrap: break-word;
|
|
52
|
-
|
|
53
|
-
line-height: 24px;
|
|
54
|
-
letter-spacing: 0.6px;
|
|
55
|
-
|
|
56
|
-
${breakpoint.Medium`
|
|
57
|
-
font-size: 22px;
|
|
58
|
-
letter-spacing: 0.8px;
|
|
59
|
-
line-height: 28px;
|
|
60
|
-
`}
|
|
47
|
+
${text("titleL")}
|
|
61
48
|
`;
|
|
62
49
|
const CardDescription = styled.div`
|
|
63
|
-
color: var(--
|
|
50
|
+
color: var(--text-primary);
|
|
64
51
|
font-size: 14px;
|
|
65
52
|
font-weight: 300;
|
|
66
53
|
line-height: 20px;
|
|
@@ -9,8 +9,8 @@ const Chip = ({
|
|
|
9
9
|
tooltip = null,
|
|
10
10
|
tooltipProps,
|
|
11
11
|
tooltipIconOutline = false,
|
|
12
|
-
activeColor = "var(--
|
|
13
|
-
activeTextColor = "var(--
|
|
12
|
+
activeColor = "var(--action-secondary-bg)",
|
|
13
|
+
activeTextColor = "var(--action-secondary-text)",
|
|
14
14
|
...props
|
|
15
15
|
}) => {
|
|
16
16
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { Icon } from "../InfoIcon/InfoIcon.styles.js";
|
|
3
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const activeStyles = ({ activeColor, activeTextColor }) => `
|
|
5
6
|
border-color: ${activeColor};
|
|
6
7
|
background-color: ${activeColor};
|
|
@@ -18,18 +19,15 @@ const StyledChip = styled.div.withConfig({
|
|
|
18
19
|
gap: 4px;
|
|
19
20
|
align-items: center;
|
|
20
21
|
padding: 12px 16px;
|
|
21
|
-
border: 1px solid var(--
|
|
22
|
+
border: 1px solid var(--border-subtle);
|
|
22
23
|
border-radius: 999px;
|
|
23
24
|
background-color: transparent;
|
|
24
|
-
color: var(--
|
|
25
|
+
color: var(--text-secondary);
|
|
25
26
|
cursor: pointer;
|
|
26
27
|
transition:
|
|
27
28
|
background-color 0.2s ease,
|
|
28
29
|
border-color 0.2s ease;
|
|
29
|
-
|
|
30
|
-
line-height: 20px;
|
|
31
|
-
letter-spacing: 2px;
|
|
32
|
-
font-weight: 600;
|
|
30
|
+
${text("overline")}
|
|
33
31
|
|
|
34
32
|
&:hover,
|
|
35
33
|
&:active {
|
|
@@ -45,9 +43,7 @@ const Wrapper = styled.div.withConfig({
|
|
|
45
43
|
gap: 32px;
|
|
46
44
|
${({ customWrapperStyle }) => customWrapperStyle}
|
|
47
45
|
`;
|
|
48
|
-
const ChipText = styled.span
|
|
49
|
-
text-transform: uppercase;
|
|
50
|
-
`;
|
|
46
|
+
const ChipText = styled.span``;
|
|
51
47
|
styled.span.attrs({
|
|
52
48
|
children: glyph("info")
|
|
53
49
|
})`
|
|
@@ -56,7 +52,7 @@ styled.span.attrs({
|
|
|
56
52
|
font-size: 16px;
|
|
57
53
|
line-height: 16px;
|
|
58
54
|
vertical-align: middle;
|
|
59
|
-
color: var(--
|
|
55
|
+
color: var(--text-secondary);
|
|
60
56
|
transition: color 0.2s;
|
|
61
57
|
`;
|
|
62
58
|
export {
|
|
@@ -4,17 +4,17 @@ const DURATION = "300ms";
|
|
|
4
4
|
const EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
5
5
|
const Root = styled.div`
|
|
6
6
|
${({ $flush }) => !$flush && `
|
|
7
|
-
background: var(--
|
|
8
|
-
border: 1px solid var(--
|
|
9
|
-
border-radius: var(--
|
|
10
|
-
box-shadow: var(--
|
|
7
|
+
background: var(--background-default);
|
|
8
|
+
border: 1px solid var(--border-subtle);
|
|
9
|
+
border-radius: var(--radius-lg);
|
|
10
|
+
box-shadow: var(--elevation-xs);
|
|
11
11
|
`}
|
|
12
12
|
|
|
13
13
|
/* Pointer devices only: on touch a tap leaves :hover stuck after closing it. */
|
|
14
14
|
${({ $open, $flush }) => !$open && !$flush && `
|
|
15
15
|
@media (hover: hover) {
|
|
16
16
|
&:hover {
|
|
17
|
-
box-shadow: var(--
|
|
17
|
+
box-shadow: var(--elevation-sm);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
`}
|
|
@@ -26,27 +26,27 @@ const Header = styled.button`
|
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: center;
|
|
28
28
|
justify-content: space-between;
|
|
29
|
-
gap: var(--
|
|
29
|
+
gap: var(--space-4);
|
|
30
30
|
width: 100%;
|
|
31
|
-
padding: var(--collapsible-header-padding, var(--
|
|
31
|
+
padding: var(--collapsible-header-padding, var(--space-5));
|
|
32
32
|
border: none;
|
|
33
33
|
background: none;
|
|
34
|
-
color: var(--
|
|
34
|
+
color: var(--text-primary);
|
|
35
35
|
text-align: left;
|
|
36
36
|
cursor: pointer;
|
|
37
37
|
|
|
38
38
|
/* The rule and the tighter bottom padding follow the body's open animation instead of snapping. */
|
|
39
39
|
${({ $divided, $open }) => $divided && `
|
|
40
|
-
padding-bottom: ${$open ? "var(--
|
|
40
|
+
padding-bottom: ${$open ? "var(--space-4)" : "var(--space-5)"};
|
|
41
41
|
transition: padding-bottom ${DURATION} ${EASING};
|
|
42
42
|
|
|
43
43
|
&::after {
|
|
44
44
|
content: '';
|
|
45
45
|
position: absolute;
|
|
46
|
-
right: var(--
|
|
46
|
+
right: var(--space-5);
|
|
47
47
|
bottom: 0;
|
|
48
|
-
left: var(--
|
|
49
|
-
border-bottom: 1px solid var(--
|
|
48
|
+
left: var(--space-5);
|
|
49
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
50
50
|
opacity: ${$open ? 1 : 0};
|
|
51
51
|
transition: opacity ${DURATION} ${EASING};
|
|
52
52
|
}
|
|
@@ -94,9 +94,9 @@ const BodyInner = styled.div`
|
|
|
94
94
|
${text("bodyS")};
|
|
95
95
|
padding: var(
|
|
96
96
|
--collapsible-body-padding,
|
|
97
|
-
${({ $divided }) => $divided ? "var(--
|
|
97
|
+
${({ $divided }) => $divided ? "var(--space-6)" : "0"} var(--space-5) var(--space-5)
|
|
98
98
|
);
|
|
99
|
-
color: var(--
|
|
99
|
+
color: var(--text-secondary);
|
|
100
100
|
`;
|
|
101
101
|
export {
|
|
102
102
|
Body,
|
|
@@ -37,7 +37,7 @@ const Container = styled.div.withConfig({
|
|
|
37
37
|
`}
|
|
38
38
|
`;
|
|
39
39
|
const TrackH = styled.div`
|
|
40
|
-
background-color: var(--
|
|
40
|
+
background-color: var(--border-subtle);
|
|
41
41
|
left: 16px;
|
|
42
42
|
right: 16px;
|
|
43
43
|
bottom: 14px;
|
|
@@ -51,12 +51,12 @@ const TrackH = styled.div`
|
|
|
51
51
|
`}
|
|
52
52
|
`;
|
|
53
53
|
const ThumbH = styled.div`
|
|
54
|
-
background-color: var(--
|
|
54
|
+
background-color: var(--action-accent-bg);
|
|
55
55
|
height: 4px;
|
|
56
56
|
border-radius: 4px;
|
|
57
57
|
`;
|
|
58
58
|
const TrackV = styled.div`
|
|
59
|
-
background-color: var(--
|
|
59
|
+
background-color: var(--border-subtle);
|
|
60
60
|
top: 16px;
|
|
61
61
|
bottom: 16px;
|
|
62
62
|
right: 14px;
|
|
@@ -70,12 +70,12 @@ const TrackV = styled.div`
|
|
|
70
70
|
`}
|
|
71
71
|
`;
|
|
72
72
|
const ThumbV = styled.div`
|
|
73
|
-
background-color: var(--
|
|
73
|
+
background-color: var(--action-accent-bg);
|
|
74
74
|
width: 4px;
|
|
75
75
|
border-radius: 4px;
|
|
76
76
|
`;
|
|
77
77
|
const View = styled.div`
|
|
78
|
-
scrollbar-color: var(--
|
|
78
|
+
scrollbar-color: var(--action-accent-bg) transparent;
|
|
79
79
|
`;
|
|
80
80
|
const Outer = styled.div.withConfig({
|
|
81
81
|
shouldForwardProp: (props) => !["offset", "barPadding", "topPadding"].includes(props)
|
|
@@ -44,19 +44,19 @@ const ComponentWrapper = styled.div.withConfig({
|
|
|
44
44
|
`}
|
|
45
45
|
|
|
46
46
|
${(props) => props.borderLeft && css`
|
|
47
|
-
border-left: 1px solid var(--
|
|
47
|
+
border-left: 1px solid var(--border-subtle);
|
|
48
48
|
`}
|
|
49
49
|
|
|
50
50
|
${(props) => props.borderRight && css`
|
|
51
|
-
border-right: 1px solid var(--
|
|
51
|
+
border-right: 1px solid var(--border-subtle);
|
|
52
52
|
`}
|
|
53
53
|
|
|
54
54
|
${(props) => props.borderTop && css`
|
|
55
|
-
border-top: 1px solid var(--
|
|
55
|
+
border-top: 1px solid var(--border-subtle);
|
|
56
56
|
`}
|
|
57
57
|
|
|
58
58
|
${(props) => props.borderBottom && css`
|
|
59
|
-
border-bottom: 1px solid var(--
|
|
59
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
60
60
|
`}
|
|
61
61
|
|
|
62
62
|
${(props) => props.noPaddingLeft && css`
|
|
@@ -112,7 +112,7 @@ const ComponentWrapper = styled.div.withConfig({
|
|
|
112
112
|
`}
|
|
113
113
|
|
|
114
114
|
${(props) => props.background && css`
|
|
115
|
-
background-color: var(--
|
|
115
|
+
background-color: var(--background-surface);
|
|
116
116
|
`}
|
|
117
117
|
|
|
118
118
|
${(props) => props.fluid && css`
|
|
@@ -11,7 +11,7 @@ const ContainerWithLine = styled(Text).withConfig({
|
|
|
11
11
|
content: '';
|
|
12
12
|
width: 11px;
|
|
13
13
|
height: ${({ height }) => height ? height - 15 : 50}px;
|
|
14
|
-
background: ${(props) => props.lineColor || "var(--
|
|
14
|
+
background: ${(props) => props.lineColor || "var(--action-accent-bg)"};
|
|
15
15
|
position: absolute;
|
|
16
16
|
left: 0;
|
|
17
17
|
top: 6px;
|
|
@@ -20,7 +20,7 @@ const ContainerWithLine = styled(Text).withConfig({
|
|
|
20
20
|
const RedBar = styled.div.withConfig({
|
|
21
21
|
shouldForwardProp: (props) => !["barColor"].includes(props)
|
|
22
22
|
})`
|
|
23
|
-
background: ${(props) => props.barColor || "var(--
|
|
23
|
+
background: ${(props) => props.barColor || "var(--color-red-500)"};
|
|
24
24
|
bottom: 0;
|
|
25
25
|
height: 20%;
|
|
26
26
|
position: absolute;
|
|
@@ -7,7 +7,7 @@ import { FlagFor } from "./FlagFor.js";
|
|
|
7
7
|
import { SelectedChipsTitle, SelectedChipsList, SelectedChip, SelectedChipRemove } from "../Input/Select.styles.js";
|
|
8
8
|
const PillChipsWrapper = styled.div`
|
|
9
9
|
${SelectedChipsTitle} {
|
|
10
|
-
color: var(--
|
|
10
|
+
color: var(--text-tertiary);
|
|
11
11
|
margin-bottom: 10px;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -17,13 +17,13 @@ const PillChipsWrapper = styled.div`
|
|
|
17
17
|
|
|
18
18
|
${SelectedChip} {
|
|
19
19
|
padding: 6px 12px 6px 10px;
|
|
20
|
-
border-color: var(--
|
|
20
|
+
border-color: var(--border-subtle);
|
|
21
21
|
border-radius: 999px;
|
|
22
22
|
font-size: 13px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
${SelectedChipRemove} {
|
|
26
|
-
color: var(--
|
|
26
|
+
color: var(--text-tertiary);
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
border-radius: 50%;
|
|
29
29
|
transition:
|
|
@@ -31,8 +31,8 @@ const PillChipsWrapper = styled.div`
|
|
|
31
31
|
background-color 0.15s;
|
|
32
32
|
|
|
33
33
|
&:hover {
|
|
34
|
-
color: var(--
|
|
35
|
-
background-color: var(--
|
|
34
|
+
color: var(--action-outline-text);
|
|
35
|
+
background-color: var(--action-outline-bg-hover);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&:disabled {
|
|
@@ -40,7 +40,7 @@ const PillChipsWrapper = styled.div`
|
|
|
40
40
|
opacity: 0.5;
|
|
41
41
|
|
|
42
42
|
&:hover {
|
|
43
|
-
color: var(--
|
|
43
|
+
color: var(--text-tertiary);
|
|
44
44
|
background-color: transparent;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { TextName } from '../../design-system';
|
|
2
3
|
import { RadioWrapOption } from './RadioWrap';
|
|
3
4
|
export interface CryptoAddressData {
|
|
4
5
|
value?: string | number;
|
|
@@ -26,7 +27,10 @@ export interface CryptoAddressProps {
|
|
|
26
27
|
noBody?: boolean;
|
|
27
28
|
noBorderBottom?: boolean;
|
|
28
29
|
flexHead?: boolean;
|
|
30
|
+
/** @deprecated No effect: use `valueStyle`. */
|
|
29
31
|
fontSize?: number;
|
|
32
|
+
/** Kit text style of `data.value` (the amount or address). Default `titleL`. */
|
|
33
|
+
valueStyle?: TextName;
|
|
30
34
|
eqValueFontSize?: number;
|
|
31
35
|
eqValueStyle?: CSSProperties;
|
|
32
36
|
titleColor?: string;
|
|
@@ -40,6 +44,6 @@ export interface CryptoAddressProps {
|
|
|
40
44
|
/** Margin-left for child divs inside Value (default: '30px'). */
|
|
41
45
|
valueChildMarginLeft?: string;
|
|
42
46
|
}
|
|
43
|
-
export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead,
|
|
44
|
-
export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead,
|
|
47
|
+
export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element>;
|
|
45
49
|
export default CryptoAddress;
|
|
@@ -31,7 +31,7 @@ const CryptoAddress = ({
|
|
|
31
31
|
noBody,
|
|
32
32
|
noBorderBottom,
|
|
33
33
|
flexHead,
|
|
34
|
-
|
|
34
|
+
valueStyle,
|
|
35
35
|
eqValueFontSize = 9,
|
|
36
36
|
eqValueStyle,
|
|
37
37
|
titleColor,
|
|
@@ -61,7 +61,7 @@ const CryptoAddress = ({
|
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ jsxs(Body, { noBody, style: bodyStyle, children: [
|
|
63
63
|
/* @__PURE__ */ jsxs(DataBox, { style: dataBoxStyle, children: [
|
|
64
|
-
data.value && /* @__PURE__ */ jsxs(Value, {
|
|
64
|
+
data.value && /* @__PURE__ */ jsxs(Value, { textStyle: valueStyle, style: dataValueStyle, childMarginLeft: valueChildMarginLeft, children: [
|
|
65
65
|
data.unit && `${data.unit} `,
|
|
66
66
|
data.shortAddress ? /* @__PURE__ */ jsx(Tooltip, { placement: "top", content: data.value, children: shortenAddress(String(data.value)) }) : data.value,
|
|
67
67
|
data.tooltip && /* @__PURE__ */ jsx("div", { children: copyToClipBoard(String(data.value)) })
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TextName } from '../../design-system';
|
|
2
3
|
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
4
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
5
|
}> & string;
|
|
@@ -54,7 +55,7 @@ export declare const InfoBox: import('styled-components/dist/types').IStyledComp
|
|
|
54
55
|
export declare const Value: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
55
56
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
56
57
|
}, {
|
|
57
|
-
|
|
58
|
+
textStyle?: TextName;
|
|
58
59
|
childMarginLeft?: number | string;
|
|
59
60
|
}>> & string;
|
|
60
61
|
export declare const Equal: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|