@stokr/components-library 4.2.5 → 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 -120
- package/dist/index.js +50 -60
- 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/static/images/address-refreshing.gif.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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { Label as Label$1 } from "../Input/Input.styles.js";
|
|
3
|
-
import theme from "../../styles/theme.js";
|
|
4
3
|
const Wrapper = styled.div`
|
|
5
4
|
position: relative;
|
|
6
5
|
display: block;
|
|
@@ -32,7 +31,7 @@ const Input = styled.div`
|
|
|
32
31
|
display: inline-block;
|
|
33
32
|
max-width: 100%;
|
|
34
33
|
padding-left: 28px;
|
|
35
|
-
font-family:
|
|
34
|
+
font-family: var(--stokr-font-family-base);
|
|
36
35
|
font-size: 12px;
|
|
37
36
|
line-height: 16px;
|
|
38
37
|
font-weight: 300;
|
|
@@ -44,7 +43,7 @@ const Input = styled.div`
|
|
|
44
43
|
font-size: 12px;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
${(props) => props.$error && `color:
|
|
46
|
+
${(props) => props.$error && `color: var(--stokr-status-error-text)`};
|
|
48
47
|
|
|
49
48
|
&:before {
|
|
50
49
|
content: '';
|
|
@@ -55,7 +54,7 @@ const Input = styled.div`
|
|
|
55
54
|
width: 16px;
|
|
56
55
|
height: 16px;
|
|
57
56
|
border-radius: 3px;
|
|
58
|
-
border: 1px solid
|
|
57
|
+
border: 1px solid var(--stokr-border-default);
|
|
59
58
|
background-color: transparent;
|
|
60
59
|
box-shadow: none;
|
|
61
60
|
transition:
|
|
@@ -67,7 +66,7 @@ const Input = styled.div`
|
|
|
67
66
|
height: 20px;
|
|
68
67
|
border-radius: 4px;
|
|
69
68
|
`}
|
|
70
|
-
${(props) => props.$disabled && `background-color:
|
|
69
|
+
${(props) => props.$disabled && `background-color: var(--stokr-action-disabled-secondary-bg);`}
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
> [data-icon] {
|
|
@@ -76,7 +75,7 @@ const Input = styled.div`
|
|
|
76
75
|
left: -1px;
|
|
77
76
|
width: 18px;
|
|
78
77
|
height: 18px;
|
|
79
|
-
color:
|
|
78
|
+
color: var(--stokr-action-accent-text);
|
|
80
79
|
opacity: 0;
|
|
81
80
|
clip-path: inset(0 100% 0 0);
|
|
82
81
|
transition:
|
|
@@ -90,23 +89,22 @@ const Input = styled.div`
|
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
|
|
93
|
-
&:focus + label,
|
|
94
92
|
&:hover + label {
|
|
95
93
|
&:before {
|
|
96
|
-
border-color: ${(props) => props.$disabled ? "none" :
|
|
94
|
+
border-color: ${(props) => props.$disabled ? "none" : "var(--stokr-border-strong)"};
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
&:focus-visible + label:before {
|
|
101
99
|
box-shadow:
|
|
102
|
-
0 0 0 2px
|
|
103
|
-
0 0 0 4px
|
|
100
|
+
0 0 0 2px var(--stokr-background-default),
|
|
101
|
+
0 0 0 4px var(--stokr-border-focus);
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
&:checked + label {
|
|
107
105
|
&:before {
|
|
108
|
-
background-color: ${(props) => props.$disabled ? "
|
|
109
|
-
border-color: ${(props) => props.$disabled ? "
|
|
106
|
+
background-color: ${(props) => props.$disabled ? "var(--stokr-action-disabled-accent-bg)" : "var(--stokr-action-accent-bg)"};
|
|
107
|
+
border-color: ${(props) => props.$disabled ? "var(--stokr-action-disabled-accent-bg)" : "var(--stokr-action-accent-bg)"};
|
|
110
108
|
}
|
|
111
109
|
|
|
112
110
|
> [data-icon] {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type ChecklistIconState = 'done' | 'missing' | 'in_progress';
|
|
3
|
+
export interface ChecklistCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
iconState?: ChecklistIconState;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** Internal route; the card is wrapped in a router `Link` (ignored when `onClick` is set or the card is disabled). */
|
|
8
|
+
link?: string;
|
|
9
|
+
/** Turns the card into a button. */
|
|
10
|
+
onClick?: HTMLAttributes<HTMLDivElement>['onClick'];
|
|
11
|
+
/** Small uppercase label next to the icon. */
|
|
12
|
+
iconCopy: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Pointer cursor and hover shadow; set to `false` for a purely informative card. */
|
|
15
|
+
isClickable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const ChecklistCard: ({ iconState, title, description, link, onClick, iconCopy, disabled, isClickable, ...rest }: ChecklistCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default ChecklistCard;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
2
|
import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
|
|
5
3
|
import { CardContainer, IconBlock, IconCopy, CardTitle, CardDescription } from "./ChecklistCard.styles.js";
|
|
6
|
-
import { colors } from "../../styles/colors.js";
|
|
7
4
|
import { safeUrl } from "../../utils/safeUrl.js";
|
|
8
5
|
import SvgWarningFilled from "../../static/images/warning-filled.svg.js";
|
|
9
6
|
import { Link } from "react-router-dom";
|
|
@@ -11,15 +8,15 @@ const ICON_MAP = {
|
|
|
11
8
|
done: {
|
|
12
9
|
material: "check",
|
|
13
10
|
weight: 600,
|
|
14
|
-
color:
|
|
11
|
+
color: "var(--stokr-status-success-icon)"
|
|
15
12
|
},
|
|
16
13
|
missing: {
|
|
17
14
|
icon: /* @__PURE__ */ jsx(SvgWarningFilled, {}),
|
|
18
|
-
color:
|
|
15
|
+
color: "var(--stokr-status-warning-icon)"
|
|
19
16
|
},
|
|
20
17
|
in_progress: {
|
|
21
18
|
material: "search_activity",
|
|
22
|
-
color:
|
|
19
|
+
color: "var(--stokr-text-tertiary)"
|
|
23
20
|
}
|
|
24
21
|
};
|
|
25
22
|
const ChecklistCard = ({
|
|
@@ -34,7 +31,7 @@ const ChecklistCard = ({
|
|
|
34
31
|
...rest
|
|
35
32
|
}) => {
|
|
36
33
|
const { icon, material, weight, color } = ICON_MAP[iconState] || ICON_MAP["missing"];
|
|
37
|
-
const iconElement = material ? /* @__PURE__ */ jsx(MaterialIcon, { name: material, size:
|
|
34
|
+
const iconElement = material ? /* @__PURE__ */ jsx(MaterialIcon, { name: material, size: "md", color, weight }) : /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", width: 20, height: 20, color }, children: icon });
|
|
38
35
|
const content = /* @__PURE__ */ jsxs(
|
|
39
36
|
CardContainer,
|
|
40
37
|
{
|
|
@@ -58,16 +55,6 @@ const ChecklistCard = ({
|
|
|
58
55
|
}
|
|
59
56
|
return content;
|
|
60
57
|
};
|
|
61
|
-
ChecklistCard.propTypes = {
|
|
62
|
-
iconState: PropTypes.oneOf(["done", "missing", "in_progress"]),
|
|
63
|
-
title: PropTypes.string.isRequired,
|
|
64
|
-
description: PropTypes.string.isRequired,
|
|
65
|
-
link: PropTypes.string,
|
|
66
|
-
onClick: PropTypes.func,
|
|
67
|
-
tooltip: PropTypes.string,
|
|
68
|
-
iconCopy: PropTypes.string.isRequired,
|
|
69
|
-
disabled: PropTypes.bool
|
|
70
|
-
};
|
|
71
58
|
export {
|
|
72
59
|
ChecklistCard
|
|
73
60
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const CardContainer: 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
|
+
isClickable?: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const IconBlock: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
7
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
8
|
+
}> & string;
|
|
9
|
+
export declare const IconCopy: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
10
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
11
|
+
}> & string;
|
|
12
|
+
export declare const CardTitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
13
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
14
|
+
}> & string;
|
|
15
|
+
export declare const CardDescription: 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;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import
|
|
2
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
3
3
|
const CardContainer = styled.div.withConfig({
|
|
4
4
|
shouldForwardProp: (props) => !["isClickable"].includes(props)
|
|
5
5
|
})`
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
align-items: flex-start;
|
|
9
|
-
border: 1px solid
|
|
9
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
10
10
|
border-radius: 8px;
|
|
11
|
-
background:
|
|
11
|
+
background: var(--stokr-background-default);
|
|
12
12
|
padding: 32px 32px 32px 32px;
|
|
13
13
|
min-width: 320px;
|
|
14
14
|
min-height: 220px;
|
|
@@ -46,28 +46,28 @@ const IconCopy = styled.span`
|
|
|
46
46
|
const CardTitle = styled.div`
|
|
47
47
|
margin-bottom: 32px;
|
|
48
48
|
text-transform: uppercase;
|
|
49
|
-
color:
|
|
49
|
+
color: var(--stokr-text-primary);
|
|
50
50
|
font-weight: 800;
|
|
51
51
|
word-wrap: break-word;
|
|
52
52
|
font-size: 16px;
|
|
53
53
|
line-height: 24px;
|
|
54
54
|
letter-spacing: 0.6px;
|
|
55
55
|
|
|
56
|
-
${
|
|
56
|
+
${breakpoint.Medium`
|
|
57
57
|
font-size: 22px;
|
|
58
58
|
letter-spacing: 0.8px;
|
|
59
59
|
line-height: 28px;
|
|
60
60
|
`}
|
|
61
61
|
`;
|
|
62
62
|
const CardDescription = styled.div`
|
|
63
|
-
color:
|
|
63
|
+
color: var(--stokr-text-primary);
|
|
64
64
|
font-size: 14px;
|
|
65
65
|
font-weight: 300;
|
|
66
66
|
line-height: 20px;
|
|
67
67
|
letter-spacing: 0.5px;
|
|
68
68
|
word-wrap: break-word;
|
|
69
69
|
|
|
70
|
-
${
|
|
70
|
+
${breakpoint.Medium`
|
|
71
71
|
font-size: 16px;
|
|
72
72
|
line-height: 24px;
|
|
73
73
|
letter-spacing: 0.8px;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { InfoIconProps } from '../InfoIcon/InfoIcon';
|
|
3
|
+
export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
/** Info icon with this text as tooltip. */
|
|
7
|
+
tooltip?: string | null;
|
|
8
|
+
/** Extra props for the tooltip's `InfoIcon`. */
|
|
9
|
+
tooltipProps?: InfoIconProps['tooltipProps'];
|
|
10
|
+
/** Outline info icon instead of the filled one. */
|
|
11
|
+
tooltipIconOutline?: boolean;
|
|
12
|
+
/** Background/border color for hover and active states (kit `action-secondary-bg` by default) */
|
|
13
|
+
activeColor?: string;
|
|
14
|
+
/** Text color for hover and active states (kit `action-secondary-text` by default) */
|
|
15
|
+
activeTextColor?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Chip: ({ children, isActive, onClick, tooltip, tooltipProps, tooltipIconOutline, activeColor, activeTextColor, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Chip;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
2
|
import { InfoIcon } from "../InfoIcon/InfoIcon.js";
|
|
5
|
-
import {
|
|
6
|
-
import { StyledChip, CHIP_ACTIVE_BG_HEX, ChipText } from "./Chip.styles.js";
|
|
3
|
+
import { StyledChip, ChipText } from "./Chip.styles.js";
|
|
7
4
|
const Chip = ({
|
|
8
5
|
children,
|
|
9
6
|
isActive = false,
|
|
@@ -12,8 +9,8 @@ const Chip = ({
|
|
|
12
9
|
tooltip = null,
|
|
13
10
|
tooltipProps,
|
|
14
11
|
tooltipIconOutline = false,
|
|
15
|
-
activeColor =
|
|
16
|
-
activeTextColor =
|
|
12
|
+
activeColor = "var(--stokr-action-secondary-bg)",
|
|
13
|
+
activeTextColor = "var(--stokr-action-secondary-text)",
|
|
17
14
|
...props
|
|
18
15
|
}) => {
|
|
19
16
|
return /* @__PURE__ */ jsxs(
|
|
@@ -41,20 +38,7 @@ const Chip = ({
|
|
|
41
38
|
}
|
|
42
39
|
);
|
|
43
40
|
};
|
|
44
|
-
Chip.propTypes = {
|
|
45
|
-
children: PropTypes.node.isRequired,
|
|
46
|
-
isActive: PropTypes.bool,
|
|
47
|
-
onClick: PropTypes.func,
|
|
48
|
-
tooltip: PropTypes.string,
|
|
49
|
-
/** Outline info icon instead of the filled one. */
|
|
50
|
-
tooltipIconOutline: PropTypes.bool,
|
|
51
|
-
/** Background/border color for hover and active states (neutral by default) */
|
|
52
|
-
activeColor: PropTypes.string,
|
|
53
|
-
/** Text color for hover and active states */
|
|
54
|
-
activeTextColor: PropTypes.string
|
|
55
|
-
};
|
|
56
|
-
var stdin_default = Chip;
|
|
57
41
|
export {
|
|
58
42
|
Chip,
|
|
59
|
-
|
|
43
|
+
Chip as default
|
|
60
44
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface ActiveColors {
|
|
2
|
+
activeColor?: string;
|
|
3
|
+
activeTextColor?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const StyledChip: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
6
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
7
|
+
}, ActiveColors & {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
}>> & string;
|
|
10
|
+
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"> & {
|
|
11
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
12
|
+
}, {
|
|
13
|
+
customWrapperStyle?: string;
|
|
14
|
+
}>> & string;
|
|
15
|
+
export declare const ChipText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
16
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
17
|
+
}> & string;
|
|
18
|
+
export declare const TooltipChipIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
19
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
20
|
+
}, "children"> & Partial<Pick<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
21
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
22
|
+
}, "children">>> & string;
|
|
23
|
+
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import theme from "../../styles/theme.js";
|
|
3
2
|
import { Icon } from "../InfoIcon/InfoIcon.styles.js";
|
|
4
3
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
5
|
-
const CHIP_ACTIVE_BG_HEX = "#f0f0f0";
|
|
6
4
|
const activeStyles = ({ activeColor, activeTextColor }) => `
|
|
7
5
|
border-color: ${activeColor};
|
|
8
6
|
background-color: ${activeColor};
|
|
@@ -20,10 +18,10 @@ const StyledChip = styled.div.withConfig({
|
|
|
20
18
|
gap: 4px;
|
|
21
19
|
align-items: center;
|
|
22
20
|
padding: 12px 16px;
|
|
23
|
-
border: 1px solid
|
|
21
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
24
22
|
border-radius: 999px;
|
|
25
23
|
background-color: transparent;
|
|
26
|
-
color:
|
|
24
|
+
color: var(--stokr-text-secondary);
|
|
27
25
|
cursor: pointer;
|
|
28
26
|
transition:
|
|
29
27
|
background-color 0.2s ease,
|
|
@@ -58,11 +56,10 @@ styled.span.attrs({
|
|
|
58
56
|
font-size: 16px;
|
|
59
57
|
line-height: 16px;
|
|
60
58
|
vertical-align: middle;
|
|
61
|
-
color:
|
|
59
|
+
color: var(--stokr-text-secondary);
|
|
62
60
|
transition: color 0.2s;
|
|
63
61
|
`;
|
|
64
62
|
export {
|
|
65
|
-
CHIP_ACTIVE_BG_HEX,
|
|
66
63
|
ChipText,
|
|
67
64
|
StyledChip,
|
|
68
65
|
Wrapper
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import
|
|
4
|
+
import { Chip } from "./Chip.js";
|
|
5
5
|
import { Wrapper } from "./Chip.styles.js";
|
|
6
6
|
import { Scroll } from "../TabsNav/TabsNav.styles.js";
|
|
7
7
|
const ChipsWrapper = ({
|
|
@@ -22,7 +22,7 @@ const ChipsWrapper = ({
|
|
|
22
22
|
onActiveChipChange?.(index);
|
|
23
23
|
};
|
|
24
24
|
return /* @__PURE__ */ jsx(Scroll, { style: scrollStyles, children: /* @__PURE__ */ jsx(Wrapper, { customWrapperStyle, children: chips.map((chip, index) => /* @__PURE__ */ jsx(
|
|
25
|
-
|
|
25
|
+
Chip,
|
|
26
26
|
{
|
|
27
27
|
isActive: activeChip === index,
|
|
28
28
|
onClick: () => handleChipClick(index),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface CollapsibleProps
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CollapsibleProps {
|
|
3
3
|
title: ReactNode;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
/** Controlled open state. Omit to let the component manage it. */
|
|
@@ -11,14 +11,8 @@ export interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDivElement>, '
|
|
|
11
11
|
divided?: boolean;
|
|
12
12
|
/** Test-automation hook on the title button. */
|
|
13
13
|
dataCy?: string;
|
|
14
|
-
/** `card` (default) has a border, background, radius and shadow; `flush` has none, to sit inside another surface. */
|
|
15
|
-
variant?: 'card' | 'flush';
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
18
|
-
* One collapsible card: title row with a chevron, body that animates open.
|
|
19
|
-
*
|
|
20
|
-
* CSS custom properties (set on the root or any ancestor):
|
|
21
|
-
* - `--collapsible-header-padding` (default `20px`)
|
|
22
|
-
* - `--collapsible-body-padding` (default `0 20px 20px`, `24px 20px 20px` when `divided`)
|
|
16
|
+
* One collapsible card: title row with a chevron, body that animates open.
|
|
23
17
|
*/
|
|
24
|
-
export declare const Collapsible:
|
|
18
|
+
export declare const Collapsible: ({ title, children, open, defaultOpen, onToggle, id, divided, dataCy, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState, useId } from "react";
|
|
3
3
|
import { ArrowSimple } from "../icons/ArrowSimple.js";
|
|
4
4
|
import { inertProp } from "../../utils/inertProp.js";
|
|
5
5
|
import { Root, Header, Chevron, Body, BodyClip, BodyInner } from "./Collapsible.styles.js";
|
|
6
|
-
const Collapsible =
|
|
6
|
+
const Collapsible = ({
|
|
7
|
+
title,
|
|
8
|
+
children,
|
|
9
|
+
open,
|
|
10
|
+
defaultOpen = false,
|
|
11
|
+
onToggle,
|
|
12
|
+
id,
|
|
13
|
+
divided = false,
|
|
14
|
+
dataCy
|
|
15
|
+
}) => {
|
|
7
16
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
8
17
|
const isOpen = open ?? uncontrolledOpen;
|
|
9
18
|
const bodyId = useId();
|
|
@@ -11,7 +20,7 @@ const Collapsible = forwardRef(function CollapsibleBase({ title, children, open,
|
|
|
11
20
|
if (open === void 0) setUncontrolledOpen(!isOpen);
|
|
12
21
|
onToggle?.(!isOpen);
|
|
13
22
|
};
|
|
14
|
-
return /* @__PURE__ */ jsxs(Root, {
|
|
23
|
+
return /* @__PURE__ */ jsxs(Root, { id, $open: isOpen, children: [
|
|
15
24
|
/* @__PURE__ */ jsxs(
|
|
16
25
|
Header,
|
|
17
26
|
{
|
|
@@ -20,8 +29,7 @@ const Collapsible = forwardRef(function CollapsibleBase({ title, children, open,
|
|
|
20
29
|
"aria-controls": bodyId,
|
|
21
30
|
"data-cy": dataCy,
|
|
22
31
|
onClick: toggle,
|
|
23
|
-
$divided: divided,
|
|
24
|
-
$open: isOpen,
|
|
32
|
+
$divided: divided && isOpen,
|
|
25
33
|
children: [
|
|
26
34
|
title,
|
|
27
35
|
/* @__PURE__ */ jsx(Chevron, { $open: isOpen, "aria-hidden": "true", children: /* @__PURE__ */ jsx(ArrowSimple, { width: 10, height: 6 }) })
|
|
@@ -30,7 +38,7 @@ const Collapsible = forwardRef(function CollapsibleBase({ title, children, open,
|
|
|
30
38
|
),
|
|
31
39
|
/* @__PURE__ */ jsx(Body, { id: bodyId, $open: isOpen, inert: inertProp(!isOpen), children: /* @__PURE__ */ jsx(BodyClip, { children: /* @__PURE__ */ jsx(BodyInner, { $divided: divided, children }) }) })
|
|
32
40
|
] });
|
|
33
|
-
}
|
|
41
|
+
};
|
|
34
42
|
export {
|
|
35
43
|
Collapsible
|
|
36
44
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Collapsed, it lifts under the pointer as a collapsed section does. */
|
|
2
2
|
export declare const Root: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
3
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
4
|
}, {
|
|
5
5
|
$open: boolean;
|
|
6
|
-
$flush: boolean;
|
|
7
6
|
}>> & string;
|
|
8
7
|
export declare const Header: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
9
8
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
10
9
|
}, {
|
|
11
10
|
$divided: boolean;
|
|
12
|
-
$open: boolean;
|
|
13
11
|
}>> & string;
|
|
14
12
|
export declare const Chevron: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
15
13
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
@@ -1,65 +1,48 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import { elevation } from "../../styles/elevation.js";
|
|
4
|
-
import { radius, space } from "../../styles/spacing.js";
|
|
5
|
-
import { typography } from "../../styles/typography.js";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
6
3
|
const DURATION = "300ms";
|
|
7
4
|
const EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
8
5
|
const Root = styled.div`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
box-shadow: ${elevation.xs};
|
|
14
|
-
`}
|
|
6
|
+
background: var(--stokr-background-default);
|
|
7
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
8
|
+
border-radius: var(--stokr-radius-lg);
|
|
9
|
+
box-shadow: var(--stokr-elevation-xs);
|
|
15
10
|
|
|
16
11
|
/* Pointer devices only: on touch a tap leaves :hover stuck after closing it. */
|
|
17
|
-
${({ $open
|
|
12
|
+
${({ $open }) => !$open && `
|
|
18
13
|
@media (hover: hover) {
|
|
19
14
|
&:hover {
|
|
20
|
-
box-shadow:
|
|
15
|
+
box-shadow: var(--stokr-elevation-sm);
|
|
21
16
|
}
|
|
22
17
|
}
|
|
23
18
|
`}
|
|
24
19
|
`;
|
|
25
20
|
const Header = styled.button`
|
|
26
21
|
position: relative;
|
|
27
|
-
${
|
|
22
|
+
${text("subtitleS")};
|
|
28
23
|
font-family: inherit;
|
|
29
24
|
display: flex;
|
|
30
25
|
align-items: center;
|
|
31
26
|
justify-content: space-between;
|
|
32
|
-
gap:
|
|
27
|
+
gap: var(--stokr-space-4);
|
|
33
28
|
width: 100%;
|
|
34
|
-
padding: var(--
|
|
29
|
+
padding: var(--stokr-space-5);
|
|
35
30
|
border: none;
|
|
36
31
|
background: none;
|
|
37
|
-
color:
|
|
32
|
+
color: var(--stokr-text-primary);
|
|
38
33
|
text-align: left;
|
|
39
34
|
cursor: pointer;
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
padding-bottom: ${$open ? space[4] : space[5]};
|
|
44
|
-
transition: padding-bottom ${DURATION} ${EASING};
|
|
36
|
+
${({ $divided }) => $divided && `
|
|
37
|
+
padding-bottom: var(--stokr-space-4);
|
|
45
38
|
|
|
46
39
|
&::after {
|
|
47
40
|
content: '';
|
|
48
41
|
position: absolute;
|
|
49
|
-
right:
|
|
42
|
+
right: var(--stokr-space-5);
|
|
50
43
|
bottom: 0;
|
|
51
|
-
left:
|
|
52
|
-
border-bottom: 1px solid
|
|
53
|
-
opacity: ${$open ? 1 : 0};
|
|
54
|
-
transition: opacity ${DURATION} ${EASING};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (prefers-reduced-motion: reduce) {
|
|
58
|
-
transition: none;
|
|
59
|
-
|
|
60
|
-
&::after {
|
|
61
|
-
transition: none;
|
|
62
|
-
}
|
|
44
|
+
left: var(--stokr-space-5);
|
|
45
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
63
46
|
}
|
|
64
47
|
`}
|
|
65
48
|
`;
|
|
@@ -94,9 +77,9 @@ const BodyClip = styled.div`
|
|
|
94
77
|
overflow: hidden;
|
|
95
78
|
`;
|
|
96
79
|
const BodyInner = styled.div`
|
|
97
|
-
${
|
|
98
|
-
padding:
|
|
99
|
-
color:
|
|
80
|
+
${text("bodyS")};
|
|
81
|
+
padding: ${({ $divided }) => $divided ? "var(--stokr-space-6)" : "0"} var(--stokr-space-5) var(--stokr-space-5);
|
|
82
|
+
color: var(--stokr-text-secondary);
|
|
100
83
|
`;
|
|
101
84
|
export {
|
|
102
85
|
Body,
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Scrollbars } from "react-custom-scrollbars-4";
|
|
5
|
-
import { Container, Outer, Inner, ThumbV, TrackV, ThumbH, TrackH } from "./ComponentScroll.styles.js";
|
|
5
|
+
import { Container, Outer, Inner, ThumbV, TrackV, ThumbH, TrackH, View } from "./ComponentScroll.styles.js";
|
|
6
6
|
const ComponentScroll = (props) => {
|
|
7
7
|
const {
|
|
8
8
|
children,
|
|
@@ -35,6 +35,7 @@ const ComponentScroll = (props) => {
|
|
|
35
35
|
{
|
|
36
36
|
ref: scrollRef,
|
|
37
37
|
style: { height: "100%" },
|
|
38
|
+
renderView: (_props) => /* @__PURE__ */ jsx(View, { ..._props }),
|
|
38
39
|
renderTrackHorizontal: (_props) => /* @__PURE__ */ jsx(TrackH, { ..._props }),
|
|
39
40
|
renderThumbHorizontal: (_props) => /* @__PURE__ */ jsx(ThumbH, { ..._props }),
|
|
40
41
|
renderTrackVertical: (_props) => /* @__PURE__ */ jsx(TrackV, { ..._props }),
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const Container: 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
|
+
fullHeight?: boolean;
|
|
5
|
+
noMobileScroll?: boolean;
|
|
6
|
+
isMobile?: boolean;
|
|
7
|
+
}>> & string;
|
|
8
|
+
export declare const TrackH: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
9
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
10
|
+
}> & string;
|
|
11
|
+
export declare const ThumbH: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
12
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
13
|
+
}> & string;
|
|
14
|
+
export declare const TrackV: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
15
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
16
|
+
}> & string;
|
|
17
|
+
export declare const ThumbV: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
18
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
19
|
+
}> & string;
|
|
20
|
+
export declare const View: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
21
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
22
|
+
}> & string;
|
|
23
|
+
export declare const Outer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
24
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
25
|
+
}, {
|
|
26
|
+
offset?: number;
|
|
27
|
+
barPadding?: number;
|
|
28
|
+
topPadding?: number;
|
|
29
|
+
}>> & string;
|
|
30
|
+
export declare const Inner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
31
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
32
|
+
}, {
|
|
33
|
+
offset?: number;
|
|
34
|
+
}>> & string;
|