@ttoss/theme 1.4.22 → 1.4.24

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.
@@ -7,6 +7,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
12
+ exports: {}
13
+ }).exports, mod), mod.exports;
14
+ };
10
15
  var __export = (target, all) => {
11
16
  for (var name in all) __defProp(target, name, {
12
17
  get: all[name],
@@ -35,6 +40,32 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
35
40
  value: true
36
41
  }), mod);
37
42
 
43
+ // ../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js
44
+ var require_loading = __commonJS({
45
+ "../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js"(exports) {
46
+ var data = {
47
+ "width": 24,
48
+ "height": 24,
49
+ "body": '<path fill="currentColor" d="M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z" opacity=".5"/><path fill="currentColor" d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"><animateTransform attributeName="transform" dur="1s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate"/></path>'
50
+ };
51
+ exports.__esModule = true;
52
+ exports.default = data;
53
+ }
54
+ });
55
+
56
+ // ../../node_modules/.pnpm/@iconify+icons-mdi@1.2.44/node_modules/@iconify/icons-mdi/success-circle.js
57
+ var require_success_circle = __commonJS({
58
+ "../../node_modules/.pnpm/@iconify+icons-mdi@1.2.44/node_modules/@iconify/icons-mdi/success-circle.js"(exports) {
59
+ var data = {
60
+ "width": 24,
61
+ "height": 24,
62
+ "body": '<path fill="currentColor" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z"/>'
63
+ };
64
+ exports.__esModule = true;
65
+ exports.default = data;
66
+ }
67
+ });
68
+
38
69
  // src/themes/Bruttal/Bruttal.ts
39
70
  var Bruttal_exports = {};
