@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,9 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
|
-
import PropTypes from "prop-types";
|
|
5
4
|
import styled from "styled-components";
|
|
6
|
-
import { colors } from "../../styles/colors.js";
|
|
7
5
|
import SvgFilterIcon from "../../static/images/filter-icon.svg.js";
|
|
8
6
|
import { OptionCheckbox } from "../Checkbox/OptionCheckbox.js";
|
|
9
7
|
import { CheckboxWrapperDiv, OptionLabel } from "./MultiSelect.js";
|
|
@@ -42,7 +40,7 @@ const ActiveDot = styled.div`
|
|
|
42
40
|
right: -2px;
|
|
43
41
|
width: 6px;
|
|
44
42
|
height: 6px;
|
|
45
|
-
background-color:
|
|
43
|
+
background-color: currentColor;
|
|
46
44
|
border-radius: 50%;
|
|
47
45
|
`;
|
|
48
46
|
const DropdownContainer = styled.div`
|
|
@@ -54,10 +52,10 @@ const DropdownMenu = styled.div`
|
|
|
54
52
|
z-index: 10000;
|
|
55
53
|
min-width: 150px;
|
|
56
54
|
max-width: 300px;
|
|
57
|
-
background-color:
|
|
55
|
+
background-color: var(--stokr-background-surface-raised);
|
|
58
56
|
border-radius: 8px;
|
|
59
57
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
60
|
-
border: 1px solid
|
|
58
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
61
59
|
overflow: hidden;
|
|
62
60
|
`;
|
|
63
61
|
const OptionsList = styled.div`
|
|
@@ -72,12 +70,12 @@ const ClearAllOption = styled.div`
|
|
|
72
70
|
font-size: 14px;
|
|
73
71
|
font-weight: 400;
|
|
74
72
|
letter-spacing: 0.6px;
|
|
75
|
-
color:
|
|
76
|
-
border-top: 1px solid
|
|
73
|
+
color: var(--stokr-action-accent-bg);
|
|
74
|
+
border-top: 1px solid var(--stokr-border-subtle);
|
|
77
75
|
transition: background-color 0.15s ease;
|
|
78
76
|
|
|
79
77
|
&:hover {
|
|
80
|
-
background-color:
|
|
78
|
+
background-color: var(--stokr-action-outline-bg-hover);
|
|
81
79
|
}
|
|
82
80
|
`;
|
|
83
81
|
function slugForDataCy(text) {
|
|
@@ -233,37 +231,6 @@ const TableFilterDropdown = ({
|
|
|
233
231
|
renderMenu()
|
|
234
232
|
] });
|
|
235
233
|
};
|
|
236
|
-
TableFilterDropdown.propTypes = {
|
|
237
|
-
/** Label text displayed next to the filter icon */
|
|
238
|
-
label: PropTypes.string,
|
|
239
|
-
/** Array of options to display */
|
|
240
|
-
options: PropTypes.arrayOf(
|
|
241
|
-
PropTypes.shape({
|
|
242
|
-
value: PropTypes.string.isRequired,
|
|
243
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
|
|
244
|
-
})
|
|
245
|
-
).isRequired,
|
|
246
|
-
/** Array of selected values */
|
|
247
|
-
value: PropTypes.arrayOf(PropTypes.string),
|
|
248
|
-
/** Callback when selection changes: (newValues) => void */
|
|
249
|
-
onChange: PropTypes.func,
|
|
250
|
-
/** Custom icon component (defaults to FilterIcon) */
|
|
251
|
-
icon: PropTypes.elementType,
|
|
252
|
-
/** Minimum width of the dropdown menu */
|
|
253
|
-
minWidth: PropTypes.number,
|
|
254
|
-
/** Maximum width of the dropdown menu */
|
|
255
|
-
maxWidth: PropTypes.number,
|
|
256
|
-
/** Alignment of the dropdown menu */
|
|
257
|
-
menuAlign: PropTypes.oneOf(["left", "right"]),
|
|
258
|
-
/** Top offset for the dropdown menu in pixels (default: 8) */
|
|
259
|
-
menuTop: PropTypes.number,
|
|
260
|
-
/** Show "Clear all" option at the bottom of the list */
|
|
261
|
-
showClearAll: PropTypes.bool,
|
|
262
|
-
/** Custom text for the "Clear all" option */
|
|
263
|
-
clearAllText: PropTypes.string,
|
|
264
|
-
/** Override default `table-filter-{label}` data-cy on trigger */
|
|
265
|
-
dataCy: PropTypes.string
|
|
266
|
-
};
|
|
267
234
|
export {
|
|
268
235
|
TableFilterDropdown
|
|
269
236
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const TextareaWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const StyledTextarea: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}, {
|
|
7
|
+
minHeight?: string;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
}>> & string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import theme from "../../styles/theme.js";
|
|
3
2
|
const TextareaWrapper = styled.div`
|
|
4
3
|
position: relative;
|
|
5
4
|
display: block;
|
|
@@ -7,7 +6,7 @@ const TextareaWrapper = styled.div`
|
|
|
7
6
|
const StyledTextarea = styled.textarea.withConfig({
|
|
8
7
|
shouldForwardProp: (props) => !["minHeight", "error"].includes(props)
|
|
9
8
|
})`
|
|
10
|
-
font-family:
|
|
9
|
+
font-family: var(--stokr-font-family-base);
|
|
11
10
|
display: block;
|
|
12
11
|
width: 100%;
|
|
13
12
|
min-height: ${(props) => props.minHeight || "100px"};
|
|
@@ -18,20 +17,20 @@ const StyledTextarea = styled.textarea.withConfig({
|
|
|
18
17
|
padding: 12px 16px;
|
|
19
18
|
box-shadow: none;
|
|
20
19
|
outline: 0;
|
|
21
|
-
border: 1px solid
|
|
20
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
22
21
|
border-radius: 4px;
|
|
23
|
-
color:
|
|
22
|
+
color: var(--stokr-text-primary);
|
|
24
23
|
background-color: transparent;
|
|
25
24
|
transition: border-color 0.2s;
|
|
26
25
|
resize: vertical;
|
|
27
26
|
|
|
28
27
|
&:focus,
|
|
29
28
|
&:hover {
|
|
30
|
-
border-color:
|
|
29
|
+
border-color: var(--stokr-border-default);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
&::placeholder {
|
|
34
|
-
color:
|
|
33
|
+
color: var(--stokr-text-tertiary);
|
|
35
34
|
opacity: 1;
|
|
36
35
|
text-transform: uppercase;
|
|
37
36
|
font-weight: 400;
|
|
@@ -40,19 +39,19 @@ const StyledTextarea = styled.textarea.withConfig({
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
${(props) => props.disabled && css`
|
|
43
|
-
color:
|
|
42
|
+
color: var(--stokr-text-tertiary);
|
|
44
43
|
cursor: not-allowed;
|
|
45
44
|
&:focus,
|
|
46
45
|
&:hover {
|
|
47
|
-
border-color:
|
|
46
|
+
border-color: var(--stokr-border-subtle);
|
|
48
47
|
}
|
|
49
48
|
`}
|
|
50
49
|
|
|
51
50
|
${(props) => props.error && css`
|
|
52
|
-
border-color:
|
|
51
|
+
border-color: var(--stokr-status-error-border);
|
|
53
52
|
&:focus,
|
|
54
53
|
&:hover {
|
|
55
|
-
border-color:
|
|
54
|
+
border-color: var(--stokr-status-error-border);
|
|
56
55
|
}
|
|
57
56
|
`}
|
|
58
57
|
`;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { ComponentType, SVGProps } from 'react';
|
|
2
2
|
import { MaterialIconName } from './iconConfig';
|
|
3
|
+
/** Steps of the 4 px spacing scale: xs = space-3, sm = space-4, md = space-5, lg = space-6, xl = space-8. */
|
|
3
4
|
export declare const ICON_SIZES: {
|
|
4
|
-
readonly xs:
|
|
5
|
-
readonly sm:
|
|
6
|
-
readonly md:
|
|
7
|
-
readonly lg:
|
|
8
|
-
readonly xl:
|
|
5
|
+
readonly xs: number;
|
|
6
|
+
readonly sm: number;
|
|
7
|
+
readonly md: number;
|
|
8
|
+
readonly lg: number;
|
|
9
|
+
readonly xl: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The kit font weights that ship as Material Symbols files (`@material-symbols/svg-400`, `svg-600`). Match the text
|
|
13
|
+
* beside the icon: regular next to regular text, semibold next to semibold or bolder labels and titles.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ICON_WEIGHTS: {
|
|
16
|
+
readonly regular: 400;
|
|
17
|
+
readonly semibold: 600;
|
|
9
18
|
};
|
|
10
19
|
export type IconSize = keyof typeof ICON_SIZES | number | (string & {});
|
|
20
|
+
export type IconWeight = (typeof ICON_WEIGHTS)[keyof typeof ICON_WEIGHTS] | (number & {});
|
|
11
21
|
interface IconBaseProps {
|
|
12
22
|
/** Token, px number, or a CSS length such as `1em` to follow the font size. Default `lg` (24px). */
|
|
13
23
|
size?: IconSize;
|
|
@@ -23,8 +33,8 @@ export interface MaterialIconProps extends IconBaseProps {
|
|
|
23
33
|
name: MaterialIconName;
|
|
24
34
|
variant?: 'outlined' | 'rounded' | 'sharp';
|
|
25
35
|
filled?: boolean;
|
|
26
|
-
/** Stroke weight of the registered file: 400
|
|
27
|
-
weight?:
|
|
36
|
+
/** Stroke weight of the registered file: `ICON_WEIGHTS.regular` (400, default) or another the app registered, e.g. `600`. */
|
|
37
|
+
weight?: IconWeight;
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* A Material Symbol the app registered with `registerMaterialIcons`, drawn inline (in the server render too, no
|
|
@@ -2,7 +2,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { InlineIcon, MaskedIcon, IconBox } from "./MaterialIcon.styles.js";
|
|
4
4
|
import { getRegisteredMaterialIcon } from "./iconConfig.js";
|
|
5
|
-
|
|
5
|
+
import { fontWeights } from "../../design-system/tokens/typography.js";
|
|
6
|
+
import { space } from "../../design-system/tokens/layout.js";
|
|
7
|
+
const px = (length) => Number.parseInt(length, 10);
|
|
8
|
+
const ICON_SIZES = {
|
|
9
|
+
xs: px(space["3"]),
|
|
10
|
+
sm: px(space["4"]),
|
|
11
|
+
md: px(space["5"]),
|
|
12
|
+
lg: px(space["6"]),
|
|
13
|
+
xl: px(space["8"])
|
|
14
|
+
};
|
|
15
|
+
const ICON_WEIGHTS = { regular: fontWeights.regular, semibold: fontWeights.semibold };
|
|
6
16
|
const toLength = (size) => {
|
|
7
17
|
if (typeof size === "number") return `${size}px`;
|
|
8
18
|
return Object.prototype.hasOwnProperty.call(ICON_SIZES, size) ? `${ICON_SIZES[size]}px` : size;
|
|
@@ -13,14 +23,14 @@ const MaterialIcon = ({
|
|
|
13
23
|
name,
|
|
14
24
|
variant = "outlined",
|
|
15
25
|
filled = false,
|
|
16
|
-
weight =
|
|
26
|
+
weight = ICON_WEIGHTS.regular,
|
|
17
27
|
size = "lg",
|
|
18
28
|
color,
|
|
19
29
|
label,
|
|
20
30
|
className,
|
|
21
31
|
dataCy
|
|
22
32
|
}) => {
|
|
23
|
-
const path = `${variant}/${name}${filled ? "-fill" : ""}${weight ===
|
|
33
|
+
const path = `${variant}/${name}${filled ? "-fill" : ""}${weight === ICON_WEIGHTS.regular ? "" : `@${weight}`}`;
|
|
24
34
|
const svg = getRegisteredMaterialIcon(path);
|
|
25
35
|
if (!svg) {
|
|
26
36
|
return null;
|
|
@@ -54,6 +64,7 @@ const SvgIcon = ({ svg: Svg, size = "lg", color, label, className, dataCy }) =>
|
|
|
54
64
|
};
|
|
55
65
|
export {
|
|
56
66
|
ICON_SIZES,
|
|
67
|
+
ICON_WEIGHTS,
|
|
57
68
|
MaterialIcon,
|
|
58
69
|
SvgIcon
|
|
59
70
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MenuNav: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}, {
|
|
4
|
+
mobile?: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export default MenuNav;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import rwd from "../../styles/rwd.js";
|
|
2
1
|
import grid from "../../styles/grid.js";
|
|
3
|
-
import { colors } from "../../styles/colors.js";
|
|
4
2
|
import styled, { css } from "styled-components";
|
|
5
3
|
import { Link } from "react-router-dom";
|
|
6
4
|
import { glyph, withGlyph } from "../MaterialIcon/glyph.js";
|
|
5
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
7
6
|
const ModalRoot = styled.div`
|
|
8
7
|
z-index: 1000;
|
|
9
8
|
position: fixed;
|
|
@@ -47,7 +46,7 @@ const Box = styled.div.withConfig({
|
|
|
47
46
|
left: 0;
|
|
48
47
|
top: 0;
|
|
49
48
|
width: 100%;
|
|
50
|
-
background-color:
|
|
49
|
+
background-color: var(--stokr-background-surface-raised);
|
|
51
50
|
font-size: 10px;
|
|
52
51
|
text-align: left;
|
|
53
52
|
box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1);
|
|
@@ -64,7 +63,7 @@ const Box = styled.div.withConfig({
|
|
|
64
63
|
max-height: 768px!important;
|
|
65
64
|
`}
|
|
66
65
|
|
|
67
|
-
${
|
|
66
|
+
${breakpoint.Medium`
|
|
68
67
|
max-width: min(${grid(12)}, ${(props) => props.maxWidth || "1200px"});
|
|
69
68
|
|
|
70
69
|
${(props) => props.thin && `
|
|
@@ -72,7 +71,7 @@ const Box = styled.div.withConfig({
|
|
|
72
71
|
`}
|
|
73
72
|
`}
|
|
74
73
|
|
|
75
|
-
${
|
|
74
|
+
${breakpoint.XLarge`
|
|
76
75
|
max-width: min(${grid(12)}, ${(props) => props.maxWidth || "1500px"});
|
|
77
76
|
|
|
78
77
|
${(props) => props.thin && `
|
|
@@ -80,9 +79,9 @@ const Box = styled.div.withConfig({
|
|
|
80
79
|
`}
|
|
81
80
|
`}
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
${breakpoint.below.Medium`
|
|
84
83
|
min-height: 100vh;
|
|
85
|
-
}
|
|
84
|
+
`}
|
|
86
85
|
|
|
87
86
|
${({ isRegisterEntity }) => isRegisterEntity && css`
|
|
88
87
|
max-width: 55% !important;
|
|
@@ -94,8 +93,8 @@ const Box = styled.div.withConfig({
|
|
|
94
93
|
`}
|
|
95
94
|
`;
|
|
96
95
|
const ModalInnerSmartContractAddress = styled.input`
|
|
97
|
-
color:
|
|
98
|
-
font-family:
|
|
96
|
+
color: var(--stokr-text-primary);
|
|
97
|
+
font-family: var(--stokr-font-family-base);
|
|
99
98
|
font-size: 14px;
|
|
100
99
|
font-weight: 400;
|
|
101
100
|
text-align: left;
|
|
@@ -110,7 +109,7 @@ const ModalInnerWithBorder = styled.div.withConfig({
|
|
|
110
109
|
shouldForwardProp: (props) => !["bottomRadius0", "topRadius0", "marginTop0", "borderTopNone", "textAlignRight", "paddingSmall"].includes(props)
|
|
111
110
|
})`
|
|
112
111
|
border-radius: 8px;
|
|
113
|
-
border: 1px solid
|
|
112
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
114
113
|
padding: 25px 35px;
|
|
115
114
|
margin-top: 39px;
|
|
116
115
|
|
|
@@ -141,7 +140,7 @@ const ModalInnerWithBorder = styled.div.withConfig({
|
|
|
141
140
|
`}
|
|
142
141
|
|
|
143
142
|
p {
|
|
144
|
-
color:
|
|
143
|
+
color: var(--stokr-text-primary);
|
|
145
144
|
font-size: 14px;
|
|
146
145
|
font-weight: 300;
|
|
147
146
|
letter-spacing: 0.53px;
|
|
@@ -160,21 +159,21 @@ const ModalInner = styled.div.withConfig({
|
|
|
160
159
|
display: flex;
|
|
161
160
|
flex-direction: column;
|
|
162
161
|
|
|
163
|
-
|
|
162
|
+
${breakpoint.below.Medium`
|
|
164
163
|
height: ${({ isMobile }) => isMobile && "100vh"};
|
|
165
|
-
}
|
|
164
|
+
`}
|
|
166
165
|
|
|
167
166
|
${(props) => props.center && `
|
|
168
167
|
text-align: center;
|
|
169
168
|
`}
|
|
170
169
|
|
|
171
170
|
${(props) => props.background && `
|
|
172
|
-
background-color:
|
|
171
|
+
background-color: var(--stokr-background-surface);
|
|
173
172
|
`}
|
|
174
173
|
|
|
175
174
|
${(props) => props.modalBot && `
|
|
176
|
-
background-color:
|
|
177
|
-
color:
|
|
175
|
+
background-color: var(--stokr-color-red-500);
|
|
176
|
+
color: var(--stokr-brand-pure-white);
|
|
178
177
|
flex-grow: 0 !important;
|
|
179
178
|
height: auto;
|
|
180
179
|
`}
|
|
@@ -188,7 +187,7 @@ const ModalInner = styled.div.withConfig({
|
|
|
188
187
|
align-items: center;
|
|
189
188
|
`}
|
|
190
189
|
|
|
191
|
-
${
|
|
190
|
+
${breakpoint.Medium`
|
|
192
191
|
padding: 53px ${grid(1, 12)};
|
|
193
192
|
|
|
194
193
|
${(props) => props.left && `
|
|
@@ -197,13 +196,13 @@ const ModalInner = styled.div.withConfig({
|
|
|
197
196
|
|
|
198
197
|
${(props) => props.modalTop && `
|
|
199
198
|
padding-bottom: 43px;
|
|
200
|
-
border-right: 1px solid
|
|
199
|
+
border-right: 1px solid var(--stokr-border-subtle);
|
|
201
200
|
`}
|
|
202
201
|
|
|
203
202
|
/* missing tiny */
|
|
204
203
|
`}
|
|
205
204
|
|
|
206
|
-
${
|
|
205
|
+
${breakpoint.XLarge`
|
|
207
206
|
padding: 53px ${grid(1, 10)};
|
|
208
207
|
|
|
209
208
|
${(props) => props.left && `
|
|
@@ -244,8 +243,8 @@ const ModalClose = styled.span.attrs({
|
|
|
244
243
|
height: 40px;
|
|
245
244
|
text-align: center;
|
|
246
245
|
cursor: pointer;
|
|
247
|
-
color:
|
|
248
|
-
background-color:
|
|
246
|
+
color: var(--stokr-action-accent-text);
|
|
247
|
+
background-color: var(--stokr-action-accent-bg);
|
|
249
248
|
transition:
|
|
250
249
|
background-color 0.2s,
|
|
251
250
|
color 0.2s;
|
|
@@ -258,15 +257,15 @@ const ModalClose = styled.span.attrs({
|
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
&:hover {
|
|
261
|
-
color:
|
|
262
|
-
background-color:
|
|
260
|
+
color: var(--stokr-text-primary);
|
|
261
|
+
background-color: var(--stokr-background-surface-raised);
|
|
263
262
|
|
|
264
263
|
> [data-icon] {
|
|
265
264
|
transform: rotate(-180deg);
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
|
|
269
|
-
${
|
|
268
|
+
${breakpoint.Medium`
|
|
270
269
|
width: 56px;
|
|
271
270
|
height: 56px;
|
|
272
271
|
|
|
@@ -293,7 +292,7 @@ const ModalBack = styled.span.withConfig({
|
|
|
293
292
|
height: 40px;
|
|
294
293
|
text-align: center;
|
|
295
294
|
cursor: pointer;
|
|
296
|
-
color:
|
|
295
|
+
color: var(--stokr-text-primary);
|
|
297
296
|
background-color: transparent;
|
|
298
297
|
transition:
|
|
299
298
|
color 0.2s,
|
|
@@ -313,14 +312,14 @@ const ModalBack = styled.span.withConfig({
|
|
|
313
312
|
}
|
|
314
313
|
|
|
315
314
|
&:hover {
|
|
316
|
-
color:
|
|
315
|
+
color: var(--stokr-action-accent-bg);
|
|
317
316
|
|
|
318
317
|
> [data-icon] {
|
|
319
318
|
transform: translateX(-20%);
|
|
320
319
|
}
|
|
321
320
|
}
|
|
322
321
|
|
|
323
|
-
${
|
|
322
|
+
${breakpoint.Medium`
|
|
324
323
|
width: 56px;
|
|
325
324
|
height: 56px;
|
|
326
325
|
|
|
@@ -331,7 +330,7 @@ const ModalLinkWrap = styled.div.attrs((props) => ({
|
|
|
331
330
|
children: withGlyph(glyph("chevron_right", false, 16), props.children)
|
|
332
331
|
}))`
|
|
333
332
|
position: relative;
|
|
334
|
-
font-family:
|
|
333
|
+
font-family: var(--stokr-font-family-base);
|
|
335
334
|
font-weight: 300;
|
|
336
335
|
font-size: 11px;
|
|
337
336
|
line-height: 14px;
|
|
@@ -345,7 +344,7 @@ const ModalLinkWrap = styled.div.attrs((props) => ({
|
|
|
345
344
|
width: 16px;
|
|
346
345
|
height: 16px;
|
|
347
346
|
margin-top: -8px;
|
|
348
|
-
color:
|
|
347
|
+
color: var(--stokr-color-green-500);
|
|
349
348
|
}
|
|
350
349
|
`;
|
|
351
350
|
const ModalLinkBase = styled(Link)`
|
|
@@ -364,7 +363,7 @@ const ModalLinkBase = styled(Link)`
|
|
|
364
363
|
position: absolute;
|
|
365
364
|
top: 100%;
|
|
366
365
|
left: 0;
|
|
367
|
-
background-color:
|
|
366
|
+
background-color: var(--stokr-color-green-500);
|
|
368
367
|
transition: width 0.2s;
|
|
369
368
|
}
|
|
370
369
|
|
|
@@ -381,7 +380,7 @@ styled.div`
|
|
|
381
380
|
height: 100%;
|
|
382
381
|
`;
|
|
383
382
|
styled.div`
|
|
384
|
-
font-family:
|
|
383
|
+
font-family: var(--stokr-font-family-base);
|
|
385
384
|
font-weight: 800;
|
|
386
385
|
font-size: 22px;
|
|
387
386
|
line-height: 1.27em;
|
|
@@ -394,7 +393,7 @@ const ModalScroll = styled.div`
|
|
|
394
393
|
padding: 0 12px;
|
|
395
394
|
margin: 0 -12px;
|
|
396
395
|
|
|
397
|
-
${
|
|
396
|
+
${breakpoint.Large`
|
|
398
397
|
padding: 0 32px;
|
|
399
398
|
margin: 0 -32px;
|
|
400
399
|
`}
|
|
@@ -404,22 +403,22 @@ const ModalScroll = styled.div`
|
|
|
404
403
|
}
|
|
405
404
|
|
|
406
405
|
&::-webkit-scrollbar-track {
|
|
407
|
-
background-color:
|
|
406
|
+
background-color: var(--stokr-border-subtle);
|
|
408
407
|
}
|
|
409
408
|
|
|
410
409
|
&::-webkit-scrollbar-thumb {
|
|
411
|
-
background-color:
|
|
410
|
+
background-color: var(--stokr-color-red-500);
|
|
412
411
|
}
|
|
413
412
|
|
|
414
413
|
&::-webkit-scrollbar-thumb:window-inactive {
|
|
415
|
-
background-color:
|
|
414
|
+
background-color: var(--stokr-color-red-600);
|
|
416
415
|
}
|
|
417
416
|
`;
|
|
418
417
|
styled.div`
|
|
419
418
|
& + & {
|
|
420
419
|
padding-top: 40px;
|
|
421
420
|
|
|
422
|
-
${
|
|
421
|
+
${breakpoint.Medium`
|
|
423
422
|
padding-top: 53px;
|
|
424
423
|
`}
|
|
425
424
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export interface PaymentModalData {
|
|
3
|
+
/** Token symbol the user has to send (default title and instructions). */
|
|
4
|
+
tokenSymbolToSend?: string;
|
|
5
|
+
/** Symbol of the securities being bought or redeemed. */
|
|
6
|
+
tokenSymbol?: string;
|
|
7
|
+
tokenAmount?: number | string;
|
|
8
|
+
currencyType?: string;
|
|
9
|
+
createdAt?: string | number | Date;
|
|
10
|
+
/** The user's own wallet. Older callers pass `GAID` instead. */
|
|
11
|
+
investorWallet?: string;
|
|
12
|
+
/** @deprecated Old name of `investorWallet`. */
|
|
13
|
+
GAID?: string;
|
|
14
|
+
/** Wallet the user has to pay to. Older callers pass `projectData.companyWallet` instead. */
|
|
15
|
+
treasuryWallet?: string;
|
|
16
|
+
projectData?: {
|
|
17
|
+
companyWallet?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface PaymentModalProps {
|
|
21
|
+
data?: PaymentModalData;
|
|
22
|
+
/** Only `kyc_status` is read: anything but `Accepted` hides the treasury wallet behind a KYC warning. */
|
|
23
|
+
user?: {
|
|
24
|
+
kyc_status?: string;
|
|
25
|
+
};
|
|
26
|
+
isModalOpen: boolean;
|
|
27
|
+
onModalClose?: () => void;
|
|
28
|
+
onCTAClick?: MouseEventHandler<HTMLButtonElement>;
|
|
29
|
+
isRedemption?: boolean;
|
|
30
|
+
/** Hides the call-to-action button. */
|
|
31
|
+
noCTA?: boolean;
|
|
32
|
+
CTAText?: ReactNode;
|
|
33
|
+
/** Extra content under the treasury wallet. */
|
|
34
|
+
additionalInfoRight?: ReactNode;
|
|
35
|
+
/** Shows the countdown when `secondsRemaining` is positive. */
|
|
36
|
+
withTimer?: boolean;
|
|
37
|
+
/** Replaces the right-hand column. */
|
|
38
|
+
error?: ReactNode;
|
|
39
|
+
secondsRemaining?: number;
|
|
40
|
+
modalTitle?: ReactNode;
|
|
41
|
+
/** Shows a string `transactionCostMessage` in red. */
|
|
42
|
+
txTextInRed?: boolean;
|
|
43
|
+
sendTokenTextRight?: ReactNode;
|
|
44
|
+
numberOfSecuritiesText?: ReactNode;
|
|
45
|
+
/** A string is wrapped in a paragraph; an element is rendered as-is. */
|
|
46
|
+
transactionCostMessage?: ReactNode;
|
|
47
|
+
/** QR code content: the chain's payment URI (address, amount, asset). Without it the QR holds the treasury address. */
|
|
48
|
+
paymentLink?: string;
|
|
49
|
+
investorWalletLabel?: ReactNode;
|
|
50
|
+
treasuryWalletLabel?: ReactNode;
|
|
51
|
+
/** Shows the KYC warning (instead of the wallet) for users that are not verified. */
|
|
52
|
+
showKYCWarningBox?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export declare const PaymentModal: ({ data, user, isModalOpen, onModalClose, onCTAClick, isRedemption, noCTA, CTAText, additionalInfoRight, withTimer, error, secondsRemaining, modalTitle, txTextInRed, sendTokenTextRight, numberOfSecuritiesText, transactionCostMessage, paymentLink, investorWalletLabel, treasuryWalletLabel, showKYCWarningBox, }: PaymentModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export default PaymentModal;
|
|
@@ -6,15 +6,14 @@ import { Modal } from "./Modal.js";
|
|
|
6
6
|
import { Text } from "../Text/Text.styles.js";
|
|
7
7
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
8
8
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
|
-
import
|
|
9
|
+
import { CryptoAddress } from "../CryptoAddress/CryptoAddress.js";
|
|
10
10
|
import { Button } from "../Button/Button.styles.js";
|
|
11
11
|
import { getCurrencySymbol } from "../../utils/formatCurrencyValue.js";
|
|
12
|
-
import theme from "../../styles/theme.js";
|
|
13
12
|
import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
|
|
14
13
|
import styled from "styled-components";
|
|
15
14
|
import { ModalInner } from "./Modal.styles.js";
|
|
16
15
|
const WarningBox = styled.div`
|
|
17
|
-
background:
|
|
16
|
+
background: var(--stokr-status-error-bg);
|
|
18
17
|
border-radius: 4px;
|
|
19
18
|
padding: 10px;
|
|
20
19
|
display: flex;
|
|
@@ -45,16 +44,15 @@ const PaymentModal = ({
|
|
|
45
44
|
withTimer = false,
|
|
46
45
|
error,
|
|
47
46
|
secondsRemaining,
|
|
48
|
-
modalTitle = `SEND YOUR ${data?.tokenSymbolToSend}`,
|
|
47
|
+
modalTitle = `SEND YOUR ${data?.tokenSymbolToSend ?? "TOKENS"}`,
|
|
49
48
|
txTextInRed = true,
|
|
50
49
|
sendTokenTextRight = /* @__PURE__ */ jsxs("p", { children: [
|
|
51
50
|
"Send your ",
|
|
52
|
-
data?.tokenSymbolToSend,
|
|
51
|
+
data?.tokenSymbolToSend ?? "tokens",
|
|
53
52
|
" to the treasury wallet below."
|
|
54
53
|
] }),
|
|
55
54
|
numberOfSecuritiesText = "Redeem securities",
|
|
56
55
|
transactionCostMessage,
|
|
57
|
-
/** QR code content: the chain's payment URI (address, amount, asset). Without it the QR holds the treasury address. */
|
|
58
56
|
paymentLink,
|
|
59
57
|
investorWalletLabel = "Your wallet:",
|
|
60
58
|
treasuryWalletLabel = "Treasury wallet:",
|
|
@@ -65,7 +63,7 @@ const PaymentModal = ({
|
|
|
65
63
|
const treasuryWallet = data.treasuryWallet ?? projectData?.companyWallet;
|
|
66
64
|
const qrValue = paymentLink ?? treasuryWallet;
|
|
67
65
|
const txCostParagraphStyle = {
|
|
68
|
-
color: txTextInRed ?
|
|
66
|
+
color: txTextInRed ? "var(--stokr-status-error-text)" : "inherit"
|
|
69
67
|
};
|
|
70
68
|
const isKYCVerified = user?.kyc_status === "Accepted";
|
|
71
69
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
@@ -76,7 +74,7 @@ const PaymentModal = ({
|
|
|
76
74
|
/* @__PURE__ */ jsxs("p", { children: [
|
|
77
75
|
"Request date:",
|
|
78
76
|
" ",
|
|
79
|
-
/* @__PURE__ */ jsx("strong", { children: createdAt && !isNaN(new Date(createdAt)) ? formatInTimeZone(new Date(createdAt), "Europe/Berlin", "dd MMM yyyy - HH:mm zzz") : "—" })
|
|
77
|
+
/* @__PURE__ */ jsx("strong", { children: createdAt && !isNaN(new Date(createdAt).getTime()) ? formatInTimeZone(new Date(createdAt), "Europe/Berlin", "dd MMM yyyy - HH:mm zzz") : "—" })
|
|
80
78
|
] }),
|
|
81
79
|
/* @__PURE__ */ jsxs("p", { children: [
|
|
82
80
|
"Your securities: ",
|
|
@@ -87,7 +85,7 @@ const PaymentModal = ({
|
|
|
87
85
|
] }),
|
|
88
86
|
/* @__PURE__ */ jsx("p", { children: investorWalletLabel }),
|
|
89
87
|
/* @__PURE__ */ jsx(
|
|
90
|
-
|
|
88
|
+
CryptoAddress,
|
|
91
89
|
{
|
|
92
90
|
noHead: true,
|
|
93
91
|
data: { value: investorWallet, tooltip: true, shortAddress: true },
|
|
@@ -108,7 +106,7 @@ const PaymentModal = ({
|
|
|
108
106
|
] })
|
|
109
107
|
] })
|
|
110
108
|
] }),
|
|
111
|
-
withTimer && typeof secondsRemaining === "number" && secondsRemaining > 0 && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsxs("p", { style: { color:
|
|
109
|
+
withTimer && typeof secondsRemaining === "number" && secondsRemaining > 0 && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsxs("p", { style: { color: "var(--stokr-status-error-text)" }, children: [
|
|
112
110
|
formatInTimeZone(new Date(secondsRemaining * 1e3), "UTC", "mm:ss"),
|
|
113
111
|
" Waiting for payment..."
|
|
114
112
|
] }) }) }),
|
|
@@ -119,7 +117,7 @@ const PaymentModal = ({
|
|
|
119
117
|
transactionCostMessage != null && transactionCostMessage !== false && (React__default.isValidElement(transactionCostMessage) ? transactionCostMessage : /* @__PURE__ */ jsx("p", { style: txCostParagraphStyle, children: transactionCostMessage })),
|
|
120
118
|
isKYCVerified || !showKYCWarningBox ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
119
|
/* @__PURE__ */ jsx(
|
|
122
|
-
|
|
120
|
+
CryptoAddress,
|
|
123
121
|
{
|
|
124
122
|
title: treasuryWalletLabel,
|
|
125
123
|
data: {
|
|
@@ -133,8 +131,8 @@ const PaymentModal = ({
|
|
|
133
131
|
qrValue && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: qrValue, size: 150 }) })
|
|
134
132
|
] }) : /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
135
133
|
/* @__PURE__ */ jsxs(WarningBox, { children: [
|
|
136
|
-
/* @__PURE__ */ jsx(MaterialIcon, { name: "warning", size:
|
|
137
|
-
/* @__PURE__ */ jsxs("p", { style: { color:
|
|
134
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "warning", size: "xl", color: "var(--stokr-status-error-icon)" }),
|
|
135
|
+
/* @__PURE__ */ jsxs("p", { style: { color: "var(--stokr-status-error-text)" }, children: [
|
|
138
136
|
"Your KYC needs an update, please contact",
|
|
139
137
|
" ",
|
|
140
138
|
/* @__PURE__ */ jsx("a", { href: "mailto:compliance@stokr.io", style: { color: "inherit" }, children: "compliance@stokr.io" })
|