@xsolla/xui-typography 0.95.0 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @xsolla/xui-typography
2
+
3
+ A flexible text component for rendering styled text with a consistent type scale and colour tokens.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-typography
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Typography } from "@xsolla/xui-typography";
15
+
16
+ <Typography variant="h2" color="primary">
17
+ Hello, world
18
+ </Typography>
19
+ ```
20
+
21
+ ## Props
22
+
23
+ ### Typography
24
+
25
+ | Prop | Type | Default | Description |
26
+ |------|------|---------|-------------|
27
+ | `variant` | `"h1" \| "h2" \| "h3" \| "h4" \| "display" \| "bodyLg" \| "bodyLgAccent" \| "bodyLgParagraph" \| "bodyMd" \| "bodyMdAccent" \| "bodyMdParagraph" \| "bodySm" \| "bodySmAccent" \| "bodySmParagraph" \| "bodyXs" \| "bodyXsAccent" \| "bodyXsParagraph"` | `"bodyMd"` | Type scale variant |
28
+ | `color` | `"primary" \| "secondary" \| "tertiary" \| "brand" \| "brandSecondary" \| "success" \| "warning" \| "alert" \| "neutral" \| "inherit" \| string` | `"inherit"` | Text colour; accepts theme tokens or any CSS colour |
29
+ | `align` | `"center" \| "inherit" \| "justify" \| "left" \| "right"` | `"inherit"` | Text alignment |
30
+ | `noWrap` | `boolean` | `false` | Truncate overflowing text with an ellipsis |
31
+ | `marginTop` | `number` | `0` | Top margin in pixels |
32
+ | `marginBottom` | `number` | `0` | Bottom margin in pixels |
33
+ | `as` | `ElementType` | — | Override the rendered HTML element |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-typography",
3
- "version": "0.95.0",
3
+ "version": "0.97.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.95.0",
17
- "@xsolla/xui-primitives-core": "0.95.0"
16
+ "@xsolla/xui-core": "0.97.0",
17
+ "@xsolla/xui-primitives-core": "0.97.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": ">=16.8.0",