@sumup-oss/design-tokens 8.0.0-next.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.
Files changed (44) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +115 -0
  3. package/dark-scoped.css +140 -0
  4. package/dark.css +201 -0
  5. package/dist/cjs/index.d.ts +27 -0
  6. package/dist/cjs/index.js +55 -0
  7. package/dist/cjs/scripts/build.d.ts +36 -0
  8. package/dist/cjs/scripts/build.js +182 -0
  9. package/dist/cjs/themes/dark.d.ts +555 -0
  10. package/dist/cjs/themes/dark.js +694 -0
  11. package/dist/cjs/themes/legacy/light.d.ts +85 -0
  12. package/dist/cjs/themes/legacy/light.js +196 -0
  13. package/dist/cjs/themes/light.d.ts +555 -0
  14. package/dist/cjs/themes/light.js +694 -0
  15. package/dist/cjs/themes/schema.d.ts +603 -0
  16. package/dist/cjs/themes/schema.js +243 -0
  17. package/dist/cjs/themes/shared.d.ts +259 -0
  18. package/dist/cjs/themes/shared.js +333 -0
  19. package/dist/cjs/types/index.d.ts +175 -0
  20. package/dist/cjs/types/index.js +16 -0
  21. package/dist/cjs/utils/theme-prop-type.d.ts +36 -0
  22. package/dist/cjs/utils/theme-prop-type.js +162 -0
  23. package/dist/es/index.d.ts +27 -0
  24. package/dist/es/index.js +27 -0
  25. package/dist/es/scripts/build.d.ts +36 -0
  26. package/dist/es/scripts/build.js +174 -0
  27. package/dist/es/themes/dark.d.ts +555 -0
  28. package/dist/es/themes/dark.js +691 -0
  29. package/dist/es/themes/legacy/light.d.ts +85 -0
  30. package/dist/es/themes/legacy/light.js +193 -0
  31. package/dist/es/themes/light.d.ts +555 -0
  32. package/dist/es/themes/light.js +691 -0
  33. package/dist/es/themes/schema.d.ts +603 -0
  34. package/dist/es/themes/schema.js +240 -0
  35. package/dist/es/themes/shared.d.ts +259 -0
  36. package/dist/es/themes/shared.js +330 -0
  37. package/dist/es/types/index.d.ts +175 -0
  38. package/dist/es/types/index.js +15 -0
  39. package/dist/es/utils/theme-prop-type.d.ts +36 -0
  40. package/dist/es/utils/theme-prop-type.js +156 -0
  41. package/dynamic.css +626 -0
  42. package/light-scoped.css +140 -0
  43. package/light.css +201 -0
  44. package/package.json +44 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Copyright 2020, SumUp Ltd.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+ import type { Spacings, IconSizes, BorderRadius, BorderWidth, FontStack, FontWeight, Grid, Breakpoints, MediaQueries, ZIndex } from '../../types/index.js';
