@deriv-com/dds-marketing 0.1.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.
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @deriv/dds-marketing
2
+
3
+ Components and design tokens from the Deriv Design System, for marketing sites — landing
4
+ pages, pricing, sign-up.
5
+
6
+ > **This package has no components yet.** Its tokens are real and its stylesheet is
7
+ > complete; the component surface is still being authored. Until it lands, installing this
8
+ > gets you the marketing token layer and an empty barrel. Product apps want
9
+ > [`@deriv/dds-product`](https://www.npmjs.com/package/@deriv/dds-product).
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @deriv/dds-marketing
15
+ ```
16
+
17
+ React 19 and the Quill icon set are peer dependencies, so install them alongside it if
18
+ your app does not already have them:
19
+
20
+ ```bash
21
+ npm install react react-dom @deriv-com/quill-icons-web
22
+ ```
23
+
24
+ ## Use
25
+
26
+ Import the stylesheet once, at the root of your app. It defines every token this package's
27
+ components bind to — without it they render unstyled.
28
+
29
+ ```tsx
30
+ import '@deriv/dds-marketing/marketing.css'
31
+ ```
32
+
33
+ Then import components by name:
34
+
35
+ ```tsx
36
+ import { Button } from '@deriv/dds-marketing'
37
+ ```
38
+
39
+ Each component brings its own stylesheet with it, so nothing else needs importing.
40
+
41
+ ## Light and dark
42
+
43
+ `marketing.css` defines both themes. Dark is selected by `data-theme="dark"` on any
44
+ ancestor — usually `<html>`:
45
+
46
+ ```html
47
+ <html data-theme="dark">
48
+ ```
49
+
50
+ Marketing also carries a mobile viewport axis: seven roles take different values below
51
+ 768px, applied automatically and overridable with `data-dds-viewport="mobile"` or
52
+ `"desktop"` when a page renders a device frame inside a wider window.
53
+
54
+ ## Versioning
55
+
56
+ Pre-1.0. Minor versions may contain breaking changes while the component surface settles;
57
+ pin an exact version if that matters to you.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ // GENERATED from components/*/*.contract.json. Do not edit.
2
+ export {};
@@ -0,0 +1,344 @@
1
+ /* GENERATED from tokens/semantic/**. Do not edit. */
2
+
3
+ :root, [data-dds-context="marketing"] {
4
+ --border-style-decorative: dashed;
5
+ --border-style-default: solid;
6
+ --border-width-default: 1px;
7
+ --border-width-focus: 2px;
8
+ --border-width-none: 0px;
9
+ --border-width-strong: 2px;
10
+ --border-width-thick: 4px;
11
+ --color-bg-brand-hover: #E82A3D;
12
+ --color-bg-brand: #FF444F;
13
+ --color-bg-danger-subtle: #FFE7E0;
14
+ --color-bg-danger: #E3272A;
15
+ --color-bg-disabled: #D8DADD;
16
+ --color-bg-hover: #0000000D;
17
+ --color-bg-info-subtle: #DDF7FF;
18
+ --color-bg-info: #0068FF;
19
+ --color-bg-overlay-subtle: #00000033;
20
+ --color-bg-overlay: #00000080;
21
+ --color-bg-page: #F4F5F6;
22
+ --color-bg-selected: #00000014;
23
+ --color-bg-subtle: #D8DADD;
24
+ --color-bg-success-subtle: #DFFFE5;
25
+ --color-bg-success: #00A14E;
26
+ --color-bg-surface-raised: #FFFFFF;
27
+ --color-bg-surface: #FFFFFF;
28
+ --color-bg-warning-subtle: #FFEFCB;
29
+ --color-bg-warning: #F59E0B;
30
+ --color-border-danger: #E3272A;
31
+ --color-border-default: #BDC0C5;
32
+ --color-border-disabled: #BDC0C5;
33
+ --color-border-focus: #0068FF;
34
+ --color-border-info: #0068FF;
35
+ --color-border-strong: #63666B;
36
+ --color-border-subtle: #0000000D;
37
+ --color-border-success: #00A14E;
38
+ --color-border-warning: #F59E0B;
39
+ --color-fg-danger: #C00000;
40
+ --color-fg-default: #0C0C0C;
41
+ --color-fg-disabled: #BDC0C5;
42
+ --color-fg-info: #003BB6;
43
+ --color-fg-muted: #63666B;
44
+ --color-fg-on-solid: #FFFFFF;
45
+ --color-fg-success: #00802E;
46
+ --color-fg-tertiary: #898E95;
47
+ --color-fg-warning: #C06D00;
48
+ --elevation-edge-bottom: 0px 1px 2px 0px #00000014;
49
+ --elevation-edge-top: 0px -1px 2px 0px #00000014;
50
+ --elevation-surface-floating: 0px 4px 8px 0px #0000001F;
51
+ --elevation-surface-modal: 0px 12px 24px 0px #00000029;
52
+ --elevation-surface-overlay: 0px 4px 8px 0px #00000029;
53
+ --elevation-surface-raised: 0px 1px 2px 0px #00000014;
54
+ --elevation-surface-sticky: 0px 1px 2px 0px #0000001F;
55
+ --font-body-lg-family: Inter, system-ui, sans-serif;
56
+ --font-body-lg-letter-spacing: 0em;
57
+ --font-body-lg-line-height: 1.5;
58
+ --font-body-lg-size: 16px;
59
+ --font-body-lg-weight: 400;
60
+ --font-body-md-family: Inter, system-ui, sans-serif;
61
+ --font-body-md-letter-spacing: 0em;
62
+ --font-body-md-line-height: 1.5;
63
+ --font-body-md-size: 14px;
64
+ --font-body-md-weight: 400;
65
+ --font-body-sm-family: Inter, system-ui, sans-serif;
66
+ --font-body-sm-letter-spacing: 0em;
67
+ --font-body-sm-line-height: 1.5;
68
+ --font-body-sm-size: 12px;
69
+ --font-body-sm-weight: 400;
70
+ --font-code-family: Red Hat Mono, ui-monospace, monospace;
71
+ --font-code-letter-spacing: 0em;
72
+ --font-code-line-height: 1.5;
73
+ --font-code-size: 14px;
74
+ --font-code-weight: 400;
75
+ --font-display-family: Inter, system-ui, sans-serif;
76
+ --font-display-letter-spacing: -0.025em;
77
+ --font-display-line-height: 1.125;
78
+ --font-display-size: 56px;
79
+ --font-display-weight: 700;
80
+ --font-eyebrow-family: Inter, system-ui, sans-serif;
81
+ --font-eyebrow-letter-spacing: 0.025em;
82
+ --font-eyebrow-line-height: 1.25;
83
+ --font-eyebrow-size: 12px;
84
+ --font-eyebrow-weight: 500;
85
+ --font-headline-family: Inter, system-ui, sans-serif;
86
+ --font-headline-letter-spacing: -0.015em;
87
+ --font-headline-line-height: 1.25;
88
+ --font-headline-size: 40px;
89
+ --font-headline-weight: 700;
90
+ --font-label-lg-family: Inter, system-ui, sans-serif;
91
+ --font-label-lg-letter-spacing: 0em;
92
+ --font-label-lg-line-height: 1.25;
93
+ --font-label-lg-size: 16px;
94
+ --font-label-lg-weight: 500;
95
+ --font-label-md-family: Inter, system-ui, sans-serif;
96
+ --font-label-md-letter-spacing: 0em;
97
+ --font-label-md-line-height: 1.25;
98
+ --font-label-md-size: 14px;
99
+ --font-label-md-weight: 500;
100
+ --font-lead-family: Inter, system-ui, sans-serif;
101
+ --font-lead-letter-spacing: 0em;
102
+ --font-lead-line-height: 1.5;
103
+ --font-lead-size: 18px;
104
+ --font-lead-weight: 400;
105
+ --font-subtitle-family: Inter, system-ui, sans-serif;
106
+ --font-subtitle-letter-spacing: 0em;
107
+ --font-subtitle-line-height: 1.25;
108
+ --font-subtitle-size: 20px;
109
+ --font-subtitle-weight: 600;
110
+ --font-title-family: Inter, system-ui, sans-serif;
111
+ --font-title-letter-spacing: -0.005em;
112
+ --font-title-line-height: 1.25;
113
+ --font-title-size: 24px;
114
+ --font-title-weight: 600;
115
+ --icon-size-2xl: 64px;
116
+ --icon-size-display: 80px;
117
+ --icon-size-lg: 32px;
118
+ --icon-size-md: 24px;
119
+ --icon-size-sm: 16px;
120
+ --icon-size-xl: 48px;
121
+ --motion-duration-dramatic: 700ms;
122
+ --motion-duration-fast: 100ms;
123
+ --motion-duration-normal: 200ms;
124
+ --motion-duration-reveal: 500ms;
125
+ --motion-duration-slow: 300ms;
126
+ --motion-easing-enter: cubic-bezier(0.33, 1, 0.68, 1);
127
+ --motion-easing-exit: cubic-bezier(0.32, 0, 0.67, 0);
128
+ --motion-easing-reveal: cubic-bezier(0.22, 1, 0.36, 1);
129
+ --motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
130
+ --motion-scale-hover: 1.02;
131
+ --radius-container: 32px;
132
+ --radius-control: 16px;
133
+ --radius-expressive: 48px;
134
+ --radius-none: 0px;
135
+ --radius-pill: 9999px;
136
+ --radius-subtle: 8px;
137
+ --radius-surface: 24px;
138
+ --space-gap-2xl: 80px;
139
+ --space-gap-lg: 24px;
140
+ --space-gap-md: 16px;
141
+ --space-gap-sm: 8px;
142
+ --space-gap-xl: 48px;
143
+ --space-gap-xs: 4px;
144
+ --space-inset-2xl: 80px;
145
+ --space-inset-lg: 24px;
146
+ --space-inset-md: 12px;
147
+ --space-inset-sm: 8px;
148
+ --space-inset-xl: 48px;
149
+ --space-inset-xs: 4px;
150
+ }
151
+
152
+ [data-theme="dark"], [data-dds-context="marketing"][data-theme="dark"] {
153
+ --border-style-decorative: dashed;
154
+ --border-style-default: solid;
155
+ --border-width-default: 1px;
156
+ --border-width-focus: 2px;
157
+ --border-width-none: 0px;
158
+ --border-width-strong: 2px;
159
+ --border-width-thick: 4px;
160
+ --color-bg-brand-hover: #FF444F;
161
+ --color-bg-brand: #FF6669;
162
+ --color-bg-danger-subtle: #390000;
163
+ --color-bg-danger: #F6554D;
164
+ --color-bg-disabled: #363636;
165
+ --color-bg-hover: #0000000D;
166
+ --color-bg-info-subtle: #00004A;
167
+ --color-bg-info: #3786FF;
168
+ --color-bg-overlay-subtle: #00000033;
169
+ --color-bg-overlay: #00000080;
170
+ --color-bg-page: #0C0C0C;
171
+ --color-bg-selected: #FFFFFF14;
172
+ --color-bg-subtle: #363636;
173
+ --color-bg-success-subtle: #002001;
174
+ --color-bg-success: #45B569;
175
+ --color-bg-surface-raised: #363636;
176
+ --color-bg-surface: #202020;
177
+ --color-bg-warning-subtle: #360F00;
178
+ --color-bg-warning: #FDAE43;
179
+ --color-border-danger: #F6554D;
180
+ --color-border-default: #4C4D50;
181
+ --color-border-disabled: #363636;
182
+ --color-border-focus: #3786FF;
183
+ --color-border-info: #3786FF;
184
+ --color-border-strong: #A2A7AD;
185
+ --color-border-subtle: #FFFFFF0D;
186
+ --color-border-success: #45B569;
187
+ --color-border-warning: #FDAE43;
188
+ --color-fg-danger: #FF796E;
189
+ --color-fg-default: #F4F5F6;
190
+ --color-fg-disabled: #4C4D50;
191
+ --color-fg-info: #5EA3FF;
192
+ --color-fg-muted: #A2A7AD;
193
+ --color-fg-on-solid: #0C0C0C;
194
+ --color-fg-success: #6BC985;
195
+ --color-fg-tertiary: #71767D;
196
+ --color-fg-warning: #FFBD65;
197
+ --elevation-edge-bottom: 0px 1px 2px 0px #0000001F;
198
+ --elevation-edge-top: 0px -1px 2px 0px #0000001F;
199
+ --elevation-surface-floating: 0px 4px 8px 0px #00000029;
200
+ --elevation-surface-modal: 0px 12px 24px 0px #00000029;
201
+ --elevation-surface-overlay: 0px 12px 24px 0px #00000029;
202
+ --elevation-surface-raised: 0px 1px 2px 0px #0000001F;
203
+ --elevation-surface-sticky: 0px 4px 8px 0px #0000001F;
204
+ --font-body-lg-family: Inter, system-ui, sans-serif;
205
+ --font-body-lg-letter-spacing: 0em;
206
+ --font-body-lg-line-height: 1.5;
207
+ --font-body-lg-size: 16px;
208
+ --font-body-lg-weight: 400;
209
+ --font-body-md-family: Inter, system-ui, sans-serif;
210
+ --font-body-md-letter-spacing: 0em;
211
+ --font-body-md-line-height: 1.5;
212
+ --font-body-md-size: 14px;
213
+ --font-body-md-weight: 400;
214
+ --font-body-sm-family: Inter, system-ui, sans-serif;
215
+ --font-body-sm-letter-spacing: 0em;
216
+ --font-body-sm-line-height: 1.5;
217
+ --font-body-sm-size: 12px;
218
+ --font-body-sm-weight: 400;
219
+ --font-code-family: Red Hat Mono, ui-monospace, monospace;
220
+ --font-code-letter-spacing: 0em;
221
+ --font-code-line-height: 1.5;
222
+ --font-code-size: 14px;
223
+ --font-code-weight: 400;
224
+ --font-display-family: Inter, system-ui, sans-serif;
225
+ --font-display-letter-spacing: -0.025em;
226
+ --font-display-line-height: 1.125;
227
+ --font-display-size: 56px;
228
+ --font-display-weight: 700;
229
+ --font-eyebrow-family: Inter, system-ui, sans-serif;
230
+ --font-eyebrow-letter-spacing: 0.025em;
231
+ --font-eyebrow-line-height: 1.25;
232
+ --font-eyebrow-size: 12px;
233
+ --font-eyebrow-weight: 500;
234
+ --font-headline-family: Inter, system-ui, sans-serif;
235
+ --font-headline-letter-spacing: -0.015em;
236
+ --font-headline-line-height: 1.25;
237
+ --font-headline-size: 40px;
238
+ --font-headline-weight: 700;
239
+ --font-label-lg-family: Inter, system-ui, sans-serif;
240
+ --font-label-lg-letter-spacing: 0em;
241
+ --font-label-lg-line-height: 1.25;
242
+ --font-label-lg-size: 16px;
243
+ --font-label-lg-weight: 500;
244
+ --font-label-md-family: Inter, system-ui, sans-serif;
245
+ --font-label-md-letter-spacing: 0em;
246
+ --font-label-md-line-height: 1.25;
247
+ --font-label-md-size: 14px;
248
+ --font-label-md-weight: 500;
249
+ --font-lead-family: Inter, system-ui, sans-serif;
250
+ --font-lead-letter-spacing: 0em;
251
+ --font-lead-line-height: 1.5;
252
+ --font-lead-size: 18px;
253
+ --font-lead-weight: 400;
254
+ --font-subtitle-family: Inter, system-ui, sans-serif;
255
+ --font-subtitle-letter-spacing: 0em;
256
+ --font-subtitle-line-height: 1.25;
257
+ --font-subtitle-size: 20px;
258
+ --font-subtitle-weight: 600;
259
+ --font-title-family: Inter, system-ui, sans-serif;
260
+ --font-title-letter-spacing: -0.005em;
261
+ --font-title-line-height: 1.25;
262
+ --font-title-size: 24px;
263
+ --font-title-weight: 600;
264
+ --icon-size-2xl: 64px;
265
+ --icon-size-display: 80px;
266
+ --icon-size-lg: 32px;
267
+ --icon-size-md: 24px;
268
+ --icon-size-sm: 16px;
269
+ --icon-size-xl: 48px;
270
+ --motion-duration-dramatic: 700ms;
271
+ --motion-duration-fast: 100ms;
272
+ --motion-duration-normal: 200ms;
273
+ --motion-duration-reveal: 500ms;
274
+ --motion-duration-slow: 300ms;
275
+ --motion-easing-enter: cubic-bezier(0.33, 1, 0.68, 1);
276
+ --motion-easing-exit: cubic-bezier(0.32, 0, 0.67, 0);
277
+ --motion-easing-reveal: cubic-bezier(0.22, 1, 0.36, 1);
278
+ --motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
279
+ --motion-scale-hover: 1.02;
280
+ --radius-container: 32px;
281
+ --radius-control: 16px;
282
+ --radius-expressive: 48px;
283
+ --radius-none: 0px;
284
+ --radius-pill: 9999px;
285
+ --radius-subtle: 8px;
286
+ --radius-surface: 24px;
287
+ --space-gap-2xl: 80px;
288
+ --space-gap-lg: 24px;
289
+ --space-gap-md: 16px;
290
+ --space-gap-sm: 8px;
291
+ --space-gap-xl: 48px;
292
+ --space-gap-xs: 4px;
293
+ --space-inset-2xl: 80px;
294
+ --space-inset-lg: 24px;
295
+ --space-inset-md: 12px;
296
+ --space-inset-sm: 8px;
297
+ --space-inset-xl: 48px;
298
+ --space-inset-xs: 4px;
299
+ }
300
+
301
+ @media (max-width: 767px) {
302
+ :root, [data-dds-context="marketing"] {
303
+ --font-display-letter-spacing: -0.015em;
304
+ --font-display-line-height: 1.25;
305
+ --font-display-size: 32px;
306
+ --font-headline-letter-spacing: -0.005em;
307
+ --font-headline-size: 28px;
308
+ --font-title-letter-spacing: 0em;
309
+ --font-title-size: 20px;
310
+ --space-gap-2xl: 48px;
311
+ --space-gap-xl: 32px;
312
+ --space-inset-2xl: 48px;
313
+ --space-inset-xl: 24px;
314
+ }
315
+ }
316
+
317
+ [data-dds-viewport="mobile"], [data-dds-context="marketing"][data-dds-viewport="mobile"] {
318
+ --font-display-letter-spacing: -0.015em;
319
+ --font-display-line-height: 1.25;
320
+ --font-display-size: 32px;
321
+ --font-headline-letter-spacing: -0.005em;
322
+ --font-headline-size: 28px;
323
+ --font-title-letter-spacing: 0em;
324
+ --font-title-size: 20px;
325
+ --space-gap-2xl: 48px;
326
+ --space-gap-xl: 32px;
327
+ --space-inset-2xl: 48px;
328
+ --space-inset-xl: 24px;
329
+ }
330
+
331
+ [data-dds-viewport="desktop"], [data-dds-context="marketing"][data-dds-viewport="desktop"] {
332
+ --font-display-letter-spacing: -0.025em;
333
+ --font-display-line-height: 1.125;
334
+ --font-display-size: 56px;
335
+ --font-headline-letter-spacing: -0.015em;
336
+ --font-headline-size: 40px;
337
+ --font-title-letter-spacing: -0.005em;
338
+ --font-title-size: 24px;
339
+ --space-gap-2xl: 80px;
340
+ --space-gap-xl: 48px;
341
+ --space-inset-2xl: 80px;
342
+ --space-inset-xl: 48px;
343
+ }
344
+
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@deriv-com/dds-marketing",
3
+ "version": "0.1.0",
4
+ "description": "Deriv Design System — components and tokens for marketing sites (landing pages, pricing, sign-up).",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "sideEffects": [
8
+ "**/*.css"
9
+ ],
10
+ "main": "./dist/components/index.js",
11
+ "types": "./dist/components/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/components/index.d.ts",
15
+ "default": "./dist/components/index.js"
16
+ },
17
+ "./marketing.css": "./dist/marketing.css",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "README.md"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/deriv-com/deriv-design-system.git",
30
+ "directory": "packages/marketing"
31
+ },
32
+ "homepage": "https://github.com/deriv-com/deriv-design-system/tree/main/packages/marketing#readme",
33
+ "bugs": {
34
+ "url": "https://github.com/deriv-com/deriv-design-system/issues"
35
+ },
36
+ "keywords": [
37
+ "design-system",
38
+ "deriv",
39
+ "react",
40
+ "components",
41
+ "design-tokens"
42
+ ],
43
+ "scripts": {
44
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
45
+ "build:tokens": "node --import tsx ../../src/tokens/build.ts --package-root .",
46
+ "build": "node --import tsx ../../src/generate/build.ts --package-root .",
47
+ "build:package": "tsc -p tsconfig.build.json && node --import tsx scripts/copy-css.ts",
48
+ "prepack": "npm run clean && npm run build:tokens && npm run build:package",
49
+ "check": "node --import tsx ../../src/check/cli.ts --package-root .",
50
+ "test": "vitest run",
51
+ "typecheck": "tsc --noEmit -p tsconfig.build.json",
52
+ "push:marketing": "node --env-file=../../.env --import tsx ../../src/figma/push-variables.ts marketing-spike --package-root .",
53
+ "promote:marketing": "node --env-file=../../.env --import tsx ../../src/figma/promote-cli.ts marketing --package-root .",
54
+ "ratify": "node --import tsx ../../src/ratify/cli.ts --package-root ."
55
+ },
56
+ "peerDependencies": {
57
+ "@deriv-com/quill-icons-web": "~1.0.10",
58
+ "react": ">=19",
59
+ "react-dom": ">=19"
60
+ }
61
+ }