@stokr/components-library 5.0.0 → 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 (183) hide show
  1. package/README.md +8 -8
  2. package/dist/components/AddressItem/AddressItem.d.ts +38 -0
  3. package/dist/components/AddressItem/AddressItem.js +51 -0
  4. package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
  5. package/dist/components/AddressItem/AddressItem.styles.js +71 -0
  6. package/dist/components/AdminDashboard/Table/Table.styles.js +18 -25
  7. package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
  8. package/dist/components/BackButton/BackButton.styles.js +15 -15
  9. package/dist/components/BasicTable/BasicTable.styles.js +6 -8
  10. package/dist/components/BlogPost/BlogPost.styles.js +9 -13
  11. package/dist/components/Button/Button.styles.d.ts +1 -1
  12. package/dist/components/Button/Button.styles.js +122 -11
  13. package/dist/components/Button/GlareButton.js +1 -1
  14. package/dist/components/Card/Card.styles.js +3 -4
  15. package/dist/components/CardTabs/CardTabs.styles.js +17 -17
  16. package/dist/components/ChartLegend/ChartLegend.styles.js +6 -7
  17. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
  18. package/dist/components/Checkbox/Checkbox.styles.js +10 -11
  19. package/dist/components/Checklist/ChecklistCard.js +3 -3
  20. package/dist/components/Checklist/ChecklistCard.styles.js +7 -20
  21. package/dist/components/Chips/Chip.js +2 -2
  22. package/dist/components/Chips/Chip.styles.js +6 -10
  23. package/dist/components/Collapsible/Collapsible.d.ts +10 -4
  24. package/dist/components/Collapsible/Collapsible.js +6 -14
  25. package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
  26. package/dist/components/Collapsible/Collapsible.styles.js +33 -16
  27. package/dist/components/ComponentScroll/ComponentScroll.styles.js +5 -5
  28. package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +5 -5
  29. package/dist/components/ConfirmModal/ConfirmModal.styles.js +2 -2
  30. package/dist/components/Country/CountrySelect.js +15 -20
  31. package/dist/components/Country/FlagFor.d.ts +9 -0
  32. package/dist/components/Country/FlagFor.js +25 -0
  33. package/dist/components/Country/flagLoaders.d.ts +5 -0
  34. package/dist/components/Country/flagLoaders.js +270 -0
  35. package/dist/components/Country/flagStore.d.ts +6 -0
  36. package/dist/components/Country/flagStore.js +29 -0
  37. package/dist/components/CryptoAddress/CryptoAddress.d.ts +6 -2
  38. package/dist/components/CryptoAddress/CryptoAddress.js +2 -2
  39. package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +2 -1
  40. package/dist/components/CryptoAddress/CryptoAddress.styles.js +20 -27
  41. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +2 -2
  42. package/dist/components/FAQ/FAQ.d.ts +29 -0
  43. package/dist/components/FAQ/FAQ.js +18 -18
  44. package/dist/components/FAQ/FAQ.styles.d.ts +11 -3
  45. package/dist/components/FAQ/FAQ.styles.js +59 -10
  46. package/dist/components/Form/Form.styles.js +5 -5
  47. package/dist/components/Grid/Grid.styles.js +7 -7
  48. package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
  49. package/dist/components/IdentityInfo/IdentityInfo.styles.js +13 -23
  50. package/dist/components/InfoBox/InfoBox.d.ts +15 -13
  51. package/dist/components/InfoBox/InfoBox.js +31 -14
  52. package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
  53. package/dist/components/Input/DatePickerInput.styles.js +23 -24
  54. package/dist/components/Input/Input.d.ts +3 -0
  55. package/dist/components/Input/Input.js +5 -2
  56. package/dist/components/Input/Input.styles.d.ts +4 -0
  57. package/dist/components/Input/Input.styles.js +77 -27
  58. package/dist/components/Input/InputPassword.styles.js +11 -11
  59. package/dist/components/Input/InputWithButton.styles.js +5 -5
  60. package/dist/components/Input/MultiSelect.js +17 -17
  61. package/dist/components/Input/OtpInput.js +1 -1
  62. package/dist/components/Input/RangeInput.js +2 -2
  63. package/dist/components/Input/SearchInput.styles.js +10 -10
  64. package/dist/components/Input/Select.d.ts +57 -0
  65. package/dist/components/Input/Select.js +101 -106
  66. package/dist/components/Input/Select.styles.d.ts +89 -0
  67. package/dist/components/Input/Select.styles.js +115 -19
  68. package/dist/components/Input/TableFilterDropdown.js +5 -5
  69. package/dist/components/Input/Textarea.styles.js +11 -13
  70. package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
  71. package/dist/components/MaterialIcon/requiredIcons.js +2 -0
  72. package/dist/components/MenuNav/MenuNav.styles.js +2 -5
  73. package/dist/components/Modal/Modal.styles.js +25 -31
  74. package/dist/components/Modal/PaymentModal.js +7 -7
  75. package/dist/components/Modal/SideModal.styles.js +8 -8
  76. package/dist/components/Modal/SideModalParts.js +15 -16
  77. package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +5 -8
  78. package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -2
  79. package/dist/components/Number/Number.js +1 -1
  80. package/dist/components/Number/Number.styles.js +2 -2
  81. package/dist/components/Pagination/Pagination.styles.js +7 -7
  82. package/dist/components/PanelCard/PanelCard.d.ts +51 -0
  83. package/dist/components/PanelCard/PanelCard.js +35 -0
  84. package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
  85. package/dist/components/PanelCard/PanelCard.styles.js +84 -0
  86. package/dist/components/Payment/DetailRows.js +1 -1
  87. package/dist/components/Payment/DetailsToggle.js +4 -6
  88. package/dist/components/Payment/PaymentDetailsCard.js +29 -53
  89. package/dist/components/Payment/PaymentDisplay.js +12 -20
  90. package/dist/components/Payment/PaymentPendingCard.d.ts +1 -1
  91. package/dist/components/Payment/PaymentPendingCard.js +10 -13
  92. package/dist/components/Payment/PaymentSuccessCard.js +6 -9
  93. package/dist/components/Payment/TimerComponent.js +5 -4
  94. package/dist/components/Process/Process.styles.js +7 -13
  95. package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -10
  96. package/dist/components/ProfileBox/ProfileBox.styles.js +5 -7
  97. package/dist/components/Radio/Radio.styles.d.ts +1 -0
  98. package/dist/components/Radio/Radio.styles.js +8 -9
  99. package/dist/components/RefreshButton/RefreshButton.styles.js +5 -5
  100. package/dist/components/RequestDataBox/RequestDataBox.styles.js +3 -5
  101. package/dist/components/Section/Section.styles.js +16 -18
  102. package/dist/components/SectionTitle/SectionTitle.styles.d.ts +4 -0
  103. package/dist/components/SectionTitle/SectionTitle.styles.js +4 -7
  104. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  105. package/dist/components/Skeleton/Skeleton.js +3 -3
  106. package/dist/components/Snackbar/Snackbar.styles.js +8 -10
  107. package/dist/components/SpanButton/SpanButton.styles.js +2 -2
  108. package/dist/components/StatusDot/StatusDot.d.ts +1 -1
  109. package/dist/components/StatusDot/StatusDot.js +5 -5
  110. package/dist/components/StatusDot/StatusDot.styles.js +2 -5
  111. package/dist/components/StatusTag/StatusTag.js +1 -1
  112. package/dist/components/StatusTag/StatusTag.styles.js +4 -4
  113. package/dist/components/StepController/StepController.styles.js +7 -7
  114. package/dist/components/StepSidebar/MobileStepProgress.d.ts +12 -0
  115. package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
  116. package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
  117. package/dist/components/StepSidebar/MobileStepProgress.styles.js +39 -0
  118. package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
  119. package/dist/components/StepSidebar/StepProgress.js +14 -0
  120. package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
  121. package/dist/components/StepSidebar/StepProgress.styles.js +97 -0
  122. package/dist/components/StepSidebar/StepSidebar.d.ts +36 -0
  123. package/dist/components/StepSidebar/StepSidebar.js +58 -0
  124. package/dist/components/StepSidebar/StepSidebar.styles.d.ts +55 -0
  125. package/dist/components/StepSidebar/StepSidebar.styles.js +168 -0
  126. package/dist/components/StokrLoader/StokrLoader.d.ts +16 -2
  127. package/dist/components/StokrLoader/StokrLoader.js +170 -28
  128. package/dist/components/StokrLoader/loaderSession.d.ts +14 -0
  129. package/dist/components/StokrLoader/loaderSession.js +30 -0
  130. package/dist/components/Switch/Switch.styles.js +12 -14
  131. package/dist/components/TabsNav/TabsNav.styles.js +7 -9
  132. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +26 -11
  133. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +29 -12
  134. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +103 -30
  135. package/dist/components/Text/Text.styles.d.ts +2 -1
  136. package/dist/components/Text/Text.styles.js +36 -70
  137. package/dist/components/TextLink/TextLink.styles.js +5 -7
  138. package/dist/components/Timeline/Timeline.styles.js +17 -23
  139. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  140. package/dist/components/Tooltip/Tooltip.js +1 -2
  141. package/dist/components/Tooltip/Tooltip.styles.js +4 -5
  142. package/dist/components/breakdown/Breakdown.js +3 -5
  143. package/dist/components/logo/Logo.js +1 -1
  144. package/dist/constants/chainLogos.d.ts +9 -0
  145. package/dist/constants/chainLogos.js +17 -0
  146. package/dist/design-system/css/base.css +14 -14
  147. package/dist/design-system/css-builders.d.ts +25 -0
  148. package/dist/design-system/css-builders.js +81 -0
  149. package/dist/design-system/generated/fonts.css +0 -49
  150. package/dist/design-system/generated/text-classes.css +123 -123
  151. package/dist/design-system/generated/text-styles.d.ts +24 -24
  152. package/dist/design-system/generated/text-styles.js +123 -123
  153. package/dist/design-system/generated/tokens.css +417 -412
  154. package/dist/design-system/index.d.ts +2 -1
  155. package/dist/design-system/styled/build-theme.js +1 -1
  156. package/dist/design-system/tokens/colors.d.ts +1 -1
  157. package/dist/design-system/tokens/colors.js +1 -1
  158. package/dist/design-system/tokens/fonts.d.ts +6 -2
  159. package/dist/design-system/tokens/fonts.js +1 -1
  160. package/dist/design-system/tokens/semantic.d.ts +15 -3
  161. package/dist/design-system/tokens/semantic.js +5 -1
  162. package/dist/design-system/tokens/typography.d.ts +1 -1
  163. package/dist/design-system/tokens/typography.js +64 -41
  164. package/dist/index.d.ts +84 -7
  165. package/dist/index.js +24 -4
  166. package/dist/static/images/chains/avalanche.svg +7 -0
  167. package/dist/static/images/chains/avalanche.svg.js +4 -0
  168. package/dist/static/images/chains/ethereum.svg +14 -0
  169. package/dist/static/images/chains/ethereum.svg.js +4 -0
  170. package/dist/static/images/chains/liquid.svg +7 -0
  171. package/dist/static/images/chains/liquid.svg.js +4 -0
  172. package/dist/static/images/chains/solana.svg +29 -0
  173. package/dist/static/images/chains/solana.svg.js +4 -0
  174. package/dist/static/images/chains/stellar.svg +17 -0
  175. package/dist/static/images/chains/stellar.svg.js +4 -0
  176. package/dist/static/images/chains/tempo.svg +11 -0
  177. package/dist/static/images/chains/tempo.svg.js +4 -0
  178. package/dist/styles/borderedField.d.ts +11 -0
  179. package/dist/styles/borderedField.js +53 -0
  180. package/package.json +1 -1
  181. package/dist/static/images/globe.svg.js +0 -5
  182. package/dist/static/images/trash.svg +0 -17
  183. package/dist/static/images/trash.svg.js +0 -5
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { TextName } from '../../design-system';
2
3
  import { RadioWrapOption } from './RadioWrap';
