@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
package/README.md CHANGED
@@ -35,7 +35,7 @@ npm install react react-dom styled-components react-router-dom
35
35
 
36
36
  Peers: React 18 or 19, styled-components 6, react-router-dom 6 or 7.
37
37
 
38
- **2. Import the design-system stylesheet once**, at the entry point of the app. It brings the fonts, the CSS variables (`--stokr-*`), the text classes and the baseline. Without it components render unstyled.
38
+ **2. Import the design-system stylesheet once**, at the entry point of the app. It brings the fonts, the CSS variables (`--text-primary`, `--status-info-bg`, `--space-4`…), the text classes and the baseline. Without it components render unstyled.
39
39
 
40
40
  ```tsx
41
41
  import '@stokr/components-library/design-system.css'
@@ -103,7 +103,7 @@ Components that open (modals, drawers) are controlled by an `isOpen` prop; field
103
103
 
104
104
  ## 🎨 Design system
105
105
 
106
- **One source for the look.** The colours, type, spacing, radius, shadows and breakpoints of the STOKR UI kit are written once, in this library, and reach every app as CSS variables (`--stokr-*`). Components and apps use the **names**, never the values, and dark mode comes for free.
106
+ **One source for the look.** The colours, type, spacing, radius, shadows and breakpoints of the STOKR UI kit are written once, in this library, and reach every app as CSS variables (`--*`). Components and apps use the **names**, never the values, and dark mode comes for free.
107
107
 
108
108
  ```tsx
109
109
  import '@stokr/components-library/design-system.css' // once, at the app entry
@@ -111,8 +111,8 @@ import { text, breakpoint } from '@stokr/components-library'
111
111
 
112
112
  const Title = styled.h1`
113
113
  ${text('titleXl')}
114
- color: var(--stokr-text-primary);
115
- ${breakpoint.Medium` padding: var(--stokr-space-8); `}
114
+ color: var(--text-primary);
115
+ ${breakpoint.Medium` padding: var(--space-8); `}
116
116
  `
