@deriv-web-design/ui 0.0.2 → 0.0.3
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 +39 -27
- package/dist/index.css +264 -240
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +159 -214
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -214
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/tokens.css +17 -193
package/tokens.css
CHANGED
|
@@ -46,24 +46,6 @@
|
|
|
46
46
|
--color-cherry-800: #f50032;
|
|
47
47
|
--color-cherry-900: #dc002c;
|
|
48
48
|
|
|
49
|
-
/* Color — Green (field success) */
|
|
50
|
-
--color-green-600: #007a22;
|
|
51
|
-
|
|
52
|
-
/* Color — Red (field error) */
|
|
53
|
-
--color-red-600: #c40000;
|
|
54
|
-
|
|
55
|
-
/* Color — Opacity / Green */
|
|
56
|
-
--color-opacity-green-8: rgba(0, 136, 50, 0.08);
|
|
57
|
-
--color-opacity-green-16: rgba(0, 136, 50, 0.16);
|
|
58
|
-
--color-opacity-green-72: rgba(0, 136, 50, 0.72);
|
|
59
|
-
--color-opacity-green-88: rgba(0, 136, 50, 0.88);
|
|
60
|
-
|
|
61
|
-
/* Color — Opacity / Red */
|
|
62
|
-
--color-opacity-red-8: rgba(230, 25, 14, 0.08);
|
|
63
|
-
--color-opacity-red-16: rgba(230, 25, 14, 0.16);
|
|
64
|
-
--color-opacity-red-72: rgba(230, 25, 14, 0.72);
|
|
65
|
-
--color-opacity-red-88: rgba(230, 25, 14, 0.88);
|
|
66
|
-
|
|
67
49
|
/* Color — Opacity / Slate */
|
|
68
50
|
--color-opacity-slate-4: rgba(24, 28, 37, 0.04);
|
|
69
51
|
--color-opacity-slate-8: rgba(24, 28, 37, 0.08);
|
|
@@ -104,17 +86,19 @@
|
|
|
104
86
|
/* Font Family */
|
|
105
87
|
--font-family-base: Inter, sans-serif;
|
|
106
88
|
|
|
107
|
-
/* Font Size
|
|
108
|
-
|
|
109
|
-
--font-size-
|
|
110
|
-
--font-size-
|
|
111
|
-
--font-size-
|
|
112
|
-
--font-size-
|
|
113
|
-
--font-size-
|
|
114
|
-
--font-size-
|
|
115
|
-
--font-size-
|
|
116
|
-
--font-size-
|
|
117
|
-
--font-size-
|
|
89
|
+
/* Font Size */
|
|
90
|
+
--font-size-xs: 0.75rem;
|
|
91
|
+
--font-size-sm: 0.875rem;
|
|
92
|
+
--font-size-md: 1rem;
|
|
93
|
+
--font-size-lg: 1.125rem;
|
|
94
|
+
--font-size-xl: 1.25rem;
|
|
95
|
+
--font-size-2xl: 1.5rem;
|
|
96
|
+
--font-size-3xl: 1.75rem;
|
|
97
|
+
--font-size-4xl: 2rem;
|
|
98
|
+
--font-size-5xl: 2.5rem;
|
|
99
|
+
--font-size-6xl: 3rem;
|
|
100
|
+
--font-size-7xl: 3.5rem;
|
|
101
|
+
--font-size-8xl: 4rem;
|
|
118
102
|
|
|
119
103
|
/* Font Weight */
|
|
120
104
|
--font-weight-regular: 400;
|
|
@@ -122,24 +106,12 @@
|
|
|
122
106
|
--font-weight-semi-bold: 600;
|
|
123
107
|
--font-weight-extra-bold: 800;
|
|
124
108
|
|
|
125
|
-
/* Line Height
|
|
126
|
-
--line-height-tight:
|
|
127
|
-
--line-height-snug:
|
|
128
|
-
--line-height-normal:
|
|
109
|
+
/* Line Height */
|
|
110
|
+
--line-height-tight: 1.2;
|
|
111
|
+
--line-height-snug: 1.3;
|
|
112
|
+
--line-height-normal: 1.5;
|
|
129
113
|
--line-height-relaxed: 1.75;
|
|
130
114
|
|
|
131
|
-
/* Line Height — absolute, mobile (default)
|
|
132
|
-
xs–lg are identical across viewports; xl–5xl scale up at tablet/desktop */
|
|
133
|
-
--line-height-xs: 1.25rem;
|
|
134
|
-
--line-height-sm: 1.5rem;
|
|
135
|
-
--line-height-md: 1.5rem;
|
|
136
|
-
--line-height-lg: 1.75rem;
|
|
137
|
-
--line-height-xl: 1.75rem; /* mobile.xl */
|
|
138
|
-
--line-height-2xl: 2rem; /* mobile.2xl */
|
|
139
|
-
--line-height-3xl: 2.5rem; /* mobile.3xl */
|
|
140
|
-
--line-height-4xl: 3rem; /* mobile.4xl */
|
|
141
|
-
--line-height-5xl: 3.5rem; /* mobile.5xl */
|
|
142
|
-
|
|
143
115
|
/* Border Radius */
|
|
144
116
|
--radius-none: 0;
|
|
145
117
|
--radius-xs: 0.125rem;
|
|
@@ -159,43 +131,6 @@
|
|
|
159
131
|
}
|
|
160
132
|
|
|
161
133
|
|
|
162
|
-
/* ============================================================
|
|
163
|
-
CORE TOKENS — responsive overrides
|
|
164
|
-
font-size and line-height xl–5xl scale up at tablet/desktop
|
|
165
|
-
============================================================ */
|
|
166
|
-
|
|
167
|
-
@media (min-width: 768px) {
|
|
168
|
-
:root {
|
|
169
|
-
--font-size-xl: 1.5rem; /* tablet.xl */
|
|
170
|
-
--font-size-2xl: 2rem; /* tablet.2xl */
|
|
171
|
-
--font-size-3xl: 2.5rem; /* tablet.3xl */
|
|
172
|
-
--font-size-4xl: 3rem; /* tablet.4xl */
|
|
173
|
-
--font-size-5xl: 4rem; /* tablet.5xl */
|
|
174
|
-
|
|
175
|
-
--line-height-xl: 2rem; /* tablet.xl */
|
|
176
|
-
--line-height-2xl: 2.5rem; /* tablet.2xl */
|
|
177
|
-
--line-height-3xl: 3rem; /* tablet.3xl */
|
|
178
|
-
--line-height-4xl: 3.5rem; /* tablet.4xl */
|
|
179
|
-
--line-height-5xl: 4rem; /* tablet.5xl */
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@media (min-width: 992px) {
|
|
184
|
-
:root {
|
|
185
|
-
--font-size-xl: 1.75rem; /* desktop.xl */
|
|
186
|
-
--font-size-2xl: 2.5rem; /* desktop.2xl */
|
|
187
|
-
--font-size-3xl: 3rem; /* desktop.3xl */
|
|
188
|
-
--font-size-4xl: 3.5rem; /* desktop.4xl */
|
|
189
|
-
--font-size-5xl: 5rem; /* desktop.5xl */
|
|
190
|
-
|
|
191
|
-
--line-height-xl: 2.25rem; /* desktop.xl */
|
|
192
|
-
--line-height-2xl: 3rem; /* desktop.2xl */
|
|
193
|
-
--line-height-3xl: 3.5rem; /* desktop.3xl */
|
|
194
|
-
--line-height-4xl: 4rem; /* desktop.4xl */
|
|
195
|
-
--line-height-5xl: 5.5rem; /* desktop.5xl */
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
134
|
/* ============================================================
|
|
200
135
|
SEMANTIC TOKENS
|
|
201
136
|
Use these in components. They map intent → core values.
|
|
@@ -234,115 +169,4 @@
|
|
|
234
169
|
--button-disabled-background: var(--color-slate-200);
|
|
235
170
|
--button-disabled-text: var(--color-slate-500);
|
|
236
171
|
--button-disabled-border: var(--color-slate-200);
|
|
237
|
-
|
|
238
|
-
/* Link — Coral scheme */
|
|
239
|
-
--link-coral-color: var(--color-coral-500);
|
|
240
|
-
|
|
241
|
-
/* Link — Black scheme */
|
|
242
|
-
--link-black-color: var(--color-slate-1300);
|
|
243
|
-
|
|
244
|
-
/* Link — White scheme */
|
|
245
|
-
--link-white-color: var(--color-slate-50);
|
|
246
|
-
|
|
247
|
-
/* Link — Shared */
|
|
248
|
-
--link-disabled-opacity: 0.24;
|
|
249
|
-
|
|
250
|
-
/* Tag */
|
|
251
|
-
--tag-fill-background: var(--color-opacity-slate-4);
|
|
252
|
-
--tag-outline-border: var(--color-opacity-slate-8);
|
|
253
|
-
--tag-text-color: var(--color-opacity-slate-72);
|
|
254
|
-
|
|
255
|
-
/* Chip */
|
|
256
|
-
--chip-border-color: var(--color-opacity-slate-8);
|
|
257
|
-
--chip-text-color: var(--color-opacity-slate-72);
|
|
258
|
-
--chip-hover-background: var(--color-opacity-slate-8);
|
|
259
|
-
--chip-active-background: var(--color-opacity-slate-16);
|
|
260
|
-
--chip-selected-background: var(--color-slate-1200);
|
|
261
|
-
--chip-selected-text: var(--color-slate-50);
|
|
262
|
-
--chip-disabled-text: var(--color-opacity-slate-24);
|
|
263
|
-
--chip-focus-ring-color: var(--color-blue-600);
|
|
264
|
-
|
|
265
|
-
/* Accordion */
|
|
266
|
-
--accordion-divider-color: var(--color-opacity-slate-8);
|
|
267
|
-
--accordion-title-color: var(--color-slate-1200);
|
|
268
|
-
--accordion-body-color: var(--color-slate-1200);
|
|
269
|
-
--accordion-chevron-color: var(--color-opacity-slate-72);
|
|
270
|
-
--accordion-focus-ring-color: var(--color-blue-600);
|
|
271
|
-
|
|
272
|
-
/* TextField — Surface */
|
|
273
|
-
--field-surface-outline: var(--color-slate-50);
|
|
274
|
-
--field-surface-fill: var(--color-opacity-slate-4);
|
|
275
|
-
--field-surface-fill-hover: var(--color-opacity-slate-8);
|
|
276
|
-
--field-surface-fail: var(--color-opacity-red-8);
|
|
277
|
-
--field-surface-fail-hover: var(--color-opacity-red-16);
|
|
278
|
-
--field-surface-success: var(--color-opacity-green-8);
|
|
279
|
-
--field-surface-success-hover: var(--color-opacity-green-16);
|
|
280
|
-
|
|
281
|
-
/* TextField — Border */
|
|
282
|
-
--field-border-default: var(--color-opacity-slate-8);
|
|
283
|
-
--field-border-hover: var(--color-opacity-slate-16);
|
|
284
|
-
--field-border-focus: var(--color-slate-1300);
|
|
285
|
-
--field-border-fail-default: var(--color-opacity-red-72);
|
|
286
|
-
--field-border-fail-hover: var(--color-opacity-red-88);
|
|
287
|
-
--field-border-fail-focus: var(--color-red-600);
|
|
288
|
-
--field-border-success-default: var(--color-opacity-green-72);
|
|
289
|
-
--field-border-success-hover: var(--color-opacity-green-88);
|
|
290
|
-
--field-border-success-focus: var(--color-green-600);
|
|
291
|
-
|
|
292
|
-
/* TextField — Text */
|
|
293
|
-
--field-text-default: var(--color-opacity-slate-72);
|
|
294
|
-
--field-text-focus: var(--color-slate-1300);
|
|
295
|
-
--field-text-placeholder: var(--color-opacity-slate-24);
|
|
296
|
-
--field-text-disabled: var(--color-opacity-slate-24);
|
|
297
|
-
--field-text-subtle: var(--color-opacity-slate-48);
|
|
298
|
-
--field-text-fail: var(--color-red-600);
|
|
299
|
-
--field-text-success: var(--color-green-600);
|
|
300
|
-
|
|
301
|
-
/* TextField — Icon */
|
|
302
|
-
--field-icon-default: var(--color-opacity-slate-72);
|
|
303
|
-
--field-icon-disabled: var(--color-opacity-slate-24);
|
|
304
|
-
--field-icon-subtle: var(--color-opacity-slate-48);
|
|
305
|
-
|
|
306
|
-
/* Breadcrumb */
|
|
307
|
-
--breadcrumb-text-color: var(--color-opacity-slate-72);
|
|
308
|
-
--breadcrumb-text-current-color: var(--color-opacity-slate-48);
|
|
309
|
-
--breadcrumb-separator-color: var(--color-opacity-slate-48);
|
|
310
|
-
--breadcrumb-focus-ring-color: var(--color-blue-600);
|
|
311
|
-
|
|
312
|
-
/* Chip Dropdown — List panel */
|
|
313
|
-
--chip-dropdown-list-bg: var(--color-slate-50);
|
|
314
|
-
--chip-dropdown-list-border: var(--color-opacity-slate-4);
|
|
315
|
-
--chip-dropdown-list-shadow: 0 16px 24px rgba(0, 0, 0, 0.04), 0 16px 24px rgba(0, 0, 0, 0.02);
|
|
316
|
-
|
|
317
|
-
/* Chip Dropdown — List item */
|
|
318
|
-
--chip-dropdown-item-text: var(--color-opacity-slate-72);
|
|
319
|
-
--chip-dropdown-item-hover-bg: var(--color-opacity-slate-8);
|
|
320
|
-
--chip-dropdown-item-active-bg: var(--color-opacity-slate-16);
|
|
321
|
-
--chip-dropdown-item-selected-check: var(--color-opacity-slate-72);
|
|
322
|
-
|
|
323
|
-
/* Typography — H5
|
|
324
|
-
font-size and line-height are responsive because --font-size-xl
|
|
325
|
-
and --line-height-xl override at each breakpoint in the core section above */
|
|
326
|
-
--typography-h5-font-family: var(--font-family-base);
|
|
327
|
-
--typography-h5-font-size: var(--font-size-xl); /* mobile: 1.25rem → tablet: 1.5rem → desktop: 1.75rem */
|
|
328
|
-
--typography-h5-font-weight: var(--font-weight-extra-bold); /* 800 — all viewports */
|
|
329
|
-
--typography-h5-line-height: var(--line-height-xl); /* mobile: 1.75rem → tablet: 2rem → desktop: 2.25rem */
|
|
330
|
-
|
|
331
|
-
/* Typography — body-md (semantic/typography.json → body-md)
|
|
332
|
-
md is identical across all viewports — no responsive overrides needed */
|
|
333
|
-
--typography-body-md-font-family: var(--font-family-base);
|
|
334
|
-
--typography-body-md-font-size: var(--font-size-md); /* {font-size.*.md} = 1rem */
|
|
335
|
-
--typography-body-md-font-weight: var(--font-weight-regular); /* 400 */
|
|
336
|
-
--typography-body-md-line-height: var(--line-height-md); /* {line-height.*.md} = 1.5rem */
|
|
337
|
-
|
|
338
|
-
/* Pagination — Page */
|
|
339
|
-
--pagination-page-radius: var(--radius-full);
|
|
340
|
-
--pagination-page-text: var(--color-opacity-slate-72);
|
|
341
|
-
--pagination-page-selected-bg: var(--color-slate-1400);
|
|
342
|
-
--pagination-page-selected-text: var(--color-slate-50);
|
|
343
|
-
--pagination-page-ellipsis-text: var(--color-opacity-slate-24);
|
|
344
|
-
|
|
345
|
-
/* Pagination — Nav */
|
|
346
|
-
--pagination-nav-icon: var(--color-slate-1400);
|
|
347
|
-
--pagination-nav-icon-disabled: var(--color-opacity-slate-24);
|
|
348
172
|
}
|