3
4
  export interface CryptoAddressData {
4
5
  value?: string | number;
@@ -26,7 +27,10 @@ export interface CryptoAddressProps {
26
27
  noBody?: boolean;
27
28
  noBorderBottom?: boolean;
28
29
  flexHead?: boolean;
30
+ /** @deprecated No effect: use `valueStyle`. */
29
31
  fontSize?: number;
32
+ /** Kit text style of `data.value` (the amount or address). Default `titleL`. */
33
+ valueStyle?: TextName;
30
34
  eqValueFontSize?: number;
31
35
  eqValueStyle?: CSSProperties;
32
36
  titleColor?: string;
@@ -40,6 +44,6 @@ export interface CryptoAddressProps {
40
44
  /** Margin-left for child divs inside Value (default: '30px'). */
41
45
  valueChildMarginLeft?: string;
42
46
  }
43
- export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, fontSize, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element;
44
- export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, fontSize, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element>;
47
+ export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element>;
45
49
  export default CryptoAddress;
@@ -31,7 +31,7 @@ const CryptoAddress = ({
31
31
  noBody,
32
32
  noBorderBottom,
33
33
  flexHead,
34
- fontSize = 22,
34
+ valueStyle,
35
35
  eqValueFontSize = 9,
36
36
  eqValueStyle,
37
37
  titleColor,
@@ -61,7 +61,7 @@ const CryptoAddress = ({
61
61
  ] }),
62
62
  /* @__PURE__ */ jsxs(Body, { noBody, style: bodyStyle, children: [
63
63
  /* @__PURE__ */ jsxs(DataBox, { style: dataBoxStyle, children: [
64
- data.value && /* @__PURE__ */ jsxs(Value, { fontSize, style: dataValueStyle, childMarginLeft: valueChildMarginLeft, children: [
64
+ data.value && /* @__PURE__ */ jsxs(Value, { textStyle: valueStyle, style: dataValueStyle, childMarginLeft: valueChildMarginLeft, children: [
65
65
  data.unit && `${data.unit} `,
66
66
  data.shortAddress ? /* @__PURE__ */ jsx(Tooltip, { placement: "top", content: data.value, children: shortenAddress(String(data.value)) }) : data.value,
67
67
  data.tooltip && /* @__PURE__ */ jsx("div", { children: copyToClipBoard(String(data.value)) })
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { TextName } from '../../design-system';
2
3
  export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
4
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
5
  }> & string;
@@ -54,7 +55,7 @@ export declare const InfoBox: import('styled-components/dist/types').IStyledComp
54
55
  export declare const Value: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
55
56
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
56
57
  }, {
57
- fontSize?: number | string;
58
+ textStyle?: TextName;
58
59
  childMarginLeft?: number | string;
59
60
  }>> & string;
60
61
  export declare const Equal: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
@@ -1,6 +1,7 @@
1
1
  import styled from "styled-components";
2
2
  import { glyph, withGlyph } from "../MaterialIcon/glyph.js";
3
3
  import { breakpoint } from "../../design-system/styled/breakpoint.js";
4
+ import { text } from "../../design-system/styled/text.js";
4
5
  const Container = styled.div`
5
6
  position: relative;
6
7
  `;
@@ -47,11 +48,7 @@ const Title = styled.div.withConfig({
47
48
  shouldForwardProp: (props) => !["color"].includes(props)
48
49
  })`
49
50
  float: left;
50
- font-weight: bold;
51
- font-size: 11px;
52
- line-height: 24px;
53
- letter-spacing: 2px;
54
- text-transform: uppercase;
51
+ ${text("label")}
55
52
  padding-right: 20px;
56
53
  color: ${(props) => props.color};
57
54
  `;
@@ -59,8 +56,8 @@ const Status = styled.span`
59
56
  display: inline-block;
60
57
  vertical-align: top;
61
58
  padding: 0px 16px;
62
- background-color: var(--stokr-action-primary-bg);
63
- color: var(--stokr-action-primary-text);
59
+ background-color: var(--action-primary-bg);
60
+ color: var(--action-primary-text);
64
61
  font-weight: 600;
65
62
  font-size: 8px;
66
63
  letter-spacing: 1.78px;
@@ -88,7 +85,7 @@ const Address = styled.span.attrs((props) => ({
88
85
  font-size: 11px;
89
86
  line-height: 16px;
90
87
  margin-right: 6px;
91
- color: var(--stokr-text-primary);
88
+ color: var(--text-primary);
92
89
  transition: color 0.2s;
93
90
  cursor: pointer;
94
91
 
@@ -97,7 +94,7 @@ const Address = styled.span.attrs((props) => ({
97
94
  }
98
95
 
99
96
  &:hover {
100
- color: var(--stokr-action-accent-bg);
97
+ color: var(--action-accent-bg);
101
98
  }
102
99
  `;
103
100
  styled.span`
@@ -105,14 +102,14 @@ styled.span`
105
102
  cursor: pointer;
106
103
 
107
104
  &:hover {
108
- color: var(--stokr-action-accent-bg);
105
+ color: var(--action-accent-bg);
109
106
  }
110
107
  `;
111
108
  const CopyToClipboardButton = styled.span.attrs({
112
109
  children: glyph("content_copy")
113
110
  })`
114
111
  display: inline-flex;
115
- color: var(--stokr-text-primary);
112
+ color: var(--text-primary);
116
113
  cursor: pointer;
117
114
  height: 1em;
118
115
  width: 1em;
@@ -136,14 +133,10 @@ const InfoBox = styled.div`
136
133
  `}
137
134
  `;
138
135
  const Value = styled.div.withConfig({
139
- shouldForwardProp: (props) => !["fontSize", "childMarginLeft"].includes(props)
136
+ shouldForwardProp: (props) => !["textStyle", "childMarginLeft"].includes(props)
140
137
  })`
141
138
  position: relative;
142
- font-weight: 300;
143
- font-size: 22px;
144
- font-size: ${(props) => props.fontSize}px;
145
- line-height: 28px;
146
- letter-spacing: 0.4px;
139
+ ${({ textStyle = "titleL" }) => text(textStyle)}
147
140
 
148
141
  strong {
149
142
  font-weight: normal;
@@ -203,7 +196,7 @@ const CheckMark = styled.div`
203
196
  top: 50%;
204
197
  right: 0;
205
198
  margin-top: -7px;
206
- border: 1px solid var(--stokr-border-default);
199
+ border: 1px solid var(--border-default);
207
200
  border-radius: 7px;
208
201
  background-color: transparent;
209
202
  transition:
@@ -230,7 +223,7 @@ const CheckMark = styled.div`
230
223
  margin-top: -2px;
231
224
  margin-left: -2px;
232
225
  border-radius: 2px;
233
- background-color: var(--stokr-action-accent-bg);
226
+ background-color: var(--action-accent-bg);
234
227
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
235
228
  }
236
229
  `;
@@ -275,14 +268,14 @@ const Radio = styled.div.withConfig({
275
268
  }
276
269
 
277
270
  ${CheckMark} {
278
- border-color: var(--stokr-border-subtle) !important;
279
- background-color: var(--stokr-action-disabled-secondary-bg) !important;
271
+ border-color: var(--border-subtle) !important;
272
+ background-color: var(--action-disabled-secondary-bg) !important;
280
273
  }
281
274
  }
282
275
 
283
276
  &:checked + label {
284
277
  &:before {
285
- background-color: var(--stokr-color-red-500) !important;
278
+ background-color: var(--color-red-500) !important;
286
279
  }
287
280
 
288
281
  ${CheckMark} {
@@ -301,11 +294,11 @@ const Radio = styled.div.withConfig({
301
294
  &:hover + label,
302
295
  & + label:hover {
303
296
  &:before {
304
- background-color: var(--stokr-action-secondary-bg-hover);
297
+ background-color: var(--action-secondary-bg-hover);
305
298
  }
306
299
 
307
300
  ${CheckMark} {
308
- border-color: var(--stokr-border-focus);
301
+ border-color: var(--border-focus);
309
302
  }
310
303
  }
311
304
  }
@@ -332,14 +325,14 @@ styled.button`
332
325
  height: 40px;
333
326
  outline: none;
334
327
  margin-left: 10px;
335
- border: 1px solid var(--stokr-border-subtle);
328
+ border: 1px solid var(--border-subtle);
336
329
  border-radius: 20px;
337
- color: var(--stokr-action-negative-text);
330
+ color: var(--action-negative-text);
338
331
  transition: color 0.2s;
339
332
 
340
333
  &:focus,
341
334
  &:hover {
342
- color: var(--stokr-action-accent-bg);
335
+ color: var(--action-accent-bg);
343
336
  }
344
337
  `;
345
338
  export {
@@ -50,11 +50,11 @@ const InfoBox = styled.div.withConfig({
50
50
  max-width: 100%;
51
51
 
52
52
  ${(props) => props.refresh && `
53
- color: var(--stokr-action-accent-bg);
53
+ color: var(--action-accent-bg);
54
54
  `};
55
55
 
56
56
  ${(props) => props.failed && `
57
- color: var(--stokr-status-error-text);
57
+ color: var(--status-error-text);
58
58
  `};
59
59
  `;
60
60
  const spin = keyframes`
@@ -0,0 +1,29 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { FieldVariant } from '../../styles/borderedField';
3
+ import { FaqItems, FaqItem, FaqTitle, FaqContent, FaqText, FaqDropdownIcon } from './FAQ.styles';
4
+ export interface FAQEntry {
5
+ title: ReactNode;
6
+ /** A string or JSX, or an array of strings rendered as a bullet list. */
7
+ content: ReactNode;
8
+ }
9
+ export interface FAQProps {
10
+ items: readonly FAQEntry[];
11
+ /** Do not scroll the opened item into view. */
12
+ noScroll?: boolean;
13
+ /** Ref to a custom scrollbar (in a modal); scrolled to the bottom when an item opens. */
14
+ scrollRef?: RefObject<{
15
+ scrollToBottom: () => void;
16
+ } | null>;
17
+ /** Title style used inside the "view more" modal. */
18
+ modalViewMore?: boolean;
19
+ /** Smaller, indented text for answers given as a list of strings. */
20
+ withTextStyling?: boolean;
21
+ /** Prefix for data-cy: `{prefix}-accordion`, `{prefix}-item-{slug}-toggle`, etc. */
22
+ dataCyPrefix?: string;
23
+ /** `bordered`: each item is a card (sign-up redesign). Default keeps the plain list. */
24
+ variant?: FieldVariant;
25
+ }
26
+ /** Accordion of questions and answers; one item is open at a time. */
27
+ export declare const FAQ: (props: FAQProps) => import("react/jsx-runtime").JSX.Element;
28
+ export { FaqItems, FaqItem, FaqTitle, FaqContent, FaqText, FaqDropdownIcon };
29
+ export default FAQ;
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import PropTypes from "prop-types";
3
- import { Text } from "../Text/Text.styles.js";
4
2
  import { useState } from "react";
3
+ import { Text } from "../Text/Text.styles.js";
5
4
  import { scrollToElement } from "../../utils/scrollUtils.js";
6
5
  import { FaqItems, FaqItem, FaqTitle, FaqDropdownIcon, FaqContent, FaqText } from "./FAQ.styles.js";
7
6
  function slugFromTitle(title) {
@@ -10,8 +9,17 @@ function slugFromTitle(title) {
10
9
  return raw.toLowerCase().trim().slice(0, 48).replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "");
11
10
  }
12
11
  const FAQ = (props) => {
13
- const { items, noScroll, scrollRef, modalViewMore, withTextStyling, dataCyPrefix = "faq" } = props;
12
+ const {
13
+ items,
14
+ noScroll,
15
+ scrollRef,
16
+ modalViewMore,
17
+ withTextStyling,
18
+ dataCyPrefix = "faq",
19
+ variant = "default"
20
+ } = props;
14
21
  const [activeIndex, setActiveIndex] = useState(null);
22
+ const bordered = variant === "bordered";
15
23
  const onTitleClick = (e, index) => {
16
24
  e.persist();
17
25
  const newActiveIndex = activeIndex === index ? null : index;
@@ -19,7 +27,7 @@ const FAQ = (props) => {
19
27
  if (!noScroll && newActiveIndex !== null) {
20
28
  if (scrollRef?.current) {
21
29
  setTimeout(() => {
22
- scrollRef?.current.scrollToBottom();
30
+ scrollRef?.current?.scrollToBottom();
23
31
  }, 0);
24
32
  } else {
25
33
  scrollToElement(e.target.parentElement, { offset: 20 });
@@ -35,9 +43,10 @@ const FAQ = (props) => {
35
43
  return /* @__PURE__ */ jsx(FaqItems, { "data-cy": `${dataCyPrefix}-accordion`, children: items.map((item, index) => {
36
44
  const titleSlug = slugFromTitle(item.title);
37
45
  const itemCy = titleSlug ? `${dataCyPrefix}-item-${titleSlug}` : `${dataCyPrefix}-item-${index}`;
46
+ const list = Array.isArray(item.content) ? item.content : null;
38
47
  return (
39
48
  // eslint-disable-next-line @eslint-react/no-array-index-key -- FAQ order is content-defined
40
- /* @__PURE__ */ jsxs(FaqItem, { "data-cy": `${itemCy}-wrap`, children: [
49
+ /* @__PURE__ */ jsxs(FaqItem, { "data-cy": `${itemCy}-wrap`, $variant: variant, children: [
41
50
  /* @__PURE__ */ jsxs(
42
51
  FaqTitle,
43
52
  {
@@ -47,30 +56,21 @@ const FAQ = (props) => {
47
56
  isActive: activeIndex === index,
48
57
  onClick: (e) => onTitleClick(e, index),
49
58
  modalViewMore,
59
+ $variant: variant,
50
60
  children: [
51
61
  item.title,
52
- /* @__PURE__ */ jsx(FaqDropdownIcon, {})
62
+ /* @__PURE__ */ jsx(FaqDropdownIcon, { $variant: variant })
53
63
  ]
54
64
  }
55
65
  ),
56
- /* @__PURE__ */ jsx(FaqContent, { "data-cy": `${itemCy}-panel`, isOpened: activeIndex === index, children: !Array.isArray(item.content) ? /* @__PURE__ */ jsx(FaqText, { children: item.content }) : /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ /* @__PURE__ */ jsx(FaqContent, { "data-cy": `${itemCy}-panel`, isOpened: activeIndex === index, children: !list ? /* @__PURE__ */ jsx(FaqText, { $variant: variant, children: item.content }) : bordered ? /* @__PURE__ */ jsx(FaqText, { $variant: variant, children: /* @__PURE__ */ jsx("ul", { children: list.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
57
67
  /* @__PURE__ */ jsx("br", {}),
58
- /* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children: item.content.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) })
68
+ /* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children: list.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) })
59
69
  ] }) })
60
70
  ] }, index)
61
71
  );
62
72
  }) });
63
73
  };
64
- FAQ.propTypes = {
65
- items: PropTypes.arrayOf(
66
- PropTypes.shape({
67
- title: PropTypes.node.isRequired,
68
- content: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.node]).isRequired
69
- })
70
- ).isRequired,
71
- /** Prefix for data-cy: `{prefix}-accordion`, `{prefix}-item-{slug}-toggle`, etc. */
72
- dataCyPrefix: PropTypes.string
73
- };
74
74
  export {
75
75
  FAQ,
76
76
  FaqContent,
@@ -1,17 +1,23 @@
1
1
  import { css } from 'styled-components';
2
+ import { FieldVariant } from '../../styles/borderedField';
2
3
  export declare const FaqItems: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
4
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
5
  }> & string;
5
- export declare const FaqDropdownIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
6
+ export declare const FaqDropdownIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
6
7
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
7
- }, "children"> & Partial<Pick<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
8
+ }, {
9
+ $variant?: FieldVariant;
10
+ }>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
8
11
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
9
- }, "children">>> & string;
12
+ }, {
13
+ $variant?: FieldVariant;
14
+ }>, "children">>> & string;
10
15
  export declare const FaqItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
11
16
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
12
17
  }, {
13
18
  center?: boolean;
14
19
  customContainerStyle?: string | ReturnType<typeof css>;
20
+ $variant?: FieldVariant;
15
21
  }>> & string;
16
22
  export declare const FaqTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
17
23
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
@@ -22,10 +28,12 @@ export declare const FaqTitle: import('styled-components/dist/types').IStyledCom
22
28
  hideIcon?: boolean;
23
29
  isActive?: boolean;
24
30
  modalViewMore?: boolean;
31
+ $variant?: FieldVariant;
25
32
  }>> & string;
26
33
  export declare const FaqContent: any;
27
34
  export declare const FaqText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
28
35
  style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
29
36
  }, {
30
37
  largeSpacing?: boolean;
38
+ $variant?: FieldVariant;
31
39
  }>> & string;
@@ -1,6 +1,8 @@
1
- import styled from "styled-components";
1
+ import styled, { css } from "styled-components";
2
2
  import { Collapse } from "react-collapse";
3
+ import { BORDERED_BORDER } from "../../styles/borderedField.js";
3
4
  import { glyph } from "../MaterialIcon/glyph.js";
5
+ import { text } from "../../design-system/styled/text.js";
4
6
  const FaqItems = styled.div`
5
7
  position: relative;
6
8
  `;
@@ -19,6 +21,15 @@ const FaqDropdownIcon = styled.span.attrs({
19
21
  margin-top: -10px;
20
22
  transform: rotate(0);
21
23
  transition: 0.3s transform;
24
+
25
+ ${(props) => props.$variant === "bordered" && css`
26
+ width: 16px;
27
+ height: 16px;
28
+ font-size: 16px;
29
+ top: 22px;
30
+ right: var(--space-5);
31
+ margin-top: 0;
32
+ `}
22
33
  `;
23
34
  const FaqItem = styled.div.withConfig({
24
35
  shouldForwardProp: (props) => !["center", "customContainerStyle"].includes(props)
@@ -27,6 +38,22 @@ const FaqItem = styled.div.withConfig({
27
38
  margin-top: 30px;
28
39
  }
29
40
 
41
+ ${(props) => props.$variant === "bordered" && css`
42
+ padding: 0;
43
+ border: ${BORDERED_BORDER};
44
+ border-radius: var(--radius-lg);
45
+ background: var(--background-default);
46
+ box-shadow: var(--elevation-xs);
47
+
48
+ .ReactCollapse--collapse {
49
+ transition: height 0.3s ease;
50
+ }
51
+
52
+ & + & {
53
+ margin-top: var(--space-2);
54
+ }
55
+ `}
56
+
30
57
  ${(props) => props.center && `
31
58
  text-align:center;
32
59
  `}
@@ -39,12 +66,9 @@ const FaqTitle = styled.button.withConfig({
39
66
  display: block;
40
67
  width: 100%;
41
68
  position: relative;
42
- font-family: var(--stokr-font-family-base);
43
- font-weight: 600;
44
- font-size: 16px;
45
- line-height: 24px;
46
- letter-spacing: 0.4px;
47
- color: var(--stokr-text-primary);
69
+ font-family: var(--font-family-base);
70
+ ${text("subtitleM")}
71
+ color: var(--text-primary);
48
72
  padding: 0;
49
73
  margin: 0;
50
74
  outline: 0;
@@ -58,10 +82,21 @@ const FaqTitle = styled.button.withConfig({
58
82
  color: inherit;
59
83
  }
60
84
 
85
+ ${(props) => props.$variant === "bordered" && css`
86
+ ${text("subtitleS")}
87
+ padding: var(--space-5) 52px var(--space-5) var(--space-5);
88
+ border-radius: var(--radius-lg);
89
+ cursor: pointer;
90
+ transition: padding-bottom 0.3s ease;
91
+ ${props.isActive && `padding-bottom: var(--space-3);`}
92
+
93
+ &:hover {
94
+ color: var(--text-primary);
95
+ }
96
+ `}
97
+
61
98
  ${(props) => props.uppercase && `
62
- text-transform:uppercase;
63
- font-weight:700;
64
- letter-spacing: 0.6px;
99
+ ${text("titleXs")}
65
100
  `}
66
101
 
67
102
  ${({ white }) => white && `
@@ -120,6 +155,20 @@ const FaqText = styled.div.withConfig({
120
155
  padding-bottom: 30px;
121
156
 
122
157
  `}
158
+
159
+ ${(props) => props.$variant === "bordered" && css`
160
+ padding: 0 var(--space-5) var(--space-5);
161
+ font-size: 14px;
162
+ line-height: 20px;
163
+ font-weight: 400;
164
+ color: var(--text-primary);
165
+
166
+ ul {
167
+ margin: 0;
168
+ padding-left: 20px;
169
+ list-style: disc;
170
+ }
171
+ `}
123
172
  `;
124
173
  export {
125
174
  FaqContent,
@@ -12,14 +12,14 @@ const FormField = styled.div`
12
12
  const FormInfo = styled.div.withConfig({
13
13
  shouldForwardProp: (props) => !["styledId", "center", "marginTop", "marginBottom"].includes(props)
14
14
  })`
15
- font-family: var(--stokr-font-family-base);
15
+ font-family: var(--font-family-base);
16
16
  font-weight: ${(props) => props.styleID ? `400` : `300`};
17
17
  // All font-weight: 300;
18
18
  // ID font-weight: 400;
19
19
  font-size: 9px;
20
20
  line-height: 1.78em;
21
21
  letter-spacing: 0.4px;
22
- color: var(--stokr-text-primary);
22
+ color: var(--text-primary);
23
23
  opacity: ${(props) => props.styleID ? `1` : `0.5`};
24
24
  // All opacity: 0.5;
25
25
  // ID opacity: 1;
@@ -36,7 +36,7 @@ const FormInfo = styled.div.withConfig({
36
36
  transition: color 0.2s;
37
37
 
38
38
  &:hover {
39
- color: var(--stokr-action-accent-bg);
39
+ color: var(--action-accent-bg);
40
40
  }
41
41
  }
42
42
  `;
@@ -44,7 +44,7 @@ const FormError = styled.div.withConfig({
44
44
  shouldForwardProp: (props) => !["show", "styleSuf", "withMarginLeft", "withTopSpacing"].includes(props)
45
45
  })`
46
46
  display: none;
47
- font-family: var(--stokr-font-family-base);
47
+ font-family: var(--font-family-base);
48
48
  font-weight: 300;
49
49
  font-size: 11px;
50
50
  line-height: 12px;
@@ -56,7 +56,7 @@ const FormError = styled.div.withConfig({
56
56
  // ID, IIS & VD top: 2px;
57
57
  margin-bottom: -12px;
58
58
  letter-spacing: 0.4px;
59
- color: var(--stokr-status-error-text);
59
+ color: var(--status-error-text);
60
60
 
61
61
  ${(props) => props.show && "display: block;"}
62
62
  //from SUF
@@ -59,8 +59,8 @@ const Row = styled.div.withConfig({
59
59
  ${breakpoint.MLarge`
60
60
  ${(props) => props.main && `
61
61
  z-index: 0;
62
- min-height: calc(100vh - var(--stokr-layout-footer-height));
63
- padding-top: var(--stokr-layout-header-height);
62
+ min-height: calc(100vh - var(--layout-footer-height));
63
+ padding-top: var(--layout-header-height);
64
64
  `}
65
65
  `}
66
66
 
@@ -156,20 +156,20 @@ const Column = styled.div.withConfig({
156
156
 
157
157
  ${(props) => props.mainFixed && `
158
158
  position: fixed;
159
- top: var(--stokr-layout-header-height);
159
+ top: var(--layout-header-height);
160
160
  left: 0;
161
- height: calc(100% - var(--stokr-layout-header-height));
161
+ height: calc(100% - var(--layout-header-height));
162
162
  `}
163
163
 
164
164
  ${(props) => props.mainRelative && `
165
165
  position: relative;
166
166
  margin-left: ${grid((props.full || 16) - props.part, props.full || 16)};
167
- border-left: 1px solid var(--stokr-border-subtle);
167
+ border-left: 1px solid var(--border-subtle);
168
168
  //padding: 54px 0 42px;
169
169
  `}
170
170
 
171
171
  ${(props) => props.withBorder && `
172
- border-left: 1px solid var(--stokr-border-subtle);
172
+ border-left: 1px solid var(--border-subtle);
173
173
  `}
174
174
  `}
175
175
  `;
@@ -196,7 +196,7 @@ const FlexGrid = styled.div.withConfig({
196
196
  flex-wrap: wrap;
197
197
 
198
198
  ${(props) => props.borderBottom && `
199
- border-bottom: 1px solid var(--stokr-border-subtle);
199
+ border-bottom: 1px solid var(--border-subtle);
200
200
  `}
201
201
  `;
202
202
  export {
@@ -1,8 +1,9 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import PropTypes from "prop-types";
4
- import { FlagFor } from "../Country/CountrySelect.js";
4
+ import "../Country/CountrySelect.js";
5
5
  import { CountryRowRoot, FlagSlot, CountryCode, ResidencyItemRoot, FieldLabel, FieldValue, SectionHeaderRoot, SectionHeaderIconWrap } from "./IdentityInfo.styles.js";
6
+ import { FlagFor } from "../Country/FlagFor.js";
6
7
  const IdentitySectionHeader = ({ icon, count, children, style, className }) => /* @__PURE__ */ jsxs(SectionHeaderRoot, { style, className, children: [
7
8
  icon && /* @__PURE__ */ jsx(SectionHeaderIconWrap, { children: icon }),
8
9
  /* @__PURE__ */ jsxs("span", { children: [
@@ -1,13 +1,11 @@
1
1
  import styled from "styled-components";
2
+ import { text } from "../../design-system/styled/text.js";
2
3
  const SectionHeaderRoot = styled.div`
3
4
  display: flex;
4
5
  align-items: center;
5
6
  gap: 8px;
6
- color: var(--stokr-action-accent-bg);
7
- font-size: 16px;
8
- line-height: 24px;
9
- font-weight: 600;
10
- letter-spacing: 0.6px;
7
+ color: var(--action-accent-bg);
8
+ ${text("subtitleM")}
11
9
  margin-bottom: 12px;
12
10
  `;
13
11
  const SectionHeaderIconWrap = styled.span`
@@ -16,38 +14,30 @@ const SectionHeaderIconWrap = styled.span`
16
14
  justify-content: center;
17
15
  flex-shrink: 0;
18
16
 
19
- > svg {
17
+ > svg,
18
+ > img {
20
19
  width: 18px;
21
20
  height: 18px;
21
+ object-fit: contain;
22
22
  }
23
23
  `;
24
24
  const FieldLabel = styled.p`
25
25
  margin: 0;
26
- font-size: 11px;
27
- line-height: 20px;
28
- letter-spacing: 2px;
29
- text-transform: uppercase;
30
- color: var(--stokr-text-primary);
31
- font-weight: 400;
26
+ ${text("labelRegular")}
27
+ color: var(--text-primary);
32
28
  `;
33
29
  const FieldValue = styled.p`
34
30
  margin: 0 0 4px;
35
- font-size: 14px;
36
- line-height: 20px;
37
- font-weight: 600;
38
- color: var(--stokr-text-primary);
39
- letter-spacing: 0.5px;
31
+ ${text("subtitleS")}
32
+ color: var(--text-primary);
40
33
  `;
41
34
  const CountryRowRoot = styled.div`
42
35
  display: flex;
43
36
  align-items: center;
44
37
  gap: 10px;
45
38
  padding: 6px 0;
46
- font-size: 14px;
47
- line-height: 20px;
48
- font-weight: 600;
49
- color: var(--stokr-text-primary);
50
- letter-spacing: 0.5px;
39
+ ${text("subtitleS")}
40
+ color: var(--text-primary);
51
41
  `;
52
42
  const FlagSlot = styled.span`
53
43
  display: inline-flex;
@@ -61,7 +51,7 @@ const FlagSlot = styled.span`
61
51
  const CountryCode = styled.span`
62
52
  font-family: monospace;
63
53
  font-size: 12px;
64
- color: var(--stokr-text-tertiary);
54
+ color: var(--text-tertiary);
65
55
  margin-left: auto;
66
56
  `;
67
57
  const ResidencyItemRoot = styled.div`