@ttoss/theme 1.4.30 → 1.4.31
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 +674 -0
- package/dist/esm/{chunk-NBEPUG6F.js → chunk-7HGXJKZ3.js} +73 -60
- package/dist/esm/index.js +1 -1
- package/dist/esm/themes/Bruttal/Bruttal.js +1 -1
- package/dist/index.js +73 -60
- package/dist/themes/Bruttal/Bruttal.js +73 -60
- package/package.json +9 -10
- package/src/helpers/geometricCalc.ts +23 -0
- package/src/themes/Bruttal/BruttalTheme.ts +31 -24
- package/src/tokens/fontSizes.ts +16 -12
- package/src/tokens/letterSpacings.ts +4 -4
- package/src/tokens/space.ts +20 -21
|
@@ -100,12 +100,13 @@ export const BruttalTheme: Theme = {
|
|
|
100
100
|
underemphasize: coreColors.gray300,
|
|
101
101
|
},
|
|
102
102
|
fonts: {
|
|
103
|
-
h1: coreFonts.contrast,
|
|
104
|
-
h2: coreFonts.contrast,
|
|
105
|
-
h3: coreFonts.contrast,
|
|
106
|
-
h4: coreFonts.contrast,
|
|
107
|
-
h5: coreFonts.contrast,
|
|
108
|
-
h6: coreFonts.contrast,
|
|
103
|
+
// h1: coreFonts.contrast,
|
|
104
|
+
// h2: coreFonts.contrast,
|
|
105
|
+
// h3: coreFonts.contrast,
|
|
106
|
+
// h4: coreFonts.contrast,
|
|
107
|
+
// h5: coreFonts.contrast,
|
|
108
|
+
// h6: coreFonts.contrast,
|
|
109
|
+
contrast: coreFonts.contrast,
|
|
109
110
|
body: coreFonts.main,
|
|
110
111
|
highlight: coreFonts.main,
|
|
111
112
|
caption: coreFonts.main,
|
|
@@ -155,6 +156,7 @@ export const BruttalTheme: Theme = {
|
|
|
155
156
|
a: {
|
|
156
157
|
color: 'text',
|
|
157
158
|
fontFamily: 'body',
|
|
159
|
+
textDecorationLine: 'underline',
|
|
158
160
|
'&.quiet:not(:hover)': {
|
|
159
161
|
textDecorationLine: 'none',
|
|
160
162
|
},
|
|
@@ -543,34 +545,39 @@ export const BruttalTheme: Theme = {
|
|
|
543
545
|
},
|
|
544
546
|
},
|
|
545
547
|
h1: {
|
|
546
|
-
fontFamily: '
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
fontFamily: 'contrast',
|
|
549
|
+
fontWeight: 'extraBold',
|
|
550
|
+
lineHeight: 'base',
|
|
551
|
+
fontSize: '3xl',
|
|
552
|
+
letterSpacing: 'regular',
|
|
550
553
|
},
|
|
551
554
|
h2: {
|
|
552
|
-
fontFamily: '
|
|
553
|
-
fontSize: '5xl',
|
|
555
|
+
fontFamily: 'contrast',
|
|
554
556
|
fontWeight: 'bold',
|
|
555
|
-
|
|
557
|
+
lineHeight: 'base',
|
|
558
|
+
fontSize: '2xl',
|
|
559
|
+
letterSpacing: 'regular',
|
|
556
560
|
},
|
|
557
561
|
h3: {
|
|
558
|
-
fontFamily: '
|
|
559
|
-
fontSize: '4xl',
|
|
562
|
+
fontFamily: 'contrast',
|
|
560
563
|
fontWeight: 'bold',
|
|
561
|
-
|
|
564
|
+
lineHeight: 'base',
|
|
565
|
+
fontSize: 'xl',
|
|
566
|
+
letterSpacing: 'regular',
|
|
562
567
|
},
|
|
563
568
|
h4: {
|
|
564
|
-
fontFamily: '
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
569
|
+
fontFamily: 'contrast',
|
|
570
|
+
fontWeight: 'semiBold',
|
|
571
|
+
lineHeight: 'base',
|
|
572
|
+
fontSize: 'lg',
|
|
573
|
+
letterSpacing: 'regular',
|
|
568
574
|
},
|
|
569
575
|
h5: {
|
|
570
|
-
fontFamily: '
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
576
|
+
fontFamily: 'contrast',
|
|
577
|
+
fontWeight: 'semiBold',
|
|
578
|
+
lineHeight: 'base',
|
|
579
|
+
fontSize: 'base',
|
|
580
|
+
letterSpacing: 'regular',
|
|
574
581
|
},
|
|
575
582
|
},
|
|
576
583
|
};
|
package/src/tokens/fontSizes.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { calcMultiplyingValues } from '../helpers/geometricCalc';
|
|
2
|
+
|
|
3
|
+
const SIZE_TYPE = 'rem';
|
|
4
|
+
|
|
5
|
+
const BASE = 1;
|
|
2
6
|
|
|
3
7
|
const MULTIPLIER_FACTOR = 1.333;
|
|
4
8
|
|
|
5
9
|
export const fontSizes = {
|
|
6
|
-
'2xs':
|
|
7
|
-
xs:
|
|
8
|
-
sm:
|
|
9
|
-
base: BASE
|
|
10
|
-
lg:
|
|
11
|
-
xl:
|
|
12
|
-
'2xl':
|
|
13
|
-
'3xl':
|
|
14
|
-
'4xl':
|
|
15
|
-
'5xl':
|
|
16
|
-
'6xl':
|
|
10
|
+
'2xs': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -3),
|
|
11
|
+
xs: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -2),
|
|
12
|
+
sm: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -1),
|
|
13
|
+
base: `${BASE}${SIZE_TYPE}`,
|
|
14
|
+
lg: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 1),
|
|
15
|
+
xl: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 2),
|
|
16
|
+
'2xl': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 3),
|
|
17
|
+
'3xl': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 4),
|
|
18
|
+
'4xl': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 5),
|
|
19
|
+
'5xl': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 6),
|
|
20
|
+
'6xl': calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 7),
|
|
17
21
|
};
|
package/src/tokens/space.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
calcDividingValues,
|
|
3
|
+
calcMultiplyingValues,
|
|
4
|
+
} from '../helpers/geometricCalc';
|
|
2
5
|
|
|
3
|
-
const
|
|
6
|
+
const SIZE_TYPE = 'rem';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return MULTIPLIER_FACTOR;
|
|
9
|
-
})
|
|
10
|
-
.join(' * ');
|
|
11
|
-
};
|
|
8
|
+
const MD = 0.5;
|
|
9
|
+
|
|
10
|
+
const MULTIPLIER_FACTOR = 1.618;
|
|
12
11
|
|
|
13
12
|
export const space = {
|
|
14
13
|
none: 0,
|
|
15
|
-
'2xs':
|
|
16
|
-
xs:
|
|
17
|
-
sm:
|
|
18
|
-
md: MD
|
|
19
|
-
lg:
|
|
20
|
-
xl:
|
|
21
|
-
'2xl':
|
|
22
|
-
'3xl':
|
|
23
|
-
'4xl':
|
|
24
|
-
'5xl':
|
|
25
|
-
'6xl':
|
|
26
|
-
'7xl':
|
|
14
|
+
'2xs': calcDividingValues(MD, MULTIPLIER_FACTOR, 3),
|
|
15
|
+
xs: calcDividingValues(MD, MULTIPLIER_FACTOR, 2),
|
|
16
|
+
sm: calcDividingValues(MD, MULTIPLIER_FACTOR, 1),
|
|
17
|
+
md: `${MD}${SIZE_TYPE}`,
|
|
18
|
+
lg: calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 1),
|
|
19
|
+
xl: calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 2),
|
|
20
|
+
'2xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 3),
|
|
21
|
+
'3xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 4),
|
|
22
|
+
'4xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 5),
|
|
23
|
+
'5xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 6),
|
|
24
|
+
'6xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 7),
|
|
25
|
+
'7xl': calcMultiplyingValues(MD, MULTIPLIER_FACTOR, 8),
|
|
27
26
|
};
|