@deriv-com/trading-game-design-system 0.2.3 → 0.2.5
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 +2 -0
- package/package.json +1 -1
- package/src/styles.css +81 -1
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ npm install @deriv-com/trading-game-design-system --safe-chain-skip-minimum-pack
|
|
|
22
22
|
|
|
23
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
24
|
|
|
25
|
+
> **Fonts included:** Barlow and Orbitron are loaded automatically via `@font-face` — no extra setup needed.
|
|
26
|
+
|
|
25
27
|
2. Use components in your app:
|
|
26
28
|
|
|
27
29
|
```tsx
|
package/package.json
CHANGED
package/src/styles.css
CHANGED
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
* or import it in your JS entry point.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/* Fonts — Barlow (body) */
|
|
13
|
+
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 300; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_DMs5.woff2) format("woff2"); }
|
|
14
|
+
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_DMs5.woff2) format("woff2"); }
|
|
15
|
+
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v12/7cHqv4kjgoGqM7E30_os.woff2) format("woff2"); }
|
|
16
|
+
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v12/7cHqv4kjgoGqM7E3-_ks.woff2) format("woff2"); }
|
|
17
|
+
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v12/7cHqv4kjgoGqM7E3l_gs.woff2) format("woff2"); }
|
|
18
|
+
|
|
19
|
+
/* Fonts — Orbitron (display/headings) */
|
|
20
|
+
@font-face { font-family: "Orbitron"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(https://fonts.gstatic.com/s/orbitron/v31/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWg1fDAlp7lk.woff2) format("woff2"); }
|
|
21
|
+
|
|
12
22
|
@custom-variant dark (&:is(.dark *));
|
|
13
23
|
|
|
14
24
|
@theme inline {
|
|
@@ -65,6 +75,8 @@
|
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
:root {
|
|
78
|
+
--font-barlow: "Barlow", ui-sans-serif, system-ui, sans-serif;
|
|
79
|
+
--font-orbitron: "Orbitron", ui-sans-serif, system-ui, sans-serif;
|
|
68
80
|
--radius: 0.625rem;
|
|
69
81
|
/* Light mode */
|
|
70
82
|
--background: oklch(1 0 0);
|
|
@@ -157,6 +169,74 @@
|
|
|
157
169
|
@apply border-border outline-ring/50;
|
|
158
170
|
}
|
|
159
171
|
body {
|
|
160
|
-
@apply bg-background text-foreground;
|
|
172
|
+
@apply bg-background text-foreground font-sans antialiased;
|
|
161
173
|
}
|
|
162
174
|
}
|
|
175
|
+
|
|
176
|
+
/* Typography — Heading scale (Orbitron · Semibold 600 · LS 1.5px) */
|
|
177
|
+
.heading-h1 {
|
|
178
|
+
font-family: var(--font-orbitron);
|
|
179
|
+
font-weight: 600;
|
|
180
|
+
font-size: 72px;
|
|
181
|
+
line-height: 72px;
|
|
182
|
+
letter-spacing: 1.5px;
|
|
183
|
+
text-transform: uppercase;
|
|
184
|
+
}
|
|
185
|
+
.heading-h2 {
|
|
186
|
+
font-family: var(--font-orbitron);
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
font-size: 64px;
|
|
189
|
+
line-height: 64px;
|
|
190
|
+
letter-spacing: 1.5px;
|
|
191
|
+
text-transform: uppercase;
|
|
192
|
+
}
|
|
193
|
+
.heading-h3 {
|
|
194
|
+
font-family: var(--font-orbitron);
|
|
195
|
+
font-weight: 600;
|
|
196
|
+
font-size: 48px;
|
|
197
|
+
line-height: 48px;
|
|
198
|
+
letter-spacing: 1.5px;
|
|
199
|
+
text-transform: uppercase;
|
|
200
|
+
}
|
|
201
|
+
.heading-h4 {
|
|
202
|
+
font-family: var(--font-orbitron);
|
|
203
|
+
font-weight: 600;
|
|
204
|
+
font-size: 40px;
|
|
205
|
+
line-height: 40px;
|
|
206
|
+
letter-spacing: 1.5px;
|
|
207
|
+
text-transform: uppercase;
|
|
208
|
+
}
|
|
209
|
+
.heading-xs {
|
|
210
|
+
font-family: var(--font-orbitron);
|
|
211
|
+
font-weight: 600;
|
|
212
|
+
font-size: 24px;
|
|
213
|
+
line-height: 24px;
|
|
214
|
+
letter-spacing: 1.5px;
|
|
215
|
+
text-transform: uppercase;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Typography — Body scale (Barlow · Semibold 600) */
|
|
219
|
+
.body-lg {
|
|
220
|
+
font-family: var(--font-barlow);
|
|
221
|
+
font-weight: 600;
|
|
222
|
+
font-size: 18px;
|
|
223
|
+
line-height: 28px;
|
|
224
|
+
}
|
|
225
|
+
.body-md {
|
|
226
|
+
font-family: var(--font-barlow);
|
|
227
|
+
font-weight: 600;
|
|
228
|
+
font-size: 16px;
|
|
229
|
+
line-height: 24px;
|
|
230
|
+
}
|
|
231
|
+
.body-sm {
|
|
232
|
+
font-family: var(--font-barlow);
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
font-size: 12px;
|
|
235
|
+
line-height: 16px;
|
|
236
|
+
}
|
|
237
|
+
.body-xs {
|
|
238
|
+
font-family: var(--font-barlow);
|
|
239
|
+
font-weight: 600;
|
|
240
|
+
font-size: 8px;
|
|
241
|
+
line-height: 12px;
|
|
242
|
+
}
|