@stokr/components-library 4.2.6 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +147 -118
  2. package/dist/components/AddressItem/AddressItem.styles.js +12 -14
  3. package/dist/components/AdminDashboard/Table/Table.styles.d.ts +110 -0
  4. package/dist/components/AdminDashboard/Table/Table.styles.js +21 -20
  5. package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
  6. package/dist/components/BackButton/BackButton.styles.d.ts +24 -0
  7. package/dist/components/BackButton/BackButton.styles.js +15 -16
  8. package/dist/components/Background/Background.styles.d.ts +30 -0
  9. package/dist/components/Background/Background.styles.js +3 -3
  10. package/dist/components/BasicTable/BasicTable.d.ts +14 -0
  11. package/dist/components/BasicTable/BasicTable.js +0 -10
  12. package/dist/components/BasicTable/BasicTable.styles.d.ts +22 -0
  13. package/dist/components/BasicTable/BasicTable.styles.js +6 -7
  14. package/dist/components/BlogPost/BlogPost.js +3 -3
  15. package/dist/components/BlogPost/BlogPost.styles.d.ts +67 -0
  16. package/dist/components/BlogPost/BlogPost.styles.js +14 -20
  17. package/dist/components/Button/Button.styles.d.ts +12 -8
  18. package/dist/components/Button/Button.styles.js +131 -115
  19. package/dist/components/Button/GlareButton.d.ts +31 -0
  20. package/dist/components/Button/GlareButton.js +4 -22
  21. package/dist/components/Card/Card.styles.d.ts +30 -0
  22. package/dist/components/Card/Card.styles.js +3 -4
  23. package/dist/components/CardTabs/CardTabs.styles.js +26 -29
  24. package/dist/components/ChartLegend/ChartLegend.styles.d.ts +46 -0
  25. package/dist/components/ChartLegend/ChartLegend.styles.js +4 -5
  26. package/dist/components/Checkbox/Checkbox.styles.js +10 -12
  27. package/dist/components/Checklist/ChecklistCard.d.ts +18 -0
  28. package/dist/components/Checklist/ChecklistCard.js +4 -17
  29. package/dist/components/Checklist/ChecklistCard.styles.d.ts +17 -0
  30. package/dist/components/Checklist/ChecklistCard.styles.js +7 -7
  31. package/dist/components/Chips/Chip.d.ts +18 -0
  32. package/dist/components/Chips/Chip.js +4 -20
  33. package/dist/components/Chips/Chip.styles.d.ts +23 -0
  34. package/dist/components/Chips/Chip.styles.js +3 -6
  35. package/dist/components/Chips/ChipWrapper.js +2 -2
  36. package/dist/components/Collapsible/Collapsible.styles.js +20 -20
  37. package/dist/components/ComponentScroll/ComponentScroll.js +2 -1
  38. package/dist/components/ComponentScroll/ComponentScroll.styles.d.ts +34 -0
  39. package/dist/components/ComponentScroll/ComponentScroll.styles.js +15 -12
  40. package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +11 -13
  41. package/dist/components/ConfirmModal/ConfirmModal.styles.d.ts +18 -0
  42. package/dist/components/ConfirmModal/ConfirmModal.styles.js +6 -7
  43. package/dist/components/Country/CountrySelect.js +6 -6
  44. package/dist/components/CryptoAddress/ComponentWrap.d.ts +9 -0
  45. package/dist/components/CryptoAddress/ComponentWrap.js +7 -10
  46. package/dist/components/CryptoAddress/CryptoAddress.d.ts +45 -0
  47. package/dist/components/CryptoAddress/CryptoAddress.js +9 -41
  48. package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +85 -0
  49. package/dist/components/CryptoAddress/CryptoAddress.styles.js +21 -22
  50. package/dist/components/CryptoAddress/RadioWrap.d.ts +21 -0
  51. package/dist/components/CryptoAddress/RadioWrap.js +1 -16
  52. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.d.ts +30 -0
  53. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +19 -11
  54. package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.d.ts +12 -0
  55. package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.js +28 -0
  56. package/dist/components/FAQ/FAQ.styles.d.ts +2 -1
  57. package/dist/components/FAQ/FAQ.styles.js +15 -19
  58. package/dist/components/Form/Form.styles.d.ts +22 -0
  59. package/dist/components/Form/Form.styles.js +7 -8
  60. package/dist/components/Grid/Grid.styles.d.ts +49 -0
  61. package/dist/components/Grid/Grid.styles.js +37 -40
  62. package/dist/components/IdentityInfo/IdentityInfo.styles.d.ts +24 -0
  63. package/dist/components/IdentityInfo/IdentityInfo.styles.js +5 -6
  64. package/dist/components/InfoBox/InfoBox.d.ts +22 -0
  65. package/dist/components/InfoBox/InfoBox.js +26 -65
  66. package/dist/components/InfoIcon/InfoIcon.styles.js +2 -3
  67. package/dist/components/Input/DatePickerInput.d.ts +24 -0
  68. package/dist/components/Input/DatePickerInput.js +2 -13
  69. package/dist/components/Input/DatePickerInput.styles.d.ts +18 -0
  70. package/dist/components/Input/DatePickerInput.styles.js +27 -24
  71. package/dist/components/Input/Input.js +1 -0
  72. package/dist/components/Input/Input.styles.d.ts +1 -0
  73. package/dist/components/Input/Input.styles.js +27 -24
  74. package/dist/components/Input/InputPassword.styles.d.ts +32 -0
  75. package/dist/components/Input/InputPassword.styles.js +11 -12
  76. package/dist/components/Input/InputWithButton.styles.d.ts +14 -0
  77. package/dist/components/Input/InputWithButton.styles.js +5 -6
  78. package/dist/components/Input/MultiSelect.d.ts +60 -0
  79. package/dist/components/Input/MultiSelect.js +20 -52
  80. package/dist/components/Input/OtpInput.d.ts +17 -0
  81. package/dist/components/Input/OtpInput.js +8 -15
  82. package/dist/components/Input/RangeInput.d.ts +14 -0
  83. package/dist/components/Input/RangeInput.js +2 -17
  84. package/dist/components/Input/SearchInput.styles.d.ts +15 -0
  85. package/dist/components/Input/SearchInput.styles.js +10 -11
  86. package/dist/components/Input/Select.js +91 -25
  87. package/dist/components/Input/Select.styles.d.ts +2 -2
  88. package/dist/components/Input/Select.styles.js +24 -26
  89. package/dist/components/Input/TableFilterDropdown.d.ts +33 -0
  90. package/dist/components/Input/TableFilterDropdown.js +6 -39
  91. package/dist/components/Input/Textarea.styles.d.ts +9 -0
  92. package/dist/components/Input/Textarea.styles.js +9 -10
  93. package/dist/components/MaterialIcon/MaterialIcon.d.ts +17 -7
  94. package/dist/components/MaterialIcon/MaterialIcon.js +14 -3
  95. package/dist/components/MenuNav/MenuNav.styles.d.ts +6 -0
  96. package/dist/components/MenuNav/MenuNav.styles.js +3 -0
  97. package/dist/components/Modal/Modal.styles.js +35 -36
  98. package/dist/components/Modal/PaymentModal.d.ts +55 -0
  99. package/dist/components/Modal/PaymentModal.js +11 -13
  100. package/dist/components/Modal/SideModal.styles.js +13 -14
  101. package/dist/components/Modal/SideModalParts.js +18 -20
  102. package/dist/components/Modal/SuccessModal/SuccessModal.styles.d.ts +15 -0
  103. package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +3 -4
  104. package/dist/components/NotificationCounter/NotificationCounter.styles.d.ts +8 -0
  105. package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -3
  106. package/dist/components/Number/Number.js +1 -1
  107. package/dist/components/Number/Number.styles.d.ts +4 -0
  108. package/dist/components/Number/Number.styles.js +2 -3
  109. package/dist/components/Pagination/Pagination.styles.d.ts +15 -0
  110. package/dist/components/Pagination/Pagination.styles.js +12 -11
  111. package/dist/components/PanelCard/PanelCard.styles.js +24 -27
  112. package/dist/components/Payment/DetailRows.d.ts +14 -0
  113. package/dist/components/Payment/DetailRows.js +1 -2
  114. package/dist/components/Payment/DetailsToggle.d.ts +23 -0
  115. package/dist/components/Payment/DetailsToggle.js +12 -4
  116. package/dist/components/Payment/PaymentDetailsCard.d.ts +95 -0
  117. package/dist/components/Payment/PaymentDetailsCard.js +32 -23
  118. package/dist/components/Payment/PaymentDisplay.d.ts +59 -0
  119. package/dist/components/Payment/PaymentDisplay.js +18 -11
  120. package/dist/components/Payment/PaymentPendingCard.d.ts +39 -0
  121. package/dist/components/Payment/PaymentPendingCard.js +13 -13
  122. package/dist/components/Payment/PaymentSuccessCard.d.ts +41 -0
  123. package/dist/components/Payment/PaymentSuccessCard.js +27 -11
  124. package/dist/components/Payment/TimerComponent.d.ts +26 -0
  125. package/dist/components/Payment/TimerComponent.js +6 -7
  126. package/dist/components/Process/Process.styles.d.ts +11 -0
  127. package/dist/components/Process/Process.styles.js +22 -19
  128. package/dist/components/ProfileBadge/ProfileBadge.d.ts +13 -0
  129. package/dist/components/ProfileBadge/ProfileBadge.js +14 -15
  130. package/dist/components/ProfileBadge/ProfileBadge.styles.d.ts +10 -0
  131. package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -9
  132. package/dist/components/ProfileBox/ProfileBox.js +3 -3
  133. package/dist/components/ProfileBox/ProfileBox.styles.d.ts +22 -0
  134. package/dist/components/ProfileBox/ProfileBox.styles.js +18 -7
  135. package/dist/components/Radio/Radio.styles.d.ts +24 -0
  136. package/dist/components/Radio/Radio.styles.js +19 -11
  137. package/dist/components/RefreshButton/RefreshButton.styles.d.ts +29 -0
  138. package/dist/components/RefreshButton/RefreshButton.styles.js +5 -6
  139. package/dist/components/RequestDataBox/RequestDataBox.styles.d.ts +9 -0
  140. package/dist/components/RequestDataBox/RequestDataBox.styles.js +4 -5
  141. package/dist/components/Section/Section.d.ts +1 -1
  142. package/dist/components/Section/Section.js +4 -3
  143. package/dist/components/Section/Section.styles.d.ts +5 -0
  144. package/dist/components/Section/Section.styles.js +31 -36
  145. package/dist/components/SectionTitle/SectionTitle.styles.js +1 -1
  146. package/dist/components/Skeleton/Skeleton.d.ts +4 -2
  147. package/dist/components/Skeleton/Skeleton.js +8 -8
  148. package/dist/components/SmartLink/SmartLink.js +2 -2
  149. package/dist/components/Snackbar/Snackbar.styles.d.ts +28 -0
  150. package/dist/components/Snackbar/Snackbar.styles.js +10 -29
  151. package/dist/components/SpanButton/SpanButton.styles.js +2 -2
  152. package/dist/components/StatusDot/StatusDot.d.ts +29 -0
  153. package/dist/components/StatusDot/StatusDot.js +17 -23
  154. package/dist/components/StatusDot/StatusDot.styles.d.ts +20 -0
  155. package/dist/components/StatusTag/StatusTag.d.ts +35 -0
  156. package/dist/components/StatusTag/StatusTag.js +9 -38
  157. package/dist/components/StatusTag/StatusTag.styles.d.ts +28 -0
  158. package/dist/components/StatusTag/StatusTag.styles.js +6 -6
  159. package/dist/components/StepController/StepController.styles.d.ts +23 -0
  160. package/dist/components/StepController/StepController.styles.js +12 -14
  161. package/dist/components/StepSidebar/MobileStepProgress.styles.js +4 -5
  162. package/dist/components/StepSidebar/StepProgress.styles.js +29 -26
  163. package/dist/components/StepSidebar/StepSidebar.js +1 -1
  164. package/dist/components/StepSidebar/StepSidebar.styles.d.ts +1 -0
  165. package/dist/components/StepSidebar/StepSidebar.styles.js +30 -31
  166. package/dist/components/StokrLoader/StokrLoader.d.ts +25 -3
  167. package/dist/components/StokrLoader/StokrLoader.js +171 -26
  168. package/dist/components/SvgIcons/AdminBadgeSvg.js +1 -0
  169. package/dist/components/SvgIcons/CapsLockSvg.js +1 -0
  170. package/dist/components/SvgIcons/LogoSvg.js +1 -11
  171. package/dist/components/SvgIcons/RefreshSvg.js +1 -0
  172. package/dist/components/SvgIcons/VerifiedBadge.js +2 -4
  173. package/dist/components/Switch/Switch.styles.d.ts +20 -0
  174. package/dist/components/Switch/Switch.styles.js +10 -11
  175. package/dist/components/Tabs/Tabs.js +2 -2
  176. package/dist/components/TabsNav/TabsNav.styles.d.ts +25 -0
  177. package/dist/components/TabsNav/TabsNav.styles.js +8 -9
  178. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -2
  179. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +74 -0
  180. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +31 -35
  181. package/dist/components/Text/Text.styles.d.ts +17 -1
  182. package/dist/components/Text/Text.styles.js +50 -25
  183. package/dist/components/TextLink/TextLink.styles.d.ts +16 -0
  184. package/dist/components/TextLink/TextLink.styles.js +4 -4
  185. package/dist/components/Timeline/Timeline.styles.d.ts +41 -0
  186. package/dist/components/Timeline/Timeline.styles.js +14 -15
  187. package/dist/components/Timeline/TimelineStep.js +1 -1
  188. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  189. package/dist/components/Tooltip/Tooltip.js +2 -2
  190. package/dist/components/Tooltip/Tooltip.styles.js +2 -3
  191. package/dist/components/breakdown/Breakdown.d.ts +18 -0
  192. package/dist/components/breakdown/Breakdown.js +7 -7
  193. package/dist/components/logo/Logo.js +1 -1
  194. package/dist/design-system/css/base.css +74 -0
  195. package/dist/design-system/css/index.css +5 -0
  196. package/dist/design-system/fonts/Inter-LICENSE.txt +93 -0
  197. package/dist/design-system/fonts/inter-bitcoin-sign.woff2 +0 -0
  198. package/dist/design-system/fonts/inter-latin-ext.woff2 +0 -0
  199. package/dist/design-system/fonts/inter-latin.woff2 +0 -0
  200. package/dist/design-system/fonts/open-sans-latin-ext-italic.woff2 +0 -0
  201. package/dist/design-system/fonts/open-sans-latin-ext.woff2 +0 -0
  202. package/dist/design-system/fonts/open-sans-latin-italic.woff2 +0 -0
  203. package/dist/design-system/fonts/open-sans-latin.woff2 +0 -0
  204. package/dist/design-system/generated/fonts.css +296 -0
  205. package/dist/design-system/generated/text-classes.css +198 -0
  206. package/dist/design-system/generated/text-styles.d.ts +26 -0
  207. package/dist/design-system/generated/text-styles.js +179 -0
  208. package/dist/design-system/generated/tokens.css +429 -0
  209. package/dist/design-system/index.d.ts +9 -0
  210. package/dist/design-system/stories/foundations.d.ts +31 -0
  211. package/dist/design-system/stories/foundationsData.d.ts +18 -0
  212. package/dist/design-system/styled/breakpoint.d.ts +43 -0
  213. package/dist/design-system/styled/breakpoint.js +27 -0
  214. package/dist/design-system/styled/build-theme.d.ts +21 -0
  215. package/dist/design-system/styled/build-theme.js +27 -0
  216. package/dist/design-system/styled/text.d.ts +3 -0
  217. package/dist/design-system/styled/text.js +5 -0
  218. package/dist/design-system/styled/theme.d.ts +6 -0
  219. package/dist/design-system/tokens/breakpoints.d.ts +17 -0
  220. package/dist/design-system/tokens/breakpoints.js +16 -0
  221. package/dist/design-system/tokens/colors.d.ts +92 -0
  222. package/dist/design-system/tokens/colors.js +98 -0
  223. package/dist/design-system/tokens/fonts.d.ts +32 -0
  224. package/dist/design-system/tokens/fonts.js +49 -0
  225. package/dist/design-system/tokens/index.d.ts +6 -0
  226. package/dist/design-system/tokens/layout.d.ts +71 -0
  227. package/dist/design-system/tokens/layout.js +40 -0
  228. package/dist/design-system/tokens/semantic.d.ts +272 -0
  229. package/dist/design-system/tokens/semantic.js +76 -0
  230. package/dist/design-system/tokens/typography.d.ts +38 -0
  231. package/dist/design-system/tokens/typography.js +120 -0
  232. package/dist/hooks/useMediaQuery.d.ts +1 -1
  233. package/dist/index.d.ts +115 -53
  234. package/dist/index.js +48 -43
  235. package/dist/static/images/numbers/number_eight.svg +1 -1
  236. package/dist/static/images/numbers/number_eight.svg.js +1 -1
  237. package/dist/static/images/numbers/number_five.svg +2 -2
  238. package/dist/static/images/numbers/number_five.svg.js +1 -1
  239. package/dist/static/images/numbers/number_four.svg +1 -1
  240. package/dist/static/images/numbers/number_four.svg.js +1 -1
  241. package/dist/static/images/numbers/number_nine.svg +2 -2
  242. package/dist/static/images/numbers/number_nine.svg.js +1 -1
  243. package/dist/static/images/numbers/number_one.svg +2 -2
  244. package/dist/static/images/numbers/number_one.svg.js +1 -1
  245. package/dist/static/images/numbers/number_seven.svg +2 -2
  246. package/dist/static/images/numbers/number_seven.svg.js +1 -1
  247. package/dist/static/images/numbers/number_six.svg +2 -2
  248. package/dist/static/images/numbers/number_six.svg.js +1 -1
  249. package/dist/static/images/numbers/number_three.svg +1 -1
  250. package/dist/static/images/numbers/number_three.svg.js +1 -1
  251. package/dist/static/images/numbers/number_two.svg +2 -2
  252. package/dist/static/images/numbers/number_two.svg.js +1 -1
  253. package/dist/static/images/numbers/number_zero.svg +1 -1
  254. package/dist/static/images/numbers/number_zero.svg.js +1 -1
  255. package/dist/styles/borderedField.d.ts +1 -1
  256. package/dist/styles/borderedField.js +15 -18
  257. package/dist/utils/customHooks.d.ts +4 -4
  258. package/dist/utils/customHooks.js +6 -6
  259. package/package.json +16 -11
  260. package/dist/static/images/address-refreshing.gif.js +0 -4
  261. package/dist/static/images/process-waiting.gif.js +0 -4
  262. package/dist/styles/colors.d.ts +0 -68
  263. package/dist/styles/colors.js +0 -69
  264. package/dist/styles/elevation.d.ts +0 -13
  265. package/dist/styles/elevation.js +0 -15
  266. package/dist/styles/global.js +0 -63
  267. package/dist/styles/rwd.d.ts +0 -55
  268. package/dist/styles/rwd.js +0 -79
  269. package/dist/styles/spacing.d.ts +0 -36
  270. package/dist/styles/spacing.js +0 -38
  271. package/dist/styles/theme.d.ts +0 -92
  272. package/dist/styles/theme.js +0 -36
  273. package/dist/styles/typography.d.ts +0 -42
  274. 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
