@sumup-oss/design-tokens 8.2.0 → 9.0.0-next.1

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
@@ -103,27 +103,6 @@ function App() {
103
103
 
104
104
  The theme is a plain JavaScript object, so you can use it in other ways, too.
105
105
 
106
- #### With prop types
107
-
108
- The package exports a `themePropType` which can be used to check the `theme` prop:
109
-
110
- ```tsx
111
- import PropTypes from 'prop-types';
112
- import { withTheme } from '@emotion/react';
113
- import { themePropType } from '@sumup-oss/design-tokens';
114
-
115
- function ComponentWithInlineStyles({ theme, label }) {
116
- return <div style={{ borderRadius: theme.borderRadius.kilo }}>{label}</div>;
117
- }
118
-
119
- ComponentWithInlineStyles.propTypes = {
120
- theme: themePropType.isRequired,
121
- label: PropTypes.string,
122
- };
123
-
124
- export default function withTheme(ComponentWithInlineStyles);
125
- ```
126
-
127
106
  #### With TypeScript
128
107
 
129
108
  The package exports a `Theme` interface that can be used to augment Emotion.js' types as described in the [Emotion.js docs](https://emotion.sh/docs/typescript#define-a-theme):
package/dark.css CHANGED
@@ -224,7 +224,242 @@
224
224
  --cui-z-index-default: 0;
225
225
  --cui-z-index-absolute: 1;
226
226
  --cui-z-index-input: 20;
227
- --cui-z-index-popover: 30;
227
+ --cui-z-index-popover: 1000;
228
+ --cui-z-index-tooltip: 40;
229
+ --cui-z-index-header: 600;
230
+ --cui-z-index-backdrop: 700;
231
+ --cui-z-index-navigation: 800;
232
+ --cui-z-index-modal: 1000;
233
+ --cui-z-index-toast: 1100;
234
+ }
235
+
236
+ ::backdrop {
237
+ --lightningcss-light: ;
238
+ --lightningcss-dark: initial;
239
+ color-scheme: dark;
240
+ --cui-bg-normal: #171d24;
241
+ --cui-bg-normal-hovered: #212831;
242
+ --cui-bg-normal-pressed: #28313c;
243
+ --cui-bg-normal-disabled: rgba(216, 232, 248, .08);
244
+ --cui-bg-subtle: #0c0f12;
245
+ --cui-bg-subtle-hovered: #212b31;
246
+ --cui-bg-subtle-pressed: #36434a;
247
+ --cui-bg-subtle-disabled: rgba(216, 232, 248, .08);
248
+ --cui-bg-highlight: #363c41;
249
+ --cui-bg-highlight-hovered: #3d4249;
250
+ --cui-bg-highlight-pressed: #424950;
251
+ --cui-bg-highlight-disabled: rgba(216, 232, 248, .08);
252
+ --cui-bg-strong: #fff;
253
+ --cui-bg-strong-hovered: #f6f8f9;
254
+ --cui-bg-strong-pressed: #e3e7eb;
255
+ --cui-bg-strong-disabled: rgba(216, 232, 248, .08);
256
+ --cui-bg-accent: #0c0f12;
257
+ --cui-bg-accent-hovered: #20292e;
258
+ --cui-bg-accent-pressed: #313d43;
259
+ --cui-bg-accent-disabled: rgba(216, 232, 248, .08);
260
+ --cui-bg-accent-strong: #e1e7ef;
261
+ --cui-bg-accent-strong-hovered: #fff;
262
+ --cui-bg-accent-strong-pressed: #fff;
263
+ --cui-bg-accent-strong-disabled: rgba(216, 232, 248, .08);
264
+ --cui-bg-success: rgba(12, 211, 104, .2);
265
+ --cui-bg-success-hovered: rgba(12, 211, 104, .25);
266
+ --cui-bg-success-pressed: rgba(12, 211, 104, .3);
267
+ --cui-bg-success-disabled: rgba(216, 232, 248, .08);
268
+ --cui-bg-success-strong: #0cd368;
269
+ --cui-bg-success-strong-hovered: #13e072;
270
+ --cui-bg-success-strong-pressed: #25e980;
271
+ --cui-bg-success-strong-disabled: rgba(216, 232, 248, .08);
272
+ --cui-bg-warning: rgba(245, 158, 28, .2);
273
+ --cui-bg-warning-hovered: rgba(245, 158, 28, .25);
274
+ --cui-bg-warning-pressed: rgba(245, 158, 28, .3);
275
+ --cui-bg-warning-disabled: rgba(216, 232, 248, .08);
276
+ --cui-bg-warning-strong: #f5b81c;
277
+ --cui-bg-warning-strong-hovered: #f7c440;
278
+ --cui-bg-warning-strong-pressed: #f7cb59;
279
+ --cui-bg-warning-strong-disabled: rgba(216, 232, 248, .08);
280
+ --cui-bg-danger: rgba(255, 76, 53, .2);
281
+ --cui-bg-danger-hovered: rgba(255, 76, 53, .2);
282
+ --cui-bg-danger-pressed: rgba(255, 76, 53, .4);
283
+ --cui-bg-danger-disabled: rgba(255, 69, 60, .13);
284
+ --cui-bg-danger-strong: #ff4e37;
285
+ --cui-bg-danger-strong-hovered: #ff6259;
286
+ --cui-bg-danger-strong-pressed: #ff827b;
287
+ --cui-bg-danger-strong-disabled: rgba(216, 232, 248, .08);
288
+ --cui-bg-promo: rgba(195, 83, 247, .2);
289
+ --cui-bg-promo-hovered: rgba(195, 83, 247, .25);
290
+ --cui-bg-promo-pressed: rgba(195, 83, 247, .3);
291
+ --cui-bg-promo-disabled: rgba(216, 232, 248, .08);
292
+ --cui-bg-promo-strong: #c353f7;
293
+ --cui-bg-promo-strong-hovered: #c768f3;
294
+ --cui-bg-promo-strong-pressed: #ce72f8;
295
+ --cui-bg-promo-strong-disabled: rgba(216, 232, 248, .08);
296
+ --cui-fg-normal: #fff;
297
+ --cui-fg-normal-hovered: rgba(255, 255, 255, .8);
298
+ --cui-fg-normal-pressed: #e3e7eb;
299
+ --cui-fg-normal-disabled: rgba(230, 224, 233, .2);
300
+ --cui-fg-subtle: rgba(223, 232, 241, .6);
301
+ --cui-fg-subtle-hovered: rgba(223, 232, 241, .7);
302
+ --cui-fg-subtle-pressed: rgba(223, 232, 241, .8);
303
+ --cui-fg-subtle-disabled: rgba(216, 232, 248, .2);
304
+ --cui-fg-placeholder: #555d62;
305
+ --cui-fg-placeholder-hovered: #687278;
306
+ --cui-fg-placeholder-pressed: #7c878d;
307
+ --cui-fg-placeholder-disabled: rgba(85, 93, 98, .5);
308
+ --cui-fg-on-strong: #0f131a;
309
+ --cui-fg-on-strong-hovered: #0f131a;
310
+ --cui-fg-on-strong-pressed: #0f131a;
311
+ --cui-fg-on-strong-disabled: rgba(216, 232, 248, .3);
312
+ --cui-fg-on-strong-subtle: rgba(15, 19, 26, .7);
313
+ --cui-fg-on-strong-subtle-hovered: rgba(15, 19, 26, .7);
314
+ --cui-fg-on-strong-subtle-pressed: rgba(15, 19, 26, .7);
315
+ --cui-fg-on-strong-subtle-disabled: rgba(216, 232, 248, .2);
316
+ --cui-fg-accent: #e1e7ef;
317
+ --cui-fg-accent-hovered: #fff;
318
+ --cui-fg-accent-pressed: #fff;
319
+ --cui-fg-accent-disabled: rgba(216, 232, 248, .3);
320
+ --cui-fg-success: #17db72;
321
+ --cui-fg-success-hovered: #13e072;
322
+ --cui-fg-success-pressed: #25e980;
323
+ --cui-fg-success-disabled: rgba(216, 232, 248, .3);
324
+ --cui-fg-warning: #f5b81c;
325
+ --cui-fg-warning-hovered: #f7c440;
326
+ --cui-fg-warning-pressed: #f7cb59;
327
+ --cui-fg-warning-disabled: rgba(216, 232, 248, .3);
328
+ --cui-fg-danger: #ff634e;
329
+ --cui-fg-danger-hovered: #ff5c47;
330
+ --cui-fg-danger-pressed: #ff6a57;
331
+ --cui-fg-danger-disabled: rgba(255, 178, 167, .7);
332
+ --cui-fg-promo: #cf7bf6;
333
+ --cui-fg-promo-hovered: #c768f3;
334
+ --cui-fg-promo-pressed: #ce72f8;
335
+ --cui-fg-promo-disabled: rgba(216, 232, 248, .3);
336
+ --cui-border-normal: rgba(223, 232, 241, .3);
337
+ --cui-border-normal-hovered: rgba(223, 232, 241, .35);
338
+ --cui-border-normal-pressed: rgba(223, 232, 241, .45);
339
+ --cui-border-normal-disabled: rgba(216, 232, 248, .3);
340
+ --cui-border-subtle: rgba(223, 232, 241, .15);
341
+ --cui-border-subtle-hovered: rgba(223, 232, 241, .2);
342
+ --cui-border-subtle-pressed: rgba(223, 232, 241, .3);
343
+ --cui-border-subtle-disabled: rgba(216, 232, 248, .1);
344
+ --cui-border-divider: rgba(216, 232, 248, .3);
345
+ --cui-border-divider-hovered: rgba(223, 232, 241, .35);
346
+ --cui-border-divider-pressed: rgba(223, 232, 241, .45);
347
+ --cui-border-divider-disabled: rgba(216, 232, 248, .15);
348
+ --cui-border-strong: #fff;
349
+ --cui-border-strong-hovered: #f6f8f9;
350
+ --cui-border-strong-pressed: #e3e7eb;
351
+ --cui-border-strong-disabled: rgba(216, 232, 248, .15);
352
+ --cui-border-accent: #fff;
353
+ --cui-border-accent-hovered: #f6f8f9;
354
+ --cui-border-accent-pressed: #e3e7eb;
355
+ --cui-border-accent-disabled: rgba(216, 232, 248, .15);
356
+ --cui-border-success: #0cd368;
357
+ --cui-border-success-hovered: #13e072;
358
+ --cui-border-success-pressed: #25e980;
359
+ --cui-border-success-disabled: rgba(216, 232, 248, .15);
360
+ --cui-border-warning: #f5b81c;
361
+ --cui-border-warning-hovered: #f7c440;
362
+ --cui-border-warning-pressed: #f7cb59;
363
+ --cui-border-warning-disabled: rgba(216, 232, 248, .15);
364
+ --cui-border-danger: #ff634e;
365
+ --cui-border-danger-hovered: #ff5c47;
366
+ --cui-border-danger-pressed: #ff6a57;
367
+ --cui-border-danger-disabled: rgba(255, 178, 167, .7);
368
+ --cui-border-promo: #c353f7;
369
+ --cui-border-promo-hovered: #c768f3;
370
+ --cui-border-promo-pressed: #ce72f8;
371
+ --cui-border-promo-disabled: rgba(216, 232, 248, .15);
372
+ --cui-bg-overlay: rgba(0, 0, 0, .7);
373
+ --cui-bg-elevated: #2f3438;
374
+ --cui-border-focus: #fff;
375
+ --cui-border-radius-bit: 4px;
376
+ --cui-border-radius-byte: 8px;
377
+ --cui-border-radius-kilo: 12px;
378
+ --cui-border-radius-mega: 16px;
379
+ --cui-border-radius-circle: 100%;
380
+ --cui-border-radius-pill: 999999px;
381
+ --cui-border-width-kilo: 1px;
382
+ --cui-border-width-mega: 2px;
383
+ --cui-font-stack-default: "Inter", "Inter-Fallback", Arial, system-ui, sans-serif, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
384
+ --cui-font-stack-mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
385
+ --cui-font-weight-regular: 375;
386
+ --cui-font-weight-semibold: 560;
387
+ --cui-font-weight-bold: 630;
388
+ --cui-letter-spacing: -.01375rem;
389
+ --cui-letter-spacing-tight: -.08rem;
390
+ --cui-icon-sizes-kilo: 16px;
391
+ --cui-icon-sizes-mega: 24px;
392
+ --cui-icon-sizes-giga: 32px;
393
+ --cui-icon-sizes-tera: 48px;
394
+ --cui-spacings-bit: 4px;
395
+ --cui-spacings-byte: 8px;
396
+ --cui-spacings-kilo: 12px;
397
+ --cui-spacings-mega: 16px;
398
+ --cui-spacings-giga: 24px;
399
+ --cui-spacings-tera: 32px;
400
+ --cui-spacings-peta: 40px;
401
+ --cui-spacings-exa: 48px;
402
+ --cui-spacings-zetta: 56px;
403
+ --cui-transitions-default: .12s ease-in-out;
404
+ --cui-transitions-slow: .3s ease-in-out;
405
+ --cui-display-l-font-size: 4rem;
406
+ --cui-display-l-line-height: 4.5rem;
407
+ --cui-display-m-font-size: 3rem;
408
+ --cui-display-m-line-height: 3.5rem;
409
+ --cui-display-s-font-size: 2.5rem;
410
+ --cui-display-s-line-height: 2.875rem;
411
+ --cui-headline-l-font-size: 2rem;
412
+ --cui-headline-l-line-height: 2.25rem;
413
+ --cui-headline-m-font-size: 1.5rem;
414
+ --cui-headline-m-line-height: 1.625rem;
415
+ --cui-headline-s-font-size: 1.125rem;
416
+ --cui-headline-s-line-height: 1.375rem;
417
+ --cui-body-l-font-size: 1.25rem;
418
+ --cui-body-l-line-height: 1.5rem;
419
+ --cui-body-m-font-size: 1rem;
420
+ --cui-body-m-line-height: 1.375rem;
421
+ --cui-body-s-font-size: .875rem;
422
+ --cui-body-s-line-height: 1.25rem;
423
+ --cui-compact-l-font-size: 1.125rem;
424
+ --cui-compact-l-line-height: 1.5rem;
425
+ --cui-compact-m-font-size: .9375rem;
426
+ --cui-compact-m-line-height: 1.0625rem;
427
+ --cui-compact-s-font-size: .8125rem;
428
+ --cui-compact-s-line-height: .9375rem;
429
+ --cui-numeral-l-font-size: 3rem;
430
+ --cui-numeral-l-line-height: 3.375rem;
431
+ --cui-numeral-m-font-size: 1.5rem;
432
+ --cui-numeral-m-line-height: 1.75rem;
433
+ --cui-numeral-s-font-size: 1rem;
434
+ --cui-numeral-s-line-height: 1.375rem;
435
+ --cui-typography-headline-one-font-size: 2rem;
436
+ --cui-typography-headline-one-line-height: 2.25rem;
437
+ --cui-typography-headline-two-font-size: 1.375rem;
438
+ --cui-typography-headline-two-line-height: 1.625rem;
439
+ --cui-typography-headline-three-font-size: 1.375rem;
440
+ --cui-typography-headline-three-line-height: 1.625rem;
441
+ --cui-typography-headline-four-font-size: 1.125rem;
442
+ --cui-typography-headline-four-line-height: 1.375rem;
443
+ --cui-typography-title-one-font-size: 4rem;
444
+ --cui-typography-title-one-line-height: 4.5rem;
445
+ --cui-typography-title-two-font-size: 3rem;
446
+ --cui-typography-title-two-line-height: 3.5rem;
447
+ --cui-typography-title-three-font-size: 3rem;
448
+ --cui-typography-title-three-line-height: 3.5rem;
449
+ --cui-typography-title-four-font-size: 2.5rem;
450
+ --cui-typography-title-four-line-height: 2.875rem;
451
+ --cui-typography-sub-headline-font-size: 1.125rem;
452
+ --cui-typography-sub-headline-line-height: 1.375rem;
453
+ --cui-typography-body-one-font-size: 1rem;
454
+ --cui-typography-body-one-line-height: 1.375rem;
455
+ --cui-typography-body-two-font-size: .875rem;
456
+ --cui-typography-body-two-line-height: 1.25rem;
457
+ --cui-typography-body-large-font-size: 1.25rem;
458
+ --cui-typography-body-large-line-height: 1.5rem;
459
+ --cui-z-index-default: 0;
460
+ --cui-z-index-absolute: 1;
461
+ --cui-z-index-input: 20;
462
+ --cui-z-index-popover: 1000;
228
463
  --cui-z-index-tooltip: 40;
229
464
  --cui-z-index-header: 600;
230
465
  --cui-z-index-backdrop: 700;
@@ -14,7 +14,6 @@
14
14
  */
15
15
  import type { Theme } from './types/index.js';
16
16
  export { schema } from './themes/schema.js';
17
- export { themePropType } from './utils/theme-prop-type.js';
18
17
  /**
19
18
  * @deprecated
20
19
  *
package/dist/cjs/index.js CHANGED
@@ -47,12 +47,10 @@ var __importStar = (this && this.__importStar) || (function () {
47
47
  };
48
48
  })();
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.light = exports.themePropType = exports.schema = void 0;
50
+ exports.light = exports.schema = void 0;
51
51
  const legacy = __importStar(require("./themes/legacy/light.js"));
52
52
  var schema_js_1 = require("./themes/schema.js");
53
53
  Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return schema_js_1.schema; } });
54
- var theme_prop_type_js_1 = require("./utils/theme-prop-type.js");
55
- Object.defineProperty(exports, "themePropType", { enumerable: true, get: function () { return theme_prop_type_js_1.themePropType; } });
56
54
  /**
57
55
  * @deprecated
58
56
  *
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.validateTokens = validateTokens;
22
22
  exports.createCSSCustomProperties = createCSSCustomProperties;
23
23
  exports.createFontFaceDeclarations = createFontFaceDeclarations;
24
+ /* eslint-disable import/no-extraneous-dependencies */
24
25
  const node_fs_1 = __importDefault(require("node:fs"));
25
26
  const node_path_1 = __importDefault(require("node:path"));
26
27
  const browserslist_1 = __importDefault(require("browserslist"));
@@ -36,7 +37,7 @@ function main() {
36
37
  {
37
38
  type: 'tokens',
38
39
  tokens: [...light_js_1.light, ...shared_js_1.shared],
39
- selectors: [':root'],
40
+ selectors: [':root, ::backdrop'],
40
41
  colorScheme: 'light',
41
42
  },
42
43
  ],
@@ -44,7 +45,7 @@ function main() {
44
45
  {
45
46
  type: 'tokens',
46
47
  tokens: [...dark_js_1.dark, ...shared_js_1.shared],
47
- selectors: [':root'],
48
+ selectors: [':root, ::backdrop'],
48
49
  colorScheme: 'dark',
49
50
  },
50
51
  ],
@@ -68,13 +69,13 @@ function main() {
68
69
  {
69
70
  type: 'tokens',
70
71
  tokens: [...light_js_1.light, ...shared_js_1.shared],
71
- selectors: [':root'],
72
+ selectors: [':root, ::backdrop'],
72
73
  colorScheme: 'light',
73
74
  },
74
75
  {
75
76
  type: 'tokens',
76
77
  tokens: dark_js_1.dark,
77
- selectors: ['@media (prefers-color-scheme: dark)', ':root'],
78
+ selectors: ['@media (prefers-color-scheme: dark)', ':root, ::backdrop'],
78
79
  colorScheme: 'dark',
79
80
  },
80
81
  {
@@ -464,7 +464,7 @@ exports.shared = [
464
464
  },
465
465
  {
466
466
  name: '--cui-z-index-popover',
467
- value: 30,
467
+ value: 1000,
468
468
  type: 'number',
469
469
  },
470
470
  {
@@ -14,7 +14,6 @@
14
14
  */
15
15
  import type { Theme } from './types/index.js';
16
16
  export { schema } from './themes/schema.js';
17
- export { themePropType } from './utils/theme-prop-type.js';
18
17
  /**
19
18
  * @deprecated
20
19
  *
package/dist/es/index.js CHANGED
@@ -14,7 +14,6 @@
14
14
  */
15
15
  import * as legacy from './themes/legacy/light.js';
16
16
  export { schema } from './themes/schema.js';
17
- export { themePropType } from './utils/theme-prop-type.js';
18
17
  /**
19
18
  * @deprecated
20
19
  *
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint-disable import/no-extraneous-dependencies */
16
17
  import fs from 'node:fs';
17
18
  import path from 'node:path';
18
19
  import browserslist from 'browserslist';
@@ -28,7 +29,7 @@ function main() {
28
29
  {
29
30
  type: 'tokens',
30
31
  tokens: [...light, ...shared],
31
- selectors: [':root'],
32
+ selectors: [':root, ::backdrop'],
32
33
  colorScheme: 'light',
33
34
  },
34
35
  ],
@@ -36,7 +37,7 @@ function main() {
36
37
  {
37
38
  type: 'tokens',
38
39
  tokens: [...dark, ...shared],
39
- selectors: [':root'],
40
+ selectors: [':root, ::backdrop'],
40
41
  colorScheme: 'dark',
41
42
  },
42
43
  ],
@@ -60,13 +61,13 @@ function main() {
60
61
  {
61
62
  type: 'tokens',
62
63
  tokens: [...light, ...shared],
63
- selectors: [':root'],
64
+ selectors: [':root, ::backdrop'],
64
65
  colorScheme: 'light',
65
66
  },
66
67
  {
67
68
  type: 'tokens',
68
69
  tokens: dark,
69
- selectors: ['@media (prefers-color-scheme: dark)', ':root'],
70
+ selectors: ['@media (prefers-color-scheme: dark)', ':root, ::backdrop'],
70
71
  colorScheme: 'dark',
71
72
  },
72
73
  {
@@ -461,7 +461,7 @@ export const shared = [
461
461
  },
462
462
  {
463
463
  name: '--cui-z-index-popover',
464
- value: 30,
464
+ value: 1000,
465
465
  type: 'number',
466
466
  },
467
467
  {