@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
@@ -6,4 +6,5 @@
6
6
  export { theme, type AppTheme } from './styled/theme';
7
7
  export { text } from './styled/text';
8
8
  export { breakpoint, type Breakpoint } from './styled/breakpoint';
9
- export { ACTIVE_FONT, activeFontPreloadFile, ACTIVE_SCALE, breakpoints, fontFamilies, fontWeights, colorVar, colors, semantic, space, textNames, type ColorName, type SemanticName, type TextName, } from './tokens/index';
9
+ export { typeScaleCss, fontCss } from './css-builders';
10
+ export { ACTIVE_FONT, activeFontPreloadFile, ACTIVE_SCALE, breakpoints, fontFamilies, fontWeights, colorVar, colors, semantic, space, textNames, type ColorName, type FontFamilyName, type ScaleName, type SemanticName, type TextName, } from './tokens/index';
@@ -1,7 +1,7 @@
1
1
  import { elevation, radius, space } from "../tokens/layout.js";
2
2
  import { colors } from "../tokens/colors.js";
3
3
  import { semantic } from "../tokens/semantic.js";
4
- const v = (name) => `var(--stokr-${name})`;
4
+ const v = (name) => `var(--${name})`;
5
5
  const camel = (s) => s.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
6
6
  const group = (entries) => Object.fromEntries(entries);
