@ttoss/theme 1.3.0 → 1.4.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/dist/esm/chunk-VIAWD6II.js +445 -0
- package/dist/esm/index.js +3 -382
- package/dist/esm/themes/Bruttal/Bruttal.js +9 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.js +59 -11
- package/dist/themes/Bruttal/Bruttal.d.ts +7 -0
- package/dist/themes/Bruttal/Bruttal.js +481 -0
- package/package.json +28 -9
- package/src/createTheme.ts +1 -1
- package/src/index.ts +0 -3
- package/src/themes/Bruttal/Bruttal.ts +4 -0
- package/src/themes/Bruttal/BruttalIcons.ts +60 -0
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/themes/Bruttal/Bruttal.ts
|
|
32
|
+
var Bruttal_exports = {};
|
|
33
|
+
__export(Bruttal_exports, {
|
|
34
|
+
BruttalFonts: () => BruttalFonts,
|
|
35
|
+
BruttalTheme: () => BruttalTheme
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(Bruttal_exports);
|
|
38
|
+
|
|
39
|
+
// src/themes/Bruttal/BruttalIcons.ts
|
|
40
|
+
var import_react = require("@iconify-icon/react");
|
|
41
|
+
var import_add_filled = __toESM(require("@iconify/icons-carbon/add-filled"));
|
|
42
|
+
var import_calendar = __toESM(require("@iconify/icons-carbon/calendar"));
|
|
43
|
+
var import_checkbox_checked_filled = __toESM(require("@iconify/icons-carbon/checkbox-checked-filled"));
|
|
44
|
+
var import_checkbox = __toESM(require("@iconify/icons-carbon/checkbox"));
|
|
45
|
+
var import_checkbox_indeterminate_filled = __toESM(require("@iconify/icons-carbon/checkbox-indeterminate-filled"));
|
|
46
|
+
var import_chevron_down = __toESM(require("@iconify/icons-carbon/chevron-down"));
|
|
47
|
+
var import_chevron_left = __toESM(require("@iconify/icons-carbon/chevron-left"));
|
|
48
|
+
var import_chevron_right = __toESM(require("@iconify/icons-carbon/chevron-right"));
|
|
49
|
+
var import_chevron_up = __toESM(require("@iconify/icons-carbon/chevron-up"));
|
|
50
|
+
var import_close_filled = __toESM(require("@iconify/icons-carbon/close-filled"));
|
|
51
|
+
var import_copy = __toESM(require("@iconify/icons-carbon/copy"));
|
|
52
|
+
var import_error_filled = __toESM(require("@iconify/icons-carbon/error-filled"));
|
|
53
|
+
var import_information_filled = __toESM(require("@iconify/icons-carbon/information-filled"));
|
|
54
|
+
var import_paste = __toESM(require("@iconify/icons-carbon/paste"));
|
|
55
|
+
var import_radio_button_checked = __toESM(require("@iconify/icons-carbon/radio-button-checked"));
|
|
56
|
+
var import_radio_button = __toESM(require("@iconify/icons-carbon/radio-button"));
|
|
57
|
+
var import_renew = __toESM(require("@iconify/icons-carbon/renew"));
|
|
58
|
+
var import_time = __toESM(require("@iconify/icons-carbon/time"));
|
|
59
|
+
var import_trash_can = __toESM(require("@iconify/icons-carbon/trash-can"));
|
|
60
|
+
var import_user_avatar_filled_alt = __toESM(require("@iconify/icons-carbon/user-avatar-filled-alt"));
|
|
61
|
+
var import_view_filled = __toESM(require("@iconify/icons-carbon/view-filled"));
|
|
62
|
+
var import_view_off_filled = __toESM(require("@iconify/icons-carbon/view-off-filled"));
|
|
63
|
+
var import_warning_filled = __toESM(require("@iconify/icons-carbon/warning-filled"));
|
|
64
|
+
var replicateIcon = {
|
|
65
|
+
body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
|
+
<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"/>
|
|
67
|
+
<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"/>
|
|
68
|
+
</svg>`,
|
|
69
|
+
width: 48,
|
|
70
|
+
height: 48
|
|
71
|
+
};
|
|
72
|
+
(0, import_react.addIcon)("add", import_add_filled.default);
|
|
73
|
+
(0, import_react.addIcon)("avatar", import_user_avatar_filled_alt.default);
|
|
74
|
+
(0, import_react.addIcon)("calendar", import_calendar.default);
|
|
75
|
+
(0, import_react.addIcon)("checkbox-checked", import_checkbox_checked_filled.default);
|
|
76
|
+
(0, import_react.addIcon)("checkbox-indeterminate", import_checkbox_indeterminate_filled.default);
|
|
77
|
+
(0, import_react.addIcon)("checkbox-unchecked", import_checkbox.default);
|
|
78
|
+
(0, import_react.addIcon)("close", import_close_filled.default);
|
|
79
|
+
(0, import_react.addIcon)("copy", import_copy.default);
|
|
80
|
+
(0, import_react.addIcon)("delete", import_trash_can.default);
|
|
81
|
+
(0, import_react.addIcon)("error", import_error_filled.default);
|
|
82
|
+
(0, import_react.addIcon)("info", import_information_filled.default);
|
|
83
|
+
(0, import_react.addIcon)("paste", import_paste.default);
|
|
84
|
+
(0, import_react.addIcon)("picker-down", import_chevron_down.default);
|
|
85
|
+
(0, import_react.addIcon)("picker-up", import_chevron_up.default);
|
|
86
|
+
(0, import_react.addIcon)("picker-left", import_chevron_left.default);
|
|
87
|
+
(0, import_react.addIcon)("picker-right", import_chevron_right.default);
|
|
88
|
+
(0, import_react.addIcon)("radio-not-selected", import_radio_button.default);
|
|
89
|
+
(0, import_react.addIcon)("radio-selected", import_radio_button_checked.default);
|
|
90
|
+
(0, import_react.addIcon)("refresh", import_renew.default);
|
|
91
|
+
(0, import_react.addIcon)("replicate", replicateIcon);
|
|
92
|
+
(0, import_react.addIcon)("small-close", import_close_filled.default);
|
|
93
|
+
(0, import_react.addIcon)("time", import_time.default);
|
|
94
|
+
(0, import_react.addIcon)("view-off", import_view_off_filled.default);
|
|
95
|
+
(0, import_react.addIcon)("view-on", import_view_filled.default);
|
|
96
|
+
(0, import_react.addIcon)("warning", import_warning_filled.default);
|
|
97
|
+
|
|
98
|
+
// src/themes/Bruttal/BruttalFonts.ts
|
|
99
|
+
var BruttalFonts = [
|
|
100
|
+
"https://fonts.googleapis.com/css?family=Inconsolata:wght@100;200;300;400;500;700;800;900",
|
|
101
|
+
"https://fonts.googleapis.com/css?family=Work+Sans:wght@100;200;300;400;500;700;800;900",
|
|
102
|
+
"https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap"
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
// src/tokens/fontSizes.ts
|
|
106
|
+
var fontSizes = {
|
|
107
|
+
"2xs": "0.5rem",
|
|
108
|
+
xs: "0.75rem",
|
|
109
|
+
sm: "0.875rem",
|
|
110
|
+
base: "1rem",
|
|
111
|
+
lg: "1.125rem",
|
|
112
|
+
xl: "1.25rem",
|
|
113
|
+
"2xl": "1.5rem",
|
|
114
|
+
"3xl": "1.875rem",
|
|
115
|
+
"4xl": "2.25rem",
|
|
116
|
+
"5xl": "3rem",
|
|
117
|
+
"6xl": "3.75rem",
|
|
118
|
+
"7xl": "4.5rem",
|
|
119
|
+
"8xl": "6rem",
|
|
120
|
+
"9xl": "8rem"
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/tokens/fontWeights.ts
|
|
124
|
+
var fontWeights = {
|
|
125
|
+
thin: 100,
|
|
126
|
+
extralight: 200,
|
|
127
|
+
light: 300,
|
|
128
|
+
normal: 400,
|
|
129
|
+
medium: 500,
|
|
130
|
+
semibold: 600,
|
|
131
|
+
bold: 700,
|
|
132
|
+
extrabold: 800
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// src/tokens/letterSpacings.ts
|
|
136
|
+
var letterSpacings = {
|
|
137
|
+
tighter: "-0.05em",
|
|
138
|
+
tight: "-0.025em",
|
|
139
|
+
normal: "0em",
|
|
140
|
+
wide: "0.025em",
|
|
141
|
+
wider: "0.05em",
|
|
142
|
+
widest: "0.1em"
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// src/tokens/space.ts
|
|
146
|
+
var space = {
|
|
147
|
+
none: 0,
|
|
148
|
+
"2xs": "2px",
|
|
149
|
+
xs: "3px",
|
|
150
|
+
sm: "5px",
|
|
151
|
+
md: "8px",
|
|
152
|
+
lg: "13px",
|
|
153
|
+
xl: "21px",
|
|
154
|
+
"2xl": "34px",
|
|
155
|
+
"3xl": "55px",
|
|
156
|
+
"4xl": "89px",
|
|
157
|
+
"5xl": "144px",
|
|
158
|
+
"6xl": "233px",
|
|
159
|
+
"7xl": "377px"
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/themes/Bruttal/BruttalTheme.ts
|
|
163
|
+
var coreFonts = {
|
|
164
|
+
main: '"Atkinson Hyperlegible", sans-serif',
|
|
165
|
+
contrast: '"Work Sans", sans-serif',
|
|
166
|
+
monospace: '"Inconsolata", sans-serif'
|
|
167
|
+
};
|
|
168
|
+
var brandColors = {
|
|
169
|
+
complimentary: "#f4f3f3",
|
|
170
|
+
main: "#292C2a",
|
|
171
|
+
darkNeutral: "#325C82",
|
|
172
|
+
accent: "#0469E3",
|
|
173
|
+
lightNeutral: "#F8F8F8"
|
|
174
|
+
};
|
|
175
|
+
var coreColors = {
|
|
176
|
+
...brandColors,
|
|
177
|
+
gray100: "#f9f9f9",
|
|
178
|
+
gray200: "#dedede",
|
|
179
|
+
gray300: "#c4c4c4",
|
|
180
|
+
gray400: "#ababab",
|
|
181
|
+
gray500: "#929292",
|
|
182
|
+
gray600: "#7a7a7a",
|
|
183
|
+
gray700: "#626262",
|
|
184
|
+
gray800: "#4c4c4c",
|
|
185
|
+
gray900: "#323232",
|
|
186
|
+
black: "#000000",
|
|
187
|
+
red100: "#ffebeb",
|
|
188
|
+
red200: "#fdbfbf",
|
|
189
|
+
red300: "#f99595",
|
|
190
|
+
red400: "#f56c6c",
|
|
191
|
+
red500: "#ef4444",
|
|
192
|
+
red600: "#e42828",
|
|
193
|
+
red700: "#c62121",
|
|
194
|
+
white: "#ffffff",
|
|
195
|
+
amber600: "#d97706",
|
|
196
|
+
teal600: "#0d9488"
|
|
197
|
+
};
|
|
198
|
+
var coreBorders = {
|
|
199
|
+
none: "0px solid",
|
|
200
|
+
thin: "1px solid",
|
|
201
|
+
medium: "2px solid",
|
|
202
|
+
thick: "4px solid"
|
|
203
|
+
};
|
|
204
|
+
var coreRadii = {
|
|
205
|
+
sharp: "0px",
|
|
206
|
+
xs: "2px",
|
|
207
|
+
sm: "4px",
|
|
208
|
+
md: "6px",
|
|
209
|
+
lg: "8px",
|
|
210
|
+
xl: "12px",
|
|
211
|
+
"2xl": "16px",
|
|
212
|
+
"3xl": "24px",
|
|
213
|
+
circle: "9999px"
|
|
214
|
+
};
|
|
215
|
+
var BruttalTheme = {
|
|
216
|
+
/**
|
|
217
|
+
* Tokens
|
|
218
|
+
*/
|
|
219
|
+
fontSizes,
|
|
220
|
+
fontWeights,
|
|
221
|
+
letterSpacings,
|
|
222
|
+
space,
|
|
223
|
+
colors: {
|
|
224
|
+
background: coreColors.white,
|
|
225
|
+
text: coreColors.black,
|
|
226
|
+
muted: coreColors.gray200,
|
|
227
|
+
onMuted: coreColors.gray500,
|
|
228
|
+
mutedOutline: coreColors.gray300,
|
|
229
|
+
danger: coreColors.red700,
|
|
230
|
+
onDanger: coreColors.white,
|
|
231
|
+
notice: coreColors.amber600,
|
|
232
|
+
positive: coreColors.teal600,
|
|
233
|
+
surface: coreColors.white,
|
|
234
|
+
contentHeader: coreColors.gray200,
|
|
235
|
+
onContentHeader: coreColors.black,
|
|
236
|
+
outline: coreColors.gray500,
|
|
237
|
+
primary: coreColors.main,
|
|
238
|
+
onPrimary: coreColors.white,
|
|
239
|
+
secondary: coreColors.gray500,
|
|
240
|
+
onSecondary: coreColors.complimentary,
|
|
241
|
+
highlight: coreColors.darkNeutral,
|
|
242
|
+
onHighlight: coreColors.complimentary,
|
|
243
|
+
accent: coreColors.accent,
|
|
244
|
+
onAccent: coreColors.white,
|
|
245
|
+
neutral: coreColors.darkNeutral,
|
|
246
|
+
onNeutral: coreColors.lightNeutral,
|
|
247
|
+
underemphasize: coreColors.gray300
|
|
248
|
+
},
|
|
249
|
+
fonts: {
|
|
250
|
+
h1: coreFonts.contrast,
|
|
251
|
+
h2: coreFonts.contrast,
|
|
252
|
+
h3: coreFonts.contrast,
|
|
253
|
+
h4: coreFonts.contrast,
|
|
254
|
+
h5: coreFonts.contrast,
|
|
255
|
+
h6: coreFonts.contrast,
|
|
256
|
+
body: coreFonts.main,
|
|
257
|
+
highlight: coreFonts.main,
|
|
258
|
+
caption: coreFonts.monospace
|
|
259
|
+
},
|
|
260
|
+
borders: {
|
|
261
|
+
default: coreBorders.medium
|
|
262
|
+
},
|
|
263
|
+
radii: {
|
|
264
|
+
default: coreRadii.sm
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Global styles
|
|
268
|
+
*/
|
|
269
|
+
styles: {
|
|
270
|
+
root: {
|
|
271
|
+
fontFamily: "body",
|
|
272
|
+
fontWeight: "normal",
|
|
273
|
+
fontSize: "base",
|
|
274
|
+
margin: 0,
|
|
275
|
+
padding: 0
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* Components
|
|
280
|
+
*/
|
|
281
|
+
badges: {
|
|
282
|
+
primary: {
|
|
283
|
+
color: "onPrimary",
|
|
284
|
+
bg: "primary",
|
|
285
|
+
fontSize: "sm",
|
|
286
|
+
paddingX: "sm",
|
|
287
|
+
borderRadius: "default"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
buttons: {
|
|
291
|
+
accent: {
|
|
292
|
+
backgroundColor: "accent",
|
|
293
|
+
color: "onAccent",
|
|
294
|
+
fontFamily: "highlight",
|
|
295
|
+
fontWeight: "bold",
|
|
296
|
+
border: "default",
|
|
297
|
+
borderRadius: "default",
|
|
298
|
+
borderColor: "accent",
|
|
299
|
+
":hover:not(:active,[disabled])": {
|
|
300
|
+
backgroundColor: "highlight",
|
|
301
|
+
color: "onHighlight",
|
|
302
|
+
borderColor: "highlight"
|
|
303
|
+
},
|
|
304
|
+
":disabled": {
|
|
305
|
+
cursor: "default",
|
|
306
|
+
backgroundColor: "muted",
|
|
307
|
+
borderColor: "muted"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
primary: {
|
|
311
|
+
backgroundColor: "primary",
|
|
312
|
+
color: "onPrimary",
|
|
313
|
+
fontFamily: "body",
|
|
314
|
+
border: "default",
|
|
315
|
+
borderRadius: "default",
|
|
316
|
+
borderColor: "outline",
|
|
317
|
+
":hover:not(:active,[disabled])": {
|
|
318
|
+
backgroundColor: "highlight",
|
|
319
|
+
color: "onHighlight",
|
|
320
|
+
borderColor: "highlight"
|
|
321
|
+
},
|
|
322
|
+
":active": {
|
|
323
|
+
backgroundColor: "primary",
|
|
324
|
+
color: "onPrimary",
|
|
325
|
+
borderColor: "outline"
|
|
326
|
+
},
|
|
327
|
+
":disabled": {
|
|
328
|
+
cursor: "default",
|
|
329
|
+
backgroundColor: "muted",
|
|
330
|
+
borderColor: "muted"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
secondary: {
|
|
334
|
+
backgroundColor: "secondary",
|
|
335
|
+
color: "onSecondary",
|
|
336
|
+
fontFamily: "body",
|
|
337
|
+
border: "default",
|
|
338
|
+
borderRadius: "default",
|
|
339
|
+
borderColor: "outline",
|
|
340
|
+
":hover:not(:active,[disabled])": {
|
|
341
|
+
backgroundColor: "highlight",
|
|
342
|
+
color: "onHighlight",
|
|
343
|
+
borderColor: "highlight"
|
|
344
|
+
},
|
|
345
|
+
":disabled": {
|
|
346
|
+
cursor: "default",
|
|
347
|
+
backgroundColor: "muted",
|
|
348
|
+
borderColor: "muted"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
neutral: {
|
|
352
|
+
backgroundColor: "neutral",
|
|
353
|
+
color: "onNeutral",
|
|
354
|
+
fontFamily: "body",
|
|
355
|
+
border: "default",
|
|
356
|
+
borderRadius: "default",
|
|
357
|
+
borderColor: "outline",
|
|
358
|
+
":hover:not(:active,[disabled])": {
|
|
359
|
+
backgroundColor: "highlight",
|
|
360
|
+
color: "onHighlight",
|
|
361
|
+
borderColor: "highlight"
|
|
362
|
+
},
|
|
363
|
+
":disabled": {
|
|
364
|
+
cursor: "default",
|
|
365
|
+
backgroundColor: "muted",
|
|
366
|
+
borderColor: "muted"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
danger: {
|
|
370
|
+
color: "white",
|
|
371
|
+
backgroundColor: "danger"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
cards: {
|
|
375
|
+
primary: {
|
|
376
|
+
backgroundColor: "primary",
|
|
377
|
+
border: "1px solid black",
|
|
378
|
+
padding: [4, 5],
|
|
379
|
+
display: "flex",
|
|
380
|
+
flexDirection: "column",
|
|
381
|
+
alignItems: "center",
|
|
382
|
+
width: "fit-content"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
forms: {
|
|
386
|
+
label: {
|
|
387
|
+
"&:has(+ div > input.error)": {
|
|
388
|
+
"span > iconify-icon": {
|
|
389
|
+
color: "danger"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
'&:has(input[type="checkbox"]:disabled)': {
|
|
393
|
+
color: "onMuted"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
checkbox: {
|
|
397
|
+
"input:not(:checked) ~ &": {
|
|
398
|
+
color: "primary"
|
|
399
|
+
},
|
|
400
|
+
"input:disabled ~ &": {
|
|
401
|
+
color: "muted"
|
|
402
|
+
},
|
|
403
|
+
"input:disabled ~ & path": {
|
|
404
|
+
backgroundColor: "onMuted"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
input: {
|
|
408
|
+
fontFamily: "body",
|
|
409
|
+
color: "text",
|
|
410
|
+
paddingY: "md",
|
|
411
|
+
paddingX: "lg",
|
|
412
|
+
"::placeholder": {
|
|
413
|
+
color: "underemphasize"
|
|
414
|
+
},
|
|
415
|
+
":focus-within": {
|
|
416
|
+
outlineColor: "neutral"
|
|
417
|
+
},
|
|
418
|
+
":disabled": {
|
|
419
|
+
backgroundColor: "onMuted",
|
|
420
|
+
borderColor: "muted"
|
|
421
|
+
},
|
|
422
|
+
"&.error": {
|
|
423
|
+
borderColor: "danger"
|
|
424
|
+
},
|
|
425
|
+
"&.error+span>iconify-icon": {
|
|
426
|
+
color: "danger"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
text: {
|
|
431
|
+
default: {
|
|
432
|
+
color: "text",
|
|
433
|
+
fontFamily: "body"
|
|
434
|
+
},
|
|
435
|
+
title: {
|
|
436
|
+
fontFamily: "heading",
|
|
437
|
+
fontSize: 4,
|
|
438
|
+
lineSpace: "3.5"
|
|
439
|
+
},
|
|
440
|
+
error: {
|
|
441
|
+
'&[role="alert"]': {
|
|
442
|
+
color: "danger"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
h1: {
|
|
446
|
+
fontFamily: "heading",
|
|
447
|
+
fontSize: "6xl",
|
|
448
|
+
fontWeight: "bold",
|
|
449
|
+
letterSpacing: "normal"
|
|
450
|
+
},
|
|
451
|
+
h2: {
|
|
452
|
+
fontFamily: "heading",
|
|
453
|
+
fontSize: "5xl",
|
|
454
|
+
fontWeight: "bold",
|
|
455
|
+
letterSpacing: "normal"
|
|
456
|
+
},
|
|
457
|
+
h3: {
|
|
458
|
+
fontFamily: "heading",
|
|
459
|
+
fontSize: "4xl",
|
|
460
|
+
fontWeight: "bold",
|
|
461
|
+
letterSpacing: "normal"
|
|
462
|
+
},
|
|
463
|
+
h4: {
|
|
464
|
+
fontFamily: "heading",
|
|
465
|
+
fontSize: "2xl",
|
|
466
|
+
fontWeight: "bold",
|
|
467
|
+
letterSpacing: "normal"
|
|
468
|
+
},
|
|
469
|
+
h5: {
|
|
470
|
+
fontFamily: "heading",
|
|
471
|
+
fontSize: "xl",
|
|
472
|
+
fontWeight: "bold",
|
|
473
|
+
letterSpacing: "normal"
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
478
|
+
0 && (module.exports = {
|
|
479
|
+
BruttalFonts,
|
|
480
|
+
BruttalTheme
|
|
481
|
+
});
|
package/package.json
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/theme",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Theme for packages.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Rayza Oliveira <rayza.ocr@gmail.com>"
|
|
9
9
|
],
|
|
10
|
-
"
|
|
11
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/esm/index.js",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./Bruttal": {
|
|
16
|
+
"import": "./dist/esm/themes/Bruttal/Bruttal.js",
|
|
17
|
+
"require": "./dist/themes/Bruttal/Bruttal.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
12
20
|
"files": [
|
|
13
21
|
"dist",
|
|
14
22
|
"src",
|
|
@@ -18,18 +26,29 @@
|
|
|
18
26
|
"build": "tsup",
|
|
19
27
|
"test": "jest"
|
|
20
28
|
},
|
|
21
|
-
"sideEffects":
|
|
22
|
-
"typings": "dist/index.d.ts",
|
|
29
|
+
"sideEffects": true,
|
|
23
30
|
"dependencies": {
|
|
24
|
-
"
|
|
31
|
+
"@iconify-icon/react": "^1.0.7",
|
|
32
|
+
"@iconify/icons-carbon": "^1.2.16",
|
|
33
|
+
"deepmerge": "^4.3.1"
|
|
25
34
|
},
|
|
26
35
|
"devDependencies": {
|
|
27
|
-
"@ttoss/config": "^1.
|
|
28
|
-
"@ttoss/test-utils": "^1.20.
|
|
36
|
+
"@ttoss/config": "^1.29.1",
|
|
37
|
+
"@ttoss/test-utils": "^1.20.8"
|
|
29
38
|
},
|
|
30
39
|
"keywords": [],
|
|
31
40
|
"publishConfig": {
|
|
32
41
|
"access": "public"
|
|
33
42
|
},
|
|
34
|
-
"
|
|
43
|
+
"typesVersions": {
|
|
44
|
+
"*": {
|
|
45
|
+
".": [
|
|
46
|
+
"./dist/index.d.ts"
|
|
47
|
+
],
|
|
48
|
+
"Bruttal": [
|
|
49
|
+
"./dist/themes/Bruttal/Bruttal.d.ts"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "ee0c2e51d38f37f997c020d4303cf90be720ecb0"
|
|
35
54
|
}
|
package/src/createTheme.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { addIcon } from '@iconify-icon/react';
|
|
2
|
+
import addFilledIcon from '@iconify/icons-carbon/add-filled';
|
|
3
|
+
import calendarIcon from '@iconify/icons-carbon/calendar';
|
|
4
|
+
import checkboxCheckedFilled from '@iconify/icons-carbon/checkbox-checked-filled';
|
|
5
|
+
import checkboxIcon from '@iconify/icons-carbon/checkbox';
|
|
6
|
+
import checkboxIndeterminateFilledIcon from '@iconify/icons-carbon/checkbox-indeterminate-filled';
|
|
7
|
+
import chevronDownIcon from '@iconify/icons-carbon/chevron-down';
|
|
8
|
+
import chevronLeftIcon from '@iconify/icons-carbon/chevron-left';
|
|
9
|
+
import chevronRightIcon from '@iconify/icons-carbon/chevron-right';
|
|
10
|
+
import chevronUpIcon from '@iconify/icons-carbon/chevron-up';
|
|
11
|
+
import closeFilledIcon from '@iconify/icons-carbon/close-filled';
|
|
12
|
+
import copyIcon from '@iconify/icons-carbon/copy';
|
|
13
|
+
import errorFilledIcon from '@iconify/icons-carbon/error-filled';
|
|
14
|
+
import informationFilledIcon from '@iconify/icons-carbon/information-filled';
|
|
15
|
+
import pasteIcon from '@iconify/icons-carbon/paste';
|
|
16
|
+
import radioButtonCheckedIcon from '@iconify/icons-carbon/radio-button-checked';
|
|
17
|
+
import radioButtonIcon from '@iconify/icons-carbon/radio-button';
|
|
18
|
+
import renewIcon from '@iconify/icons-carbon/renew';
|
|
19
|
+
import timeIcon from '@iconify/icons-carbon/time';
|
|
20
|
+
import trashCanIcon from '@iconify/icons-carbon/trash-can';
|
|
21
|
+
import userAvatarFilledAltIcon from '@iconify/icons-carbon/user-avatar-filled-alt';
|
|
22
|
+
import viewFilledIcon from '@iconify/icons-carbon/view-filled';
|
|
23
|
+
import viewOffFilledIcon from '@iconify/icons-carbon/view-off-filled';
|
|
24
|
+
import warningFilledIcon from '@iconify/icons-carbon/warning-filled';
|
|
25
|
+
import type { IconifyIcon } from '@iconify/types';
|
|
26
|
+
|
|
27
|
+
const replicateIcon: IconifyIcon = {
|
|
28
|
+
body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
29
|
+
<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"/>
|
|
30
|
+
<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"/>
|
|
31
|
+
</svg>`,
|
|
32
|
+
width: 48,
|
|
33
|
+
height: 48,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
addIcon('add', addFilledIcon);
|
|
37
|
+
addIcon('avatar', userAvatarFilledAltIcon);
|
|
38
|
+
addIcon('calendar', calendarIcon);
|
|
39
|
+
addIcon('checkbox-checked', checkboxCheckedFilled);
|
|
40
|
+
addIcon('checkbox-indeterminate', checkboxIndeterminateFilledIcon);
|
|
41
|
+
addIcon('checkbox-unchecked', checkboxIcon);
|
|
42
|
+
addIcon('close', closeFilledIcon);
|
|
43
|
+
addIcon('copy', copyIcon);
|
|
44
|
+
addIcon('delete', trashCanIcon);
|
|
45
|
+
addIcon('error', errorFilledIcon);
|
|
46
|
+
addIcon('info', informationFilledIcon);
|
|
47
|
+
addIcon('paste', pasteIcon);
|
|
48
|
+
addIcon('picker-down', chevronDownIcon);
|
|
49
|
+
addIcon('picker-up', chevronUpIcon);
|
|
50
|
+
addIcon('picker-left', chevronLeftIcon);
|
|
51
|
+
addIcon('picker-right', chevronRightIcon);
|
|
52
|
+
addIcon('radio-not-selected', radioButtonIcon);
|
|
53
|
+
addIcon('radio-selected', radioButtonCheckedIcon);
|
|
54
|
+
addIcon('refresh', renewIcon);
|
|
55
|
+
addIcon('replicate', replicateIcon);
|
|
56
|
+
addIcon('small-close', closeFilledIcon);
|
|
57
|
+
addIcon('time', timeIcon);
|
|
58
|
+
addIcon('view-off', viewOffFilledIcon);
|
|
59
|
+
addIcon('view-on', viewFilledIcon);
|
|
60
|
+
addIcon('warning', warningFilledIcon);
|