@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const Items: 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 Item: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const Head: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
8
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
9
|
+
}> & string;
|
|
10
|
+
export declare const Body: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
11
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
12
|
+
}> & string;
|
|
13
|
+
export declare const ColorLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}, {
|
|
16
|
+
itemColor?: string;
|
|
17
|
+
}>> & string;
|
|
18
|
+
export declare const NameCol: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
19
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
20
|
+
}> & string;
|
|
21
|
+
export declare const ValueCol: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
22
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
23
|
+
}> & string;
|
|
24
|
+
export declare const LargeText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
25
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
26
|
+
}, {
|
|
27
|
+
isPositive?: boolean;
|
|
28
|
+
isLink?: boolean;
|
|
29
|
+
}>> & string;
|
|
30
|
+
export declare const SmallText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
31
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
32
|
+
}> & string;
|
|
33
|
+
export declare const MarketDataCol: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
34
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
35
|
+
}, {
|
|
36
|
+
isPositive?: boolean;
|
|
37
|
+
}>> & string;
|
|
38
|
+
export declare const Arrow: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
39
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
40
|
+
}, {
|
|
41
|
+
isOpened?: boolean;
|
|
42
|
+
}>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
43
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
44
|
+
}, {
|
|
45
|
+
isOpened?: boolean;
|
|
46
|
+
}>, "children">>> & string;
|
|
@@ -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 Items = styled.div`
|
|
5
4
|
display: block;
|
|
@@ -46,11 +45,11 @@ const LargeText = styled.div.withConfig({
|
|
|
46
45
|
line-height: 28px;
|
|
47
46
|
|
|
48
47
|
${(props) => props.isPositive && `
|
|
49
|
-
color:
|
|
48
|
+
color: var(--stokr-status-success-text);
|
|
50
49
|
`}
|
|
51
50
|
|
|
52
51
|
${(props) => props.isPositive === false && `
|
|
53
|
-
color:
|
|
52
|
+
color: var(--stokr-status-error-text);
|
|
54
53
|
`}
|
|
55
54
|
|
|
56
55
|
${(props) => props.isLink && `
|
|
@@ -89,12 +88,12 @@ const MarketDataCol = styled.div.withConfig({
|
|
|
89
88
|
border-right: 5px solid transparent;
|
|
90
89
|
${(props) => props.isPositive && `
|
|
91
90
|
border-bottom: 7px solid
|
|
92
|
-
|
|
91
|
+
var(--stokr-status-success-icon);
|
|
93
92
|
`}
|
|
94
93
|
|
|
95
94
|
${(props) => props.isPositive === false && `
|
|
96
95
|
border-top: 7px solid
|
|
97
|
-
|
|
96
|
+
var(--stokr-status-error-icon);
|
|
98
97
|
`}
|
|
99
98
|
}
|
|
100
99
|
`;
|
|
@@ -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,55 +1,52 @@
|
|
|
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
6
|
${({ $flush }) => !$flush && `
|
|
10
|
-
background:
|
|
11
|
-
border: 1px solid
|
|
12
|
-
border-radius:
|
|
13
|
-
box-shadow:
|
|
7
|
+
background: var(--stokr-background-default);
|
|
8
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
9
|
+
border-radius: var(--stokr-radius-lg);
|
|
10
|
+
box-shadow: var(--stokr-elevation-xs);
|
|
14
11
|
`}
|
|
15
12
|
|
|
16
13
|
/* Pointer devices only: on touch a tap leaves :hover stuck after closing it. */
|
|
17
14
|
${({ $open, $flush }) => !$open && !$flush && `
|
|
18
15
|
@media (hover: hover) {
|
|
19
16
|
&:hover {
|
|
20
|
-
box-shadow:
|
|
17
|
+
box-shadow: var(--stokr-elevation-sm);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
20
|
`}
|
|
24
21
|
`;
|
|
25
22
|
const Header = styled.button`
|
|
26
23
|
position: relative;
|
|
27
|
-
${
|
|
24
|
+
${text("subtitleS")};
|
|
28
25
|
font-family: inherit;
|
|
29
26
|
display: flex;
|
|
30
27
|
align-items: center;
|
|
31
28
|
justify-content: space-between;
|
|
32
|
-
gap:
|
|
29
|
+
gap: var(--stokr-space-4);
|
|
33
30
|
width: 100%;
|
|
34
|
-
padding: var(--collapsible-header-padding,
|
|
31
|
+
padding: var(--collapsible-header-padding, var(--stokr-space-5));
|
|
35
32
|
border: none;
|
|
36
33
|
background: none;
|
|
37
|
-
color:
|
|
34
|
+
color: var(--stokr-text-primary);
|
|
38
35
|
text-align: left;
|
|
39
36
|
cursor: pointer;
|
|
40
37
|
|
|
41
38
|
/* The rule and the tighter bottom padding follow the body's open animation instead of snapping. */
|
|
42
39
|
${({ $divided, $open }) => $divided && `
|
|
43
|
-
padding-bottom: ${$open ? space
|
|
40
|
+
padding-bottom: ${$open ? "var(--stokr-space-4)" : "var(--stokr-space-5)"};
|
|
44
41
|
transition: padding-bottom ${DURATION} ${EASING};
|
|
45
42
|
|
|
46
43
|
&::after {
|
|
47
44
|
content: '';
|
|
48
45
|
position: absolute;
|
|
49
|
-
right:
|
|
46
|
+
right: var(--stokr-space-5);
|
|
50
47
|
bottom: 0;
|
|
51
|
-
left:
|
|
52
|
-
border-bottom: 1px solid
|
|
48
|
+
left: var(--stokr-space-5);
|
|
49
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
53
50
|
opacity: ${$open ? 1 : 0};
|
|
54
51
|
transition: opacity ${DURATION} ${EASING};
|
|
55
52
|
}
|
|
@@ -94,9 +91,12 @@ const BodyClip = styled.div`
|
|
|
94
91
|
overflow: hidden;
|
|
95
92
|
`;
|
|
96
93
|
const BodyInner = styled.div`
|
|
97
|
-
${
|
|
98
|
-
padding: var(
|
|
99
|
-
|
|
94
|
+
${text("bodyS")};
|
|
95
|
+
padding: var(
|
|
96
|
+
--collapsible-body-padding,
|
|
97
|
+
${({ $divided }) => $divided ? "var(--stokr-space-6)" : "0"} var(--stokr-space-5) var(--stokr-space-5)
|
|
98
|
+
);
|
|
99
|
+
color: var(--stokr-text-secondary);
|
|
100
100
|
`;
|
|
101
101
|
export {
|
|
102
102
|
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;
|