7
7
  const color = Object.entries(semantic).reduce((acc, [name]) => {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The colours of the STOKR UI kit (the kit calls them primitives; the library exports them as `colors`) (artifact snapshot: source/artifact-tokens.json).
3
- * Keys are the kit's own names; CSS variables are --stokr-<key> for brand and --stokr-color-<key> for the rest.
3
+ * Keys are the kit's own names; CSS variables are --<key> for brand and --color-<key> for the rest.
4
4
  * Never reference these in components: use the semantic tokens (semantic.ts) or the theme.
5
5
  */
6
6
  export declare const colors: {
@@ -91,7 +91,7 @@ const colors = {
91
91
  "progress-blue-start": "#0240A2",
92
92
  "progress-blue-stop": "#66A3FE"
93
93
  };
94
- const colorVar = (name) => name.startsWith("brand-") ? `--stokr-${name}` : `--stokr-color-${name}`;
94
+ const colorVar = (name) => name.startsWith("brand-") ? `--${name}` : `--color-${name}`;
95
95
  export {
96
96
  colorVar,
97
97
  colors
@@ -25,8 +25,12 @@ export interface FontFaceSet {
25
25
  stretch: boolean;
26
26
  files: readonly FontFile[];
27
27
  }
28
- /** Weights the site loads (the kit uses 300–800). One face per weight, not a `300 800` range: mixed with the single-weight Bitcoin face a range face lost the match at some weights and text fell back to serif. */
29
- export declare const loadedWeights: readonly [300, 400, 500, 600, 700, 800];
28
+ /**
29
+ * The weights stokr.io has always loaded. No 500 on purpose: the apps' `font-weight: 500` (menus, labels, links) has always
30
+ * matched the 400 face, and declaring a 500 face would turn all of it medium. One face per weight, not a `300 800` range:
31
+ * mixed with the single-weight Bitcoin face a range face lost the match at some weights and text fell back to serif.
32
+ */
33
+ export declare const loadedWeights: readonly [300, 400, 600, 700, 800];
30
34
  export declare const fontFaces: Record<FontFamilyName, readonly FontFaceSet[]>;
31
35
  /** File name (in fonts/, shipped under `@stokr/components-library/design-system/fonts/`) of the active family's main latin file: what a host preloads. */
32
36
  export declare const activeFontPreloadFile: string;
@@ -2,7 +2,7 @@ import { ACTIVE_FONT } from "./typography.js";
2
2
  const LATIN = "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD";
3
3
  const LATIN_EXT = "U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF";
4
4
  const INTER_LATIN_EXT = LATIN_EXT.replace("U+20AD-20C4", "U+20AD-20C0");
5
- const loadedWeights = [300, 400, 500, 600, 700, 800];
5
+ const loadedWeights = [300, 400, 600, 700, 800];
6
6
  const fontFaces = {
7
7
  openSans: [
8
8
  {
@@ -1,7 +1,7 @@
1
1
  import { ColorName } from './colors';
2
2
  /**
3
3
  * Semantic colour tokens: what components use. Names mirror the kit's variables (text/primary → text-primary,
4
- * CSS --stokr-text-primary). Each token points at a colour for the light and the dark theme.
4
+ * CSS --text-primary). Each token points at a colour for the light and the dark theme.
5
5
  */
6
6
  export interface SemanticPair {
7
7
  light: ColorName;
@@ -205,8 +205,8 @@ export declare const semantic: {
205
205
  readonly dark: "red-500";
206
206
  };
207
207
  readonly 'status-error-text': {
208
- readonly light: "red-700";
209
- readonly dark: "red-300";
208
+ readonly light: "red-500";
209
+ readonly dark: "red-400";
210
210
  };
211
211
  readonly 'status-error-icon': {
212
212
  readonly light: "red-500";
@@ -228,6 +228,18 @@ export declare const semantic: {
228
228
  readonly light: "neutral-700";
229
229
  readonly dark: "neutral-500";
230
230
  };
231
+ readonly 'status-info-blue-bg': {
232
+ readonly light: "blue-50";
233
+ readonly dark: "blue-800";
234
+ };
235
+ readonly 'status-info-blue-text': {
236
+ readonly light: "neutral-900";
237
+ readonly dark: "brand-pure-white";
238
+ };
239
+ readonly 'status-info-blue-icon': {
240
+ readonly light: "blue-500";
241
+ readonly dark: "blue-400";
242
+ };
231
243
  readonly 'tag-pending-bg': {
232
244
  readonly light: "yellow-50";
233
245
  readonly dark: "yellow-900";
@@ -53,12 +53,16 @@ const semantic = {
53
53
  "status-warning-icon": { light: "yellow-600", dark: "yellow-600" },
54
54
  "status-error-bg": { light: "red-100", dark: "red-900" },
55
55
  "status-error-border": { light: "red-500", dark: "red-500" },
56
- "status-error-text": { light: "red-700", dark: "red-300" },
56
+ "status-error-text": { light: "red-500", dark: "red-400" },
57
57
  "status-error-icon": { light: "red-500", dark: "red-400" },
58
58
  "status-info-bg": { light: "neutral-100", dark: "neutral-900" },
59
59
  "status-info-border": { light: "neutral-300", dark: "neutral-700" },
60
60
  "status-info-text": { light: "neutral-900", dark: "brand-pure-white" },
61
61
  "status-info-icon": { light: "neutral-700", dark: "neutral-500" },
62
+ /* The blue info banner (what status-info-* was before the kit made it neutral). Radius radius-lg, no border: so no -border. */
63
+ "status-info-blue-bg": { light: "blue-50", dark: "blue-800" },
64
+ "status-info-blue-text": { light: "neutral-900", dark: "brand-pure-white" },
65
+ "status-info-blue-icon": { light: "blue-500", dark: "blue-400" },
62
66
  /* Tag color */
63
67
  "tag-pending-bg": { light: "yellow-50", dark: "yellow-900" },
64
68
  "tag-pending-text": { light: "orange-700", dark: "yellow-500" },
@@ -2,7 +2,7 @@
2
2
  * Type scales from the STOKR UI kit (section "Type scale"). Three scales share the same style names, so switching is one
3
3
  * constant (ACTIVE_SCALE): `uppercase` is what stokr.io ships today, `sentence1` is fluid (clamp 375 → 1440 px),
4
4
  * `sentence2` is the updated sentence-case scale with whole-pixel line-heights.
5
- * Values here are the only place a font size, weight or spacing is written; CSS reads them as --stokr-text-<name>-*.
5
+ * Values here are the only place a font size, weight or spacing is written; CSS reads them as --text-<name>-*.
6
6
  */
7
7
  export type FontFamilyName = 'openSans' | 'inter';
8
8
  export type ScaleName = 'uppercase' | 'sentence1' | 'sentence2';
@@ -52,7 +52,10 @@ const sentenceCommon = {
52
52
  bodyL: { desktop: style(18, 28, 400, "0") },
53
53
  bodyS: { desktop: style(14, 20, 400, "0") },
54
54
  buttonLabel: { desktop: style(12, 24, 700, "0.06em", { uppercase: true }) },
55
- dataLabel: { desktop: style(12, 20, 400, "0.06em", { uppercase: true }), mobile: { size: "11px", lineHeight: "16px" } },
55
+ dataLabel: {
56
+ desktop: style(12, 20, 400, "0.06em", { uppercase: true }),
57
+ mobile: { size: "11px", lineHeight: "16px" }
58
+ },
56
59
  label: { desktop: style(11, 16, 700, "0.06em", { uppercase: true }) },
57
60
  overline: { desktop: style(12, 16, 600, "0.06em", { uppercase: true }) },
58
61
  labelRegular: { desktop: style(11, 16, 400, "0.06em", { uppercase: true }) },
@@ -63,58 +66,78 @@ const sentenceCommon = {
63
66
  linkS: { desktop: style(14, 20, 600, "0", { underline: true }) }
64
67
  };
65
68
  const sentence2 = {
66
- display: { desktop: style(64, 68, 700, "0") },
67
- titleXxl: { desktop: style(48, 56, 700, "0") },
68
- titleXl: { desktop: style(40, 48, 700, "0") },
69
- titleL: { desktop: style(32, 40, 700, "0") },
70
- titleM: { desktop: style(24, 32, 700, "0") },
71
- titleS: { desktop: style(20, 28, 700, "0") },
72
- titleXs: { desktop: style(18, 24, 700, "0") },
73
- titleXxs: { desktop: style(16, 24, 700, "0") },
69
+ display: { desktop: style(64, 68, 700, "0"), mobile: { size: "40px", lineHeight: "44px" } },
70
+ titleXxl: { desktop: style(48, 56, 700, "0"), mobile: { size: "32px", lineHeight: "40px" } },
71
+ titleXl: { desktop: style(40, 48, 700, "0"), mobile: { size: "28px", lineHeight: "36px" } },
72
+ titleL: { desktop: style(32, 40, 700, "0"), mobile: { size: "24px", lineHeight: "32px" } },
73
+ titleM: { desktop: style(24, 32, 700, "0"), mobile: { size: "20px", lineHeight: "28px" } },
74
+ titleS: { desktop: style(20, 28, 700, "0"), mobile: { size: "18px", lineHeight: "26px" } },
75
+ titleXs: { desktop: style(18, 24, 700, "0"), mobile: { size: "16px", lineHeight: "24px" } },
76
+ titleXxs: { desktop: style(16, 24, 700, "0"), mobile: { size: "14px", lineHeight: "20px" } },
74
77
  bodyM: { desktop: style(16, 26, 400, "0") },
75
78
  ...sentenceCommon
76
79
  };
77
- ({
78
- display: { desktop: { ...sentence2.display.desktop, size: fluid(44, 66) } },
79
- titleXxl: { desktop: { ...sentence2.titleXxl.desktop, size: fluid(36, 56) } },
80
- titleXl: { desktop: { ...sentence2.titleXl.desktop, size: fluid(30, 44) } },
81
- titleL: { desktop: { ...sentence2.titleL.desktop, size: fluid(24, 32) } },
82
- titleM: { desktop: { ...sentence2.titleM.desktop, size: fluid(20, 24) } },
83
- titleS: { desktop: { ...sentence2.titleS.desktop, size: fluid(18, 20) } },
84
- titleXs: { desktop: { ...sentence2.titleXs.desktop, size: fluid(16, 18) } },
85
- titleXxs: { desktop: { ...sentence2.titleXxs.desktop, size: fluid(14, 16) } },
80
+ const sentence1 = {
81
+ ...sentence2,
82
+ display: { desktop: { ...sentence2.display.desktop, size: fluid(44, 66), lineHeight: "1.15" } },
83
+ titleXxl: { desktop: { ...sentence2.titleXxl.desktop, size: fluid(36, 56), lineHeight: "1.2" } },
84
+ titleXl: { desktop: { ...sentence2.titleXl.desktop, size: fluid(30, 44), lineHeight: "1.25" } },
85
+ titleL: { desktop: { ...sentence2.titleL.desktop, size: fluid(24, 32), lineHeight: "1.3" } },
86
+ titleM: { desktop: { ...sentence2.titleM.desktop, size: fluid(20, 24), lineHeight: "1.35" } },
87
+ titleS: { desktop: { ...sentence2.titleS.desktop, size: fluid(18, 20), lineHeight: "1.45" } },
88
+ titleXs: { desktop: { ...sentence2.titleXs.desktop, size: fluid(16, 18), lineHeight: "1.45" } },
89
+ titleXxs: { desktop: { ...sentence2.titleXxs.desktop, size: fluid(14, 16), lineHeight: "1.45" } },
86
90
  bodyL: { desktop: style(18, 28, 400, "0", { lineHeight: "1.65" }) },
87
- bodyM: { desktop: { ...sentence2.bodyM.desktop } },
88
- bodyS: { desktop: { ...sentence2.bodyS.desktop } },
89
- caption: { desktop: { ...sentence2.caption.desktop } }
90
- });
91
- ({
92
- display: { desktop: style(66, 64, 800, "3px", { uppercase: true }) },
93
- titleXxl: { desktop: style(48, 55, 800, "1.8px", { uppercase: true }) },
94
- titleXl: { desktop: style(34, 40, 800, "1.5px", { uppercase: true }) },
95
- titleL: { desktop: style(22, 26, 800, "0.8px", { uppercase: true }) },
91
+ bodyM: { desktop: { ...sentence2.bodyM.desktop, lineHeight: "1.65" } },
92
+ bodyS: { desktop: { ...sentence2.bodyS.desktop, lineHeight: "1.5" } },
93
+ caption: { desktop: { ...sentence2.caption.desktop, lineHeight: "1.4" } }
94
+ };
95
+ const uppercase = {
96
+ display: {
97
+ desktop: style(66, 64, 800, "3px", { uppercase: true }),
98
+ mobile: { size: "48px", lineHeight: "40px", letterSpacing: "2px" }
99
+ },
100
+ titleXxl: {
101
+ desktop: style(48, 55, 800, "1.8px", { uppercase: true }),
102
+ mobile: { size: "32px", lineHeight: "37px", letterSpacing: "1.2px" }
103
+ },
104
+ titleXl: {
105
+ desktop: style(34, 40, 800, "1.5px", { uppercase: true }),
106
+ mobile: { size: "28px", lineHeight: "32px", letterSpacing: "1.2px" }
107
+ },
108
+ titleL: { desktop: style(22, 28, 800, "0.8px", { uppercase: true }), mobile: { size: "20px", lineHeight: "24px" } },
96
109
  titleM: { desktop: style(20, 24, 800, "0.8px", { uppercase: true }) },
97
- titleS: { desktop: style(18, 24, 700, "0.8px", { uppercase: true }) },
98
- titleXs: { desktop: style(16, 24, 700, "0.8px", { uppercase: true }) },
99
- titleXxs: { desktop: style(14, 20, 700, "1px", { uppercase: true }) },
110
+ titleS: { desktop: style(18, 24, 700, "0.8px", { uppercase: true }), mobile: { size: "16px" } },
111
+ titleXs: { desktop: style(16, 24, 700, "0.8px", { uppercase: true }), mobile: { size: "14px", lineHeight: "20px" } },
112
+ titleXxs: {
113
+ desktop: style(14, 20, 700, "1px", { uppercase: true }),
114
+ mobile: { size: "12px", lineHeight: "16px", letterSpacing: "0.8px" }
115
+ },
100
116
  subtitleL: { desktop: style(18, 28, 600, "-0.014em") },
101
- subtitleM: { desktop: style(16, 24, 600, "-0.011em") },
102
- subtitleS: { desktop: style(14, 20, 600, "-0.006em") },
103
- bodyL: { desktop: style(18, 28, 400, "0") },
104
- bodyM: { desktop: style(16, 24, 400, "0") },
105
- bodyS: { desktop: style(14, 20, 400, "0") },
117
+ subtitleM: { desktop: style(16, 24, 600, "0.6px") },
118
+ subtitleS: { desktop: style(14, 20, 600, "0.5px") },
119
+ bodyL: { desktop: style(18, 28, 400, "0"), mobile: { size: "16px", lineHeight: "24px" } },
120
+ bodyM: { desktop: style(16, 24, 300, "0.6px", { lineHeight: "1.5" }) },
121
+ bodyS: { desktop: style(14, 20, 300, "0.5px") },
106
122
  buttonLabel: { desktop: style(12, 24, 700, "2px", { uppercase: true }) },
107
- dataLabel: { desktop: style(12, 20, 400, "2px", { uppercase: true }) },
108
- label: { desktop: style(11, 16, 700, "2px", { uppercase: true }) },
123
+ dataLabel: { desktop: style(12, 20, 400, "2px", { uppercase: true }), mobile: { size: "11px", lineHeight: "16px" } },
124
+ label: { desktop: style(11, 20, 700, "2px", { uppercase: true }) },
109
125
  overline: { desktop: style(11, 16, 600, "2px", { uppercase: true }) },
110
- labelRegular: { desktop: style(11, 16, 400, "2px", { uppercase: true }) },
111
- caption: { desktop: style(12, 16, 400, "0") },
112
- footnote: { desktop: style(9, 16, 400, "0") }
113
- });
126
+ labelRegular: { desktop: style(11, 20, 400, "2px", { uppercase: true }) },
127
+ caption: { desktop: style(12, 18, 400, "0.6px") },
128
+ footnote: { desktop: style(9, 16, 300, "0.4px") },
129
+ linkL: sentenceCommon.linkL,
130
+ linkM: sentenceCommon.linkM,
131
+ linkS: sentenceCommon.linkS
132
+ };
133
+ const scales = { uppercase, sentence1, sentence2 };
134
+ const MOBILE_MAX_WIDTH = "767px";
114
135
  export {
115
136
  ACTIVE_FONT,
116
137
  ACTIVE_SCALE,
138
+ MOBILE_MAX_WIDTH,
117
139
  fontFamilies,
118
140
  fontWeights,
141
+ scales,
119
142
  textNames
120
143
  };
package/dist/index.d.ts CHANGED
@@ -127,6 +127,8 @@ export {
127
127
  colorVar,
128
128
  ACTIVE_SCALE,
129
129
  fontFamilies,
130
+ typeScaleCss,
131
+ fontCss,
130
132
  } from './design-system'
131
133
  export { grid, layoutGrid } from './styles/grid'
132
134
  export { Tooltip } from './components/Tooltip/Tooltip'
@@ -135,7 +137,15 @@ export { Bubble as TooltipBubble } from './components/Tooltip/Tooltip.styles'
135
137
  export { ComponentWrapper } from './components/ComponentWrapper/ComponentWrapper.styles'
136
138
  export { DisplayOnBreakpoint } from './components/DisplayOnBreakpoint/DisplayOnBreakpoint'
137
139
  export { InfoIcon, InfoIconWrapper, InfoIconContainer } from './components/InfoIcon/InfoIcon'
138
- export type { AppTheme, Breakpoint, ColorName, SemanticName, TextName } from './design-system'
140
+ export type {
141
+ AppTheme,
142
+ Breakpoint,
143
+ ColorName,
144
+ FontFamilyName,
145
+ ScaleName,
146
+ SemanticName,
147
+ TextName,
148
+ } from './design-system'
139
149
  export type { ComponentWrapperProps } from './components/ComponentWrapper/ComponentWrapper.styles'
140
150
  export type { DisplayOnBreakpointProps } from './components/DisplayOnBreakpoint/DisplayOnBreakpoint'
141
151
  export type { TooltipProps, TooltipPlacement, VirtualReference } from './components/Tooltip/Tooltip'
package/dist/index.js CHANGED
@@ -155,6 +155,7 @@ import { breakpoint } from "./design-system/styled/breakpoint.js";
155
155
  import { breakpoints } from "./design-system/tokens/breakpoints.js";
156
156
  import { colorVar, colors } from "./design-system/tokens/colors.js";
157
157
  import { copyTextToClipboard } from "./utils/copy-text-to-clipboard.js";
158
+ import { fontCss, typeScaleCss } from "./design-system/css-builders.js";
158
159
  import { semantic } from "./design-system/tokens/semantic.js";
159
160
  import { text } from "./design-system/styled/text.js";
160
161
  import { theme } from "./design-system/styled/build-theme.js";
@@ -402,6 +403,7 @@ export {
402
403
  emailRegex,
403
404
  fixDecimals,
404
405
  flatten,
406
+ fontCss,
405
407
  fontFamilies,
406
408
  fontWeights,
407
409
  formatAmount,
@@ -461,6 +463,7 @@ export {
461
463
  toFixedAmount,
462
464
  tokenUnit,
463
465
  transactionTypeDisplayNames,
466
+ typeScaleCss,
464
467
  usCountries,
465
468
  useComponentVisible,
466
469
  useContainerSize,
@@ -1,6 +1,6 @@
1
1
  /** `bordered` is the sign-up redesign look shared by Input, Select and FAQ. */
2
2
  export type FieldVariant = 'default' | 'bordered';
3
- export declare const BORDERED_BORDER = "1px solid var(--stokr-border-subtle)";
3
+ export declare const BORDERED_BORDER = "1px solid var(--border-subtle)";
4
4
  /** Fragments hold plain strings only (no function interpolations) so react-select's emotion can consume them too. */
5
5
  export declare const borderedFieldBox: import('styled-components').RuleSet<object>;
6
6
  export declare const borderedFieldText: import('styled-components').RuleSet<object>;
@@ -1,40 +1,40 @@
1
1
  import { css } from "styled-components";
2
2
  import { text } from "../design-system/styled/text.js";
3
- const BORDERED_BORDER = "1px solid var(--stokr-border-subtle)";
3
+ const BORDERED_BORDER = "1px solid var(--border-subtle)";
4
4
  const borderedFieldBox = css`
5
5
  box-sizing: border-box;
6
6
  min-height: 44px;
7
- padding: calc(var(--stokr-space-3) - 1px) var(--stokr-space-4);
7
+ padding: calc(var(--space-3) - 1px) var(--space-4);
8
8
  border: ${BORDERED_BORDER};
9
- border-radius: var(--stokr-radius-lg);
10
- background-color: var(--stokr-background-default);
9
+ border-radius: var(--radius-lg);
10
+ background-color: var(--background-default);
11
11
  box-shadow: none;
12
12
  transition: border-color 0.2s;
13
13
  `;
14
14
  const borderedFieldText = css`
15
- font-family: var(--stokr-font-family-base);
15
+ font-family: var(--font-family-base);
16
16
  ${text("subtitleS")}
17
- color: var(--stokr-text-primary);
17
+ color: var(--text-primary);
18
18
  `;
19
19
  const borderedFieldPlaceholder = css`
20
- color: var(--stokr-text-tertiary);
20
+ color: var(--text-tertiary);
21
21
  opacity: 1;
22
22
  `;
23
23
  const borderedFieldFocus = css`
24
- border-color: var(--stokr-border-focus);
24
+ border-color: var(--border-focus);
25
25
  `;
26
26
  const borderedFieldError = css`
27
- border-color: var(--stokr-status-error-border);
27
+ border-color: var(--status-error-border);
28
28
  `;
29
29
  const borderedFieldDisabled = css`
30
- background-color: var(--stokr-background-surface);
31
- border-color: var(--stokr-border-subtle);
32
- color: var(--stokr-text-tertiary);
30
+ background-color: var(--background-surface);
31
+ border-color: var(--border-subtle);
32
+ color: var(--text-tertiary);
33
33
  cursor: not-allowed;
34
34
  `;
35
35
  const borderedFieldLabel = css`
36
36
  display: block;
37
- margin-bottom: var(--stokr-space-2);
37
+ margin-bottom: var(--space-2);
38
38
  font-size: 12px;
39
39
  line-height: 16px;
40
40
  font-weight: 600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "STOKR - Components Library",
5
5
  "author": "Bilal Hodzic <bilal@stokr.io>",
6
6
  "license": "MIT",