@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.
package/dist/index.js CHANGED
@@ -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/index.ts
39
70
  var src_exports = {};
40
71
  __export(src_exports, {
@@ -45,7 +76,13 @@ module.exports = __toCommonJS(src_exports);
45
76
  // src/themes/Bruttal/BruttalIcons.ts
46
77
  var import_react = require("@iconify-icon/react");
47
78
  var import_add_filled = __toESM(require("@iconify/icons-carbon/add-filled"));
79
+ var import_arrow_right = __toESM(require("@iconify/icons-carbon/arrow-right"));
80
+ var import_attachment = __toESM(require("@iconify/icons-carbon/attachment"));
48
81
  var import_calendar = __toESM(require("@iconify/icons-carbon/calendar"));
82
+ var import_caret_down = __toESM(require("@iconify/icons-carbon/caret-down"));
83
+ var import_caret_up = __toESM(require("@iconify/icons-carbon/caret-up"));
84
+ var import_checkmark = __toESM(require("@iconify/icons-carbon/checkmark"));
85
+ var import_checkmark_outline = __toESM(require("@iconify/icons-carbon/checkmark-outline"));
49
86
  var import_checkbox_checked_filled = __toESM(require("@iconify/icons-carbon/checkbox-checked-filled"));
50
87
  var import_checkbox = __toESM(require("@iconify/icons-carbon/checkbox"));
51
88
  var import_checkbox_indeterminate_filled = __toESM(require("@iconify/icons-carbon/checkbox-indeterminate-filled"));
@@ -58,12 +95,15 @@ var import_close = __toESM(require("@iconify/icons-carbon/close"));
58
95
  var import_copy = __toESM(require("@iconify/icons-carbon/copy"));
59
96
  var import_error_filled = __toESM(require("@iconify/icons-carbon/error-filled"));
60
97
  var import_information_filled = __toESM(require("@iconify/icons-carbon/information-filled"));
98
+ var import_loading = __toESM(require_loading());
61
99
  var import_paste = __toESM(require("@iconify/icons-carbon/paste"));
62
100
  var import_radio_button_checked = __toESM(require("@iconify/icons-carbon/radio-button-checked"));
63
101
  var import_radio_button = __toESM(require("@iconify/icons-carbon/radio-button"));
64
102
  var import_renew = __toESM(require("@iconify/icons-carbon/renew"));
103
+ var import_success_circle = __toESM(require_success_circle());
65
104
  var import_time = __toESM(require("@iconify/icons-carbon/time"));
66
105
  var import_trash_can = __toESM(require("@iconify/icons-carbon/trash-can"));
106
+ var import_upload = __toESM(require("@iconify/icons-carbon/upload"));
67
107
  var import_user_avatar_filled_alt = __toESM(require("@iconify/icons-carbon/user-avatar-filled-alt"));
68
108
  var import_view_filled = __toESM(require("@iconify/icons-carbon/view-filled"));
69
109
  var import_view_off_filled = __toESM(require("@iconify/icons-carbon/view-off-filled"));
@@ -76,17 +116,32 @@ var replicateIcon = {
76
116
  width: 48,
77
117
  height: 48
78
118
  };
119
+ var subtractIcon = {
120
+ body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
121
+ <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"/>
122
+ </svg>
123
+ `,
124
+ width: 48,
125
+ height: 48
126
+ };
79
127
  (0, import_react.addIcon)("add", import_add_filled.default);
128
+ (0, import_react.addIcon)("arrow-right", import_arrow_right.default);
129
+ (0, import_react.addIcon)("attachment", import_attachment.default);
80
130
  (0, import_react.addIcon)("avatar", import_user_avatar_filled_alt.default);
131
+ (0, import_react.addIcon)("caret-down", import_caret_down.default);
132
+ (0, import_react.addIcon)("caret-up", import_caret_up.default);
81
133
  (0, import_react.addIcon)("calendar", import_calendar.default);
82
134
  (0, import_react.addIcon)("checkbox-checked", import_checkbox_checked_filled.default);
83
135
  (0, import_react.addIcon)("checkbox-indeterminate", import_checkbox_indeterminate_filled.default);
84
136
  (0, import_react.addIcon)("checkbox-unchecked", import_checkbox.default);
137
+ (0, import_react.addIcon)("check", import_checkmark.default);
138
+ (0, import_react.addIcon)("check-mark", import_checkmark_outline.default);
85
139
  (0, import_react.addIcon)("close", import_close.default);
86
140
  (0, import_react.addIcon)("copy", import_copy.default);
87
141
  (0, import_react.addIcon)("delete", import_trash_can.default);
88
142
  (0, import_react.addIcon)("error", import_error_filled.default);
89
143
  (0, import_react.addIcon)("info", import_information_filled.default);
144
+ (0, import_react.addIcon)("loading", import_loading.default);
90
145
  (0, import_react.addIcon)("paste", import_paste.default);
91
146
  (0, import_react.addIcon)("picker-down", import_chevron_down.default);
92
147
  (0, import_react.addIcon)("picker-up", import_chevron_up.default);
@@ -96,8 +151,11 @@ var replicateIcon = {
96
151
  (0, import_react.addIcon)("radio-selected", import_radio_button_checked.default);
97
152
  (0, import_react.addIcon)("refresh", import_renew.default);
98
153
  (0, import_react.addIcon)("replicate", replicateIcon);
154
+ (0, import_react.addIcon)("subtract", subtractIcon);
155
+ (0, import_react.addIcon)("success-circle", import_success_circle.default);
99
156
  (0, import_react.addIcon)("small-close", import_close_filled.default);
100
157
  (0, import_react.addIcon)("time", import_time.default);
158
+ (0, import_react.addIcon)("upload", import_upload.default);
101
159
  (0, import_react.addIcon)("view-off", import_view_off_filled.default);
102
160
  (0, import_react.addIcon)("view-on", import_view_filled.default);
103
161
  (0, import_react.addIcon)("warning", import_warning_filled.default);
@@ -142,6 +200,17 @@ var letterSpacings = {
142
200
  widest: "0.1em"
143
201
  };
144
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
+
145
214
  // src/tokens/space.ts
146
215
  var space = {
147
216
  none: 0,
@@ -220,6 +289,7 @@ var BruttalTheme = {
220
289
  fontWeights,
221
290
  letterSpacings,
222
291
  space,
292
+ lineHeights,
223
293
  colors: {
224
294
  background: coreColors.white,
225
295
  text: coreColors.black,
@@ -257,13 +327,15 @@ var BruttalTheme = {
257
327
  h6: coreFonts.contrast,
258
328
  body: coreFonts.main,
259
329
  highlight: coreFonts.main,
260
- caption: coreFonts.monospace
330
+ caption: coreFonts.main
261
331
  },
262
332
  borders: {
263
- default: coreBorders.medium,
333
+ default: coreBorders.thin,
334
+ secondary: coreBorders.medium,
264
335
  muted: coreBorders.thin,
265
336
  interaction: coreBorders.medium,
266
- danger: coreBorders.medium
337
+ danger: coreBorders.medium,
338
+ highlight: coreBorders.medium
267
339
  },
268
340
  radii: {
269
341
  informative: coreRadii.xs,
@@ -301,6 +373,7 @@ var BruttalTheme = {
301
373
  bg: "positive",
302
374
  fontFamily: "caption",
303
375
  fontWeight: "normal",
376
+ lineHeight: "base",
304
377
  fontSize: "xs",
305
378
  paddingX: "xs",
306
379
  paddingY: "2xs",
@@ -311,6 +384,7 @@ var BruttalTheme = {
311
384
  bg: "danger",
312
385
  fontFamily: "caption",
313
386
  fontWeight: "normal",
387
+ lineHeight: "base",
314
388
  fontSize: "xs",
315
389
  paddingX: "xs",
316
390
  paddingY: "2xs",
@@ -322,6 +396,7 @@ var BruttalTheme = {
322
396
  fontFamily: "caption",
323
397
  fontSize: "xs",
324
398
  fontWeight: "normal",
399
+ lineHeight: "base",
325
400
  paddingX: "xs",
326
401
  paddingY: "2xs",
327
402
  borderRadius: "informative",
@@ -333,6 +408,7 @@ var BruttalTheme = {
333
408
  bg: "notice",
334
409
  fontFamily: "caption",
335
410
  fontWeight: "normal",
411
+ lineHeight: "base",
336
412
  fontSize: "xs",
337
413
  paddingX: "xs",
338
414
  paddingY: "2xs",
@@ -346,14 +422,13 @@ var BruttalTheme = {
346
422
  borderRadius: "action",
347
423
  borderColor: "accent",
348
424
  ":hover:not(:active,[disabled])": {
349
- backgroundColor: "highlight",
350
- color: "onHighlight",
351
- borderColor: "highlight"
425
+ filter: "brightness(90%)"
352
426
  },
353
427
  ":disabled": {
354
428
  cursor: "default",
355
429
  backgroundColor: "muted",
356
- borderColor: "muted"
430
+ borderColor: "muted",
431
+ color: "onMuted"
357
432
  }
358
433
  },
359
434
  primary: {
@@ -362,9 +437,7 @@ var BruttalTheme = {
362
437
  borderRadius: "action",
363
438
  borderColor: "primary",
364
439
  ":hover:not(:active,[disabled])": {
365
- backgroundColor: "highlight",
366
- color: "onHighlight",
367
- borderColor: "highlight"
440
+ filter: "brightness(90%)"
368
441
  },
369
442
  ":active": {
370
443
  backgroundColor: "primary",
@@ -374,59 +447,63 @@ var BruttalTheme = {
374
447
  ":disabled": {
375
448
  cursor: "default",
376
449
  backgroundColor: "muted",
377
- borderColor: "muted"
450
+ borderColor: "muted",
451
+ color: "onMuted"
378
452
  }
379
453
  },
380
454
  secondary: {
381
455
  backgroundColor: "secondary",
382
456
  color: "onSecondary",
383
457
  borderRadius: "action",
384
- borderColor: "secondary",
458
+ border: "secondary",
459
+ borderColor: "onSecondary",
385
460
  ":hover:not(:active,[disabled])": {
386
- backgroundColor: "highlight",
387
- color: "onHighlight",
388
- borderColor: "highlight"
461
+ filter: "brightness(90%)"
389
462
  },
390
463
  ":disabled": {
391
464
  cursor: "default",
392
465
  backgroundColor: "muted",
393
- borderColor: "muted"
466
+ borderColor: "muted",
467
+ color: "onMuted"
394
468
  }
395
469
  },
396
- neutral: {
397
- backgroundColor: "muted",
398
- color: "onMuted",
399
- borderRadius: "action",
400
- borderColor: "muted",
470
+ destructive: {
471
+ color: "onDanger",
472
+ backgroundColor: "danger",
401
473
  ":hover:not(:active,[disabled])": {
402
- backgroundColor: "highlight",
403
- color: "onHighlight",
404
- borderColor: "highlight"
474
+ filter: "brightness(90%)"
405
475
  },
406
476
  ":disabled": {
407
477
  cursor: "default",
408
478
  backgroundColor: "muted",
409
- borderColor: "muted"
479
+ borderColor: "muted",
480
+ color: "onMuted"
410
481
  }
411
482
  },
412
- danger: {
413
- color: "onDanger",
414
- backgroundColor: "danger"
415
- },
416
483
  closeButton: {
417
- backgroundColor: "transparent",
418
- color: "text",
484
+ backgroundColor: "background",
485
+ fontFamily: "caption",
486
+ color: "primary",
419
487
  fontSize: "xs",
420
488
  display: "inline-flex",
421
489
  alignItems: "center",
422
490
  cursor: "pointer",
491
+ gap: "sm",
492
+ padding: "sm",
493
+ border: "default",
494
+ borderColor: "primary",
495
+ width: "fit-content",
423
496
  ":disabled": {
424
- color: "muted",
497
+ border: "muted",
498
+ backgroundColor: "muted",
499
+ color: "onMuted",
425
500
  cursor: "not-allowed"
426
501
  },
427
502
  ":is(:focus-within, :hover):not(:disabled)": {
428
- color: "accent",
429
- outlineColor: "transparent"
503
+ color: "onHighlight",
504
+ backgroundColor: "highlight",
505
+ border: "highlight",
506
+ borderColor: "highlight"
430
507
  }
431
508
  }
432
509
  },
@@ -445,6 +522,7 @@ var BruttalTheme = {
445
522
  label: {
446
523
  color: "text",
447
524
  fontFamily: "body",
525
+ alignItems: "center",
448
526
  '&:is([aria-disabled="true"])': {
449
527
  color: "onMuted"
450
528
  },
@@ -471,9 +549,15 @@ var BruttalTheme = {
471
549
  },
472
550
  'input[aria-invalid="true"] ~ &': {
473
551
  color: "danger"
552
+ },
553
+ "input:focus ~ &": {
554
+ bg: "transparent"
474
555
  }
475
556
  },
476
557
  checkbox: {
558
+ "input:focus ~ &": {
559
+ bg: "transparent"
560
+ },
477
561
  "input:not(:checked) ~ &": {
478
562
  color: "primary"
479
563
  },
@@ -504,8 +588,8 @@ var BruttalTheme = {
504
588
  },
505
589
  ":disabled": {
506
590
  backgroundColor: "muted",
507
- borderColor: "onMuted",
508
- border: "muted"
591
+ border: "muted",
592
+ borderColor: "onMuted"
509
593
  },
510
594
  "&.error": {
511
595
  borderColor: "danger"
@@ -523,8 +607,8 @@ var BruttalTheme = {
523
607
  paddingY: "lg",
524
608
  paddingX: "xl",
525
609
  ":disabled": {
526
- borderColor: "onMuted",
527
610
  border: "muted",
611
+ borderColor: "onMuted",
528
612
  color: "muted"
529
613
  },
530
614
  ":disabled ~ span > iconify-icon": {