117
117
  ```
118
118
 
@@ -151,14 +151,14 @@ Pure functions and hooks, also exported from the package root.
151
151
  | `npm run lint` | 🔎 ESLint on `src`, then `check:css-vars` |
152
152
  | `npm run gen:tokens` | ⚙️ Regenerate `src/design-system/generated` from `tokens/` |
153
153
  | `npm run check:tokens` | 🔒 Fails if `generated/` is out of date |
154
- | `npm run check:css-vars` | 🔎 Fails on an undefined `--stokr-*` variable |
154
+ | `npm run check:css-vars` | 🔎 Fails on an undefined CSS variable |
155
155
  | `npm run check:media` | 📱 Fails if a raw width `@media` is added (use `breakpoint`) |
156
156
  | `npm run build:dist` | 📦 Library build + static files + design-system stylesheet |
157
157
  | `npm run build-storybook` | 🏗️ Static Storybook in `storybook-static` |
158
158
 
159
159
  **The rules in one list** (details in [AGENTS.md](AGENTS.md) and the [design-system guide](src/design-system/README.md)):
160
160
 
161
- - 🎨 Colours by role from the semantic tokens (`--stokr-text-*`, `--stokr-background-*`, `--stokr-border-*`, `--stokr-action-*`, `--stokr-status-*`, `--stokr-tag-*`); never a hex, `font-family` or raw `@media` in a component.
161
+ - 🎨 Colours by role from the semantic tokens (`--text-*`, `--background-*`, `--border-*`, `--action-*`, `--status-*`, `--tag-*`); never a hex, `font-family` or raw `@media` in a component.
162
162
  - 📖 One story file per component, with a `Default` story that sets only the required props.
163
163
  - 🧩 New and touched components are TypeScript, without `prop-types`.
164
164
  - 🔁 Changing a token: edit `tokens/`, run `npm run gen:tokens`, commit `generated/`.
@@ -173,7 +173,7 @@ Pure functions and hooks, also exported from the package root.
173
173
 
174
174
  1. 🧵 **Import `@stokr/components-library/design-system.css` once.** Components now read CSS variables, so without it they are unstyled.
175
175
  2. 📱 **`rwd` is now `breakpoint`**, and `Large` moved from 1024px to 1200px (992 < 1200 < 1440).
176
- 3. 🎨 **`colors`** is now the UI kit's colour ramp (`colors['blue-500']`, hex values). The old flat object (`colors.blue`, `colors.grey2`…), the old `theme` keys (`theme.cPrimary`…), `GlobalStyle`, `spacing`, `typography`, `media` and `getMedia` are gone: use `var(--stokr-*)`, `text()` and `breakpoint`.
176
+ 3. 🎨 **`colors`** is now the UI kit's colour ramp (`colors['blue-500']`, hex values). The old flat object (`colors.blue`, `colors.grey2`…), the old `theme` keys (`theme.cPrimary`…), `GlobalStyle`, `spacing`, `typography`, `media` and `getMedia` are gone: use `var(--name)`, `text()` and `breakpoint`.
177
177
  4. 🔣 **Register `requiredMaterialIcons`**: components draw Material icons, not the old icon fonts.
178
178
  5. 🌗 **Dark mode** is `data-theme="dark"` on `<html>`; nothing to change in components that use the semantic tokens.
179
179
  6. 📏 **`rem` became `px`**: the library no longer depends on a 10px root font size.
@@ -187,7 +187,7 @@ Pure functions and hooks, also exported from the package root.
187
187
  | Symptom | Cause and fix |
188
188
  | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
189
189
  | 😶 Components look unstyled, wrong font | The stylesheet is not imported: `import '@stokr/components-library/design-system.css'` once at the entry. |
190
- | 🌗 Something stays light (or unreadable) in dark mode | A hard-coded colour in the app. Use a semantic token (`var(--stokr-text-primary)`…). |
190
+ | 🌗 Something stays light (or unreadable) in dark mode | A hard-coded colour in the app. Use a semantic token (`var(--text-primary)`…). |
191
191
  | 🔣 An icon renders empty | The icon is not registered: `registerMaterialIcons(...)`, including every key of `requiredMaterialIcons`. |
192
192
  | 🧭 `useNavigate()` may be used only in the context of a `<Router>` | Wrap the app in a router. `SmartLink`, `TextLink`, `BackButton` and `MenuNav` need one. |
193
193
  | ⚛️ Invalid hook call / duplicated React or styled-components | Dedupe the peers in Vite: `resolve: { dedupe: ['react', 'react-dom', 'styled-components'] }`. |
@@ -0,0 +1,38 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface AddressItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onCopy'> {
3
+ address: string;
4
+ label?: ReactNode;
5
+ /** Slot in a round grey chip before the text, e.g. a chain logo. */
6
+ leading?: ReactNode;
7
+ /** `true` keeps 6 characters at the start and 4 at the end; pass `{ head, tail }` to change that; `false` shows it all. */
8
+ shorten?: boolean | {
9
+ head: number;
10
+ tail: number;
11
+ };
12
+ /** Copy button after the address. The default icon needs `outlined/content_copy` registered. */
13
+ copyable?: boolean;
14
+ /** Replaces the copy button's icon. */
15
+ copyIcon?: ReactNode;
16
+ /** Replaces the shown text (the copy button and `title` still use `address`), e.g. a formatted or masked address. */
17
+ displayAddress?: ReactNode;
18
+ /** Called with the address after it was copied. */
19
+ onCopy?: (address: string) => void;
20
+ /** Tooltip text before and after copying. Default: the copy tooltip's own texts. */
21
+ copyLabel?: string;
22
+ copiedLabel?: string;
23
+ /** Inline after the address, e.g. a status tag. */
24
+ badge?: ReactNode;
25
+ /** Right-aligned slot, e.g. an action button. */
26
+ trailing?: ReactNode;
27
+ }
28
+ /**
29
+ * A wallet address or hash with an optional label, leading icon, copy button, badge and trailing action. The full
30
+ * address is in the `title` attribute. It has no padding of its own. Extra props and the ref go to the root element.
31
+ *
32
+ * Every part has a `data-part` attribute (`leading`, `label`, `address`, `copy`, `badge`, `trailing`) so an app can
33
+ * restyle it from `styled(AddressItem)` without a new library version.
34
+ *
35
+ * CSS custom properties: `--address-item-gap` (`12px`), `--address-item-address-gap` (`8px`, between address, copy and
36
+ * badge), `--address-item-leading-size` (`24px`), `--address-item-leading-padding` (`4px`), `--address-item-leading-background` (`#f0f0f0`).
37
+ */
38
+ export declare const AddressItem: import('react').ForwardRefExoticComponent<AddressItemProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,51 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
4
+ import { CopyToClipboardTooltip } from "../CopyToClipboardTooltip/CopyToClipboardTooltip.js";
5
+ import shortenAddress from "../../utils/get-short-address.js";
6
+ import { Root, Main, Leading, Body, Label, AddressRow, AddressGroup, Address, Trailing } from "./AddressItem.styles.js";
7
+ const AddressItem = forwardRef(function AddressItemBase({
8
+ address,
9
+ label,
10
+ leading,
11
+ shorten = true,
12
+ copyable = false,
13
+ copyIcon,
14
+ displayAddress,
15
+ onCopy,
16
+ copyLabel,
17
+ copiedLabel,
18
+ badge,
19
+ trailing,
20
+ ...rest
21
+ }, ref) {
22
+ const shown = shorten ? shortenAddress(address, { separator: "...", ...shorten === true ? {} : shorten }) : address;
23
+ return /* @__PURE__ */ jsxs(Root, { ...rest, ref, children: [
24
+ /* @__PURE__ */ jsxs(Main, { children: [
25
+ leading != null && /* @__PURE__ */ jsx(Leading, { "data-part": "leading", children: leading }),
26
+ /* @__PURE__ */ jsxs(Body, { children: [
27
+ label != null && /* @__PURE__ */ jsx(Label, { "data-part": "label", children: label }),
28
+ /* @__PURE__ */ jsxs(AddressRow, { children: [
29
+ /* @__PURE__ */ jsxs(AddressGroup, { children: [
30
+ /* @__PURE__ */ jsx(Address, { "data-part": "address", title: address, $full: !shorten, children: displayAddress ?? shown }),
31
+ copyable && /* @__PURE__ */ jsx("span", { "data-part": "copy", children: /* @__PURE__ */ jsx(
32
+ CopyToClipboardTooltip,
33
+ {
34
+ value: address,
35
+ onCopy,
36
+ idleLabel: copyLabel,
37
+ copiedLabel,
38
+ children: copyIcon ?? /* @__PURE__ */ jsx(MaterialIcon, { name: "content_copy", size: 16 })
39
+ }
40
+ ) })
41
+ ] }),
42
+ badge != null && /* @__PURE__ */ jsx("span", { "data-part": "badge", children: badge })
43
+ ] })
44
+ ] })
45
+ ] }),
46
+ trailing != null && /* @__PURE__ */ jsx(Trailing, { "data-part": "trailing", children: trailing })
47
+ ] });
48
+ });
49
+ export {
50
+ AddressItem
51
+ };
@@ -0,0 +1,31 @@
1
+ export declare const Root: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }> & string;
4
+ export declare const Leading: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
5
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
6
+ }> & string;
7
+ /** Leading + text. Never narrower than the shortened address and its copy button: the trailing slot wraps below instead. */
8
+ export declare const Main: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
9
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
10
+ }> & string;
11
+ export declare const Body: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
12
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
13
+ }> & string;
14
+ export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
15
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
16
+ }> & string;
17
+ export declare const AddressRow: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
18
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
19
+ }> & string;
20
+ export declare const AddressGroup: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
21
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
22
+ }> & string;
23
+ /** A shortened address never shrinks; a full one wraps anywhere instead of being cut. */
24
+ export declare const Address: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
25
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
26
+ }, {
27
+ $full: boolean;
28
+ }>> & string;
29
+ export declare const Trailing: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
30
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
31
+ }> & string;
@@ -0,0 +1,71 @@
1
+ import styled from "styled-components";
2
+ import { text } from "../../design-system/styled/text.js";
3
+ const Root = styled.div`
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ align-items: center;
7
+ gap: var(--address-item-gap, var(--space-3));
8
+ min-width: 0;
9
+ `;
10
+ const Leading = styled.span`
11
+ display: inline-flex;
12
+ flex: 0 0 auto;
13
+ align-items: center;
14
+ justify-content: center;
15
+ box-sizing: content-box;
16
+ width: var(--address-item-leading-size, 24px);
17
+ height: var(--address-item-leading-size, 24px);
18
+ padding: var(--address-item-leading-padding, var(--space-1));
19
+ border-radius: var(--radius-full);
20
+ background: var(--address-item-leading-background, var(--background-surface-raised));
21
+ overflow: hidden;
22
+ `;
23
+ const Main = styled.div`
24
+ display: flex;
25
+ flex: 1 1 auto;
26
+ align-items: center;
27
+ gap: var(--address-item-gap, var(--space-3));
28
+ `;
29
+ const Body = styled.div`
30
+ display: flex;
31
+ flex-direction: column;
32
+ `;
33
+ const Label = styled.span`
34
+ ${text("caption")};
35
+ color: var(--text-primary);
36
+ `;
37
+ const AddressRow = styled.span`
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ align-items: center;
41
+ gap: var(--space-1) var(--address-item-address-gap, var(--space-2));
42
+ min-width: 0;
43
+ `;
44
+ const AddressGroup = styled.span`
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: var(--address-item-address-gap, var(--space-2));
48
+ min-width: 0;
49
+ `;
50
+ const Address = styled.span`
51
+ ${text("subtitleM")};
52
+ color: var(--text-primary);
53
+ ${({ $full }) => $full ? "min-width: 0; overflow-wrap: anywhere;" : "flex-shrink: 0; white-space: nowrap;"}
54
+ `;
55
+ const Trailing = styled.div`
56
+ display: flex;
57
+ align-items: center;
58
+ flex: 0 0 auto;
59
+ margin-left: auto;
60
+ `;
61
+ export {
62
+ Address,
63
+ AddressGroup,
64
+ AddressRow,
65
+ Body,
66
+ Label,
67
+ Leading,
68
+ Main,
69
+ Root,
70
+ Trailing
71
+ };
@@ -1,5 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { glyph } from "../../MaterialIcon/glyph.js";
3
+ import { text } from "../../../design-system/styled/text.js";
3
4
  styled.div`
4
5
  position: relative;
5
6
  `;
