@stokr/components-library 4.2.6 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -118
- package/dist/components/AdminDashboard/Table/Table.styles.d.ts +110 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +21 -20
- package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
- package/dist/components/BackButton/BackButton.styles.d.ts +24 -0
- package/dist/components/BackButton/BackButton.styles.js +15 -16
- package/dist/components/Background/Background.styles.d.ts +30 -0
- package/dist/components/Background/Background.styles.js +3 -3
- package/dist/components/BasicTable/BasicTable.d.ts +14 -0
- package/dist/components/BasicTable/BasicTable.js +0 -10
- package/dist/components/BasicTable/BasicTable.styles.d.ts +22 -0
- package/dist/components/BasicTable/BasicTable.styles.js +6 -7
- package/dist/components/BlogPost/BlogPost.js +3 -3
- package/dist/components/BlogPost/BlogPost.styles.d.ts +67 -0
- package/dist/components/BlogPost/BlogPost.styles.js +14 -20
- package/dist/components/Button/Button.styles.d.ts +12 -8
- package/dist/components/Button/Button.styles.js +131 -115
- package/dist/components/Button/GlareButton.d.ts +31 -0
- package/dist/components/Button/GlareButton.js +4 -22
- package/dist/components/Card/Card.styles.d.ts +30 -0
- package/dist/components/Card/Card.styles.js +3 -4
- package/dist/components/CardTabs/CardTabs.styles.js +26 -29
- package/dist/components/ChartLegend/ChartLegend.styles.d.ts +46 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +4 -5
- package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.styles.js +10 -12
- package/dist/components/Checklist/ChecklistCard.d.ts +18 -0
- package/dist/components/Checklist/ChecklistCard.js +4 -17
- package/dist/components/Checklist/ChecklistCard.styles.d.ts +17 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +7 -7
- package/dist/components/Chips/Chip.d.ts +18 -0
- package/dist/components/Chips/Chip.js +4 -20
- package/dist/components/Chips/Chip.styles.d.ts +23 -0
- package/dist/components/Chips/Chip.styles.js +3 -6
- package/dist/components/Chips/ChipWrapper.js +2 -2
- package/dist/components/Collapsible/Collapsible.d.ts +4 -10
- package/dist/components/Collapsible/Collapsible.js +14 -6
- package/dist/components/Collapsible/Collapsible.styles.d.ts +1 -3
- package/dist/components/Collapsible/Collapsible.styles.js +19 -36
- package/dist/components/ComponentScroll/ComponentScroll.js +2 -1
- package/dist/components/ComponentScroll/ComponentScroll.styles.d.ts +34 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +15 -12
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +11 -13
- package/dist/components/ConfirmModal/ConfirmModal.styles.d.ts +18 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +6 -7
- package/dist/components/Country/CountrySelect.js +20 -15
- package/dist/components/CryptoAddress/ComponentWrap.d.ts +9 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +7 -10
- package/dist/components/CryptoAddress/CryptoAddress.d.ts +45 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +9 -41
- package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +85 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +21 -22
- package/dist/components/CryptoAddress/RadioWrap.d.ts +21 -0
- package/dist/components/CryptoAddress/RadioWrap.js +1 -16
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.d.ts +30 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +19 -11
- package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.d.ts +12 -0
- package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.js +28 -0
- package/dist/components/FAQ/FAQ.js +18 -18
- package/dist/components/FAQ/FAQ.styles.d.ts +5 -12
- package/dist/components/FAQ/FAQ.styles.js +3 -61
- package/dist/components/Form/Form.styles.d.ts +22 -0
- package/dist/components/Form/Form.styles.js +7 -8
- package/dist/components/Grid/Grid.styles.d.ts +49 -0
- package/dist/components/Grid/Grid.styles.js +37 -40
- package/dist/components/IdentityInfo/IdentityInfo.js +1 -2
- package/dist/components/IdentityInfo/IdentityInfo.styles.d.ts +24 -0
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +6 -9
- package/dist/components/InfoBox/InfoBox.d.ts +20 -0
- package/dist/components/InfoBox/InfoBox.js +24 -78
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -3
- package/dist/components/Input/DatePickerInput.d.ts +24 -0
- package/dist/components/Input/DatePickerInput.js +2 -13
- package/dist/components/Input/DatePickerInput.styles.d.ts +18 -0
- package/dist/components/Input/DatePickerInput.styles.js +27 -24
- package/dist/components/Input/Input.d.ts +0 -3
- package/dist/components/Input/Input.js +3 -5
- package/dist/components/Input/Input.styles.d.ts +1 -4
- package/dist/components/Input/Input.styles.js +24 -77
- package/dist/components/Input/InputPassword.styles.d.ts +32 -0
- package/dist/components/Input/InputPassword.styles.js +11 -12
- package/dist/components/Input/InputWithButton.styles.d.ts +14 -0
- package/dist/components/Input/InputWithButton.styles.js +5 -6
- package/dist/components/Input/MultiSelect.d.ts +60 -0
- package/dist/components/Input/MultiSelect.js +20 -52
- package/dist/components/Input/OtpInput.d.ts +17 -0
- package/dist/components/Input/OtpInput.js +8 -15
- package/dist/components/Input/RangeInput.d.ts +14 -0
- package/dist/components/Input/RangeInput.js +2 -17
- package/dist/components/Input/SearchInput.styles.d.ts +15 -0
- package/dist/components/Input/SearchInput.styles.js +10 -11
- package/dist/components/Input/Select.js +156 -80
- package/dist/components/Input/Select.styles.js +16 -118
- package/dist/components/Input/TableFilterDropdown.d.ts +33 -0
- package/dist/components/Input/TableFilterDropdown.js +6 -39
- package/dist/components/Input/Textarea.styles.d.ts +9 -0
- package/dist/components/Input/Textarea.styles.js +9 -10
- package/dist/components/MaterialIcon/MaterialIcon.d.ts +17 -7
- package/dist/components/MaterialIcon/MaterialIcon.js +14 -3
- package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
- package/dist/components/MaterialIcon/requiredIcons.js +0 -2
- package/dist/components/MenuNav/MenuNav.styles.d.ts +6 -0
- package/dist/components/MenuNav/MenuNav.styles.js +3 -0
- package/dist/components/Modal/Modal.styles.js +35 -36
- package/dist/components/Modal/PaymentModal.d.ts +55 -0
- package/dist/components/Modal/PaymentModal.js +11 -13
- package/dist/components/Modal/SideModal.styles.js +13 -14
- package/dist/components/Modal/SideModalParts.js +18 -20
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.d.ts +15 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +3 -4
- package/dist/components/NotificationCounter/NotificationCounter.styles.d.ts +8 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -3
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/Number/Number.styles.d.ts +4 -0
- package/dist/components/Number/Number.styles.js +2 -3
- package/dist/components/Pagination/Pagination.styles.d.ts +15 -0
- package/dist/components/Pagination/Pagination.styles.js +12 -11
- package/dist/components/Payment/DetailRows.d.ts +14 -0
- package/dist/components/Payment/DetailRows.js +1 -2
- package/dist/components/Payment/DetailsToggle.d.ts +23 -0
- package/dist/components/Payment/DetailsToggle.js +12 -4
- package/dist/components/Payment/PaymentDetailsCard.d.ts +95 -0
- package/dist/components/Payment/PaymentDetailsCard.js +32 -23
- package/dist/components/Payment/PaymentDisplay.d.ts +59 -0
- package/dist/components/Payment/PaymentDisplay.js +18 -11
- package/dist/components/Payment/PaymentPendingCard.d.ts +39 -0
- package/dist/components/Payment/PaymentPendingCard.js +13 -13
- package/dist/components/Payment/PaymentSuccessCard.d.ts +41 -0
- package/dist/components/Payment/PaymentSuccessCard.js +27 -11
- package/dist/components/Payment/TimerComponent.d.ts +26 -0
- package/dist/components/Payment/TimerComponent.js +6 -7
- package/dist/components/Process/Process.styles.d.ts +11 -0
- package/dist/components/Process/Process.styles.js +22 -19
- package/dist/components/ProfileBadge/ProfileBadge.d.ts +13 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +14 -15
- package/dist/components/ProfileBadge/ProfileBadge.styles.d.ts +10 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -9
- package/dist/components/ProfileBox/ProfileBox.js +3 -3
- package/dist/components/ProfileBox/ProfileBox.styles.d.ts +22 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +18 -7
- package/dist/components/Radio/Radio.styles.d.ts +23 -0
- package/dist/components/Radio/Radio.styles.js +19 -11
- package/dist/components/RefreshButton/RefreshButton.styles.d.ts +29 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +5 -6
- package/dist/components/RequestDataBox/RequestDataBox.styles.d.ts +9 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +4 -5
- package/dist/components/Section/Section.d.ts +1 -1
- package/dist/components/Section/Section.js +4 -3
- package/dist/components/Section/Section.styles.d.ts +5 -0
- package/dist/components/Section/Section.styles.js +31 -36
- package/dist/components/SectionTitle/SectionTitle.styles.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.js +8 -8
- package/dist/components/SmartLink/SmartLink.js +2 -2
- package/dist/components/Snackbar/Snackbar.styles.d.ts +28 -0
- package/dist/components/Snackbar/Snackbar.styles.js +10 -29
- package/dist/components/SpanButton/SpanButton.styles.js +2 -2
- package/dist/components/StatusDot/StatusDot.d.ts +29 -0
- package/dist/components/StatusDot/StatusDot.js +17 -23
- package/dist/components/StatusDot/StatusDot.styles.d.ts +20 -0
- package/dist/components/StatusTag/StatusTag.d.ts +35 -0
- package/dist/components/StatusTag/StatusTag.js +9 -38
- package/dist/components/StatusTag/StatusTag.styles.d.ts +28 -0
- package/dist/components/StatusTag/StatusTag.styles.js +6 -6
- package/dist/components/StepController/StepController.styles.d.ts +23 -0
- package/dist/components/StepController/StepController.styles.js +12 -14
- package/dist/components/StokrLoader/StokrLoader.d.ts +9 -1
- package/dist/components/StokrLoader/StokrLoader.js +50 -19
- package/dist/components/SvgIcons/AdminBadgeSvg.js +1 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +1 -0
- package/dist/components/SvgIcons/LogoSvg.js +1 -11
- package/dist/components/SvgIcons/RefreshSvg.js +1 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +2 -4
- package/dist/components/Switch/Switch.styles.d.ts +20 -0
- package/dist/components/Switch/Switch.styles.js +10 -11
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/TabsNav/TabsNav.styles.d.ts +25 -0
- package/dist/components/TabsNav/TabsNav.styles.js +8 -9
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +11 -27
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +57 -0
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +25 -107
- package/dist/components/Text/Text.styles.d.ts +17 -1
- package/dist/components/Text/Text.styles.js +50 -25
- package/dist/components/TextLink/TextLink.styles.d.ts +16 -0
- package/dist/components/TextLink/TextLink.styles.js +4 -4
- package/dist/components/Timeline/Timeline.styles.d.ts +41 -0
- package/dist/components/Timeline/Timeline.styles.js +14 -15
- package/dist/components/Timeline/TimelineStep.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.styles.js +2 -3
- package/dist/components/breakdown/Breakdown.d.ts +18 -0
- package/dist/components/breakdown/Breakdown.js +7 -7
- package/dist/components/logo/Logo.js +1 -1
- package/dist/design-system/css/base.css +74 -0
- package/dist/design-system/css/index.css +5 -0
- package/dist/design-system/fonts/Inter-LICENSE.txt +93 -0
- package/dist/design-system/fonts/inter-bitcoin-sign.woff2 +0 -0
- package/dist/design-system/fonts/inter-latin-ext.woff2 +0 -0
- package/dist/design-system/fonts/inter-latin.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-ext-italic.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-ext.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin-italic.woff2 +0 -0
- package/dist/design-system/fonts/open-sans-latin.woff2 +0 -0
- package/dist/design-system/generated/fonts.css +296 -0
- package/dist/design-system/generated/text-classes.css +198 -0
- package/dist/design-system/generated/text-styles.d.ts +26 -0
- package/dist/design-system/generated/text-styles.js +179 -0
- package/dist/design-system/generated/tokens.css +429 -0
- package/dist/design-system/index.d.ts +9 -0
- package/dist/design-system/stories/foundations.d.ts +31 -0
- package/dist/design-system/stories/foundationsData.d.ts +18 -0
- package/dist/design-system/styled/breakpoint.d.ts +43 -0
- package/dist/design-system/styled/breakpoint.js +27 -0
- package/dist/design-system/styled/build-theme.d.ts +21 -0
- package/dist/design-system/styled/build-theme.js +27 -0
- package/dist/design-system/styled/text.d.ts +3 -0
- package/dist/design-system/styled/text.js +5 -0
- package/dist/design-system/styled/theme.d.ts +6 -0
- package/dist/design-system/tokens/breakpoints.d.ts +17 -0
- package/dist/design-system/tokens/breakpoints.js +16 -0
- package/dist/design-system/tokens/colors.d.ts +92 -0
- package/dist/design-system/tokens/colors.js +98 -0
- package/dist/design-system/tokens/fonts.d.ts +32 -0
- package/dist/design-system/tokens/fonts.js +49 -0
- package/dist/design-system/tokens/index.d.ts +6 -0
- package/dist/design-system/tokens/layout.d.ts +71 -0
- package/dist/design-system/tokens/layout.js +40 -0
- package/dist/design-system/tokens/semantic.d.ts +272 -0
- package/dist/design-system/tokens/semantic.js +76 -0
- package/dist/design-system/tokens/typography.d.ts +38 -0
- package/dist/design-system/tokens/typography.js +120 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -1
- package/dist/index.d.ts +117 -122
- package/dist/index.js +50 -62
- package/dist/static/images/globe.svg.js +5 -0
- package/dist/static/images/numbers/number_eight.svg +1 -1
- package/dist/static/images/numbers/number_eight.svg.js +1 -1
- package/dist/static/images/numbers/number_five.svg +2 -2
- package/dist/static/images/numbers/number_five.svg.js +1 -1
- package/dist/static/images/numbers/number_four.svg +1 -1
- package/dist/static/images/numbers/number_four.svg.js +1 -1
- package/dist/static/images/numbers/number_nine.svg +2 -2
- package/dist/static/images/numbers/number_nine.svg.js +1 -1
- package/dist/static/images/numbers/number_one.svg +2 -2
- package/dist/static/images/numbers/number_one.svg.js +1 -1
- package/dist/static/images/numbers/number_seven.svg +2 -2
- package/dist/static/images/numbers/number_seven.svg.js +1 -1
- package/dist/static/images/numbers/number_six.svg +2 -2
- package/dist/static/images/numbers/number_six.svg.js +1 -1
- package/dist/static/images/numbers/number_three.svg +1 -1
- package/dist/static/images/numbers/number_three.svg.js +1 -1
- package/dist/static/images/numbers/number_two.svg +2 -2
- package/dist/static/images/numbers/number_two.svg.js +1 -1
- package/dist/static/images/numbers/number_zero.svg +1 -1
- package/dist/static/images/numbers/number_zero.svg.js +1 -1
- package/dist/static/images/trash.svg +17 -0
- package/dist/static/images/trash.svg.js +5 -0
- package/dist/utils/customHooks.d.ts +4 -4
- package/dist/utils/customHooks.js +6 -6
- package/package.json +16 -11
- package/dist/components/AddressItem/AddressItem.d.ts +0 -38
- package/dist/components/AddressItem/AddressItem.js +0 -51
- package/dist/components/AddressItem/AddressItem.styles.d.ts +0 -31
- package/dist/components/AddressItem/AddressItem.styles.js +0 -73
- package/dist/components/Country/FlagFor.d.ts +0 -9
- package/dist/components/Country/FlagFor.js +0 -25
- package/dist/components/Country/flagLoaders.d.ts +0 -5
- package/dist/components/Country/flagLoaders.js +0 -270
- package/dist/components/Country/flagStore.d.ts +0 -6
- package/dist/components/Country/flagStore.js +0 -29
- package/dist/components/FAQ/FAQ.d.ts +0 -29
- package/dist/components/Input/Select.d.ts +0 -57
- package/dist/components/Input/Select.styles.d.ts +0 -89
- package/dist/components/PanelCard/PanelCard.d.ts +0 -51
- package/dist/components/PanelCard/PanelCard.js +0 -35
- package/dist/components/PanelCard/PanelCard.styles.d.ts +0 -29
- package/dist/components/PanelCard/PanelCard.styles.js +0 -87
- package/dist/components/StepSidebar/MobileStepProgress.d.ts +0 -12
- package/dist/components/StepSidebar/MobileStepProgress.js +0 -14
- package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +0 -15
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +0 -42
- package/dist/components/StepSidebar/StepProgress.d.ts +0 -14
- package/dist/components/StepSidebar/StepProgress.js +0 -14
- package/dist/components/StepSidebar/StepProgress.styles.d.ts +0 -30
- package/dist/components/StepSidebar/StepProgress.styles.js +0 -103
- package/dist/components/StepSidebar/StepSidebar.d.ts +0 -36
- package/dist/components/StepSidebar/StepSidebar.js +0 -58
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +0 -54
- package/dist/components/StepSidebar/StepSidebar.styles.js +0 -175
- package/dist/constants/chainLogos.d.ts +0 -9
- package/dist/constants/chainLogos.js +0 -17
- package/dist/static/images/address-refreshing.gif.js +0 -4
- package/dist/static/images/chains/avalanche.svg +0 -7
- package/dist/static/images/chains/avalanche.svg.js +0 -4
- package/dist/static/images/chains/ethereum.svg +0 -14
- package/dist/static/images/chains/ethereum.svg.js +0 -4
- package/dist/static/images/chains/liquid.svg +0 -7
- package/dist/static/images/chains/liquid.svg.js +0 -4
- package/dist/static/images/chains/solana.svg +0 -29
- package/dist/static/images/chains/solana.svg.js +0 -4
- package/dist/static/images/chains/stellar.svg +0 -17
- package/dist/static/images/chains/stellar.svg.js +0 -4
- package/dist/static/images/chains/tempo.svg +0 -11
- package/dist/static/images/chains/tempo.svg.js +0 -4
- package/dist/static/images/process-waiting.gif.js +0 -4
- package/dist/styles/borderedField.d.ts +0 -11
- package/dist/styles/borderedField.js +0 -56
- package/dist/styles/colors.d.ts +0 -68
- package/dist/styles/colors.js +0 -69
- package/dist/styles/elevation.d.ts +0 -13
- package/dist/styles/elevation.js +0 -15
- package/dist/styles/global.js +0 -63
- package/dist/styles/rwd.d.ts +0 -55
- package/dist/styles/rwd.js +0 -79
- package/dist/styles/spacing.d.ts +0 -36
- package/dist/styles/spacing.js +0 -38
- package/dist/styles/theme.d.ts +0 -92
- package/dist/styles/theme.js +0 -36
- package/dist/styles/typography.d.ts +0 -42
- package/dist/styles/typography.js +0 -56
package/README.md
CHANGED
|
@@ -1,177 +1,206 @@
|
|
|
1
|
-
# @stokr/components-library
|
|
1
|
+
# 🧱 @stokr/components-library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Pure UI library for the STOKR apps: **React components**, **small helpers** and the **design system** (colours, type, spacing, dark mode).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- 📖 **Storybook** — every component live, with controls and code to copy: [storybook.stokr.io](https://storybook.stokr.io/)
|
|
6
|
+
- 🎨 **Design system guide** — [src/design-system/README.md](src/design-system/README.md)
|
|
7
|
+
- 📝 **Changelog** — [CHANGELOG.md](CHANGELOG.md)
|
|
8
|
+
- 🤖 **Rules for stories and AI agents** — [AGENTS.md](AGENTS.md)
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [
|
|
10
|
+
> ℹ️ The library holds **no business logic**: no API calls, no authentication, no Firebase, no runtime configuration. Auth, 2FA and data fetching live in the apps. Components receive data and callbacks as props.
|
|
11
|
+
|
|
12
|
+
## 📑 Contents
|
|
13
|
+
|
|
14
|
+
- [🚀 Quick start](#quick-start)
|
|
15
|
+
- [📦 What is inside](#inside)
|
|
16
|
+
- [🎨 Design system](#design-system)
|
|
17
|
+
- [🧰 Helpers](#helpers)
|
|
18
|
+
- [🛠️ Development](#development)
|
|
19
|
+
- [⬆️ Upgrading to 5.0.0](#upgrading)
|
|
20
|
+
- [🧯 Troubleshooting](#troubleshooting)
|
|
21
|
+
- [📤 Releasing](#releasing)
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
<a id="quick-start"></a>
|
|
26
|
+
|
|
27
|
+
## 🚀 Quick start
|
|
16
28
|
|
|
17
|
-
**Install**
|
|
29
|
+
**1. Install**
|
|
18
30
|
|
|
19
31
|
```bash
|
|
20
32
|
npm install @stokr/components-library
|
|
21
33
|
npm install react react-dom styled-components react-router-dom
|
|
22
34
|
```
|
|
23
35
|
|
|
24
|
-
Peers: React 18
|
|
36
|
+
Peers: React 18 or 19, styled-components 6, react-router-dom 6 or 7.
|
|
25
37
|
|
|
26
|
-
**
|
|
38
|
+
**2. Import the design-system stylesheet once**, at the entry point of the app. It brings the fonts, the CSS variables (`--stokr-*`), the text classes and the baseline. Without it components render unstyled.
|
|
27
39
|
|
|
28
|
-
```
|
|
29
|
-
import
|
|
30
|
-
|
|
40
|
+
```tsx
|
|
41
|
+
import '@stokr/components-library/design-system.css'
|
|
42
|
+
```
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
root.render(
|
|
34
|
-
<BrowserRouter>
|
|
35
|
-
<App />
|
|
36
|
-
</BrowserRouter>,
|
|
37
|
-
)
|
|
44
|
+
**3. Use a component**
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
root.render(
|
|
42
|
-
<RouterWrapper>
|
|
43
|
-
<App />
|
|
44
|
-
</RouterWrapper>,
|
|
45
|
-
)
|
|
46
|
-
```
|
|
46
|
+
```tsx
|
|
47
|
+
import { Button, Input, Modal, ConfirmModal } from '@stokr/components-library'
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```jsx
|
|
51
|
-
import { AuthProvider } from '@stokr/components-library'
|
|
52
|
-
|
|
53
|
-
export default function App() {
|
|
54
|
-
return (
|
|
55
|
-
<AuthProvider
|
|
56
|
-
config={{
|
|
57
|
-
apiUrl: import.meta.env.VITE_API_URL,
|
|
58
|
-
baseUrlPublic: import.meta.env.VITE_BASE_URL_PUBLIC,
|
|
59
|
-
cookieDomain: import.meta.env.VITE_COOKIE_DOMAIN,
|
|
60
|
-
websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
|
|
61
|
-
onboardingUrl: import.meta.env.VITE_ONBOARDING_URL,
|
|
62
|
-
dashboardUrl: import.meta.env.VITE_DASHBOARD_URL,
|
|
63
|
-
adminUrl: import.meta.env.VITE_ADMIN_URL,
|
|
64
|
-
registerUrl: import.meta.env.VITE_REGISTER_URL,
|
|
65
|
-
firebase: {
|
|
66
|
-
apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
|
|
67
|
-
authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
|
|
68
|
-
projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
|
|
69
|
-
storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
|
|
70
|
-
messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
|
|
71
|
-
appId: import.meta.env.VITE_FIREBASE_APP_ID,
|
|
72
|
-
measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID,
|
|
73
|
-
},
|
|
74
|
-
}}>
|
|
75
|
-
{/* app */}
|
|
76
|
-
</AuthProvider>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
49
|
+
`<Button onClick={save}>Save</Button>
|
|
79
50
|
```
|
|
80
51
|
|
|
81
|
-
|
|
52
|
+
Each component's page in [Storybook](https://storybook.stokr.io/) has a **Show code** button with the snippet to copy, and the **Controls** panel lists every prop (required ones first).
|
|
82
53
|
|
|
83
|
-
**4.
|
|
54
|
+
**4. Only if you use them**
|
|
84
55
|
|
|
85
|
-
|
|
56
|
+
| You use… | You need | How |
|
|
57
|
+
| ---------------------------------------------------------------------------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------- |
|
|
58
|
+
| 🔗 Links and navigation (`SmartLink`, `TextLink`, `BackButton`, `MenuNav`, `Modal` back link) | A React Router above them | Wrap the app in `BrowserRouter` (or your router) |
|
|
59
|
+
| 🔣 Icons (`MaterialIcon`, and the components that draw one: `Modal`, `Pagination`, `Checkbox`, `Select`, `FAQ`…) | The icons registered once | `registerMaterialIcons(...)`, see below |
|
|
60
|
+
| 🌍 Texts (`<Copy id="…" />`) | A copy source | `setCopySource(en)` once at startup; without one, `Copy` shows its `fallback` then the id |
|
|
86
61
|
|
|
87
|
-
|
|
62
|
+
**Registering icons.** Only the Material Symbols you register are bundled. `requiredMaterialIcons` lists the keys the library's own components draw; an unregistered icon renders empty.
|
|
88
63
|
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
64
|
+
```tsx
|
|
65
|
+
import { registerMaterialIcons } from '@stokr/components-library'
|
|
66
|
+
import home from '@material-symbols/svg-400/outlined/home.svg?react'
|
|
67
|
+
import check600 from '@material-symbols/svg-600/outlined/check.svg?react'
|
|
68
|
+
|
|
69
|
+
// Call once at module scope, in code shared by server and client.
|
|
70
|
+
registerMaterialIcons({
|
|
71
|
+
'outlined/home': home,
|
|
72
|
+
'outlined/check@600': check600, // `@<weight>` for a weight other than 400, `-fill` for filled
|
|
73
|
+
// …plus every key of `requiredMaterialIcons` (see src/storybook/materialIcons.ts for a full example)
|
|
74
|
+
})
|
|
95
75
|
```
|
|
96
76
|
|
|
77
|
+
With Module Federation the host's registration covers the remotes (the library is a shared singleton).
|
|
78
|
+
|
|
97
79
|
---
|
|
98
80
|
|
|
99
|
-
|
|
81
|
+
<a id="inside"></a>
|
|
100
82
|
|
|
101
|
-
|
|
102
|
-
| ----------------- | -------------------------- | ----------------------------------------- |
|
|
103
|
-
| `apiUrl` | `VITE_API_URL` | Authenticated REST base |
|
|
104
|
-
| `baseUrlPublic` | `VITE_BASE_URL_PUBLIC` | Public API base |
|
|
105
|
-
| `cookieDomain` | `VITE_COOKIE_DOMAIN` | Auth cookie `domain` attribute |
|
|
106
|
-
| `websiteDomain` | `VITE_WEBSITE_DOMAIN` | Bare host → links / `getPlatformURL()` |
|
|
107
|
-
| `onboardingUrl` | `VITE_ONBOARDING_URL` | Full signup/sign-in app URL |
|
|
108
|
-
| `dashboardUrl` | `VITE_DASHBOARD_URL` | Investor dashboard URL |
|
|
109
|
-
| `adminUrl` | `VITE_ADMIN_URL` | Venture / admin dashboard URL |
|
|
110
|
-
| `registerUrl` | `VITE_REGISTER_URL` | Public registration entry |
|
|
111
|
-
| `firebase` | `VITE_FIREBASE_*` | Firebase client config |
|
|
83
|
+
## 📦 What is inside
|
|
112
84
|
|
|
113
|
-
|
|
85
|
+
Everything is imported from the package root: `import { … } from '@stokr/components-library'`. The sidebar of [Storybook](https://storybook.stokr.io/) follows these groups.
|
|
114
86
|
|
|
115
|
-
|
|
87
|
+
| | Group | Examples |
|
|
88
|
+
| --- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
89
|
+
| 🎨 | **Foundations** | `Text`, `Logo`, `Background`, `LottieAnimation`, `MaterialIcon`, `Copy`, and the design-system pages (Colors, Typography, Layout) |
|
|
90
|
+
| 🔘 | **Buttons** | `Button`, `GlareButton`, `BackButton`, `RefreshButton`, `TextLink` |
|
|
91
|
+
| ⌨️ | **Inputs** | `Input`, `InputPassword`, `Textarea`, `Select`, `MultiSelect`, `CountrySelect`, `DatePickerInput`, `OtpInput`, `RangeInput`, `SearchInput`, `Checkbox`, `Radio`, `Switch`, `Form` |
|
|
92
|
+
| 💬 | **Feedback** | `Modal`, `SideModal`, `ConfirmModal`, `SuccessModal`, `PaymentModal`, `Snackbar`, `Tooltip`, `InfoBox`, `InfoIcon`, `StatusTag`, `StatusDot`, `Skeleton`, `StokrLoader` |
|
|
93
|
+
| 🧭 | **Navigation** | `Tabs`, `TabsNav`, `CardTabs`, `Pagination`, `StepController`, `Timeline` |
|
|
94
|
+
| 🗂️ | **Data display** | `ReactTable`, `BasicTable`, `Card`, `Section`, `FAQ`, `Chip`, `Collapsible`, `QRCode`, `ProfileBox`, `CryptoAddress`, `ChartLegend`, `IdentityInfo`, `TaxResidenceCard` |
|
|
95
|
+
| 💳 | **Payment** | `PaymentDisplay`, `PaymentDetailsCard`, `PaymentPendingCard`, `PaymentSuccessCard`, `DetailRows`, `TimerComponent` |
|
|
96
|
+
| 📐 | **Layout** | `ComponentWrapper`, `Grid` helpers (`grid`, `layoutGrid`), `DisplayOnBreakpoint` |
|
|
116
97
|
|
|
117
|
-
|
|
98
|
+
Components that open (modals, drawers) are controlled by an `isOpen` prop; fields are controlled with `value` and `onChange`. Storybook shows the exact pattern for each.
|
|
118
99
|
|
|
119
100
|
---
|
|
120
101
|
|
|
121
|
-
|
|
102
|
+
<a id="design-system"></a>
|
|
122
103
|
|
|
123
|
-
|
|
104
|
+
## 🎨 Design system
|
|
124
105
|
|
|
125
|
-
|
|
106
|
+
**One source for the look.** The colours, type, spacing, radius, shadows and breakpoints of the STOKR UI kit are written once, in this library, and reach every app as CSS variables (`--stokr-*`). Components and apps use the **names**, never the values, and dark mode comes for free.
|
|
126
107
|
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
- **`hideInactivityModal`** — Suppress both built-in inactivity modals (warning + session expired).
|
|
131
|
-
- **`onSessionExpiredLoginClick`** — Called when the user clicks **Log in** on the session-expired modal.
|
|
132
|
-
- **`customValidateGetUser(user)`** — Hook after **`user/get`** succeeds (see `src/context/AuthContext.js`).
|
|
108
|
+
```tsx
|
|
109
|
+
import '@stokr/components-library/design-system.css' // once, at the app entry
|
|
110
|
+
import { text, breakpoint } from '@stokr/components-library'
|
|
133
111
|
|
|
134
|
-
|
|
112
|
+
const Title = styled.h1`
|
|
113
|
+
${text('titleXl')}
|
|
114
|
+
color: var(--stokr-text-primary);
|
|
115
|
+
${breakpoint.Medium` padding: var(--stokr-space-8); `}
|
|
116
|
+
`
|
|
117
|
+
```
|
|
135
118
|
|
|
136
|
-
|
|
119
|
+
📚 **Full guide** (what to use, where to change what, dark mode, fonts): [src/design-system/README.md](src/design-system/README.md) · 📖 **Browse it:** Foundations in [Storybook](https://storybook.stokr.io/)
|
|
137
120
|
|
|
138
|
-
|
|
139
|
-
2. **Session expired modal** — Shown when the idle deadline is reached (existing behaviour). The warning modal closes automatically at the same moment.
|
|
121
|
+
---
|
|
140
122
|
|
|
141
|
-
|
|
123
|
+
<a id="helpers"></a>
|
|
142
124
|
|
|
143
|
-
|
|
125
|
+
## 🧰 Helpers
|
|
144
126
|
|
|
145
|
-
|
|
127
|
+
Pure functions and hooks, also exported from the package root.
|
|
146
128
|
|
|
147
|
-
|
|
129
|
+
| Area | Exports |
|
|
130
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| 💶 Amounts and currencies | `formatAmount`, `formatAmountParts`, `formatPercent`, `parseAmount`, `projectUnit`, `paymentUnit`, `getCurrencySymbol`, `CURRENCY_CONFIG` |
|
|
132
|
+
| 📅 Dates and text | `formatDate`, `formatDateRange`, `capitalize`, `shortenAddress`, `km_ify` |
|
|
133
|
+
| 📱 Responsive | `breakpoint`, `useMediaQuery`, `useMobileView`, `useContainerSize`, `DisplayOnBreakpoint` |
|
|
134
|
+
| 📋 Clipboard and files | `copyTextToClipboard`, `useCopyToClipboard`, `saveAs`, `downloadCsv`, `toCsv` |
|
|
135
|
+
| ⏱️ Timers and polling | `useTimer`, `useTransactionPolling`, `useCooldown` |
|
|
136
|
+
| 🔐 Validation | `getPasswordCriteria`, `isPasswordValid`, `getPasswordEntropy`, `safeUrl` |
|
|
137
|
+
| 🌍 Copy | `Copy`, `setCopySource`, `resolveCopy`, `t` |
|
|
148
138
|
|
|
149
|
-
|
|
150
|
-
- **State (grouped):** `user` / `firebaseUser`, `isFetchingUser`, `avatar`; MFA (`waitingFor2fa`, `userMfaEnrollment`, `firebaseError`); verify-email (`verifyEmailError`, `isVerifyingEmail`); session UX (`loggedOutDueToInactivity`, `loggedOutDueToCookieExpiry`, `sessionExpiryPendingReason`, `showInactivityWarningModal`).
|
|
151
|
-
- **Actions (grouped):** `userRef`, `loginUser`, `logoutUser`, `getUser`, `setUser`, `updateUser`, `refreshIdToken`; `checkUserIsValid`, `checkTokenIsValid`; `uploadPhoto`, `deletePhoto`, `checkUserPhoto`; MFA enroll / verify / unenroll + `reset2faFlow`; subscription/onboarding helpers; password & email (`handleResetPassword`, `handleVerifyEmail`, `requestUpdateEmail`, …); wallets / PoA (`uploaProofOfAddress` keeps the source spelling); **`dismissSessionExpiryModal`**, **`extendSessionFromInactivityWarning`**, **`dismissInactivityWarningModal`**.
|
|
139
|
+
`formatAmount` and `formatDate` have a page under **Utils** in Storybook with live examples.
|
|
152
140
|
|
|
153
|
-
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
<a id="development"></a>
|
|
144
|
+
|
|
145
|
+
## 🛠️ Development
|
|
146
|
+
|
|
147
|
+
| Command | What it does |
|
|
148
|
+
| --------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
149
|
+
| `npm start` / `npm run storybook` | 📖 Storybook on port 6006 (regenerates the tokens first) |
|
|
150
|
+
| `npm test` | ✅ Vitest: design system (tokens vs the UI kit), every story renders, components and helpers |
|
|
151
|
+
| `npm run lint` | 🔎 ESLint on `src`, then `check:css-vars` |
|
|
152
|
+
| `npm run gen:tokens` | ⚙️ Regenerate `src/design-system/generated` from `tokens/` |
|
|
153
|
+
| `npm run check:tokens` | 🔒 Fails if `generated/` is out of date |
|
|
154
|
+
| `npm run check:css-vars` | 🔎 Fails on an undefined `--stokr-*` variable |
|
|
155
|
+
| `npm run check:media` | 📱 Fails if a raw width `@media` is added (use `breakpoint`) |
|
|
156
|
+
| `npm run build:dist` | 📦 Library build + static files + design-system stylesheet |
|
|
157
|
+
| `npm run build-storybook` | 🏗️ Static Storybook in `storybook-static` |
|
|
158
|
+
|
|
159
|
+
**The rules in one list** (details in [AGENTS.md](AGENTS.md) and the [design-system guide](src/design-system/README.md)):
|
|
160
|
+
|
|
161
|
+
- 🎨 Colours by role from the semantic tokens (`--stokr-text-*`, `--stokr-background-*`, `--stokr-border-*`, `--stokr-action-*`, `--stokr-status-*`, `--stokr-tag-*`); never a hex, `font-family` or raw `@media` in a component.
|
|
162
|
+
- 📖 One story file per component, with a `Default` story that sets only the required props.
|
|
163
|
+
- 🧩 New and touched components are TypeScript, without `prop-types`.
|
|
164
|
+
- 🔁 Changing a token: edit `tokens/`, run `npm run gen:tokens`, commit `generated/`.
|
|
154
165
|
|
|
155
166
|
---
|
|
156
167
|
|
|
157
|
-
|
|
168
|
+
<a id="upgrading"></a>
|
|
158
169
|
|
|
159
|
-
|
|
170
|
+
## ⬆️ Upgrading to 5.0.0
|
|
160
171
|
|
|
161
|
-
|
|
172
|
+
5.0.0 is a major release. The full list is in [CHANGELOG.md](CHANGELOG.md); the points that need an action in an app:
|
|
162
173
|
|
|
163
|
-
|
|
174
|
+
1. 🧵 **Import `@stokr/components-library/design-system.css` once.** Components now read CSS variables, so without it they are unstyled.
|
|
175
|
+
2. 📱 **`rwd` is now `breakpoint`**, and `Large` moved from 1024px to 1200px (992 < 1200 < 1440).
|
|
176
|
+
3. 🎨 **`colors`** is now the UI kit's colour ramp (`colors['blue-500']`, hex values). The old flat object (`colors.blue`, `colors.grey2`…), the old `theme` keys (`theme.cPrimary`…), `GlobalStyle`, `spacing`, `typography`, `media` and `getMedia` are gone: use `var(--stokr-*)`, `text()` and `breakpoint`.
|
|
177
|
+
4. 🔣 **Register `requiredMaterialIcons`**: components draw Material icons, not the old icon fonts.
|
|
178
|
+
5. 🌗 **Dark mode** is `data-theme="dark"` on `<html>`; nothing to change in components that use the semantic tokens.
|
|
179
|
+
6. 📏 **`rem` became `px`**: the library no longer depends on a 10px root font size.
|
|
164
180
|
|
|
165
|
-
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
<a id="troubleshooting"></a>
|
|
184
|
+
|
|
185
|
+
## 🧯 Troubleshooting
|
|
186
|
+
|
|
187
|
+
| Symptom | Cause and fix |
|
|
188
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
189
|
+
| 😶 Components look unstyled, wrong font | The stylesheet is not imported: `import '@stokr/components-library/design-system.css'` once at the entry. |
|
|
190
|
+
| 🌗 Something stays light (or unreadable) in dark mode | A hard-coded colour in the app. Use a semantic token (`var(--stokr-text-primary)`…). |
|
|
191
|
+
| 🔣 An icon renders empty | The icon is not registered: `registerMaterialIcons(...)`, including every key of `requiredMaterialIcons`. |
|
|
192
|
+
| 🧭 `useNavigate()` may be used only in the context of a `<Router>` | Wrap the app in a router. `SmartLink`, `TextLink`, `BackButton` and `MenuNav` need one. |
|
|
193
|
+
| ⚛️ Invalid hook call / duplicated React or styled-components | Dedupe the peers in Vite: `resolve: { dedupe: ['react', 'react-dom', 'styled-components'] }`. |
|
|
194
|
+
| 📏 A layout switches at the wrong width | Use `breakpoint` (`Large` is 1200px since 5.0.0) and check the width in the [design-system guide](src/design-system/README.md#app). |
|
|
166
195
|
|
|
167
196
|
---
|
|
168
197
|
|
|
169
|
-
|
|
198
|
+
<a id="releasing"></a>
|
|
199
|
+
|
|
200
|
+
## 📤 Releasing
|
|
170
201
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
| `npm run build:dist` | Library build + static copy |
|
|
175
|
-
| `npm run pub` | Build then publish (`npm login`) |
|
|
202
|
+
1. Add the changelog entry in [CHANGELOG.md](CHANGELOG.md).
|
|
203
|
+
2. `npm version <patch|minor|major>`.
|
|
204
|
+
3. `npm run pub` (builds `dist`, then publishes; `npm login` first).
|
|
176
205
|
|
|
177
|
-
|
|
206
|
+
Apps pick the new version up by updating their dependency (library first, then host, then remotes).
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
|
+
}> & string;
|
|
5
|
+
export declare const HeadWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
6
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
7
|
+
}> & string;
|
|
8
|
+
export declare const TableWrapper: 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 StyledTable: 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 Row: 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 Column: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
18
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
19
|
+
}, {
|
|
20
|
+
align?: string;
|
|
21
|
+
colWidth?: string;
|
|
22
|
+
minWidth?: string;
|
|
23
|
+
maxWidth?: string;
|
|
24
|
+
}>> & string;
|
|
25
|
+
export declare const Head: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
26
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
27
|
+
}, {
|
|
28
|
+
hidden?: boolean;
|
|
29
|
+
}>> & string;
|
|
30
|
+
export declare const Body: 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 TableCellType: 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
|
+
color?: string;
|
|
37
|
+
}>> & string;
|
|
38
|
+
export declare const TableDropdownIcon: 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
|
+
isActive?: 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
|
+
isActive?: boolean;
|
|
46
|
+
}>, "children">>> & string;
|
|
47
|
+
export declare const Styles: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
48
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
49
|
+
}> & string;
|
|
50
|
+
export declare const TableWrap: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
51
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
52
|
+
}> & string;
|
|
53
|
+
export declare const StyledTh: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "style"> & {
|
|
54
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
55
|
+
}, {
|
|
56
|
+
blue?: boolean;
|
|
57
|
+
width?: string;
|
|
58
|
+
minWidth?: string;
|
|
59
|
+
maxWidth?: string;
|
|
60
|
+
}>> & string;
|
|
61
|
+
export declare const StyledTd: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "style"> & {
|
|
62
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
63
|
+
}, {
|
|
64
|
+
blue?: boolean;
|
|
65
|
+
subTable?: boolean;
|
|
66
|
+
width?: string;
|
|
67
|
+
minWidth?: string;
|
|
68
|
+
maxWidth?: string;
|
|
69
|
+
}>> & string;
|
|
70
|
+
type RowStyles = (rowIndex?: number, rowData?: unknown) => ReturnType<typeof css> | string;
|
|
71
|
+
export declare const StyledTr: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "style"> & {
|
|
72
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
73
|
+
}, {
|
|
74
|
+
customRowStyles?: RowStyles;
|
|
75
|
+
rowIndex?: number;
|
|
76
|
+
rowData?: unknown;
|
|
77
|
+
customRowHoverStyles?: RowStyles;
|
|
78
|
+
}>> & string;
|
|
79
|
+
export declare const StyledReactTable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "style"> & {
|
|
80
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
81
|
+
}, {
|
|
82
|
+
customTableStyles?: () => ReturnType<typeof css> | string;
|
|
83
|
+
}>> & string & {
|
|
84
|
+
Tr: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "style"> & {
|
|
85
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
86
|
+
}, {
|
|
87
|
+
customRowStyles?: RowStyles;
|
|
88
|
+
rowIndex?: number;
|
|
89
|
+
rowData?: unknown;
|
|
90
|
+
customRowHoverStyles?: RowStyles;
|
|
91
|
+
}>> & string;
|
|
92
|
+
Th: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "style"> & {
|
|
93
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
94
|
+
}, {
|
|
95
|
+
blue?: boolean;
|
|
96
|
+
width?: string;
|
|
97
|
+
minWidth?: string;
|
|
98
|
+
maxWidth?: string;
|
|
99
|
+
}>> & string;
|
|
100
|
+
Td: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "style"> & {
|
|
101
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
102
|
+
}, {
|
|
103
|
+
blue?: boolean;
|
|
104
|
+
subTable?: boolean;
|
|
105
|
+
width?: string;
|
|
106
|
+
minWidth?: string;
|
|
107
|
+
maxWidth?: string;
|
|
108
|
+
}>> & string;
|
|
109
|
+
};
|
|
110
|
+
export {};
|
|
@@ -10,7 +10,7 @@ styled.div`
|
|
|
10
10
|
left: 0;
|
|
11
11
|
width: 100%;
|
|
12
12
|
overflow: hidden;
|
|
13
|
-
background-color:
|
|
13
|
+
background-color: var(--stokr-background-default);
|
|
14
14
|
`;
|
|
15
15
|
styled.div`
|
|
16
16
|
z-index: 0;
|
|
@@ -29,7 +29,7 @@ const Column = styled.div.withConfig({
|
|
|
29
29
|
})`
|
|
30
30
|
display: table-cell;
|
|
31
31
|
text-align: ${(props) => props.align};
|
|
32
|
-
font-family:
|
|
32
|
+
font-family: var(--stokr-font-family-base);
|
|
33
33
|
|
|
34
34
|
${(props) => props.colWidth && `
|
|
35
35
|
width: ${props.colWidth}
|
|
@@ -56,12 +56,11 @@ styled.div.withConfig({
|
|
|
56
56
|
|
|
57
57
|
${Row} {
|
|
58
58
|
${Column} {
|
|
59
|
-
border-bottom: 1px solid
|
|
59
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
${Column} {
|
|
64
|
-
color: ${(props) => props.theme.cProgress};
|
|
65
64
|
font-weight: 600;
|
|
66
65
|
font-size: 11px;
|
|
67
66
|
line-height: 20px;
|
|
@@ -82,19 +81,19 @@ styled.div`
|
|
|
82
81
|
|
|
83
82
|
& + ${Row} {
|
|
84
83
|
${Column} {
|
|
85
|
-
border-top: 1px solid
|
|
84
|
+
border-top: 1px solid var(--stokr-border-subtle);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
/* &:hover {
|
|
90
89
|
${Column} {
|
|
91
|
-
background-color:
|
|
90
|
+
background-color: var(--stokr-color-neutral-100);
|
|
92
91
|
}
|
|
93
92
|
} */
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
${Column} {
|
|
97
|
-
color:
|
|
96
|
+
color: var(--stokr-text-primary);
|
|
98
97
|
font-weight: 400;
|
|
99
98
|
font-size: 14px;
|
|
100
99
|
line-height: 20px;
|
|
@@ -105,7 +104,7 @@ styled.div`
|
|
|
105
104
|
styled.div`
|
|
106
105
|
display: inline-block;
|
|
107
106
|
background-color: ${(props) => props.color};
|
|
108
|
-
color:
|
|
107
|
+
color: var(--stokr-text-on-brand);
|
|
109
108
|
font-weight: 600;
|
|
110
109
|
min-width: 40px;
|
|
111
110
|
line-height: 24px;
|
|
@@ -163,14 +162,14 @@ const StyledTh = styled.th.withConfig({
|
|
|
163
162
|
font-size: 11px;
|
|
164
163
|
letter-spacing: 1.6px;
|
|
165
164
|
font-weight: 600;
|
|
166
|
-
background-color:
|
|
167
|
-
color:
|
|
168
|
-
border-bottom: 1px solid
|
|
165
|
+
background-color: var(--stokr-background-default);
|
|
166
|
+
color: var(--stokr-text-primary);
|
|
167
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
169
168
|
line-height: 20px;
|
|
170
169
|
|
|
171
170
|
${(props) => props.blue && `
|
|
172
|
-
background-color:
|
|
173
|
-
color:
|
|
171
|
+
background-color: var(--stokr-action-accent-bg);
|
|
172
|
+
color: var(--stokr-action-accent-text);
|
|
174
173
|
border:none;
|
|
175
174
|
`}
|
|
176
175
|
|
|
@@ -192,11 +191,11 @@ const StyledTd = styled.td.withConfig({
|
|
|
192
191
|
shouldForwardProp: (props) => !["blue", "subTable", "width", "minWidth", "maxWidth"].includes(props)
|
|
193
192
|
})`
|
|
194
193
|
padding: 26px 15px;
|
|
195
|
-
border-bottom: 1px solid
|
|
194
|
+
border-bottom: 1px solid var(--stokr-border-subtle);
|
|
196
195
|
font-size: 14px;
|
|
197
196
|
${(props) => props.blue && `
|
|
198
|
-
background-color:
|
|
199
|
-
color:
|
|
197
|
+
background-color: var(--stokr-action-accent-bg-hover);
|
|
198
|
+
color: var(--stokr-action-accent-text);
|
|
200
199
|
`}
|
|
201
200
|
|
|
202
201
|
${(props) => props.subTable && `
|
|
@@ -235,7 +234,7 @@ const StyledTr = styled.tr.withConfig({
|
|
|
235
234
|
}
|
|
236
235
|
`}
|
|
237
236
|
`;
|
|
238
|
-
const
|
|
237
|
+
const StyledReactTableBase = styled.table.withConfig({
|
|
239
238
|
shouldForwardProp: (props) => !["customTableStyles"].includes(props)
|
|
240
239
|
})`
|
|
241
240
|
width: 100%;
|
|
@@ -245,9 +244,11 @@ const StyledReactTable = styled.table.withConfig({
|
|
|
245
244
|
${props.customTableStyles()}
|
|
246
245
|
`}
|
|
247
246
|
`;
|
|
248
|
-
StyledReactTable
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
const StyledReactTable = Object.assign(StyledReactTableBase, {
|
|
248
|
+
Tr: StyledTr,
|
|
249
|
+
Th: StyledTh,
|
|
250
|
+
Td: StyledTd
|
|
251
|
+
});
|
|
251
252
|
export {
|
|
252
253
|
Column,
|
|
253
254
|
Row,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const BackButtonIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}, "children"> & Partial<Pick<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
4
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
5
|
+
}, "children">>> & string;
|
|
6
|
+
export declare const ForwardButtonIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
7
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
8
|
+
}, "children"> & Partial<Pick<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
9
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
10
|
+
}, "children">>> & string;
|
|
11
|
+
export declare const StyledBackButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react-router').LinkProps & import('react').RefAttributes<HTMLAnchorElement>, "style"> & {
|
|
12
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
13
|
+
}> & string & Omit<import('react').ForwardRefExoticComponent<import('react-router').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>, keyof import('react').Component<any, {}, any>>;
|
|
14
|
+
export declare const StyledBackButtonExternal: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "style"> & {
|
|
15
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
16
|
+
}> & string;
|
|
17
|
+
export declare const StyledWindowBackButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
18
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
19
|
+
}> & string;
|
|
20
|
+
export declare const StyledBackButtonClick: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
21
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
22
|
+
}, {
|
|
23
|
+
forward?: boolean;
|
|
24
|
+
}>> & string;
|