@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
@@ -1,28 +1,27 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import styled from "styled-components";
4
- import { colors } from "../../styles/colors.js";
5
4
  import { safeUrl } from "../../utils/safeUrl.js";
6
5
  import { InfoIcon } from "../InfoIcon/InfoIcon.js";
7
6
  import { ArrowSimple } from "../icons/ArrowSimple.js";
8
7
  import { getCurrencyConfig, getCurrencyIcon, formatAmountForDisplay } from "../../utils/formatCurrencyValue.js";
9
8
  import externalLinkIcon from "../../static/images/external-link-icon.svg.js";
10
9
  const CardContainer = styled.div`
11
- background: ${colors.white};
10
+ background: var(--stokr-background-default);
12
11
  border-radius: 8px;
13
- border: 1px solid ${colors.lightGrey};
12
+ border: 1px solid var(--stokr-border-subtle);
14
13
  padding: 20px 32px;
15
14
  `;
16
15
  const CardTitle = styled.div`
17
16
  font-size: 10px;
18
17
  letter-spacing: 1.12px;
19
18
  font-weight: 500;
20
- color: ${colors.white};
21
- background: ${colors.futureBlack};
19
+ color: var(--stokr-background-default);
20
+ background: var(--stokr-border-strong);
22
21
  padding: 12px 24px;
23
22
  margin: -20px -32px 20px -32px;
24
23
  border-radius: 8px 8px 0 0;
25
- // border-bottom: 1px solid ${colors.lightGrey};
24
+ // border-bottom: 1px solid var(--stokr-color-neutral-200);
26
25
  text-align: start;
27
26
  text-transform: uppercase;
28
27
  `;
@@ -34,7 +33,7 @@ const AmountLabel = styled.div`
34
33
  text-transform: uppercase;
35
34
  letter-spacing: 2px;
36
35
  margin-bottom: 8px;
37
- color: ${colors.grayBlue};
36
+ color: var(--stokr-text-secondary);
38
37
  text-align: start;
39
38
  `;
40
39
  const AmountSubtitle = styled.div`
@@ -42,7 +41,7 @@ const AmountSubtitle = styled.div`
42
41
  font-weight: 400;
43
42
  line-height: 18px;
44
43
  letter-spacing: 0.6px;
45
- color: #90a1b9;
44
+ color: var(--stokr-text-tertiary);
46
45
  margin-top: 8px;
47
46
  text-align: start;
48
47
  `;
@@ -63,7 +62,7 @@ const AmountLeft = styled.div`
63
62
  const CurrencyTicker = styled.div`
64
63
  font-size: 22px;
65
64
  font-weight: 300;
66
- color: #90a1b9;
65
+ color: var(--stokr-text-tertiary);
67
66
  letter-spacing: 0.8px;
68
67
  line-height: 28px;
69
68
  flex-shrink: 0;
@@ -76,12 +75,12 @@ const CurrencyLogo = styled.div.withConfig({
76
75
  width: 24px;
77
76
  height: 24px;
78
77
  border-radius: 50%;
79
- background-color: ${(props) => props.color || colors.black};
78
+ background-color: ${(props) => props.color || "var(--stokr-color-neutral-900)"};
80
79
  display: flex;
81
80
  align-items: center;
82
81
  justify-content: center;
83
82
  flex-shrink: 0;
84
- color: ${colors.white};
83
+ color: var(--stokr-brand-pure-white);
85
84
  font-size: 14px;
86
85
  font-weight: 600;
87
86
  overflow: hidden;
@@ -100,11 +99,11 @@ const AmountValue = styled.div`
100
99
  max-width: 100%;
101
100
  overflow-wrap: break-word;
102
101
  word-break: break-word;
103
- color: ${colors.futureBlack};
102
+ color: var(--stokr-text-primary);
104
103
  `;
105
104
  const Separator = styled.hr`
106
105
  border: none;
