@stokr/components-library 4.2.6 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/README.md +147 -118
  2. package/dist/components/AdminDashboard/Table/Table.styles.d.ts +110 -0
  3. package/dist/components/AdminDashboard/Table/Table.styles.js +21 -20
  4. package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
  5. package/dist/components/BackButton/BackButton.styles.d.ts +24 -0
  6. package/dist/components/BackButton/BackButton.styles.js +15 -16
  7. package/dist/components/Background/Background.styles.d.ts +30 -0
  8. package/dist/components/Background/Background.styles.js +3 -3
  9. package/dist/components/BasicTable/BasicTable.d.ts +14 -0
  10. package/dist/components/BasicTable/BasicTable.js +0 -10
  11. package/dist/components/BasicTable/BasicTable.styles.d.ts +22 -0
  12. package/dist/components/BasicTable/BasicTable.styles.js +6 -7
  13. package/dist/components/BlogPost/BlogPost.js +3 -3
  14. package/dist/components/BlogPost/BlogPost.styles.d.ts +67 -0
  15. package/dist/components/BlogPost/BlogPost.styles.js +14 -20
  16. package/dist/components/Button/Button.styles.d.ts +12 -8
  17. package/dist/components/Button/Button.styles.js +131 -115
  18. package/dist/components/Button/GlareButton.d.ts +31 -0
  19. package/dist/components/Button/GlareButton.js +4 -22
  20. package/dist/components/Card/Card.styles.d.ts +30 -0
  21. package/dist/components/Card/Card.styles.js +3 -4
  22. package/dist/components/CardTabs/CardTabs.styles.js +26 -29
  23. package/dist/components/ChartLegend/ChartLegend.styles.d.ts +46 -0
  24. package/dist/components/ChartLegend/ChartLegend.styles.js +4 -5
  25. package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -1
  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.d.ts +4 -10
  37. package/dist/components/Collapsible/Collapsible.js +14 -6
  38. package/dist/components/Collapsible/Collapsible.styles.d.ts +1 -3
  39. package/dist/components/Collapsible/Collapsible.styles.js +19 -36
  40. package/dist/components/ComponentScroll/ComponentScroll.js +2 -1
  41. package/dist/components/ComponentScroll/ComponentScroll.styles.d.ts +34 -0
  42. package/dist/components/ComponentScroll/ComponentScroll.styles.js +15 -12
  43. package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +11 -13
  44. package/dist/components/ConfirmModal/ConfirmModal.styles.d.ts +18 -0
  45. package/dist/components/ConfirmModal/ConfirmModal.styles.js +6 -7
  46. package/dist/components/Country/CountrySelect.js +20 -15
  47. package/dist/components/CryptoAddress/ComponentWrap.d.ts +9 -0
  48. package/dist/components/CryptoAddress/ComponentWrap.js +7 -10
  49. package/dist/components/CryptoAddress/CryptoAddress.d.ts +45 -0
  50. package/dist/components/CryptoAddress/CryptoAddress.js +9 -41
  51. package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +85 -0
  52. package/dist/components/CryptoAddress/CryptoAddress.styles.js +21 -22
  53. package/dist/components/CryptoAddress/RadioWrap.d.ts +21 -0
  54. package/dist/components/CryptoAddress/RadioWrap.js +1 -16
  55. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.d.ts +30 -0
  56. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +19 -11
  57. package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.d.ts +12 -0
  58. package/dist/components/DisplayOnBreakpoint/DisplayOnBreakpoint.js +28 -0
  59. package/dist/components/FAQ/FAQ.js +18 -18
  60. package/dist/components/FAQ/FAQ.styles.d.ts +5 -12
  61. package/dist/components/FAQ/FAQ.styles.js +3 -61
  62. package/dist/components/Form/Form.styles.d.ts +22 -0
  63. package/dist/components/Form/Form.styles.js +7 -8
  64. package/dist/components/Grid/Grid.styles.d.ts +49 -0
  65. package/dist/components/Grid/Grid.styles.js +37 -40
  66. package/dist/components/IdentityInfo/IdentityInfo.js +1 -2
  67. package/dist/components/IdentityInfo/IdentityInfo.styles.d.ts +24 -0
  68. package/dist/components/IdentityInfo/IdentityInfo.styles.js +6 -9
  69. package/dist/components/InfoBox/InfoBox.d.ts +20 -0
  70. package/dist/components/InfoBox/InfoBox.js +24 -78
  71. package/dist/components/InfoIcon/InfoIcon.styles.js +2 -3
  72. package/dist/components/Input/DatePickerInput.d.ts +24 -0
  73. package/dist/components/Input/DatePickerInput.js +2 -13
  74. package/dist/components/Input/DatePickerInput.styles.d.ts +18 -0
  75. package/dist/components/Input/DatePickerInput.styles.js +27 -24
  76. package/dist/components/Input/Input.d.ts +0 -3
  77. package/dist/components/Input/Input.js +3 -5
  78. package/dist/components/Input/Input.styles.d.ts +1 -4
  79. package/dist/components/Input/Input.styles.js +24 -77
  80. package/dist/components/Input/InputPassword.styles.d.ts +32 -0
  81. package/dist/components/Input/InputPassword.styles.js +11 -12
  82. package/dist/components/Input/InputWithButton.styles.d.ts +14 -0
  83. package/dist/components/Input/InputWithButton.styles.js +5 -6
  84. package/dist/components/Input/MultiSelect.d.ts +60 -0
  85. package/dist/components/Input/MultiSelect.js +20 -52
  86. package/dist/components/Input/OtpInput.d.ts +17 -0
  87. package/dist/components/Input/OtpInput.js +8 -15
  88. package/dist/components/Input/RangeInput.d.ts +14 -0
  89. package/dist/components/Input/RangeInput.js +2 -17
  90. package/dist/components/Input/SearchInput.styles.d.ts +15 -0
  91. package/dist/components/Input/SearchInput.styles.js +10 -11
  92. package/dist/components/Input/Select.js +156 -80
  93. package/dist/components/Input/Select.styles.js +16 -118
  94. package/dist/components/Input/TableFilterDropdown.d.ts +33 -0
  95. package/dist/components/Input/TableFilterDropdown.js +6 -39
  96. package/dist/components/Input/Textarea.styles.d.ts +9 -0
  97. package/dist/components/Input/Textarea.styles.js +9 -10
  98. package/dist/components/MaterialIcon/MaterialIcon.d.ts +17 -7
  99. package/dist/components/MaterialIcon/MaterialIcon.js +14 -3
  100. package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
  101. package/dist/components/MaterialIcon/requiredIcons.js +0 -2
  102. package/dist/components/MenuNav/MenuNav.styles.d.ts +6 -0
  103. package/dist/components/MenuNav/MenuNav.styles.js +3 -0
  104. package/dist/components/Modal/Modal.styles.js +35 -36
  105. package/dist/components/Modal/PaymentModal.d.ts +55 -0
  106. package/dist/components/Modal/PaymentModal.js +11 -13
  107. package/dist/components/Modal/SideModal.styles.js +13 -14
  108. package/dist/components/Modal/SideModalParts.js +18 -20
  109. package/dist/components/Modal/SuccessModal/SuccessModal.styles.d.ts +15 -0
  110. package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +3 -4
  111. package/dist/components/NotificationCounter/NotificationCounter.styles.d.ts +8 -0
  112. package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -3
  113. package/dist/components/Number/Number.js +1 -1
  114. package/dist/components/Number/Number.styles.d.ts +4 -0
  115. package/dist/components/Number/Number.styles.js +2 -3
  116. package/dist/components/Pagination/Pagination.styles.d.ts +15 -0
  117. package/dist/components/Pagination/Pagination.styles.js +12 -11
  118. package/dist/components/Payment/DetailRows.d.ts +14 -0
  119. package/dist/components/Payment/DetailRows.js +1 -2
  120. package/dist/components/Payment/DetailsToggle.d.ts +23 -0
  121. package/dist/components/Payment/DetailsToggle.js +12 -4
  122. package/dist/components/Payment/PaymentDetailsCard.d.ts +95 -0
  123. package/dist/components/Payment/PaymentDetailsCard.js +32 -23
  124. package/dist/components/Payment/PaymentDisplay.d.ts +59 -0
  125. package/dist/components/Payment/PaymentDisplay.js +18 -11
  126. package/dist/components/Payment/PaymentPendingCard.d.ts +39 -0
  127. package/dist/components/Payment/PaymentPendingCard.js +13 -13
  128. package/dist/components/Payment/PaymentSuccessCard.d.ts +41 -0
  129. package/dist/components/Payment/PaymentSuccessCard.js +27 -11
  130. package/dist/components/Payment/TimerComponent.d.ts +26 -0
  131. package/dist/components/Payment/TimerComponent.js +6 -7
  132. package/dist/components/Process/Process.styles.d.ts +11 -0
  133. package/dist/components/Process/Process.styles.js +22 -19
  134. package/dist/components/ProfileBadge/ProfileBadge.d.ts +13 -0
  135. package/dist/components/ProfileBadge/ProfileBadge.js +14 -15
  136. package/dist/components/ProfileBadge/ProfileBadge.styles.d.ts +10 -0
  137. package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -9
  138. package/dist/components/ProfileBox/ProfileBox.js +3 -3
  139. package/dist/components/ProfileBox/ProfileBox.styles.d.ts +22 -0
  140. package/dist/components/ProfileBox/ProfileBox.styles.js +18 -7
  141. package/dist/components/Radio/Radio.styles.d.ts +23 -0
  142. package/dist/components/Radio/Radio.styles.js +19 -11
  143. package/dist/components/RefreshButton/RefreshButton.styles.d.ts +29 -0
  144. package/dist/components/RefreshButton/RefreshButton.styles.js +5 -6
  145. package/dist/components/RequestDataBox/RequestDataBox.styles.d.ts +9 -0
  146. package/dist/components/RequestDataBox/RequestDataBox.styles.js +4 -5
  147. package/dist/components/Section/Section.d.ts +1 -1
  148. package/dist/components/Section/Section.js +4 -3
  149. package/dist/components/Section/Section.styles.d.ts +5 -0
  150. package/dist/components/Section/Section.styles.js +31 -36
  151. package/dist/components/SectionTitle/SectionTitle.styles.js +1 -1
  152. package/dist/components/Skeleton/Skeleton.d.ts +4 -2
  153. package/dist/components/Skeleton/Skeleton.js +8 -8
  154. package/dist/components/SmartLink/SmartLink.js +2 -2
  155. package/dist/components/Snackbar/Snackbar.styles.d.ts +28 -0
  156. package/dist/components/Snackbar/Snackbar.styles.js +10 -29
  157. package/dist/components/SpanButton/SpanButton.styles.js +2 -2
  158. package/dist/components/StatusDot/StatusDot.d.ts +29 -0
  159. package/dist/components/StatusDot/StatusDot.js +17 -23
  160. package/dist/components/StatusDot/StatusDot.styles.d.ts +20 -0
  161. package/dist/components/StatusTag/StatusTag.d.ts +35 -0
  162. package/dist/components/StatusTag/StatusTag.js +9 -38
  163. package/dist/components/StatusTag/StatusTag.styles.d.ts +28 -0
  164. package/dist/components/StatusTag/StatusTag.styles.js +6 -6
  165. package/dist/components/StepController/StepController.styles.d.ts +23 -0
  166. package/dist/components/StepController/StepController.styles.js +12 -14
  167. package/dist/components/StokrLoader/StokrLoader.d.ts +9 -1
  168. package/dist/components/StokrLoader/StokrLoader.js +50 -19
  169. package/dist/components/SvgIcons/AdminBadgeSvg.js +1 -0
  170. package/dist/components/SvgIcons/CapsLockSvg.js +1 -0
  171. package/dist/components/SvgIcons/LogoSvg.js +1 -11
  172. package/dist/components/SvgIcons/RefreshSvg.js +1 -0
  173. package/dist/components/SvgIcons/VerifiedBadge.js +2 -4
  174. package/dist/components/Switch/Switch.styles.d.ts +20 -0
  175. package/dist/components/Switch/Switch.styles.js +10 -11
  176. package/dist/components/Tabs/Tabs.js +2 -2
  177. package/dist/components/TabsNav/TabsNav.styles.d.ts +25 -0
  178. package/dist/components/TabsNav/TabsNav.styles.js +8 -9
  179. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +11 -27
  180. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +57 -0
  181. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +25 -107
  182. package/dist/components/Text/Text.styles.d.ts +17 -1
  183. package/dist/components/Text/Text.styles.js +50 -25
  184. package/dist/components/TextLink/TextLink.styles.d.ts +16 -0
  185. package/dist/components/TextLink/TextLink.styles.js +4 -4
  186. package/dist/components/Timeline/Timeline.styles.d.ts +41 -0
  187. package/dist/components/Timeline/Timeline.styles.js +14 -15
  188. package/dist/components/Timeline/TimelineStep.js +1 -1
  189. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  190. package/dist/components/Tooltip/Tooltip.js +2 -2
  191. package/dist/components/Tooltip/Tooltip.styles.js +2 -3
  192. package/dist/components/breakdown/Breakdown.d.ts +18 -0
  193. package/dist/components/breakdown/Breakdown.js +7 -7
  194. package/dist/components/logo/Logo.js +1 -1
  195. package/dist/design-system/css/base.css +74 -0
  196. package/dist/design-system/css/index.css +5 -0
  197. package/dist/design-system/fonts/Inter-LICENSE.txt +93 -0
  198. package/dist/design-system/fonts/inter-bitcoin-sign.woff2 +0 -0
  199. package/dist/design-system/fonts/inter-latin-ext.woff2 +0 -0
  200. package/dist/design-system/fonts/inter-latin.woff2 +0 -0
  201. package/dist/design-system/fonts/open-sans-latin-ext-italic.woff2 +0 -0
  202. package/dist/design-system/fonts/open-sans-latin-ext.woff2 +0 -0
  203. package/dist/design-system/fonts/open-sans-latin-italic.woff2 +0 -0
  204. package/dist/design-system/fonts/open-sans-latin.woff2 +0 -0
  205. package/dist/design-system/generated/fonts.css +296 -0
  206. package/dist/design-system/generated/text-classes.css +198 -0
  207. package/dist/design-system/generated/text-styles.d.ts +26 -0
  208. package/dist/design-system/generated/text-styles.js +179 -0
  209. package/dist/design-system/generated/tokens.css +429 -0
  210. package/dist/design-system/index.d.ts +9 -0
  211. package/dist/design-system/stories/foundations.d.ts +31 -0
  212. package/dist/design-system/stories/foundationsData.d.ts +18 -0
  213. package/dist/design-system/styled/breakpoint.d.ts +43 -0
  214. package/dist/design-system/styled/breakpoint.js +27 -0
  215. package/dist/design-system/styled/build-theme.d.ts +21 -0
  216. package/dist/design-system/styled/build-theme.js +27 -0
  217. package/dist/design-system/styled/text.d.ts +3 -0
  218. package/dist/design-system/styled/text.js +5 -0
  219. package/dist/design-system/styled/theme.d.ts +6 -0
  220. package/dist/design-system/tokens/breakpoints.d.ts +17 -0
  221. package/dist/design-system/tokens/breakpoints.js +16 -0
  222. package/dist/design-system/tokens/colors.d.ts +92 -0
  223. package/dist/design-system/tokens/colors.js +98 -0
  224. package/dist/design-system/tokens/fonts.d.ts +32 -0
  225. package/dist/design-system/tokens/fonts.js +49 -0
  226. package/dist/design-system/tokens/index.d.ts +6 -0
  227. package/dist/design-system/tokens/layout.d.ts +71 -0
  228. package/dist/design-system/tokens/layout.js +40 -0
  229. package/dist/design-system/tokens/semantic.d.ts +272 -0
  230. package/dist/design-system/tokens/semantic.js +76 -0
  231. package/dist/design-system/tokens/typography.d.ts +38 -0
  232. package/dist/design-system/tokens/typography.js +120 -0
  233. package/dist/hooks/useMediaQuery.d.ts +1 -1
  234. package/dist/index.d.ts +117 -122
  235. package/dist/index.js +50 -62
  236. package/dist/static/images/globe.svg.js +5 -0
  237. package/dist/static/images/numbers/number_eight.svg +1 -1
  238. package/dist/static/images/numbers/number_eight.svg.js +1 -1
  239. package/dist/static/images/numbers/number_five.svg +2 -2
  240. package/dist/static/images/numbers/number_five.svg.js +1 -1
  241. package/dist/static/images/numbers/number_four.svg +1 -1
  242. package/dist/static/images/numbers/number_four.svg.js +1 -1
  243. package/dist/static/images/numbers/number_nine.svg +2 -2
  244. package/dist/static/images/numbers/number_nine.svg.js +1 -1
  245. package/dist/static/images/numbers/number_one.svg +2 -2
  246. package/dist/static/images/numbers/number_one.svg.js +1 -1
  247. package/dist/static/images/numbers/number_seven.svg +2 -2
  248. package/dist/static/images/numbers/number_seven.svg.js +1 -1
  249. package/dist/static/images/numbers/number_six.svg +2 -2
  250. package/dist/static/images/numbers/number_six.svg.js +1 -1
  251. package/dist/static/images/numbers/number_three.svg +1 -1
  252. package/dist/static/images/numbers/number_three.svg.js +1 -1
  253. package/dist/static/images/numbers/number_two.svg +2 -2
  254. package/dist/static/images/numbers/number_two.svg.js +1 -1
  255. package/dist/static/images/numbers/number_zero.svg +1 -1
  256. package/dist/static/images/numbers/number_zero.svg.js +1 -1
  257. package/dist/static/images/trash.svg +17 -0
  258. package/dist/static/images/trash.svg.js +5 -0
  259. package/dist/utils/customHooks.d.ts +4 -4
  260. package/dist/utils/customHooks.js +6 -6
  261. package/package.json +16 -11
  262. package/dist/components/AddressItem/AddressItem.d.ts +0 -38
  263. package/dist/components/AddressItem/AddressItem.js +0 -51
  264. package/dist/components/AddressItem/AddressItem.styles.d.ts +0 -31
  265. package/dist/components/AddressItem/AddressItem.styles.js +0 -73
  266. package/dist/components/Country/FlagFor.d.ts +0 -9
  267. package/dist/components/Country/FlagFor.js +0 -25
  268. package/dist/components/Country/flagLoaders.d.ts +0 -5
  269. package/dist/components/Country/flagLoaders.js +0 -270
  270. package/dist/components/Country/flagStore.d.ts +0 -6
  271. package/dist/components/Country/flagStore.js +0 -29
  272. package/dist/components/FAQ/FAQ.d.ts +0 -29
  273. package/dist/components/Input/Select.d.ts +0 -57
  274. package/dist/components/Input/Select.styles.d.ts +0 -89
  275. package/dist/components/PanelCard/PanelCard.d.ts +0 -51
  276. package/dist/components/PanelCard/PanelCard.js +0 -35
  277. package/dist/components/PanelCard/PanelCard.styles.d.ts +0 -29
  278. package/dist/components/PanelCard/PanelCard.styles.js +0 -87
  279. package/dist/components/StepSidebar/MobileStepProgress.d.ts +0 -12
  280. package/dist/components/StepSidebar/MobileStepProgress.js +0 -14
  281. package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +0 -15
  282. package/dist/components/StepSidebar/MobileStepProgress.styles.js +0 -42
  283. package/dist/components/StepSidebar/StepProgress.d.ts +0 -14
  284. package/dist/components/StepSidebar/StepProgress.js +0 -14
  285. package/dist/components/StepSidebar/StepProgress.styles.d.ts +0 -30
  286. package/dist/components/StepSidebar/StepProgress.styles.js +0 -103
  287. package/dist/components/StepSidebar/StepSidebar.d.ts +0 -36
  288. package/dist/components/StepSidebar/StepSidebar.js +0 -58
  289. package/dist/components/StepSidebar/StepSidebar.styles.d.ts +0 -54
  290. package/dist/components/StepSidebar/StepSidebar.styles.js +0 -175
  291. package/dist/constants/chainLogos.d.ts +0 -9
  292. package/dist/constants/chainLogos.js +0 -17
  293. package/dist/static/images/address-refreshing.gif.js +0 -4
  294. package/dist/static/images/chains/avalanche.svg +0 -7
  295. package/dist/static/images/chains/avalanche.svg.js +0 -4
  296. package/dist/static/images/chains/ethereum.svg +0 -14
  297. package/dist/static/images/chains/ethereum.svg.js +0 -4
  298. package/dist/static/images/chains/liquid.svg +0 -7
  299. package/dist/static/images/chains/liquid.svg.js +0 -4
  300. package/dist/static/images/chains/solana.svg +0 -29
  301. package/dist/static/images/chains/solana.svg.js +0 -4
  302. package/dist/static/images/chains/stellar.svg +0 -17
  303. package/dist/static/images/chains/stellar.svg.js +0 -4
  304. package/dist/static/images/chains/tempo.svg +0 -11
  305. package/dist/static/images/chains/tempo.svg.js +0 -4
  306. package/dist/static/images/process-waiting.gif.js +0 -4
  307. package/dist/styles/borderedField.d.ts +0 -11
  308. package/dist/styles/borderedField.js +0 -56
  309. package/dist/styles/colors.d.ts +0 -68
  310. package/dist/styles/colors.js +0 -69
  311. package/dist/styles/elevation.d.ts +0 -13
  312. package/dist/styles/elevation.js +0 -15
  313. package/dist/styles/global.js +0 -63
  314. package/dist/styles/rwd.d.ts +0 -55
  315. package/dist/styles/rwd.js +0 -79
  316. package/dist/styles/spacing.d.ts +0 -36
  317. package/dist/styles/spacing.js +0 -38
  318. package/dist/styles/theme.d.ts +0 -92
  319. package/dist/styles/theme.js +0 -36
  320. package/dist/styles/typography.d.ts +0 -42
  321. package/dist/styles/typography.js +0 -56
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface SectionProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children' | 'onToggle'> {
3
3
  title?: ReactNode;