40
71
  __export(Bruttal_exports, {
@@ -46,7 +77,13 @@ module.exports = __toCommonJS(Bruttal_exports);
46
77
  // src/themes/Bruttal/BruttalIcons.ts
47
78
  var import_react = require("@iconify-icon/react");
48
79
  var import_add_filled = __toESM(require("@iconify/icons-carbon/add-filled"));
80
+ var import_arrow_right = __toESM(require("@iconify/icons-carbon/arrow-right"));
81
+ var import_attachment = __toESM(require("@iconify/icons-carbon/attachment"));
49
82
  var import_calendar = __toESM(require("@iconify/icons-carbon/calendar"));
83
+ var import_caret_down = __toESM(require("@iconify/icons-carbon/caret-down"));
84
+ var import_caret_up = __toESM(require("@iconify/icons-carbon/caret-up"));
85
+ var import_checkmark = __toESM(require("@iconify/icons-carbon/checkmark"));
86
+ var import_checkmark_outline = __toESM(require("@iconify/icons-carbon/checkmark-outline"));
50
87
  var import_checkbox_checked_filled = __toESM(require("@iconify/icons-carbon/checkbox-checked-filled"));
51
88
  var import_checkbox = __toESM(require("@iconify/icons-carbon/checkbox"));
52
89
  var import_checkbox_indeterminate_filled = __toESM(require("@iconify/icons-carbon/checkbox-indeterminate-filled"));
@@ -59,12 +96,15 @@ var import_close = __toESM(require("@iconify/icons-carbon/close"));
59
96
  var import_copy = __toESM(require("@iconify/icons-carbon/copy"));
60
97
  var import_error_filled = __toESM(require("@iconify/icons-carbon/error-filled"));
61
98
  var import_information_filled = __toESM(require("@iconify/icons-carbon/information-filled"));
99
+ var import_loading = __toESM(require_loading());
62
100
  var import_paste = __toESM(require("@iconify/icons-carbon/paste"));
63
101
  var import_radio_button_checked = __toESM(require("@iconify/icons-carbon/radio-button-checked"));
64
102
  var import_radio_button = __toESM(require("@iconify/icons-carbon/radio-button"));
65
103
  var import_renew = __toESM(require("@iconify/icons-carbon/renew"));
104
+ var import_success_circle = __toESM(require_success_circle());
66
105
  var import_time = __toESM(require("@iconify/icons-carbon/time"));
67
106
  var import_trash_can = __toESM(require("@iconify/icons-carbon/trash-can"));
107
+ var import_upload = __toESM(require("@iconify/icons-carbon/upload"));
68
108
  var import_user_avatar_filled_alt = __toESM(require("@iconify/icons-carbon/user-avatar-filled-alt"));
69
109
  var import_view_filled = __toESM(require("@iconify/icons-carbon/view-filled"));
70
110
  var import_view_off_filled = __toESM(require("@iconify/icons-carbon/view-off-filled"));
@@ -77,17 +117,32 @@ var replicateIcon = {
77
117
  width: 48,
78
118
  height: 48
79
119
  };
120
+ var subtractIcon = {
121
+ body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
122
+ <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"/>
123
+ </svg>
124
+ `,
125
+ width: 48,
126
+ height: 48
127
+ };
80
128
  (0, import_react.addIcon)("add", import_add_filled.default);
129
+ (0, import_react.addIcon)("arrow-right", import_arrow_right.default);
130
+ (0, import_react.addIcon)("attachment", import_attachment.default);
81
131
  (0, import_react.addIcon)("avatar", import_user_avatar_filled_alt.default);
132
+ (0, import_react.addIcon)("caret-down", import_caret_down.default);
133
+ (0, import_react.addIcon)("caret-up", import_caret_up.default);
82
134
  (0, import_react.addIcon)("calendar", import_calendar.default);
83
135
  (0, import_react.addIcon)("checkbox-checked", import_checkbox_checked_filled.default);
84
136
  (0, import_react.addIcon)("checkbox-indeterminate", import_checkbox_indeterminate_filled.default);
85
137
  (0, import_react.addIcon)("checkbox-unchecked", import_checkbox.default);
138
+ (0, import_react.addIcon)("check", import_checkmark.default);
139
+ (0, import_react.addIcon)("check-mark", import_checkmark_outline.default);
86
140
  (0, import_react.addIcon)("close", import_close.default);
87
141
  (0, import_react.addIcon)("copy", import_copy.default);
88
142
  (0, import_react.addIcon)("delete", import_trash_can.default);
89
143
  (0, import_react.addIcon)("error", import_error_filled.default);
90
144
  (0, import_react.addIcon)("info", import_information_filled.default);
145
+ (0, import_react.addIcon)("loading", import_loading.default);
91
146
  (0, import_react.addIcon)("paste", import_paste.default);
92
147
  (0, import_react.addIcon)("picker-down", import_chevron_down.default);
93
148
  (0, import_react.addIcon)("picker-up", import_chevron_up.default);
@@ -97,8 +152,11 @@ var replicateIcon = {
97
152
  (0, import_react.addIcon)("radio-selected", import_radio_button_checked.default);
98
153
  (0, import_react.addIcon)("refresh", import_renew.default);
99
154
  (0, import_react.addIcon)("replicate", replicateIcon);
155
+ (0, import_react.addIcon)("subtract", subtractIcon);
156
+ (0, import_react.addIcon)("success-circle", import_success_circle.default);
100
157
  (0, import_react.addIcon)("small-close", import_close_filled.default);
101
158
  (0, import_react.addIcon)("time", import_time.default);
159
+ (0, import_react.addIcon)("upload", import_upload.default);
102
160
  (0, import_react.addIcon)("view-off", import_view_off_filled.default);
103
161
  (0, import_react.addIcon)("view-on", import_view_filled.default);
104
162
  (0, import_react.addIcon)("warning", import_warning_filled.default);
@@ -146,6 +204,17 @@ var letterSpacings = {
146
204
  widest: "0.1em"
147
205
  };
148
206
 
207
+ // src/tokens/lineHeights.ts
208
+ var lineHeights = {
209
+ "2xs": "0.422",
210
+ xs: "0.562",
211
+ sm: "calc(1 / 1.333)",
212
+ base: "normal",
213
+ lg: "calc(1 * 1.333)",
214
+ xl: "1.776",
215
+ "2xl": "2.368"
216
+ };
217
+
149
218
  // src/tokens/space.ts
150
219
  var space = {
151
220
  none: 0,
@@ -224,6 +293,7 @@ var BruttalTheme = {
224
293
  fontWeights,
225
294
  letterSpacings,
226
295
  space,
296
+ lineHeights,
227
297
  colors: {
228
298
  background: coreColors.white,
229
299
  text: coreColors.black,
@@ -261,13 +331,15 @@ var BruttalTheme = {
261
331
  h6: coreFonts.contrast,
262
332
  body: coreFonts.main,
263
333
  highlight: coreFonts.main,
264
- caption: coreFonts.monospace
334
+ caption: coreFonts.main
265
335
  },
266
336
  borders: {
267
- default: coreBorders.medium,
337
+ default: coreBorders.thin,
338
+ secondary: coreBorders.medium,
268
339
  muted: coreBorders.thin,
269
340
  interaction: coreBorders.medium,
270
- danger: coreBorders.medium
341
+ danger: coreBorders.medium,
342
+ highlight: coreBorders.medium
271
343
  },
272
344
  radii: {
273
345
  informative: coreRadii.xs,
@@ -305,6 +377,7 @@ var BruttalTheme = {
305
377
  bg: "positive",
306
378
  fontFamily: "caption",
307
379
  fontWeight: "normal",
380
+ lineHeight: "base",
308
381
  fontSize: "xs",
309
382
  paddingX: "xs",
310
383
  paddingY: "2xs",
@@ -315,6 +388,7 @@ var BruttalTheme = {
315
388
  bg: "danger",
316
389
  fontFamily: "caption",
317
390
  fontWeight: "normal",
391
+ lineHeight: "base",
318
392
  fontSize: "xs",
319
393
  paddingX: "xs",
320
394
  paddingY: "2xs",
@@ -326,6 +400,7 @@ var BruttalTheme = {
326
400
  fontFamily: "caption",
327
401
  fontSize: "xs",
328
402
  fontWeight: "normal",
403
+ lineHeight: "base",
329
404
  paddingX: "xs",
330
405
  paddingY: "2xs",
331
406
  borderRadius: "informative",
@@ -337,6 +412,7 @@ var BruttalTheme = {
337
412
  bg: "notice",
338
413
  fontFamily: "caption",
339
414
  fontWeight: "normal",
415
+ lineHeight: "base",
340
416
  fontSize: "xs",
341
417
  paddingX: "xs",
342
418
  paddingY: "2xs",
@@ -350,14 +426,13 @@ var BruttalTheme = {
350
426
  borderRadius: "action",
351
427
  borderColor: "accent",
352
428
  ":hover:not(:active,[disabled])": {
353
- backgroundColor: "highlight",
354
- color: "onHighlight",
355
- borderColor: "highlight"
429
+ filter: "brightness(90%)"
356
430
  },
357
431
  ":disabled": {
358
432
  cursor: "default",
359
433
  backgroundColor: "muted",
360
- borderColor: "muted"
434
+ borderColor: "muted",
435
+ color: "onMuted"
361
436
  }
362
437
  },
363
438
  primary: {
@@ -366,9 +441,7 @@ var BruttalTheme = {
366
441
  borderRadius: "action",
367
442
  borderColor: "primary",
368
443
  ":hover:not(:active,[disabled])": {
369
- backgroundColor: "highlight",
370
- color: "onHighlight",
371
- borderColor: "highlight"
444
+ filter: "brightness(90%)"
372
445
  },
373
446
  ":active": {
374
447
  backgroundColor: "primary",
@@ -378,59 +451,63 @@ var BruttalTheme = {
378
451
  ":disabled": {
379
452
  cursor: "default",
380
453
  backgroundColor: "muted",
381
- borderColor: "muted"
454
+ borderColor: "muted",
455
+ color: "onMuted"
382
456
  }
383
457
  },
384
458
  secondary: {
385
459
  backgroundColor: "secondary",
386
460
  color: "onSecondary",
387
461
  borderRadius: "action",
388
- borderColor: "secondary",
462
+ border: "secondary",
463
+ borderColor: "onSecondary",
389
464
  ":hover:not(:active,[disabled])": {
390
- backgroundColor: "highlight",
391
- color: "onHighlight",
392
- borderColor: "highlight"
465
+ filter: "brightness(90%)"
393
466
  },
394
467
  ":disabled": {
395
468
  cursor: "default",
396
469
  backgroundColor: "muted",
397
- borderColor: "muted"
470
+ borderColor: "muted",
471
+ color: "onMuted"
398
472
  }
399
473
  },
400
- neutral: {
401
- backgroundColor: "muted",
402
- color: "onMuted",
403
- borderRadius: "action",
404
- borderColor: "muted",
474
+ destructive: {
475
+ color: "onDanger",
476
+ backgroundColor: "danger",
405
477
  ":hover:not(:active,[disabled])": {
406
- backgroundColor: "highlight",
407
- color: "onHighlight",
408
- borderColor: "highlight"
478
+ filter: "brightness(90%)"
409
479
  },
410
480
  ":disabled": {
411
481
  cursor: "default",
412
482
  backgroundColor: "muted",
413
- borderColor: "muted"
483
+ borderColor: "muted",
484
+ color: "onMuted"
414
485
  }
415
486
  },
416
- danger: {
417
- color: "onDanger",
418
- backgroundColor: "danger"
419
- },
420
487
  closeButton: {
421
- backgroundColor: "transparent",
422
- color: "text",
488
+ backgroundColor: "background",
489
+ fontFamily: "caption",
490
+ color: "primary",
423
491
  fontSize: "xs",
424
492
  display: "inline-flex",
425
493
  alignItems: "center",
426
494
  cursor: "pointer",
495
+ gap: "sm",
496
+ padding: "sm",
497
+ border: "default",
498
+ borderColor: "primary",
499
+ width: "fit-content",
427
500
  ":disabled": {
428
- color: "muted",
501
+ border: "muted",
502
+ backgroundColor: "muted",
503
+ color: "onMuted",
429
504
  cursor: "not-allowed"
430
505
  },
431
506
  ":is(:focus-within, :hover):not(:disabled)": {
432
- color: "accent",
433
- outlineColor: "transparent"
507
+ color: "onHighlight",
508
+ backgroundColor: "highlight",
509
+ border: "highlight",
510
+ borderColor: "highlight"
434
511
  }
435
512
  }
436
513
  },
@@ -449,6 +526,7 @@ var BruttalTheme = {
449
526
  label: {
450
527
  color: "text",
451
528
  fontFamily: "body",
529
+ alignItems: "center",
452
530
  '&:is([aria-disabled="true"])': {
453
531
  color: "onMuted"
454
532
  },
@@ -475,9 +553,15 @@ var BruttalTheme = {
475
553
  },
476
554
  'input[aria-invalid="true"] ~ &': {
477
555
  color: "danger"
556
+ },
557
+ "input:focus ~ &": {
558
+ bg: "transparent"
478
559
  }
479
560
  },
480
561
  checkbox: {
562
+ "input:focus ~ &": {
563
+ bg: "transparent"
564
+ },
481
565
  "input:not(:checked) ~ &": {
482
566
  color: "primary"
483
567
  },
@@ -508,8 +592,8 @@ var BruttalTheme = {
508
592
  },
509
593
  ":disabled": {
510
594
  backgroundColor: "muted",
511
- borderColor: "onMuted",
512
- border: "muted"
595
+ border: "muted",
596
+ borderColor: "onMuted"
513
597
  },
514
598
  "&.error": {
515
599
  borderColor: "danger"
@@ -527,8 +611,8 @@ var BruttalTheme = {
527
611
  paddingY: "lg",
528
612
  paddingX: "xl",
529
613
  ":disabled": {
530
- borderColor: "onMuted",
531
614
  border: "muted",
615
+ borderColor: "onMuted",
532
616
  color: "muted"
533
617
  },
534
618
  ":disabled ~ span > iconify-icon": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/theme",
3
- "version": "1.4.22",
3
+ "version": "1.4.24",
4
4
  "description": "Theme for packages.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -36,6 +36,8 @@
36
36
  "deepmerge": "^4.3.1"
37
37
  },
38
38
  "devDependencies": {
39
+ "@iconify/icons-eos-icons": "^1.2.6",
40
+ "@iconify/icons-mdi": "^1.2.44",
39
41
  "@iconify/types": "^2.0.0",
40
42
  "@ttoss/config": "^1.29.5",
41
43
  "@ttoss/test-utils": "^1.21.5",
@@ -57,5 +59,5 @@
57
59
  ]
58
60
  }
59
61
  },
60
- "gitHead": "f30779a5ea50d60cf3099e5fde712e1ef7b7882c"
62
+ "gitHead": "b473ec0322fbe1a459d81339aab3de60d6bebc9a"
61
63
  }
@@ -1,6 +1,12 @@
1
1
  import { addIcon } from '@iconify-icon/react';
2
2
  import addFilledIcon from '@iconify/icons-carbon/add-filled';
3
+ import arrowRightIcon from '@iconify/icons-carbon/arrow-right';
4
+ import attachmentIcon from '@iconify/icons-carbon/attachment';
3
5
  import calendarIcon from '@iconify/icons-carbon/calendar';
6
+ import caretDownIcon from '@iconify/icons-carbon/caret-down';
7
+ import caretUpIcon from '@iconify/icons-carbon/caret-up';
8
+ import checkMarkIcon from '@iconify/icons-carbon/checkmark';
9
+ import checkMarkOutlineIcon from '@iconify/icons-carbon/checkmark-outline';
4
10
  import checkboxCheckedFilled from '@iconify/icons-carbon/checkbox-checked-filled';
5
11
  import checkboxIcon from '@iconify/icons-carbon/checkbox';
6
12
  import checkboxIndeterminateFilledIcon from '@iconify/icons-carbon/checkbox-indeterminate-filled';
@@ -13,12 +19,15 @@ import closeIcon from '@iconify/icons-carbon/close';
13
19
  import copyIcon from '@iconify/icons-carbon/copy';
14
20
  import errorFilledIcon from '@iconify/icons-carbon/error-filled';
15
21
  import informationFilledIcon from '@iconify/icons-carbon/information-filled';
22
+ import loadingIcon from '@iconify/icons-eos-icons/loading';
16
23
  import pasteIcon from '@iconify/icons-carbon/paste';
17
24
  import radioButtonCheckedIcon from '@iconify/icons-carbon/radio-button-checked';
18
25
  import radioButtonIcon from '@iconify/icons-carbon/radio-button';
19
26
  import renewIcon from '@iconify/icons-carbon/renew';
27
+ import successCircleIcon from '@iconify/icons-mdi/success-circle';
20
28
  import timeIcon from '@iconify/icons-carbon/time';
21
29
  import trashCanIcon from '@iconify/icons-carbon/trash-can';
30
+ import uploadIcon from '@iconify/icons-carbon/upload';
22
31
  import userAvatarFilledAltIcon from '@iconify/icons-carbon/user-avatar-filled-alt';
23
32
  import viewFilledIcon from '@iconify/icons-carbon/view-filled';
24
33
  import viewOffFilledIcon from '@iconify/icons-carbon/view-off-filled';
@@ -34,17 +43,33 @@ const replicateIcon: IconifyIcon = {
34
43
  height: 48,
35
44
  };
36
45
 
46
+ const subtractIcon: 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="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"/>
49
+ </svg>
50
+ `,
51
+ width: 48,
52
+ height: 48,
53
+ };
54
+
37
55
  addIcon('add', addFilledIcon);
56
+ addIcon('arrow-right', arrowRightIcon);
57
+ addIcon('attachment', attachmentIcon);
38
58
  addIcon('avatar', userAvatarFilledAltIcon);
59
+ addIcon('caret-down', caretDownIcon);
60
+ addIcon('caret-up', caretUpIcon);
39
61
  addIcon('calendar', calendarIcon);
40
62
  addIcon('checkbox-checked', checkboxCheckedFilled);
41
63
  addIcon('checkbox-indeterminate', checkboxIndeterminateFilledIcon);
42
64
  addIcon('checkbox-unchecked', checkboxIcon);
65
+ addIcon('check', checkMarkIcon);
66
+ addIcon('check-mark', checkMarkOutlineIcon);
43
67
  addIcon('close', closeIcon);
44
68
  addIcon('copy', copyIcon);
45
69
  addIcon('delete', trashCanIcon);
46
70
  addIcon('error', errorFilledIcon);
47
71
  addIcon('info', informationFilledIcon);
72
+ addIcon('loading', loadingIcon);
48
73
  addIcon('paste', pasteIcon);
49
74
  addIcon('picker-down', chevronDownIcon);
50
75
  addIcon('picker-up', chevronUpIcon);
@@ -54,8 +79,11 @@ addIcon('radio-not-selected', radioButtonIcon);
54
79
  addIcon('radio-selected', radioButtonCheckedIcon);
55
80
  addIcon('refresh', renewIcon);
56
81
  addIcon('replicate', replicateIcon);
82
+ addIcon('subtract', subtractIcon);
83
+ addIcon('success-circle', successCircleIcon);
57
84
  addIcon('small-close', closeFilledIcon);
58
85
  addIcon('time', timeIcon);
86
+ addIcon('upload', uploadIcon);
59
87
  addIcon('view-off', viewOffFilledIcon);
60
88
  addIcon('view-on', viewFilledIcon);
61
89
  addIcon('warning', warningFilledIcon);
@@ -2,6 +2,7 @@ import { Theme } from 'theme-ui';
2
2
  import { fontSizes } from '../../tokens/fontSizes';
3
3
  import { fontWeights } from '../../tokens/fontWeights';
4
4
  import { letterSpacings } from '../../tokens/letterSpacings';
5
+ import { lineHeights } from '../../tokens/lineHeights';
5
6
  import { space } from '../../tokens/space';
6
7
 
7
8
  const coreFonts = {
@@ -69,6 +70,7 @@ export const BruttalTheme: Theme = {
69
70
  fontWeights,
70
71
  letterSpacings,
71
72
  space,
73
+ lineHeights,
72
74
  colors: {
73
75
  background: coreColors.white,
74
76
  text: coreColors.black,
@@ -106,13 +108,15 @@ export const BruttalTheme: Theme = {
106
108
  h6: coreFonts.contrast,
107
109
  body: coreFonts.main,
108
110
  highlight: coreFonts.main,
109
- caption: coreFonts.monospace,
111
+ caption: coreFonts.main,
110
112
  },
111
113
  borders: {
112
- default: coreBorders.medium,
114
+ default: coreBorders.thin,
115
+ secondary: coreBorders.medium,
113
116
  muted: coreBorders.thin,
114
117
  interaction: coreBorders.medium,
115
118
  danger: coreBorders.medium,
119
+ highlight: coreBorders.medium,
116
120
  },
117
121
  radii: {
118
122
  informative: coreRadii.xs,
@@ -150,6 +154,7 @@ export const BruttalTheme: Theme = {
150
154
  bg: 'positive',
151
155
  fontFamily: 'caption',
152
156
  fontWeight: 'normal',
157
+ lineHeight: 'base',
153
158
  fontSize: 'xs',
154
159
  paddingX: 'xs',
155
160
  paddingY: '2xs',
@@ -160,6 +165,7 @@ export const BruttalTheme: Theme = {
160
165
  bg: 'danger',
161
166
  fontFamily: 'caption',
162
167
  fontWeight: 'normal',
168
+ lineHeight: 'base',
163
169
  fontSize: 'xs',
164
170
  paddingX: 'xs',
165
171
  paddingY: '2xs',
@@ -171,6 +177,7 @@ export const BruttalTheme: Theme = {
171
177
  fontFamily: 'caption',
172
178
  fontSize: 'xs',
173
179
  fontWeight: 'normal',
180
+ lineHeight: 'base',
174
181
  paddingX: 'xs',
175
182
  paddingY: '2xs',
176
183
  borderRadius: 'informative',
@@ -182,6 +189,7 @@ export const BruttalTheme: Theme = {
182
189
  bg: 'notice',
183
190
  fontFamily: 'caption',
184
191
  fontWeight: 'normal',
192
+ lineHeight: 'base',
185
193
  fontSize: 'xs',
186
194
  paddingX: 'xs',
187
195
  paddingY: '2xs',
@@ -195,14 +203,13 @@ export const BruttalTheme: Theme = {
195
203
  borderRadius: 'action',
196
204
  borderColor: 'accent',
197
205
  ':hover:not(:active,[disabled])': {
198
- backgroundColor: 'highlight',
199
- color: 'onHighlight',
200
- borderColor: 'highlight',
206
+ filter: 'brightness(90%)',
201
207
  },
202
208
  ':disabled': {
203
209
  cursor: 'default',
204
210
  backgroundColor: 'muted',
205
211
  borderColor: 'muted',
212
+ color: 'onMuted',
206
213
  },
207
214
  },
208
215
  primary: {
@@ -211,9 +218,7 @@ export const BruttalTheme: Theme = {
211
218
  borderRadius: 'action',
212
219
  borderColor: 'primary',
213
220
  ':hover:not(:active,[disabled])': {
214
- backgroundColor: 'highlight',
215
- color: 'onHighlight',
216
- borderColor: 'highlight',
221
+ filter: 'brightness(90%)',
217
222
  },
218
223
  ':active': {
219
224
  backgroundColor: 'primary',
@@ -224,58 +229,62 @@ export const BruttalTheme: Theme = {
224
229
  cursor: 'default',
225
230
  backgroundColor: 'muted',
226
231
  borderColor: 'muted',
232
+ color: 'onMuted',
227
233
  },
228
234
  },
229
235
  secondary: {
230
236
  backgroundColor: 'secondary',
231
237
  color: 'onSecondary',
232
238
  borderRadius: 'action',
233
- borderColor: 'secondary',
239
+ border: 'secondary',
240
+ borderColor: 'onSecondary',
234
241
  ':hover:not(:active,[disabled])': {
235
- backgroundColor: 'highlight',
236
- color: 'onHighlight',
237
- borderColor: 'highlight',
242
+ filter: 'brightness(90%)',
238
243
  },
239
244
  ':disabled': {
240
245
  cursor: 'default',
241
246
  backgroundColor: 'muted',
242
247
  borderColor: 'muted',
248
+ color: 'onMuted',
243
249
  },
244
250
  },
245
- neutral: {
246
- backgroundColor: 'muted',
247
- color: 'onMuted',
248
- borderRadius: 'action',
249
- borderColor: 'muted',
251
+ destructive: {
252
+ color: 'onDanger',
253
+ backgroundColor: 'danger',
250
254
  ':hover:not(:active,[disabled])': {
251
- backgroundColor: 'highlight',
252
- color: 'onHighlight',
253
- borderColor: 'highlight',
255
+ filter: 'brightness(90%)',
254
256
  },
255
257
  ':disabled': {
256
258
  cursor: 'default',
257
259
  backgroundColor: 'muted',
258
260
  borderColor: 'muted',
261
+ color: 'onMuted',
259
262
  },
260
263
  },
261
- danger: {
262
- color: 'onDanger',
263
- backgroundColor: 'danger',
264
- },
265
264
  closeButton: {
266
- backgroundColor: 'transparent',
267
- color: 'text',
265
+ backgroundColor: 'background',
266
+ fontFamily: 'caption',
267
+ color: 'primary',
268
268
  fontSize: 'xs',
269
269
  display: 'inline-flex',
270
270
  alignItems: 'center',
271
271
  cursor: 'pointer',
272
+ gap: 'sm',
273
+ padding: 'sm',
274
+ border: 'default',
275
+ borderColor: 'primary',
276
+ width: 'fit-content',
272
277
  ':disabled': {
273
- color: 'muted',
278
+ border: 'muted',
279
+ backgroundColor: 'muted',
280
+ color: 'onMuted',
274
281
  cursor: 'not-allowed',
275
282
  },
276
283
  ':is(:focus-within, :hover):not(:disabled)': {
277
- color: 'accent',
278
- outlineColor: 'transparent',
284
+ color: 'onHighlight',
285
+ backgroundColor: 'highlight',
286
+ border: 'highlight',
287
+ borderColor: 'highlight',
279
288
  },
280
289
  },
281
290
  },
@@ -294,6 +303,7 @@ export const BruttalTheme: Theme = {
294
303
  label: {
295
304
  color: 'text',
296
305
  fontFamily: 'body',
306
+ alignItems: 'center',
297
307
  '&:is([aria-disabled="true"])': {
298
308
  color: 'onMuted',
299
309
  },
@@ -321,8 +331,14 @@ export const BruttalTheme: Theme = {
321
331
  'input[aria-invalid="true"] ~ &': {
322
332
  color: 'danger',
323
333
  },
334
+ 'input:focus ~ &': {
335
+ bg: 'transparent',
336
+ },
324
337
  },
325
338
  checkbox: {
339
+ 'input:focus ~ &': {
340
+ bg: 'transparent',
341
+ },
326
342
  'input:not(:checked) ~ &': {
327
343
  color: 'primary',
328
344
  },
@@ -353,8 +369,8 @@ export const BruttalTheme: Theme = {
353
369
  },
354
370
  ':disabled': {
355
371
  backgroundColor: 'muted',
356
- borderColor: 'onMuted',
357
372
  border: 'muted',
373
+ borderColor: 'onMuted',
358
374
  },
359
375
  '&.error': {
360
376
  borderColor: 'danger',
@@ -372,8 +388,8 @@ export const BruttalTheme: Theme = {
372
388
  paddingY: 'lg',
373
389
  paddingX: 'xl',
374
390
  ':disabled': {
375
- borderColor: 'onMuted',
376
391
  border: 'muted',
392
+ borderColor: 'onMuted',
377
393
  color: 'muted',
378
394
  },
379
395
  ':disabled ~ span > iconify-icon': {
@@ -0,0 +1,9 @@
1
+ export const lineHeights = {
2
+ '2xs': '0.422',
3
+ xs: '0.562',
4
+ sm: 'calc(1 / 1.333)',
5
+ base: 'normal',
6
+ lg: 'calc(1 * 1.333)',
7
+ xl: '1.776',
8
+ '2xl': '2.368',
9
+ };