107
- border-top: 1px solid #e2e8f0;
106
+ border-top: 1px solid var(--stokr-border-subtle);
108
107
  margin: 20px 0px;
109
108
  `;
110
109
  const ArrowSeparatorWrapper = styled.div`
@@ -118,7 +117,7 @@ const ArrowSeparatorWrapper = styled.div`
118
117
  content: '';
119
118
  flex: 1;
120
119
  height: 1px;
121
- background: #e2e8f0;
120
+ background: var(--stokr-border-subtle);
122
121
  }
123
122
  `;
124
123
  const ArrowCircle = styled.div`
@@ -127,7 +126,7 @@ const ArrowCircle = styled.div`
127
126
  justify-content: center;
128
127
  margin: 0 16px;
129
128
  height: 0;
130
- color: #cbd5e1;
129
+ color: var(--stokr-text-tertiary);
131
130
  `;
132
131
  const SectionHeader = styled.div`
133
132
  font-size: 11px;
@@ -135,7 +134,7 @@ const SectionHeader = styled.div`
135
134
  line-height: 20px;
136
135
  text-transform: uppercase;
137
136
  letter-spacing: 2px;
138
- color: ${colors.grayBlue};
137
+ color: var(--stokr-text-secondary);
139
138
  text-align: start;
140
139
  margin-bottom: 4px;
141
140
  `;
@@ -166,7 +165,7 @@ const DetailLabel = styled.div`
166
165
  font-weight: 400;
167
166
  line-height: 20px;
168
167
  letter-spacing: 0.5px;
169
- color: #56606f;
168
+ color: var(--stokr-text-secondary);
170
169
 
171
170
  i {
172
171
  font-size: 14px;
@@ -184,16 +183,16 @@ const DetailValue = styled.div`
184
183
  word-wrap: break-word;
185
184
  text-align: right;
186
185
  max-width: 60%;
187
- color: ${colors.futureBlack};
186
+ color: var(--stokr-text-primary);
188
187
  `;
189
188
  const PlaceholderValue = styled.span`
190
- color: ${colors.grayBlue};
189
+ color: var(--stokr-text-secondary);
191
190
  font-weight: 300;
192
191
  font-size: 14px;
193
192
  letter-spacing: 0.5px;
194
193
  `;
195
194
  const ExternalLink = styled.a`
196
- color: ${colors.futureBlack};
195
+ color: var(--stokr-text-primary);
197
196
  text-decoration: underline;
198
197
  font-size: 14px;
199
198
  font-weight: 600;
@@ -223,7 +222,17 @@ const ExternalLinkIconImg = styled.img`
223
222
  height: 12px;
224
223
  flex-shrink: 0;
225
224
  `;
