@stokr/components-library 4.2.6 → 5.0.1
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 +147 -118
- package/dist/components/AddressItem/AddressItem.styles.js +12 -14
- package/dist/components/AdminDashboard/Table/Table.styles.d.ts +110 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +21 -20
- package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
- package/dist/components/BackButton/BackButton.styles.d.ts +24 -0
- package/dist/components/BackButton/BackButton.styles.js +15 -16
- package/dist/components/Background/Background.styles.d.ts +30 -0
- package/dist/components/Background/Background.styles.js +3 -3
- package/dist/components/BasicTable/BasicTable.d.ts +14 -0
- package/dist/components/BasicTable/BasicTable.js +0 -10
- package/dist/components/BasicTable/BasicTable.styles.d.ts +22 -0
- package/dist/components/BasicTable/BasicTable.styles.js +6 -7
- package/dist/components/BlogPost/BlogPost.js +3 -3
- package/dist/components/BlogPost/BlogPost.styles.d.ts +67 -0
- package/dist/components/BlogPost/BlogPost.styles.js +14 -20
- package/dist/components/Button/Button.styles.d.ts +12 -8
- package/dist/components/Button/Button.styles.js +131 -115
- package/dist/components/Button/GlareButton.d.ts +31 -0
- package/dist/components/Button/GlareButton.js +4 -22
- package/dist/components/Card/Card.styles.d.ts +30 -0
- package/dist/components/Card/Card.styles.js +3 -4
- package/dist/components/CardTabs/CardTabs.styles.js +26 -29
- package/dist/components/ChartLegend/ChartLegend.styles.d.ts +46 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +4 -5
- package/dist/components/Checkbox/Checkbox.styles.js +10 -12
- package/dist/components/Checklist/ChecklistCard.d.ts +18 -0
- package/dist/components/Checklist/ChecklistCard.js +4 -17
- package/dist/components/Checklist/ChecklistCard.styles.d.ts +17 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +7 -7
- package/dist/components/Chips/Chip.d.ts +18 -0
- package/dist/components/Chips/Chip.js +4 -20
- package/dist/components/Chips/Chip.styles.d.ts +23 -0
- package/dist/components/Chips/Chip.styles.js +3 -6
- package/dist/components/Chips/ChipWrapper.js +2 -2
- package/dist/components/Collapsible/Collapsible.styles.js +20 -20
- package/dist/components/ComponentScroll/ComponentScroll.js +2 -1
- package/dist/components/ComponentScroll/ComponentScroll.styles.d.ts +34 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +15 -12
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +11 -13
- package/dist/components/ConfirmModal/ConfirmModal.styles.d.ts +18 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +6 -7
- package/dist/components/Country/CountrySelect.js +6 -6
- package/dist/components/CryptoAddress/ComponentWrap.d.ts +9 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +7 -10
- package/dist/components/CryptoAddress/CryptoAddress.d.ts +45 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +9 -41
- package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +85 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +21 -22
- package/dist/components/CryptoAddress/RadioWrap.d.ts +21 -0
- package/dist/components/CryptoAddress/RadioWrap.js +1 -16
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.d.ts +30 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +19 -11
- package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.d.ts +12 -0
- package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.js +28 -0
- package/dist/components/FAQ/FAQ.styles.d.ts +2 -1
- package/dist/components/FAQ/FAQ.styles.js +15 -19
- package/dist/components/Form/Form.styles.d.ts +22 -0
- package/dist/components/Form/Form.styles.js +7 -8
- package/dist/components/Grid/Grid.styles.d.ts +49 -0
- package/dist/components/Grid/Grid.styles.js +37 -40
- package/dist/components/IdentityInfo/IdentityInfo.styles.d.ts +24 -0
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +5 -6
- package/dist/components/InfoBox/InfoBox.d.ts +22 -0
- package/dist/components/InfoBox/InfoBox.js +26 -65
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -3
- package/dist/components/Input/DatePickerInput.d.ts +24 -0
- package/dist/components/Input/DatePickerInput.js +2 -13
- package/dist/components/Input/DatePickerInput.styles.d.ts +18 -0
- package/dist/components/Input/DatePickerInput.styles.js +27 -24
- package/dist/components/Input/Input.js +1 -0
- package/dist/components/Input/Input.styles.d.ts +1 -0
- package/dist/components/Input/Input.styles.js +27 -24
- package/dist/components/Input/InputPassword.styles.d.ts +32 -0
- package/dist/components/Input/InputPassword.styles.js +11 -12
- package/dist/components/Input/InputWithButton.styles.d.ts +14 -0
- package/dist/components/Input/InputWithButton.styles.js +5 -6
- package/dist/components/Input/MultiSelect.d.ts +60 -0
- package/dist/components/Input/MultiSelect.js +20 -52
- package/dist/components/Input/OtpInput.d.ts +17 -0
- package/dist/components/Input/OtpInput.js +8 -15
- package/dist/components/Input/RangeInput.d.ts +14 -0
- package/dist/components/Input/RangeInput.js +2 -17
- package/dist/components/Input/SearchInput.styles.d.ts +15 -0
- package/dist/components/Input/SearchInput.styles.js +10 -11
- package/dist/components/Input/Select.js +91 -25
- package/dist/components/Input/Select.styles.d.ts +2 -2
- package/dist/components/Input/Select.styles.js +24 -26
- package/dist/components/Input/TableFilterDropdown.d.ts +33 -0
- package/dist/components/Input/TableFilterDropdown.js +6 -39
- package/dist/components/Input/Textarea.styles.d.ts +9 -0
- package/dist/components/Input/Textarea.styles.js +9 -10
- package/dist/components/MaterialIcon/MaterialIcon.d.ts +17 -7
- package/dist/components/MaterialIcon/MaterialIcon.js +14 -3
- package/dist/components/MenuNav/MenuNav.styles.d.ts +6 -0
- package/dist/components/MenuNav/MenuNav.styles.js +3 -0
- package/dist/components/Modal/Modal.styles.js +35 -36
- package/dist/components/Modal/PaymentModal.d.ts +55 -0
- package/dist/components/Modal/PaymentModal.js +11 -13
- package/dist/components/Modal/SideModal.styles.js +13 -14
- package/dist/components/Modal/SideModalParts.js +18 -20
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.d.ts +15 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +3 -4
- package/dist/components/NotificationCounter/NotificationCounter.styles.d.ts +8 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -3
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/Number/Number.styles.d.ts +4 -0
- package/dist/components/Number/Number.styles.js +2 -3
- package/dist/components/Pagination/Pagination.styles.d.ts +15 -0
- package/dist/components/Pagination/Pagination.styles.js +12 -11
- package/dist/components/PanelCard/PanelCard.styles.js +24 -27
- package/dist/components/Payment/DetailRows.d.ts +14 -0
- package/dist/components/Payment/DetailRows.js +1 -2
- package/dist/components/Payment/DetailsToggle.d.ts +23 -0
- package/dist/components/Payment/DetailsToggle.js +12 -4
- package/dist/components/Payment/PaymentDetailsCard.d.ts +95 -0
- package/dist/components/Payment/PaymentDetailsCard.js +32 -23
- package/dist/components/Payment/PaymentDisplay.d.ts +59 -0
- package/dist/components/Payment/PaymentDisplay.js +18 -11
- package/dist/components/Payment/PaymentPendingCard.d.ts +39 -0
- package/dist/components/Payment/PaymentPendingCard.js +13 -13
- package/dist/components/Payment/PaymentSuccessCard.d.ts +41 -0
- package/dist/components/Payment/PaymentSuccessCard.js +27 -11
- package/dist/components/Payment/TimerComponent.d.ts +26 -0
- package/dist/components/Payment/TimerComponent.js +6 -7
- package/dist/components/Process/Process.styles.d.ts +11 -0
- package/dist/components/Process/Process.styles.js +22 -19
- package/dist/components/ProfileBadge/ProfileBadge.d.ts +13 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +14 -15
- package/dist/components/ProfileBadge/ProfileBadge.styles.d.ts +10 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -9
- package/dist/components/ProfileBox/ProfileBox.js +3 -3
- package/dist/components/ProfileBox/ProfileBox.styles.d.ts +22 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +18 -7
- package/dist/components/Radio/Radio.styles.d.ts +24 -0
- package/dist/components/Radio/Radio.styles.js +19 -11
- package/dist/components/RefreshButton/RefreshButton.styles.d.ts +29 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +5 -6
- package/dist/components/RequestDataBox/RequestDataBox.styles.d.ts +9 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +4 -5
- package/dist/components/Section/Section.d.ts +1 -1
- package/dist/components/Section/Section.js +4 -3
- package/dist/components/Section/Section.styles.d.ts +5 -0
- package/dist/components/Section/Section.styles.js +31 -36
- package/dist/components/SectionTitle/SectionTitle.styles.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.js +8 -8
- package/dist/components/SmartLink/SmartLink.js +2 -2
- package/dist/components/Snackbar/Snackbar.styles.d.ts +28 -0
- package/dist/components/Snackbar/Snackbar.styles.js +10 -29
- package/dist/components/SpanButton/SpanButton.styles.js +2 -2
- package/dist/components/StatusDot/StatusDot.d.ts +29 -0
- package/dist/components/StatusDot/StatusDot.js +17 -23
- package/dist/components/StatusDot/StatusDot.styles.d.ts +20 -0
- package/dist/components/StatusTag/StatusTag.d.ts +35 -0
- package/dist/components/StatusTag/StatusTag.js +9 -38
- package/dist/components/StatusTag/StatusTag.styles.d.ts +28 -0
- package/dist/components/StatusTag/StatusTag.styles.js +6 -6
- package/dist/components/StepController/StepController.styles.d.ts +23 -0
- package/dist/components/StepController/StepController.styles.js +12 -14
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +4 -5
- package/dist/components/StepSidebar/StepProgress.styles.js +29 -26
- package/dist/components/StepSidebar/StepSidebar.js +1 -1
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +1 -0
- package/dist/components/StepSidebar/StepSidebar.styles.js +30 -31
- package/dist/components/StokrLoader/StokrLoader.d.ts +25 -3
- package/dist/components/StokrLoader/StokrLoader.js +171 -26
- package/dist/components/SvgIcons/AdminBadgeSvg.js +1 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +1 -0
- package/dist/components/SvgIcons/LogoSvg.js +1 -11
- package/dist/components/SvgIcons/RefreshSvg.js +1 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +2 -4
- package/dist/components/Switch/Switch.styles.d.ts +20 -0
- package/dist/components/Switch/Switch.styles.js +10 -11
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/TabsNav/TabsNav.styles.d.ts +25 -0
- package/dist/components/TabsNav/TabsNav.styles.js +8 -9
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -2
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +74 -0
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +31 -35
- package/dist/components/Text/Text.styles.d.ts +17 -1
- package/dist/components/Text/Text.styles.js +50 -25
- package/dist/components/TextLink/TextLink.styles.d.ts +16 -0
- package/dist/components/TextLink/TextLink.styles.js +4 -4
- package/dist/components/Timeline/Timeline.styles.d.ts +41 -0
- package/dist/components/Timeline/Timeline.styles.js +14 -15
- package/dist/components/Timeline/TimelineStep.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.styles.js +2 -3
- package/dist/components/breakdown/Breakdown.d.ts +18 -0
- package/dist/components/breakdown/Breakdown.js +7 -7
- package/dist/components/logo/Logo.js +1 -1
- package/dist/design-system/css/base.css +74 -0
- package/dist/design-system/css/index.css +5 -0
- package/dist/design-system/fonts/Inter-LICENSE.txt +93 -0
- package/dist/design-system/fonts/inter-bitcoin-sign.woff2 +0 -0
- package/dist/design-system/fonts/inter-latin-ext.woff2 +0 -0
- package/dist/design-system/fonts/inter-latin.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-ext-italic.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-ext.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-italic.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin.woff2 +0 -0
- package/dist/design-system/generated/fonts.css +296 -0
- package/dist/design-system/generated/text-classes.css +198 -0
- package/dist/design-system/generated/text-styles.d.ts +26 -0
- package/dist/design-system/generated/text-styles.js +179 -0
- package/dist/design-system/generated/tokens.css +429 -0
- package/dist/design-system/index.d.ts +9 -0
- package/dist/design-system/stories/foundations.d.ts +31 -0
- package/dist/design-system/stories/foundationsData.d.ts +18 -0
- package/dist/design-system/styled/breakpoint.d.ts +43 -0
- package/dist/design-system/styled/breakpoint.js +27 -0
- package/dist/design-system/styled/build-theme.d.ts +21 -0
- package/dist/design-system/styled/build-theme.js +27 -0
- package/dist/design-system/styled/text.d.ts +3 -0
- package/dist/design-system/styled/text.js +5 -0
- package/dist/design-system/styled/theme.d.ts +6 -0
- package/dist/design-system/tokens/breakpoints.d.ts +17 -0
- package/dist/design-system/tokens/breakpoints.js +16 -0
- package/dist/design-system/tokens/colors.d.ts +92 -0
- package/dist/design-system/tokens/colors.js +98 -0
- package/dist/design-system/tokens/fonts.d.ts +32 -0
- package/dist/design-system/tokens/fonts.js +49 -0
- package/dist/design-system/tokens/index.d.ts +6 -0
- package/dist/design-system/tokens/layout.d.ts +71 -0
- package/dist/design-system/tokens/layout.js +40 -0
- package/dist/design-system/tokens/semantic.d.ts +272 -0
- package/dist/design-system/tokens/semantic.js +76 -0
- package/dist/design-system/tokens/typography.d.ts +38 -0
- package/dist/design-system/tokens/typography.js +120 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -1
- package/dist/index.d.ts +115 -53
- package/dist/index.js +48 -43
- package/dist/static/images/numbers/number_eight.svg +1 -1
- package/dist/static/images/numbers/number_eight.svg.js +1 -1
- package/dist/static/images/numbers/number_five.svg +2 -2
- package/dist/static/images/numbers/number_five.svg.js +1 -1
- package/dist/static/images/numbers/number_four.svg +1 -1
- package/dist/static/images/numbers/number_four.svg.js +1 -1
- package/dist/static/images/numbers/number_nine.svg +2 -2
- package/dist/static/images/numbers/number_nine.svg.js +1 -1
- package/dist/static/images/numbers/number_one.svg +2 -2
- package/dist/static/images/numbers/number_one.svg.js +1 -1
- package/dist/static/images/numbers/number_seven.svg +2 -2
- package/dist/static/images/numbers/number_seven.svg.js +1 -1
- package/dist/static/images/numbers/number_six.svg +2 -2
- package/dist/static/images/numbers/number_six.svg.js +1 -1
- package/dist/static/images/numbers/number_three.svg +1 -1
- package/dist/static/images/numbers/number_three.svg.js +1 -1
- package/dist/static/images/numbers/number_two.svg +2 -2
- package/dist/static/images/numbers/number_two.svg.js +1 -1
- package/dist/static/images/numbers/number_zero.svg +1 -1
- package/dist/static/images/numbers/number_zero.svg.js +1 -1
- package/dist/styles/borderedField.d.ts +1 -1
- package/dist/styles/borderedField.js +15 -18
- package/dist/utils/customHooks.d.ts +4 -4
- package/dist/utils/customHooks.js +6 -6
- package/package.json +16 -11
- package/dist/static/images/address-refreshing.gif.js +0 -4
- package/dist/static/images/process-waiting.gif.js +0 -4
- package/dist/styles/colors.d.ts +0 -68
- package/dist/styles/colors.js +0 -69
- package/dist/styles/elevation.d.ts +0 -13
- package/dist/styles/elevation.js +0 -15
- package/dist/styles/global.js +0 -63
- package/dist/styles/rwd.d.ts +0 -55
- package/dist/styles/rwd.js +0 -79
- package/dist/styles/spacing.d.ts +0 -36
- package/dist/styles/spacing.js +0 -38
- package/dist/styles/theme.d.ts +0 -92
- package/dist/styles/theme.js +0 -36
- package/dist/styles/typography.d.ts +0 -42
- package/dist/styles/typography.js +0 -56
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { Collapse } from "react-collapse";
|
|
3
|
-
import theme from "../../styles/theme.js";
|
|
4
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
5
|
-
import { colors } from "../../styles/colors.js";
|
|
6
|
-
import { elevation } from "../../styles/elevation.js";
|
|
7
|
-
import { space, radius } from "../../styles/spacing.js";
|
|
8
|
-
import { typography } from "../../styles/typography.js";
|
|
9
4
|
import { BORDERED_BORDER } from "../../styles/borderedField.js";
|
|
5
|
+
import { text } from "../../design-system/styled/text.js";
|
|
10
6
|
const bordered = (rules) => (props) => props.$variant === "bordered" && rules;
|
|
11
7
|
const NOT_FORWARDED = ["isOpen", "$variant"];
|
|
12
8
|
const CardWrapper = styled.div.withConfig({
|
|
13
9
|
shouldForwardProp: (prop) => !NOT_FORWARDED.includes(prop)
|
|
14
10
|
})`
|
|
15
|
-
background:
|
|
16
|
-
border: 1px solid
|
|
11
|
+
background: var(--stokr-background-default);
|
|
12
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
17
13
|
border-radius: 8px;
|
|
18
14
|
overflow: hidden;
|
|
19
15
|
transition:
|
|
@@ -21,16 +17,16 @@ const CardWrapper = styled.div.withConfig({
|
|
|
21
17
|
box-shadow 0.2s;
|
|
22
18
|
|
|
23
19
|
${(props) => props.isOpen && css`
|
|
24
|
-
border-color:
|
|
20
|
+
border-color: var(--stokr-border-subtle);
|
|
25
21
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
26
22
|
`}
|
|
27
23
|
|
|
28
24
|
${bordered(css`
|
|
29
|
-
padding:
|
|
25
|
+
padding: var(--stokr-space-5);
|
|
30
26
|
border: ${BORDERED_BORDER};
|
|
31
|
-
border-radius:
|
|
32
|
-
background:
|
|
33
|
-
box-shadow:
|
|
27
|
+
border-radius: var(--stokr-radius-lg);
|
|
28
|
+
background: var(--stokr-background-default);
|
|
29
|
+
box-shadow: var(--stokr-elevation-md);
|
|
34
30
|
overflow: visible;
|
|
35
31
|
`)}
|
|
36
32
|
|
|
@@ -50,17 +46,17 @@ const CardHeader = styled.div.withConfig({
|
|
|
50
46
|
outline: 0;
|
|
51
47
|
cursor: pointer;
|
|
52
48
|
text-align: left;
|
|
53
|
-
font-family:
|
|
54
|
-
color:
|
|
49
|
+
font-family: var(--stokr-font-family-base);
|
|
50
|
+
color: var(--stokr-text-primary);
|
|
55
51
|
transition: background-color 0.15s;
|
|
56
52
|
user-select: none;
|
|
57
53
|
|
|
58
54
|
&:hover {
|
|
59
|
-
background-color:
|
|
55
|
+
background-color: var(--stokr-background-surface);
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
&:focus-visible {
|
|
63
|
-
box-shadow: inset 0 0 0 2px
|
|
59
|
+
box-shadow: inset 0 0 0 2px var(--stokr-color-blue-500);
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
${bordered(css`
|
|
@@ -72,9 +68,9 @@ const CardHeader = styled.div.withConfig({
|
|
|
72
68
|
|
|
73
69
|
&:focus-visible {
|
|
74
70
|
box-shadow: none;
|
|
75
|
-
outline: 2px solid
|
|
71
|
+
outline: 2px solid var(--stokr-border-focus);
|
|
76
72
|
outline-offset: 4px;
|
|
77
|
-
border-radius:
|
|
73
|
+
border-radius: var(--stokr-radius-sm);
|
|
78
74
|
}
|
|
79
75
|
`)}
|
|
80
76
|
`;
|
|
@@ -85,10 +81,10 @@ const HeaderIcon = styled.span`
|
|
|
85
81
|
width: 24px;
|
|
86
82
|
margin-right: 16px;
|
|
87
83
|
flex-shrink: 0;
|
|
88
|
-
color:
|
|
84
|
+
color: var(--stokr-text-primary);
|
|
89
85
|
|
|
90
86
|
${bordered(css`
|
|
91
|
-
margin-right:
|
|
87
|
+
margin-right: var(--stokr-space-3);
|
|
92
88
|
`)}
|
|
93
89
|
`;
|
|
94
90
|
const FlagWrapper = styled.span.withConfig({
|
|
@@ -117,21 +113,21 @@ const HeaderTitle = styled.span.withConfig({
|
|
|
117
113
|
})`
|
|
118
114
|
flex: 1;
|
|
119
115
|
min-width: 0;
|
|
120
|
-
font-family:
|
|
116
|
+
font-family: var(--stokr-font-family-base);
|
|
121
117
|
font-weight: 700;
|
|
122
118
|
font-size: 13px;
|
|
123
119
|
line-height: 18px;
|
|
124
120
|
letter-spacing: 1.5px;
|
|
125
121
|
text-transform: uppercase;
|
|
126
|
-
color:
|
|
122
|
+
color: var(--stokr-text-primary);
|
|
127
123
|
white-space: nowrap;
|
|
128
124
|
overflow: hidden;
|
|
129
125
|
text-overflow: ellipsis;
|
|
130
126
|
|
|
131
127
|
${bordered(css`
|
|
132
|
-
${
|
|
128
|
+
${text("subtitleS")}
|
|
133
129
|
text-transform: none;
|
|
134
|
-
color:
|
|
130
|
+
color: var(--stokr-text-primary);
|
|
135
131
|
`)}
|
|
136
132
|
`;
|
|
137
133
|
const HeaderActions = styled.div.withConfig({
|
|
@@ -144,7 +140,7 @@ const HeaderActions = styled.div.withConfig({
|
|
|
144
140
|
flex-shrink: 0;
|
|
145
141
|
|
|
146
142
|
${bordered(css`
|
|
147
|
-
gap:
|
|
143
|
+
gap: var(--stokr-space-3);
|
|
148
144
|
`)}
|
|
149
145
|
`;
|
|
150
146
|
const DeleteButton = styled.button`
|
|
@@ -156,7 +152,7 @@ const DeleteButton = styled.button`
|
|
|
156
152
|
padding: 0;
|
|
157
153
|
border: 0;
|
|
158
154
|
background: transparent;
|
|
159
|
-
color:
|
|
155
|
+
color: var(--stokr-text-primary);
|
|
160
156
|
cursor: pointer;
|
|
161
157
|
border-radius: 50%;
|
|
162
158
|
transition:
|
|
@@ -164,21 +160,21 @@ const DeleteButton = styled.button`
|
|
|
164
160
|
background-color 0.15s;
|
|
165
161
|
|
|
166
162
|
&:hover {
|
|
167
|
-
color:
|
|
168
|
-
background-color:
|
|
163
|
+
color: var(--stokr-action-negative-text);
|
|
164
|
+
background-color: var(--stokr-action-negative-bg);
|
|
169
165
|
}
|
|
170
166
|
|
|
171
167
|
&:focus-visible {
|
|
172
|
-
outline: 2px solid
|
|
168
|
+
outline: 2px solid var(--stokr-border-focus);
|
|
173
169
|
outline-offset: 2px;
|
|
174
170
|
}
|
|
175
171
|
|
|
176
172
|
&:disabled {
|
|
177
173
|
cursor: not-allowed;
|
|
178
|
-
color:
|
|
174
|
+
color: var(--stokr-text-tertiary);
|
|
179
175
|
|
|
180
176
|
&:hover {
|
|
181
|
-
color:
|
|
177
|
+
color: var(--stokr-text-tertiary);
|
|
182
178
|
background-color: transparent;
|
|
183
179
|
}
|
|
184
180
|
}
|
|
@@ -191,7 +187,7 @@ const ChevronIcon = styled.span.withConfig({
|
|
|
191
187
|
display: inline-flex;
|
|
192
188
|
font-size: 20px;
|
|
193
189
|
line-height: 1;
|
|
194
|
-
color:
|
|
190
|
+
color: var(--stokr-text-primary);
|
|
195
191
|
transform: rotate(0);
|
|
196
192
|
transition: transform 0.25s ease;
|
|
197
193
|
|
|
@@ -206,7 +202,7 @@ const ChevronIcon = styled.span.withConfig({
|
|
|
206
202
|
const CardBodyCollapse = styled(Collapse).withConfig({
|
|
207
203
|
shouldForwardProp: (prop) => !NOT_FORWARDED.includes(prop)
|
|
208
204
|
})`
|
|
209
|
-
border-top: 1px solid
|
|
205
|
+
border-top: 1px solid var(--stokr-border-subtle);
|
|
210
206
|
|
|
211
207
|
${bordered(css`
|
|
212
208
|
border-top: 0;
|
|
@@ -219,8 +215,8 @@ const CardBody = styled.div`
|
|
|
219
215
|
padding: 24px 22px 20px;
|
|
220
216
|
|
|
221
217
|
${bordered(css`
|
|
222
|
-
gap:
|
|
223
|
-
padding:
|
|
218
|
+
gap: var(--stokr-space-8);
|
|
219
|
+
padding: var(--stokr-space-8) 0 0;
|
|
224
220
|
|
|
225
221
|
/* Figma labels the card's fields 14/20; the shared bordered label is 12/16. */
|
|
226
222
|
& > * > label {
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
import { TextName } from '../../design-system';
|
|
2
|
+
/** The kit's text colours (`--stokr-text-*`). */
|
|
3
|
+
export type TextColor = 'primary' | 'body' | 'secondary' | 'tertiary';
|
|
1
4
|
export interface TextProps {
|
|
5
|
+
/**
|
|
6
|
+
* A kit text style applied to the element itself, e.g. `<Text as="h2" variant="titleXl">`. Without it, `Text` styles
|
|
7
|
+
* the `h1`–`h5`, `p` and `ul` inside it (rich content, e.g. from the CMS).
|
|
8
|
+
*/
|
|
9
|
+
variant?: TextName;
|
|
10
|
+
/**
|
|
11
|
+
* Colours the whole block. Unset with a `variant`: display, titles, subtitles and links `primary`, caption and
|
|
12
|
+
* footnote `tertiary`, the rest `body`. Unset without: headings `primary`, the `h4` subtitle `secondary`, running text `body`.
|
|
13
|
+
*/
|
|
14
|
+
color?: TextColor;
|
|
2
15
|
fullWidth?: boolean;
|
|
3
16
|
center?: boolean;
|
|
4
17
|
withMarginBottom?: boolean;
|
|
@@ -13,7 +26,10 @@ export interface TextCaptionProps {
|
|
|
13
26
|
/** Extra space above, for a caption under a link or button. */
|
|
14
27
|
link?: boolean;
|
|
15
28
|
}
|
|
16
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Text in a kit style (`variant`, e.g. `titleXl`, `bodyM`), or a block that styles rich content (headings, paragraphs,
|
|
31
|
+
* lists). `Text.Caption` is the small print style.
|
|
32
|
+
*/
|
|
17
33
|
export declare const Text: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
18
34
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
19
35
|
}, TextProps>> & string & {
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
3
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
|
+
const variantColor = (variant) => {
|
|
5
|
+
if (/^(display|title|subtitle|link)/.test(variant)) return "primary";
|
|
6
|
+
if (variant === "caption" || variant === "footnote") return "tertiary";
|
|
7
|
+
return "body";
|
|
8
|
+
};
|
|
4
9
|
const TextBase = styled.div.withConfig({
|
|
5
10
|
shouldForwardProp: (props) => ![
|
|
11
|
+
"variant",
|
|
12
|
+
"color",
|
|
6
13
|
"fullWidth",
|
|
7
14
|
"center",
|
|
8
15
|
"withMarginBottom",
|
|
@@ -14,6 +21,24 @@ const TextBase = styled.div.withConfig({
|
|
|
14
21
|
].includes(props)
|
|
15
22
|
})`
|
|
16
23
|
display: block;
|
|
24
|
+
color: var(--stokr-text-${({ color, variant }) => color ?? (variant ? variantColor(variant) : "body")});
|
|
25
|
+
|
|
26
|
+
${({ variant }) => variant && `
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-family: var(--stokr-font-family-base);
|
|
29
|
+
${text(variant)}
|
|
30
|
+
`}
|
|
31
|
+
|
|
32
|
+
h1,
|
|
33
|
+
h2,
|
|
34
|
+
h3,
|
|
35
|
+
h5 {
|
|
36
|
+
color: ${({ color }) => color ? "inherit" : "var(--stokr-text-primary)"};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
h4 {
|
|
40
|
+
color: ${({ color }) => color ? "inherit" : "var(--stokr-text-secondary)"};
|
|
41
|
+
}
|
|
17
42
|
|
|
18
43
|
${({ withMarginBottom }) => withMarginBottom && `
|
|
19
44
|
margin-bottom: 32px;
|
|
@@ -32,7 +57,7 @@ const TextBase = styled.div.withConfig({
|
|
|
32
57
|
|
|
33
58
|
|
|
34
59
|
h1 {
|
|
35
|
-
font-family:
|
|
60
|
+
font-family: var(--stokr-font-family-base);
|
|
36
61
|
font-weight: 800;
|
|
37
62
|
font-size: 22px;
|
|
38
63
|
line-height: 1.18;
|
|
@@ -41,7 +66,7 @@ const TextBase = styled.div.withConfig({
|
|
|
41
66
|
margin-top: 1em;
|
|
42
67
|
margin-bottom: 32px;
|
|
43
68
|
|
|
44
|
-
${
|
|
69
|
+
${breakpoint.Medium`
|
|
45
70
|
font-size: 34px;
|
|
46
71
|
letter-spacing: 1.5px;
|
|
47
72
|
margin-bottom: 45px;
|
|
@@ -49,7 +74,7 @@ const TextBase = styled.div.withConfig({
|
|
|
49
74
|
}
|
|
50
75
|
|
|
51
76
|
h2 {
|
|
52
|
-
font-family:
|
|
77
|
+
font-family: var(--stokr-font-family-base);
|
|
53
78
|
font-weight: 300;
|
|
54
79
|
font-size: 34px;
|
|
55
80
|
line-height: 1.18em;
|
|
@@ -57,26 +82,25 @@ const TextBase = styled.div.withConfig({
|
|
|
57
82
|
margin-top: 1em;
|
|
58
83
|
margin-bottom: 0.18em;
|
|
59
84
|
|
|
60
|
-
${
|
|
85
|
+
${breakpoint.Medium`
|
|
61
86
|
font-size: 42px;
|
|
62
87
|
`}
|
|
63
88
|
|
|
64
|
-
${
|
|
89
|
+
${breakpoint.Large`
|
|
65
90
|
font-size: 50px;
|
|
66
91
|
`}
|
|
67
92
|
}
|
|
68
93
|
|
|
69
94
|
h4 {
|
|
70
|
-
font-family:
|
|
95
|
+
font-family: var(--stokr-font-family-base);
|
|
71
96
|
font-weight: 300;
|
|
72
97
|
font-size: 17px;
|
|
73
98
|
line-height: 1.27em;
|
|
74
99
|
letter-spacing: 0.8px;
|
|
75
100
|
margin-top: 1em;
|
|
76
101
|
margin-bottom: 0.27em;
|
|
77
|
-
opacity: 0.5;
|
|
78
102
|
|
|
79
|
-
${
|
|
103
|
+
${breakpoint.Medium`
|
|
80
104
|
//font-size: 34px;
|
|
81
105
|
`}
|
|
82
106
|
|
|
@@ -86,7 +110,7 @@ const TextBase = styled.div.withConfig({
|
|
|
86
110
|
}
|
|
87
111
|
|
|
88
112
|
h3 {
|
|
89
|
-
font-family:
|
|
113
|
+
font-family: var(--stokr-font-family-base);
|
|
90
114
|
font-weight: 800;
|
|
91
115
|
font-size: 22px;
|
|
92
116
|
line-height: 1.27em;
|
|
@@ -95,19 +119,19 @@ const TextBase = styled.div.withConfig({
|
|
|
95
119
|
margin-bottom: 0.27em;
|
|
96
120
|
text-transform: uppercase;
|
|
97
121
|
|
|
98
|
-
${
|
|
122
|
+
${breakpoint.Medium`
|
|
99
123
|
font-size: 34px;
|
|
100
124
|
`}
|
|
101
125
|
|
|
102
|
-
|
|
126
|
+
${breakpoint.Medium`${breakpoint.below.MLarge`
|
|
103
127
|
${(props) => props.responsiveFont && `
|
|
104
128
|
font-size: 22px;
|
|
105
129
|
`}
|
|
106
|
-
}
|
|
130
|
+
`}`}
|
|
107
131
|
}
|
|
108
132
|
|
|
109
133
|
h5 {
|
|
110
|
-
font-family:
|
|
134
|
+
font-family: var(--stokr-font-family-base);
|
|
111
135
|
font-weight: 800;
|
|
112
136
|
font-size: 22px;
|
|
113
137
|
line-height: 1.27em;
|
|
@@ -116,7 +140,7 @@ const TextBase = styled.div.withConfig({
|
|
|
116
140
|
}
|
|
117
141
|
|
|
118
142
|
p {
|
|
119
|
-
font-family:
|
|
143
|
+
font-family: var(--stokr-font-family-base);
|
|
120
144
|
font-weight: 300;
|
|
121
145
|
font-size: 16px;
|
|
122
146
|
line-height: 1.5em;
|
|
@@ -127,7 +151,7 @@ const TextBase = styled.div.withConfig({
|
|
|
127
151
|
font-size:12px;
|
|
128
152
|
`}
|
|
129
153
|
|
|
130
|
-
${
|
|
154
|
+
${breakpoint.XLarge`
|
|
131
155
|
font-size: 20px;
|
|
132
156
|
|
|
133
157
|
${(props) => props.small && `
|
|
@@ -142,12 +166,12 @@ const TextBase = styled.div.withConfig({
|
|
|
142
166
|
color: inherit;
|
|
143
167
|
|
|
144
168
|
&:hover {
|
|
145
|
-
color:
|
|
169
|
+
color: var(--stokr-text-primary);
|
|
146
170
|
}
|
|
147
171
|
}
|
|
148
172
|
|
|
149
173
|
${(props) => props.success && `
|
|
150
|
-
color:
|
|
174
|
+
color: var(--stokr-status-success-text);
|
|
151
175
|
`}
|
|
152
176
|
}
|
|
153
177
|
|
|
@@ -163,9 +187,9 @@ const TextBase = styled.div.withConfig({
|
|
|
163
187
|
letter-spacing: 0.6px;
|
|
164
188
|
}
|
|
165
189
|
|
|
166
|
-
|
|
190
|
+
${breakpoint.below.Mobile`
|
|
167
191
|
padding-left: 15px;
|
|
168
|
-
}
|
|
192
|
+
`}
|
|
169
193
|
}
|
|
170
194
|
|
|
171
195
|
> *:first-child {
|
|
@@ -180,9 +204,10 @@ const Caption = styled.p.withConfig({
|
|
|
180
204
|
shouldForwardProp: (props) => !["center", "link"].includes(props)
|
|
181
205
|
})`
|
|
182
206
|
&&& {
|
|
183
|
-
font-family:
|
|
207
|
+
font-family: var(--stokr-font-family-base);
|
|
184
208
|
font-weight: 300;
|
|
185
209
|
font-size: 9px;
|
|
210
|
+
color: var(--stokr-text-tertiary);
|
|
186
211
|
line-height: 1.78em;
|
|
187
212
|
letter-spacing: 0.4px;
|
|
188
213
|
|
|
@@ -191,7 +216,7 @@ const Caption = styled.p.withConfig({
|
|
|
191
216
|
font-size: 9px;
|
|
192
217
|
}
|
|
193
218
|
|
|
194
|
-
${
|
|
219
|
+
${breakpoint.Large`
|
|
195
220
|
font-size: 12px;
|
|
196
221
|
|
|
197
222
|
p {
|
|
@@ -205,10 +230,10 @@ const Caption = styled.p.withConfig({
|
|
|
205
230
|
a {
|
|
206
231
|
text-decoration: underline;
|
|
207
232
|
transition: color 0.2s;
|
|
208
|
-
color:
|
|
233
|
+
color: var(--stokr-text-link);
|
|
209
234
|
|
|
210
235
|
&:hover {
|
|
211
|
-
color:
|
|
236
|
+
color: var(--stokr-text-primary);
|
|
212
237
|
}
|
|
213
238
|
}
|
|
214
239
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TextLinkProps {
|
|
2
|
+
/** Rotates the arrow to point backwards. */
|
|
3
|
+
reverse?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const TextLink: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react-router').LinkProps & import('react').RefAttributes<HTMLAnchorElement>, "style"> & {
|
|
7
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
8
|
+
}, TextLinkProps>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react-router').LinkProps & import('react').RefAttributes<HTMLAnchorElement>, "style"> & {
|
|
9
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
10
|
+
}, TextLinkProps>, "children">>> & string & Omit<import('react').ForwardRefExoticComponent<import('react-router').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>, keyof import('react').Component<any, {}, any>>;
|
|
11
|
+
export declare const TextButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
12
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
13
|
+
}, TextLinkProps>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}, TextLinkProps>, "children">>> & string;
|
|
16
|
+
export default TextLink;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
|
-
import theme from "../../styles/theme.js";
|
|
4
3
|
import { withGlyph, glyph } from "../MaterialIcon/glyph.js";
|
|
5
4
|
const withArrow = (props) => ({
|
|
6
5
|
children: withGlyph(glyph("chevron_right", false, 16), props.children)
|
|
7
6
|
});
|
|
8
7
|
const styles = css`
|
|
9
|
-
background:
|
|
8
|
+
background: transparent;
|
|
9
|
+
color: var(--stokr-text-link);
|
|
10
10
|
border: none;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
position: relative;
|
|
13
|
-
font-family:
|
|
13
|
+
font-family: var(--stokr-font-family-base);
|
|
14
14
|
font-weight: bold;
|
|
15
15
|
font-size: 11px;
|
|
16
16
|
line-height: 14px;
|
|
@@ -27,7 +27,7 @@ const styles = css`
|
|
|
27
27
|
width: 16px;
|
|
28
28
|
height: 16px;
|
|
29
29
|
margin-top: -8px;
|
|
30
|
-
color:
|
|
30
|
+
color: var(--stokr-color-red-500);
|
|
31
31
|
transform: ${(props) => props.reverse ? "rotate(180deg)" : "none"};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type TimelineStepState = 'completed' | 'pending' | 'failed' | 'cancelled' | 'inactive';
|
|
2
|
+
export declare const TimelineContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
|
+
}, {
|
|
5
|
+
maxWidth?: string;
|
|
6
|
+
}>> & string;
|
|
7
|
+
export declare const TimelineStepWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
8
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
9
|
+
}, {
|
|
10
|
+
isLast?: boolean;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const IconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
13
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
14
|
+
}> & string;
|
|
15
|
+
export declare const StepIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
16
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
17
|
+
}, {
|
|
18
|
+
state?: TimelineStepState;
|
|
19
|
+
}>> & string;
|
|
20
|
+
export declare const ConnectingLine: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
21
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
22
|
+
}, {
|
|
23
|
+
state?: TimelineStepState;
|
|
24
|
+
}>> & string;
|
|
25
|
+
export declare const StepContent: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
26
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
27
|
+
}> & string;
|
|
28
|
+
export declare const StepHeader: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
29
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
30
|
+
}> & string;
|
|
31
|
+
export declare const StepDate: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
32
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
33
|
+
}> & string;
|
|
34
|
+
export declare const StepTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
35
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
36
|
+
}, {
|
|
37
|
+
state?: TimelineStepState;
|
|
38
|
+
}>> & string;
|
|
39
|
+
export declare const StepCaption: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
40
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
41
|
+
}> & string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { colors } from "../../styles/colors.js";
|
|
3
2
|
const iconSize = 20;
|
|
4
3
|
const TimelineContainer = styled.div.withConfig({
|
|
5
4
|
shouldForwardProp: (props) => !["maxWidth"].includes(props)
|
|
@@ -41,32 +40,32 @@ const StepIcon = styled.div.withConfig({
|
|
|
41
40
|
switch (props.state) {
|
|
42
41
|
case "completed":
|
|
43
42
|
return css`
|
|
44
|
-
background-color:
|
|
45
|
-
color:
|
|
43
|
+
background-color: var(--stokr-status-success-icon);
|
|
44
|
+
color: var(--stokr-background-default);
|
|
46
45
|
`;
|
|
47
46
|
case "pending":
|
|
48
47
|
return css`
|
|
49
|
-
background-color:
|
|
50
|
-
color:
|
|
48
|
+
background-color: var(--stokr-status-warning-icon);
|
|
49
|
+
color: var(--stokr-background-default);
|
|
51
50
|
`;
|
|
52
51
|
case "failed":
|
|
53
52
|
case "cancelled":
|
|
54
53
|
return css`
|
|
55
|
-
background-color:
|
|
56
|
-
color:
|
|
54
|
+
background-color: var(--stokr-status-error-icon);
|
|
55
|
+
color: var(--stokr-background-default);
|
|
57
56
|
`;
|
|
58
57
|
case "inactive":
|
|
59
58
|
default:
|
|
60
59
|
return css`
|
|
61
60
|
background-color: transparent;
|
|
62
|
-
border: 1.5px solid
|
|
63
|
-
color:
|
|
61
|
+
border: 1.5px solid var(--stokr-border-subtle);
|
|
62
|
+
color: var(--stokr-text-tertiary);
|
|
64
63
|
`;
|
|
65
64
|
}
|
|
66
65
|
}}
|
|
67
66
|
|
|
68
67
|
> svg path {
|
|
69
|
-
stroke:
|
|
68
|
+
stroke: var(--stokr-background-default);
|
|
70
69
|
}
|
|
71
70
|
`;
|
|
72
71
|
const ConnectingLine = styled.div.withConfig({
|
|
@@ -78,7 +77,7 @@ const ConnectingLine = styled.div.withConfig({
|
|
|
78
77
|
align-self: center;
|
|
79
78
|
|
|
80
79
|
${(props) => {
|
|
81
|
-
const lineColor = props.state === "completed" ?
|
|
80
|
+
const lineColor = props.state === "completed" ? "var(--stokr-status-success-icon)" : props.state === "pending" ? "var(--stokr-status-warning-icon)" : props.state === "failed" || props.state === "cancelled" ? "var(--stokr-status-error-icon)" : "var(--stokr-border-subtle)";
|
|
82
81
|
return css`
|
|
83
82
|
background-color: ${lineColor};
|
|
84
83
|
`;
|
|
@@ -97,7 +96,7 @@ const StepHeader = styled.div`
|
|
|
97
96
|
gap: 8px;
|
|
98
97
|
`;
|
|
99
98
|
const StepDate = styled.span`
|
|
100
|
-
color:
|
|
99
|
+
color: var(--stokr-text-primary);
|
|
101
100
|
font-size: 11px;
|
|
102
101
|
font-weight: 400;
|
|
103
102
|
text-transform: uppercase;
|
|
@@ -112,9 +111,9 @@ const StepTitle = styled.span.withConfig({
|
|
|
112
111
|
switch (props.state) {
|
|
113
112
|
case "inactive":
|
|
114
113
|
case "pending":
|
|
115
|
-
return
|
|
114
|
+
return "var(--stokr-text-tertiary)";
|
|
116
115
|
default:
|
|
117
|
-
return
|
|
116
|
+
return "var(--stokr-text-primary)";
|
|
118
117
|
}
|
|
119
118
|
}};
|
|
120
119
|
|
|
@@ -125,7 +124,7 @@ const StepTitle = styled.span.withConfig({
|
|
|
125
124
|
word-wrap: break-word;
|
|
126
125
|
`;
|
|
127
126
|
const StepCaption = styled.div`
|
|
128
|
-
color:
|
|
127
|
+
color: var(--stokr-text-tertiary);
|
|
129
128
|
margin-top: 4px;
|
|
130
129
|
font-size: 12px;
|
|
131
130
|
font-weight: 400;
|
|
@@ -28,7 +28,7 @@ const TimelineStep = ({
|
|
|
28
28
|
case "completed":
|
|
29
29
|
return /* @__PURE__ */ jsx(SvgCheckIcon, { width: 12, height: 12 });
|
|
30
30
|
case "pending":
|
|
31
|
-
return /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", marginLeft: 1 }, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "search_activity", size:
|
|
31
|
+
return /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", marginLeft: 1 }, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "search_activity", size: "xs" }) });
|
|
32
32
|
case "failed":
|
|
33
33
|
case "cancelled":
|
|
34
34
|
return /* @__PURE__ */ jsx(SvgCrossIcon, { width: 8, height: 8 });
|
|
@@ -6,7 +6,7 @@ export type VirtualReference = {
|
|
|
6
6
|
export type TooltipProps = {
|
|
7
7
|
/** Tooltip body. When empty, `children` render untouched with no listeners. */
|
|
8
8
|
content?: ReactNode;
|
|
9
|
-
children
|
|
9
|
+
children: ReactNode;
|
|
10
10
|
placement?: TooltipPlacement;
|
|
11
11
|
/** Render `children` untouched, no tooltip at all. */
|
|
12
12
|
disabled?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
import theme from "../../styles/theme.js";
|
|
5
4
|
import { TriggerWrapper, Bubble } from "./Tooltip.styles.js";
|
|
5
|
+
import { colors } from "../../design-system/tokens/colors.js";
|
|
6
6
|
const useIsomorphicLayoutEffect = typeof document === "undefined" ? useEffect : useLayoutEffect;
|
|
7
7
|
const PLACEMENTS = ["top", "bottom", "left", "right"];
|
|
8
8
|
const FORWARD_REF = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
@@ -130,7 +130,7 @@ const Tooltip = ({
|
|
|
130
130
|
width: ARROW_WIDTH,
|
|
131
131
|
height: ARROW_HEIGHT,
|
|
132
132
|
tipRadius: 1,
|
|
133
|
-
fill: arrowColor ||
|
|
133
|
+
fill: arrowColor || colors["blue-500"]
|
|
134
134
|
}
|
|
135
135
|
)
|
|
136
136
|
]
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import { colors } from "../../styles/colors.js";
|
|
3
2
|
const TriggerWrapper = styled.span`
|
|
4
3
|
display: inline-flex;
|
|
5
4
|
`;
|
|
@@ -11,8 +10,8 @@ const Bubble = styled.div`
|
|
|
11
10
|
max-width: ${({ $maxWidth }) => typeof $maxWidth === "number" ? `${$maxWidth}px` : $maxWidth};
|
|
12
11
|
padding: 12px;
|
|
13
12
|
border-radius: 10px;
|
|
14
|
-
background:
|
|
15
|
-
color:
|
|
13
|
+
background: var(--stokr-background-surface-raised);
|
|
14
|
+
color: var(--stokr-text-primary);
|
|
16
15
|
font-size: 14px;
|
|
17
16
|
line-height: 18px;
|
|
18
17
|
font-weight: 400;
|