@stokr/components-library 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/components/AddressItem/AddressItem.styles.js +9 -9
- package/dist/components/AdminDashboard/Table/Table.styles.js +18 -25
- package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
- package/dist/components/BackButton/BackButton.styles.js +15 -15
- package/dist/components/BasicTable/BasicTable.styles.js +6 -8
- package/dist/components/BlogPost/BlogPost.styles.js +9 -13
- package/dist/components/Button/Button.styles.d.ts +1 -1
- package/dist/components/Button/Button.styles.js +122 -11
- package/dist/components/Button/GlareButton.js +1 -1
- package/dist/components/Card/Card.styles.js +3 -4
- package/dist/components/CardTabs/CardTabs.styles.js +17 -17
- package/dist/components/ChartLegend/ChartLegend.styles.js +6 -7
- package/dist/components/Checkbox/Checkbox.styles.js +10 -11
- package/dist/components/Checklist/ChecklistCard.js +3 -3
- package/dist/components/Checklist/ChecklistCard.styles.js +7 -20
- package/dist/components/Chips/Chip.js +2 -2
- package/dist/components/Chips/Chip.styles.js +6 -10
- package/dist/components/Collapsible/Collapsible.styles.js +14 -14
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +5 -5
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +5 -5
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +2 -2
- package/dist/components/Country/CountrySelect.js +6 -6
- package/dist/components/CryptoAddress/CryptoAddress.d.ts +6 -2
- package/dist/components/CryptoAddress/CryptoAddress.js +2 -2
- package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +2 -1
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +20 -27
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +2 -2
- package/dist/components/FAQ/FAQ.styles.js +15 -20
- package/dist/components/Form/Form.styles.js +5 -5
- package/dist/components/Grid/Grid.styles.js +7 -7
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +10 -22
- package/dist/components/InfoBox/InfoBox.d.ts +2 -2
- package/dist/components/InfoBox/InfoBox.js +5 -3
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
- package/dist/components/Input/DatePickerInput.styles.js +23 -24
- package/dist/components/Input/Input.styles.js +24 -30
- package/dist/components/Input/InputPassword.styles.js +11 -11
- package/dist/components/Input/InputWithButton.styles.js +5 -5
- package/dist/components/Input/MultiSelect.js +17 -17
- package/dist/components/Input/OtpInput.js +1 -1
- package/dist/components/Input/RangeInput.js +2 -2
- package/dist/components/Input/SearchInput.styles.js +10 -10
- package/dist/components/Input/Select.js +21 -16
- package/dist/components/Input/Select.styles.js +24 -28
- package/dist/components/Input/TableFilterDropdown.js +5 -5
- package/dist/components/Input/Textarea.styles.js +11 -13
- package/dist/components/MenuNav/MenuNav.styles.js +2 -5
- package/dist/components/Modal/Modal.styles.js +25 -31
- package/dist/components/Modal/PaymentModal.js +7 -7
- package/dist/components/Modal/SideModal.styles.js +8 -8
- package/dist/components/Modal/SideModalParts.js +15 -16
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +5 -8
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -2
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/Number/Number.styles.js +2 -2
- package/dist/components/Pagination/Pagination.styles.js +7 -7
- package/dist/components/PanelCard/PanelCard.styles.js +17 -17
- package/dist/components/Payment/DetailRows.js +1 -1
- package/dist/components/Payment/DetailsToggle.js +4 -6
- package/dist/components/Payment/PaymentDetailsCard.js +29 -53
- package/dist/components/Payment/PaymentDisplay.js +12 -20
- package/dist/components/Payment/PaymentPendingCard.d.ts +1 -1
- package/dist/components/Payment/PaymentPendingCard.js +10 -13
- package/dist/components/Payment/PaymentSuccessCard.js +6 -9
- package/dist/components/Payment/TimerComponent.js +5 -4
- package/dist/components/Process/Process.styles.js +7 -13
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -10
- package/dist/components/ProfileBox/ProfileBox.styles.js +5 -7
- package/dist/components/Radio/Radio.styles.js +8 -9
- package/dist/components/RefreshButton/RefreshButton.styles.js +5 -5
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +3 -5
- package/dist/components/Section/Section.styles.js +16 -18
- package/dist/components/SectionTitle/SectionTitle.styles.d.ts +4 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +4 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +3 -3
- package/dist/components/Snackbar/Snackbar.styles.js +8 -10
- package/dist/components/SpanButton/SpanButton.styles.js +2 -2
- package/dist/components/StatusDot/StatusDot.d.ts +1 -1
- package/dist/components/StatusDot/StatusDot.js +5 -5
- package/dist/components/StatusDot/StatusDot.styles.js +2 -5
- package/dist/components/StatusTag/StatusTag.js +1 -1
- package/dist/components/StatusTag/StatusTag.styles.js +4 -4
- package/dist/components/StepController/StepController.styles.js +7 -7
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +6 -8
- package/dist/components/StepSidebar/StepProgress.styles.js +18 -27
- package/dist/components/StepSidebar/StepSidebar.styles.js +14 -20
- package/dist/components/StokrLoader/StokrLoader.js +41 -13
- package/dist/components/StokrLoader/loaderSession.d.ts +14 -0
- package/dist/components/StokrLoader/loaderSession.js +30 -0
- package/dist/components/Switch/Switch.styles.js +12 -14
- package/dist/components/TabsNav/TabsNav.styles.js +7 -9
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -1
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +30 -35
- package/dist/components/Text/Text.styles.d.ts +2 -1
- package/dist/components/Text/Text.styles.js +36 -70
- package/dist/components/TextLink/TextLink.styles.js +5 -7
- package/dist/components/Timeline/Timeline.styles.js +17 -23
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -2
- package/dist/components/Tooltip/Tooltip.styles.js +4 -5
- package/dist/components/breakdown/Breakdown.js +3 -5
- package/dist/components/logo/Logo.js +1 -1
- package/dist/design-system/css/base.css +14 -14
- package/dist/design-system/css-builders.d.ts +25 -0
- package/dist/design-system/css-builders.js +81 -0
- package/dist/design-system/generated/fonts.css +0 -49
- package/dist/design-system/generated/text-classes.css +123 -123
- package/dist/design-system/generated/text-styles.d.ts +24 -24
- package/dist/design-system/generated/text-styles.js +123 -123
- package/dist/design-system/generated/tokens.css +417 -412
- package/dist/design-system/index.d.ts +2 -1
- package/dist/design-system/styled/build-theme.js +1 -1
- package/dist/design-system/tokens/colors.d.ts +1 -1
- package/dist/design-system/tokens/colors.js +1 -1
- package/dist/design-system/tokens/fonts.d.ts +6 -2
- package/dist/design-system/tokens/fonts.js +1 -1
- package/dist/design-system/tokens/semantic.d.ts +15 -3
- package/dist/design-system/tokens/semantic.js +5 -1
- package/dist/design-system/tokens/typography.d.ts +1 -1
- package/dist/design-system/tokens/typography.js +64 -41
- package/dist/index.d.ts +11 -1
- package/dist/index.js +3 -0
- package/dist/styles/borderedField.d.ts +1 -1
- package/dist/styles/borderedField.js +13 -13
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { Container as Container$1 } from "../Background/Background.styles.js";
|
|
3
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const Container = styled.div`
|
|
5
6
|
width: 100%;
|
|
6
7
|
height: 100%;
|
|
@@ -26,16 +27,16 @@ const EditButton = styled.button`
|
|
|
26
27
|
appearance: none;
|
|
27
28
|
background: none;
|
|
28
29
|
border: 0;
|
|
29
|
-
border-bottom: 1px solid var(--
|
|
30
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
30
31
|
font: inherit;
|
|
31
|
-
color: var(--
|
|
32
|
+
color: var(--text-primary);
|
|
32
33
|
text-align: center;
|
|
33
34
|
cursor: pointer;
|
|
34
35
|
transition: color 0.2s;
|
|
35
36
|
|
|
36
37
|
&:hover,
|
|
37
38
|
&:focus-visible {
|
|
38
|
-
color: var(--
|
|
39
|
+
color: var(--action-accent-bg);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
&:focus {
|
|
@@ -49,10 +50,7 @@ const EditButton = styled.button`
|
|
|
49
50
|
`;
|
|
50
51
|
const Name = styled.div`
|
|
51
52
|
position: relative;
|
|
52
|
-
|
|
53
|
-
line-height: 20px;
|
|
54
|
-
font-weight: 600;
|
|
55
|
-
letter-spacing: 0.6px;
|
|
53
|
+
${text("subtitleM")}
|
|
56
54
|
text-align: center;
|
|
57
55
|
`;
|
|
58
56
|
const EditIcon = styled.span.attrs({
|
|
@@ -8,7 +8,6 @@ const Label = styled(Label$1)`
|
|
|
8
8
|
position: relative;
|
|
9
9
|
top: 0;
|
|
10
10
|
transform: none;
|
|
11
|
-
font-size: 10px;
|
|
12
11
|
margin-bottom: 5px;
|
|
13
12
|
`;
|
|
14
13
|
const Input = styled.div.withConfig({
|
|
@@ -32,7 +31,7 @@ const Input = styled.div.withConfig({
|
|
|
32
31
|
display: inline-block;
|
|
33
32
|
max-width: 100%;
|
|
34
33
|
padding-left: 28px;
|
|
35
|
-
font-family: var(--
|
|
34
|
+
font-family: var(--font-family-base);
|
|
36
35
|
font-size: 13px;
|
|
37
36
|
line-height: 16px;
|
|
38
37
|
letter-spacing: 0.4px;
|
|
@@ -52,7 +51,7 @@ const Input = styled.div.withConfig({
|
|
|
52
51
|
width: 16px;
|
|
53
52
|
height: 16px;
|
|
54
53
|
border-radius: 8px;
|
|
55
|
-
border: 1px solid var(--
|
|
54
|
+
border: 1px solid var(--border-default);
|
|
56
55
|
box-shadow: none;
|
|
57
56
|
transition:
|
|
58
57
|
border-color 0.2s,
|
|
@@ -70,22 +69,22 @@ const Input = styled.div.withConfig({
|
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
&:hover + label:before {
|
|
73
|
-
border-color: var(--
|
|
72
|
+
border-color: var(--border-strong);
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
&:checked + label {
|
|
77
76
|
&:before {
|
|
78
|
-
border-color: var(--
|
|
77
|
+
border-color: var(--action-accent-bg);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
&:after {
|
|
82
|
-
background-color: var(--
|
|
81
|
+
background-color: var(--action-accent-bg);
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
&:focus-visible + label:before {
|
|
87
|
-
border-color: var(--
|
|
88
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--
|
|
86
|
+
border-color: var(--border-focus);
|
|
87
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--border-focus) 25%, transparent);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
|
|
@@ -95,7 +94,7 @@ const Input = styled.div.withConfig({
|
|
|
95
94
|
& + label {
|
|
96
95
|
|
|
97
96
|
&:before {
|
|
98
|
-
border-color: var(--
|
|
97
|
+
border-color: var(--status-error-border);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -11,8 +11,8 @@ const IconWrap = styled.div`
|
|
|
11
11
|
border-radius: 12px;
|
|
12
12
|
|
|
13
13
|
& > svg {
|
|
14
|
-
fill: var(--
|
|
15
|
-
stroke: var(--
|
|
14
|
+
fill: var(--action-accent-bg);
|
|
15
|
+
stroke: var(--action-accent-bg);
|
|
16
16
|
display: block;
|
|
17
17
|
width: 16px;
|
|
18
18
|
height: 16px;
|
|
@@ -28,7 +28,7 @@ const StyledButton = styled(Button).attrs((props) => ({
|
|
|
28
28
|
type: props.type || "button"
|
|
29
29
|
}))`
|
|
30
30
|
position: relative;
|
|
31
|
-
color: var(--
|
|
31
|
+
color: var(--text-primary);
|
|
32
32
|
border: 1px solid transparent;
|
|
33
33
|
background-color: transparent;
|
|
34
34
|
text-align: left;
|
|
@@ -38,13 +38,13 @@ const StyledButton = styled(Button).attrs((props) => ({
|
|
|
38
38
|
&:hover,
|
|
39
39
|
&:focus,
|
|
40
40
|
&:active {
|
|
41
|
-
color: var(--
|
|
41
|
+
color: var(--text-primary);
|
|
42
42
|
border-color: transparent;
|
|
43
43
|
background-color: transparent;
|
|
44
44
|
|
|
45
45
|
${IconWrap} {
|
|
46
46
|
& > svg {
|
|
47
|
-
fill: var(--
|
|
47
|
+
fill: var(--action-accent-bg-hover);
|
|
48
48
|
transform: rotate(360deg);
|
|
49
49
|
transition:
|
|
50
50
|
color 0.2s,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
3
4
|
const Box = styled.div`
|
|
4
|
-
border: 1px solid var(--
|
|
5
|
+
border: 1px solid var(--border-subtle);
|
|
5
6
|
padding: 20px 24px;
|
|
6
7
|
|
|
7
8
|
& > div {
|
|
@@ -23,11 +24,8 @@ const Box = styled.div`
|
|
|
23
24
|
}
|
|
24
25
|
`;
|
|
25
26
|
const Title = styled.div`
|
|
26
|
-
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
line-height: 24px;
|
|
27
|
+
${text("subtitleM")}
|
|
29
28
|
margin-bottom: 2px;
|
|
30
|
-
letter-spacing: 0.6px;
|
|
31
29
|
`;
|
|
32
30
|
const Subtitle = styled.div`
|
|
33
31
|
font-size: 12px;
|
|
@@ -3,7 +3,7 @@ import { Body, BodyClip } from "../Collapsible/Collapsible.styles.js";
|
|
|
3
3
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
4
|
import { text } from "../../design-system/styled/text.js";
|
|
5
5
|
const SectionRoot = styled.section`
|
|
6
|
-
--section-gap: var(--
|
|
6
|
+
--section-gap: var(--space-8);
|
|
7
7
|
/* The card's padding, for the toggle to reach over it. */
|
|
8
8
|
--section-pad-y: 0px;
|
|
9
9
|
--section-pad-x: 0px;
|
|
@@ -12,19 +12,19 @@ const SectionRoot = styled.section`
|
|
|
12
12
|
gap: ${({ $collapsible }) => $collapsible ? "0" : "var(--section-gap)"};
|
|
13
13
|
|
|
14
14
|
${({ $variant, $elevated }) => $variant === "card" && css`
|
|
15
|
-
--section-pad-y: var(--
|
|
16
|
-
--section-pad-x: var(--
|
|
15
|
+
--section-pad-y: var(--space-6);
|
|
16
|
+
--section-pad-x: var(--space-6);
|
|
17
17
|
padding: var(--section-pad-y) var(--section-pad-x);
|
|
18
|
-
background: var(--
|
|
19
|
-
border: 1px solid var(--
|
|
20
|
-
border-radius: var(--
|
|
21
|
-
box-shadow: ${$elevated ? "var(--
|
|
18
|
+
background: var(--background-default);
|
|
19
|
+
border: 1px solid var(--border-subtle);
|
|
20
|
+
border-radius: var(--radius-lg);
|
|
21
|
+
box-shadow: ${$elevated ? "var(--elevation-xs)" : "none"};
|
|
22
22
|
|
|
23
23
|
/* Figma 3582:128652: mobile cards are 20 / 16 with 16 under the header. */
|
|
24
24
|
${breakpoint.below.MLarge`
|
|
25
|
-
--section-gap: var(--
|
|
26
|
-
--section-pad-y: var(--
|
|
27
|
-
--section-pad-x: var(--
|
|
25
|
+
--section-gap: var(--space-4);
|
|
26
|
+
--section-pad-y: var(--space-5);
|
|
27
|
+
--section-pad-x: var(--space-4);
|
|
28
28
|
`}
|
|
29
29
|
`}
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ const SectionRoot = styled.section`
|
|
|
33
33
|
if ($variant !== "card" || !$collapsed) return "";
|
|
34
34
|
const lift = css`
|
|
35
35
|
&:hover {
|
|
36
|
-
box-shadow: var(--
|
|
36
|
+
box-shadow: var(--elevation-sm);
|
|
37
37
|
}
|
|
38
38
|
`;
|
|
39
39
|
return $always ? lift : css`
|
|
@@ -44,8 +44,8 @@ const SectionRoot = styled.section`
|
|
|
44
44
|
}}
|
|
45
45
|
`;
|
|
46
46
|
const SectionHeader = styled.div`
|
|
47
|
-
padding-bottom: var(--
|
|
48
|
-
border-bottom: 1px solid var(--
|
|
47
|
+
padding-bottom: var(--space-5);
|
|
48
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
49
49
|
transition:
|
|
50
50
|
padding-bottom 300ms,
|
|
51
51
|
border-color 300ms;
|
|
@@ -68,11 +68,11 @@ const SectionToggle = styled.button`
|
|
|
68
68
|
display: flex;
|
|
69
69
|
align-items: center;
|
|
70
70
|
justify-content: space-between;
|
|
71
|
-
gap: var(--
|
|
71
|
+
gap: var(--space-4);
|
|
72
72
|
width: calc(100% + 2 * var(--section-pad-x));
|
|
73
73
|
margin: calc(-1 * var(--section-pad-y)) calc(-1 * var(--section-pad-x)) 0;
|
|
74
74
|
padding: var(--section-pad-y) var(--section-pad-x) 0;
|
|
75
|
-
border-radius: var(--
|
|
75
|
+
border-radius: var(--radius-lg);
|
|
76
76
|
|
|
77
77
|
${({ $collapsed, $always }) => {
|
|
78
78
|
const reachBottom = css`
|
|
@@ -122,10 +122,8 @@ const SectionBodyInner = styled.div`
|
|
|
122
122
|
`;
|
|
123
123
|
const SectionHeading = styled.h2`
|
|
124
124
|
${text("subtitleM")};
|
|
125
|
-
/* Global h2 rules may uppercase; the design does not. */
|
|
126
|
-
text-transform: none;
|
|
127
125
|
margin: 0;
|
|
128
|
-
color: var(--
|
|
126
|
+
color: var(--text-primary);
|
|
129
127
|
`;
|
|
130
128
|
export {
|
|
131
129
|
SectionBody,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SectionTitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}> & string;
|
|
4
|
+
export default SectionTitle;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const SectionTitle = styled.h2`
|
|
3
4
|
position: relative;
|
|
4
|
-
font-family: var(--
|
|
5
|
-
|
|
6
|
-
font-size: 11px;
|
|
7
|
-
line-height: 20px;
|
|
8
|
-
letter-spacing: 2px;
|
|
9
|
-
text-transform: uppercase;
|
|
5
|
+
font-family: var(--font-family-base);
|
|
6
|
+
${text("labelRegular")}
|
|
10
7
|
padding: 0;
|
|
11
8
|
border: 0;
|
|
12
9
|
margin: 0;
|
|
@@ -17,7 +14,7 @@ const SectionTitle = styled.h2`
|
|
|
17
14
|
|
|
18
15
|
strong {
|
|
19
16
|
display: inline-block;
|
|
20
|
-
|
|
17
|
+
${text("label")}
|
|
21
18
|
}
|
|
22
19
|
`;
|
|
23
20
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
/** Names of the `--
|
|
2
|
+
/** Names of the `--radius-*` tokens. */
|
|
3
3
|
type RadiusName = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
4
4
|
export interface SkeletonProps {
|
|
5
5
|
/** px when a number, any CSS length otherwise. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SkeletonBlock, SkeletonLinesRoot, VisuallyHidden } from "./Skeleton.styles.js";
|
|
3
3
|
const RADIUS_NAMES = ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full"];
|
|
4
|
-
const radiusVar = (name) => `var(--
|
|
4
|
+
const radiusVar = (name) => `var(--radius-${name})`;
|
|
5
5
|
const toRadius = (value, round) => {
|
|
6
6
|
if (value === void 0) return radiusVar(round ? "full" : "sm");
|
|
7
7
|
if (typeof value === "number") return `${value}px`;
|
|
@@ -13,8 +13,8 @@ const Skeleton = ({
|
|
|
13
13
|
round = false,
|
|
14
14
|
radius,
|
|
15
15
|
animate = true,
|
|
16
|
-
baseColor = "var(--
|
|
17
|
-
highlightColor = "var(--
|
|
16
|
+
baseColor = "var(--background-surface)",
|
|
17
|
+
highlightColor = "var(--border-subtle)",
|
|
18
18
|
className
|
|
19
19
|
}) => /* @__PURE__ */ jsx(
|
|
20
20
|
SkeletonBlock,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { css, keyframes } from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const slideIn = keyframes`
|
|
3
4
|
from {
|
|
4
5
|
opacity: 0;
|
|
@@ -58,7 +59,7 @@ const progressExpire = keyframes`
|
|
|
58
59
|
}
|
|
59
60
|
`;
|
|
60
61
|
const SNACKBAR_VARIANTS = ["info", "error", "success", "warning"];
|
|
61
|
-
const statusIcon = (variant) => `var(--
|
|
62
|
+
const statusIcon = (variant) => `var(--status-${variant && SNACKBAR_VARIANTS.includes(variant) && variant !== "info" ? variant : "info-blue"}-icon)`;
|
|
62
63
|
const positionStyles = {
|
|
63
64
|
"top-right": css`
|
|
64
65
|
top: 20px;
|
|
@@ -115,10 +116,10 @@ const SnackbarWrapper = styled.div.withConfig({
|
|
|
115
116
|
min-width: 320px;
|
|
116
117
|
max-width: 480px;
|
|
117
118
|
padding: 12px 16px;
|
|
118
|
-
background-color: var(--
|
|
119
|
+
background-color: var(--background-surface-raised);
|
|
119
120
|
box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.12);
|
|
120
121
|
border-radius: 8px;
|
|
121
|
-
border: 1px solid var(--
|
|
122
|
+
border: 1px solid var(--border-subtle);
|
|
122
123
|
pointer-events: auto;
|
|
123
124
|
overflow: hidden;
|
|
124
125
|
animation: ${({ $isExiting }) => $isExiting ? slideOut : "none"} 0.3s ease-out forwards;
|
|
@@ -165,11 +166,8 @@ const IconWrapper = styled.div.withConfig({
|
|
|
165
166
|
`;
|
|
166
167
|
const Message = styled.div`
|
|
167
168
|
flex: 1;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
line-height: 24px;
|
|
171
|
-
letter-spacing: 0.6px;
|
|
172
|
-
color: var(--stokr-text-primary);
|
|
169
|
+
${text("subtitleM")}
|
|
170
|
+
color: var(--text-primary);
|
|
173
171
|
`;
|
|
174
172
|
const CloseButton = styled.button`
|
|
175
173
|
flex-shrink: 0;
|
|
@@ -193,13 +191,13 @@ const CloseButton = styled.button`
|
|
|
193
191
|
height: 12px;
|
|
194
192
|
|
|
195
193
|
path {
|
|
196
|
-
stroke: var(--
|
|
194
|
+
stroke: var(--text-tertiary);
|
|
197
195
|
stroke-width: 2;
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
|
|
201
199
|
&:hover svg path {
|
|
202
|
-
stroke: var(--
|
|
200
|
+
stroke: var(--text-primary);
|
|
203
201
|
}
|
|
204
202
|
`;
|
|
205
203
|
export {
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const SpanButton = styled.span.withConfig({
|
|
3
3
|
shouldForwardProp: (props) => !["urlLink"].includes(props)
|
|
4
4
|
})`
|
|
5
|
-
color: var(--
|
|
5
|
+
color: var(--action-accent-bg);
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ const SpanButton = styled.span.withConfig({
|
|
|
11
11
|
`}
|
|
12
12
|
|
|
13
13
|
&:hover {
|
|
14
|
-
color: var(--
|
|
14
|
+
color: var(--text-primary);
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
export {
|
|
@@ -3,7 +3,7 @@ export type StatusDotVariant = 'pending' | 'initiated' | 'paid' | 'declined';
|
|
|
3
3
|
export interface StatusDotProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'color'> {
|
|
4
4
|
/** The label. */
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
/** Kit status colours: pending → warning, initiated → info, paid → success, declined → error. */
|
|
6
|
+
/** Kit status colours: pending → warning, initiated → info-blue, paid → success, declined → error. */
|
|
7
7
|
variant?: StatusDotVariant;
|
|
8
8
|
/** Dot (and label) color; overrides the variant. */
|
|
9
9
|
color?: string;
|
|
@@ -2,16 +2,16 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Root, Dot, Label } from "./StatusDot.styles.js";
|
|
3
3
|
const VARIANT_STATUS = {
|
|
4
4
|
pending: "warning",
|
|
5
|
-
initiated: "info",
|
|
5
|
+
initiated: "info-blue",
|
|
6
6
|
paid: "success",
|
|
7
7
|
declined: "error"
|
|
8
8
|
};
|
|
9
9
|
const preset = (variant) => {
|
|
10
10
|
const status = VARIANT_STATUS[variant];
|
|
11
11
|
return {
|
|
12
|
-
color: `var(--
|
|
13
|
-
labelColor: `var(--
|
|
14
|
-
backgroundColor: `var(--
|
|
12
|
+
color: `var(--status-${status}-icon)`,
|
|
13
|
+
labelColor: `var(--status-${status}-text)`,
|
|
14
|
+
backgroundColor: `var(--status-${status}-bg)`
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const StatusDot = ({
|
|
@@ -31,7 +31,7 @@ const StatusDot = ({
|
|
|
31
31
|
...rest
|
|
32
32
|
}) => {
|
|
33
33
|
const colors = variant && VARIANT_STATUS[variant] ? preset(variant) : null;
|
|
34
|
-
const resolvedColor = color ?? colors?.color ?? "var(--
|
|
34
|
+
const resolvedColor = color ?? colors?.color ?? "var(--text-primary)";
|
|
35
35
|
const resolvedLabelColor = labelColor ?? (color === void 0 ? colors?.labelColor : void 0) ?? resolvedColor;
|
|
36
36
|
const isSubtle = surface === "subtle";
|
|
37
37
|
const resolvedBackground = isSubtle && (backgroundColor !== void 0 ? backgroundColor : colors?.backgroundColor);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { keyframes } from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const pulse = keyframes`
|
|
3
4
|
0%, 100% { opacity: 1; }
|
|
4
5
|
50% { opacity: 0.35; }
|
|
@@ -43,12 +44,8 @@ const Dot = styled.span.withConfig({
|
|
|
43
44
|
const Label = styled.span.withConfig({
|
|
44
45
|
shouldForwardProp: (prop) => !["$color", "$uppercase"].includes(prop)
|
|
45
46
|
})`
|
|
46
|
-
|
|
47
|
-
font-weight: ${(p) => p.$uppercase ? "700" : "400"};
|
|
48
|
-
line-height: 20px;
|
|
47
|
+
${(p) => text(p.$uppercase ? "label" : "caption")}
|
|
49
48
|
color: ${(p) => p.$color};
|
|
50
|
-
text-transform: ${(p) => p.$uppercase ? "uppercase" : "none"};
|
|
51
|
-
letter-spacing: ${(p) => p.$uppercase ? "2px" : "0.6px"};
|
|
52
49
|
`;
|
|
53
50
|
export {
|
|
54
51
|
Dot,
|
|
@@ -33,7 +33,7 @@ const StatusTag = ({
|
|
|
33
33
|
...props
|
|
34
34
|
}) => {
|
|
35
35
|
const variantData = variant ? variantConfig[variant] : null;
|
|
36
|
-
const finalIconColor = iconColor ?? (variantData ? "currentColor" : "var(--
|
|
36
|
+
const finalIconColor = iconColor ?? (variantData ? "currentColor" : "var(--text-tertiary)");
|
|
37
37
|
const finalHoverColor = hoverColor;
|
|
38
38
|
const finalDisableHoverColor = disableHoverColor ?? false;
|
|
39
39
|
let finalIcon = null;
|
|
@@ -17,9 +17,9 @@ const StatusTagWrapper = styled.div.withConfig({
|
|
|
17
17
|
align-items: center;
|
|
18
18
|
gap: 6px;
|
|
19
19
|
padding: 5px 8px;
|
|
20
|
-
background-color: ${(props) => props.$variant ? `var(--
|
|
21
|
-
color: ${(props) => props.$variant ? `var(--
|
|
22
|
-
border: 1px solid ${(props) => props.$variant ? "transparent" : "var(--
|
|
20
|
+
background-color: ${(props) => props.$variant ? `var(--tag-${props.$variant}-bg)` : "transparent"};
|
|
21
|
+
color: ${(props) => props.$variant ? `var(--tag-${props.$variant}-text)` : "var(--text-primary)"};
|
|
22
|
+
border: 1px solid ${(props) => props.$variant ? "transparent" : "var(--border-subtle)"};
|
|
23
23
|
border-radius: 6px;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
min-width: ${(props) => props.minWidth || "auto"};
|
|
@@ -34,7 +34,7 @@ const IconWrapper = styled.div.withConfig({
|
|
|
34
34
|
flex-shrink: 0;
|
|
35
35
|
width: 12px;
|
|
36
36
|
height: 12px;
|
|
37
|
-
color: ${(props) => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || "var(--
|
|
37
|
+
color: ${(props) => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || "var(--text-tertiary)"};
|
|
38
38
|
transition: color 0.2s ease;
|
|
39
39
|
|
|
40
40
|
svg {
|
|
@@ -47,7 +47,7 @@ const Item = styled.div.withConfig({
|
|
|
47
47
|
left: 0;
|
|
48
48
|
border-radius: 3px;
|
|
49
49
|
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.05);
|
|
50
|
-
background-color: var(--
|
|
50
|
+
background-color: var(--border-subtle);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&:after {
|
|
@@ -69,26 +69,26 @@ const Item = styled.div.withConfig({
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&:hover:after {
|
|
72
|
-
background-color: var(--
|
|
72
|
+
background-color: var(--border-strong);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
${(props) => props.isDone && `
|
|
76
76
|
&:after {
|
|
77
|
-
background-color: var(--
|
|
77
|
+
background-color: var(--status-success-icon);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&:hover:after {
|
|
81
|
-
background-color: var(--
|
|
81
|
+
background-color: var(--border-strong);
|
|
82
82
|
}
|
|
83
83
|
`}
|
|
84
84
|
|
|
85
85
|
${(props) => props.isActive && `
|
|
86
86
|
&:after {
|
|
87
|
-
background-color: var(--
|
|
87
|
+
background-color: var(--text-tertiary);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
&:hover:after {
|
|
91
|
-
background-color: var(--
|
|
91
|
+
background-color: var(--border-strong);
|
|
92
92
|
}
|
|
93
93
|
`}
|
|
94
94
|
|
|
@@ -101,7 +101,7 @@ const StepsProgressContainer = styled.div`
|
|
|
101
101
|
width: 100%;
|
|
102
102
|
height: 40px;
|
|
103
103
|
padding: 4px 0;
|
|
104
|
-
box-shadow: 0 1px 0 0 var(--
|
|
104
|
+
box-shadow: 0 1px 0 0 var(--border-subtle);
|
|
105
105
|
|
|
106
106
|
${breakpoint.Medium`
|
|
107
107
|
height: 56px;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const SEGMENT_COLOR = {
|
|
3
|
-
done: "var(--
|
|
4
|
-
active: "var(--
|
|
5
|
-
upcoming: "var(--
|
|
4
|
+
done: "var(--action-accent-bg)",
|
|
5
|
+
active: "var(--text-primary)",
|
|
6
|
+
upcoming: "var(--border-default)"
|
|
6
7
|
};
|
|
7
8
|
const Strip = styled.div`
|
|
8
9
|
display: flex;
|
|
@@ -24,11 +25,8 @@ const Segment = styled.span`
|
|
|
24
25
|
`;
|
|
25
26
|
const Caption = styled.p`
|
|
26
27
|
margin: 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
letter-spacing: 1.2px;
|
|
30
|
-
text-transform: uppercase;
|
|
31
|
-
color: var(--stokr-text-secondary);
|
|
28
|
+
${text("overline")}
|
|
29
|
+
color: var(--text-secondary);
|
|
32
30
|
white-space: nowrap;
|
|
33
31
|
overflow: hidden;
|
|
34
32
|
text-overflow: ellipsis;
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { text } from "../../design-system/styled/text.js";
|
|
3
|
-
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
3
|
const MARKER_SIZE = 28;
|
|
5
4
|
const LINE_GAP = 4;
|
|
6
5
|
const MARKER_BG = {
|
|
7
6
|
upcoming: "transparent",
|
|
8
|
-
active: "var(--
|
|
9
|
-
done: "var(--
|
|
7
|
+
active: "var(--action-primary-bg)",
|
|
8
|
+
done: "var(--action-accent-bg)"
|
|
10
9
|
};
|
|
11
10
|
const MARKER_BORDER = {
|
|
12
|
-
upcoming: "var(--
|
|
13
|
-
active: "var(--
|
|
14
|
-
done: "var(--
|
|
11
|
+
upcoming: "var(--text-secondary)",
|
|
12
|
+
active: "var(--action-primary-bg)",
|
|
13
|
+
done: "var(--action-accent-bg)"
|
|
15
14
|
};
|
|
16
15
|
const MARKER_TEXT = {
|
|
17
|
-
upcoming: "var(--
|
|
18
|
-
active: "var(--
|
|
19
|
-
done: "var(--
|
|
16
|
+
upcoming: "var(--text-secondary)",
|
|
17
|
+
active: "var(--action-primary-text)",
|
|
18
|
+
done: "var(--action-accent-text)"
|
|
20
19
|
};
|
|
21
20
|
const TITLE_COLOR = {
|
|
22
|
-
upcoming: "var(--
|
|
23
|
-
active: "var(--
|
|
24
|
-
done: "var(--
|
|
21
|
+
upcoming: "var(--text-secondary)",
|
|
22
|
+
active: "var(--text-primary)",
|
|
23
|
+
done: "var(--action-accent-bg)"
|
|
25
24
|
};
|
|
26
25
|
const SUBTITLE_COLOR = {
|
|
27
|
-
upcoming: "var(--
|
|
28
|
-
active: "var(--
|
|
29
|
-
done: "var(--
|
|
26
|
+
upcoming: "var(--text-secondary)",
|
|
27
|
+
active: "var(--text-body)",
|
|
28
|
+
done: "var(--text-secondary)"
|
|
30
29
|
};
|
|
31
30
|
const LINE_COLOR = {
|
|
32
|
-
upcoming: "var(--
|
|
33
|
-
active: "var(--
|
|
34
|
-
done: "var(--
|
|
31
|
+
upcoming: "var(--text-secondary)",
|
|
32
|
+
active: "var(--text-body)",
|
|
33
|
+
done: "var(--status-success-text)"
|
|
35
34
|
};
|
|
36
35
|
const List = styled.ol`
|
|
37
36
|
display: flex;
|
|
@@ -78,22 +77,14 @@ const ItemText = styled.div`
|
|
|
78
77
|
padding-top: 4px;
|
|
79
78
|
`;
|
|
80
79
|
const ItemTitle = styled.p`
|
|
81
|
-
${text("
|
|
80
|
+
${text("subtitleM")}
|
|
82
81
|
margin: 0;
|
|
83
82
|
color: ${({ $status }) => TITLE_COLOR[$status]};
|
|
84
|
-
|
|
85
|
-
${breakpoint.XLarge`
|
|
86
|
-
font-size: 16px;
|
|
87
|
-
`}
|
|
88
83
|
`;
|
|
89
84
|
const ItemSubtitle = styled.p`
|
|
90
85
|
${text("caption")}
|
|
91
86
|
margin: 4px 0 0;
|
|
92
87
|
color: ${({ $status }) => SUBTITLE_COLOR[$status]};
|
|
93
|
-
|
|
94
|
-
${breakpoint.XLarge`
|
|
95
|
-
font-size: 13px;
|
|
96
|
-
`}
|
|
97
88
|
`;
|
|
98
89
|
export {
|
|
99
90
|
Item,
|