@@ -10,7 +11,7 @@ styled.div`
10
11
  left: 0;
11
12
  width: 100%;
12
13
  overflow: hidden;
13
- background-color: var(--stokr-background-default);
14
+ background-color: var(--background-default);
14
15
  `;
15
16
  styled.div`
16
17
  z-index: 0;
@@ -29,7 +30,7 @@ const Column = styled.div.withConfig({
29
30
  })`
30
31
  display: table-cell;
31
32
  text-align: ${(props) => props.align};
32
- font-family: var(--stokr-font-family-base);
33
+ font-family: var(--font-family-base);
33
34
 
34
35
  ${(props) => props.colWidth && `
35
36
  width: ${props.colWidth}
@@ -56,16 +57,12 @@ styled.div.withConfig({
56
57
 
57
58
  ${Row} {
58
59
  ${Column} {
59
- border-bottom: 1px solid var(--stokr-border-subtle);
60
+ border-bottom: 1px solid var(--border-subtle);
60
61
  }
61
62
  }
62
63
 
63
64
  ${Column} {
64
- font-weight: 600;
65
- font-size: 11px;
66
- line-height: 20px;
67
- letter-spacing: 1.98px;
68
- text-transform: uppercase;
65
+ ${text("overline")}
69
66
  vertical-align: middle;
70
67
  white-space: nowrap;
71
68
  padding: 10px 10px;
@@ -81,19 +78,19 @@ styled.div`
81
78
 
82
79
  & + ${Row} {
83
80
  ${Column} {
84
- border-top: 1px solid var(--stokr-border-subtle);
81
+ border-top: 1px solid var(--border-subtle);
85
82
  }
86
83
  }
87
84
 
88
85
  /* &:hover {
89
86
  ${Column} {
90
- background-color: var(--stokr-color-neutral-100);
87
+ background-color: var(--color-neutral-100);
91
88
  }
92
89
  } */
93
90
  }
