@deriv-com/trading-game-design-system 0.2.2 → 0.2.4

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.
package/README.md CHANGED
@@ -12,13 +12,16 @@ npm install @deriv-com/trading-game-design-system --safe-chain-skip-minimum-pack
12
12
 
13
13
  ### Setup
14
14
 
15
- 1. Import the design tokens/styles in your CSS (requires Tailwind CSS v4):
15
+ 1. Import the design tokens and tell Tailwind to scan the package (requires Tailwind CSS v4):
16
16
 
17
17
  ```css
18
- @import "tailwindcss";
19
18
  @import "@deriv-com/trading-game-design-system/styles";
19
+ @import "tailwindcss";
20
+ @source "../node_modules/@deriv-com/trading-game-design-system/dist";
20
21
  ```
21
22
 
23
+ > **Why `@source`?** Tailwind v4 skips `node_modules` by default. Without this line, Tailwind won't generate CSS for the component classes (e.g. `bg-primary`, `text-primary-foreground`). This is the standard way to use any Tailwind-based component library with v4.
24
+
22
25
  2. Use components in your app:
23
26
 
24
27
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deriv-com/trading-game-design-system",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Trading Game Design System — shadcn/ui components with Tailwind CSS v4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/src/styles.css CHANGED
@@ -9,6 +9,9 @@
9
9
  * or import it in your JS entry point.
10
10
  */
11
11
 
12
+ /* Fonts — Barlow (body) + Orbitron (display/headings) */
13
+ @import url("https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap");
14
+
12
15
  @custom-variant dark (&:is(.dark *));
13
16
 
14
17
  @theme inline {
@@ -65,6 +68,8 @@
65
68
  }
66
69
 
67
70
  :root {
71
+ --font-barlow: "Barlow", ui-sans-serif, system-ui, sans-serif;
72
+ --font-orbitron: "Orbitron", ui-sans-serif, system-ui, sans-serif;
68
73
  --radius: 0.625rem;
69
74
  /* Light mode */
70
75
  --background: oklch(1 0 0);
@@ -157,6 +162,74 @@
157
162
  @apply border-border outline-ring/50;
158
163
  }
159
164
  body {
160
- @apply bg-background text-foreground;
165
+ @apply bg-background text-foreground font-sans antialiased;
161
166
  }
162
167
  }
168
+
169
+ /* Typography — Heading scale (Orbitron · Semibold 600 · LS 1.5px) */
170
+ .heading-h1 {
171
+ font-family: var(--font-orbitron);
172
+ font-weight: 600;
173
+ font-size: 72px;
174
+ line-height: 72px;
175
+ letter-spacing: 1.5px;
176
+ text-transform: uppercase;
177
+ }
178
+ .heading-h2 {
179
+ font-family: var(--font-orbitron);
180
+ font-weight: 600;
181
+ font-size: 64px;
182
+ line-height: 64px;
183
+ letter-spacing: 1.5px;
184
+ text-transform: uppercase;
185
+ }
186
+ .heading-h3 {
187
+ font-family: var(--font-orbitron);
188
+ font-weight: 600;
189
+ font-size: 48px;
190
+ line-height: 48px;
191
+ letter-spacing: 1.5px;
192
+ text-transform: uppercase;
193
+ }
194
+ .heading-h4 {
195
+ font-family: var(--font-orbitron);
196
+ font-weight: 600;
197
+ font-size: 40px;
198
+ line-height: 40px;
199
+ letter-spacing: 1.5px;
200
+ text-transform: uppercase;
201
+ }
202
+ .heading-xs {
203
+ font-family: var(--font-orbitron);
204
+ font-weight: 600;
205
+ font-size: 24px;
206
+ line-height: 24px;
207
+ letter-spacing: 1.5px;
208
+ text-transform: uppercase;
209
+ }
210
+
211
+ /* Typography — Body scale (Barlow · Semibold 600) */
212
+ .body-lg {
213
+ font-family: var(--font-barlow);
214
+ font-weight: 600;
215
+ font-size: 18px;
216
+ line-height: 28px;
217
+ }
218
+ .body-md {
219
+ font-family: var(--font-barlow);
220
+ font-weight: 600;
221
+ font-size: 16px;
222
+ line-height: 24px;
223
+ }
224
+ .body-sm {
225
+ font-family: var(--font-barlow);
226
+ font-weight: 600;
227
+ font-size: 12px;
228
+ line-height: 16px;
229
+ }
230
+ .body-xs {
231
+ font-family: var(--font-barlow);
232
+ font-weight: 600;
233
+ font-size: 8px;
234
+ line-height: 12px;
235
+ }