@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.
- package/LICENSE +201 -0
- package/README.md +115 -0
- package/dark-scoped.css +140 -0
- package/dark.css +201 -0
- package/dist/cjs/index.d.ts +27 -0
- package/dist/cjs/index.js +55 -0
- package/dist/cjs/scripts/build.d.ts +36 -0
- package/dist/cjs/scripts/build.js +182 -0
- package/dist/cjs/themes/dark.d.ts +555 -0
- package/dist/cjs/themes/dark.js +694 -0
- package/dist/cjs/themes/legacy/light.d.ts +85 -0
- package/dist/cjs/themes/legacy/light.js +196 -0
- package/dist/cjs/themes/light.d.ts +555 -0
- package/dist/cjs/themes/light.js +694 -0
- package/dist/cjs/themes/schema.d.ts +603 -0
- package/dist/cjs/themes/schema.js +243 -0
- package/dist/cjs/themes/shared.d.ts +259 -0
- package/dist/cjs/themes/shared.js +333 -0
- package/dist/cjs/types/index.d.ts +175 -0
- package/dist/cjs/types/index.js +16 -0
- package/dist/cjs/utils/theme-prop-type.d.ts +36 -0
- package/dist/cjs/utils/theme-prop-type.js +162 -0
- package/dist/es/index.d.ts +27 -0
- package/dist/es/index.js +27 -0
- package/dist/es/scripts/build.d.ts +36 -0
- package/dist/es/scripts/build.js +174 -0
- package/dist/es/themes/dark.d.ts +555 -0
- package/dist/es/themes/dark.js +691 -0
- package/dist/es/themes/legacy/light.d.ts +85 -0
- package/dist/es/themes/legacy/light.js +193 -0
- package/dist/es/themes/light.d.ts +555 -0
- package/dist/es/themes/light.js +691 -0
- package/dist/es/themes/schema.d.ts +603 -0
- package/dist/es/themes/schema.js +240 -0
- package/dist/es/themes/shared.d.ts +259 -0
- package/dist/es/themes/shared.js +330 -0
- package/dist/es/types/index.d.ts +175 -0
- package/dist/es/types/index.js +15 -0
- package/dist/es/utils/theme-prop-type.d.ts +36 -0
- package/dist/es/utils/theme-prop-type.js +156 -0
- package/dynamic.css +626 -0
- package/light-scoped.css +140 -0
- package/light.css +201 -0
- 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,193 @@
|
|
|
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
|
+
export const spacings = {
|
|
16
|
+
bit: '4px',
|
|
17
|
+
byte: '8px',
|
|
18
|
+
kilo: '12px',
|
|
19
|
+
mega: '16px',
|
|
20
|
+
giga: '24px',
|
|
21
|
+
tera: '32px',
|
|
22
|
+
peta: '40px',
|
|
23
|
+
exa: '48px',
|
|
24
|
+
zetta: '56px',
|
|
25
|
+
};
|
|
26
|
+
export const iconSizes = {
|
|
27
|
+
kilo: '16px',
|
|
28
|
+
mega: '24px',
|
|
29
|
+
giga: '32px',
|
|
30
|
+
tera: '48px',
|
|
31
|
+
};
|
|
32
|
+
export const borderRadius = {
|
|
33
|
+
bit: '4px',
|
|
34
|
+
byte: '8px',
|
|
35
|
+
kilo: '12px',
|
|
36
|
+
mega: '16px',
|
|
37
|
+
circle: '100%',
|
|
38
|
+
pill: '999999px', // HACK: By providing a very large absolute size, the browser picks the maximum size in one dimension.
|
|
39
|
+
};
|
|
40
|
+
export const borderWidth = {
|
|
41
|
+
kilo: '1px',
|
|
42
|
+
mega: '2px',
|
|
43
|
+
};
|
|
44
|
+
export const typography = {
|
|
45
|
+
headline: {
|
|
46
|
+
one: {
|
|
47
|
+
fontSize: '2rem',
|
|
48
|
+
lineHeight: '2.25rem',
|
|
49
|
+
},
|
|
50
|
+
two: {
|
|
51
|
+
fontSize: '1.5rem',
|
|
52
|
+
lineHeight: '1.75rem',
|
|
53
|
+
},
|
|
54
|
+
three: {
|
|
55
|
+
fontSize: '1.25rem',
|
|
56
|
+
lineHeight: '1.5rem',
|
|
57
|
+
},
|
|
58
|
+
four: {
|
|
59
|
+
fontSize: '1.125rem',
|
|
60
|
+
lineHeight: '1.5rem',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
title: {
|
|
64
|
+
one: {
|
|
65
|
+
fontSize: '7.5rem',
|
|
66
|
+
lineHeight: '7.5rem',
|
|
67
|
+
},
|
|
68
|
+
two: {
|
|
69
|
+
fontSize: '6rem',
|
|
70
|
+
lineHeight: '6rem',
|
|
71
|
+
},
|
|
72
|
+
three: {
|
|
73
|
+
fontSize: '4rem',
|
|
74
|
+
lineHeight: '4rem',
|
|
75
|
+
},
|
|
76
|
+
four: {
|
|
77
|
+
fontSize: '3.5rem',
|
|
78
|
+
lineHeight: '3.5rem',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
subHeadline: {
|
|
82
|
+
fontSize: '0.875rem',
|
|
83
|
+
lineHeight: '1.25rem',
|
|
84
|
+
},
|
|
85
|
+
body: {
|
|
86
|
+
one: {
|
|
87
|
+
fontSize: '1rem',
|
|
88
|
+
lineHeight: '1.5rem',
|
|
89
|
+
},
|
|
90
|
+
two: {
|
|
91
|
+
fontSize: '0.875rem',
|
|
92
|
+
lineHeight: '1.25rem',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
bodyLarge: {
|
|
96
|
+
fontSize: '1.25rem',
|
|
97
|
+
lineHeight: '1.75rem',
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
export const fontStack = {
|
|
101
|
+
default: 'aktiv-grotesk, Helvetica, Arial, system-ui, sans-serif, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
102
|
+
mono: 'Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace',
|
|
103
|
+
};
|
|
104
|
+
export const fontWeight = {
|
|
105
|
+
regular: '400',
|
|
106
|
+
bold: '700',
|
|
107
|
+
};
|
|
108
|
+
export const grid = {
|
|
109
|
+
default: {
|
|
110
|
+
priority: 0,
|
|
111
|
+
breakpoint: 'default',
|
|
112
|
+
cols: 12,
|
|
113
|
+
maxWidth: '880px',
|
|
114
|
+
gutter: spacings.mega,
|
|
115
|
+
},
|
|
116
|
+
untilKilo: {
|
|
117
|
+
priority: 1,
|
|
118
|
+
breakpoint: 'untilKilo',
|
|
119
|
+
cols: 12,
|
|
120
|
+
maxWidth: '400px',
|
|
121
|
+
gutter: spacings.byte,
|
|
122
|
+
},
|
|
123
|
+
kilo: {
|
|
124
|
+
priority: 2,
|
|
125
|
+
breakpoint: 'kilo',
|
|
126
|
+
cols: 12,
|
|
127
|
+
maxWidth: '600px',
|
|
128
|
+
gutter: spacings.mega,
|
|
129
|
+
},
|
|
130
|
+
mega: {
|
|
131
|
+
priority: 3,
|
|
132
|
+
breakpoint: 'mega',
|
|
133
|
+
cols: 12,
|
|
134
|
+
maxWidth: '760px',
|
|
135
|
+
gutter: spacings.giga,
|
|
136
|
+
},
|
|
137
|
+
giga: {
|
|
138
|
+
priority: 4,
|
|
139
|
+
breakpoint: 'giga',
|
|
140
|
+
cols: 12,
|
|
141
|
+
maxWidth: '880px',
|
|
142
|
+
gutter: spacings.giga,
|
|
143
|
+
},
|
|
144
|
+
tera: {
|
|
145
|
+
priority: 5,
|
|
146
|
+
breakpoint: 'tera',
|
|
147
|
+
cols: 12,
|
|
148
|
+
maxWidth: '1200px',
|
|
149
|
+
gutter: spacings.giga,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
export const breakpoints = {
|
|
153
|
+
untilKilo: '(max-width: 479px)',
|
|
154
|
+
kilo: '(min-width: 480px)',
|
|
155
|
+
kiloToMega: '(min-width: 480px) and (max-width: 767px)',
|
|
156
|
+
mega: '(min-width: 768px)',
|
|
157
|
+
untilMega: '(max-width: 767px)',
|
|
158
|
+
megaToGiga: '(min-width: 768px) and (max-width: 959px)',
|
|
159
|
+
giga: '(min-width: 960px)',
|
|
160
|
+
untilGiga: '(max-width: 959px)',
|
|
161
|
+
gigaToTera: '(min-width: 960px) and (max-width: 1279px)',
|
|
162
|
+
tera: '(min-width: 1280px)',
|
|
163
|
+
untilTera: '(max-width: 1279px)',
|
|
164
|
+
};
|
|
165
|
+
export const mq = {
|
|
166
|
+
untilKilo: '@media (max-width: 479px)',
|
|
167
|
+
kilo: '@media (min-width: 480px)',
|
|
168
|
+
kiloToMega: '@media (min-width: 480px) and (max-width: 767px)',
|
|
169
|
+
mega: '@media (min-width: 768px)',
|
|
170
|
+
untilMega: '@media (max-width: 767px)',
|
|
171
|
+
megaToGiga: '@media (min-width: 768px) and (max-width: 959px)',
|
|
172
|
+
giga: '@media (min-width: 960px)',
|
|
173
|
+
untilGiga: '@media (max-width: 959px)',
|
|
174
|
+
gigaToTera: '@media (min-width: 960px) and (max-width: 1279px)',
|
|
175
|
+
tera: '@media (min-width: 1280px)',
|
|
176
|
+
untilTera: '@media (max-width: 1279px)',
|
|
177
|
+
};
|
|
178
|
+
export const transitions = {
|
|
179
|
+
default: '120ms ease-in-out',
|
|
180
|
+
slow: '300ms ease-in-out',
|
|
181
|
+
};
|
|
182
|
+
export const zIndex = {
|
|
183
|
+
default: 0,
|
|
184
|
+
absolute: 1,
|
|
185
|
+
input: 20,
|
|
186
|
+
popover: 30,
|
|
187
|
+
tooltip: 40,
|
|
188
|
+
header: 600,
|
|
189
|
+
backdrop: 700,
|
|
190
|
+
navigation: 800,
|
|
191
|
+
modal: 1000,
|
|
192
|
+
toast: 1100,
|
|
193
|
+
};
|