94
91
 
95
92
  ${Column} {
96
- color: var(--stokr-text-primary);
93
+ color: var(--text-primary);
97
94
  font-weight: 400;
98
95
  font-size: 14px;
99
96
  line-height: 20px;
@@ -104,7 +101,7 @@ styled.div`
104
101
  styled.div`
105
102
  display: inline-block;
106
103
  background-color: ${(props) => props.color};
107
- color: var(--stokr-text-on-brand);
104
+ color: var(--text-on-brand);
108
105
  font-weight: 600;
109
106
  min-width: 40px;
110
107
  line-height: 24px;
@@ -157,19 +154,15 @@ const TableWrap = styled.div`
157
154
  const StyledTh = styled.th.withConfig({
158
155
  shouldForwardProp: (props) => !["blue", "width", "minWidth", "maxWidth"].includes(props)
159
156
  })`
160
- text-transform: uppercase;
157
+ ${text("overline")}
161
158
  padding: 10px;
162
- font-size: 11px;
163
- letter-spacing: 1.6px;
164
- font-weight: 600;
165
- background-color: var(--stokr-background-default);
166
- color: var(--stokr-text-primary);
167
- border-bottom: 1px solid var(--stokr-border-subtle);
168
- line-height: 20px;
159
+ background-color: var(--background-default);
160
+ color: var(--text-primary);
161
+ border-bottom: 1px solid var(--border-subtle);
169
162
 
170
163
  ${(props) => props.blue && `
171
- background-color: var(--stokr-action-accent-bg);
172
- color: var(--stokr-action-accent-text);
164
+ background-color: var(--action-accent-bg);
165
+ color: var(--action-accent-text);
173
166
  border:none;
174
167
  `}
175
168
 
@@ -191,11 +184,11 @@ const StyledTd = styled.td.withConfig({
191
184
  shouldForwardProp: (props) => !["blue", "subTable", "width", "minWidth", "maxWidth"].includes(props)
192
185
  })`
193
186
  padding: 26px 15px;
194
- border-bottom: 1px solid var(--stokr-border-subtle);
187
+ border-bottom: 1px solid var(--border-subtle);
195
188
  font-size: 14px;
196
189
  ${(props) => props.blue && `
197
- background-color: var(--stokr-action-accent-bg-hover);
198
- color: var(--stokr-action-accent-text);
190
+ background-color: var(--action-accent-bg-hover);
191
+ color: var(--action-accent-text);
199
192
  `}
200
193
 
201
194
  ${(props) => props.subTable && `
@@ -13,7 +13,7 @@ styled.a`
13
13
  text-decoration: underline;
14
14
 
15
15
  &:hover {
16
- color: var(--stokr-action-accent-bg) !important;
16
+ color: var(--action-accent-bg) !important;
17
17
  opacity: 0.7;
18
18
  text-decoration: underline;
19
19
  }
@@ -8,7 +8,7 @@ const BackButtonIcon = styled.span.attrs({
8
8
  font-size: 16px;
9
9
  position: absolute;
10
10
  left: 0;
11
- color: var(--stokr-text-primary);
11
+ color: var(--text-primary);
12
12
  transform: translateX(0);
13
13
  transition:
14
14
  0.3s color,
@@ -21,7 +21,7 @@ const ForwardButtonIcon = styled.span.attrs({
21
21
  font-size: 16px;
22
22
  position: absolute;
23
23
  right: 0;
24
- color: var(--stokr-text-primary);
24
+ color: var(--text-primary);
25
25
  transform: translateX(0);
26
26
  transition:
27
27
  0.3s color,
@@ -32,17 +32,17 @@ const StyledBackButton = styled(Link)`
32
32
  font-size: 11px;
33
33
  line-height: 16px;
34
34
  letter-spacing: 2px;
35
- color: var(--stokr-text-primary);
35
+ color: var(--text-primary);
36
36
  position: relative;
37
37
  padding-left: 16px;
38
38
  transition: 0.3s color;
39
39
 
40
40
  &:hover {
41
- color: var(--stokr-action-accent-bg-hover);
41
+ color: var(--action-accent-bg-hover);
42
42
 
43
43
  ${BackButtonIcon} {
44
44
  transform: translateX(-4px);
45
- color: var(--stokr-action-accent-bg-hover);
45
+ color: var(--action-accent-bg-hover);
46
46
  }
47
47
  }
48
48
  `;
@@ -51,17 +51,17 @@ const StyledBackButtonExternal = styled.a`
51
51
  font-size: 11px;
52
52
  line-height: 16px;
53
53
  letter-spacing: 2px;
54
- color: var(--stokr-text-primary);
54
+ color: var(--text-primary);
55
55
  position: relative;
56
56
  padding-left: 16px;
57
57
  transition: 0.3s color;
58
58
 
59
59
  &:hover {
60
- color: var(--stokr-action-accent-bg-hover);
60
+ color: var(--action-accent-bg-hover);
61
61
 
62
62
  ${BackButtonIcon} {
63
63
  transform: translateX(-4px);
64
- color: var(--stokr-action-accent-bg-hover);
64
+ color: var(--action-accent-bg-hover);
65
65
  }
66
66
  }
67
67
  `;
@@ -71,17 +71,17 @@ const StyledWindowBackButton = styled.span`
71
71
  line-height: 16px;
72
72
  cursor: pointer;
73
73
  letter-spacing: 2px;
74
- color: var(--stokr-text-primary);
74
+ color: var(--text-primary);
75
75
  position: relative;
76
76
  padding-left: 16px;
77
77
  transition: 0.3s color;
78
78
 
79
79
  &:hover {
80
- color: var(--stokr-action-accent-bg-hover);
80
+ color: var(--action-accent-bg-hover);
81
81
 
82
82
  ${BackButtonIcon} {
83
83
  transform: translateX(-4px);
84
- color: var(--stokr-action-accent-bg-hover);
84
+ color: var(--action-accent-bg-hover);
85
85
  }
86
86
  }
87
87
  `;
@@ -92,7 +92,7 @@ styled.div.withConfig({
92
92
  font-size: 11px;
93
93
  line-height: 16px;
94
94
  letter-spacing: 2px;
95
- color: var(--stokr-text-primary);
95
+ color: var(--text-primary);
96
96
  position: relative;
97
97
  padding-left: 16px;
98
98
  transition: 0.3s color;
@@ -103,16 +103,16 @@ styled.div.withConfig({
103
103
  `}