4
- children?: ReactNode;
4
+ children: ReactNode;
5
5
  /** `plain` sits on the page background instead of in a card. */
6
6
  variant?: 'card' | 'plain';
7
7
  /** Figma elevation/xs on the card. */
@@ -5,9 +5,9 @@ import { inertProp } from "../../utils/inertProp.js";
5
5
  import { Chevron } from "../Collapsible/Collapsible.styles.js";
6
6
  import { SkeletonLines } from "../Skeleton/Skeleton.js";
7
7
  import { useMediaQuery } from "../../hooks/useMediaQuery.js";
8
- import { mediaQuery } from "../../styles/rwd.js";
9
8
  import { SectionRoot, SectionHeader, SectionHeading, SectionToggle, SectionBody, SectionBodyClip, SectionBodyInner } from "./Section.styles.js";
10
- const Section = forwardRef(function Section2({
9
+ import { breakpoint } from "../../design-system/styled/breakpoint.js";
10
+ const Section = forwardRef(function SectionBase({
11
11
  title,
12
12
  children,
13
13
  variant = "card",
@@ -28,7 +28,7 @@ const Section = forwardRef(function Section2({
28
28
  const desktopOpen = collapsibleProp === "desktop-open";
29
29
  const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
30
30
  const [touched, setTouched] = useState(false);
31
- const isDesktop = useMediaQuery(mediaQuery.desktopUp, true);
31
+ const isDesktop = useMediaQuery(breakpoint.query.up.MLarge, true);
32
32
  const controlled = openProp !== void 0;
33
33
  const followsWidth = desktopOpen && !touched && !controlled;
34
34
  const open = controlled ? openProp : uncontrolledOpen;
@@ -78,6 +78,7 @@ const Section = forwardRef(function Section2({
78
78
  }
79
79
  );
80
80
  });
81
+ Section.displayName = "Section";
81
82
  export {
82
83
  Section
83
84
  };
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Sections are cards: white, 1px border/subtle, radius/lg,
3
+ * padding space/6, children separated by space/8. `plain` opts out for sections that
4
+ * sit directly on the page background (the hero).
5
+ */
1
6
  export declare const SectionRoot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
2
7
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
8
  }, {
@@ -1,14 +1,9 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { Body, BodyClip } from "../Collapsible/Collapsible.styles.js";
3
- import { colors } from "../../styles/colors.js";
4
- import { media } from "../../styles/rwd.js";
5
- import { elevation } from "../../styles/elevation.js";
6
- import { space, radius } from "../../styles/spacing.js";
7
- import { typography } from "../../styles/typography.js";
8
- const MOBILE = media.belowDesktop;
9
- const DESKTOP = media.desktopUp;
3
+ import { breakpoint } from "../../design-system/styled/breakpoint.js";
4
+ import { text } from "../../design-system/styled/text.js";
10
5
  const SectionRoot = styled.section`
11
- --section-gap: ${space[8]};
6
+ --section-gap: var(--stokr-space-8);
12
7
  /* The card's padding, for the toggle to reach over it. */
13
8
  --section-pad-y: 0px;
14
9
  --section-pad-x: 0px;
@@ -17,20 +12,20 @@ const SectionRoot = styled.section`
17
12
  gap: ${({ $collapsible }) => $collapsible ? "0" : "var(--section-gap)"};
18
13
 
19
14
  ${({ $variant, $elevated }) => $variant === "card" && css`
20
- --section-pad-y: ${space[6]};
21
- --section-pad-x: ${space[6]};
15
+ --section-pad-y: var(--stokr-space-6);
16
+ --section-pad-x: var(--stokr-space-6);
22
17
  padding: var(--section-pad-y) var(--section-pad-x);
23
- background: ${colors.white};
24
- border: 1px solid ${colors.lightGrey};
25
- border-radius: ${radius.lg};
26
- box-shadow: ${$elevated ? elevation.xs : "none"};
18
+ background: var(--stokr-background-default);
19
+ border: 1px solid var(--stokr-border-subtle);
20
+ border-radius: var(--stokr-radius-lg);
21
+ box-shadow: ${$elevated ? "var(--stokr-elevation-xs)" : "none"};
27
22
 
28
23
  /* Figma 3582:128652: mobile cards are 20 / 16 with 16 under the header. */
29
- ${MOBILE} {
30
- --section-gap: ${space[4]};
31
- --section-pad-y: ${space[5]};
32
- --section-pad-x: ${space[4]};
33
- }
24
+ ${breakpoint.below.MLarge`
25
+ --section-gap: var(--stokr-space-4);
26
+ --section-pad-y: var(--stokr-space-5);
27
+ --section-pad-x: var(--stokr-space-4);
28
+ `}
34
29
  `}
35
30
 
36
31
  /* Collapsed, the whole card opens it, so it lifts under the pointer as an investment card does. */
@@ -38,19 +33,19 @@ const SectionRoot = styled.section`
38
33
  if ($variant !== "card" || !$collapsed) return "";
39
34
  const lift = css`
40
35
  &:hover {
41
- box-shadow: ${elevation.sm};
36
+ box-shadow: var(--stokr-elevation-sm);
42
37
  }
43
38
  `;
44
39
  return $always ? lift : css`
45
- ${MOBILE} {
40
+ ${breakpoint.below.MLarge`
46
41
  ${lift}
47
- }
42
+ `}
48
43
  `;
49
44
  }}
50
45
  `;
51
46
  const SectionHeader = styled.div`
52
- padding-bottom: ${space[5]};
53
- border-bottom: 1px solid ${colors.lightGrey};
47
+ padding-bottom: var(--stokr-space-5);
48
+ border-bottom: 1px solid var(--stokr-border-subtle);
54
49
  transition:
55
50
  padding-bottom 300ms,
56
51
  border-color 300ms;
@@ -59,10 +54,10 @@ const SectionHeader = styled.div`
59
54
  padding-bottom: 0;
60
55
  border-bottom-color: transparent;
61
56
  ` : css`
62
- ${MOBILE} {
57
+ ${breakpoint.below.MLarge`
63
58
  padding-bottom: 0;
64
59
  border-bottom-color: transparent;
65
- }
60
+ `}
66
61
  `)}
67
62
 
68
63
  @media (prefers-reduced-motion: reduce) {
@@ -73,11 +68,11 @@ const SectionToggle = styled.button`
73
68
  display: flex;
74
69
  align-items: center;
75
70
  justify-content: space-between;
76
- gap: ${space[4]};
71
+ gap: var(--stokr-space-4);
77
72
  width: calc(100% + 2 * var(--section-pad-x));
78
73
  margin: calc(-1 * var(--section-pad-y)) calc(-1 * var(--section-pad-x)) 0;
79
74
  padding: var(--section-pad-y) var(--section-pad-x) 0;
80
- border-radius: ${radius.lg};
75
+ border-radius: var(--stokr-radius-lg);
81
76
 
82
77
  ${({ $collapsed, $always }) => {
83
78
  const reachBottom = css`
@@ -86,9 +81,9 @@ const SectionToggle = styled.button`
86
81
  `;
87
82
  if (!$collapsed) return "";
88
83
  return $always ? reachBottom : css`
89
- ${MOBILE} {
84
+ ${breakpoint.below.MLarge`
90
85
  ${reachBottom}
91
- }
86
+ `}
92
87
  `;
93
88
  }}
94
89
 
@@ -102,21 +97,21 @@ const SectionToggle = styled.button`
102
97
  `;
103
98
  const SectionBody = styled(Body)`
104
99
  ${({ $always }) => !$always && css`
105
- ${DESKTOP} {
100
+ ${breakpoint.MLarge`
106
101
  && {
107
102
  grid-template-rows: 1fr;
108
103
  opacity: 1;
109
104
  }
110
- }
105
+ `}
111
106
  `}
112
107
  `;
113
108
  const SectionBodyClip = styled(BodyClip)`
114
109
  ${({ $always }) => !$always && css`
115
- ${DESKTOP} {
110
+ ${breakpoint.MLarge`
116
111
  && {
117
112
  overflow: visible;
118
113
  }
119
- }
114
+ `}
120
115
  `}
121
116
  `;
122
117
  const SectionBodyInner = styled.div`
@@ -126,11 +121,11 @@ const SectionBodyInner = styled.div`
126
121
  padding-top: var(--section-gap);
127
122
  `;
128
123
  const SectionHeading = styled.h2`
129
- ${typography.sectionTitle};
124
+ ${text("subtitleM")};
130
125
  /* Global h2 rules may uppercase; the design does not. */
131
126
  text-transform: none;
132
127
  margin: 0;
133
- color: ${colors.pureBlack};
128
+ color: var(--stokr-text-primary);
134
129
  `;
135
130
  export {
136
131
  SectionBody,
@@ -1,7 +1,7 @@
1
1
  import styled from "styled-components";
2
2
  const SectionTitle = styled.h2`
3
3
  position: relative;
4
- font-family: 'Open Sans';
4
+ font-family: var(--stokr-font-family-base);
5
5
  font-weight: normal;
6
6
  font-size: 11px;
7
7
  line-height: 20px;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { radius as radii } from '../../styles/spacing';
2
+ /** Names of the `--stokr-radius-*` tokens. */
3
+ type RadiusName = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
3
4
  export interface SkeletonProps {
4
5
  /** px when a number, any CSS length otherwise. */
5
6
  width?: number | string;
@@ -7,7 +8,7 @@ export interface SkeletonProps {
7
8
  /** Fully rounded: a circle when width = height (avatars, icons), a pill otherwise (buttons, badges). */
8
9
  round?: boolean;
9
10
  /** Corner radius: a `radius` token name, px, or CSS length. Overrides `round`. Default `sm` (4px). */
10
- radius?: keyof typeof radii | number | string;
11
+ radius?: RadiusName | number | string;
11
12
  /** Set false for a still block (e.g. many skeletons at once). Reduced-motion users never see the shimmer. */
12
13
  animate?: boolean;
13
14
  /** Block colour; change both colours on dark or coloured backgrounds. */
@@ -42,3 +43,4 @@ export interface SkeletonStatusProps {
42
43
  }
43
44
  /** Marks an area as loading: screen readers read `label`, the skeletons inside stay silent. */
44
45
  export declare const SkeletonStatus: ({ children, label, className, dataCy }: SkeletonStatusProps) => import("react/jsx-runtime").JSX.Element;
46
+ export {};
@@ -1,20 +1,20 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { SkeletonBlock, SkeletonLinesRoot, VisuallyHidden } from "./Skeleton.styles.js";
3
- import { colors } from "../../styles/colors.js";
4
- import { radius } from "../../styles/spacing.js";
3
+ const RADIUS_NAMES = ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full"];
4
+ const radiusVar = (name) => `var(--stokr-radius-${name})`;
5
5
  const toRadius = (value, round) => {
6
- if (value === void 0) return round ? radius.full : radius.sm;
6
+ if (value === void 0) return radiusVar(round ? "full" : "sm");
7
7
  if (typeof value === "number") return `${value}px`;
8
- return value in radius ? radius[value] : value;
8
+ return RADIUS_NAMES.includes(value) ? radiusVar(value) : value;
9
9
  };
10
10
  const Skeleton = ({
11
11
  width = "100%",
12
12
  height = 14,
13
13
  round = false,
14
- radius: radius2,
14
+ radius,
15
15
  animate = true,
16
- baseColor = colors.grey3,
17
- highlightColor = colors.lightGrey,
16
+ baseColor = "var(--stokr-background-surface)",
17
+ highlightColor = "var(--stokr-border-subtle)",
18
18
  className
19
19
  }) => /* @__PURE__ */ jsx(
20
20
  SkeletonBlock,
@@ -23,7 +23,7 @@ const Skeleton = ({
23
23
  className,
24
24
  $width: width,
25
25
  $height: height,
26
- $radius: toRadius(radius2, round),
26
+ $radius: toRadius(radius, round),
27
27
  $animate: animate,
28
28
  $baseColor: baseColor,
29
29
  $highlightColor: highlightColor
@@ -17,8 +17,8 @@ const SmartLink = ({ to, children, ...rest }) => {
17
17
  return /* @__PURE__ */ jsx(Link, { to, ...rest, children });
18
18
  };
19
19
  SmartLink.propTypes = {
20
- to: PropTypes.string,
21
- children: PropTypes.node
20
+ to: PropTypes.string.isRequired,
21
+ children: PropTypes.node.isRequired
22
22
  };
23
23
  export {
24
24
  SmartLink,
@@ -0,0 +1,28 @@
1
+ export type SnackbarVariant = 'info' | 'error' | 'success' | 'warning';
2
+ export type SnackbarPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
3
+ export declare const SnackbarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
4
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
5
+ }, {
6
+ $isContained?: boolean;
7
+ $position?: SnackbarPosition;
8
+ }>> & string;
9
+ export declare const SnackbarWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
10
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
11
+ }, {
12
+ $variant?: SnackbarVariant;
13
+ $isExiting?: boolean;
14
+ $duration?: number;
15
+ $isPermanent?: boolean;
16
+ $hasClick?: boolean;
17
+ }>> & string;
18
+ export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
19
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
20
+ }, {
21
+ $variant?: SnackbarVariant;
22
+ }>> & string;
23
+ export declare const Message: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
24
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
25
+ }> & string;
26
+ export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
27
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
28
+ }> & string;
@@ -1,5 +1,4 @@
1
1
  import styled, { css, keyframes } from "styled-components";
2
- import { colors } from "../../styles/colors.js";
3
2
  const slideIn = keyframes`
4
3
  from {
5
4
  opacity: 0;
@@ -58,24 +57,8 @@ const progressExpire = keyframes`
58
57
  width: 0%;
59
58
  }
60
59
  `;
61
- const variantStyles = {
62
- info: {
63
- borderColor: colors.blue,
64
- iconColor: colors.blue
65
- },
66
- error: {
67
- borderColor: colors.orangishRed,
68
- iconColor: colors.orangishRed
69
- },
70
- success: {
71
- borderColor: colors.progressAccentStart,
72
- iconColor: colors.progressAccentStart
73
- },
74
- warning: {
75
- borderColor: colors.warningOrange,
76
- iconColor: colors.warningOrange
77
- }
78
- };
60
+ const SNACKBAR_VARIANTS = ["info", "error", "success", "warning"];
61
+ const statusIcon = (variant) => `var(--stokr-status-${variant && SNACKBAR_VARIANTS.includes(variant) ? variant : "info"}-icon)`;
79
62
  const positionStyles = {
80
63
  "top-right": css`
81
64
  top: 20px;
@@ -132,11 +115,10 @@ const SnackbarWrapper = styled.div.withConfig({
132
115
  min-width: 320px;
133
116
  max-width: 480px;
134
117
  padding: 12px 16px;
135
- background-color: ${colors.white};
118
+ background-color: var(--stokr-background-surface-raised);
136
119
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.12);
137
120
  border-radius: 8px;
138
- border: 1px solid ${colors.grey};
139
- //border-bottom: 3px solid ${colors.grey};
121
+ border: 1px solid var(--stokr-border-subtle);
140
122
  pointer-events: auto;
141
123
  overflow: hidden;
142
124
  animation: ${({ $isExiting }) => $isExiting ? slideOut : "none"} 0.3s ease-out forwards;
@@ -148,7 +130,7 @@ const SnackbarWrapper = styled.div.withConfig({
148
130
  bottom: 0;
149
131
  left: 0;
150
132
  height: 3px;
151
- background-color: ${({ $variant }) => variantStyles[$variant]?.borderColor || colors.blue};
133
+ background-color: ${({ $variant }) => statusIcon($variant)};
152
134
  border-radius: 0 0 0 8px;
153
135
  ${({ $duration, $isPermanent }) => $isPermanent ? css`
154
136
  width: 100%;
@@ -174,7 +156,7 @@ const IconWrapper = styled.div.withConfig({
174
156
  justify-content: center;
175
157
  width: 20px;
176
158
  height: 20px;
177
- color: ${({ $variant }) => variantStyles[$variant]?.iconColor || colors.blue};
159
+ color: ${({ $variant }) => statusIcon($variant)};
178
160
 
179
161
  svg {
180
162
  width: 100%;
@@ -187,7 +169,7 @@ const Message = styled.div`
187
169
  font-weight: 600;
188
170
  line-height: 24px;
189
171
  letter-spacing: 0.6px;
190
- color: ${colors.black};
172
+ color: var(--stokr-text-primary);
191
173
  `;
192
174
  const CloseButton = styled.button`
193
175
  flex-shrink: 0;
@@ -211,13 +193,13 @@ const CloseButton = styled.button`
211
193
  height: 12px;
212
194
 
213
195
  path {
214
- stroke: ${colors.grey2};
196
+ stroke: var(--stokr-text-tertiary);
215
197
  stroke-width: 2;
216
198
  }
217
199
  }
218
200
 
219
201
  &:hover svg path {
220
- stroke: ${colors.black};
202
+ stroke: var(--stokr-text-primary);
221
203
  }
222
204
  `;
223
205
  export {
@@ -225,6 +207,5 @@ export {
225
207
  IconWrapper,
226
208
  Message,
227
209
  SnackbarContainer,
228
- SnackbarWrapper,
229
- variantStyles
210
+ SnackbarWrapper
230
211
  };
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  const SpanButton = styled.span.withConfig({
3
3
  shouldForwardProp: (props) => !["urlLink"].includes(props)
4
4
  })`
5
- color: #0050ca;
5
+ color: var(--stokr-action-accent-bg);
6
6
  cursor: pointer;
7
7
  font-weight: 400;
8
8
 
@@ -11,7 +11,7 @@ const SpanButton = styled.span.withConfig({
11
11
  `}
12
12
 
13
13
  &:hover {
14
- color: #202020;
14
+ color: var(--stokr-text-primary);
15
15
  }
16
16
  `;
17
17
  export {
@@ -0,0 +1,29 @@
1
+ import { CSSProperties, HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
+ export type StatusDotVariant = 'pending' | 'initiated' | 'paid' | 'declined';
3
+ export interface StatusDotProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'color'> {
4
+ /** The label. */
5
+ children: ReactNode;
6
+ /** Kit status colours: pending → warning, initiated → info, paid → success, declined → error. */
7
+ variant?: StatusDotVariant;
8
+ /** Dot (and label) color; overrides the variant. */
9
+ color?: string;
10
+ /** Label color when it differs from the dot. */
11
+ labelColor?: string;
12
+ /** Background color on the `subtle` surface; overrides the variant. */
13
+ backgroundColor?: string;
14
+ /** `subtle` adds a tinted background and padding. */
15
+ surface?: 'transparent' | 'subtle';
16
+ /** Small bold uppercase label. */
17
+ uppercase?: boolean;
18
+ /** Dot diameter in px. */
19
+ dotSize?: number;
20
+ /** Animates the dot. */
21
+ pulse?: boolean;
22
+ className?: string;
23
+ style?: CSSProperties;
24
+ labelStyle?: CSSProperties;
25
+ /** Makes it a button (pointer, Enter/Space). */
26
+ onClick?: (event: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>) => void;
27
+ }
28
+ export declare const StatusDot: ({ children, variant, color, labelColor, backgroundColor, surface, uppercase, dotSize, pulse, className, style, labelStyle, onClick, ...rest }: StatusDotProps) => import("react/jsx-runtime").JSX.Element;
29
+ export default StatusDot;
@@ -1,24 +1,18 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import "react";
3
- import { colors } from "../../styles/colors.js";
4
2
  import { Root, Dot, Label } from "./StatusDot.styles.js";
5
- const VARIANT_PRESETS = {
6
- pending: {
7
- color: colors.grey2,
8
- backgroundColor: "rgba(155, 155, 155, 0.14)"
9
- },
10
- initiated: {
11
- color: colors.blue,
12
- backgroundColor: "#0050CA0D"
13
- },
14
- paid: {
15
- color: colors.fernGreen,
16
- backgroundColor: "#4D97410D"
17
- },
18
- declined: {
19
- color: colors.darkRed,
20
- backgroundColor: "rgba(210, 32, 13, 0.08)"
21
- }
3
+ const VARIANT_STATUS = {
4
+ pending: "warning",
5
+ initiated: "info",
6
+ paid: "success",
7
+ declined: "error"
8
+ };
9
+ const preset = (variant) => {
10
+ const status = VARIANT_STATUS[variant];
11
+ return {
12
+ color: `var(--stokr-status-${status}-icon)`,
13
+ labelColor: `var(--stokr-status-${status}-text)`,
14
+ backgroundColor: `var(--stokr-status-${status}-bg)`
15
+ };
22
16
  };
23
17
  const StatusDot = ({
24
18
  children,
@@ -36,11 +30,11 @@ const StatusDot = ({
36
30
  onClick,
37
31
  ...rest
38
32
  }) => {
39
- const preset = variant && VARIANT_PRESETS[variant] ? VARIANT_PRESETS[variant] : null;
40
- const resolvedColor = color ?? preset?.color ?? colors.black;
41
- const resolvedLabelColor = labelColor ?? resolvedColor;
33
+ const colors = variant && VARIANT_STATUS[variant] ? preset(variant) : null;
34
+ const resolvedColor = color ?? colors?.color ?? "var(--stokr-text-primary)";
35
+ const resolvedLabelColor = labelColor ?? (color === void 0 ? colors?.labelColor : void 0) ?? resolvedColor;
42
36
  const isSubtle = surface === "subtle";
43
- const resolvedBackground = isSubtle && (backgroundColor !== void 0 ? backgroundColor : preset?.backgroundColor);
37
+ const resolvedBackground = isSubtle && (backgroundColor !== void 0 ? backgroundColor : colors?.backgroundColor);
44
38
  return /* @__PURE__ */ jsxs(
45
39
  Root,
46
40
  {
@@ -0,0 +1,20 @@
1
+ export declare const Root: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }, {
4
+ $subtle?: boolean;
5
+ $backgroundColor?: string | false;
6
+ $hasClick?: boolean;
7
+ }>> & string;
8
+ export declare const Dot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
9
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
10
+ }, {
11
+ $size: number;
12
+ $color: string;
13
+ $pulse?: boolean;
14
+ }>> & string;
15
+ export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
16
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
17
+ }, {
18
+ $color: string;
19
+ $uppercase?: boolean;
20
+ }>> & string;
@@ -0,0 +1,35 @@
1
+ import { CSSProperties, HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
2
+ import { InfoIconProps } from '../InfoIcon/InfoIcon';
3
+ export type StatusTagVariant = 'pending' | 'initiated' | 'confirmed' | 'declined' | 'paid';
4
+ export interface StatusTagProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
5
+ /** Kit tag: icon plus the `tag-<variant>-bg` background and `tag-<variant>-text` label. */
6
+ variant?: StatusTagVariant;
7
+ /** Custom icon; wins over the variant's. */
8
+ icon?: ReactNode;
9
+ /** The label. */
10
+ text: ReactNode;
11
+ /** Wraps the tag in an info tooltip with this text. */
12
+ tooltip?: InfoIconProps['title'];
13
+ /** Extra props for the tooltip's underlying `Tooltip`. */
14
+ tooltipProps?: InfoIconProps['tooltipProps'];
15
+ /** Icon color; overrides the label colour the icon follows by default. */
16
+ iconColor?: string;
17
+ /** Icon and label color on hover. */
18
+ hoverColor?: string;
19
+ /** Turns the hover color change off. */
20
+ disableHoverColor?: boolean;
21
+ /** Shows the hover color permanently. */
22
+ colorActive?: boolean;
23
+ /** CSS min-width of the tag, e.g. `120px`. */
24
+ minWidth?: string;
25
+ className?: string;
26
+ containerStyle?: CSSProperties;
27
+ iconStyle?: CSSProperties;
28
+ textStyle?: CSSProperties;
29
+ /** Makes the tag clickable (pointer cursor, hover fade). */
30
+ onClick?: MouseEventHandler<HTMLDivElement>;
31
+ /** Centers the content inside `minWidth`. */
32
+ center?: boolean;
33
+ }
34
+ export declare const StatusTag: ({ variant, icon, text, tooltip, tooltipProps, iconColor, hoverColor, disableHoverColor, colorActive, minWidth, className, containerStyle, iconStyle, textStyle, onClick, center, ...props }: StatusTagProps) => import("react/jsx-runtime").JSX.Element;
35
+ export default StatusTag;
@@ -1,46 +1,17 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
2
  import { InfoIcon } from "../InfoIcon/InfoIcon.js";
4
3
  import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
5
4
  import SvgTransferIcon from "../../static/images/transfer-icon.svg.js";
6
5
  import SvgCheckmarkCircleIcon from "../../static/images/checkmark-circle-icon.svg.js";
7
6
  import SvgCloseCircleIcon from "../../static/images/close-circle-icon.svg.js";
8
7
  import SvgAddFolderIcon from "../../static/images/add-folder-icon.svg.js";
9
- import { colors } from "../../styles/colors.js";
10
8
  import { StatusTagContainer, StatusTagWrapper, IconWrapper, StatusText } from "./StatusTag.styles.js";
11
9
  const variantConfig = {
12
- pending: {
13
- icon: /* @__PURE__ */ jsx(SvgAddFolderIcon, { width: 12, height: 12 }),
14
- iconColor: "#021128",
15
- hoverColor: "#021128",
16
- disableHoverColor: true,
17
- useStroke: true
18
- },
19
- initiated: {
20
- icon: /* @__PURE__ */ jsx(MaterialIcon, { name: "search_activity", size: 14 }),
21
- iconColor: "#032F78",
22
- hoverColor: "#032F78",
23
- disableHoverColor: false
24
- },
25
- confirmed: {
26
- icon: /* @__PURE__ */ jsx(SvgCheckmarkCircleIcon, { width: 12, height: 12 }),
27
- iconColor: colors.grey2,
28
- hoverColor: colors.blue,
29
- disableHoverColor: false
30
- },
31
- declined: {
32
- icon: /* @__PURE__ */ jsx(SvgCloseCircleIcon, { width: 12, height: 12 }),
33
- iconColor: colors.darkRed,
34
- hoverColor: colors.darkRed,
35
- disableHoverColor: false,
36
- useStroke: true
37
- },
38
- paid: {
39
- icon: /* @__PURE__ */ jsx(SvgTransferIcon, { width: 14, height: 14 }),
40
- iconColor: "#3D9626",
41
- hoverColor: "#3D9626",
42
- disableHoverColor: false
43
- }
10
+ pending: { icon: /* @__PURE__ */ jsx(SvgAddFolderIcon, { width: 12, height: 12 }), useStroke: true },
11
+ initiated: { icon: /* @__PURE__ */ jsx(MaterialIcon, { name: "search_activity", size: "xs" }) },
12
+ confirmed: { icon: /* @__PURE__ */ jsx(SvgCheckmarkCircleIcon, { width: 12, height: 12 }) },
13
+ declined: { icon: /* @__PURE__ */ jsx(SvgCloseCircleIcon, { width: 12, height: 12 }), useStroke: true },
14
+ paid: { icon: /* @__PURE__ */ jsx(SvgTransferIcon, { width: 14, height: 14 }) }
44
15
  };
45
16
  const StatusTag = ({
46
17
  variant,
@@ -62,16 +33,16 @@ const StatusTag = ({
62
33
  ...props
63
34
  }) => {
64
35
  const variantData = variant ? variantConfig[variant] : null;
65
- const finalIconColor = iconColor !== void 0 ? iconColor : variantData?.iconColor || colors.grey2;
66
- const finalHoverColor = hoverColor !== void 0 ? hoverColor : variantData?.hoverColor;
67
- const finalDisableHoverColor = disableHoverColor !== void 0 ? disableHoverColor : variantData?.disableHoverColor ?? false;
36
+ const finalIconColor = iconColor ?? (variantData ? "currentColor" : "var(--stokr-text-tertiary)");
37
+ const finalHoverColor = hoverColor;
38
+ const finalDisableHoverColor = disableHoverColor ?? false;
68
39
  let finalIcon = null;
69
40
  if (icon) {
70
41
  finalIcon = icon;
71
42
  } else if (variantData?.icon) {
72
43
  finalIcon = variantData.icon;
73
44
  }
74
- const content = /* @__PURE__ */ jsx(StatusTagContainer, { className, style: containerStyle, onClick, hasClick: !!onClick, ...props, children: /* @__PURE__ */ jsxs(StatusTagWrapper, { minWidth, center, children: [
45
+ const content = /* @__PURE__ */ jsx(StatusTagContainer, { className, style: containerStyle, onClick, hasClick: !!onClick, ...props, children: /* @__PURE__ */ jsxs(StatusTagWrapper, { minWidth, center, $variant: variantData ? variant : void 0, children: [
75
46
  finalIcon && /* @__PURE__ */ jsx(
76
47
  IconWrapper,
77
48
  {