@stokr/components-library 4.2.6 → 5.0.0
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/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.d.ts +0 -1
- 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.d.ts +4 -10
- package/dist/components/Collapsible/Collapsible.js +14 -6
- package/dist/components/Collapsible/Collapsible.styles.d.ts +1 -3
- package/dist/components/Collapsible/Collapsible.styles.js +19 -36
- 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 +20 -15
- 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.js +18 -18
- package/dist/components/FAQ/FAQ.styles.d.ts +5 -12
- package/dist/components/FAQ/FAQ.styles.js +3 -61
- 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.js +1 -2
- package/dist/components/IdentityInfo/IdentityInfo.styles.d.ts +24 -0
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +6 -9
- package/dist/components/InfoBox/InfoBox.d.ts +20 -0
- package/dist/components/InfoBox/InfoBox.js +24 -78
- 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.d.ts +0 -3
- package/dist/components/Input/Input.js +3 -5
- package/dist/components/Input/Input.styles.d.ts +1 -4
- package/dist/components/Input/Input.styles.js +24 -77
- 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 +156 -80
- package/dist/components/Input/Select.styles.js +16 -118
- 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/MaterialIcon/requiredIcons.d.ts +1 -1
- package/dist/components/MaterialIcon/requiredIcons.js +0 -2
- 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/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 +23 -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/StokrLoader/StokrLoader.d.ts +9 -1
- package/dist/components/StokrLoader/StokrLoader.js +50 -19
- 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 +11 -27
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +57 -0
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +25 -107
- 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 +117 -122
- package/dist/index.js +50 -62
- package/dist/static/images/globe.svg.js +5 -0
- 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/static/images/trash.svg +17 -0
- package/dist/static/images/trash.svg.js +5 -0
- package/dist/utils/customHooks.d.ts +4 -4
- package/dist/utils/customHooks.js +6 -6
- package/package.json +16 -11
- package/dist/components/AddressItem/AddressItem.d.ts +0 -38
- package/dist/components/AddressItem/AddressItem.js +0 -51
- package/dist/components/AddressItem/AddressItem.styles.d.ts +0 -31
- package/dist/components/AddressItem/AddressItem.styles.js +0 -73
- package/dist/components/Country/FlagFor.d.ts +0 -9
- package/dist/components/Country/FlagFor.js +0 -25
- package/dist/components/Country/flagLoaders.d.ts +0 -5
- package/dist/components/Country/flagLoaders.js +0 -270
- package/dist/components/Country/flagStore.d.ts +0 -6
- package/dist/components/Country/flagStore.js +0 -29
- package/dist/components/FAQ/FAQ.d.ts +0 -29
- package/dist/components/Input/Select.d.ts +0 -57
- package/dist/components/Input/Select.styles.d.ts +0 -89
- package/dist/components/PanelCard/PanelCard.d.ts +0 -51
- package/dist/components/PanelCard/PanelCard.js +0 -35
- package/dist/components/PanelCard/PanelCard.styles.d.ts +0 -29
- package/dist/components/PanelCard/PanelCard.styles.js +0 -87
- package/dist/components/StepSidebar/MobileStepProgress.d.ts +0 -12
- package/dist/components/StepSidebar/MobileStepProgress.js +0 -14
- package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +0 -15
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +0 -42
- package/dist/components/StepSidebar/StepProgress.d.ts +0 -14
- package/dist/components/StepSidebar/StepProgress.js +0 -14
- package/dist/components/StepSidebar/StepProgress.styles.d.ts +0 -30
- package/dist/components/StepSidebar/StepProgress.styles.js +0 -103
- package/dist/components/StepSidebar/StepSidebar.d.ts +0 -36
- package/dist/components/StepSidebar/StepSidebar.js +0 -58
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +0 -54
- package/dist/components/StepSidebar/StepSidebar.styles.js +0 -175
- package/dist/constants/chainLogos.d.ts +0 -9
- package/dist/constants/chainLogos.js +0 -17
- package/dist/static/images/address-refreshing.gif.js +0 -4
- package/dist/static/images/chains/avalanche.svg +0 -7
- package/dist/static/images/chains/avalanche.svg.js +0 -4
- package/dist/static/images/chains/ethereum.svg +0 -14
- package/dist/static/images/chains/ethereum.svg.js +0 -4
- package/dist/static/images/chains/liquid.svg +0 -7
- package/dist/static/images/chains/liquid.svg.js +0 -4
- package/dist/static/images/chains/solana.svg +0 -29
- package/dist/static/images/chains/solana.svg.js +0 -4
- package/dist/static/images/chains/stellar.svg +0 -17
- package/dist/static/images/chains/stellar.svg.js +0 -4
- package/dist/static/images/chains/tempo.svg +0 -11
- package/dist/static/images/chains/tempo.svg.js +0 -4
- package/dist/static/images/process-waiting.gif.js +0 -4
- package/dist/styles/borderedField.d.ts +0 -11
- package/dist/styles/borderedField.js +0 -56
- 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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}, {
|
|
4
|
+
flex?: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const Row: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
7
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
8
|
+
}, {
|
|
9
|
+
center?: boolean;
|
|
10
|
+
right?: boolean;
|
|
11
|
+
spaceBetween?: boolean;
|
|
12
|
+
stretch?: boolean;
|
|
13
|
+
dashboard?: boolean;
|
|
14
|
+
nowrap?: boolean;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
main?: boolean;
|
|
17
|
+
isConfirmModal?: boolean;
|
|
18
|
+
}>> & string;
|
|
19
|
+
export declare const Column: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
20
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
21
|
+
}, {
|
|
22
|
+
halfWidth?: boolean;
|
|
23
|
+
textAlignHopper?: boolean;
|
|
24
|
+
center?: boolean;
|
|
25
|
+
alignCenter?: boolean;
|
|
26
|
+
alignRight?: boolean;
|
|
27
|
+
spaceBetween?: boolean;
|
|
28
|
+
flexEnd?: boolean;
|
|
29
|
+
mainRelative?: boolean;
|
|
30
|
+
isConfirmModal?: boolean;
|
|
31
|
+
/** Column count out of `full` (default 16), applied from the Medium breakpoint. */
|
|
32
|
+
part?: number;
|
|
33
|
+
full?: number;
|
|
34
|
+
mainFixed?: boolean;
|
|
35
|
+
withBorder?: boolean;
|
|
36
|
+
}>> & string;
|
|
37
|
+
export declare const PageWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
38
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
39
|
+
}> & string;
|
|
40
|
+
export declare const FlexContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
41
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
42
|
+
}, {
|
|
43
|
+
itemsCenter?: boolean;
|
|
44
|
+
}>> & string;
|
|
45
|
+
export declare const FlexGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
46
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
47
|
+
}, {
|
|
48
|
+
borderBottom?: boolean;
|
|
49
|
+
}>> & string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import grid from "../../styles/grid.js";
|
|
3
|
-
import
|
|
4
|
-
import theme from "../../styles/theme.js";
|
|
5
|
-
import spacing from "../../styles/spacing.js";
|
|
3
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
6
4
|
const Wrapper = styled.div.withConfig({
|
|
7
5
|
shouldForwardProp: (props) => !["flex"].includes(props)
|
|
8
6
|
})`
|
|
@@ -58,11 +56,11 @@ const Row = styled.div.withConfig({
|
|
|
58
56
|
width: 100%;
|
|
59
57
|
`}
|
|
60
58
|
|
|
61
|
-
${
|
|
59
|
+
${breakpoint.MLarge`
|
|
62
60
|
${(props) => props.main && `
|
|
63
61
|
z-index: 0;
|
|
64
|
-
min-height: calc(100vh -
|
|
65
|
-
padding-top:
|
|
62
|
+
min-height: calc(100vh - var(--stokr-layout-footer-height));
|
|
63
|
+
padding-top: var(--stokr-layout-header-height);
|
|
66
64
|
`}
|
|
67
65
|
`}
|
|
68
66
|
|
|
@@ -85,38 +83,37 @@ const Column = styled.div.withConfig({
|
|
|
85
83
|
"withBorder"
|
|
86
84
|
].includes(props)
|
|
87
85
|
})`
|
|
86
|
+
box-sizing: border-box;
|
|
88
87
|
display: flex;
|
|
89
88
|
flex-direction: column;
|
|
90
89
|
width: 100%;
|
|
91
90
|
|
|
92
|
-
${(props) => props.halfWidth && `
|
|
93
|
-
|
|
91
|
+
${(props) => props.halfWidth && css`
|
|
92
|
+
width: 50%;
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`}
|
|
100
|
-
|
|
101
|
-
${(props) => props.textAlignHopper && `
|
|
102
|
-
> div:last-child {
|
|
103
|
-
text-align:right;
|
|
104
|
-
}
|
|
94
|
+
${breakpoint.below.Mobile`
|
|
95
|
+
width: 100%;
|
|
96
|
+
`}
|
|
97
|
+
`}
|
|
105
98
|
|
|
106
|
-
|
|
99
|
+
${(props) => props.textAlignHopper && css`
|
|
107
100
|
> div:last-child {
|
|
108
|
-
text-align:
|
|
101
|
+
text-align: right;
|
|
109
102
|
}
|
|
110
|
-
}
|
|
111
103
|
|
|
112
|
-
|
|
113
|
-
> div
|
|
114
|
-
|
|
115
|
-
margin-top: 1rem;
|
|
104
|
+
${breakpoint.below.Medium`
|
|
105
|
+
> div:last-child {
|
|
106
|
+
text-align:left;
|
|
116
107
|
}
|
|
117
|
-
}
|
|
108
|
+
`}
|
|
118
109
|
|
|
119
|
-
|
|
110
|
+
${breakpoint.below.Mobile`
|
|
111
|
+
> div > div {
|
|
112
|
+
justify-content: left;
|
|
113
|
+
margin-top: 10px;
|
|
114
|
+
}
|
|
115
|
+
`}
|
|
116
|
+
`}
|
|
120
117
|
|
|
121
118
|
${(props) => props.center && `
|
|
122
119
|
justify-content: center;
|
|
@@ -143,36 +140,36 @@ const Column = styled.div.withConfig({
|
|
|
143
140
|
padding: 18px 0 28px;
|
|
144
141
|
`}
|
|
145
142
|
|
|
146
|
-
${(props) => props.isConfirmModal && `
|
|
147
|
-
|
|
148
|
-
|
|
143
|
+
${(props) => props.isConfirmModal && css`
|
|
144
|
+
justify-content: center;
|
|
145
|
+
overflow: hidden;
|
|
149
146
|
|
|
150
|
-
|
|
147
|
+
${breakpoint.below.Medium`
|
|
151
148
|
height: 100vh;
|
|
152
|
-
}
|
|
153
|
-
|
|
149
|
+
`}
|
|
150
|
+
`}
|
|
154
151
|
|
|
155
|
-
${
|
|
152
|
+
${breakpoint.Medium`
|
|
156
153
|
${(props) => props.part && `
|
|
157
154
|
width: ${grid(props.part, props.full || 16)};
|
|
158
155
|
`}
|
|
159
156
|
|
|
160
157
|
${(props) => props.mainFixed && `
|
|
161
158
|
position: fixed;
|
|
162
|
-
top:
|
|
159
|
+
top: var(--stokr-layout-header-height);
|
|
163
160
|
left: 0;
|
|
164
|
-
height: calc(100% -
|
|
161
|
+
height: calc(100% - var(--stokr-layout-header-height));
|
|
165
162
|
`}
|
|
166
163
|
|
|
167
164
|
${(props) => props.mainRelative && `
|
|
168
165
|
position: relative;
|
|
169
166
|
margin-left: ${grid((props.full || 16) - props.part, props.full || 16)};
|
|
170
|
-
border-left: 1px solid
|
|
167
|
+
border-left: 1px solid var(--stokr-border-subtle);
|
|
171
168
|
//padding: 54px 0 42px;
|
|
172
169
|
`}
|
|
173
170
|
|
|
174
171
|
${(props) => props.withBorder && `
|
|
175
|
-
border-left: 1px solid
|
|
172
|
+
border-left: 1px solid var(--stokr-border-subtle);
|
|
176
173
|
`}
|
|
177
174
|
`}
|
|
178
175
|
`;
|
|
@@ -199,7 +196,7 @@ const FlexGrid = styled.div.withConfig({
|
|
|
199
196
|
flex-wrap: wrap;
|
|
200
197
|
|
|
201
198
|
${(props) => props.borderBottom && `
|
|
202
|
-
border-bottom: 1px solid
|
|
199
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
203
200
|
`}
|
|
204
201
|
`;
|
|
205
202
|
export {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import "../Country/CountrySelect.js";
|
|
4
|
+
import { FlagFor } from "../Country/CountrySelect.js";
|
|
5
5
|
import { CountryRowRoot, FlagSlot, CountryCode, ResidencyItemRoot, FieldLabel, FieldValue, SectionHeaderRoot, SectionHeaderIconWrap } from "./IdentityInfo.styles.js";
|
|
6
|
-
import { FlagFor } from "../Country/FlagFor.js";
|
|
7
6
|
const IdentitySectionHeader = ({ icon, count, children, style, className }) => /* @__PURE__ */ jsxs(SectionHeaderRoot, { style, className, children: [
|
|
8
7
|
icon && /* @__PURE__ */ jsx(SectionHeaderIconWrap, { children: icon }),
|
|
9
8
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const SectionHeaderRoot: 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 SectionHeaderIconWrap: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const FieldLabel: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
|
|
8
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
9
|
+
}> & string;
|
|
10
|
+
export declare const FieldValue: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
|
|
11
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
12
|
+
}> & string;
|
|
13
|
+
export declare const CountryRowRoot: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}> & string;
|
|
16
|
+
export declare const FlagSlot: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
17
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
18
|
+
}> & string;
|
|
19
|
+
export declare const CountryCode: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
20
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
21
|
+
}> & string;
|
|
22
|
+
export declare const ResidencyItemRoot: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
23
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
24
|
+
}> & string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import { colors } from "../../styles/colors.js";
|
|
3
2
|
const SectionHeaderRoot = styled.div`
|
|
4
3
|
display: flex;
|
|
5
4
|
align-items: center;
|
|
6
5
|
gap: 8px;
|
|
7
|
-
color:
|
|
6
|
+
color: var(--stokr-action-accent-bg);
|
|
8
7
|
font-size: 16px;
|
|
9
8
|
line-height: 24px;
|
|
10
9
|
font-weight: 600;
|
|
@@ -17,11 +16,9 @@ const SectionHeaderIconWrap = styled.span`
|
|
|
17
16
|
justify-content: center;
|
|
18
17
|
flex-shrink: 0;
|
|
19
18
|
|
|
20
|
-
> svg
|
|
21
|
-
> img {
|
|
19
|
+
> svg {
|
|
22
20
|
width: 18px;
|
|
23
21
|
height: 18px;
|
|
24
|
-
object-fit: contain;
|
|
25
22
|
}
|
|
26
23
|
`;
|
|
27
24
|
const FieldLabel = styled.p`
|
|
@@ -30,7 +27,7 @@ const FieldLabel = styled.p`
|
|
|
30
27
|
line-height: 20px;
|
|
31
28
|
letter-spacing: 2px;
|
|
32
29
|
text-transform: uppercase;
|
|
33
|
-
color:
|
|
30
|
+
color: var(--stokr-text-primary);
|
|
34
31
|
font-weight: 400;
|
|
35
32
|
`;
|
|
36
33
|
const FieldValue = styled.p`
|
|
@@ -38,7 +35,7 @@ const FieldValue = styled.p`
|
|
|
38
35
|
font-size: 14px;
|
|
39
36
|
line-height: 20px;
|
|
40
37
|
font-weight: 600;
|
|
41
|
-
color:
|
|
38
|
+
color: var(--stokr-text-primary);
|
|
42
39
|
letter-spacing: 0.5px;
|
|
43
40
|
`;
|
|
44
41
|
const CountryRowRoot = styled.div`
|
|
@@ -49,7 +46,7 @@ const CountryRowRoot = styled.div`
|
|
|
49
46
|
font-size: 14px;
|
|
50
47
|
line-height: 20px;
|
|
51
48
|
font-weight: 600;
|
|
52
|
-
color:
|
|
49
|
+
color: var(--stokr-text-primary);
|
|
53
50
|
letter-spacing: 0.5px;
|
|
54
51
|
`;
|
|
55
52
|
const FlagSlot = styled.span`
|
|
@@ -64,7 +61,7 @@ const FlagSlot = styled.span`
|
|
|
64
61
|
const CountryCode = styled.span`
|
|
65
62
|
font-family: monospace;
|
|
66
63
|
font-size: 12px;
|
|
67
|
-
color:
|
|
64
|
+
color: var(--stokr-text-tertiary);
|
|
68
65
|
margin-left: auto;
|
|
69
66
|
`;
|
|
70
67
|
const ResidencyItemRoot = styled.div`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
/** The kit's statuses; each maps to its `--stokr-status-<variant>-*` tokens. */
|
|
3
|
+
export type InfoBoxVariant = 'warning' | 'info' | 'error' | 'success';
|
|
4
|
+
export interface InfoBoxProps {
|
|
5
|
+
/** Kit status: sets the background, left bar, icon and text colours. */
|
|
6
|
+
variant?: InfoBoxVariant;
|
|
7
|
+
/** Content to display (supports mixed bold/normal text via JSX). */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/** Custom icon node; when provided, replaces the default circled "i". */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** Optional inline styles for the container. */
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
/** Optional className for the container. */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Hides the coloured bar on the left edge. */
|
|
16
|
+
noLeftBorder?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** InfoBox - A flexible alert/info banner with variant support. */
|
|
19
|
+
export declare const InfoBox: ({ variant, children, icon, style, className, noLeftBorder }: InfoBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default InfoBox;
|
|
@@ -1,54 +1,24 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import styled from "styled-components";
|
|
4
|
-
import { colors } from "../../styles/colors.js";
|
|
5
|
-
import { typography } from "../../styles/typography.js";
|
|
6
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
7
|
-
|
|
8
|
-
const BANNER = { padding: "12px 20px 12px 16px", gap: "12px", align: "center", leftBorder: true };
|
|
9
|
-
const VARIANTS = {
|
|
10
|
-
warning: {
|
|
11
|
-
...BANNER,
|
|
12
|
-
background: "#FFFBEB",
|
|
13
|
-
border: colors.warningYellow,
|
|
14
|
-
iconColor: colors.warningYellow
|
|
15
|
-
},
|
|
16
|
-
info: {
|
|
17
|
-
...BANNER,
|
|
18
|
-
background: "#F8FAFC",
|
|
19
|
-
border: colors.blueDark,
|
|
20
|
-
iconColor: colors.blueDark
|
|
21
|
-
},
|
|
22
|
-
error: {
|
|
23
|
-
...BANNER,
|
|
24
|
-
background: "#FDEDEC",
|
|
25
|
-
border: colors.darkRed,
|
|
26
|
-
iconColor: colors.darkRed
|
|
27
|
-
},
|
|
28
|
-
/** Figma "InfoBox" done state: green surface, bold check, no left border, top-aligned. */
|
|
29
|
-
success: {
|
|
30
|
-
padding: "12px",
|
|
31
|
-
gap: "8px",
|
|
32
|
-
align: "flex-start",
|
|
33
|
-
leftBorder: false,
|
|
34
|
-
background: colors.successSurface,
|
|
35
|
-
border: colors.freshGreen,
|
|
36
|
-
iconColor: colors.freshGreen
|
|
37
|
-
}
|
|
38
|
-
};
|
|
4
|
+
const status = (variant, part) => `var(--stokr-status-${variant}-${part})`;
|
|
39
5
|
const Container = styled.div`
|
|
40
6
|
position: relative;
|
|
41
7
|
display: flex;
|
|
42
8
|
overflow: hidden;
|
|
43
|
-
align-items:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 12px;
|
|
12
|
+
padding: 12px 20px 12px 16px;
|
|
13
|
+
background: ${(props) => status(props.$variant, "bg")};
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
line-height: 18px;
|
|
17
|
+
letter-spacing: 0.6px;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
color: ${(props) => status(props.$variant, "text")};
|
|
50
20
|
|
|
51
|
-
${(props) => props.$
|
|
21
|
+
${(props) => !props.$noLeftBorder && `
|
|
52
22
|
&:before {
|
|
53
23
|
content: '';
|
|
54
24
|
display: block;
|
|
@@ -56,7 +26,7 @@ const Container = styled.div`
|
|
|
56
26
|
position: absolute;
|
|
57
27
|
height: 100%;
|
|
58
28
|
left: 0px;
|
|
59
|
-
background: ${props.$border};
|
|
29
|
+
background: ${status(props.$variant, "border")};
|
|
60
30
|
}
|
|
61
31
|
`}
|
|
62
32
|
`;
|
|
@@ -67,14 +37,9 @@ const DefaultIcon = styled.span.attrs({
|
|
|
67
37
|
flex-shrink: 0;
|
|
68
38
|
font-size: 18px;
|
|
69
39
|
line-height: 18px;
|
|
70
|
-
color: ${(props) => props.$
|
|
40
|
+
color: ${(props) => status(props.$variant, "icon")};
|
|
71
41
|
margin-top: 1px;
|
|
72
42
|
`;
|
|
73
|
-
const SuccessIcon = styled.span`
|
|
74
|
-
display: inline-flex;
|
|
75
|
-
flex-shrink: 0;
|
|
76
|
-
color: var(--info-box-icon-color, ${colors.freshGreen});
|
|
77
|
-
`;
|
|
78
43
|
const CustomIconWrapper = styled.span`
|
|
79
44
|
flex-shrink: 0;
|
|
80
45
|
display: flex;
|
|
@@ -86,37 +51,18 @@ const Content = styled.div`
|
|
|
86
51
|
flex: 1;
|
|
87
52
|
min-width: 0;
|
|
88
53
|
`;
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
`;
|
|
92
|
-
const InfoBox = ({ variant = "warning", title, children, icon, noLeftBorder, ...rest }) => {
|
|
93
|
-
const theme = VARIANTS[variant] || VARIANTS.warning;
|
|
54
|
+
const InfoBox = ({ variant = "warning", children, icon, style, className, noLeftBorder }) => {
|
|
55
|
+
const resolved = ["warning", "info", "error", "success"].includes(variant) ? variant : "warning";
|
|
94
56
|
const renderIcon = () => {
|
|
95
|
-
if (icon)
|
|
96
|
-
|
|
97
|
-
return /* @__PURE__ */ jsx(SuccessIcon, { children: /* @__PURE__ */ jsx(MaterialIcon, { name: "check", weight: 600, size: 20 }) });
|
|
57
|
+
if (icon) {
|
|
58
|
+
return /* @__PURE__ */ jsx(CustomIconWrapper, { children: icon });
|
|
98
59
|
}
|
|
99
|
-
return /* @__PURE__ */ jsx(DefaultIcon, { $
|
|
60
|
+
return /* @__PURE__ */ jsx(DefaultIcon, { $variant: resolved });
|
|
100
61
|
};
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
$bg: theme.background,
|
|
106
|
-
$border: theme.border,
|
|
107
|
-
$padding: theme.padding,
|
|
108
|
-
$gap: theme.gap,
|
|
109
|
-
$align: theme.align,
|
|
110
|
-
$leftBorder: theme.leftBorder && !noLeftBorder,
|
|
111
|
-
children: [
|
|
112
|
-
renderIcon(),
|
|
113
|
-
/* @__PURE__ */ jsxs(Content, { children: [
|
|
114
|
-
title != null && /* @__PURE__ */ jsx(Title, { children: title }),
|
|
115
|
-
children
|
|
116
|
-
] })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
);
|
|
62
|
+
return /* @__PURE__ */ jsxs(Container, { $variant: resolved, $noLeftBorder: noLeftBorder, style, className, children: [
|
|
63
|
+
renderIcon(),
|
|
64
|
+
/* @__PURE__ */ jsx(Content, { children })
|
|
65
|
+
] });
|
|
120
66
|
};
|
|
121
67
|
export {
|
|
122
68
|
InfoBox
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import theme from "../../styles/theme.js";
|
|
3
2
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
4
3
|
const CONTAINER_OWN_PROPS = ["noMargin", "noMarginLeft", "noMarginRight", "fullWidth"];
|
|
5
4
|
const Container = styled.div.withConfig({
|
|
@@ -35,11 +34,11 @@ const Icon = styled.span.withConfig({
|
|
|
35
34
|
vertical-align: middle;
|
|
36
35
|
font-size: 16px;
|
|
37
36
|
line-height: 16px;
|
|
38
|
-
color:
|
|
37
|
+
color: var(--stokr-text-tertiary);
|
|
39
38
|
transition: color 0.2s;
|
|
40
39
|
|
|
41
40
|
&:hover {
|
|
42
|
-
color:
|
|
41
|
+
color: var(--stokr-action-accent-bg);
|
|
43
42
|
}
|
|
44
43
|
`;
|
|
45
44
|
export {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropsBase } from 'react-day-picker';
|
|
2
|
+
export interface DatePickerInputProps extends Omit<PropsBase, 'mode' | 'required'> {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
/** Floating label above the field. */
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** Shown as an error state once `touched` is true. */
|
|
9
|
+
error?: boolean;
|
|
10
|
+
touched?: boolean;
|
|
11
|
+
/** Date, or anything `new Date()` accepts (ISO string). */
|
|
12
|
+
value?: string | Date;
|
|
13
|
+
/** Called with the parsed date (or `undefined` once cleared) and `{ name, value }`. */
|
|
14
|
+
onChange?: (date: Date | undefined, meta: {
|
|
15
|
+
name?: string;
|
|
16
|
+
value: Date | undefined;
|
|
17
|
+
}) => void;
|
|
18
|
+
/** Dashboard styling. */
|
|
19
|
+
dashboard?: boolean;
|
|
20
|
+
/** date-fns format used to display and parse the date. */
|
|
21
|
+
dateFormat?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const DatePickerInput: (props: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default DatePickerInput;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
3
|
import { isValid, format, parse } from "date-fns";
|
|
5
4
|
import { DayPicker } from "react-day-picker";
|
|
5
|
+
import "react-day-picker/style.css";
|
|
6
6
|
import { Wrapper, Label } from "./Input.styles.js";
|
|
7
7
|
import { DatePickerOverlay, InputWrapper, DateInput, ClearButton } from "./DatePickerInput.styles.js";
|
|
8
8
|
import { useComponentVisible } from "../../utils/customHooks.js";
|
|
@@ -103,6 +103,7 @@ const DatePickerInput = (props) => {
|
|
|
103
103
|
onFocus: handleInputFocus,
|
|
104
104
|
onBlur: handleInputBlur,
|
|
105
105
|
dashboard,
|
|
106
|
+
hasLabel: Boolean(label),
|
|
106
107
|
autoComplete: "off"
|
|
107
108
|
}
|
|
108
109
|
),
|
|
@@ -122,18 +123,6 @@ const DatePickerInput = (props) => {
|
|
|
122
123
|
] })
|
|
123
124
|
] });
|
|
124
125
|
};
|
|
125
|
-
DatePickerInput.propTypes = {
|
|
126
|
-
id: PropTypes.string,
|
|
127
|
-
name: PropTypes.string,
|
|
128
|
-
label: PropTypes.string,
|
|
129
|
-
placeholder: PropTypes.string,
|
|
130
|
-
error: PropTypes.bool,
|
|
131
|
-
touched: PropTypes.bool,
|
|
132
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
|
|
133
|
-
onChange: PropTypes.func,
|
|
134
|
-
dashboard: PropTypes.bool,
|
|
135
|
-
dateFormat: PropTypes.string
|
|
136
|
-
};
|
|
137
126
|
export {
|
|
138
127
|
DatePickerInput
|
|
139
128
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const InputWrapper: 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 ClearButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}, {
|
|
7
|
+
dashboard?: boolean;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const DateInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
10
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
11
|
+
}, {
|
|
12
|
+
dashboard?: boolean;
|
|
13
|
+
hasLabel?: boolean;
|
|
14
|
+
}>> & string;
|
|
15
|
+
export declare const DatePickerOverlay: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
16
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
17
|
+
}> & string;
|
|
18
|
+
export default DatePickerOverlay;
|