104
104
 
105
105
  &:hover {
106
- color: var(--stokr-action-accent-bg-hover);
106
+ color: var(--action-accent-bg-hover);
107
107
 
108
108
  ${BackButtonIcon} {
109
109
  transform: translateX(-4px);
110
- color: var(--stokr-action-accent-bg-hover);
110
+ color: var(--action-accent-bg-hover);
111
111
  }
112
112
 
113
113
  ${ForwardButtonIcon} {
114
114
  transform: translateX(4px);
115
- color: var(--stokr-action-accent-bg-hover);
115
+ color: var(--action-accent-bg-hover);
116
116
  }
117
117
  }
118
118
  `;
@@ -1,21 +1,19 @@
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 Table = styled.div.withConfig({
4
5
  shouldForwardProp: (props) => !["filled"].includes(props)
5
6
  })`
6
7
  display: block;
7
- border: 1px solid var(--stokr-border-subtle);
8
+ border: 1px solid var(--border-subtle);
8
9
  ${(props) => props.filled && `
9
- background: var(--stokr-background-surface);
10
+ background: var(--background-surface);
10
11
  `}
11
12
  `;
12
13
  const Row = styled.div.withConfig({
13
14
  shouldForwardProp: (props) => !["smallPadding"].includes(props)
14
15
  })`
