@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,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 {
|
|
@@ -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;
|
|
@@ -30,7 +29,7 @@ const FieldLabel = styled.p`
|
|
|
30
29
|
line-height: 20px;
|
|
31
30
|
letter-spacing: 2px;
|
|
32
31
|
text-transform: uppercase;
|
|
33
|
-
color:
|
|
32
|
+
color: var(--stokr-text-primary);
|
|
34
33
|
font-weight: 400;
|
|
35
34
|
`;
|
|
36
35
|
const FieldValue = styled.p`
|
|
@@ -38,7 +37,7 @@ const FieldValue = styled.p`
|
|
|
38
37
|
font-size: 14px;
|
|
39
38
|
line-height: 20px;
|
|
40
39
|
font-weight: 600;
|
|
41
|
-
color:
|
|
40
|
+
color: var(--stokr-text-primary);
|
|
42
41
|
letter-spacing: 0.5px;
|
|
43
42
|
`;
|
|
44
43
|
const CountryRowRoot = styled.div`
|
|
@@ -49,7 +48,7 @@ const CountryRowRoot = styled.div`
|
|
|
49
48
|
font-size: 14px;
|
|
50
49
|
line-height: 20px;
|
|
51
50
|
font-weight: 600;
|
|
52
|
-
color:
|
|
51
|
+
color: var(--stokr-text-primary);
|
|
53
52
|
letter-spacing: 0.5px;
|
|
54
53
|
`;
|
|
55
54
|
const FlagSlot = styled.span`
|
|
@@ -64,7 +63,7 @@ const FlagSlot = styled.span`
|
|
|
64
63
|
const CountryCode = styled.span`
|
|
65
64
|
font-family: monospace;
|
|
66
65
|
font-size: 12px;
|
|
67
|
-
color:
|
|
66
|
+
color: var(--stokr-text-tertiary);
|
|
68
67
|
margin-left: auto;
|
|
69
68
|
`;
|
|
70
69
|
const ResidencyItemRoot = styled.div`
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLAttributes, 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 extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
5
|
+
/** Kit status: sets the background, left bar, icon and text colours. `success` is the Figma done state. */
|
|
6
|
+
variant?: InfoBoxVariant;
|
|
7
|
+
/** Optional bold first line above `children`. */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** Content to display (supports mixed bold/normal text via JSX). */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** Custom icon node; replaces the variant's default icon. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** Hides the coloured bar on the left edge (`success` never has one). */
|
|
14
|
+
noLeftBorder?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* InfoBox - A flexible alert/info banner with variant support. Other props (`className`, `style`, `data-*`…) go to the
|
|
18
|
+
* container. CSS custom properties: `--info-box-padding`, `--info-box-gap`, `--info-box-background`,
|
|
19
|
+
* `--info-box-radius`, `--info-box-icon-color` (success icon).
|
|
20
|
+
*/
|
|
21
|
+
export declare const InfoBox: ({ variant, title, children, icon, noLeftBorder, ...rest }: InfoBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default InfoBox;
|
|
@@ -1,52 +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
4
|
import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
|
|
5
|
+
const status = (variant, part) => `var(--stokr-status-${variant}-${part})`;
|
|
8
6
|
const BANNER = { padding: "12px 20px 12px 16px", gap: "12px", align: "center", leftBorder: true };
|
|
9
|
-
const
|
|
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
|
-
};
|
|
7
|
+
const SUCCESS = { padding: "12px", gap: "8px", align: "flex-start", leftBorder: false };
|
|
39
8
|
const Container = styled.div`
|
|
40
9
|
position: relative;
|
|
41
10
|
display: flex;
|
|
42
11
|
overflow: hidden;
|
|
43
|
-
align-items: ${(props) => props.$align};
|
|
44
|
-
gap: var(--info-box-gap, ${(props) => props.$gap});
|
|
45
|
-
padding: var(--info-box-padding, ${(props) => props.$padding});
|
|
46
|
-
background: var(--info-box-background, ${(props) => props.$bg});
|
|
12
|
+
align-items: ${(props) => props.$layout.align};
|
|
13
|
+
gap: var(--info-box-gap, ${(props) => props.$layout.gap});
|
|
14
|
+
padding: var(--info-box-padding, ${(props) => props.$layout.padding});
|
|
15
|
+
background: var(--info-box-background, ${(props) => status(props.$variant, "bg")});
|
|
47
16
|
border-radius: var(--info-box-radius, 8px);
|
|
48
|
-
|
|
49
|
-
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
line-height: 18px;
|
|
19
|
+
letter-spacing: 0.6px;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
color: ${(props) => status(props.$variant, "text")};
|
|
50
22
|
|
|
51
23
|
${(props) => props.$leftBorder && `
|
|
52
24
|
&:before {
|
|
@@ -56,7 +28,7 @@ const Container = styled.div`
|
|
|
56
28
|
position: absolute;
|
|
57
29
|
height: 100%;
|
|
58
30
|
left: 0px;
|
|
59
|
-
background: ${props.$border};
|
|
31
|
+
background: ${status(props.$variant, "border")};
|
|
60
32
|
}
|
|
61
33
|
`}
|
|
62
34
|
`;
|
|
@@ -67,13 +39,13 @@ const DefaultIcon = styled.span.attrs({
|
|
|
67
39
|
flex-shrink: 0;
|
|
68
40
|
font-size: 18px;
|
|
69
41
|
line-height: 18px;
|
|
70
|
-
color: ${(props) => props.$
|
|
42
|
+
color: ${(props) => status(props.$variant, "icon")};
|
|
71
43
|
margin-top: 1px;
|
|
72
44
|
`;
|
|
73
45
|
const SuccessIcon = styled.span`
|
|
74
46
|
display: inline-flex;
|
|
75
47
|
flex-shrink: 0;
|
|
76
|
-
color: var(--info-box-icon-color, ${
|
|
48
|
+
color: var(--info-box-icon-color, ${status("success", "icon")});
|
|
77
49
|
`;
|
|
78
50
|
const CustomIconWrapper = styled.span`
|
|
79
51
|
flex-shrink: 0;
|
|
@@ -87,36 +59,25 @@ const Content = styled.div`
|
|
|
87
59
|
min-width: 0;
|
|
88
60
|
`;
|
|
89
61
|
const Title = styled.div`
|
|
90
|
-
|
|
62
|
+
font-weight: 600;
|
|
91
63
|
`;
|
|
92
64
|
const InfoBox = ({ variant = "warning", title, children, icon, noLeftBorder, ...rest }) => {
|
|
93
|
-
const
|
|
65
|
+
const resolved = ["warning", "info", "error", "success"].includes(variant) ? variant : "warning";
|
|
66
|
+
const layout = resolved === "success" ? SUCCESS : BANNER;
|
|
94
67
|
const renderIcon = () => {
|
|
95
68
|
if (icon) return /* @__PURE__ */ jsx(CustomIconWrapper, { children: icon });
|
|
96
|
-
if (
|
|
69
|
+
if (resolved === "success") {
|
|
97
70
|
return /* @__PURE__ */ jsx(SuccessIcon, { children: /* @__PURE__ */ jsx(MaterialIcon, { name: "check", weight: 600, size: 20 }) });
|
|
98
71
|
}
|
|
99
|
-
return /* @__PURE__ */ jsx(DefaultIcon, { $
|
|
72
|
+
return /* @__PURE__ */ jsx(DefaultIcon, { $variant: resolved });
|
|
100
73
|
};
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
);
|
|
74
|
+
return /* @__PURE__ */ jsxs(Container, { ...rest, $variant: resolved, $layout: layout, $leftBorder: layout.leftBorder && !noLeftBorder, children: [
|
|
75
|
+
renderIcon(),
|
|
76
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
77
|
+
title != null && /* @__PURE__ */ jsx(Title, { children: title }),
|
|
78
|
+
children
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
120
81
|
};
|
|
121
82
|
export {
|
|
122
83
|
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;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import theme from "../../styles/theme.js";
|
|
3
|
-
import { colors } from "../../styles/colors.js";
|
|
4
2
|
const InputWrapper = styled.div`
|
|
5
3
|
position: relative;
|
|
6
4
|
display: flex;
|
|
@@ -18,14 +16,14 @@ const ClearButton = styled.button.withConfig({
|
|
|
18
16
|
cursor: pointer;
|
|
19
17
|
padding: 4px 8px;
|
|
20
18
|
font-size: 16px;
|
|
21
|
-
color:
|
|
19
|
+
color: var(--stokr-text-tertiary);
|
|
22
20
|
line-height: 1;
|
|
23
21
|
display: flex;
|
|
24
22
|
align-items: center;
|
|
25
23
|
justify-content: center;
|
|
26
24
|
|
|
27
25
|
&:hover {
|
|
28
|
-
color:
|
|
26
|
+
color: var(--stokr-text-primary);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
${(props) => props.dashboard && css`
|
|
@@ -35,9 +33,9 @@ const ClearButton = styled.button.withConfig({
|
|
|
35
33
|
`}
|
|
36
34
|
`;
|
|
37
35
|
const DateInput = styled.input.withConfig({
|
|
38
|
-
shouldForwardProp: (props) => !["dashboard"].includes(props)
|
|
36
|
+
shouldForwardProp: (props) => !["dashboard", "hasLabel"].includes(props)
|
|
39
37
|
})`
|
|
40
|
-
font-family:
|
|
38
|
+
font-family: var(--stokr-font-family-base);
|
|
41
39
|
display: block;
|
|
42
40
|
width: 100%;
|
|
43
41
|
height: 40px;
|
|
@@ -51,8 +49,8 @@ const DateInput = styled.input.withConfig({
|
|
|
51
49
|
outline: 0;
|
|
52
50
|
border: 0;
|
|
53
51
|
border-top: 1px solid transparent;
|
|
54
|
-
border-bottom: 1px solid
|
|
55
|
-
color:
|
|
52
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
53
|
+
color: var(--stokr-text-primary);
|
|
56
54
|
background-color: transparent;
|
|
57
55
|
transition: border-color 0.2s;
|
|
58
56
|
|
|
@@ -60,7 +58,7 @@ const DateInput = styled.input.withConfig({
|
|
|
60
58
|
&:hover {
|
|
61
59
|
box-shadow: none;
|
|
62
60
|
border-top-color: transparent;
|
|
63
|
-
border-bottom-color:
|
|
61
|
+
border-bottom-color: var(--stokr-border-focus);
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
&::placeholder {
|
|
@@ -72,18 +70,23 @@ const DateInput = styled.input.withConfig({
|
|
|
72
70
|
border: 0;
|
|
73
71
|
padding: 0;
|
|
74
72
|
height: 22px;
|
|
75
|
-
font-family:
|
|
73
|
+
font-family: var(--stokr-font-family-base);
|
|
76
74
|
font-weight: 300;
|
|
77
75
|
font-size: 14px;
|
|
78
76
|
line-height: 22px;
|
|
79
77
|
letter-spacing: 0.53px;
|
|
80
78
|
text-transform: normal;
|
|
81
|
-
color:
|
|
79
|
+
color: var(--stokr-text-primary);
|
|
82
80
|
|
|
83
81
|
&::placeholder {
|
|
84
|
-
color:
|
|
82
|
+
color: var(--stokr-text-tertiary);
|
|
85
83
|
opacity: 1;
|
|
86
84
|
}
|
|
85
|
+
|
|
86
|
+
/* The floating label sits above the value once it is up: leave it its own row. */
|
|
87
|
+
${props.hasLabel && css`
|
|
88
|
+
padding-top: 14px;
|
|
89
|
+
`}
|
|
87
90
|
`}
|
|
88
91
|
`;
|
|
89
92
|
const DatePickerOverlay = styled.div`
|
|
@@ -92,7 +95,7 @@ const DatePickerOverlay = styled.div`
|
|
|
92
95
|
.rdp {
|
|
93
96
|
position: absolute;
|
|
94
97
|
z-index: 20;
|
|
95
|
-
background-color:
|
|
98
|
+
background-color: var(--stokr-background-surface-raised);
|
|
96
99
|
margin: 0;
|
|
97
100
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
98
101
|
padding: 12px;
|
|
@@ -100,13 +103,13 @@ const DatePickerOverlay = styled.div`
|
|
|
100
103
|
min-width: fit-content;
|
|
101
104
|
|
|
102
105
|
/* v9 CSS Variables */
|
|
103
|
-
--rdp-accent-color:
|
|
104
|
-
--rdp-accent-background-color:
|
|
106
|
+
--rdp-accent-color: var(--stokr-action-accent-bg);
|
|
107
|
+
--rdp-accent-background-color: var(--stokr-action-accent-bg);
|
|
105
108
|
--rdp-day-height: 32px;
|
|
106
109
|
--rdp-day-width: 32px;
|
|
107
|
-
--rdp-selected-font: 600 13px
|
|
108
|
-
--rdp-weekday-font: 600 11px
|
|
109
|
-
--rdp-font-family:
|
|
110
|
+
--rdp-selected-font: 600 13px var(--stokr-font-family-base);
|
|
111
|
+
--rdp-weekday-font: 600 11px var(--stokr-font-family-base);
|
|
112
|
+
--rdp-font-family: var(--stokr-font-family-base);
|
|
110
113
|
|
|
111
114
|
/* Remove outline on selected */
|
|
112
115
|
--rdp-selected-border: none;
|
|
@@ -122,8 +125,8 @@ const DatePickerOverlay = styled.div`
|
|
|
122
125
|
/* Selected day - filled blue circle */
|
|
123
126
|
.rdp-selected .rdp-day_button,
|
|
124
127
|
.rdp-day_button[aria-selected='true'] {
|
|
125
|
-
background-color:
|
|
126
|
-
color:
|
|
128
|
+
background-color: var(--stokr-action-accent-bg) !important;
|
|
129
|
+
color: var(--stokr-action-accent-text) !important;
|
|
127
130
|
border: none !important;
|
|
128
131
|
outline: none !important;
|
|
129
132
|
}
|
|
@@ -131,7 +134,7 @@ const DatePickerOverlay = styled.div`
|
|
|
131
134
|
/* Today's date */
|
|
132
135
|
.rdp-today:not(.rdp-selected) .rdp-day_button {
|
|
133
136
|
font-weight: 700;
|
|
134
|
-
color:
|
|
137
|
+
color: var(--stokr-action-accent-bg);
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
/* Weekday headers - uppercase */
|
|
@@ -139,7 +142,7 @@ const DatePickerOverlay = styled.div`
|
|
|
139
142
|
font-size: 11px;
|
|
140
143
|
font-weight: 700;
|
|
141
144
|
text-transform: uppercase;
|
|
142
|
-
color:
|
|
145
|
+
color: var(--stokr-text-primary);
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
/* Month caption */
|
|
@@ -149,10 +152,10 @@ const DatePickerOverlay = styled.div`
|
|
|
149
152
|
|
|
150
153
|
/* Navigation buttons */
|
|
151
154
|
.rdp-chevron {
|
|
152
|
-
fill:
|
|
155
|
+
fill: var(--stokr-text-tertiary);
|
|
153
156
|
|
|
154
157
|
&:hover {
|
|
155
|
-
fill:
|
|
158
|
+
fill: var(--stokr-text-primary);
|
|
156
159
|
background: transparent;
|
|
157
160
|
}
|
|
158
161
|
}
|
|
@@ -15,6 +15,7 @@ export declare const InputWrap: import('styled-components/dist/types').IStyledCo
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
dashboard?: boolean;
|
|
17
17
|
error?: boolean;
|
|
18
|
+
hasLabel?: boolean;
|
|
18
19
|
$variant?: FieldVariant;
|
|
19
20
|
}>> & string;
|
|
20
21
|
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"> & {
|