226
- const DetailItem = ({ label, value, tooltip, placeholder, isCustom, href, target, labelIcon, valueIcon }) => {
225
+ const DetailItem = ({
226
+ label,
227
+ value,
228
+ tooltip,
229
+ placeholder,
230
+ isCustom,
231
+ href,
232
+ target,
233
+ labelIcon,
234
+ valueIcon
235
+ }) => {
227
236
  const renderValue = () => {
228
237
  if (isCustom && value) {
229
238
  return value;
@@ -272,9 +281,9 @@ const AmountBlock = ({ config }) => {
272
281
  } = config;
273
282
  const { symbol, decimals: resolvedDecimals } = getCurrencyConfig(currency, decimals ?? 2);
274
283
  const hasAmount = amount !== void 0 && amount !== null && amount !== "";
275
- const displayValue = hasAmount ? parseFloat(Math.abs(amount)).toFixed(resolvedDecimals) : null;
284
+ const displayValue = hasAmount ? Math.abs(Number(amount)).toFixed(resolvedDecimals) : null;
276
285
  const currencyIcon = getCurrencyIcon(currency, icon);
277
- const logoColor = currencyColor || colors.black;
286
+ const logoColor = currencyColor || "var(--stokr-color-neutral-900)";
278
287
  const ticker = showTicker ? symbol : null;
279
288
  const renderCurrencyLogo = () => {
280
289
  if (currencyIcon) {
@@ -0,0 +1,59 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export declare const CodeWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
+ }, {
5
+ maxWidth?: string;
6
+ }>> & string;
7
+ export declare const AmountValue: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
8
+ style?: CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
9
+ }> & string;
10
+ export declare const AmountCurrency: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
11
+ style?: CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
12
+ }> & string;
13
+ export declare const AmountIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
14
+ style?: CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
15
+ }> & string;
16
+ export interface PaymentDisplayProps {
17
+ /** Amount to pay (shown grouped; copied as-is). */
18
+ amount: number | string;
19
+ /** Currency id (e.g. `btc-fb`) or ticker; also the label next to the amount. */
20
+ currency?: string;
21
+ /** Address to pay to. */
22
+ address?: string;
23
+ showQRCode?: boolean;
24
+ showCopyIcons?: boolean;
25
+ showAddress?: boolean;
26
+ /** Content of the QR code, e.g. the chain's payment URI. No QR code without it. */
27
+ qrCodeValue?: string;
28
+ amountTitle?: ReactNode;
29
+ addressTitle?: ReactNode;
30
+ addressDescription?: ReactNode;
31
+ qrCodeSize?: number;
32
+ qrCodeStyle?: CSSProperties;
33
+ /** Waiting/status indicator shown with a pulsing dot, e.g. "Waiting to detect your transaction…". */
34
+ statusMessage?: ReactNode;
35
+ statusDotColor?: string;
36
+ containerStyle?: CSSProperties;
37
+ codeWrapperStyle?: CSSProperties;
38
+ amountSectionStyle?: CSSProperties;
39
+ amountTextStyle?: CSSProperties;
40
+ amountIconStyle?: CSSProperties;
41
+ addressTextStyle?: CSSProperties;
42
+ addressDescriptionStyle?: CSSProperties;
43
+ addressSectionStyle?: CSSProperties;
44
+ /** CSS max-width of the card, e.g. `600px`. */
45
+ maxWidth?: string;
46
+ className?: string;
47
+ codeWrapperClassName?: string;
48
+ /** Custom currency icon URL; wins over the currency's own icon. */
49
+ customCurrencyIcon?: string;
50
+ onAmountCopy?: (value: string) => void;
51
+ onAddressCopy?: (value: string) => void;
52
+ copyButtonStyle?: CSSProperties;
53
+ /** Slot at the top of the card, e.g. an expiry countdown pill. */
54
+ chip?: ReactNode;
55
+ /** Extra content (e.g. a "show details" toggle), rendered last inside the card. */
56
+ children?: ReactNode;
57
+ }
58
+ export declare const PaymentDisplay: ({ amount, currency, address, showQRCode, showCopyIcons, showAddress, qrCodeValue, amountTitle, addressTitle, addressDescription, qrCodeSize, qrCodeStyle, statusMessage, statusDotColor, containerStyle, codeWrapperStyle, amountSectionStyle, amountTextStyle, amountIconStyle, addressTextStyle, addressDescriptionStyle, addressSectionStyle, maxWidth, className, codeWrapperClassName, customCurrencyIcon, onAmountCopy, onAddressCopy, copyButtonStyle, chip, children, }: PaymentDisplayProps) => import("react/jsx-runtime").JSX.Element;
59
+ export default PaymentDisplay;
@@ -1,8 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
2
  import styled from "styled-components";
4
3
  import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
5
- import { colors } from "../../styles/colors.js";
6
4
  import { CopyToClipboardTooltip } from "../CopyToClipboardTooltip/CopyToClipboardTooltip.js";
7
5
  import stdin_default from "../QRCode/QRCode.js";
8
6
  import { SectionTitle } from "../SectionTitle/SectionTitle.styles.js";
@@ -11,8 +9,8 @@ import { getCurrencyIcon, formatAmountForDisplay } from "../../utils/formatCurre
11
9
  const CodeWrapper = styled.div.withConfig({
12
10
  shouldForwardProp: (props) => !["maxWidth"].includes(props)
13
11
  })`
14
- background: ${colors.white};
15
- border: 1px solid ${colors.lightGrey};
12
+ background: var(--stokr-background-default);
13
+ border: 1px solid var(--stokr-border-subtle);
16
14
  border-radius: 8px;
17
15
  box-shadow: none;
18
16
  padding: 48px 40px;
@@ -53,7 +51,7 @@ const AmountValue = styled.p`
53
51
  text-transform: uppercase;
54
52
  line-height: 40px;
55
53
  letter-spacing: 1.5px;
56
- color: ${colors.black};
54
+ color: var(--stokr-text-primary);
57
55
  max-width: 100%;
58
56
  overflow-wrap: break-word;
59
57
  word-break: break-word;
@@ -63,7 +61,7 @@ const AmountCurrency = styled.p`
63
61
  font-size: 34px;
64
62
  font-weight: 300;
65
63
  line-height: 40px;
66
- color: ${colors.black};
64
+ color: var(--stokr-text-primary);
67
65
  `;
68
66
  const AmountIcon = styled.img`
69
67
  width: 32px;
@@ -97,7 +95,7 @@ const AddressText = styled.p`
97
95
  letter-spacing: 0.5px;
98
96
  text-align: center;
99
97
  word-break: break-all;
100
- color: ${colors.black};
98
+ color: var(--stokr-text-primary);
101
99
  `;
102
100
  const AddressDescription = styled.p`
103
101
  margin: 0;
@@ -106,7 +104,7 @@ const AddressDescription = styled.p`
106
104
  line-height: 18px;
107
105
  letter-spacing: 0.6px;
108
106
  text-align: center;
109
- color: ${colors.grey2};
107
+ color: var(--stokr-text-tertiary);
110
108
  `;
111
109
  const PaymentDisplay = ({
112
110
  amount,
@@ -167,7 +165,16 @@ const PaymentDisplay = ({
167
165
  }
168
166
  )
169
167
  ] }),
170
- showQRCode && qrCodeValue && /* @__PURE__ */ jsx(stdin_default, { size: qrCodeSize, padding: 0, backgroundColor: "transparent", style: qrCodeStyle, value: qrCodeValue })
168
+ showQRCode && qrCodeValue && /* @__PURE__ */ jsx(
169
+ stdin_default,
170
+ {
171
+ size: qrCodeSize,
172
+ padding: 0,
173
+ backgroundColor: "transparent",
174
+ style: qrCodeStyle,
175
+ value: qrCodeValue
176
+ }
177
+ )
171
178
  ] }),
