@ttoss/theme 1.4.23 → 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.
@@ -185,6 +185,17 @@ var letterSpacings = {
185
185
  widest: "0.1em"
186
186
  };
187
187
 
188
+ // src/tokens/lineHeights.ts
189
+ var lineHeights = {
190
+ "2xs": "0.422",
191
+ xs: "0.562",
192
+ sm: "calc(1 / 1.333)",
193
+ base: "normal",
194
+ lg: "calc(1 * 1.333)",
195
+ xl: "1.776",
196
+ "2xl": "2.368"
197
+ };
198
+
188
199
  // src/tokens/space.ts
189
200
  var space = {
190
201
  none: 0,
@@ -263,6 +274,7 @@ var BruttalTheme = {
263
274
  fontWeights,
264
275
  letterSpacings,
265
276
  space,
277
+ lineHeights,
266
278
  colors: {
267
279
  background: coreColors.white,
268
280
  text: coreColors.black,
@@ -300,13 +312,15 @@ var BruttalTheme = {
300
312
  h6: coreFonts.contrast,
301
313
  body: coreFonts.main,
302
314
  highlight: coreFonts.main,
303
- caption: coreFonts.monospace
315
+ caption: coreFonts.main
304
316
  },
305
317
  borders: {
306
- default: coreBorders.medium,
318
+ default: coreBorders.thin,
319
+ secondary: coreBorders.medium,
307
320
  muted: coreBorders.thin,
308
321
  interaction: coreBorders.medium,
309
- danger: coreBorders.medium
322
+ danger: coreBorders.medium,
323
+ highlight: coreBorders.medium
310
324
  },
311
325
  radii: {
312
326
  informative: coreRadii.xs,
@@ -344,6 +358,7 @@ var BruttalTheme = {
344
358
  bg: "positive",
345
359
  fontFamily: "caption",
346
360
  fontWeight: "normal",
361
+ lineHeight: "base",
347
362
  fontSize: "xs",
348
363
  paddingX: "xs",
349
364
  paddingY: "2xs",
@@ -354,6 +369,7 @@ var BruttalTheme = {
354
369
  bg: "danger",
355
370
  fontFamily: "caption",
356
371
  fontWeight: "normal",
372
+ lineHeight: "base",
357
373
  fontSize: "xs",
358
374
  paddingX: "xs",
359
375
  paddingY: "2xs",
@@ -365,6 +381,7 @@ var BruttalTheme = {
365
381
  fontFamily: "caption",
366
382
  fontSize: "xs",
367
383
  fontWeight: "normal",
384
+ lineHeight: "base",
368
385
  paddingX: "xs",
369
386
  paddingY: "2xs",
370
387
  borderRadius: "informative",
@@ -376,6 +393,7 @@ var BruttalTheme = {
376
393
  bg: "notice",
377
394
  fontFamily: "caption",
378
395
  fontWeight: "normal",
396
+ lineHeight: "base",
379
397
  fontSize: "xs",
380
398
  paddingX: "xs",
381
399
  paddingY: "2xs",
@@ -389,14 +407,13 @@ var BruttalTheme = {
389
407
  borderRadius: "action",
390
408
  borderColor: "accent",
391
409
  ":hover:not(:active,[disabled])": {
392
- backgroundColor: "highlight",
393
- color: "onHighlight",
394
- borderColor: "highlight"
410
+ filter: "brightness(90%)"
395
411
  },
396
412
  ":disabled": {
397
413
  cursor: "default",
398
414
  backgroundColor: "muted",
399
- borderColor: "muted"
415
+ borderColor: "muted",
416
+ color: "onMuted"
400
417
  }
401
418
  },
402
419
  primary: {
@@ -405,9 +422,7 @@ var BruttalTheme = {
405
422
  borderRadius: "action",
406
423
  borderColor: "primary",
407
424
  ":hover:not(:active,[disabled])": {
408
- backgroundColor: "highlight",
409
- color: "onHighlight",
410
- borderColor: "highlight"
425
+ filter: "brightness(90%)"
411
426
  },
412
427
  ":active": {
413
428
  backgroundColor: "primary",
@@ -417,59 +432,63 @@ var BruttalTheme = {
417
432
  ":disabled": {
418
433
  cursor: "default",
419
434
  backgroundColor: "muted",
420
- borderColor: "muted"
435
+ borderColor: "muted",
436
+ color: "onMuted"
421
437
  }
422
438
  },
423
439
  secondary: {
424
440
  backgroundColor: "secondary",
425
441
  color: "onSecondary",
426
442
  borderRadius: "action",
427
- borderColor: "secondary",
443
+ border: "secondary",
444
+ borderColor: "onSecondary",
428
445
  ":hover:not(:active,[disabled])": {
429
- backgroundColor: "highlight",
430
- color: "onHighlight",
431
- borderColor: "highlight"
446
+ filter: "brightness(90%)"
432
447
  },
433
448
  ":disabled": {
434
449
  cursor: "default",
435
450
  backgroundColor: "muted",
436
- borderColor: "muted"
451
+ borderColor: "muted",
452
+ color: "onMuted"
437
453
  }
438
454
  },
439
- neutral: {
440
- backgroundColor: "muted",
441
- color: "onMuted",
442
- borderRadius: "action",
443
- borderColor: "muted",
455
+ destructive: {
456
+ color: "onDanger",
457
+ backgroundColor: "danger",
444
458
  ":hover:not(:active,[disabled])": {
445
- backgroundColor: "highlight",
446
- color: "onHighlight",
447
- borderColor: "highlight"
459
+ filter: "brightness(90%)"
448
460
  },
449
461
  ":disabled": {
450
462
  cursor: "default",
451
463
  backgroundColor: "muted",
452
- borderColor: "muted"
464
+ borderColor: "muted",
465
+ color: "onMuted"
453
466
  }
454
467
  },
455
- danger: {
456
- color: "onDanger",
457
- backgroundColor: "danger"
458
- },
459
468
  closeButton: {
460
- backgroundColor: "transparent",
461
- color: "text",
469
+ backgroundColor: "background",
470
+ fontFamily: "caption",
471
+ color: "primary",
462
472
  fontSize: "xs",
463
473
  display: "inline-flex",
464
474
  alignItems: "center",
465
475
  cursor: "pointer",
476
+ gap: "sm",
477
+ padding: "sm",
478
+ border: "default",
479
+ borderColor: "primary",
480
+ width: "fit-content",
466
481
  ":disabled": {
467
- color: "muted",
482
+ border: "muted",
483
+ backgroundColor: "muted",
484
+ color: "onMuted",
468
485
  cursor: "not-allowed"
469
486
  },
470
487
  ":is(:focus-within, :hover):not(:disabled)": {
471
- color: "accent",
472
- outlineColor: "transparent"
488
+ color: "onHighlight",
489
+ backgroundColor: "highlight",
490
+ border: "highlight",
491
+ borderColor: "highlight"
473
492
  }
474
493
  }
475
494
  },
@@ -488,6 +507,7 @@ var BruttalTheme = {
488
507
  label: {
489
508
  color: "text",
490
509
  fontFamily: "body",
510
+ alignItems: "center",
491
511
  '&:is([aria-disabled="true"])': {
492
512
  color: "onMuted"
493
513
  },
@@ -514,9 +534,15 @@ var BruttalTheme = {
514
534
  },
515
535
  'input[aria-invalid="true"] ~ &': {
516
536
  color: "danger"
537
+ },
538
+ "input:focus ~ &": {
539
+ bg: "transparent"
517
540
  }
518
541
  },
519
542
  checkbox: {
543
+ "input:focus ~ &": {
544
+ bg: "transparent"
545
+ },
520
546
  "input:not(:checked) ~ &": {
521
547
  color: "primary"
522
548
  },
@@ -547,8 +573,8 @@ var BruttalTheme = {
547
573
  },
548
574
  ":disabled": {
549
575
  backgroundColor: "muted",
550
- borderColor: "onMuted",
551
- border: "muted"
576
+ border: "muted",
577
+ borderColor: "onMuted"
552
578
  },
553
579
  "&.error": {
554
580
  borderColor: "danger"
@@ -566,8 +592,8 @@ var BruttalTheme = {
566
592
  paddingY: "lg",
567
593
  paddingX: "xl",
568
594
  ":disabled": {
569
- borderColor: "onMuted",
570
595
  border: "muted",
596
+ borderColor: "onMuted",
571
597
  color: "muted"
572
598
  },
573
599
  ":disabled ~ span > iconify-icon": {
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { BruttalTheme } from "./chunk-ZHO2ZEWA.js";
2
+ import { BruttalTheme } from "./chunk-DVNKTIJT.js";
3
3
 
4
4
  // src/createTheme.ts
5
5
  import deepmerge from "deepmerge";
@@ -1,3 +1,3 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { BruttalFonts, BruttalTheme } from "../../chunk-ZHO2ZEWA.js";
2
+ import { BruttalFonts, BruttalTheme } from "../../chunk-DVNKTIJT.js";
3
3
  export { BruttalFonts, BruttalTheme };
package/dist/index.js CHANGED
@@ -200,6 +200,17 @@ var letterSpacings = {
200
200
  widest: "0.1em"
201
201
  };
202
202
 
203
+ // src/tokens/lineHeights.ts
204
+ var lineHeights = {
205
+ "2xs": "0.422",
206
+ xs: "0.562",
207
+ sm: "calc(1 / 1.333)",
208
+ base: "normal",
209
+ lg: "calc(1 * 1.333)",
210
+ xl: "1.776",
211
+ "2xl": "2.368"
212
+ };
213
+
203
214
  // src/tokens/space.ts
204
215
  var space = {
205
216
  none: 0,
@@ -278,6 +289,7 @@ var BruttalTheme = {
278
289
  fontWeights,
279
290
  letterSpacings,
280
291
  space,
292
+ lineHeights,
281
293
  colors: {
282
294
  background: coreColors.white,
283
295
  text: coreColors.black,
@@ -315,13 +327,15 @@ var BruttalTheme = {
315
327
  h6: coreFonts.contrast,
316
328
  body: coreFonts.main,
317
329
  highlight: coreFonts.main,
318
- caption: coreFonts.monospace
330
+ caption: coreFonts.main
319
331
  },
320
332
  borders: {
321
- default: coreBorders.medium,
333
+ default: coreBorders.thin,
334
+ secondary: coreBorders.medium,
322
335
  muted: coreBorders.thin,
323
336
  interaction: coreBorders.medium,
324
- danger: coreBorders.medium
337
+ danger: coreBorders.medium,
338
+ highlight: coreBorders.medium
325
339
  },
326
340
  radii: {
327
341
  informative: coreRadii.xs,
@@ -359,6 +373,7 @@ var BruttalTheme = {
359
373
  bg: "positive",
360
374
  fontFamily: "caption",
361
375
  fontWeight: "normal",
376
+ lineHeight: "base",
362
377
  fontSize: "xs",
363
378
  paddingX: "xs",
364
379
  paddingY: "2xs",
@@ -369,6 +384,7 @@ var BruttalTheme = {
369
384
  bg: "danger",
370
385
  fontFamily: "caption",
371
386
  fontWeight: "normal",
387
+ lineHeight: "base",
372
388
  fontSize: "xs",
373
389
  paddingX: "xs",
374
390
  paddingY: "2xs",
@@ -380,6 +396,7 @@ var BruttalTheme = {
380
396
  fontFamily: "caption",
381
397
  fontSize: "xs",
382
398
  fontWeight: "normal",
399
+ lineHeight: "base",
383
400
  paddingX: "xs",
384
401
  paddingY: "2xs",
385
402
  borderRadius: "informative",
@@ -391,6 +408,7 @@ var BruttalTheme = {
391
408
  bg: "notice",
392
409
  fontFamily: "caption",
393
410
  fontWeight: "normal",
411
+ lineHeight: "base",
394
412
  fontSize: "xs",
395
413
  paddingX: "xs",
396
414
  paddingY: "2xs",
@@ -404,14 +422,13 @@ var BruttalTheme = {
404
422
  borderRadius: "action",
405
423
  borderColor: "accent",
406
424
  ":hover:not(:active,[disabled])": {
407
- backgroundColor: "highlight",
408
- color: "onHighlight",
409
- borderColor: "highlight"
425
+ filter: "brightness(90%)"
410
426
  },
411
427
  ":disabled": {
412
428
  cursor: "default",
413
429
  backgroundColor: "muted",
414
- borderColor: "muted"
430
+ borderColor: "muted",
431
+ color: "onMuted"
415
432
  }
416
433
  },
417
434
  primary: {
@@ -420,9 +437,7 @@ var BruttalTheme = {
420
437
  borderRadius: "action",
421
438
  borderColor: "primary",
422
439
  ":hover:not(:active,[disabled])": {
423
- backgroundColor: "highlight",
424
- color: "onHighlight",
425
- borderColor: "highlight"
440
+ filter: "brightness(90%)"
426
441
  },
427
442
  ":active": {
428
443
  backgroundColor: "primary",
@@ -432,59 +447,63 @@ var BruttalTheme = {
432
447
  ":disabled": {
433
448
  cursor: "default",
434
449
  backgroundColor: "muted",
435
- borderColor: "muted"
450
+ borderColor: "muted",
451
+ color: "onMuted"
436
452
  }
437
453
  },
438
454
  secondary: {
439
455
  backgroundColor: "secondary",
440
456
  color: "onSecondary",
441
457
  borderRadius: "action",
442
- borderColor: "secondary",
458
+ border: "secondary",
459
+ borderColor: "onSecondary",
443
460
  ":hover:not(:active,[disabled])": {
444
- backgroundColor: "highlight",
445
- color: "onHighlight",
446
- borderColor: "highlight"
461
+ filter: "brightness(90%)"
447
462
  },
448
463
  ":disabled": {
449
464
  cursor: "default",
450
465
  backgroundColor: "muted",
451
- borderColor: "muted"
466
+ borderColor: "muted",
467
+ color: "onMuted"
452
468
  }
453
469
  },
454
- neutral: {
455
- backgroundColor: "muted",
456
- color: "onMuted",
457
- borderRadius: "action",
458
- borderColor: "muted",
470
+ destructive: {
471
+ color: "onDanger",
472
+ backgroundColor: "danger",
459
473
  ":hover:not(:active,[disabled])": {
460
- backgroundColor: "highlight",
461
- color: "onHighlight",
462
- borderColor: "highlight"
474
+ filter: "brightness(90%)"
463
475
  },
464
476
  ":disabled": {
465
477
  cursor: "default",
466
478
  backgroundColor: "muted",
467
- borderColor: "muted"
479
+ borderColor: "muted",
480
+ color: "onMuted"
468
481
  }
469
482
  },
470
- danger: {
471
- color: "onDanger",
472
- backgroundColor: "danger"
473
- },
474
483
  closeButton: {
475
- backgroundColor: "transparent",
476
- color: "text",
484
+ backgroundColor: "background",
485
+ fontFamily: "caption",
486
+ color: "primary",
477
487
  fontSize: "xs",
478
488
  display: "inline-flex",
479
489
  alignItems: "center",
480
490
  cursor: "pointer",
491
+ gap: "sm",
492
+ padding: "sm",
493
+ border: "default",
494
+ borderColor: "primary",
495
+ width: "fit-content",
481
496
  ":disabled": {
482
- color: "muted",
497
+ border: "muted",
498
+ backgroundColor: "muted",
499
+ color: "onMuted",
483
500
  cursor: "not-allowed"
484
501
  },
485
502
  ":is(:focus-within, :hover):not(:disabled)": {
486
- color: "accent",
487
- outlineColor: "transparent"
503
+ color: "onHighlight",
504
+ backgroundColor: "highlight",
505
+ border: "highlight",
506
+ borderColor: "highlight"
488
507
  }
489
508
  }
490
509
  },
@@ -503,6 +522,7 @@ var BruttalTheme = {
503
522
  label: {
504
523
  color: "text",
505
524
  fontFamily: "body",
525
+ alignItems: "center",
506
526
  '&:is([aria-disabled="true"])': {
507
527
  color: "onMuted"
508
528
  },
@@ -529,9 +549,15 @@ var BruttalTheme = {
529
549
  },
530
550
  'input[aria-invalid="true"] ~ &': {
531
551
  color: "danger"
552
+ },
553
+ "input:focus ~ &": {
554
+ bg: "transparent"
532
555
  }
533
556
  },
534
557
  checkbox: {
558
+ "input:focus ~ &": {
559
+ bg: "transparent"
560
+ },
535
561
  "input:not(:checked) ~ &": {
536
562
  color: "primary"
537
563
  },
@@ -562,8 +588,8 @@ var BruttalTheme = {
562
588
  },
563
589
  ":disabled": {
564
590
  backgroundColor: "muted",
565
- borderColor: "onMuted",
566
- border: "muted"
591
+ border: "muted",
592
+ borderColor: "onMuted"
567
593
  },
568
594
  "&.error": {
569
595
  borderColor: "danger"
@@ -581,8 +607,8 @@ var BruttalTheme = {
581
607
  paddingY: "lg",
582
608
  paddingX: "xl",
583
609
  ":disabled": {
584
- borderColor: "onMuted",
585
610
  border: "muted",
611
+ borderColor: "onMuted",
586
612
  color: "muted"
587
613
  },
588
614
  ":disabled ~ span > iconify-icon": {
@@ -204,6 +204,17 @@ var letterSpacings = {
204
204
  widest: "0.1em"
205
205
  };
206
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
+
207
218
  // src/tokens/space.ts
208
219
  var space = {
209
220
  none: 0,
@@ -282,6 +293,7 @@ var BruttalTheme = {
282
293
  fontWeights,
283
294
  letterSpacings,
284
295
  space,
296
+ lineHeights,
285
297
  colors: {
286
298
  background: coreColors.white,
287
299
  text: coreColors.black,
@@ -319,13 +331,15 @@ var BruttalTheme = {
319
331
  h6: coreFonts.contrast,
320
332
  body: coreFonts.main,
321
333
  highlight: coreFonts.main,
322
- caption: coreFonts.monospace
334
+ caption: coreFonts.main
323
335
  },
324
336
  borders: {
325
- default: coreBorders.medium,
337
+ default: coreBorders.thin,
338
+ secondary: coreBorders.medium,
326
339
  muted: coreBorders.thin,
327
340
  interaction: coreBorders.medium,
328
- danger: coreBorders.medium
341
+ danger: coreBorders.medium,
342
+ highlight: coreBorders.medium
329
343
  },
330
344
  radii: {
331
345
  informative: coreRadii.xs,
@@ -363,6 +377,7 @@ var BruttalTheme = {
363
377
  bg: "positive",
364
378
  fontFamily: "caption",
365
379
  fontWeight: "normal",
380
+ lineHeight: "base",
366
381
  fontSize: "xs",
367
382
  paddingX: "xs",
368
383
  paddingY: "2xs",
@@ -373,6 +388,7 @@ var BruttalTheme = {
373
388
  bg: "danger",
374
389
  fontFamily: "caption",
375
390
  fontWeight: "normal",
391
+ lineHeight: "base",
376
392
  fontSize: "xs",
377
393
  paddingX: "xs",
378
394
  paddingY: "2xs",
@@ -384,6 +400,7 @@ var BruttalTheme = {
384
400
  fontFamily: "caption",
385
401
  fontSize: "xs",
386
402
  fontWeight: "normal",
403
+ lineHeight: "base",
387
404
  paddingX: "xs",
388
405
  paddingY: "2xs",
389
406
  borderRadius: "informative",
@@ -395,6 +412,7 @@ var BruttalTheme = {
395
412
  bg: "notice",
396
413
  fontFamily: "caption",
397
414
  fontWeight: "normal",
415
+ lineHeight: "base",
398
416
  fontSize: "xs",
399
417
  paddingX: "xs",
400
418
  paddingY: "2xs",
@@ -408,14 +426,13 @@ var BruttalTheme = {
408
426
  borderRadius: "action",
409
427
  borderColor: "accent",
410
428
  ":hover:not(:active,[disabled])": {
411
- backgroundColor: "highlight",
412
- color: "onHighlight",
413
- borderColor: "highlight"
429
+ filter: "brightness(90%)"
414
430
  },
415
431
  ":disabled": {
416
432
  cursor: "default",
417
433
  backgroundColor: "muted",
418
- borderColor: "muted"
434
+ borderColor: "muted",
435
+ color: "onMuted"
419
436
  }
420
437
  },
421
438
  primary: {
@@ -424,9 +441,7 @@ var BruttalTheme = {
424
441
  borderRadius: "action",
425
442
  borderColor: "primary",
426
443
  ":hover:not(:active,[disabled])": {
427
- backgroundColor: "highlight",
428
- color: "onHighlight",
429
- borderColor: "highlight"
444
+ filter: "brightness(90%)"
430
445
  },
431
446
  ":active": {
432
447
  backgroundColor: "primary",
@@ -436,59 +451,63 @@ var BruttalTheme = {
436
451
  ":disabled": {
437
452
  cursor: "default",
438
453
  backgroundColor: "muted",
439
- borderColor: "muted"
454
+ borderColor: "muted",
455
+ color: "onMuted"
440
456
  }
441
457
  },
442
458
  secondary: {
443
459
  backgroundColor: "secondary",
444
460
  color: "onSecondary",
445
461
  borderRadius: "action",
446
- borderColor: "secondary",
462
+ border: "secondary",
463
+ borderColor: "onSecondary",
447
464
  ":hover:not(:active,[disabled])": {
448
- backgroundColor: "highlight",
449
- color: "onHighlight",
450
- borderColor: "highlight"
465
+ filter: "brightness(90%)"
451
466
  },
452
467
  ":disabled": {
453
468
  cursor: "default",
454
469
  backgroundColor: "muted",
455
- borderColor: "muted"
470
+ borderColor: "muted",
471
+ color: "onMuted"
456
472
  }
457
473
  },
458
- neutral: {
459
- backgroundColor: "muted",
460
- color: "onMuted",
461
- borderRadius: "action",
462
- borderColor: "muted",
474
+ destructive: {
475
+ color: "onDanger",
476
+ backgroundColor: "danger",
463
477
  ":hover:not(:active,[disabled])": {
464
- backgroundColor: "highlight",
465
- color: "onHighlight",
466
- borderColor: "highlight"
478
+ filter: "brightness(90%)"
467
479
  },
468
480
  ":disabled": {
469
481
  cursor: "default",
470
482
  backgroundColor: "muted",
471
- borderColor: "muted"
483
+ borderColor: "muted",
484
+ color: "onMuted"
472
485
  }
473
486
  },
474
- danger: {
475
- color: "onDanger",
476
- backgroundColor: "danger"
477
- },
478
487
  closeButton: {
479
- backgroundColor: "transparent",
480
- color: "text",
488
+ backgroundColor: "background",
489
+ fontFamily: "caption",
490
+ color: "primary",
481
491
  fontSize: "xs",
482
492
  display: "inline-flex",
483
493
  alignItems: "center",
484
494
  cursor: "pointer",
495
+ gap: "sm",
496
+ padding: "sm",
497
+ border: "default",
498
+ borderColor: "primary",
499
+ width: "fit-content",
485
500
  ":disabled": {
486
- color: "muted",
501
+ border: "muted",
502
+ backgroundColor: "muted",
503
+ color: "onMuted",
487
504
  cursor: "not-allowed"
488
505
  },
489
506
  ":is(:focus-within, :hover):not(:disabled)": {
490
- color: "accent",
491
- outlineColor: "transparent"
507
+ color: "onHighlight",
508
+ backgroundColor: "highlight",
509
+ border: "highlight",
510
+ borderColor: "highlight"
492
511
  }
493
512
  }
494
513
  },
@@ -507,6 +526,7 @@ var BruttalTheme = {
507
526
  label: {
508
527
  color: "text",
509
528
  fontFamily: "body",
529
+ alignItems: "center",
510
530
  '&:is([aria-disabled="true"])': {
511
531
  color: "onMuted"
512
532
  },
@@ -533,9 +553,15 @@ var BruttalTheme = {
533
553
  },
534
554
  'input[aria-invalid="true"] ~ &': {
535
555
  color: "danger"
556
+ },
557
+ "input:focus ~ &": {
558
+ bg: "transparent"
536
559
  }
537
560
  },
538
561
  checkbox: {
562
+ "input:focus ~ &": {
563
+ bg: "transparent"
564
+ },
539
565
  "input:not(:checked) ~ &": {
540
566
  color: "primary"
541
567
  },
@@ -566,8 +592,8 @@ var BruttalTheme = {
566
592
  },
567
593
  ":disabled": {
568
594
  backgroundColor: "muted",
569
- borderColor: "onMuted",
570
- border: "muted"
595
+ border: "muted",
596
+ borderColor: "onMuted"
571
597
  },
572
598
  "&.error": {
573
599
  borderColor: "danger"
@@ -585,8 +611,8 @@ var BruttalTheme = {
585
611
  paddingY: "lg",
586
612
  paddingX: "xl",
587
613
  ":disabled": {
588
- borderColor: "onMuted",
589
614
  border: "muted",
615
+ borderColor: "onMuted",
590
616
  color: "muted"
591
617
  },
592
618
  ":disabled ~ span > iconify-icon": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/theme",
3
- "version": "1.4.23",
3
+ "version": "1.4.24",
4
4
  "description": "Theme for packages.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -59,5 +59,5 @@
59
59
  ]
60
60
  }
61
61
  },
62
- "gitHead": "b40f78fe1adc22d91e947b4d4453d0e51669a358"
62
+ "gitHead": "b473ec0322fbe1a459d81339aab3de60d6bebc9a"
63
63
  }
@@ -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
+ };