- React UI library for STOKR apps: modals, forms, navigation, tables, auth context, styles.
3
+ Pure UI library for the STOKR apps: **React components**, **small helpers** and the **design system** (colours, type, spacing, dark mode).
4
4
 
5
- ## Contents
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
- - [Quick start](#quick-start) — install, router, `AuthProvider`, styles
8
- - [Configuration reference](#runtime-config) — `config` keys & helpers
9
- - [AuthProvider & AuthContext](#authprovider-optional-props)
10
- - [Troubleshooting](#troubleshooting)
11
- - [Development](#development--publishing)
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
- ## Quick start
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+/19+, styled-components 6.x, react-router-dom 6.x when you use routing-driven components (`HeaderHo`, `MainMenu`, …).
36
+ Peers: React 18 or 19, styled-components 6, react-router-dom 6 or 7.
25
37
 
26
- **1. Router** — Navigation helpers need a React Router:
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
- ```jsx
29
- import { BrowserRouter } from 'react-router-dom'
30
- import { RouterWrapper } from '@stokr/components-library'
40
+ ```tsx
41
+ import '@stokr/components-library/design-system.css'
42
+ ```
31
43
 
32
- // Normal app
33
- root.render(
34
- <BrowserRouter>
35
- <App />
36
- </BrowserRouter>,
37
- )
44
+ **3. Use a component**
38
45
 
39
- // Outside a Router: RouterWrapper wraps children in BrowserRouter once.
40
- // Inside an existing Router: it renders children only (no nested BrowserRouter).
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
- **2. Auth & runtime config (required when consuming via npm)** — Vite freezes `import.meta.env` inside pre-built deps, so push your `.env` at runtime via `config`:
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
- **3. Earlier config** (e.g. analytics before mount): `import { configure } from '@stokr/components-library'` with the same shape as `config`.
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. Icons / fonts** — Icons are `MaterialIcon`: register the ones you use (and `requiredMaterialIcons`) with `registerMaterialIcons`. Open Sans comes from the host app; for Layout: `import '@stokr/components-library/styles.css'`.
54
+ **4. Only if you use them**
84
55
 
85
- **5. Imports** — `import { ConfirmModal, Button, … } from '@stokr/components-library'`.
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
- Full URL env example:
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
- ```bash
90
- VITE_WEBSITE_DOMAIN=example.com
91
- VITE_ONBOARDING_URL=https://signup.example.com
92
- VITE_DASHBOARD_URL=https://dashboard.example.com
93
- VITE_ADMIN_URL=https://admin.example.com
94
- VITE_REGISTER_URL=https://example.com/signup
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
- ## Configuration reference {#runtime-config}
81
+ <a id="inside"></a>
100
82
 
101
- | `config` key | Typical `VITE_*` | Role |
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
- **Helpers:** `getConfig('…')` for any key above; `getPlatformURL()` → `https://{websiteDomain}`; `getAnalyticsIngestUrl()`, `getBackofficeAppUrl(path)`; **`getFooterGroups()`** replaces static footer URL lists.
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
- **Auth-only HTTP:** `authenticationApi.post(segment, body)` for `auth/*`; default axios stays the main API client after login.
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
- Missing overrides may trigger a **one-time** warning listing unresolved `VITE_*` expectations.
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
- ## AuthProvider & AuthContext {#authprovider-optional-props}
102
+ <a id="design-system"></a>
122
103
 
123
- `AuthProvider` is wrapped with **`withRouter`** — mount it inside a **`Router`** so redirects work.
104
+ ## 🎨 Design system
124
105
 
125
- ### Optional provider props
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
- - **`inactivityTimeMs`** — Idle timeout before auto-logout + session modal (default 5 min).
128
- - **`inactivityWarningBeforeMs`** — How long before that timeout to show the **“session about to expire”** warning modal (default 30 s). See [Inactivity auto-logout](#inactivity-auto-logout).
129
- - **`accessTokenExpiryMs`** — Cookie TTL when **`Auth.setAccessToken`** runs (default **`DEFAULT_TOKEN_EXPIRY_MS`** = 1 h); not extended by **`getUser`** alone.
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
- ### Inactivity auto-logout {#inactivity-auto-logout}
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
- When a user is logged in, `AuthProvider` resets an idle timer on mouse, keyboard, click, scroll, and touch events.
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
- 1. **Warning modal** — Shown **`inactivityWarningBeforeMs`** before the idle deadline (default: 30 s before the 5 min timeout). The user can click **To continue, press here** to reset the idle timer, or close the modal (logout still happens at the deadline). Any activity also resets the timer and closes the warning.
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
- Neither modal is shown when the user is not logged in. Both are skipped when **`hideInactivityModal`** is set.
123
+ <a id="helpers"></a>
142
124
 
143
- **Storybook:** `Authentication / Auto-logout (inactivity)` → **With warning modal** (20 s idle, warning at 10 s).
125
+ ## 🧰 Helpers
144
126
 
145
- ### AuthContext consumer {#authcontext-usecontext}
127
+ Pure functions and hooks, also exported from the package root.
146
128
 
147
- `import { AuthContext } from '…'` then `useContext(AuthContext)`.
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
- - **Invalid Firebase guard:** value is **`{ user: null, isFetchingUser: false }`** only (no methods).
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
- Use **`AuthConsumer`** for the render-prop pattern.
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
- ## Troubleshooting {#troubleshooting}
168
+ <a id="upgrading"></a>
158
169
 
159
- **`useNavigate` / Router**
170
+ ## ⬆️ Upgrading to 5.0.0
160
171
 
161
- Add `BrowserRouter` (or **`RouterWrapper`** from this package where the shell has no router). Install `react-router-dom`.
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
- **Invalid hook call / duplicated React**
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
- Dedupe peers in Vite: `resolve: { dedupe: ['react', 'react-dom', 'styled-components'] }`.
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
- ## Development {#development--publishing}
198
+ <a id="releasing"></a>
199
+
200
+ ## 📤 Releasing
170
201
 
171
- | Command | Meaning |
172
- | -------------------- | -------------------------------- |
173
- | `npm run storybook` | Local docs / stories |
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
- Release: changelog entry → `npm version` → `npm run pub`. Details: [CHANGELOG.md](CHANGELOG.md).
206
+ Apps pick the new version up by updating their dependency (library first, then host, then remotes).
@@ -1,12 +1,10 @@
1
1
  import styled from "styled-components";
2
- import { colors } from "../../styles/colors.js";
3
- import { space, radius } from "../../styles/spacing.js";
4
- import { typography } from "../../styles/typography.js";
2
+ import { text } from "../../design-system/styled/text.js";
5
3
  const Root = styled.div`
6
4
  display: flex;
7
5
  flex-wrap: wrap;
8
6
  align-items: center;
9
- gap: var(--address-item-gap, ${space[3]});
7
+ gap: var(--address-item-gap, var(--stokr-space-3));
10
8
  min-width: 0;
11
9
  `;
12
10
  const Leading = styled.span`
@@ -17,41 +15,41 @@ const Leading = styled.span`
17
15
  box-sizing: content-box;
18
16
  width: var(--address-item-leading-size, 24px);
19
17
  height: var(--address-item-leading-size, 24px);
20
- padding: var(--address-item-leading-padding, ${space[1]});
21
- border-radius: ${radius.full};
22
- background: var(--address-item-leading-background, ${colors.grey});
18
+ padding: var(--address-item-leading-padding, var(--stokr-space-1));
19
+ border-radius: var(--stokr-radius-full);
20
+ background: var(--address-item-leading-background, var(--stokr-background-surface-raised));
23
21
  overflow: hidden;
24
22
  `;
25
23
  const Main = styled.div`
26
24
  display: flex;
27
25
  flex: 1 1 auto;
28
26
  align-items: center;
29
- gap: var(--address-item-gap, ${space[3]});
27
+ gap: var(--address-item-gap, var(--stokr-space-3));
30
28
  `;
31
29
  const Body = styled.div`
32
30
  display: flex;
33
31
  flex-direction: column;
34
32
  `;
35
33
  const Label = styled.span`
36
- ${typography.formInput};
37
- color: ${colors.black};
34
+ ${text("caption")};
35
+ color: var(--stokr-text-primary);
38
36
  `;
39
37
  const AddressRow = styled.span`
40
38
  display: flex;
41
39
  flex-wrap: wrap;
42
40
  align-items: center;
43
- gap: ${space[1]} var(--address-item-address-gap, ${space[2]});
41
+ gap: var(--stokr-space-1) var(--address-item-address-gap, var(--stokr-space-2));
44
42
  min-width: 0;
45
43
  `;
46
44
  const AddressGroup = styled.span`
47
45
  display: inline-flex;
48
46
  align-items: center;
49
- gap: var(--address-item-address-gap, ${space[2]});
47
+ gap: var(--address-item-address-gap, var(--stokr-space-2));
50
48
  min-width: 0;
51
49
  `;
52
50
  const Address = styled.span`
53
- ${typography.bodyLgCallout};
54
- color: ${colors.black};
51
+ ${text("subtitleM")};
52
+ color: var(--stokr-text-primary);
55
53
  ${({ $full }) => $full ? "min-width: 0; overflow-wrap: anywhere;" : "flex-shrink: 0; white-space: nowrap;"}
56
54
  `;
57
55
  const Trailing = styled.div`
@@ -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: ${(props) => props.theme.cWhite};
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: 'Open Sans';
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 ${(props) => props.theme.cLightGrey};
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 ${(props) => props.theme.cLightGrey};
84
+ border-top: 1px solid var(--stokr-border-subtle);
86
85
  }
87
86
  }
88
87
 
89
88
  /* &:hover {
90
89
  ${Column} {
91
- background-color: ${(props) => props.theme.cGrey};
90
+ background-color: var(--stokr-color-neutral-100);
92
91
  }
93
92
  } */
94
93
  }
95
94
 
96
95
  ${Column} {
97
- color: ${(props) => props.theme.cBlack};
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: ${(props) => props.theme.cWhite};
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: white;
167
- color: #000000de;
168
- border-bottom: 1px solid #e1e1e1;
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: #0050ca;
173
- color: #ffffff;
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 #e1e1e1;
194
+ border-bottom: 1px solid var(--stokr-border-subtle);
196
195
  font-size: 14px;
197
196
  ${(props) => props.blue && `
198
- background-color: #004bb7;
199
- color: #ffffff;
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 StyledReactTable = styled.table.withConfig({
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.Tr = StyledTr;
249
- StyledReactTable.Th = StyledTh;
250
- StyledReactTable.Td = StyledTd;
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,