@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.
@@ -1,9 +1,72 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
10
+ exports: {}
11
+ }).exports, mod), mod.exports;
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+
32
+ // ../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js
33
+ var require_loading = __commonJS({
34
+ "../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js"(exports) {
35
+ var data = {
36
+ "width": 24,
37
+ "height": 24,
38
+ "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>'
39
+ };
40
+ exports.__esModule = true;
41
+ exports.default = data;
42
+ }
43
+ });
44
+
45
+ // ../../node_modules/.pnpm/@iconify+icons-mdi@1.2.44/node_modules/@iconify/icons-mdi/success-circle.js
46
+ var require_success_circle = __commonJS({
47
+ "../../node_modules/.pnpm/@iconify+icons-mdi@1.2.44/node_modules/@iconify/icons-mdi/success-circle.js"(exports) {
48
+ var data = {
49
+ "width": 24,
50
+ "height": 24,
51
+ "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"/>'
52
+ };
53
+ exports.__esModule = true;
54
+ exports.default = data;
55
+ }
56
+ });
2
57
 
3
58
  // src/themes/Bruttal/BruttalIcons.ts
59
+ var import_loading = __toESM(require_loading());
60
+ var import_success_circle = __toESM(require_success_circle());
4
61
  import { addIcon } from "@iconify-icon/react";
5
62
  import addFilledIcon from "@iconify/icons-carbon/add-filled";
63
+ import arrowRightIcon from "@iconify/icons-carbon/arrow-right";
64
+ import attachmentIcon from "@iconify/icons-carbon/attachment";
6
65
  import calendarIcon from "@iconify/icons-carbon/calendar";
66
+ import caretDownIcon from "@iconify/icons-carbon/caret-down";
67
+ import caretUpIcon from "@iconify/icons-carbon/caret-up";
68
+ import checkMarkIcon from "@iconify/icons-carbon/checkmark";
69
+ import checkMarkOutlineIcon from "@iconify/icons-carbon/checkmark-outline";
7
70
  import checkboxCheckedFilled from "@iconify/icons-carbon/checkbox-checked-filled";
8
71
  import checkboxIcon from "@iconify/icons-carbon/checkbox";
9
72
  import checkboxIndeterminateFilledIcon from "@iconify/icons-carbon/checkbox-indeterminate-filled";
@@ -22,6 +85,7 @@ import radioButtonIcon from "@iconify/icons-carbon/radio-button";
22
85
  import renewIcon from "@iconify/icons-carbon/renew";
23
86
  import timeIcon from "@iconify/icons-carbon/time";
24
87
  import trashCanIcon from "@iconify/icons-carbon/trash-can";
88
+ import uploadIcon from "@iconify/icons-carbon/upload";
25
89
  import userAvatarFilledAltIcon from "@iconify/icons-carbon/user-avatar-filled-alt";
26
90
  import viewFilledIcon from "@iconify/icons-carbon/view-filled";
27
91
  import viewOffFilledIcon from "@iconify/icons-carbon/view-off-filled";
@@ -34,17 +98,32 @@ var replicateIcon = {
34
98
  width: 48,
35
99
  height: 48
36
100
  };