16
+ export declare const spacings: Spacings;
17
+ export declare const iconSizes: IconSizes;
18
+ export declare const borderRadius: BorderRadius;
19
+ export declare const borderWidth: BorderWidth;
20
+ export declare const typography: {
21
+ headline: {
22
+ one: {
23
+ fontSize: string;
24
+ lineHeight: string;
25
+ };
26
+ two: {
27
+ fontSize: string;
28
+ lineHeight: string;
29
+ };
30
+ three: {
31
+ fontSize: string;
32
+ lineHeight: string;
33
+ };
34
+ four: {
35
+ fontSize: string;
36
+ lineHeight: string;
37
+ };
38
+ };
39
+ title: {
40
+ one: {
41
+ fontSize: string;
42
+ lineHeight: string;
43
+ };
44
+ two: {
45
+ fontSize: string;
46
+ lineHeight: string;
47
+ };
48
+ three: {
49
+ fontSize: string;
50
+ lineHeight: string;
51
+ };
52
+ four: {
53
+ fontSize: string;
54
+ lineHeight: string;
55
+ };
56
+ };
57
+ subHeadline: {
58
+ fontSize: string;
59
+ lineHeight: string;
60
+ };
61
+ body: {
62
+ one: {
63
+ fontSize: string;
64
+ lineHeight: string;
65
+ };
66
+ two: {
67
+ fontSize: string;
68
+ lineHeight: string;
69
+ };
70
+ };
71
+ bodyLarge: {
72
+ fontSize: string;
73
+ lineHeight: string;
74
+ };
75
+ };
76
+ export declare const fontStack: FontStack;
77
+ export declare const fontWeight: FontWeight;
78
+ export declare const grid: Grid;
79
+ export declare const breakpoints: Breakpoints;
80
+ export declare const mq: MediaQueries;
81
+ export declare const transitions: {
82
+ default: string;
83
+ slow: string;
84
+ };
85
+ export declare const zIndex: ZIndex;
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2020, SumUp Ltd.
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.zIndex = exports.transitions = exports.mq = exports.breakpoints = exports.grid = exports.fontWeight = exports.fontStack = exports.typography = exports.borderWidth = exports.borderRadius = exports.iconSizes = exports.spacings = void 0;
18
+ exports.spacings = {
19
+ bit: '4px',
20
+ byte: '8px',
21
+ kilo: '12px',
22
+ mega: '16px',
23
+ giga: '24px',
24
+ tera: '32px',
25
+ peta: '40px',
26
+ exa: '48px',
27
+ zetta: '56px',
28
+ };
29
+ exports.iconSizes = {
30
+ kilo: '16px',
31
+ mega: '24px',
32
+ giga: '32px',
33
+ tera: '48px',
34
+ };
35
+ exports.borderRadius = {
36
+ bit: '4px',
37
+ byte: '8px',
38
+ kilo: '12px',
39
+ mega: '16px',
40
+ circle: '100%',
41
+ pill: '999999px', // HACK: By providing a very large absolute size, the browser picks the maximum size in one dimension.
42
+ };
43
+ exports.borderWidth = {
44
+ kilo: '1px',
45
+ mega: '2px',
46
+ };
47
+ exports.typography = {
48
+ headline: {
49
+ one: {
50
+ fontSize: '2rem',
51
+ lineHeight: '2.25rem',
52
+ },
53
+ two: {
54
+ fontSize: '1.5rem',
55
+ lineHeight: '1.75rem',
56
+ },
57
+ three: {
58
+ fontSize: '1.25rem',
59
+ lineHeight: '1.5rem',
60
+ },
61
+ four: {
62
+ fontSize: '1.125rem',
63
+ lineHeight: '1.5rem',
64
+ },
65
+ },
66
+ title: {
67
+ one: {
68
+ fontSize: '7.5rem',
69
+ lineHeight: '7.5rem',
70
+ },
71
+ two: {
72
+ fontSize: '6rem',
73
+ lineHeight: '6rem',
74
+ },
75
+ three: {
76
+ fontSize: '4rem',
77
+ lineHeight: '4rem',
78
+ },
79
+ four: {
80
+ fontSize: '3.5rem',
81
+ lineHeight: '3.5rem',
82
+ },
83
+ },
84
+ subHeadline: {
85
+ fontSize: '0.875rem',
86
+ lineHeight: '1.25rem',
87
+ },
88
+ body: {
89
+ one: {
90
+ fontSize: '1rem',
91
+ lineHeight: '1.5rem',
92
+ },
93
+ two: {
94
+ fontSize: '0.875rem',
95
+ lineHeight: '1.25rem',
96
+ },
97
+ },
98
+ bodyLarge: {
99
+ fontSize: '1.25rem',
100
+ lineHeight: '1.75rem',
101
+ },
102
+ };
103
+ exports.fontStack = {
104
+ default: 'aktiv-grotesk, Helvetica, Arial, system-ui, sans-serif, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
105
+ mono: 'Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace',
106
+ };
107
+ exports.fontWeight = {
108
+ regular: '400',
109
+ bold: '700',
110
+ };
111
+ exports.grid = {
112
+ default: {
113
+ priority: 0,
114
+ breakpoint: 'default',
115
+ cols: 12,
116
+ maxWidth: '880px',
117
+ gutter: exports.spacings.mega,
118
+ },
119
+ untilKilo: {
120
+ priority: 1,
121
+ breakpoint: 'untilKilo',
122
+ cols: 12,
123
+ maxWidth: '400px',
124
+ gutter: exports.spacings.byte,
125
+ },
126
+ kilo: {
127
+ priority: 2,
128
+ breakpoint: 'kilo',
129
+ cols: 12,
130
+ maxWidth: '600px',
131
+ gutter: exports.spacings.mega,
132
+ },
133
+ mega: {
134
+ priority: 3,
135
+ breakpoint: 'mega',
136
+ cols: 12,
137
+ maxWidth: '760px',
138
+ gutter: exports.spacings.giga,
139
+ },
140
+ giga: {
141
+ priority: 4,
142
+ breakpoint: 'giga',
143
+ cols: 12,
144
+ maxWidth: '880px',
145
+ gutter: exports.spacings.giga,
146
+ },
147
+ tera: {
148
+ priority: 5,
149
+ breakpoint: 'tera',
150
+ cols: 12,
151
+ maxWidth: '1200px',
152
+ gutter: exports.spacings.giga,
153
+ },
154
+ };
155
+ exports.breakpoints = {
156
+ untilKilo: '(max-width: 479px)',
157
+ kilo: '(min-width: 480px)',
158
+ kiloToMega: '(min-width: 480px) and (max-width: 767px)',
159
+ mega: '(min-width: 768px)',
160
+ untilMega: '(max-width: 767px)',
161
+ megaToGiga: '(min-width: 768px) and (max-width: 959px)',
162
+ giga: '(min-width: 960px)',
163
+ untilGiga: '(max-width: 959px)',
164
+ gigaToTera: '(min-width: 960px) and (max-width: 1279px)',
165
+ tera: '(min-width: 1280px)',
166
+ untilTera: '(max-width: 1279px)',
167
+ };
168
+ exports.mq = {
169
+ untilKilo: '@media (max-width: 479px)',
170
+ kilo: '@media (min-width: 480px)',
171
+ kiloToMega: '@media (min-width: 480px) and (max-width: 767px)',
172
+ mega: '@media (min-width: 768px)',
173
+ untilMega: '@media (max-width: 767px)',
174
+ megaToGiga: '@media (min-width: 768px) and (max-width: 959px)',
175
+ giga: '@media (min-width: 960px)',
176
+ untilGiga: '@media (max-width: 959px)',
177
+ gigaToTera: '@media (min-width: 960px) and (max-width: 1279px)',
178
+ tera: '@media (min-width: 1280px)',
179
+ untilTera: '@media (max-width: 1279px)',
180
+ };
181
+ exports.transitions = {
182
+ default: '120ms ease-in-out',
183
+ slow: '300ms ease-in-out',
184
+ };
185
+ exports.zIndex = {
186
+ default: 0,
187
+ absolute: 1,
188
+ input: 20,
189
+ popover: 30,
190
+ tooltip: 40,
191
+ header: 600,
192
+ backdrop: 700,
193
+ navigation: 800,
194
+ modal: 1000,
195
+ toast: 1100,
196
+ };