172
179
  showAddress && address && /* @__PURE__ */ jsxs(AddressBlock, { style: addressSectionStyle, children: [
173
180
  /* @__PURE__ */ jsx(SectionTitle, { children: addressTitle }),
@@ -189,8 +196,8 @@ const PaymentDisplay = ({
189
196
  statusMessage && /* @__PURE__ */ jsx(
190
197
  StatusDot,
191
198
  {
192
- color: statusDotColor || colors.blue,
193
- labelColor: colors.grayBlue,
199
+ color: statusDotColor || "var(--stokr-status-info-icon)",
200
+ labelColor: "var(--stokr-text-secondary)",
194
201
  dotSize: 8,
195
202
  pulse: true,
196
203
  style: { width: "100%", whiteSpace: "normal" },
@@ -0,0 +1,39 @@
1
+ import { CSSProperties, MouseEventHandler, ReactNode } from 'react';
2
+ import { PaymentDetailRow } from './PaymentDetailsCard';
3
+ /**
4
+ * Pending-confirmation state: spinner + title/description + a row list (e.g.
5
+ * amount/to address/status) + an optional action button + a footer note. Sits
6
+ * alongside PaymentDisplay (the "here's what to pay" state) and PaymentSuccessCard
7
+ * (the confirmed state) for the post-broadcast, waiting-for-network-confirmation
8
+ * moment. No explorer link by default — a link to the tx would imply it's already
9
+ * confirmed, which it isn't yet — but `actionLabel`/`actionHref`/`onActionClick` let a
10
+ * consumer opt back into a button (e.g. "cancel and start over") when one makes sense.
11
+ *
12
+ * `rows` is passed straight through to PaymentDetailsCard's DetailItem, so the same
13
+ * `href`/`tooltip`/`isCustom`/`labelIcon`/`valueIcon` escape hatches apply — e.g. a
14
+ * colored "Pending confirmation" status value: { label: 'Status', value: <span style={{color: 'var(--stokr-action-accent-bg)'}}>Pending confirmation</span>, isCustom: true }
15
+ */
16
+ export interface PaymentPendingCardProps {
17
+ title: ReactNode;
18
+ description?: ReactNode;
19
+ /** Detail rows, same shape as `DetailRows`. */
20
+ rows?: PaymentDetailRow[];
21
+ /** Label of the optional action button (needs `actionHref` or `onActionClick`). */
22
+ actionLabel?: string;
23
+ /** Makes the action a link opening in a new tab. */
24
+ actionHref?: string;
25
+ onActionClick?: MouseEventHandler<HTMLElement>;
26
+ footerNote?: ReactNode;
27
+ /** Slot at the top of the card, e.g. an expiry countdown pill. */
28
+ chip?: ReactNode;
29
+ /** CSS max-width of the card, e.g. `600px`. */
30
+ maxWidth?: string;
31
+ containerStyle?: CSSProperties;
32
+ codeWrapperStyle?: CSSProperties;
33
+ className?: string;
34
+ codeWrapperClassName?: string;
35
+ /** Extra content, rendered last inside the card. */
36
+ children?: ReactNode;
37
+ }
38
+ export declare const PaymentPendingCard: ({ title, description, rows, actionLabel, actionHref, onActionClick, footerNote, chip, maxWidth, containerStyle, codeWrapperStyle, className, codeWrapperClassName, children, }: PaymentPendingCardProps) => import("react/jsx-runtime").JSX.Element;
39
+ export default PaymentPendingCard;
@@ -1,8 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
2
  import styled, { keyframes } from "styled-components";
4
3
  import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
5
- import { colors } from "../../styles/colors.js";
6
4
  import { safeUrl } from "../../utils/safeUrl.js";
7
5
  import { Button } from "../Button/Button.styles.js";
8
6
  import { DetailRows } from "./DetailRows.js";
@@ -15,8 +13,8 @@ const Spinner = styled.div`
15
13
  height: 48px;
16
14
  flex-shrink: 0;
17
15
  border-radius: 50%;
18
- border: 3px solid ${colors.lightGrey};
19
- border-top-color: ${colors.blue};
16
+ border: 3px solid var(--stokr-border-subtle);
17
+ border-top-color: var(--stokr-action-accent-bg);
20
18
  animation: ${spin} 0.9s linear infinite;
21
19
  `;
22
20
  const TextBlock = styled.div`
@@ -29,32 +27,32 @@ const TextBlock = styled.div`
29
27
  `;
30
28
  const Title = styled.h2`
31
29
  margin: 0;
32
- font-family: 'Open Sans', sans-serif;
30
+ font-family: var(--stokr-font-family-base);
33
31
  font-size: 22px;
34
32
  font-weight: 800;
35
33
  line-height: 28px;
36
34
  letter-spacing: 0.8px;
37
35
  text-transform: uppercase;
38
- color: ${colors.black};
36
+ color: var(--stokr-text-primary);
39
37
  `;
40
38
  const Description = styled.p`
41
39
  margin: 0;
42
- font-family: 'Open Sans', sans-serif;
40
+ font-family: var(--stokr-font-family-base);
43
41
  font-size: 16px;
44
42
  font-weight: 300;
45
43
  line-height: 24px;
46
44
  letter-spacing: 0.6px;
47
- color: ${colors.black};
45
+ color: var(--stokr-text-primary);
48
46
  `;
49
47
  const FooterNote = styled.p`
50
48
  margin: 0;
51
- font-family: 'Open Sans', sans-serif;
49
+ font-family: var(--stokr-font-family-base);
52
50
  font-size: 12px;
53
51
  font-weight: 400;
54
52
  line-height: 18px;
55
53
  letter-spacing: 0.6px;
56
54
  text-align: center;
57
- color: ${colors.grayBlue};
55
+ color: var(--stokr-text-secondary);
58
56
  `;
59
57
  const PaymentPendingCard = ({
60
58
  title,
@@ -86,9 +84,11 @@ const PaymentPendingCard = ({
86
84
  Button,
87
85
  {
88
86
  as: actionHref ? "a" : "button",
89
- href: safeUrl(actionHref),
90
- target: actionHref ? "_blank" : void 0,
91
- rel: actionHref ? "noopener noreferrer" : void 0,
87
+ ...{
88
+ href: safeUrl(actionHref),
89
+ target: actionHref ? "_blank" : void 0,
90
+ rel: actionHref ? "noopener noreferrer" : void 0
91
+ },
92
92
  onClick: onActionClick,
93
93
  outlineBlack: true,
94
94
  fluid: true,
@@ -0,0 +1,41 @@
1
+ import { CSSProperties, MouseEventHandler, ReactNode } from 'react';
2
+ import { PaymentDetailRow } from './PaymentDetailsCard';
3
+ /**
4
+ * Confirmed/success state: checkmark + title/description + optional amount row
5
+ * + an optional collapsible details list + up to two action buttons.
6
+ * Generalizes invest-in-sto's bespoke success.tsx markup so both test-tx
7
+ * success and real-investment success can share one component.
8
+ */
9
+ export interface PaymentSuccessCardProps {
10
+ title: ReactNode;
11
+ description?: ReactNode;
12
+ /** Amount shown under the description. Hidden when empty. */
13
+ amount?: number | string | null;
14
+ /** Currency id (e.g. `btc-fb`) or ticker, shown next to the amount. */
15
+ currency?: string;
16
+ /** Custom currency icon URL; wins over the currency's own icon. */
17
+ customCurrencyIcon?: string;
18
+ /** Detail rows revealed by the "show details" toggle. No toggle when empty. */
19
+ rows?: PaymentDetailRow[];
20
+ detailsDefaultOpen?: boolean;
21
+ showDetailsLabel?: string;
22
+ hideDetailsLabel?: string;
23
+ primaryActionLabel?: string;
24
+ /** Makes the primary action a link. */
25
+ primaryActionHref?: string;
26
+ onPrimaryActionClick?: MouseEventHandler<HTMLElement>;
27
+ secondaryActionLabel?: string;
28
+ /** Makes the secondary action a link opening in a new tab, with an external-link icon. */
29
+ secondaryActionHref?: string;
30
+ onSecondaryActionClick?: MouseEventHandler<HTMLElement>;
31
+ /** CSS max-width of the card, e.g. `600px`. */
32
+ maxWidth?: string;
33
+ containerStyle?: CSSProperties;
34
+ codeWrapperStyle?: CSSProperties;
35
+ className?: string;
36
+ codeWrapperClassName?: string;
37
+ /** Extra content, rendered last inside the card. */
38
+ children?: ReactNode;
39
+ }
40
+ export declare const PaymentSuccessCard: ({ title, description, amount, currency, customCurrencyIcon, rows, detailsDefaultOpen, showDetailsLabel, hideDetailsLabel, primaryActionLabel, primaryActionHref, onPrimaryActionClick, secondaryActionLabel, secondaryActionHref, onSecondaryActionClick, maxWidth, containerStyle, codeWrapperStyle, className, codeWrapperClassName, children, }: PaymentSuccessCardProps) => import("react/jsx-runtime").JSX.Element;
41
+ export default PaymentSuccessCard;
@@ -1,8 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
2
  import styled from "styled-components";
4
3
  import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
5
- import { colors } from "../../styles/colors.js";
6
4
  import { safeUrl } from "../../utils/safeUrl.js";
7
5
  import { Button } from "../Button/Button.styles.js";
8
6
  import { CodeWrapper, AmountIcon, AmountValue, AmountCurrency } from "./PaymentDisplay.js";
@@ -15,7 +13,7 @@ const IconCircle = styled.div`
15
13
  width: 100px;
16
14
  height: 100px;
17
15
  border-radius: 50%;
18
- background: #f0fdf4;
16
+ background: var(--stokr-status-success-bg);
19
17
  display: flex;
20
18
  align-items: center;
21
19
  justify-content: center;
@@ -30,13 +28,13 @@ const TextBlock = styled.div`
30
28
  `;
31
29
  const Title = styled.h2`
32
30
  margin: 0;
33
- font-family: 'Open Sans';
31
+ font-family: var(--stokr-font-family-base);
34
32
  font-size: 22px;
35
33
  font-weight: 800;
36
34
  line-height: 28px;
37
35
  letter-spacing: 0.8px;
38
36
  text-transform: uppercase;
39
- color: ${colors.black};
37
+ color: var(--stokr-text-primary);
40
38
  `;
41
39
  const Description = styled.p`
42
40
  margin: 0;
@@ -44,7 +42,7 @@ const Description = styled.p`
44
42
  font-weight: 300;
45
43
  line-height: 24px;
46
44
  letter-spacing: 0.6px;
47
- color: ${colors.black};
45
+ color: var(--stokr-text-primary);
48
46
  `;
49
47
  const AmountRow = styled.div`
50
48
  display: flex;
@@ -110,15 +108,25 @@ const PaymentSuccessCard = ({
110
108
  /* @__PURE__ */ jsx(AmountValue, { children: formatAmountForDisplay(amount) }),
111
109
  currency && /* @__PURE__ */ jsx(AmountCurrency, { children: currency })
112
110
  ] }),
113
- rows.length > 0 && /* @__PURE__ */ jsx(DetailsToggle, { rows, defaultOpen: detailsDefaultOpen, showLabel: showDetailsLabel, hideLabel: hideDetailsLabel }),
111
+ rows.length > 0 && /* @__PURE__ */ jsx(
112
+ DetailsToggle,
113
+ {
114
+ rows,
115
+ defaultOpen: detailsDefaultOpen,
116
+ showLabel: showDetailsLabel,
117
+ hideLabel: hideDetailsLabel
118
+ }
119
+ ),
114
120
  hasActions && /* @__PURE__ */ jsxs(ActionsRow, { children: [
115
121
  secondaryActionLabel && /* @__PURE__ */ jsxs(
116
122
  ActionButton,
117
123
  {
118
124
  as: secondaryActionHref ? "a" : "button",
119
- href: safeUrl(secondaryActionHref),
120
- target: secondaryActionHref ? "_blank" : void 0,
121
- rel: secondaryActionHref ? "noopener noreferrer" : void 0,
125
+ ...{
126
+ href: safeUrl(secondaryActionHref),
127
+ target: secondaryActionHref ? "_blank" : void 0,
128
+ rel: secondaryActionHref ? "noopener noreferrer" : void 0
129
+ },
122
130
  onClick: onSecondaryActionClick,
123
131
  black: true,
124
132
  children: [
@@ -127,7 +135,15 @@ const PaymentSuccessCard = ({
127
135
  ]
128
136
  }
129
137
  ),
130
- primaryActionLabel && /* @__PURE__ */ jsx(ActionButton, { as: primaryActionHref ? "a" : "button", href: safeUrl(primaryActionHref), onClick: onPrimaryActionClick, children: primaryActionLabel })
138
+ primaryActionLabel && /* @__PURE__ */ jsx(
139
+ ActionButton,
140
+ {
141
+ as: primaryActionHref ? "a" : "button",
142
+ ...{ href: safeUrl(primaryActionHref) },
143
+ onClick: onPrimaryActionClick,
144
+ children: primaryActionLabel
145
+ }
146
+ )
131
147
  ] }),
132
148
  children
133
149
  ] }) });
@@ -0,0 +1,26 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const TimerBlock: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
+ }, {
5
+ maxWidth?: string;
6
+ red?: boolean;
7
+ }>> & string;
8
+ export interface TimerComponentProps {
9
+ /** Id of the timer (from `useTimer` / TimerService) to display. */
10
+ timerId: string;
11
+ /** Called once when the timer reaches zero. */
12
+ onTimerExpired?: () => void;
13
+ /** Seconds left under which the countdown turns red. */
14
+ warningThreshold?: number;
15
+ title?: string;
16
+ description?: string;
17
+ containerStyle?: CSSProperties;
18
+ timerBlockStyle?: CSSProperties;
19
+ className?: string;
20
+ /** CSS max-width of the block, e.g. `600px`. */
21
+ maxWidth?: string;
22
+ iconSize?: number;
23
+ showIcon?: boolean;
24
+ }
25
+ export declare const TimerComponent: import('react').MemoExoticComponent<({ timerId, onTimerExpired, warningThreshold, title, description, containerStyle, timerBlockStyle, className, maxWidth, iconSize, showIcon, }: TimerComponentProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export default TimerComponent;
@@ -1,16 +1,15 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import React__default, { memo } from "react";
2
+ import { memo, useEffect } from "react";
3
3
  import { useTimer } from "../../hooks/useTimer.js";
4
4
  import styled from "styled-components";
5
- import { colors } from "../../styles/colors.js";
6
5
  import { Text } from "../Text/Text.styles.js";
7
6
  import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
8
7
  import { FlexContainer } from "../Grid/Grid.styles.js";
9
- import rwd from "../../styles/rwd.js";
8
+ import { breakpoint } from "../../design-system/styled/breakpoint.js";
10
9
  const TimerBlock = styled.div.withConfig({
11
10
  shouldForwardProp: (props) => !["maxWidth", "red"].includes(props)
12
11
  })`
13
- background-color: ${colors.grey3};
12
+ background-color: var(--stokr-background-surface);
14
13
  padding: 24px 27px;
15
14
  text-align: start;
16
15
  max-width: ${(props) => props.maxWidth || "550px"};
@@ -25,7 +24,7 @@ const TimerBlock = styled.div.withConfig({
25
24
  margin: 0 !important;
26
25
  }
27
26
 
28
- ${rwd.Medium`
27
+ ${breakpoint.Medium`
29
28
  p {
30
29
  font-size: 16px !important;
31
30
  }
@@ -37,7 +36,7 @@ const TimerBlock = styled.div.withConfig({
37
36
 
38
37
  ${(props) => props.red && `
39
38
  #timer-text {
40
- color: ${colors.darkRed};
39
+ color: var(--stokr-status-error-text);
41
40
  }
42
41
  `}
43
42
  `;
@@ -60,7 +59,7 @@ const TimerComponent = memo(
60
59
  showIcon = true
61
60
  }) => {
62
61
  const { secondsRemaining, hasTimerFinished, stopTimer } = useTimer(timerId);
63
- React__default.useEffect(() => {
62
+ useEffect(() => {
64
63
  if (hasTimerFinished) {
65
64
  stopTimer();
66
65
  if (onTimerExpired) {