@stokr/components-library 5.0.1 → 5.0.2

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 (127) hide show
  1. package/README.md +8 -8
  2. package/dist/components/AddressItem/AddressItem.styles.js +9 -9
  3. package/dist/components/AdminDashboard/Table/Table.styles.js +18 -25
  4. package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
  5. package/dist/components/BackButton/BackButton.styles.js +15 -15
  6. package/dist/components/BasicTable/BasicTable.styles.js +6 -8
  7. package/dist/components/BlogPost/BlogPost.styles.js +9 -13
  8. package/dist/components/Button/Button.styles.d.ts +1 -1
  9. package/dist/components/Button/Button.styles.js +122 -11
  10. package/dist/components/Button/GlareButton.js +1 -1
  11. package/dist/components/Card/Card.styles.js +3 -4
  12. package/dist/components/CardTabs/CardTabs.styles.js +17 -17
  13. package/dist/components/ChartLegend/ChartLegend.styles.js +6 -7
  14. package/dist/components/Checkbox/Checkbox.styles.js +10 -11
  15. package/dist/components/Checklist/ChecklistCard.js +3 -3
  16. package/dist/components/Checklist/ChecklistCard.styles.js +7 -20
  17. package/dist/components/Chips/Chip.js +2 -2
  18. package/dist/components/Chips/Chip.styles.js +6 -10
  19. package/dist/components/Collapsible/Collapsible.styles.js +14 -14
  20. package/dist/components/ComponentScroll/ComponentScroll.styles.js +5 -5
  21. package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +5 -5
  22. package/dist/components/ConfirmModal/ConfirmModal.styles.js +2 -2
  23. package/dist/components/Country/CountrySelect.js +6 -6
  24. package/dist/components/CryptoAddress/CryptoAddress.d.ts +6 -2
  25. package/dist/components/CryptoAddress/CryptoAddress.js +2 -2
  26. package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +2 -1
  27. package/dist/components/CryptoAddress/CryptoAddress.styles.js +20 -27
  28. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +2 -2
  29. package/dist/components/FAQ/FAQ.styles.js +15 -20
  30. package/dist/components/Form/Form.styles.js +5 -5
  31. package/dist/components/Grid/Grid.styles.js +7 -7
  32. package/dist/components/IdentityInfo/IdentityInfo.styles.js +10 -22
  33. package/dist/components/InfoBox/InfoBox.d.ts +2 -2
  34. package/dist/components/InfoBox/InfoBox.js +5 -3
  35. package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
  36. package/dist/components/Input/DatePickerInput.styles.js +23 -24
  37. package/dist/components/Input/Input.styles.js +24 -30
  38. package/dist/components/Input/InputPassword.styles.js +11 -11
  39. package/dist/components/Input/InputWithButton.styles.js +5 -5
  40. package/dist/components/Input/MultiSelect.js +17 -17
  41. package/dist/components/Input/OtpInput.js +1 -1
  42. package/dist/components/Input/RangeInput.js +2 -2
  43. package/dist/components/Input/SearchInput.styles.js +10 -10
  44. package/dist/components/Input/Select.js +21 -16
  45. package/dist/components/Input/Select.styles.js +24 -28
  46. package/dist/components/Input/TableFilterDropdown.js +5 -5
  47. package/dist/components/Input/Textarea.styles.js +11 -13
  48. package/dist/components/MenuNav/MenuNav.styles.js +2 -5
  49. package/dist/components/Modal/Modal.styles.js +25 -31
  50. package/dist/components/Modal/PaymentModal.js +7 -7
  51. package/dist/components/Modal/SideModal.styles.js +8 -8
  52. package/dist/components/Modal/SideModalParts.js +15 -16
  53. package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +5 -8
  54. package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -2
  55. package/dist/components/Number/Number.js +1 -1
  56. package/dist/components/Number/Number.styles.js +2 -2
  57. package/dist/components/Pagination/Pagination.styles.js +7 -7
  58. package/dist/components/PanelCard/PanelCard.styles.js +17 -17
  59. package/dist/components/Payment/DetailRows.js +1 -1
  60. package/dist/components/Payment/DetailsToggle.js +4 -6
  61. package/dist/components/Payment/PaymentDetailsCard.js +29 -53
  62. package/dist/components/Payment/PaymentDisplay.js +12 -20
  63. package/dist/components/Payment/PaymentPendingCard.d.ts +1 -1
  64. package/dist/components/Payment/PaymentPendingCard.js +10 -13
  65. package/dist/components/Payment/PaymentSuccessCard.js +6 -9
  66. package/dist/components/Payment/TimerComponent.js +5 -4
  67. package/dist/components/Process/Process.styles.js +7 -13
  68. package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -10
  69. package/dist/components/ProfileBox/ProfileBox.styles.js +5 -7
  70. package/dist/components/Radio/Radio.styles.js +8 -9
  71. package/dist/components/RefreshButton/RefreshButton.styles.js +5 -5
  72. package/dist/components/RequestDataBox/RequestDataBox.styles.js +3 -5
  73. package/dist/components/Section/Section.styles.js +16 -18
  74. package/dist/components/SectionTitle/SectionTitle.styles.d.ts +4 -0
  75. package/dist/components/SectionTitle/SectionTitle.styles.js +4 -7
  76. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  77. package/dist/components/Skeleton/Skeleton.js +3 -3
  78. package/dist/components/Snackbar/Snackbar.styles.js +8 -10
  79. package/dist/components/SpanButton/SpanButton.styles.js +2 -2
  80. package/dist/components/StatusDot/StatusDot.d.ts +1 -1
  81. package/dist/components/StatusDot/StatusDot.js +5 -5
  82. package/dist/components/StatusDot/StatusDot.styles.js +2 -5
  83. package/dist/components/StatusTag/StatusTag.js +1 -1
  84. package/dist/components/StatusTag/StatusTag.styles.js +4 -4
  85. package/dist/components/StepController/StepController.styles.js +7 -7
  86. package/dist/components/StepSidebar/MobileStepProgress.styles.js +6 -8
  87. package/dist/components/StepSidebar/StepProgress.styles.js +18 -27
  88. package/dist/components/StepSidebar/StepSidebar.styles.js +14 -20
  89. package/dist/components/StokrLoader/StokrLoader.js +41 -13
  90. package/dist/components/StokrLoader/loaderSession.d.ts +14 -0
  91. package/dist/components/StokrLoader/loaderSession.js +30 -0
  92. package/dist/components/Switch/Switch.styles.js +12 -14
  93. package/dist/components/TabsNav/TabsNav.styles.js +7 -9
  94. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -1
  95. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +30 -35
  96. package/dist/components/Text/Text.styles.d.ts +2 -1
  97. package/dist/components/Text/Text.styles.js +36 -70
  98. package/dist/components/TextLink/TextLink.styles.js +5 -7
  99. package/dist/components/Timeline/Timeline.styles.js +17 -23
  100. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  101. package/dist/components/Tooltip/Tooltip.js +1 -2
  102. package/dist/components/Tooltip/Tooltip.styles.js +4 -5
  103. package/dist/components/breakdown/Breakdown.js +3 -5
  104. package/dist/components/logo/Logo.js +1 -1
  105. package/dist/design-system/css/base.css +14 -14
  106. package/dist/design-system/css-builders.d.ts +25 -0
  107. package/dist/design-system/css-builders.js +81 -0
  108. package/dist/design-system/generated/fonts.css +0 -49
  109. package/dist/design-system/generated/text-classes.css +123 -123
  110. package/dist/design-system/generated/text-styles.d.ts +24 -24
  111. package/dist/design-system/generated/text-styles.js +123 -123
  112. package/dist/design-system/generated/tokens.css +417 -412
  113. package/dist/design-system/index.d.ts +2 -1
  114. package/dist/design-system/styled/build-theme.js +1 -1
  115. package/dist/design-system/tokens/colors.d.ts +1 -1
  116. package/dist/design-system/tokens/colors.js +1 -1
  117. package/dist/design-system/tokens/fonts.d.ts +6 -2
  118. package/dist/design-system/tokens/fonts.js +1 -1
  119. package/dist/design-system/tokens/semantic.d.ts +15 -3
  120. package/dist/design-system/tokens/semantic.js +5 -1
  121. package/dist/design-system/tokens/typography.d.ts +1 -1
  122. package/dist/design-system/tokens/typography.js +64 -41
  123. package/dist/index.d.ts +11 -1
  124. package/dist/index.js +3 -0
  125. package/dist/styles/borderedField.d.ts +1 -1
  126. package/dist/styles/borderedField.js +13 -13
  127. package/package.json +1 -1
