@stokr/components-library 4.2.5 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) 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 -120
  235. package/dist/index.js +50 -60
  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/static/images/address-refreshing.gif.js +0 -4
  292. package/dist/static/images/process-waiting.gif.js +0 -4
  293. package/dist/styles/borderedField.d.ts +0 -11
  294. package/dist/styles/borderedField.js +0 -56
  295. package/dist/styles/colors.d.ts +0 -68
  296. package/dist/styles/colors.js +0 -69
  297. package/dist/styles/elevation.d.ts +0 -13
  298. package/dist/styles/elevation.js +0 -15
  299. package/dist/styles/global.js +0 -63
  300. package/dist/styles/rwd.d.ts +0 -55
  301. package/dist/styles/rwd.js +0 -79
  302. package/dist/styles/spacing.d.ts +0 -36
  303. package/dist/styles/spacing.js +0 -38
  304. package/dist/styles/theme.d.ts +0 -92
  305. package/dist/styles/theme.js +0 -36
  306. package/dist/styles/typography.d.ts +0 -42
  307. package/dist/styles/typography.js +0 -56
@@ -0,0 +1,272 @@
1
+ import { ColorName } from './colors';
2
+ /**
3
+ * Semantic colour tokens: what components use. Names mirror the kit's variables (text/primary → text-primary,
4
+ * CSS --stokr-text-primary). Each token points at a colour for the light and the dark theme.
5
+ */
6
+ export interface SemanticPair {
7
+ light: ColorName;
8
+ dark: ColorName;
9
+ }
10
+ export declare const semantic: {
11
+ readonly 'text-primary': {
12
+ readonly light: "neutral-900";
13
+ readonly dark: "brand-pure-white";
14
+ };
15
+ readonly 'text-on-brand': {
16
+ readonly light: "brand-pure-white";
17
+ readonly dark: "brand-pure-white";
18
+ };
19
+ readonly 'text-body': {
20
+ readonly light: "neutral-900";
21
+ readonly dark: "neutral-100";
22
+ };
23
+ readonly 'text-secondary': {
24
+ readonly light: "neutral-700";
25
+ readonly dark: "custom-01";
26
+ };
27
+ readonly 'text-tertiary': {
28
+ readonly light: "neutral-500";
29
+ readonly dark: "neutral-700";
30
+ };
31
+ readonly 'text-link': {
32
+ readonly light: "neutral-900";
33
+ readonly dark: "brand-pure-white";
34
+ };
35
+ readonly 'background-default': {
36
+ readonly light: "brand-pure-white";
37
+ readonly dark: "custom-10";
38
+ };
39
+ readonly 'background-surface': {
40
+ readonly light: "neutral-50";
41
+ readonly dark: "custom-08";
42
+ };
43
+ readonly 'background-surface-raised': {
44
+ readonly light: "brand-pure-white";
45
+ readonly dark: "custom-09";
46
+ };
47
+ readonly 'background-overlay': {
48
+ readonly light: "brand-future-black";
49
+ readonly dark: "brand-future-black";
50
+ };
51
+ readonly 'border-subtle': {
52
+ readonly light: "neutral-200";
53
+ readonly dark: "custom-07";
54
+ };
55
+ readonly 'border-default': {
56
+ readonly light: "neutral-300";
57
+ readonly dark: "custom-05";
58
+ };
59
+ readonly 'border-strong': {
60
+ readonly light: "neutral-900";
61
+ readonly dark: "neutral-100";
62
+ };
63
+ readonly 'border-focus': {
64
+ readonly light: "blue-500";
65
+ readonly dark: "blue-400";
66
+ };
67
+ readonly 'action-accent-bg': {
68
+ readonly light: "blue-500";
69
+ readonly dark: "green-500";
70
+ };
71
+ readonly 'action-accent-bg-hover': {
72
+ readonly light: "blue-600";
73
+ readonly dark: "green-600";
74
+ };
75
+ readonly 'action-accent-text': {
76
+ readonly light: "brand-pure-white";
77
+ readonly dark: "brand-future-black";
78
+ };
79
+ readonly 'action-primary-bg': {
80
+ readonly light: "neutral-900";
81
+ readonly dark: "brand-pure-white";
82
+ };
83
+ readonly 'action-primary-bg-hover': {
84
+ readonly light: "neutral-800";
85
+ readonly dark: "neutral-100";
86
+ };
87
+ readonly 'action-primary-bg-pressed': {
88
+ readonly light: "brand-future-black";
89
+ readonly dark: "neutral-200";
90
+ };
91
+ readonly 'action-primary-text': {
92
+ readonly light: "brand-pure-white";
93
+ readonly dark: "brand-future-black";
94
+ };
95
+ readonly 'action-secondary-bg': {
96
+ readonly light: "neutral-100";
97
+ readonly dark: "neutral-900";
98
+ };
99
+ readonly 'action-secondary-bg-hover': {
100
+ readonly light: "neutral-200";
101
+ readonly dark: "custom-04";
102
+ };
103
+ readonly 'action-secondary-text': {
104
+ readonly light: "neutral-900";
105
+ readonly dark: "brand-pure-white";
106
+ };
107
+ readonly 'action-outline-border': {
108
+ readonly light: "neutral-100";
109
+ readonly dark: "neutral-900";
110
+ };
111
+ readonly 'action-outline-bg-hover': {
112
+ readonly light: "neutral-100";
113
+ readonly dark: "neutral-900";
114
+ };
115
+ readonly 'action-outline-text': {
116
+ readonly light: "neutral-900";
117
+ readonly dark: "brand-pure-white";
118
+ };
119
+ readonly 'action-negative-bg': {
120
+ readonly light: "red-50";
121
+ readonly dark: "red-900";
122
+ };
123
+ readonly 'action-negative-bg-hover': {
124
+ readonly light: "red-100";
125
+ readonly dark: "red-800";
126
+ };
127
+ readonly 'action-negative-text': {
128
+ readonly light: "red-500";
129
+ readonly dark: "red-500";
130
+ };
131
+ readonly 'action-disabled-accent-bg': {
132
+ readonly light: "blue-200";
133
+ readonly dark: "green-800";
134
+ };
135
+ readonly 'action-disabled-accent-text': {
136
+ readonly light: "brand-pure-white";
137
+ readonly dark: "brand-future-black";
138
+ };
139
+ readonly 'action-disabled-primary-bg': {
140
+ readonly light: "neutral-100";
141
+ readonly dark: "custom-04";
142
+ };
143
+ readonly 'action-disabled-primary-text': {
144
+ readonly light: "neutral-500";
145
+ readonly dark: "custom-02";
146
+ };
147
+ readonly 'action-disabled-secondary-bg': {
148
+ readonly light: "neutral-50";
149
+ readonly dark: "custom-09";
150
+ };
151
+ readonly 'action-disabled-secondary-text': {
152
+ readonly light: "neutral-300";
153
+ readonly dark: "custom-03";
154
+ };
155
+ readonly 'action-disabled-outline-border': {
156
+ readonly light: "neutral-50";
157
+ readonly dark: "custom-09";
158
+ };
159
+ readonly 'action-disabled-outline-text': {
160
+ readonly light: "neutral-300";
161
+ readonly dark: "custom-03";
162
+ };
163
+ readonly 'action-disabled-negative-text': {
164
+ readonly light: "red-200";
165
+ readonly dark: "red-700";
166
+ };
167
+ readonly 'status-success-bg': {
168
+ readonly light: "green-200";
169
+ readonly dark: "green-800";
170
+ };
171
+ readonly 'status-success-border': {
172
+ readonly light: "green-600";
173
+ readonly dark: "green-400";
174
+ };
175
+ readonly 'status-success-text': {
176
+ readonly light: "green-700";
177
+ readonly dark: "green-300";
178
+ };
179
+ readonly 'status-success-icon': {
180
+ readonly light: "green-600";
181
+ readonly dark: "green-400";
182
+ };
183
+ readonly 'status-warning-bg': {
184
+ readonly light: "yellow-50";
185
+ readonly dark: "yellow-900";
186
+ };
187
+ readonly 'status-warning-border': {
188
+ readonly light: "yellow-600";
189
+ readonly dark: "yellow-600";
190
+ };
191
+ readonly 'status-warning-text': {
192
+ readonly light: "orange-700";
193
+ readonly dark: "yellow-500";
194
+ };
195
+ readonly 'status-warning-icon': {
196
+ readonly light: "yellow-600";
197
+ readonly dark: "yellow-600";
198
+ };
199
+ readonly 'status-error-bg': {
200
+ readonly light: "red-100";
201
+ readonly dark: "red-900";
202
+ };
203
+ readonly 'status-error-border': {
204
+ readonly light: "red-500";
205
+ readonly dark: "red-500";
206
+ };
207
+ readonly 'status-error-text': {
208
+ readonly light: "red-700";
209
+ readonly dark: "red-300";
210
+ };
211
+ readonly 'status-error-icon': {
212
+ readonly light: "red-500";
213
+ readonly dark: "red-400";
214
+ };
215
+ readonly 'status-info-bg': {
216
+ readonly light: "neutral-100";
217
+ readonly dark: "neutral-900";
218
+ };
219
+ readonly 'status-info-border': {
220
+ readonly light: "neutral-300";
221
+ readonly dark: "neutral-700";
222
+ };
223
+ readonly 'status-info-text': {
224
+ readonly light: "neutral-900";
225
+ readonly dark: "brand-pure-white";
226
+ };
227
+ readonly 'status-info-icon': {
228
+ readonly light: "neutral-700";
229
+ readonly dark: "neutral-500";
230
+ };
231
+ readonly 'tag-pending-bg': {
232
+ readonly light: "yellow-50";
233
+ readonly dark: "yellow-900";
234
+ };
235
+ readonly 'tag-pending-text': {
236
+ readonly light: "orange-700";
237
+ readonly dark: "yellow-500";
238
+ };
239
+ readonly 'tag-initiated-bg': {
240
+ readonly light: "neutral-100";
241
+ readonly dark: "neutral-800";
242
+ };
243
+ readonly 'tag-initiated-text': {
244
+ readonly light: "neutral-900";
245
+ readonly dark: "brand-pure-white";
246
+ };
247
+ readonly 'tag-confirmed-bg': {
248
+ readonly light: "green-200";
249
+ readonly dark: "green-800";
250
+ };
251
+ readonly 'tag-confirmed-text': {
252
+ readonly light: "neutral-900";
253
+ readonly dark: "green-300";
254
+ };
255
+ readonly 'tag-declined-bg': {
256
+ readonly light: "red-100";
257
+ readonly dark: "red-900";
258
+ };
259
+ readonly 'tag-declined-text': {
260
+ readonly light: "red-700";
261
+ readonly dark: "red-300";
262
+ };
263
+ readonly 'tag-paid-bg': {
264
+ readonly light: "green-600";
265
+ readonly dark: "green-400";
266
+ };
267
+ readonly 'tag-paid-text': {
268
+ readonly light: "neutral-900";
269
+ readonly dark: "neutral-900";
270
+ };
271
+ };
272
+ export type SemanticName = keyof typeof semantic;
@@ -0,0 +1,76 @@
1
+ const semantic = {
2
+ /* Text color */
3
+ "text-primary": { light: "neutral-900", dark: "brand-pure-white" },
4
+ "text-on-brand": { light: "brand-pure-white", dark: "brand-pure-white" },
5
+ "text-body": { light: "neutral-900", dark: "neutral-100" },
6
+ "text-secondary": { light: "neutral-700", dark: "custom-01" },
7
+ "text-tertiary": { light: "neutral-500", dark: "neutral-700" },
8
+ "text-link": { light: "neutral-900", dark: "brand-pure-white" },
9
+ /* Background color */
10
+ "background-default": { light: "brand-pure-white", dark: "custom-10" },
11
+ "background-surface": { light: "neutral-50", dark: "custom-08" },
12
+ "background-surface-raised": { light: "brand-pure-white", dark: "custom-09" },
13
+ "background-overlay": { light: "brand-future-black", dark: "brand-future-black" },
14
+ /* Border color */
15
+ "border-subtle": { light: "neutral-200", dark: "custom-07" },
16
+ "border-default": { light: "neutral-300", dark: "custom-05" },
17
+ "border-strong": { light: "neutral-900", dark: "neutral-100" },
18
+ "border-focus": { light: "blue-500", dark: "blue-400" },
19
+ /* Action color */
20
+ "action-accent-bg": { light: "blue-500", dark: "green-500" },
21
+ "action-accent-bg-hover": { light: "blue-600", dark: "green-600" },
22
+ "action-accent-text": { light: "brand-pure-white", dark: "brand-future-black" },
23
+ "action-primary-bg": { light: "neutral-900", dark: "brand-pure-white" },
24
+ "action-primary-bg-hover": { light: "neutral-800", dark: "neutral-100" },
25
+ "action-primary-bg-pressed": { light: "brand-future-black", dark: "neutral-200" },
26
+ "action-primary-text": { light: "brand-pure-white", dark: "brand-future-black" },
27
+ "action-secondary-bg": { light: "neutral-100", dark: "neutral-900" },
28
+ "action-secondary-bg-hover": { light: "neutral-200", dark: "custom-04" },
29
+ "action-secondary-text": { light: "neutral-900", dark: "brand-pure-white" },
30
+ "action-outline-border": { light: "neutral-100", dark: "neutral-900" },
31
+ "action-outline-bg-hover": { light: "neutral-100", dark: "neutral-900" },
32
+ "action-outline-text": { light: "neutral-900", dark: "brand-pure-white" },
33
+ "action-negative-bg": { light: "red-50", dark: "red-900" },
34
+ "action-negative-bg-hover": { light: "red-100", dark: "red-800" },
35
+ "action-negative-text": { light: "red-500", dark: "red-500" },
36
+ "action-disabled-accent-bg": { light: "blue-200", dark: "green-800" },
37
+ "action-disabled-accent-text": { light: "brand-pure-white", dark: "brand-future-black" },
38
+ "action-disabled-primary-bg": { light: "neutral-100", dark: "custom-04" },
39
+ "action-disabled-primary-text": { light: "neutral-500", dark: "custom-02" },
40
+ "action-disabled-secondary-bg": { light: "neutral-50", dark: "custom-09" },
41
+ "action-disabled-secondary-text": { light: "neutral-300", dark: "custom-03" },
42
+ "action-disabled-outline-border": { light: "neutral-50", dark: "custom-09" },
43
+ "action-disabled-outline-text": { light: "neutral-300", dark: "custom-03" },
44
+ "action-disabled-negative-text": { light: "red-200", dark: "red-700" },
45
+ /* Status color */
46
+ "status-success-bg": { light: "green-200", dark: "green-800" },
47
+ "status-success-border": { light: "green-600", dark: "green-400" },
48
+ "status-success-text": { light: "green-700", dark: "green-300" },
49
+ "status-success-icon": { light: "green-600", dark: "green-400" },
50
+ "status-warning-bg": { light: "yellow-50", dark: "yellow-900" },
51
+ "status-warning-border": { light: "yellow-600", dark: "yellow-600" },
52
+ "status-warning-text": { light: "orange-700", dark: "yellow-500" },
53
+ "status-warning-icon": { light: "yellow-600", dark: "yellow-600" },
54
+ "status-error-bg": { light: "red-100", dark: "red-900" },
55
+ "status-error-border": { light: "red-500", dark: "red-500" },
56
+ "status-error-text": { light: "red-700", dark: "red-300" },
57
+ "status-error-icon": { light: "red-500", dark: "red-400" },
58
+ "status-info-bg": { light: "neutral-100", dark: "neutral-900" },
59
+ "status-info-border": { light: "neutral-300", dark: "neutral-700" },
60
+ "status-info-text": { light: "neutral-900", dark: "brand-pure-white" },
61
+ "status-info-icon": { light: "neutral-700", dark: "neutral-500" },
62
+ /* Tag color */
63
+ "tag-pending-bg": { light: "yellow-50", dark: "yellow-900" },
64
+ "tag-pending-text": { light: "orange-700", dark: "yellow-500" },
65
+ "tag-initiated-bg": { light: "neutral-100", dark: "neutral-800" },
66
+ "tag-initiated-text": { light: "neutral-900", dark: "brand-pure-white" },
67
+ "tag-confirmed-bg": { light: "green-200", dark: "green-800" },
68
+ "tag-confirmed-text": { light: "neutral-900", dark: "green-300" },
69
+ "tag-declined-bg": { light: "red-100", dark: "red-900" },
70
+ "tag-declined-text": { light: "red-700", dark: "red-300" },
71
+ "tag-paid-bg": { light: "green-600", dark: "green-400" },
72
+ "tag-paid-text": { light: "neutral-900", dark: "neutral-900" }
73
+ };
74
+ export {
75
+ semantic
76
+ };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Type scales from the STOKR UI kit (section "Type scale"). Three scales share the same style names, so switching is one
3
+ * constant (ACTIVE_SCALE): `uppercase` is what stokr.io ships today, `sentence1` is fluid (clamp 375 → 1440 px),
4
+ * `sentence2` is the updated sentence-case scale with whole-pixel line-heights.
5
+ * Values here are the only place a font size, weight or spacing is written; CSS reads them as --stokr-text-<name>-*.
6
+ */
7
+ export type FontFamilyName = 'openSans' | 'inter';
8
+ export type ScaleName = 'uppercase' | 'sentence1' | 'sentence2';
9
+ /** Open Sans is what the site loads today; Inter (variable, self-hosted too) is the kit's sentence-case option: switch ACTIVE_FONT only. */
10
+ export declare const ACTIVE_SCALE: ScaleName;
11
+ export declare const ACTIVE_FONT: FontFamilyName;
12
+ export declare const fontFamilies: Record<FontFamilyName, string>;
13
+ export declare const fontWeights: {
14
+ readonly light: 300;
15
+ readonly regular: 400;
16
+ readonly medium: 500;
17
+ readonly semibold: 600;
18
+ readonly bold: 700;
19
+ readonly extrabold: 800;
20
+ };
21
+ export interface TextStyle {
22
+ size: string;
23
+ lineHeight: string;
24
+ weight: number;
25
+ letterSpacing: string;
26
+ uppercase?: boolean;
27
+ underline?: boolean;
28
+ }
29
+ export interface TextSpec {
30
+ desktop: TextStyle;
31
+ mobile?: Partial<TextStyle>;
32
+ }
33
+ export declare const textNames: readonly ["display", "titleXxl", "titleXl", "titleL", "titleM", "titleS", "titleXs", "titleXxs", "subtitleL", "subtitleM", "subtitleS", "bodyL", "bodyM", "bodyS", "buttonLabel", "dataLabel", "label", "overline", "labelRegular", "caption", "footnote", "linkL", "linkM", "linkS"];
34
+ export type TextName = (typeof textNames)[number];
35
+ export type TypeScale = Record<TextName, TextSpec>;
36
+ export declare const scales: Record<ScaleName, TypeScale>;
37
+ /** Mobile breakpoint of the kit (max-width): type styles switch to their `mobile` values at or below it. */
38
+ export declare const MOBILE_MAX_WIDTH = "767px";
@@ -0,0 +1,120 @@
1
+ const ACTIVE_SCALE = "uppercase";
2
+ const ACTIVE_FONT = "openSans";
3
+ const fontFamilies = {
4
+ openSans: "'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif",
5
+ inter: "'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif"
6
+ };
7
+ const fontWeights = { light: 300, regular: 400, medium: 500, semibold: 600, bold: 700, extrabold: 800 };
8
+ const textNames = [
9
+ "display",
10
+ "titleXxl",
11
+ "titleXl",
12
+ "titleL",
13
+ "titleM",
14
+ "titleS",
15
+ "titleXs",
16
+ "titleXxs",
17
+ "subtitleL",
18
+ "subtitleM",
19
+ "subtitleS",
20
+ "bodyL",
21
+ "bodyM",
22
+ "bodyS",
23
+ "buttonLabel",
24
+ "dataLabel",
25
+ "label",
26
+ "overline",
27
+ "labelRegular",
28
+ "caption",
29
+ "footnote",
30
+ "linkL",
31
+ "linkM",
32
+ "linkS"
33
+ ];
34
+ const px = (n) => `${n}px`;
35
+ const style = (size, lineHeight, weight, letterSpacing, extra = {}) => ({
36
+ size: px(size),
37
+ lineHeight: px(lineHeight),
38
+ weight,
39
+ letterSpacing,
40
+ ...extra
41
+ });
42
+ const fluid = (min, max) => {
43
+ const slope = (max - min) / (1440 - 375) * 100;
44
+ const intercept = min - 375 * slope / 100;
45
+ const rem = (n) => `${+(n / 16).toFixed(3)}rem`;
46
+ return `clamp(${rem(min)}, ${rem(intercept)} + ${+slope.toFixed(3)}vw, ${rem(max)})`;
47
+ };
48
+ const sentenceCommon = {
49
+ subtitleL: { desktop: style(18, 28, 600, "0") },
50
+ subtitleM: { desktop: style(16, 24, 600, "0") },
51
+ subtitleS: { desktop: style(14, 20, 600, "0") },
52
+ bodyL: { desktop: style(18, 28, 400, "0") },
53
+ bodyS: { desktop: style(14, 20, 400, "0") },
54
+ buttonLabel: { desktop: style(12, 24, 700, "0.06em", { uppercase: true }) },
55
+ dataLabel: { desktop: style(12, 20, 400, "0.06em", { uppercase: true }), mobile: { size: "11px", lineHeight: "16px" } },
56
+ label: { desktop: style(11, 16, 700, "0.06em", { uppercase: true }) },
57
+ overline: { desktop: style(12, 16, 600, "0.06em", { uppercase: true }) },
58
+ labelRegular: { desktop: style(11, 16, 400, "0.06em", { uppercase: true }) },
59
+ caption: { desktop: style(12, 16, 500, "0") },
60
+ footnote: { desktop: style(9, 16, 400, "0") },
61
+ linkL: { desktop: style(18, 28, 600, "0", { underline: true }) },
62
+ linkM: { desktop: style(16, 24, 600, "0", { underline: true }) },
63
+ linkS: { desktop: style(14, 20, 600, "0", { underline: true }) }
64
+ };
65
+ const sentence2 = {
66
+ display: { desktop: style(64, 68, 700, "0") },
67
+ titleXxl: { desktop: style(48, 56, 700, "0") },
68
+ titleXl: { desktop: style(40, 48, 700, "0") },
69
+ titleL: { desktop: style(32, 40, 700, "0") },
70
+ titleM: { desktop: style(24, 32, 700, "0") },
71
+ titleS: { desktop: style(20, 28, 700, "0") },
72
+ titleXs: { desktop: style(18, 24, 700, "0") },
73
+ titleXxs: { desktop: style(16, 24, 700, "0") },
74
+ bodyM: { desktop: style(16, 26, 400, "0") },
75
+ ...sentenceCommon
76
+ };
77
+ ({
78
+ display: { desktop: { ...sentence2.display.desktop, size: fluid(44, 66) } },
79
+ titleXxl: { desktop: { ...sentence2.titleXxl.desktop, size: fluid(36, 56) } },
80
+ titleXl: { desktop: { ...sentence2.titleXl.desktop, size: fluid(30, 44) } },
81
+ titleL: { desktop: { ...sentence2.titleL.desktop, size: fluid(24, 32) } },
82
+ titleM: { desktop: { ...sentence2.titleM.desktop, size: fluid(20, 24) } },
83
+ titleS: { desktop: { ...sentence2.titleS.desktop, size: fluid(18, 20) } },
84
+ titleXs: { desktop: { ...sentence2.titleXs.desktop, size: fluid(16, 18) } },
85
+ titleXxs: { desktop: { ...sentence2.titleXxs.desktop, size: fluid(14, 16) } },
86
+ bodyL: { desktop: style(18, 28, 400, "0", { lineHeight: "1.65" }) },
87
+ bodyM: { desktop: { ...sentence2.bodyM.desktop } },
88
+ bodyS: { desktop: { ...sentence2.bodyS.desktop } },
89
+ caption: { desktop: { ...sentence2.caption.desktop } }
90
+ });
91
+ ({
92
+ display: { desktop: style(66, 64, 800, "3px", { uppercase: true }) },
93
+ titleXxl: { desktop: style(48, 55, 800, "1.8px", { uppercase: true }) },
94
+ titleXl: { desktop: style(34, 40, 800, "1.5px", { uppercase: true }) },
95
+ titleL: { desktop: style(22, 26, 800, "0.8px", { uppercase: true }) },
96
+ titleM: { desktop: style(20, 24, 800, "0.8px", { uppercase: true }) },
97
+ titleS: { desktop: style(18, 24, 700, "0.8px", { uppercase: true }) },
98
+ titleXs: { desktop: style(16, 24, 700, "0.8px", { uppercase: true }) },
99
+ titleXxs: { desktop: style(14, 20, 700, "1px", { uppercase: true }) },
100
+ subtitleL: { desktop: style(18, 28, 600, "-0.014em") },
101
+ subtitleM: { desktop: style(16, 24, 600, "-0.011em") },
102
+ subtitleS: { desktop: style(14, 20, 600, "-0.006em") },
103
+ bodyL: { desktop: style(18, 28, 400, "0") },
104
+ bodyM: { desktop: style(16, 24, 400, "0") },
105
+ bodyS: { desktop: style(14, 20, 400, "0") },
106
+ buttonLabel: { desktop: style(12, 24, 700, "2px", { uppercase: true }) },
107
+ dataLabel: { desktop: style(12, 20, 400, "2px", { uppercase: true }) },
108
+ label: { desktop: style(11, 16, 700, "2px", { uppercase: true }) },
109
+ overline: { desktop: style(11, 16, 600, "2px", { uppercase: true }) },
110
+ labelRegular: { desktop: style(11, 16, 400, "2px", { uppercase: true }) },
111
+ caption: { desktop: style(12, 16, 400, "0") },
112
+ footnote: { desktop: style(9, 16, 400, "0") }
113
+ });
114
+ export {
115
+ ACTIVE_FONT,
116
+ ACTIVE_SCALE,
117
+ fontFamilies,
118
+ fontWeights,
119
+ textNames
120
+ };
@@ -2,6 +2,6 @@
2
2
  * Whether a media query matches, kept in sync with resizes. Returns `serverValue` on the server and during
3
3
  * hydration, so the first client render matches the server markup (no flash, no hydration warning).
4
4
  *
5
- * const isDesktop = useMediaQuery(mediaQuery.desktopUp)
5
+ * const isDesktop = useMediaQuery(breakpoint.query.up.MLarge)
6
6
  */
7
7
  export declare const useMediaQuery: (query: string, serverValue?: boolean) => boolean;