@ttoss/theme 1.7.21 → 1.7.23
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 +21 -674
- package/dist/esm/chunk-ZELVNPEV.js +1531 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/themes/Bruttal/Bruttal.js +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/themes/Bruttal/Bruttal.d.ts +13 -0
- package/package.json +7 -8
- package/src/createTheme.ts +0 -7
- package/src/helpers/geometricCalc.ts +0 -23
- package/src/index.ts +0 -1
- package/src/themes/Bruttal/Bruttal.ts +0 -5
- package/src/themes/Bruttal/BruttalFonts.ts +0 -5
- package/src/themes/Bruttal/BruttalIcons.ts +0 -130
- package/src/themes/Bruttal/BruttalTheme.ts +0 -568
- package/src/tokens/fontSizes.ts +0 -21
- package/src/tokens/fontWeights.ts +0 -10
- package/src/tokens/letterSpacings.ts +0 -8
- package/src/tokens/lineHeights.ts +0 -21
- package/src/tokens/space.ts +0 -26
- package/src/tokens/zIndices.ts +0 -91
- package/tsconfig.json +0 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { BruttalTheme } from "./chunk-ZELVNPEV.js";
|
|
3
|
+
|
|
4
|
+
// src/createTheme.ts
|
|
5
|
+
import deepmerge from "deepmerge";
|
|
6
|
+
var createTheme = theme => {
|
|
7
|
+
return deepmerge(BruttalTheme, theme);
|
|
8
|
+
};
|
|
9
|
+
export { createTheme };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconifyIcon } from '@ttoss/react-icons';
|
|
2
|
+
import { Theme } from 'theme-ui';
|
|
3
|
+
|
|
4
|
+
declare const BrutalIcons: Record<string, IconifyIcon | {
|
|
5
|
+
__esModule: true;
|
|
6
|
+
default: IconifyIcon;
|
|
7
|
+
}>;
|
|
8
|
+
|
|
9
|
+
declare const BruttalFonts: string[];
|
|
10
|
+
|
|
11
|
+
declare const BruttalTheme: Theme;
|
|
12
|
+
|
|
13
|
+
export { BrutalIcons, BruttalFonts, BruttalTheme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/theme",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.23",
|
|
4
4
|
"description": "Theme for packages.",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"author": "ttoss",
|
|
6
7
|
"contributors": [
|
|
7
8
|
"Rayza Oliveira <rayza.ocr@gmail.com>"
|
|
@@ -23,16 +24,14 @@
|
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
"files": [
|
|
26
|
-
"dist"
|
|
27
|
-
"src",
|
|
28
|
-
"tsconfig.json"
|
|
27
|
+
"dist"
|
|
29
28
|
],
|
|
30
29
|
"sideEffects": true,
|
|
31
30
|
"dependencies": {
|
|
32
31
|
"deepmerge": "^4.3.1"
|
|
33
32
|
},
|
|
34
33
|
"peerDependencies": {
|
|
35
|
-
"@ttoss/react-icons": "^0.4.
|
|
34
|
+
"@ttoss/react-icons": "^0.4.4"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"@iconify/icons-carbon": "^1.2.20",
|
|
@@ -41,9 +40,9 @@
|
|
|
41
40
|
"jest": "^29.7.0",
|
|
42
41
|
"theme-ui": "^0.16.2",
|
|
43
42
|
"tsup": "^8.3.0",
|
|
44
|
-
"@ttoss/config": "^1.
|
|
45
|
-
"@ttoss/
|
|
46
|
-
"@ttoss/
|
|
43
|
+
"@ttoss/config": "^1.34.1",
|
|
44
|
+
"@ttoss/react-icons": "^0.4.4",
|
|
45
|
+
"@ttoss/test-utils": "^2.1.17"
|
|
47
46
|
},
|
|
48
47
|
"keywords": [],
|
|
49
48
|
"publishConfig": {
|
package/src/createTheme.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const SIZE_TYPE = 'rem';
|
|
2
|
-
|
|
3
|
-
export const calcMultiplyingValues = (
|
|
4
|
-
initialValue: number,
|
|
5
|
-
base: number,
|
|
6
|
-
ratio: number,
|
|
7
|
-
sizeType = SIZE_TYPE
|
|
8
|
-
) => {
|
|
9
|
-
const result = initialValue * Math.pow(base, ratio);
|
|
10
|
-
|
|
11
|
-
return `${result.toFixed(2)}${sizeType}`;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const calcDividingValues = (
|
|
15
|
-
initialValue: number,
|
|
16
|
-
base: number,
|
|
17
|
-
ratio: number,
|
|
18
|
-
sizeType = SIZE_TYPE
|
|
19
|
-
) => {
|
|
20
|
-
const result = initialValue / Math.pow(base, ratio);
|
|
21
|
-
|
|
22
|
-
return `${result.toFixed(2)}${sizeType}`;
|
|
23
|
-
};
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createTheme } from './createTheme';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const BruttalFonts = [
|
|
2
|
-
'https://fonts.googleapis.com/css?family=Inconsolata:wght@100;200;300;400;500;700;800;900',
|
|
3
|
-
'https://fonts.googleapis.com/css?family=Work+Sans:wght@0,400;0,700;1,400;1,700&display=swap',
|
|
4
|
-
'https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap',
|
|
5
|
-
];
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { IconifyIcon, addIcon } from '@ttoss/react-icons';
|
|
2
|
-
import addFilledIcon from '@iconify/icons-carbon/add-filled';
|
|
3
|
-
import arrowRightIcon from '@iconify/icons-carbon/arrow-right';
|
|
4
|
-
import arrowUpRightIcon from '@iconify/icons-carbon/arrow-up-right';
|
|
5
|
-
import attachmentIcon from '@iconify/icons-carbon/attachment';
|
|
6
|
-
import calendarIcon from '@iconify/icons-carbon/calendar';
|
|
7
|
-
import caretDownIcon from '@iconify/icons-carbon/caret-down';
|
|
8
|
-
import caretUpIcon from '@iconify/icons-carbon/caret-up';
|
|
9
|
-
import checkMarkIcon from '@iconify/icons-carbon/checkmark';
|
|
10
|
-
import checkMarkOutlineIcon from '@iconify/icons-carbon/checkmark-outline';
|
|
11
|
-
import checkboxCheckedFilled from '@iconify/icons-carbon/checkbox-checked-filled';
|
|
12
|
-
import checkboxIcon from '@iconify/icons-carbon/checkbox';
|
|
13
|
-
import checkboxIndeterminateFilledIcon from '@iconify/icons-carbon/checkbox-indeterminate-filled';
|
|
14
|
-
import chevronDownIcon from '@iconify/icons-carbon/chevron-down';
|
|
15
|
-
import chevronLeftIcon from '@iconify/icons-carbon/chevron-left';
|
|
16
|
-
import chevronRightIcon from '@iconify/icons-carbon/chevron-right';
|
|
17
|
-
import chevronUpIcon from '@iconify/icons-carbon/chevron-up';
|
|
18
|
-
import closeFilledIcon from '@iconify/icons-carbon/close-filled';
|
|
19
|
-
import closeIcon from '@iconify/icons-carbon/close';
|
|
20
|
-
import copyIcon from '@iconify/icons-carbon/copy';
|
|
21
|
-
import downloadIcon from '@iconify/icons-carbon/download';
|
|
22
|
-
import editIcon from '@iconify/icons-carbon/edit';
|
|
23
|
-
import emailIcon from '@iconify/icons-carbon/email';
|
|
24
|
-
import errorFilledIcon from '@iconify/icons-carbon/error-filled';
|
|
25
|
-
import informationFilledIcon from '@iconify/icons-carbon/information-filled';
|
|
26
|
-
import languageIcon from '@iconify/icons-carbon/language';
|
|
27
|
-
import loadingIcon from '@iconify/icons-eos-icons/loading';
|
|
28
|
-
import menuIcon from '@iconify/icons-carbon/menu';
|
|
29
|
-
import pasteIcon from '@iconify/icons-carbon/paste';
|
|
30
|
-
import radioButtonCheckedIcon from '@iconify/icons-carbon/radio-button-checked';
|
|
31
|
-
import radioButtonIcon from '@iconify/icons-carbon/radio-button';
|
|
32
|
-
import renewIcon from '@iconify/icons-carbon/renew';
|
|
33
|
-
import searchIcon from '@iconify/icons-carbon/search';
|
|
34
|
-
import shareIcon from '@iconify/icons-carbon/share';
|
|
35
|
-
import successCircleIcon from '@iconify/icons-mdi/success-circle';
|
|
36
|
-
import threeDotsLoadingIcon from '@iconify/icons-eos-icons/three-dots-loading';
|
|
37
|
-
import timeIcon from '@iconify/icons-carbon/time';
|
|
38
|
-
import trashCanIcon from '@iconify/icons-carbon/trash-can';
|
|
39
|
-
import uploadIcon from '@iconify/icons-carbon/upload';
|
|
40
|
-
import userAvatarFilledAltIcon from '@iconify/icons-carbon/user-avatar-filled-alt';
|
|
41
|
-
import viewFilledIcon from '@iconify/icons-carbon/view-filled';
|
|
42
|
-
import viewOffFilledIcon from '@iconify/icons-carbon/view-off-filled';
|
|
43
|
-
import warningAltIcon from '@iconify/icons-carbon/warning-alt';
|
|
44
|
-
import warningFilledIcon from '@iconify/icons-carbon/warning-filled';
|
|
45
|
-
|
|
46
|
-
const replicateIcon: IconifyIcon = {
|
|
47
|
-
body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
-
<path d="M42 15V42H15V15H42ZM42 12H15C14.2044 12 13.4413 12.3161 12.8787 12.8787C12.3161 13.4413 12 14.2044 12 15V42C12 42.7956 12.3161 43.5587 12.8787 44.1213C13.4413 44.6839 14.2044 45 15 45H42C42.7956 45 43.5587 44.6839 44.1213 44.1213C44.6839 43.5587 45 42.7956 45 42V15C45 14.2044 44.6839 13.4413 44.1213 12.8787C43.5587 12.3161 42.7956 12 42 12Z" fill="currentColor"/>
|
|
49
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 5.76389C3 4.23744 4.26071 3 5.81588 3H29V5.57963H5.81588C5.71221 5.57963 5.62816 5.66213 5.62816 5.76389V28.994C5.62816 29.0957 5.71221 29.1782 5.81588 29.1782H22.2607L18.7784 25.7602L20.6368 23.9361L27.2916 30.4681L20.6368 37L18.7784 35.1759L22.2607 31.7579H5.81588C4.26071 31.7579 3 30.5204 3 28.994V5.76389Z" fill="currentColor"/>
|
|
50
|
-
</svg>`,
|
|
51
|
-
width: 48,
|
|
52
|
-
height: 48,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const subtractIcon: IconifyIcon = {
|
|
56
|
-
body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
57
|
-
<path d="M14 26H34V22H14V26ZM24 44C21.2333 44 18.6333 43.4747 16.2 42.424C13.7667 41.3733 11.65 39.9487 9.85 38.15C8.05 36.35 6.62533 34.2333 5.576 31.8C4.52667 29.3667 4.00133 26.7667 4 24C4 21.2333 4.52533 18.6333 5.576 16.2C6.62667 13.7667 8.05133 11.65 9.85 9.85C11.65 8.05 13.7667 6.62533 16.2 5.576C18.6333 4.52667 21.2333 4.00133 24 4C26.7667 4 29.3667 4.52533 31.8 5.576C34.2333 6.62667 36.35 8.05133 38.15 9.85C39.95 11.65 41.3753 13.7667 42.426 16.2C43.4767 18.6333 44.0013 21.2333 44 24C44 26.7667 43.4747 29.3667 42.424 31.8C41.3733 34.2333 39.9487 36.35 38.15 38.15C36.35 39.95 34.2333 41.3753 31.8 42.426C29.3667 43.4767 26.7667 44.0013 24 44Z" fill="black"/>
|
|
58
|
-
</svg>
|
|
59
|
-
`,
|
|
60
|
-
width: 48,
|
|
61
|
-
height: 48,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const BrutalIcons: Record<
|
|
65
|
-
string,
|
|
66
|
-
| IconifyIcon
|
|
67
|
-
| {
|
|
68
|
-
__esModule: true;
|
|
69
|
-
default: IconifyIcon;
|
|
70
|
-
}
|
|
71
|
-
> = {
|
|
72
|
-
add: addFilledIcon,
|
|
73
|
-
'arrow-right': arrowRightIcon,
|
|
74
|
-
attachment: attachmentIcon,
|
|
75
|
-
avatar: userAvatarFilledAltIcon,
|
|
76
|
-
'caret-down': caretDownIcon,
|
|
77
|
-
'caret-up': caretUpIcon,
|
|
78
|
-
calendar: calendarIcon,
|
|
79
|
-
'checkbox-checked': checkboxCheckedFilled,
|
|
80
|
-
'checkbox-indeterminate': checkboxIndeterminateFilledIcon,
|
|
81
|
-
'checkbox-unchecked': checkboxIcon,
|
|
82
|
-
check: checkMarkIcon,
|
|
83
|
-
'check-mark': checkMarkOutlineIcon,
|
|
84
|
-
close: closeIcon,
|
|
85
|
-
copy: copyIcon,
|
|
86
|
-
download: downloadIcon,
|
|
87
|
-
edit: editIcon,
|
|
88
|
-
email: emailIcon,
|
|
89
|
-
delete: trashCanIcon,
|
|
90
|
-
error: errorFilledIcon,
|
|
91
|
-
info: informationFilledIcon,
|
|
92
|
-
language: languageIcon,
|
|
93
|
-
loading: loadingIcon,
|
|
94
|
-
'menu-open': menuIcon,
|
|
95
|
-
'open-link': arrowUpRightIcon,
|
|
96
|
-
paste: pasteIcon,
|
|
97
|
-
'picker-down': chevronDownIcon,
|
|
98
|
-
'picker-up': chevronUpIcon,
|
|
99
|
-
'nav-left': chevronLeftIcon,
|
|
100
|
-
'nav-right': chevronRightIcon,
|
|
101
|
-
'radio-not-selected': radioButtonIcon,
|
|
102
|
-
'radio-selected': radioButtonCheckedIcon,
|
|
103
|
-
refresh: renewIcon,
|
|
104
|
-
replicate: replicateIcon,
|
|
105
|
-
search: searchIcon,
|
|
106
|
-
share: shareIcon,
|
|
107
|
-
subtract: subtractIcon,
|
|
108
|
-
'success-circle': successCircleIcon,
|
|
109
|
-
'small-close': closeFilledIcon,
|
|
110
|
-
'three-dots-loading': threeDotsLoadingIcon,
|
|
111
|
-
time: timeIcon,
|
|
112
|
-
upload: uploadIcon,
|
|
113
|
-
'view-off': viewOffFilledIcon,
|
|
114
|
-
'view-on': viewFilledIcon,
|
|
115
|
-
warning: warningFilledIcon,
|
|
116
|
-
'warning-alt': warningAltIcon,
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
Object.entries(BrutalIcons).forEach(([key, icon]) => {
|
|
120
|
-
/**
|
|
121
|
-
* "It happens when an ES module imports a CommonJS module with the default property present and the __esModule property set to true."
|
|
122
|
-
* https://github.com/evanw/esbuild/issues/1719#issuecomment-953470495
|
|
123
|
-
*/
|
|
124
|
-
if ('default' in icon) {
|
|
125
|
-
addIcon(key, icon.default);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
addIcon(key, icon);
|
|
130
|
-
});
|