@@ -4,8 +4,8 @@ import { text } from "../../design-system/styled/text.js";
4
4
  const Aside = styled.aside`
5
5
  display: flex;
6
6
  flex-direction: column;
7
- background-color: var(--stokr-background-default);
8
- color: var(--stokr-text-primary);
7
+ background-color: var(--background-default);
8
+ color: var(--text-primary);
9
9
  position: sticky;
10
10
  top: 0;
11
11
  z-index: 10;
@@ -22,7 +22,7 @@ const Aside = styled.aside`
22
22
  overflow-x: hidden;
23
23
  overflow-y: auto;
24
24
  overflow-wrap: anywhere;
25
- border-right: 1px solid var(--stokr-border-subtle);
25
+ border-right: 1px solid var(--border-subtle);
26
26
  `}
27
27
  `;
28
28
  const MobileHeader = styled.div`
@@ -51,7 +51,7 @@ const CloseButton = styled.button`
51
51
  background: none;
52
52
  border: none;
53
53
  cursor: pointer;
54
- color: var(--stokr-text-primary);
54
+ color: var(--text-primary);
55
55
  transition: opacity 0.2s;
56
56
 
57
57
  &:hover {
@@ -81,7 +81,7 @@ const LogoButton = styled.button`
81
81
  background: none;
82
82
  border: none;
83
83
  cursor: pointer;
84
- color: var(--stokr-text-primary);
84
+ color: var(--text-primary);
85
85
  `;
86
86
  const MobileLogoImg = styled.img`
87
87
  display: block;
@@ -106,50 +106,44 @@ const NameGroup = styled.div`
106
106
  const Eyebrow = styled.p`
107
107
  ${text("labelRegular")}
108
108
  margin: 0;
109
- color: var(--stokr-text-primary);
109
+ color: var(--text-primary);
110
110
  `;
111
111
  const Title = styled.p`
112
112
  ${text("titleL")}
113
113
  margin: 0;
114
- color: var(--stokr-text-primary);
114
+ color: var(--text-primary);
115
115
  `;
116
116
  const Description = styled.p`
117
117
  ${text("bodyM")}
118
118
  margin: 0;
119
- color: var(--stokr-text-primary);
119
+ color: var(--text-primary);
120
120
  `;
121
121
  const SupportWrap = styled.div`
122
122
  padding-top: 21px;
123
- border-top: 1px solid var(--stokr-border-strong);
123
+ border-top: 1px solid var(--border-strong);
124
124
  `;
125
125
  const SupportHeading = styled.p`
126
126
  margin: 0 0 6px;
127
- font-size: 14px;
128
- font-weight: 600;
129
- line-height: 20px;
130
- color: var(--stokr-text-primary);
131
-
132
- ${breakpoint.XLarge`
133
- font-size: 16px;
134
- `}
127
+ ${text("subtitleM")}
128
+ color: var(--text-primary);
135
129
  `;
136
130
  const SupportBody = styled.p`
137
131
  margin: 0;
138
132
  font-size: 12px;
139
133
  font-weight: 400;
140
134
  line-height: 18px;
141
- color: var(--stokr-text-primary);
135
+ color: var(--text-primary);
142
136
 
143
137
  ${breakpoint.XLarge`
144
138
  font-size: 13px;
145
139
  `}
146
140
  `;
147
141
  const SupportLink = styled.a`
148
- color: var(--stokr-action-accent-bg);
142
+ color: var(--action-accent-bg);
149
143
  text-decoration: underline;
150
144
 
151
145
  &:hover {
152
- color: var(--stokr-action-accent-bg);
146
+ color: var(--action-accent-bg);
153
147
  }
154
148
  `;
155
149
  export {
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
3
  import styled, { keyframes, css } from "styled-components";
4
+ import { useLoaderElapsed, elapsedStyle } from "./loaderSession.js";
4
5
  import { breakpoint } from "../../design-system/styled/breakpoint.js";
5
6
  const loaderGif = "https://res.cloudinary.com/stokr/image/upload/f_webp,fl_awebp,q_auto/v1575035788/Static/stokr_loader_white_400x400_egnhgb.gif";
6
7
  const RING_CIRCUMFERENCE = 1021;
@@ -24,7 +25,7 @@ const RingSvg = styled.svg`
24
25
  display: block;
25
26
  max-width: 100%;
26
27
  max-height: 100%;
27
- color: var(--stokr-text-primary);
28
+ color: var(--text-primary);
28
29
 
29
30
  circle {
30
31
  transform-origin: 200px 200px;
@@ -66,7 +67,7 @@ const LogoSvg = styled.svg`
66
67
  display: block;
67
68
  max-width: 100%;
68
69
  height: auto;
69
- color: var(--stokr-text-primary);
70
+ color: var(--text-primary);
70
71
 
71
72
  .wipe {
72
73
  transform-box: fill-box;
@@ -75,37 +76,56 @@ const LogoSvg = styled.svg`
75
76
  animation: ${logoWipe} 0.95s cubic-bezier(0.65, 0, 0.35, 1) forwards;
76
77
  }
77
78
 
79
+ /* Every delay minus the time this loading moment already ran (see useLoaderElapsed): a negative delay starts the
80
+ animation part-way, so a loader replacing another one carries on instead of restarting. */
78
81
  .wipe-s {
79
- animation-delay: 0s;
82
+ animation-delay: calc(0s - var(--loader-elapsed, 0s));
80
83
  }
81
84
 
82
85
  .wipe-t {
83
- animation-delay: 0.15s;
86
+ animation-delay: calc(0.15s - var(--loader-elapsed, 0s));
84
87
  }
85
88
 
86
89
  .wipe-k {
87
- animation-delay: 0.6s;
90
+ animation-delay: calc(0.6s - var(--loader-elapsed, 0s));
88
91
  }
89
92
 
90
93
  .wipe-r {
91
- animation-delay: 0.75s;
94
+ animation-delay: calc(0.75s - var(--loader-elapsed, 0s));
92
95
  }
93
96
 
94
97
  .draw {
95
- animation: ${logoDraw} 1s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
98
+ animation: ${logoDraw} 1s cubic-bezier(0.65, 0, 0.35, 1) both;
99
+ animation-delay: calc(0.3s - var(--loader-elapsed, 0s));
96
100
  }
97
101
 
98
102
  .spin {
99
103
  transform-origin: ${LOGO_O_CENTER};
100
- animation: ${logoSpin} 2.2s cubic-bezier(0.65, 0, 0.35, 1) 1.8s infinite;
104
+ animation: ${logoSpin} 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
105
+ animation-delay: calc(1.8s - var(--loader-elapsed, 0s));
106
+ }
107
+
108
+ /* No motion asked for: the finished wordmark, with the O as drawn, standing still. The label still says "Loading". */
109
+ @media (prefers-reduced-motion: reduce) {
110
+ .wipe {
111
+ animation: none;
112
+ transform: scaleY(1);
113
+ }
114
+
115
+ .draw,
116
+ .spin {
117
+ animation: none;
118
+ }
101
119
  }
102
120
  `;
103
121
  const LoaderLogo = ({ width = LOGO_WIDTH, className }) => {
122
+ const elapsed = useLoaderElapsed();
104
123
  const id = useId().replace(/:/g, "");
105
124
  return /* @__PURE__ */ jsxs(
106
125
  LogoSvg,
107
126
  {
108
127
  className,
128
+ style: elapsedStyle(elapsed),
109
129
  width,
110
130
  height: width * LOGO_HEIGHT / LOGO_WIDTH,
111
131
  viewBox: `0 0 ${LOGO_WIDTH} ${LOGO_HEIGHT}`,
@@ -157,7 +177,8 @@ const StyledStokrLoader = styled.div.withConfig({
157
177
  })`
158
178
  align-items: center;
159
179
  animation: ${fadeIn} 1.8s ease-in-out forwards;
160
- background: var(--stokr-background-default);
180
+ animation-delay: calc(0s - var(--loader-elapsed, 0s));
181
+ background: var(--background-default);
161
182
  display: flex;
162
183
  height: 100vh;
163
184
  justify-content: center;
@@ -167,6 +188,11 @@ const StyledStokrLoader = styled.div.withConfig({
167
188
  width: 100vw;
168
189
  z-index: 1000;
169
190
 
191
+ /* The fade-in is decoration too: show the loader at once when motion is reduced. */
192
+ @media (prefers-reduced-motion: reduce) {
193
+ animation: none;
194
+ }
195
+
170
196
  ${({ noFullscreen }) => noFullscreen && `
171
197
  height: calc(100vh - 97px);
172
198
  bottom: 0;
@@ -174,13 +200,14 @@ const StyledStokrLoader = styled.div.withConfig({
174
200
  `}
175
201
 
176
202
  ${({ variant }) => variant === "logo" ? css`
203
+ /* The wordmark is 140 × 34, so it needs far more width than the ring to carry the same weight on the page. */
177
204
  svg {
178
- width: 200px;
205
+ width: min(80vw, 280px);
179
206
  }
180
207
 
181
208
  ${breakpoint.Medium`
182
209
  svg {
183
- width: 300px;
210
+ width: min(60vw, 480px);
184
211
  }
185
212
  `}
186
213
  ` : css`
@@ -208,10 +235,11 @@ const StyledStokrLoader = styled.div.withConfig({
208
235
  `}
209
236
  `;
210
237
  function StokrLoader({ noFullscreen, variant = "ring" }) {
211
- return /* @__PURE__ */ jsx(StyledStokrLoader, { noFullscreen, variant, children: variant === "logo" ? /* @__PURE__ */ jsx(LoaderLogo, {}) : /* @__PURE__ */ jsx(LoaderRing, {}) });
238
+ const elapsed = useLoaderElapsed();
239
+ return /* @__PURE__ */ jsx(StyledStokrLoader, { noFullscreen, variant, style: elapsedStyle(elapsed), children: variant === "logo" ? /* @__PURE__ */ jsx(LoaderLogo, {}) : /* @__PURE__ */ jsx(LoaderRing, {}) });
212
240
  }
213
241
  const StokrLoaderBox = ({ variant = "ring" }) => {
214
- return /* @__PURE__ */ jsx(CenterFullWidth, { children: variant === "logo" ? /* @__PURE__ */ jsx(LoaderLogo, { width: 200 }) : /* @__PURE__ */ jsx(LoaderRing, {}) });
242
+ return /* @__PURE__ */ jsx(CenterFullWidth, { children: variant === "logo" ? /* @__PURE__ */ jsx(LoaderLogo, { width: 280 }) : /* @__PURE__ */ jsx(LoaderRing, {}) });
215
243
  };
216
244
  const fadeInOut = keyframes`
217
245
  50% {
@@ -0,0 +1,14 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface LoaderSession {
3
+ start: number;
4
+ mounted: number;
5
+ lastUnmount: number;
6
+ }
7
+ /** A loader that mounts within this gap after another one left continues the same animation. */
8
+ export declare const LOADER_CONTINUES_WITHIN_MS = 600;
9
+ /** Seconds the current loading moment has been running at time `at` (ms); 0 when this is a new moment. */
10
+ export declare const loaderElapsed: (session: LoaderSession, at: number) => number;
11
+ /** Elapsed seconds, read once when the loader first renders, and the loader registered while it is on screen. */
12
+ export declare const useLoaderElapsed: () => number;
13
+ /** The CSS variable the animation delays subtract, so a loader that mounts late starts that far into the animation. */
14
+ export declare const elapsedStyle: (elapsed: number) => CSSProperties;
@@ -0,0 +1,30 @@
1
+ import { useState, useEffect } from "react";
2
+ const SESSION_KEY = /* @__PURE__ */ Symbol.for("stokr.loader.session");
3
+ const LOADER_CONTINUES_WITHIN_MS = 600;
4
+ const getSession = () => {
5
+ const holder = globalThis;
6
+ return holder[SESSION_KEY] ??= { start: 0, mounted: 0, lastUnmount: -Infinity };
7
+ };
8
+ const clock = () => typeof performance !== "undefined" ? performance.now() : Date.now();
9
+ const loaderElapsed = (session, at) => session.mounted > 0 || at - session.lastUnmount <= LOADER_CONTINUES_WITHIN_MS ? Math.max(0, (at - session.start) / 1e3) : 0;
10
+ const useLoaderElapsed = () => {
11
+ const [elapsed] = useState(() => loaderElapsed(getSession(), clock()));
12
+ useEffect(() => {
13
+ const session = getSession();
14
+ const at = clock();
15
+ if (session.mounted === 0 && at - session.lastUnmount > LOADER_CONTINUES_WITHIN_MS) session.start = at;
16
+ session.mounted += 1;
17
+ return () => {
18
+ session.mounted -= 1;
19
+ session.lastUnmount = clock();
20
+ };
21
+ }, []);
22
+ return elapsed;
23
+ };
24
+ const elapsedStyle = (elapsed) => ({ "--loader-elapsed": `${elapsed.toFixed(2)}s` });
25
+ export {
26
+ LOADER_CONTINUES_WITHIN_MS,
27
+ elapsedStyle,
28
+ loaderElapsed,
29
+ useLoaderElapsed
30
+ };
@@ -1,4 +1,5 @@
1
1
  import styled from "styled-components";
2
+ import { text } from "../../design-system/styled/text.js";
2
3
  const switchWidth = 34;
3
4
  const Container = styled.div.withConfig({
4
5
  shouldForwardProp: (props) => !["mobile"].includes(props)
@@ -20,20 +21,17 @@ const Value = styled.button.withConfig({
20
21
  })`
21
22
  display: inline-block;
22
23
  vertical-align: middle;
23
- font-size: 11px;
24
- line-height: 16px;
25
- letter-spacing: 2px;
26
- text-transform: uppercase;
24
+ ${text("labelRegular")}
27
25
  padding: 2px 0;
28
26
  opacity: 0.5;
29
- color: var(--stokr-text-primary);
27
+ color: var(--text-primary);
30
28
  transition:
31
29
  opacity 0.2s,
32
30
  color 0.2s;
33
31
  cursor: pointer;
34
32
 
35
33
  &:hover {
36
- color: var(--stokr-action-accent-bg);
34
+ color: var(--action-accent-bg);
37
35
  }
38
36
 
39
37
  ${(props) => props.active && `
@@ -41,10 +39,10 @@ const Value = styled.button.withConfig({
41
39
  `}
42
40
 
43
41
  ${(props) => props.dark && `
44
- color: var(--stokr-color-blue-500);
42
+ color: var(--color-blue-500);
45
43
 
46
44
  &:hover {
47
- color: var(--stokr-text-primary);
45
+ color: var(--text-primary);
48
46
  }
49
47
  `};
50
48
  `;
@@ -56,7 +54,7 @@ const Indicator = styled.div.withConfig({
56
54
  width: ${switchWidth}px;
57
55
  height: 16px;
58
56
  border-radius: 8px;
59
- background-color: var(--stokr-action-secondary-bg);
57
+ background-color: var(--action-secondary-bg);
60
58
  margin: 0 16px;
61
59
  position: relative;
62
60
  outline: 0;
@@ -73,7 +71,7 @@ const Indicator = styled.div.withConfig({
73
71
  margin-top: -9px;
74
72
  margin-left: -9px;
75
73
  border-radius: 9px;
76
- background-color: var(--stokr-action-primary-bg);
74
+ background-color: var(--action-primary-bg);
77
75
  transform: translateX(0);
78
76
  transition:
79
77
  transform 0.2s,
@@ -82,20 +80,20 @@ const Indicator = styled.div.withConfig({
82
80
 
83
81
  &:hover {
84
82
  &:before {
85
- background-color: var(--stokr-action-accent-bg);
83
+ background-color: var(--action-accent-bg);
86
84
  }
87
85
  }
88
86
 
89
87
  ${(props) => props.dark && `
90
- background-color: var(--stokr-color-neutral-500);
88
+ background-color: var(--color-neutral-500);
91
89
 
92
90
  &:before {
93
- background-color: var(--stokr-color-blue-500);
91
+ background-color: var(--color-blue-500);
94
92
  }
95
93
 
96
94
  &:hover {
97
95
  &:before {
98
- background-color: var(--stokr-color-neutral-900);
96
+ background-color: var(--color-neutral-900);
99
97
  }
100
98
  }
101
99
  `}
@@ -1,10 +1,11 @@
1
1
  import styled from "styled-components";
2
+ import { text } from "../../design-system/styled/text.js";
2
3
  import { breakpoint } from "../../design-system/styled/breakpoint.js";
3
4
  const StyledTabs = styled.div.withConfig({
4
5
  shouldForwardProp: (props) => !["noBorderBottom"].includes(props)
5
6
  })`
6
7
  position: relative;
7
- border-bottom: 1px solid var(--stokr-border-subtle);
8
+ border-bottom: 1px solid var(--border-subtle);
8
9
 
9
10
  ${(props) => props.noBorderBottom && `
10
11
  border-bottom: none;
@@ -33,11 +34,8 @@ const TabsWrapper = styled.div.withConfig({
33
34
  const LinkText = styled.span`
34
35
  display: block;
35
36
  position: relative;
36
- font-family: var(--stokr-font-family-base);
37
- font-size: 11px;
38
- letter-spacing: 2px;
39
- line-height: 20px;
40
- text-transform: uppercase;
37
+ font-family: var(--font-family-base);
38
+ ${text("labelRegular")}
41
39
  padding: 8px 0;
42
40
 
43
41
  &:before {
@@ -60,7 +58,7 @@ const StyledTab = styled.button.withConfig({
60
58
  outline: none;
61
59
  visibility: visible;
62
60
  padding: 12px;
63
- color: var(--stokr-text-primary);
61
+ color: var(--text-primary);
64
62
  transition: opacity 0.2s;
65
63
 
66
64
  ${breakpoint.Medium`
@@ -83,10 +81,10 @@ const StyledTab = styled.button.withConfig({
83
81
  }
84
82
 
85
83
  ${LinkText} {
86
- font-weight: bold;
84
+ ${text("label")}
87
85
 
88
86
  &:before {
89
- background-color: var(--stokr-action-accent-bg)!important;
87
+ background-color: var(--action-accent-bg)!important;
90
88
  }
91
89
  }
92
90
  `}
@@ -12,7 +12,7 @@ const NO_TIN_TEXT_STYLE = {
12
12
  lineHeight: "18px",
13
13
  fontWeight: 400,
14
14
  letterSpacing: "0.6px",
15
- color: "var(--stokr-text-primary)"
15
+ color: "var(--text-primary)"
16
16
  };
17
17
  const TaxResidenceCard = (props) => {
18
18
  const {
@@ -8,8 +8,8 @@ const NOT_FORWARDED = ["isOpen", "$variant"];
8
8
  const CardWrapper = styled.div.withConfig({
9
9
  shouldForwardProp: (prop) => !NOT_FORWARDED.includes(prop)
10
10
  })`
11
- background: var(--stokr-background-default);
12
- border: 1px solid var(--stokr-border-subtle);
11
+ background: var(--background-default);
12
+ border: 1px solid var(--border-subtle);
13
13
  border-radius: 8px;
14
14
  overflow: hidden;
15
15
  transition:
@@ -17,16 +17,16 @@ const CardWrapper = styled.div.withConfig({
17
17
  box-shadow 0.2s;
18
18
 
19
19
  ${(props) => props.isOpen && css`
20
- border-color: var(--stokr-border-subtle);
20
+ border-color: var(--border-subtle);
21
21
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
22
22
  `}
23
23
 
24
24
  ${bordered(css`
25
- padding: var(--stokr-space-5);
25
+ padding: var(--space-5);
26
26
  border: ${BORDERED_BORDER};
27
- border-radius: var(--stokr-radius-lg);
28
- background: var(--stokr-background-default);
29
- box-shadow: var(--stokr-elevation-md);
27
+ border-radius: var(--radius-lg);
28
+ background: var(--background-default);
29
+ box-shadow: var(--elevation-md);
30
30
  overflow: visible;
31
31
  `)}
32
32
 
@@ -46,17 +46,17 @@ const CardHeader = styled.div.withConfig({
46
46
  outline: 0;
47
47
  cursor: pointer;
48
48
  text-align: left;
49
- font-family: var(--stokr-font-family-base);
50
- color: var(--stokr-text-primary);
49
+ font-family: var(--font-family-base);
50
+ color: var(--text-primary);
51
51
  transition: background-color 0.15s;
52
52
  user-select: none;
53
53
 
54
54
  &:hover {
55
- background-color: var(--stokr-background-surface);
55
+ background-color: var(--background-surface);
56
56
  }
57
57
 
58
58
  &:focus-visible {
59
- box-shadow: inset 0 0 0 2px var(--stokr-color-blue-500);
59
+ box-shadow: inset 0 0 0 2px var(--color-blue-500);
60
60
  }
61
61
 
62
62
  ${bordered(css`
@@ -68,9 +68,9 @@ const CardHeader = styled.div.withConfig({
68
68
 
69
69
  &:focus-visible {
70
70
  box-shadow: none;
71
- outline: 2px solid var(--stokr-border-focus);
71
+ outline: 2px solid var(--border-focus);
72
72
  outline-offset: 4px;
73
- border-radius: var(--stokr-radius-sm);
73
+ border-radius: var(--radius-sm);
74
74
  }
75
75
  `)}
76
76
  `;
@@ -81,10 +81,10 @@ const HeaderIcon = styled.span`
81
81
  width: 24px;
82
82
  margin-right: 16px;
83
83
  flex-shrink: 0;
84
- color: var(--stokr-text-primary);
84
+ color: var(--text-primary);
85
85
 
86
86
  ${bordered(css`
87
- margin-right: var(--stokr-space-3);
87
+ margin-right: var(--space-3);
88
88
  `)}
89
89
  `;
90
90
  const FlagWrapper = styled.span.withConfig({
@@ -113,21 +113,16 @@ const HeaderTitle = styled.span.withConfig({
113
113
  })`
114
114
  flex: 1;
115
115
  min-width: 0;
116
- font-family: var(--stokr-font-family-base);
117
- font-weight: 700;
118
- font-size: 13px;
119
- line-height: 18px;
120
- letter-spacing: 1.5px;
121
- text-transform: uppercase;
122
- color: var(--stokr-text-primary);
116
+ font-family: var(--font-family-base);
117
+ ${text("titleXxs")}
118
+ color: var(--text-primary);
123
119
  white-space: nowrap;
124
120
  overflow: hidden;
125
121
  text-overflow: ellipsis;
126
122
 
127
123
  ${bordered(css`
128
124
  ${text("subtitleS")}
129
- text-transform: none;
130
- color: var(--stokr-text-primary);
125
+ color: var(--text-primary);
131
126
  `)}
132
127
  `;
133
128
  const HeaderActions = styled.div.withConfig({
@@ -140,7 +135,7 @@ const HeaderActions = styled.div.withConfig({
140
135
  flex-shrink: 0;
141
136
 
142
137
  ${bordered(css`
143
- gap: var(--stokr-space-3);
138
+ gap: var(--space-3);
144
139
  `)}
145
140
  `;
146
141
  const DeleteButton = styled.button`
@@ -152,7 +147,7 @@ const DeleteButton = styled.button`
152
147
  padding: 0;
153
148
  border: 0;
154
149
  background: transparent;
155
- color: var(--stokr-text-primary);
150
+ color: var(--text-primary);
156
151
  cursor: pointer;
157
152
  border-radius: 50%;
158
153
  transition:
@@ -160,21 +155,21 @@ const DeleteButton = styled.button`
160
155
  background-color 0.15s;
161
156
 
162
157
  &:hover {
163
- color: var(--stokr-action-negative-text);
164
- background-color: var(--stokr-action-negative-bg);
158
+ color: var(--action-negative-text);
159
+ background-color: var(--action-negative-bg);
165
160
  }
166
161
 
167
162
  &:focus-visible {
168
- outline: 2px solid var(--stokr-border-focus);
163
+ outline: 2px solid var(--border-focus);
169
164
  outline-offset: 2px;
170
165
  }
171
166
 
172
167
  &:disabled {
173
168
  cursor: not-allowed;
174
- color: var(--stokr-text-tertiary);
169
+ color: var(--text-tertiary);
175
170
 
176
171
  &:hover {
177
- color: var(--stokr-text-tertiary);
172
+ color: var(--text-tertiary);
178
173
  background-color: transparent;
179
174
  }
180
175
  }
@@ -187,7 +182,7 @@ const ChevronIcon = styled.span.withConfig({
187
182
  display: inline-flex;
188
183
  font-size: 20px;
189
184
  line-height: 1;
190
- color: var(--stokr-text-primary);
185
+ color: var(--text-primary);
191
186
  transform: rotate(0);
192
187
  transition: transform 0.25s ease;
193
188
 
@@ -202,7 +197,7 @@ const ChevronIcon = styled.span.withConfig({
202
197
  const CardBodyCollapse = styled(Collapse).withConfig({
203
198
  shouldForwardProp: (prop) => !NOT_FORWARDED.includes(prop)
204
199
  })`
205
- border-top: 1px solid var(--stokr-border-subtle);
200
+ border-top: 1px solid var(--border-subtle);
206
201
 
207
202
  ${bordered(css`
208
203
  border-top: 0;
@@ -215,8 +210,8 @@ const CardBody = styled.div`
215
210
  padding: 24px 22px 20px;
216
211
 
217
212
  ${bordered(css`
218
- gap: var(--stokr-space-8);
219
- padding: var(--stokr-space-8) 0 0;
213
+ gap: var(--space-8);
214
+ padding: var(--space-8) 0 0;
220
215
 
221
216
  /* Figma labels the card's fields 14/20; the shared bordered label is 12/16. */
222
217
  & > * > label {
@@ -1,5 +1,5 @@
1
1
  import { TextName } from '../../design-system';
2
- /** The kit's text colours (`--stokr-text-*`). */
2
+ /** The kit's text colours (`--text-*`). */
3
3
  export type TextColor = 'primary' | 'body' | 'secondary' | 'tertiary';
4
4
  export interface TextProps {
5
5
  /**
@@ -17,6 +17,7 @@ export interface TextProps {
17
17
  withMarginBottom?: boolean;
18
18
  withMarginRight?: boolean;
19
19
  blockchainLoadingMsg?: boolean;
20
+ /** @deprecated No effect: kit text styles already switch size at the mobile breakpoint. */
20
21
  responsiveFont?: boolean;
21
22
  small?: boolean;
22
23
  success?: boolean;