15
- font-size: 11px;
16
- line-height: 24px;
17
- letter-spacing: 2.1px;
18
- text-transform: uppercase;
16
+ ${text("labelRegular")}
19
17
  padding: 16px 24px;
20
18
  display: block;
21
19
 
@@ -24,7 +22,7 @@ const Row = styled.div.withConfig({
24
22
  `}
25
23
 
26
24
  & + & {
27
- border-top: 1px solid var(--stokr-border-subtle);
25
+ border-top: 1px solid var(--border-subtle);
28
26
  }
29
27
 
30
28
  &:after {
@@ -52,7 +50,7 @@ const LabelWarning = styled.div`
52
50
  float: left;
53
51
  text-align: left;
54
52
  width: 100%;
55
- color: var(--stokr-status-error-text);
53
+ color: var(--status-error-text);
56
54
  line-height: 16px;
57
55
  `;
58
56
  const Caption = styled.div`
@@ -1,6 +1,7 @@
1
1
  import { Button } from "../Button/Button.styles.js";
2
2
  import styled, { css } from "styled-components";
3
3
  import { breakpoint } from "../../design-system/styled/breakpoint.js";
4
+ import { text } from "../../design-system/styled/text.js";
4
5
  import { Breakdown } from "../breakdown/Breakdown.js";
5
6
  const Content = styled.div.withConfig({
6
7
  shouldForwardProp: (props) => props !== "layout"
@@ -17,7 +18,7 @@ const Content = styled.div.withConfig({
17
18
  bottom: 0;
18
19
  left: 0;
19
20
  right: 0;
20
- color: var(--stokr-brand-pure-white);
21
+ color: var(--brand-pure-white);
21
22
  `}
22
23
 
23
24
  ${breakpoint.Medium`
@@ -40,7 +41,7 @@ const Container = styled.div.withConfig({
40
41
  position: relative;
41
42
  display: flex;
42
43
  flex-direction: column;
43
- background: var(--stokr-background-default);
44
+ background: var(--background-default);
44
45
  height: 100%;
45
46
  min-height: 400px;
46
47
  max-height: 540px;
@@ -64,11 +65,11 @@ const Container = styled.div.withConfig({
64
65
  @media (hover: hover) and (pointer: fine) {
65
66
  cursor:pointer;
66
67
  &:hover {
67
- box-shadow: 0 0 0 10px #fafafa;
68
+ box-shadow: 0 0 0 10px var(--background-surface);
68
69
 
69
70
  ${(props.layout === "image-right" || props.layout === "image-left") && `
70
71
  ${Content} {
71
- background-color: var(--stokr-background-surface);
72
+ background-color: var(--background-surface);
72
73
  }
73
74
  `}
74
75
  }
@@ -109,11 +110,7 @@ const TextWrapper = styled.div`
109
110
  // max-height: 70%;
110
111
 
111
112
  h3 {
112
- font-weight: 800;
113
- font-size: 20px;
114
- line-height: 30px;
115
- letter-spacing: 1.41px;
116
- text-transform: uppercase;
113
+ ${text("titleL")}
117
114
  margin: 0;
118
115
  display: -webkit-box;
119
116
  -webkit-box-orient: vertical;
@@ -128,7 +125,6 @@ const TextWrapper = styled.div`
128
125
  `}
129
126
 
130
127
  ${breakpoint.Medium`
131
- font-size: 22px;
132
128
  -webkit-line-clamp: 6;
133
129
  `}
134
130
 
@@ -172,7 +168,7 @@ const BottomRow = styled.div`
172
168
  const Category = styled(Breakdown).withConfig({
173
169
  shouldForwardProp: (props) => props !== "category"
174
170
  })`
175
- font-weight: 500 !important;
171
+ ${text("labelRegular")}
176
172
  display: flex;
177
173
  align-items: center;
178
174
  gap: 8px;
@@ -185,7 +181,7 @@ const Category = styled(Breakdown).withConfig({
185
181
  height: 0;
186
182
  border-style: solid;
187
183
  border-width: 6px 0 6px 8px;
188
- border-color: transparent transparent transparent var(--stokr-border-subtle);
184
+ border-color: transparent transparent transparent var(--border-subtle);
189
185
  }
190
186
  `}
191
187
  `;
@@ -209,7 +205,7 @@ const LoaderWrapper = styled.div`
209
205
  display: flex;
210
206
  align-items: center;
211
207
  justify-content: center;
212
- background: var(--stokr-background-default);
208
+ background: var(--background-default);
213
209
  `;
214
210
  export {
215
211
  BottomRow,
@@ -2,7 +2,7 @@ export type ButtonSize = 'sm' | 'md' | 'lg';
2
2
  /** The UI kit's button variants; colours come from the `action-*` tokens, so they follow the theme. */
3
3
  export type ButtonVariant = 'accent' | 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'negative';
4
4
  export interface ButtonProps {
5
- /** Kit variant. Defaults to `accent`. */
5
+ /** Kit variant. Without it the button keeps its original look (and the deprecated boolean props still work). */
6
6
  variant?: ButtonVariant;
7
7
  /** Figma size (32 / 40 / 48px tall, label/cta text, room for icons). Without it the button keeps its original look. */
8
8
  size?: ButtonSize;