@wizco/fenixds-core 1.5.2 → 1.6.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wizco/fenixds-core",
3
3
  "description": "Fenix design system é um produto da Wiz com ativos de design e código de front-end para ajudar as equipes na criação dos seus produtos.",
4
- "version": "1.5.2",
4
+ "version": "1.6.0",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "author": "Raul Melo Fernandez",
package/styles/core.css CHANGED
@@ -1270,6 +1270,130 @@ label.form-check, .form-check {
1270
1270
  --wco-checkbox-default-color-iconunchecked: var(--wco-color-danger-600);
1271
1271
  --wco-checkbox-default-color-iconchecked: var(--wco-color-danger-600); }
1272
1272
 
1273
+ .wco-form-switch {
1274
+ --wco-switch-color-label: var(--wco-switch-custom-color-label, var(--wco-color-neutral-700));
1275
+ --wco-switch-color-bg: var(--wco-switch-custom-color-bg, var(--wco-color-neutral-50));
1276
+ --wco-switch-color-border-color: var(--wco-switch-custom-color-border, var(--wco-color-neutral-600));
1277
+ --wco-switch-color-bullet: var(--wco-switch-custom-color-bullet, var(--wco-color-neutral-600));
1278
+ --wco-switch-color-icon: var(--wco-switch-custom-color-icon, var(--wco-color-neutral-50));
1279
+ --wco-switch-general-spacing: 8px;
1280
+ --wco-switch-radius: calc(var(--wco-radius-md) * 2);
1281
+ --wco-switch-size-max-w: 48px;
1282
+ --wco-switch-size-max-h: 28px;
1283
+ --wco-switch-size-bullet: 18px;
1284
+ --wco-switch-checked-spaceInner: 3px;
1285
+ display: flex;
1286
+ align-items: center;
1287
+ gap: var(--wco-spacing-nano); }
1288
+ .wco-form-switch input[type="checkbox"] {
1289
+ display: none; }
1290
+ .wco-form-switch span.label {
1291
+ color: var(--wco-switch-color-label);
1292
+ font-size: var(--wco-font-size-xs);
1293
+ font-family: var(--wco-font-family);
1294
+ font-weight: 400;
1295
+ letter-spacing: 0.4px; }
1296
+ .wco-form-switch span.toggle {
1297
+ display: inline-flex;
1298
+ min-width: 40px;
1299
+ align-items: center;
1300
+ position: relative;
1301
+ z-index: 1;
1302
+ border-radius: var(--wco-switch-radius);
1303
+ width: calc(var(--wco-switch-size-max-w, 48px) + 4px);
1304
+ background-color: var(--wco-switch-color-bg, #f1f1f1);
1305
+ height: var(--wco-switch-size-max-h, 28px);
1306
+ border: 2px solid var(--wco-switch-color-border-color, #8d9399);
1307
+ padding: var(--wco-switch-checked-spaceInner, 3px);
1308
+ transform-origin: center center;
1309
+ perspective: 1000px; }
1310
+ .wco-form-switch span.toggle:before, .wco-form-switch span.toggle:after, .wco-form-switch span.toggle i {
1311
+ position: absolute;
1312
+ top: 50%;
1313
+ transform: translateY(-50%);
1314
+ transition: all 300ms ease-in-out;
1315
+ display: flex;
1316
+ align-items: center;
1317
+ justify-content: center;
1318
+ pointer-events: none;
1319
+ user-select: none;
1320
+ left: var(--wco-switch-checked-position, 3px);
1321
+ font-size: var(--wco-font-size-xxxs);
1322
+ width: var(--wco-switch-size-bullet, 24px);
1323
+ height: var(--wco-switch-size-bullet, 24px);
1324
+ color: var(--wco-switch-color-icon, #8d9399);
1325
+ line-height: var(--wco-switch-size-bullet, 24px); }
1326
+ .wco-form-switch span.toggle:before, .wco-form-switch span.toggle:after {
1327
+ content: '';
1328
+ border-radius: 100%;
1329
+ background-color: var(--wco-switch-color-bullet, #8d9399);
1330
+ color: var(--wco-switch-color-bullet, #8d9399);
1331
+ z-index: -1; }
1332
+ .wco-form-switch:has(input[type="checkbox"]:checked) {
1333
+ --wco-switch-custom-color-bg: var(--wco-color-primary-600);
1334
+ --wco-switch-custom-color-border: var(--wco-color-primary-600);
1335
+ --wco-switch-custom-color-bullet: var(--wco-color-neutral-50);
1336
+ --wco-switch-custom-color-icon: var(--wco-color-primary-600);
1337
+ --wco-switch-checked-position: calc(100% - var(--wco-switch-size-bullet, 24px) - var(--wco-switch-checked-spaceInner, 3px)); }
1338
+ .wco-form-switch:has(input[type="checkbox"]:not(:disabled)) {
1339
+ cursor: pointer; }
1340
+ .wco-form-switch:has(input[type="checkbox"]:not(:disabled)):has(input[type="checkbox"]:hover):has(input[type="checkbox"]:checked) span.toggle::before {
1341
+ background-color: var(--wco-switch-custom-color-shadow, var(--wco-color-primary-500)); }
1342
+ .wco-form-switch:has(input[type="checkbox"]:not(:disabled)):has(input[type="checkbox"]:hover) span.toggle:before {
1343
+ transform: translateY(-50%) scale(1.8);
1344
+ opacity: 0.3; }
1345
+ .wco-form-switch.form--error {
1346
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
1347
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-600);
1348
+ --wco-switch-custom-color-icon: var(--wco-color-danger-50);
1349
+ --wco-switch-custom-color-label: var(--wco-color-danger-600); }
1350
+ .wco-form-switch.form--error:has(input[type="checkbox"]:checked) {
1351
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
1352
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-600);
1353
+ --wco-switch-custom-color-icon: var(--wco-color-danger-50);
1354
+ --wco-switch-custom-color-bg: var(--wco-color-danger-50); }
1355
+ .wco-form-switch.switch-secondary:has(input[type="checkbox"]:checked) {
1356
+ --wco-switch-custom-color-shadow: var(--wco-color-secondary-500);
1357
+ --wco-switch-custom-color-border: var(--wco-color-secondary-600);
1358
+ --wco-switch-custom-color-bullet: var(--wco-color-secondary-50);
1359
+ --wco-switch-custom-color-icon: var(--wco-color-secondary-600);
1360
+ --wco-switch-custom-color-bg: var(--wco-color-secondary-600); }
1361
+ .wco-form-switch.switch-success:has(input[type="checkbox"]:checked) {
1362
+ --wco-switch-custom-color-shadow: var(--wco-color-success-500);
1363
+ --wco-switch-custom-color-border: var(--wco-color-success-600);
1364
+ --wco-switch-custom-color-bullet: var(--wco-color-success-50);
1365
+ --wco-switch-custom-color-icon: var(--wco-color-success-600);
1366
+ --wco-switch-custom-color-bg: var(--wco-color-success-600); }
1367
+ .wco-form-switch.switch-info:has(input[type="checkbox"]:checked) {
1368
+ --wco-switch-custom-color-bg: var(--wco-color-info-500);
1369
+ --wco-switch-custom-color-shadow: var(--wco-color-info-500);
1370
+ --wco-switch-custom-color-border: var(--wco-color-info-600);
1371
+ --wco-switch-custom-color-bullet: var(--wco-color-info-50);
1372
+ --wco-switch-custom-color-icon: var(--wco-color-info-600);
1373
+ --wco-switch-custom-color-bg: var(--wco-color-info-600); }
1374
+ .wco-form-switch.switch-danger:has(input[type="checkbox"]:checked) {
1375
+ --wco-switch-custom-color-bg: var(--wco-color-danger-500);
1376
+ --wco-switch-custom-color-shadow: var(--wco-color-danger-500);
1377
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
1378
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-50);
1379
+ --wco-switch-custom-color-icon: var(--wco-color-danger-600);
1380
+ --wco-switch-custom-color-bg: var(--wco-color-danger-600); }
1381
+ .wco-form-switch.switch-warning:has(input[type="checkbox"]:checked) {
1382
+ --wco-switch-custom-color-shadow: var(--wco-color-warning-500);
1383
+ --wco-switch-custom-color-border: var(--wco-color-warning-600);
1384
+ --wco-switch-custom-color-bullet: var(--wco-color-warning-50);
1385
+ --wco-switch-custom-color-icon: var(--wco-color-warning-600);
1386
+ --wco-switch-custom-color-bg: var(--wco-color-warning-600); }
1387
+ .wco-form-switch:has(input[type="checkbox"]:disabled), .wco-form-switch.wco-form-disabled {
1388
+ opacity: 0.3; }
1389
+ .wco-form-switch:has(input[type="checkbox"]:disabled) span.toggle, .wco-form-switch.wco-form-disabled span.toggle {
1390
+ filter: grayscale(1); }
1391
+ .wco-form-switch.form--readonly {
1392
+ pointer-events: none;
1393
+ user-select: none; }
1394
+ .wco-form-switch.form--readonly .label {
1395
+ color: var(--wco-color-neutral-900); }
1396
+
1273
1397
  .wco-form-upload {
1274
1398
  --wco-attachment-default-color-border: var(--wco-color-neutral-500);
1275
1399
  --wco-attachment-default-color-bg: var(--wco-color-neutral-50);
@@ -1292,7 +1416,8 @@ label.form-check, .form-check {
1292
1416
  transition: all 0.3s;
1293
1417
  container-type: inline-size;
1294
1418
  overflow: hidden;
1295
- min-width: max-content; }
1419
+ min-width: max-content;
1420
+ position: relative; }
1296
1421
  .wco-form-upload:has(input[type="file"]:not(:disabled)):not(.wco-form-disabled):hover {
1297
1422
  border-color: var(--wco-attachment-hover-color-border);
1298
1423
  background-color: var(--wco-attachment-hover-color-bg); }
@@ -1491,6 +1616,8 @@ label.form-check, .form-check {
1491
1616
  --wco-tag-border-radius: var(--wco-radius-lg, 24px);
1492
1617
  --wco-tag-border-color: var(--wco-color-neutral-700);
1493
1618
  --wco-tag-font-size: var(--wco-font-size-xxs, 14px);
1619
+ --wco-tag-icon-size: var(--wco-icon-size-small);
1620
+ --wco-tag-icon-color: var(--wco-color-neutral-700);
1494
1621
  font-size: var(--wco-tag-font-size, 14px);
1495
1622
  color: var(--wco-tag-color, #333);
1496
1623
  background-color: var(--wco-tag-background-color, #fff);
@@ -1512,10 +1639,34 @@ label.form-check, .form-check {
1512
1639
  text-wrap: nowrap; }
1513
1640
  .wco-tag span,
1514
1641
  .wco-tag i {
1515
- --wco-tag-icon-size: var(--wco-icon-size-small);
1516
- --wco-tag-icon-color: var(--wco-color-neutral-700);
1517
1642
  color: var(--wco-tag-icon-color);
1518
- font-size: var(--wco-tag-icon-size, 14px); }
1643
+ font-size: var(--wco-tag-icon-size, 14px);
1644
+ line-height: 150%; }
1645
+ .wco-tag.tag-icon-toggle {
1646
+ position: relative;
1647
+ padding-inline-end: calc(var(--wco-spacing-xxxs) + 2px); }
1648
+ .wco-tag.tag-icon-toggle > i, .wco-tag.tag-icon-toggle > span, .wco-tag.tag-icon-toggle > button {
1649
+ position: absolute;
1650
+ right: -4px;
1651
+ height: 100%;
1652
+ opacity: 0;
1653
+ display: inline-flex;
1654
+ align-items: center;
1655
+ width: min-content;
1656
+ visibility: hidden;
1657
+ --wco-tag-icon-size: calc(var(--wco-tag-font-size) - 2px);
1658
+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, right 0.2s ease-in-out; }
1659
+ .wco-tag.tag-icon-toggle:has(button:last-child):hover > button {
1660
+ cursor: pointer;
1661
+ opacity: 1;
1662
+ visibility: visible;
1663
+ right: 2px; }
1664
+ .wco-tag.tag-icon-toggle:is(button, a):not(:disabled) {
1665
+ cursor: pointer; }
1666
+ .wco-tag.tag-icon-toggle:is(button, a):not(:disabled):hover i, .wco-tag.tag-icon-toggle:is(button, a):not(:disabled):hover span {
1667
+ opacity: 1;
1668
+ visibility: visible;
1669
+ right: 2px; }
1519
1670
 
1520
1671
  .tag-success {
1521
1672
  --wco-tag-color: var(--wco-color-success-700);
@@ -1558,6 +1709,23 @@ label.form-check, .form-check {
1558
1709
  .tag-disabled i {
1559
1710
  --wco-tag-icon-color: var(--wco-color-neutral-500); }
1560
1711
 
1712
+ .tag-basic {
1713
+ --wco-tag-size: 28px;
1714
+ --wco-tag-spacing: var(--wco-spacing-quark) var(--wco-spacing-xxxs);
1715
+ --wco-tag-gap: var(--wco-spacing-quark, 4px);
1716
+ --wco-tag-color: var(--wco-color-neutral-900);
1717
+ --wco-tag-background-color: var(--wco-color-neutral-100);
1718
+ --wco-tag-border-radius: var(--wco-radius-nano, 8px);
1719
+ --wco-tag-border-color: transparent; }
1720
+ .tag-basic span, .tag-basic i {
1721
+ font-size: calc(var(--wco-tag-font-size) - 2px); }
1722
+ .tag-basic:is(button):disabled {
1723
+ --wco-tag-background-color: var(--wco-color-neutral-300); }
1724
+ .tag-basic:not(.tag-icon-toggle):has(i:last-child) {
1725
+ padding-right: var(--wco-spacing-quark); }
1726
+ .tag-basic:not(.tag-icon-toggle):has(i:first-child) {
1727
+ padding-left: var(--wco-spacing-quark); }
1728
+
1561
1729
  .wco-group-tags {
1562
1730
  display: flex;
1563
1731
  flex-wrap: wrap;
@@ -426,9 +426,9 @@ label.form-radio, .form-radio
426
426
  }
427
427
  }
428
428
 
429
-
429
+ ///////////////
430
430
  /// Checkbox
431
- ///////////
431
+ ///////////////
432
432
  label.wco-form-check, .wco-form-check,
433
433
  label.form-check, .form-check {
434
434
  --wco-checkbox-default-color-label: var(--wco-color-neutral-900);
@@ -577,12 +577,195 @@ label.form-check, .form-check {
577
577
  input[type="checkbox"]:checked:disabled ~ .label {
578
578
  color: var(--wco-checkbox-disabled-color-label);
579
579
  }
580
- &.form--error,
581
- &.form-field--error {
582
- --wco-checkbox-default-color-label: var(--wco-color-danger-900);
583
- --wco-checkbox-default-color-iconunchecked: var(--wco-color-danger-600);
584
- --wco-checkbox-default-color-iconchecked: var(--wco-color-danger-600);
585
- }
580
+ &.form--error,
581
+ &.form-field--error {
582
+ --wco-checkbox-default-color-label: var(--wco-color-danger-900);
583
+ --wco-checkbox-default-color-iconunchecked: var(--wco-color-danger-600);
584
+ --wco-checkbox-default-color-iconchecked: var(--wco-color-danger-600);
585
+ }
586
+ }
587
+
588
+ ///////////////
589
+ /// Switch
590
+ ///////////////
591
+ .wco-form-switch {
592
+ --wco-switch-color-label: var(--wco-switch-custom-color-label, var(--wco-color-neutral-700)); // cor do label
593
+ --wco-switch-color-bg: var(--wco-switch-custom-color-bg, var(--wco-color-neutral-50)); // background do switch
594
+ --wco-switch-color-border-color: var(--wco-switch-custom-color-border, var(--wco-color-neutral-600)); // background do switch
595
+ --wco-switch-color-bullet: var(--wco-switch-custom-color-bullet, var(--wco-color-neutral-600)); // cor do circulo
596
+ --wco-switch-color-icon: var(--wco-switch-custom-color-icon, var(--wco-color-neutral-50));
597
+ --wco-switch-general-spacing: 8px;
598
+ --wco-switch-radius: calc(var(--wco-radius-md) * 2);
599
+ --wco-switch-size-max-w: 48px;
600
+ --wco-switch-size-max-h: 28px;
601
+ --wco-switch-size-bullet: 18px;
602
+ --wco-switch-checked-spaceInner: 3px;
603
+ display: flex;
604
+ align-items: center;
605
+ gap: var(--wco-spacing-nano);
606
+ // input oculto
607
+ input[type="checkbox"] {
608
+ display: none;
609
+ }
610
+
611
+ // text de apoio
612
+ span.label {
613
+ color: var(--wco-switch-color-label);
614
+ font-size: var(--wco-font-size-xs);
615
+ font-family: var(--wco-font-family);
616
+ font-weight: 400;
617
+ letter-spacing: 0.4px;
618
+ }
619
+ // area do sinalizador
620
+ span.toggle {
621
+ display: inline-flex;
622
+ min-width: 40px;
623
+ align-items: center;
624
+ position: relative;
625
+ z-index: 1;
626
+ // tokens
627
+ border-radius: var(--wco-switch-radius);
628
+ width: calc(var(--wco-switch-size-max-w, 48px) + 4px);
629
+ background-color: var(--wco-switch-color-bg, #f1f1f1);
630
+ height: var(--wco-switch-size-max-h, 28px);
631
+ border: 2px solid var(--wco-switch-color-border-color, #8d9399);
632
+ padding: var(--wco-switch-checked-spaceInner, 3px);
633
+ transform-origin: center center;
634
+ perspective: 1000px;
635
+ // circulo e ícone
636
+ &:before, &:after, i {
637
+ position: absolute;
638
+ top: 50%;
639
+ transform: translateY(-50%);
640
+ transition: all 300ms ease-in-out;
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ pointer-events: none;
645
+ user-select: none;
646
+ // tokens
647
+ left: var(--wco-switch-checked-position, 3px);
648
+ font-size: var(--wco-font-size-xxxs);
649
+ width: var(--wco-switch-size-bullet, 24px);
650
+ height: var(--wco-switch-size-bullet, 24px);
651
+ color: var(--wco-switch-color-icon, #8d9399);
652
+ line-height: var(--wco-switch-size-bullet, 24px);
653
+ }
654
+ &:before, &:after {
655
+ content: '';
656
+ border-radius: 100%;
657
+ background-color: var(--wco-switch-color-bullet, #8d9399);
658
+ color: var(--wco-switch-color-bullet, #8d9399);
659
+ z-index: -1;
660
+ }
661
+ }
662
+
663
+ &:has(input[type="checkbox"]:checked) {
664
+ --wco-switch-custom-color-bg: var(--wco-color-primary-600);
665
+ --wco-switch-custom-color-border: var(--wco-color-primary-600);
666
+ --wco-switch-custom-color-bullet: var(--wco-color-neutral-50);
667
+ --wco-switch-custom-color-icon: var(--wco-color-primary-600);
668
+ --wco-switch-checked-position: calc(100% - var(--wco-switch-size-bullet, 24px) - var(--wco-switch-checked-spaceInner, 3px));
669
+ }
670
+
671
+ // SE O ESTADO NÃO ESTIVER DESABILITADO
672
+ &:has(input[type="checkbox"]:not(:disabled)) {
673
+ // Checked true
674
+ cursor: pointer;
675
+ &:has(input[type="checkbox"]:hover) {
676
+ // sombra do checkbox é diferente
677
+ &:has(input[type="checkbox"]:checked) span.toggle {
678
+ &::before {
679
+ background-color: var(--wco-switch-custom-color-shadow, var(--wco-color-primary-500));
680
+ }
681
+ }
682
+ // sombra hover
683
+ span.toggle {
684
+ &:before {
685
+ transform: translateY(-50%) scale(1.8);
686
+ opacity: 0.3;
687
+ }
688
+ }
689
+ }
690
+ }
691
+
692
+ // Themas
693
+ &.form--error {
694
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
695
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-600);
696
+ --wco-switch-custom-color-icon: var(--wco-color-danger-50);
697
+ --wco-switch-custom-color-label: var(--wco-color-danger-600);
698
+ &:has(input[type="checkbox"]:checked) {
699
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
700
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-600);
701
+ --wco-switch-custom-color-icon: var(--wco-color-danger-50);
702
+ --wco-switch-custom-color-bg: var(--wco-color-danger-50);
703
+ }
704
+ }
705
+ &.switch-secondary {
706
+ &:has(input[type="checkbox"]:checked) {
707
+ --wco-switch-custom-color-shadow: var(--wco-color-secondary-500);
708
+ --wco-switch-custom-color-border: var(--wco-color-secondary-600);
709
+ --wco-switch-custom-color-bullet: var(--wco-color-secondary-50);
710
+ --wco-switch-custom-color-icon: var(--wco-color-secondary-600);
711
+ --wco-switch-custom-color-bg: var(--wco-color-secondary-600);
712
+ }
713
+ }
714
+ &.switch-success {
715
+ &:has(input[type="checkbox"]:checked) {
716
+ --wco-switch-custom-color-shadow: var(--wco-color-success-500);
717
+ --wco-switch-custom-color-border: var(--wco-color-success-600);
718
+ --wco-switch-custom-color-bullet: var(--wco-color-success-50);
719
+ --wco-switch-custom-color-icon: var(--wco-color-success-600);
720
+ --wco-switch-custom-color-bg: var(--wco-color-success-600);
721
+ }
722
+ }
723
+ &.switch-info {
724
+ &:has(input[type="checkbox"]:checked) {
725
+ --wco-switch-custom-color-bg: var(--wco-color-info-500);
726
+ --wco-switch-custom-color-shadow: var(--wco-color-info-500);
727
+ --wco-switch-custom-color-border: var(--wco-color-info-600);
728
+ --wco-switch-custom-color-bullet: var(--wco-color-info-50);
729
+ --wco-switch-custom-color-icon: var(--wco-color-info-600);
730
+ --wco-switch-custom-color-bg: var(--wco-color-info-600);
731
+ }
732
+ }
733
+ &.switch-danger {
734
+ &:has(input[type="checkbox"]:checked) {
735
+ --wco-switch-custom-color-bg: var(--wco-color-danger-500);
736
+ --wco-switch-custom-color-shadow: var(--wco-color-danger-500);
737
+ --wco-switch-custom-color-border: var(--wco-color-danger-600);
738
+ --wco-switch-custom-color-bullet: var(--wco-color-danger-50);
739
+ --wco-switch-custom-color-icon: var(--wco-color-danger-600);
740
+ --wco-switch-custom-color-bg: var(--wco-color-danger-600);
741
+ }
742
+ }
743
+ &.switch-warning {
744
+ &:has(input[type="checkbox"]:checked) {
745
+ --wco-switch-custom-color-shadow: var(--wco-color-warning-500);
746
+ --wco-switch-custom-color-border: var(--wco-color-warning-600);
747
+ --wco-switch-custom-color-bullet: var(--wco-color-warning-50);
748
+ --wco-switch-custom-color-icon: var(--wco-color-warning-600);
749
+ --wco-switch-custom-color-bg: var(--wco-color-warning-600);
750
+ }
751
+ }
752
+
753
+ // SE O ESTADO ESTIVER DESABILITADO
754
+ &:has(input[type="checkbox"]:disabled),
755
+ &.wco-form-disabled {
756
+ opacity: 0.3;
757
+ span.toggle {
758
+ filter: grayscale(1);
759
+ }
760
+ }
761
+ // SE O ESTADO ESTIVER NO MODO LEITURA
762
+ &.form--readonly {
763
+ pointer-events: none;
764
+ user-select: none;
765
+ .label {
766
+ color: var(--wco-color-neutral-900);
767
+ }
768
+ }
586
769
  }
587
770
 
588
771
 
@@ -612,6 +795,7 @@ label.form-check, .form-check {
612
795
  container-type: inline-size;
613
796
  overflow: hidden;
614
797
  min-width: max-content;
798
+ position: relative;
615
799
  &:has(input[type="file"]:not(:disabled)) {
616
800
  &:not(.wco-form-disabled) {
617
801
  &:hover {
@@ -7,6 +7,8 @@
7
7
  --wco-tag-border-radius: var(--wco-radius-lg, 24px);
8
8
  --wco-tag-border-color: var(--wco-color-neutral-700);
9
9
  --wco-tag-font-size: var(--wco-font-size-xxs, 14px);
10
+ --wco-tag-icon-size: var(--wco-icon-size-small);
11
+ --wco-tag-icon-color: var(--wco-color-neutral-700);
10
12
  font-size: var(--wco-tag-font-size, 14px);
11
13
  color: var(--wco-tag-color, #333);
12
14
  background-color: var(--wco-tag-background-color, #fff);
@@ -28,14 +30,60 @@
28
30
  text-wrap: nowrap;
29
31
  span,
30
32
  i {
31
- --wco-tag-icon-size: var(--wco-icon-size-small);
32
- --wco-tag-icon-color: var(--wco-color-neutral-700);
33
33
  color: var(--wco-tag-icon-color);
34
34
  font-size: var(--wco-tag-icon-size, 14px);
35
+ line-height: 150%;
36
+ }
37
+
38
+
39
+
40
+ //////////////////////////////////////
41
+ /// Comportamento do ícone hiden/show
42
+ //////////////////////////////////////
43
+ &.tag-icon-toggle {
44
+ position: relative;
45
+ padding-inline-end: calc(var(--wco-spacing-xxxs) + 2px);
46
+ > i, > span, > button {
47
+ position: absolute;
48
+ right: -4px;
49
+ height: 100%;
50
+ opacity: 0;
51
+ display: inline-flex;
52
+ align-items: center;
53
+ width: min-content;
54
+ visibility: hidden;
55
+ --wco-tag-icon-size: calc(var(--wco-tag-font-size) - 2px);
56
+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, right 0.2s ease-in-out;
57
+ }
58
+ &:has(button:last-child) {
59
+ &:hover {
60
+ > button {
61
+ cursor: pointer;
62
+ opacity: 1;
63
+ visibility: visible;
64
+ right: 2px;
65
+ }
66
+ }
67
+ }
68
+ &:is(button, a) {
69
+ &:not(:disabled) {
70
+ cursor: pointer;
71
+ &:hover {
72
+ i, span {
73
+ opacity: 1;
74
+ visibility: visible;
75
+ right: 2px;
76
+ }
77
+ }
78
+ }
79
+ }
35
80
  }
36
81
  }
37
82
 
38
83
  .tag {
84
+ //////////
85
+ // COLORS
86
+ //////////
39
87
  &-success {
40
88
  --wco-tag-color: var(--wco-color-success-700);
41
89
  --wco-tag-border-color: var(--wco-color-success-700);
@@ -86,6 +134,35 @@
86
134
  --wco-tag-icon-color: var(--wco-color-neutral-500);
87
135
  }
88
136
  }
137
+
138
+ //////////
139
+ // SIZES
140
+ //////////
141
+ &-basic {
142
+ --wco-tag-size: 28px;
143
+ --wco-tag-spacing: var(--wco-spacing-quark) var(--wco-spacing-xxxs);
144
+ --wco-tag-gap: var(--wco-spacing-quark, 4px);
145
+ --wco-tag-color: var(--wco-color-neutral-900);
146
+ --wco-tag-background-color: var(--wco-color-neutral-100);
147
+ --wco-tag-border-radius: var(--wco-radius-nano, 8px);
148
+ --wco-tag-border-color: transparent;
149
+ span, i {
150
+ font-size: calc(var(--wco-tag-font-size) - 2px);
151
+ }
152
+ &:is(button) {
153
+ &:disabled {
154
+ --wco-tag-background-color: var(--wco-color-neutral-300);
155
+ }
156
+ }
157
+ &:not(.tag-icon-toggle){
158
+ &:has(i:last-child) {
159
+ padding-right: var(--wco-spacing-quark);
160
+ }
161
+ &:has(i:first-child) {
162
+ padding-left: var(--wco-spacing-quark);
163
+ }
164
+ }
165
+ }
89
166
  }
90
167
 
91
168
  .wco-group-tags {