@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,13 +1,138 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import { typography } from "../../styles/typography.js";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
3
|
const SIZES = {
|
|
5
4
|
sm: { height: 32, padding: "5px 15px", icon: 12 },
|
|
6
5
|
md: { height: 40, padding: "9px 23px", icon: 16 },
|
|
7
6
|
lg: { height: 48, padding: "13px 31px", icon: 20 }
|
|
8
7
|
};
|
|
8
|
+
const VARIANTS = {
|
|
9
|
+
accent: {
|
|
10
|
+
bg: "action-accent-bg",
|
|
11
|
+
border: "action-accent-bg",
|
|
12
|
+
text: "action-accent-text",
|
|
13
|
+
hoverBg: "action-accent-bg-hover",
|
|
14
|
+
hoverBorder: "action-accent-bg-hover",
|
|
15
|
+
disabledBg: "action-disabled-accent-bg",
|
|
16
|
+
disabledBorder: "action-disabled-accent-bg",
|
|
17
|
+
disabledText: "action-disabled-accent-text"
|
|
18
|
+
},
|
|
19
|
+
primary: {
|
|
20
|
+
bg: "action-primary-bg",
|
|
21
|
+
border: "action-primary-bg",
|
|
22
|
+
text: "action-primary-text",
|
|
23
|
+
hoverBg: "action-primary-bg-hover",
|
|
24
|
+
hoverBorder: "action-primary-bg-hover",
|
|
25
|
+
pressedBg: "action-primary-bg-pressed",
|
|
26
|
+
disabledBg: "action-disabled-primary-bg",
|
|
27
|
+
disabledBorder: "action-disabled-primary-bg",
|
|
28
|
+
disabledText: "action-disabled-primary-text"
|
|
29
|
+
},
|
|
30
|
+
secondary: {
|
|
31
|
+
bg: "action-secondary-bg",
|
|
32
|
+
border: "action-secondary-bg",
|
|
33
|
+
text: "action-secondary-text",
|
|
34
|
+
hoverBg: "action-secondary-bg-hover",
|
|
35
|
+
hoverBorder: "action-secondary-bg-hover",
|
|
36
|
+
disabledBg: "action-disabled-secondary-bg",
|
|
37
|
+
disabledBorder: "action-disabled-secondary-bg",
|
|
38
|
+
disabledText: "action-disabled-secondary-text"
|
|
39
|
+
},
|
|
40
|
+
outline: {
|
|
41
|
+
bg: "transparent",
|
|
42
|
+
border: "action-outline-border",
|
|
43
|
+
text: "action-outline-text",
|
|
44
|
+
hoverBg: "action-outline-bg-hover",
|
|
45
|
+
hoverBorder: "action-outline-border",
|
|
46
|
+
disabledBg: "transparent",
|
|
47
|
+
disabledBorder: "action-disabled-outline-border",
|
|
48
|
+
disabledText: "action-disabled-outline-text"
|
|
49
|
+
},
|
|
50
|
+
ghost: {
|
|
51
|
+
bg: "transparent",
|
|
52
|
+
border: "transparent",
|
|
53
|
+
text: "action-outline-text",
|
|
54
|
+
hoverBg: "action-outline-bg-hover",
|
|
55
|
+
hoverBorder: "action-outline-bg-hover",
|
|
56
|
+
disabledBg: "transparent",
|
|
57
|
+
disabledBorder: "transparent",
|
|
58
|
+
disabledText: "action-disabled-outline-text"
|
|
59
|
+
},
|
|
60
|
+
link: {
|
|
61
|
+
bg: "transparent",
|
|
62
|
+
border: "transparent",
|
|
63
|
+
text: "action-outline-text",
|
|
64
|
+
hoverBg: "transparent",
|
|
65
|
+
hoverBorder: "transparent",
|
|
66
|
+
disabledBg: "transparent",
|
|
67
|
+
disabledBorder: "transparent",
|
|
68
|
+
disabledText: "action-disabled-outline-text"
|
|
69
|
+
},
|
|
70
|
+
negative: {
|
|
71
|
+
bg: "action-negative-bg",
|
|
72
|
+
border: "action-negative-bg",
|
|
73
|
+
text: "action-negative-text",
|
|
74
|
+
hoverBg: "action-negative-bg-hover",
|
|
75
|
+
hoverBorder: "action-negative-bg-hover",
|
|
76
|
+
disabledBg: "action-negative-bg",
|
|
77
|
+
disabledBorder: "action-negative-bg",
|
|
78
|
+
disabledText: "action-disabled-negative-text"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const paint = (p) => p === "transparent" ? "transparent" : `var(--stokr-${p})`;
|
|
82
|
+
const resolveButtonVariant = (props) => {
|
|
83
|
+
if (props.variant) return props.variant;
|
|
84
|
+
if (props.outline || props.outlineBlack || props.black) return "outline";
|
|
85
|
+
if (props.negative) return "negative";
|
|
86
|
+
if (props.onlyText) return "ghost";
|
|
87
|
+
if (props.secondary) return "secondary";
|
|
88
|
+
return "accent";
|
|
89
|
+
};
|
|
90
|
+
const variantStyles = (props) => {
|
|
91
|
+
const variant = resolveButtonVariant(props);
|
|
92
|
+
const v = VARIANTS[variant];
|
|
93
|
+
return css`
|
|
94
|
+
background-color: ${paint(v.bg)};
|
|
95
|
+
border-color: ${paint(v.border)};
|
|
96
|
+
color: ${paint(v.text)};
|
|
97
|
+
|
|
98
|
+
&:hover,
|
|
99
|
+
&:focus-visible {
|
|
100
|
+
background-color: ${paint(v.hoverBg)};
|
|
101
|
+
border-color: ${paint(v.hoverBorder)};
|
|
102
|
+
color: ${paint(v.text)};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:active {
|
|
106
|
+
background-color: ${paint(v.pressedBg ?? v.hoverBg)};
|
|
107
|
+
border-color: ${paint(v.pressedBg ?? v.hoverBorder)};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
${variant === "link" && css`
|
|
111
|
+
padding-left: 0;
|
|
112
|
+
padding-right: 0;
|
|
113
|
+
text-decoration: underline;
|
|
114
|
+
text-underline-offset: 3px;
|
|
115
|
+
`}
|
|
116
|
+
|
|
117
|
+
${props.disabled && css`
|
|
118
|
+
cursor: default;
|
|
119
|
+
box-shadow: none !important;
|
|
120
|
+
pointer-events: none !important;
|
|
121
|
+
|
|
122
|
+
&,
|
|
123
|
+
&:hover,
|
|
124
|
+
&:focus-visible,
|
|
125
|
+
&:active {
|
|
126
|
+
background-color: ${paint(v.disabledBg)};
|
|
127
|
+
border-color: ${paint(v.disabledBorder)};
|
|
128
|
+
color: ${paint(v.disabledText)};
|
|
129
|
+
}
|
|
130
|
+
`}
|
|
131
|
+
`;
|
|
132
|
+
};
|
|
9
133
|
const Button = styled.button.withConfig({
|
|
10
134
|
shouldForwardProp: (props) => ![
|
|
135
|
+
"variant",
|
|
11
136
|
"size",
|
|
12
137
|
"withMarginBottom",
|
|
13
138
|
"minWidth",
|
|
@@ -29,12 +154,10 @@ const Button = styled.button.withConfig({
|
|
|
29
154
|
height: auto;
|
|
30
155
|
min-height: 40px;
|
|
31
156
|
max-width: 100%;
|
|
32
|
-
|
|
33
|
-
border: 1px solid ${() => theme.cPrimary};
|
|
157
|
+
border: 1px solid transparent;
|
|
34
158
|
font-weight: bold;
|
|
35
159
|
font-size: 12px;
|
|
36
160
|
line-height: 16px;
|
|
37
|
-
color: ${() => theme.cWhite};
|
|
38
161
|
text-transform: uppercase;
|
|
39
162
|
text-align: center;
|
|
40
163
|
letter-spacing: 2px;
|
|
@@ -54,8 +177,8 @@ const Button = styled.button.withConfig({
|
|
|
54
177
|
background-color 0.2s,
|
|
55
178
|
border-color 0.2s;
|
|
56
179
|
|
|
57
|
-
${({ size }) =>
|
|
58
|
-
${
|
|
180
|
+
${({ size = "md" }) => SIZES[size] && css`
|
|
181
|
+
${text("buttonLabel")};
|
|
59
182
|
display: inline-flex;
|
|
60
183
|
align-items: center;
|
|
61
184
|
justify-content: center;
|
|
@@ -93,114 +216,7 @@ const Button = styled.button.withConfig({
|
|
|
93
216
|
margin-right: auto;
|
|
94
217
|
`}
|
|
95
218
|
|
|
96
|
-
|
|
97
|
-
&:focus,
|
|
98
|
-
&:active {
|
|
99
|
-
background-color: ${() => theme.cPrimaryDark};
|
|
100
|
-
border-color: ${() => theme.cPrimaryDark};
|
|
101
|
-
color: ${() => theme.cWhite};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
${(props) => props.secondary && css`
|
|
105
|
-
background-color: ${theme.cWhite};
|
|
106
|
-
color: ${theme.cPrimary};
|
|
107
|
-
|
|
108
|
-
&:hover,
|
|
109
|
-
&:focus,
|
|
110
|
-
&:active {
|
|
111
|
-
background-color: ${theme.cPrimary};
|
|
112
|
-
border-color: ${theme.cPrimary};
|
|
113
|
-
color: ${theme.cWhite};
|
|
114
|
-
}
|
|
115
|
-
`}
|
|
116
|
-
|
|
117
|
-
${(props) => props.onlyText && css`
|
|
118
|
-
border-color: transparent;
|
|
119
|
-
background-color: transparent;
|
|
120
|
-
color: ${theme.cBlack};
|
|
121
|
-
|
|
122
|
-
&:hover,
|
|
123
|
-
&:focus,
|
|
124
|
-
&:active {
|
|
125
|
-
background-color: transparent;
|
|
126
|
-
border-color: transparent;
|
|
127
|
-
color: ${theme.cPrimary};
|
|
128
|
-
}
|
|
129
|
-
`}
|
|
130
|
-
|
|
131
|
-
${(props) => props.disabled && css`
|
|
132
|
-
border-color: ${theme.cBlack};
|
|
133
|
-
background-color: ${theme.cWhite};
|
|
134
|
-
color: ${theme.cBlack};
|
|
135
|
-
opacity: 0.2;
|
|
136
|
-
cursor: default;
|
|
137
|
-
box-shadow: none !important;
|
|
138
|
-
pointer-events: none !important;
|
|
139
|
-
|
|
140
|
-
&:hover,
|
|
141
|
-
&:focus,
|
|
142
|
-
&:active {
|
|
143
|
-
background-color: ${theme.cPrimary};
|
|
144
|
-
border-color: ${theme.cPrimary};
|
|
145
|
-
color: ${theme.cWhite};
|
|
146
|
-
}
|
|
147
|
-
`}
|
|
148
|
-
|
|
149
|
-
${(props) => props.negative && css`
|
|
150
|
-
border-color: ${theme.cWarning};
|
|
151
|
-
background-color: ${theme.cWhite};
|
|
152
|
-
color: ${theme.cWarning};
|
|
153
|
-
|
|
154
|
-
&:hover,
|
|
155
|
-
&:focus,
|
|
156
|
-
&:active {
|
|
157
|
-
background-color: ${theme.cWhite};
|
|
158
|
-
border-color: ${theme.cWarningDark};
|
|
159
|
-
color: ${theme.cWarningDark};
|
|
160
|
-
}
|
|
161
|
-
`}
|
|
162
|
-
|
|
163
|
-
${(props) => props.outline && css`
|
|
164
|
-
border-color: ${theme.cWhite};
|
|
165
|
-
background-color: transparent;
|
|
166
|
-
color: ${theme.cWhite};
|
|
167
|
-
|
|
168
|
-
&:hover,
|
|
169
|
-
&:focus,
|
|
170
|
-
&:active {
|
|
171
|
-
background-color: ${theme.cWhite};
|
|
172
|
-
border-color: ${theme.cWhite};
|
|
173
|
-
color: ${theme.cWarning};
|
|
174
|
-
}
|
|
175
|
-
`}
|
|
176
|
-
|
|
177
|
-
${(props) => props.outlineBlack && css`
|
|
178
|
-
border-color: ${theme.grey4};
|
|
179
|
-
background-color: ${theme.cWhite};
|
|
180
|
-
color: ${theme.cBlack};
|
|
181
|
-
|
|
182
|
-
&:hover,
|
|
183
|
-
&:focus,
|
|
184
|
-
&:active {
|
|
185
|
-
background-color: ${theme.cPrimary};
|
|
186
|
-
border-color: ${theme.cPrimary};
|
|
187
|
-
color: ${theme.cWhite};
|
|
188
|
-
}
|
|
189
|
-
`}
|
|
190
|
-
|
|
191
|
-
${(props) => props.black && css`
|
|
192
|
-
border-color: ${theme.grey4};
|
|
193
|
-
background-color: transparent;
|
|
194
|
-
color: ${theme.cBlack};
|
|
195
|
-
|
|
196
|
-
&:hover,
|
|
197
|
-
&:focus,
|
|
198
|
-
&:active {
|
|
199
|
-
background-color: ${theme.cBlack};
|
|
200
|
-
border-color: ${theme.cBlack};
|
|
201
|
-
color: ${theme.cWhite};
|
|
202
|
-
}
|
|
203
|
-
`}
|
|
219
|
+
${variantStyles}
|
|
204
220
|
|
|
205
221
|
${(props) => props.marginTop && css`
|
|
206
222
|
margin-top: ${props.marginTop};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ButtonProps } from './Button.styles';
|
|
2
|
+
import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
|
3
|
+
export interface GlareButtonProps extends ButtonProps, Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'onClick' | 'disabled' | 'className'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onClick: ComponentPropsWithoutRef<'button'>['onClick'];
|
|
6
|
+
/** Inline button (default). Set `false` to center it on the top edge of its nearest positioned parent instead. */
|
|
7
|
+
nowrap?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Stretches the button and its glare to the width of the container. */
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
disabledColor?: string;
|
|
12
|
+
/** DOM id of the button; also the default `data-cy`. */
|
|
13
|
+
buttonId?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
borderColor?: string;
|
|
18
|
+
glareColorDark?: string;
|
|
19
|
+
glareColorLight?: string;
|
|
20
|
+
/** Seconds for one glare sweep. */
|
|
21
|
+
animationDuration?: number;
|
|
22
|
+
'data-cy'?: string;
|
|
23
|
+
/** Render as another element or component, e.g. a router `Link` (then pass its props such as `to`). */
|
|
24
|
+
as?: ElementType;
|
|
25
|
+
to?: string;
|
|
26
|
+
href?: string;
|
|
27
|
+
target?: string;
|
|
28
|
+
rel?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const GlareButton: ({ children, nowrap, onClick, disabled, fullWidth, disabledColor, buttonId, className, backgroundColor, textColor, borderColor, glareColorDark, glareColorLight, animationDuration, ...props }: GlareButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default GlareButton;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import { Button } from "./Button.styles.js";
|
|
4
|
-
import { colors } from "../../styles/colors.js";
|
|
5
3
|
import { useInView } from "react-intersection-observer";
|
|
6
4
|
import { useState, useRef, useId, useEffect } from "react";
|
|
7
5
|
import styled, { css, keyframes } from "styled-components";
|
|
6
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
8
7
|
const config = {
|
|
9
|
-
colorDark: "
|
|
8
|
+
colorDark: "var(--stokr-color-blue-600)",
|
|
10
9
|
colorLight: "#9bfcfd",
|
|
11
|
-
colorFooter: colors.blue,
|
|
12
10
|
strokeWidth: 2,
|
|
13
11
|
padding: 5,
|
|
14
12
|
baseHeight: 50
|
|
@@ -70,7 +68,7 @@ const GlareShape = styled.rect.withConfig({
|
|
|
70
68
|
`;
|
|
71
69
|
const GlareButton = ({
|
|
72
70
|
children,
|
|
73
|
-
nowrap =
|
|
71
|
+
nowrap = true,
|
|
74
72
|
onClick,
|
|
75
73
|
disabled = false,
|
|
76
74
|
fullWidth = false,
|
|
@@ -121,7 +119,7 @@ const GlareButton = ({
|
|
|
121
119
|
});
|
|
122
120
|
useEffect(() => {
|
|
123
121
|
let mediaTimeoutId;
|
|
124
|
-
mediaQueryRef.current = window.matchMedia(
|
|
122
|
+
mediaQueryRef.current = window.matchMedia(breakpoint.query.max.Medium);
|
|
125
123
|
const handleMediaChange = (_event) => {
|
|
126
124
|
if (mediaTimeoutId != null) clearTimeout(mediaTimeoutId);
|
|
127
125
|
mediaTimeoutId = setTimeout(updateDimensions, 400);
|
|
@@ -252,22 +250,6 @@ const GlareButton = ({
|
|
|
252
250
|
)
|
|
253
251
|
] }) });
|
|
254
252
|
};
|
|
255
|
-
GlareButton.propTypes = {
|
|
256
|
-
children: PropTypes.node.isRequired,
|
|
257
|
-
nowrap: PropTypes.bool,
|
|
258
|
-
onClick: PropTypes.func.isRequired,
|
|
259
|
-
disabled: PropTypes.bool,
|
|
260
|
-
fullWidth: PropTypes.bool,
|
|
261
|
-
disabledColor: PropTypes.string,
|
|
262
|
-
buttonId: PropTypes.string,
|
|
263
|
-
className: PropTypes.string,
|
|
264
|
-
backgroundColor: PropTypes.string,
|
|
265
|
-
textColor: PropTypes.string,
|
|
266
|
-
borderColor: PropTypes.string,
|
|
267
|
-
glareColorDark: PropTypes.string,
|
|
268
|
-
glareColorLight: PropTypes.string,
|
|
269
|
-
animationDuration: PropTypes.number
|
|
270
|
-
};
|
|
271
253
|
export {
|
|
272
254
|
GlareButton
|
|
273
255
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const Card: 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
|
+
lessPadding?: boolean;
|
|
5
|
+
lessPaddingHorizontal?: boolean;
|
|
6
|
+
lessPaddingVertical?: boolean;
|
|
7
|
+
chartPadding?: boolean;
|
|
8
|
+
noPadding?: boolean;
|
|
9
|
+
grow?: number | string;
|
|
10
|
+
}>> & string;
|
|
11
|
+
export declare const CardTitle: 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 CardTitleContainer: 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 CardRightText: 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 CardLeftText: 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 CardHeader: 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
|
+
paddingRight?: string;
|
|
27
|
+
}>> & string;
|
|
28
|
+
export declare const CardHeaderRegular: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
29
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
30
|
+
}> & string;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import rwd from "../../styles/rwd.js";
|
|
3
2
|
import { SelectWrapper } from "../Input/Select.styles.js";
|
|
4
|
-
import
|
|
3
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
5
4
|
const Card = styled.div.withConfig({
|
|
6
5
|
shouldForwardProp: (props) => !["lessPadding", "lessPaddingHorizontal", "lessPaddingVertical", "chartPadding", "noPadding", "grow"].includes(
|
|
7
6
|
props
|
|
8
7
|
)
|
|
9
8
|
})`
|
|
10
9
|
padding: 28px 22px;
|
|
11
|
-
background:
|
|
10
|
+
background: var(--stokr-background-default);
|
|
12
11
|
|
|
13
|
-
${
|
|
12
|
+
${breakpoint.Medium`
|
|
14
13
|
padding: 40px 50px;
|
|
15
14
|
|
|
16
15
|
${(props) => props.lessPadding && css`
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import styled, { css, keyframes } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { elevation } from "../../styles/elevation.js";
|
|
5
|
-
import { radius, space } from "../../styles/spacing.js";
|
|
6
|
-
import { typography } from "../../styles/typography.js";
|
|
2
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
7
4
|
const SPRING = `553ms linear(0, 0.0258, 0.0896, 0.1748, 0.27, 0.3669, 0.4604, 0.5471, 0.6253, 0.6941, 0.7535, 0.804, 0.8462, 0.881, 0.9094, 0.9322, 0.9502, 0.9644, 0.9753, 0.9835, 0.9897, 0.9942, 0.9974, 0.9996, 1.001, 1.0019, 1.0024, 1.0026, 1.0026, 1.0025, 1.0023, 1.0021, 1)`;
|
|
8
5
|
const CONTENT = "500ms ease-in-out";
|
|
9
6
|
const reducedMotion = css`
|
|
@@ -46,8 +43,8 @@ const TabList = styled.div`
|
|
|
46
43
|
position: relative;
|
|
47
44
|
display: flex;
|
|
48
45
|
width: 100%;
|
|
49
|
-
background:
|
|
50
|
-
box-shadow: inset 0 -1px 0
|
|
46
|
+
background: var(--stokr-background-surface);
|
|
47
|
+
box-shadow: inset 0 -1px 0 var(--stokr-border-subtle);
|
|
51
48
|
|
|
52
49
|
${({ $scrollMarginTop }) => $scrollMarginTop && css`
|
|
53
50
|
[role='tab'] {
|
|
@@ -68,7 +65,7 @@ const TabList = styled.div`
|
|
|
68
65
|
`;
|
|
69
66
|
const TabHighlight = styled(TabHighlightBase)`
|
|
70
67
|
bottom: -1px;
|
|
71
|
-
background:
|
|
68
|
+
background: var(--stokr-background-default);
|
|
72
69
|
`;
|
|
73
70
|
const FitHighlight = styled.span`
|
|
74
71
|
position: absolute;
|
|
@@ -79,7 +76,7 @@ const FitHighlight = styled.span`
|
|
|
79
76
|
z-index: 0;
|
|
80
77
|
width: var(--tab-width);
|
|
81
78
|
transform: translateX(var(--tab-left));
|
|
82
|
-
background:
|
|
79
|
+
background: var(--stokr-background-default);
|
|
83
80
|
pointer-events: none;
|
|
84
81
|
transition:
|
|
85
82
|
transform 553ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
@@ -90,7 +87,7 @@ const FitHighlight = styled.span`
|
|
|
90
87
|
${reducedMotion};
|
|
91
88
|
`;
|
|
92
89
|
const Tab = styled.button`
|
|
93
|
-
${
|
|
90
|
+
${text("subtitleM")};
|
|
94
91
|
${tabColorTransition};
|
|
95
92
|
position: relative;
|
|
96
93
|
z-index: 1;
|
|
@@ -98,7 +95,7 @@ const Tab = styled.button`
|
|
|
98
95
|
side padding looks the same as Figma's 32px while not forcing a tab wider. */
|
|
99
96
|
flex: 1 1 0;
|
|
100
97
|
min-width: 0;
|
|
101
|
-
padding:
|
|
98
|
+
padding: var(--stokr-space-4) var(--stokr-space-2);
|
|
102
99
|
border: none;
|
|
103
100
|
cursor: pointer;
|
|
104
101
|
background: transparent;
|
|
@@ -108,20 +105,20 @@ const Tab = styled.button`
|
|
|
108
105
|
opacity: 0.5;
|
|
109
106
|
}
|
|
110
107
|
/* Figma: closed tabs in #9b9b9b, a lighter grey than the tertiary text token. */
|
|
111
|
-
color: ${({ $active }) => $active ?
|
|
108
|
+
color: ${({ $active }) => $active ? "var(--stokr-text-primary)" : "var(--stokr-text-tertiary)"};
|
|
112
109
|
|
|
113
110
|
${({ $fit, $stretch, $filled }) => $fit && css`
|
|
114
111
|
flex: 0 0 auto;
|
|
115
|
-
padding:
|
|
112
|
+
padding: var(--stokr-space-4) var(--stokr-space-8);
|
|
116
113
|
white-space: nowrap;
|
|
117
|
-
background: ${$filled ?
|
|
114
|
+
background: ${$filled ? "var(--stokr-background-default)" : "transparent"};
|
|
118
115
|
|
|
119
116
|
/* Figma mobile: the tabs share the row (still scrolling once the labels outgrow it). */
|
|
120
117
|
${$stretch && css`
|
|
121
|
-
${
|
|
118
|
+
${breakpoint.below.MLarge`
|
|
122
119
|
flex: 1 0 auto;
|
|
123
|
-
padding:
|
|
124
|
-
}
|
|
120
|
+
padding: var(--stokr-space-4) var(--stokr-space-5);
|
|
121
|
+
`}
|
|
125
122
|
`}
|
|
126
123
|
`}
|
|
127
124
|
`;
|
|
@@ -130,32 +127,32 @@ const TabDivider = styled.div`
|
|
|
130
127
|
z-index: 1;
|
|
131
128
|
flex: 0 0 1px;
|
|
132
129
|
width: 1px;
|
|
133
|
-
background:
|
|
130
|
+
background: var(--stokr-border-subtle);
|
|
134
131
|
|
|
135
132
|
${({ $edge }) => $edge && css`
|
|
136
|
-
${
|
|
133
|
+
${breakpoint.below.MLarge`
|
|
137
134
|
display: none;
|
|
138
|
-
}
|
|
135
|
+
`}
|
|
139
136
|
`}
|
|
140
137
|
`;
|
|
141
138
|
const TabCard = styled.div`
|
|
142
139
|
display: flex;
|
|
143
140
|
flex-direction: column;
|
|
144
141
|
overflow: hidden;
|
|
145
|
-
background:
|
|
146
|
-
border: 1px solid
|
|
147
|
-
border-radius:
|
|
148
|
-
box-shadow:
|
|
142
|
+
background: var(--stokr-background-default);
|
|
143
|
+
border: 1px solid var(--stokr-border-subtle);
|
|
144
|
+
border-radius: var(--stokr-radius-lg);
|
|
145
|
+
box-shadow: var(--stokr-elevation-xs);
|
|
149
146
|
`;
|
|
150
147
|
const TabCardBody = styled.div`
|
|
151
148
|
display: flex;
|
|
152
149
|
flex-direction: column;
|
|
153
|
-
gap:
|
|
154
|
-
padding:
|
|
150
|
+
gap: var(--stokr-space-4);
|
|
151
|
+
padding: var(--stokr-space-6);
|
|
155
152
|
|
|
156
|
-
${
|
|
157
|
-
padding:
|
|
158
|
-
}
|
|
153
|
+
${breakpoint.below.MLarge`
|
|
154
|
+
padding: var(--stokr-space-4);
|
|
155
|
+
`}
|
|
159
156
|
`;
|
|
160
157
|
export {
|
|
161
158
|
FitHighlight,
|
|
@@ -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
|
`;
|
|
@@ -10,7 +10,6 @@ export declare const Label: import('styled-components/dist/types').IStyledCompon
|
|
|
10
10
|
isUp?: boolean;
|
|
11
11
|
active?: boolean;
|
|
12
12
|
error?: boolean;
|
|
13
|
-
$variant?: import('../..').FieldVariant;
|
|
14
13
|
}>, "as" | "forwardedAs"> & {
|
|
15
14
|
as?: import('styled-components').WebTarget;
|
|
16
15
|
forwardedAs?: import('styled-components').WebTarget;
|