101
+ var subtractIcon = {
102
+ body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
103
+ <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"/>
104
+ </svg>
105
+ `,
106
+ width: 48,
107
+ height: 48
108
+ };
37
109
  addIcon("add", addFilledIcon);
110
+ addIcon("arrow-right", arrowRightIcon);
111
+ addIcon("attachment", attachmentIcon);
38
112
  addIcon("avatar", userAvatarFilledAltIcon);
113
+ addIcon("caret-down", caretDownIcon);
114
+ addIcon("caret-up", caretUpIcon);
39
115
  addIcon("calendar", calendarIcon);
40
116
  addIcon("checkbox-checked", checkboxCheckedFilled);
41
117
  addIcon("checkbox-indeterminate", checkboxIndeterminateFilledIcon);
42
118
  addIcon("checkbox-unchecked", checkboxIcon);
119
+ addIcon("check", checkMarkIcon);
120
+ addIcon("check-mark", checkMarkOutlineIcon);
43
121
  addIcon("close", closeIcon);
44
122
  addIcon("copy", copyIcon);
45
123
  addIcon("delete", trashCanIcon);
46
124
  addIcon("error", errorFilledIcon);
47
125
  addIcon("info", informationFilledIcon);
126
+ addIcon("loading", import_loading.default);
48
127
  addIcon("paste", pasteIcon);
49
128
  addIcon("picker-down", chevronDownIcon);
50
129
  addIcon("picker-up", chevronUpIcon);
@@ -54,8 +133,11 @@ addIcon("radio-not-selected", radioButtonIcon);
54
133
  addIcon("radio-selected", radioButtonCheckedIcon);
55
134
  addIcon("refresh", renewIcon);
56
135
  addIcon("replicate", replicateIcon);
136
+ addIcon("subtract", subtractIcon);
137
+ addIcon("success-circle", import_success_circle.default);
57
138
  addIcon("small-close", closeFilledIcon);
58
139
  addIcon("time", timeIcon);
140
+ addIcon("upload", uploadIcon);
59
141
  addIcon("view-off", viewOffFilledIcon);
60
142
  addIcon("view-on", viewFilledIcon);
61
143
  addIcon("warning", warningFilledIcon);
@@ -103,6 +185,17 @@ var letterSpacings = {
103
185
  widest: "0.1em"
104
186
  };
105
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
+
106
199
  // src/tokens/space.ts
107
200
  var space = {
108
201
  none: 0,
@@ -181,6 +274,7 @@ var BruttalTheme = {
181
274
  fontWeights,
182
275
  letterSpacings,
183
276
  space,
277
+ lineHeights,
184
278
  colors: {
185
279
  background: coreColors.white,
186
280
  text: coreColors.black,
@@ -218,13 +312,15 @@ var BruttalTheme = {
218
312
  h6: coreFonts.contrast,
219
313
  body: coreFonts.main,
220
314
  highlight: coreFonts.main,
221
- caption: coreFonts.monospace
315
+ caption: coreFonts.main
222
316
  },
223
317
  borders: {
224
- default: coreBorders.medium,
318
+ default: coreBorders.thin,
319
+ secondary: coreBorders.medium,
225
320
  muted: coreBorders.thin,
226
321
  interaction: coreBorders.medium,
227
- danger: coreBorders.medium
322
+ danger: coreBorders.medium,
323
+ highlight: coreBorders.medium
228
324
  },
229
325
  radii: {
230
326
  informative: coreRadii.xs,
@@ -262,6 +358,7 @@ var BruttalTheme = {
262
358
  bg: "positive",
263
359
  fontFamily: "caption",
264
360
  fontWeight: "normal",
361
+ lineHeight: "base",
265
362
  fontSize: "xs",
266
363
  paddingX: "xs",
267
364
  paddingY: "2xs",
@@ -272,6 +369,7 @@ var BruttalTheme = {
272
369
  bg: "danger",
273
370
  fontFamily: "caption",
274
371
  fontWeight: "normal",
372
+ lineHeight: "base",
275
373
  fontSize: "xs",
276
374
  paddingX: "xs",
277
375
  paddingY: "2xs",
@@ -283,6 +381,7 @@ var BruttalTheme = {
283
381
  fontFamily: "caption",
284
382
  fontSize: "xs",
285
383
  fontWeight: "normal",
384
+ lineHeight: "base",
286
385
  paddingX: "xs",
287
386
  paddingY: "2xs",
288
387
  borderRadius: "informative",
@@ -294,6 +393,7 @@ var BruttalTheme = {
294
393
  bg: "notice",
295
394
  fontFamily: "caption",
296
395
  fontWeight: "normal",
396
+ lineHeight: "base",
297
397
  fontSize: "xs",
298
398
  paddingX: "xs",
299
399
  paddingY: "2xs",
@@ -307,14 +407,13 @@ var BruttalTheme = {
307
407
  borderRadius: "action",
308
408
  borderColor: "accent",
309
409
  ":hover:not(:active,[disabled])": {
310
- backgroundColor: "highlight",
311
- color: "onHighlight",
312
- borderColor: "highlight"
410
+ filter: "brightness(90%)"
313
411
  },
314
412
  ":disabled": {
315
413
  cursor: "default",
316
414
  backgroundColor: "muted",
317
- borderColor: "muted"
415
+ borderColor: "muted",
416
+ color: "onMuted"
318
417
  }
319
418
  },
320
419
  primary: {
@@ -323,9 +422,7 @@ var BruttalTheme = {
323
422
  borderRadius: "action",
324
423
  borderColor: "primary",
325
424
  ":hover:not(:active,[disabled])": {
326
- backgroundColor: "highlight",
327
- color: "onHighlight",
328
- borderColor: "highlight"
425
+ filter: "brightness(90%)"
329
426
  },
330
427
  ":active": {
331
428
  backgroundColor: "primary",
@@ -335,59 +432,63 @@ var BruttalTheme = {
335
432
  ":disabled": {
336
433
  cursor: "default",
337
434
  backgroundColor: "muted",
338
- borderColor: "muted"
435
+ borderColor: "muted",
436
+ color: "onMuted"
339
437
  }
340
438
  },
341
439
  secondary: {
342
440
  backgroundColor: "secondary",
343
441
  color: "onSecondary",
344
442
  borderRadius: "action",
345
- borderColor: "secondary",
443
+ border: "secondary",
444
+ borderColor: "onSecondary",
346
445
  ":hover:not(:active,[disabled])": {
347
- backgroundColor: "highlight",
348
- color: "onHighlight",
349
- borderColor: "highlight"
446
+ filter: "brightness(90%)"
350
447
  },
351
448
  ":disabled": {
352
449
  cursor: "default",
353
450
  backgroundColor: "muted",
354
- borderColor: "muted"
451
+ borderColor: "muted",
452
+ color: "onMuted"
355
453
  }
356
454
  },
357
- neutral: {
358
- backgroundColor: "muted",
359
- color: "onMuted",
360
- borderRadius: "action",
361
- borderColor: "muted",
455
+ destructive: {
456
+ color: "onDanger",
457
+ backgroundColor: "danger",
362
458
  ":hover:not(:active,[disabled])": {
363
- backgroundColor: "highlight",
364
- color: "onHighlight",
365
- borderColor: "highlight"
459
+ filter: "brightness(90%)"
366
460
  },
367
461
  ":disabled": {
368
462
  cursor: "default",
369
463
  backgroundColor: "muted",
370
- borderColor: "muted"
464
+ borderColor: "muted",
465
+ color: "onMuted"
371
466
  }
372
467
  },
373
- danger: {
374
- color: "onDanger",
375
- backgroundColor: "danger"
376
- },
377
468
  closeButton: {
378
- backgroundColor: "transparent",
379
- color: "text",
469
+ backgroundColor: "background",
470
+ fontFamily: "caption",
471
+ color: "primary",
380
472
  fontSize: "xs",
381
473
  display: "inline-flex",
382
474
  alignItems: "center",
383
475
  cursor: "pointer",
476
+ gap: "sm",
477
+ padding: "sm",
478
+ border: "default",
479
+ borderColor: "primary",
480
+ width: "fit-content",
384
481
  ":disabled": {
385
- color: "muted",
482
+ border: "muted",
483
+ backgroundColor: "muted",
484
+ color: "onMuted",
386
485
  cursor: "not-allowed"
387
486
  },
388
487
  ":is(:focus-within, :hover):not(:disabled)": {
389
- color: "accent",
390
- outlineColor: "transparent"
488
+ color: "onHighlight",
489
+ backgroundColor: "highlight",
490
+ border: "highlight",
491
+ borderColor: "highlight"
391
492
  }
392
493
  }
393
494
  },
@@ -406,6 +507,7 @@ var BruttalTheme = {
406
507
  label: {
407
508
  color: "text",
408
509
  fontFamily: "body",
510
+ alignItems: "center",
409
511
  '&:is([aria-disabled="true"])': {
410
512
  color: "onMuted"
411
513
  },
@@ -432,9 +534,15 @@ var BruttalTheme = {
432
534
  },
433
535
  'input[aria-invalid="true"] ~ &': {
434
536
  color: "danger"
537
+ },
538
+ "input:focus ~ &": {
539
+ bg: "transparent"
435
540
  }
436
541
  },
437
542
  checkbox: {
543
+ "input:focus ~ &": {
544
+ bg: "transparent"
545
+ },
438
546
  "input:not(:checked) ~ &": {
439
547
  color: "primary"
440
548
  },
@@ -465,8 +573,8 @@ var BruttalTheme = {
465
573
  },
466
574
  ":disabled": {
467
575
  backgroundColor: "muted",
468
- borderColor: "onMuted",
469
- border: "muted"
576
+ border: "muted",
577
+ borderColor: "onMuted"
470
578
  },
471
579
  "&.error": {
472
580
  borderColor: "danger"
@@ -484,8 +592,8 @@ var BruttalTheme = {
484
592
  paddingY: "lg",
485
593
  paddingX: "xl",
486
594
  ":disabled": {
487
- borderColor: "onMuted",
488
595
  border: "muted",
596
+ borderColor: "onMuted",
489
597
  color: "muted"
490
598
  },
491
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-RAGX2KRO.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-RAGX2KRO.js";
2
+ import { BruttalFonts, BruttalTheme } from "../../chunk-DVNKTIJT.js";
3
3
  export { BruttalFonts, BruttalTheme };