@wizco/fenixds-core 1.3.2 → 1.5.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.3.2",
4
+ "version": "1.5.0",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "author": "Raul Melo Fernandez",
package/styles/core.css CHANGED
@@ -887,21 +887,21 @@ a.btn {
887
887
  --wco-input-color-bg: var(--wco-color-neutral-100, #E9EBEC); }
888
888
  .wco-form-field:has(
889
889
  input:read-only:not(:disabled),
890
- textarea:read-only:not(:disabled)
891
- ),
892
- .wco-form-field .form--readonly:not(.form-field--disabled),
893
- .wco-form-field .form-field--readonly:not(.form-field--disabled),
890
+ textarea:read-only:not(:disabled),
891
+ select[readonly]:not(:disabled)
892
+ ), .wco-form-field.form--readonly:not(.form-field--disabled), .wco-form-field.form-field--readonly:not(.form-field--disabled),
894
893
  .form-field:has(
895
894
  input:read-only:not(:disabled),
896
- textarea:read-only:not(:disabled)
895
+ textarea:read-only:not(:disabled),
896
+ select[readonly]:not(:disabled)
897
897
  ),
898
- .form-field .form--readonly:not(.form-field--disabled),
899
- .form-field .form-field--readonly:not(.form-field--disabled) {
900
- --wco-input-color-label: var(--wco-color-neutral-600, #C3C8CC);
901
- --wco-input-color-outline: var(--wco-color-neutral-500, #C3C8CC);
898
+ .form-field.form--readonly:not(.form-field--disabled),
899
+ .form-field.form-field--readonly:not(.form-field--disabled) {
900
+ --wco-input-color-label: var(--wco-color-neutral-900, #C3C8CC);
901
+ --wco-input-color-outline: transparent;
902
902
  --wco-input-color-icon: var(--wco-color-neutral-300, #C3C8CC);
903
903
  --wco-input-color-text: var(--wco-color-neutral-900, #C3C8CC);
904
- --wco-input-color-bg: var(--wco-color-neutral-50, #E9EBEC); }
904
+ --wco-input-color-bg: var(--wco-color-neutral-100, #E9EBEC); }
905
905
  .wco-form-field.form-field--error:not(:placeholder-shown) ~ label,
906
906
  .wco-form-field.form--error:not(:placeholder-shown) ~ label, .wco-form-field.form-field--error, .wco-form-field:has(input:invalid:not(:placeholder-shown)), .wco-form-field:has(.form-field--error), .wco-form-field.form--error,
907
907
  .form-field.form-field--error:not(:placeholder-shown) ~ label,
@@ -1041,11 +1041,13 @@ a.btn {
1041
1041
  min-height: var(--wco-input-min-height);
1042
1042
  padding-top: 0;
1043
1043
  padding-bottom: 0; }
1044
- .wco-form-field:has(select).form--readonly,
1045
- .form-field:has(select).form--readonly {
1044
+ .wco-form-field:has(select).form--readonly, .wco-form-field:has(select):has([readonly]):not(:disabled),
1045
+ .form-field:has(select).form--readonly,
1046
+ .form-field:has(select):has([readonly]):not(:disabled) {
1046
1047
  pointer-events: none; }
1047
- .wco-form-field:has(select).form--readonly::after,
1048
- .form-field:has(select).form--readonly::after {
1048
+ .wco-form-field:has(select).form--readonly::after, .wco-form-field:has(select):has([readonly]):not(:disabled)::after,
1049
+ .form-field:has(select).form--readonly::after,
1050
+ .form-field:has(select):has([readonly]):not(:disabled)::after {
1049
1051
  display: none; }
1050
1052
  .wco-form-field:has(select)::after,
1051
1053
  .form-field:has(select)::after {
@@ -1054,9 +1056,11 @@ a.btn {
1054
1056
  top: 50%;
1055
1057
  right: 12px;
1056
1058
  transform: translateY(-50%);
1057
- width: 30px;
1058
- height: 100%;
1059
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.41 8.58984L12 13.1698L16.59 8.58984L18 9.99984L12 15.9998L6 9.99984L7.41 8.58984Z' fill='var(--wco-color-primary-600, black)'/%3E%3C/svg%3E%0A");
1059
+ width: 7px;
1060
+ height: 5px;
1061
+ border-left: 6px solid transparent;
1062
+ border-right: 6px solid transparent;
1063
+ border-top: 6px solid var(--wco-color-primary-600);
1060
1064
  background-size: 30px;
1061
1065
  background-position: center;
1062
1066
  background-repeat: no-repeat; }
@@ -1558,6 +1562,78 @@ label.form-check, .form-check {
1558
1562
  flex-wrap: wrap;
1559
1563
  gap: var(--wco-spacing-nano, 12px); }
1560
1564
 
1565
+ dialog.wco-modal {
1566
+ --wco-modal-size: 640px;
1567
+ --wco-modal-padding: var(--wco-spacing-xl) var(--wco-spacing-md);
1568
+ --wco-modal-bg: var(--wco-color-neutral-50);
1569
+ --wco-modal-border-radius: var(--wco-radius-sm);
1570
+ --wco-modal-shadow: var(--wco-shadow-level-2);
1571
+ --wco-animate-modal-top: 10px;
1572
+ --wco-animate-modal-opacity: 0;
1573
+ background-color: transparent;
1574
+ box-shadow: none;
1575
+ container-name: modalWco;
1576
+ container-type: inline-size;
1577
+ border: none;
1578
+ place-items: center;
1579
+ max-width: 100vw;
1580
+ max-height: 100vh;
1581
+ width: 100%;
1582
+ height: 100%;
1583
+ display: none;
1584
+ transition: display 0.7s allow-discrete, overlay 0.7s allow-discrete, transform 0.7s ease-in-out allow-discrete; }
1585
+ dialog.wco-modal[open] {
1586
+ display: grid; }
1587
+ dialog.wco-modal[open] main {
1588
+ margin: var(--wco-spacing-lg);
1589
+ --wco-animate-modal-top: 0;
1590
+ --wco-animate-modal-opacity: 1;
1591
+ transition: all 300ms ease-in-out allow-discrete; }
1592
+ @media screen and (max-width: 768px) {
1593
+ dialog.wco-modal[open] main {
1594
+ margin: 0; } }
1595
+
1596
+ @starting-style {
1597
+ dialog.wco-modal[open] main {
1598
+ --wco-animate-modal-top: 10px;
1599
+ --wco-animate-modal-opacity: 0; } }
1600
+ dialog.wco-modal > main {
1601
+ position: relative;
1602
+ min-width: var(--wco-modal-size);
1603
+ width: min-content;
1604
+ background-color: var(--wco-modal-bg);
1605
+ border-radius: var(--wco-modal-border-radius);
1606
+ box-shadow: var(--wco-modal-shadow);
1607
+ padding: var(--wco-modal-padding);
1608
+ display: flex;
1609
+ flex-direction: column;
1610
+ opacity: var(--wco-animate-modal-opacity);
1611
+ transform: translateY(var(--wco-animate-modal-top));
1612
+ transition: all 0.4s ease-in-out; }
1613
+ @media screen and (max-width: 768px) {
1614
+ dialog.wco-modal > main {
1615
+ --wco-modal-size: calc(100vw - var(--wco-spacing-md));
1616
+ --wco-modal-padding: var(--wco-spacing-xs) var(--wco-spacing-xxs); } }
1617
+ @media screen and (max-width: 550px) {
1618
+ dialog.wco-modal > main {
1619
+ --wco-modal-padding: var(--wco-spacing-xxxs) var(--wco-spacing-nano); } }
1620
+ dialog.wco-modal button.wco-modal--close {
1621
+ padding: var(--wco-spacing-nano);
1622
+ position: absolute;
1623
+ top: 0;
1624
+ right: 0;
1625
+ background: none;
1626
+ border: none;
1627
+ cursor: pointer;
1628
+ font-size: var(--wco-font-size-md);
1629
+ color: var(--wco-color-primary-700);
1630
+ transition: color 0.3s; }
1631
+ dialog.wco-modal button.wco-modal--close:hover {
1632
+ color: var(--wco-color-primary-500); }
1633
+ dialog.wco-modal::backdrop {
1634
+ background-color: rgba(0, 0, 0, 0.5);
1635
+ transition: display 0.1s allow-discrete, overlay 0.1s allow-discrete, background-color 0.1s; }
1636
+
1561
1637
  .m-none {
1562
1638
  margin: var(--wco-spacing-none); }
1563
1639
 
@@ -13,6 +13,6 @@
13
13
  @import "./forms.scss";
14
14
  @import "./chips.scss";
15
15
  @import "./tags.scss";
16
-
16
+ @import "./modal.scss";
17
17
  // Classes auxiliares
18
18
  @import "./helpers.scss";
@@ -139,15 +139,17 @@
139
139
  /// View Only
140
140
  &:has(
141
141
  input:read-only:not(:disabled),
142
- textarea:read-only:not(:disabled)
142
+ textarea:read-only:not(:disabled),
143
+ select[readonly]:not(:disabled)
143
144
  ),
144
- .form--readonly:not(.form-field--disabled),
145
- .form-field--readonly:not(.form-field--disabled) {
146
- --wco-input-color-label: var(--wco-color-neutral-600, #C3C8CC);
147
- --wco-input-color-outline: var(--wco-color-neutral-500, #C3C8CC);
145
+ &.form--readonly:not(.form-field--disabled),
146
+ &.form-field--readonly:not(.form-field--disabled)
147
+ {
148
+ --wco-input-color-label: var(--wco-color-neutral-900, #C3C8CC);
149
+ --wco-input-color-outline: transparent;
148
150
  --wco-input-color-icon: var(--wco-color-neutral-300, #C3C8CC);
149
151
  --wco-input-color-text: var(--wco-color-neutral-900, #C3C8CC);
150
- --wco-input-color-bg: var(--wco-color-neutral-50, #E9EBEC);
152
+ --wco-input-color-bg: var(--wco-color-neutral-100, #E9EBEC);
151
153
  }
152
154
 
153
155
  /// Error
@@ -294,7 +296,8 @@
294
296
  padding-bottom: 0;
295
297
  }
296
298
 
297
- &.form--readonly {
299
+ &.form--readonly,
300
+ &:has([readonly]):not(:disabled) {
298
301
  pointer-events: none;
299
302
  &::after {
300
303
  display: none;
@@ -306,9 +309,11 @@
306
309
  top: 50%;
307
310
  right: 12px;
308
311
  transform: translateY(-50%);
309
- width: 30px;
310
- height: 100%;
311
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.41 8.58984L12 13.1698L16.59 8.58984L18 9.99984L12 15.9998L6 9.99984L7.41 8.58984Z' fill='var(--wco-color-primary-600, black)'/%3E%3C/svg%3E%0A");
312
+ width: 7px;
313
+ height: 5px;
314
+ border-left: 6px solid transparent;
315
+ border-right: 6px solid transparent;
316
+ border-top: 6px solid var(--wco-color-primary-600);
312
317
  background-size: 30px;
313
318
  background-position: center;
314
319
  background-repeat: no-repeat;
@@ -0,0 +1,85 @@
1
+ dialog.wco-modal {
2
+ --wco-modal-size: 640px;
3
+ --wco-modal-padding: var(--wco-spacing-xl) var(--wco-spacing-md);
4
+ --wco-modal-bg: var(--wco-color-neutral-50);
5
+ --wco-modal-border-radius: var(--wco-radius-sm);
6
+ --wco-modal-shadow: var(--wco-shadow-level-2);
7
+ --wco-animate-modal-top: 10px;
8
+ --wco-animate-modal-opacity: 0;
9
+ background-color: transparent;
10
+ box-shadow: none;
11
+ container-name: modalWco;
12
+ container-type: inline-size;
13
+ border: none;
14
+ place-items: center;
15
+ max-width: 100vw;
16
+ max-height: 100vh;
17
+ width: 100%;
18
+ height: 100%;
19
+ display: none;
20
+ transition:
21
+ display 0.7s allow-discrete,
22
+ overlay 0.7s allow-discrete,
23
+ transform 0.7s ease-in-out allow-discrete;
24
+ &[open] {
25
+ display: grid;
26
+ main {
27
+ margin: var(--wco-spacing-lg);
28
+ --wco-animate-modal-top: 0;
29
+ --wco-animate-modal-opacity: 1;
30
+ transition: all 300ms ease-in-out allow-discrete;
31
+ @media screen and (max-width: 768px){
32
+ margin: 0;
33
+ }
34
+ @starting-style {
35
+ --wco-animate-modal-top: 10px;
36
+ --wco-animate-modal-opacity: 0;
37
+ }
38
+ }
39
+ }
40
+ > main {
41
+ position: relative;
42
+ min-width: var(--wco-modal-size);
43
+ width: min-content;
44
+ background-color: var(--wco-modal-bg);
45
+ border-radius: var(--wco-modal-border-radius);
46
+ box-shadow: var(--wco-modal-shadow);
47
+ padding: var(--wco-modal-padding);
48
+ display: flex;
49
+ flex-direction: column;
50
+ opacity: var(--wco-animate-modal-opacity);
51
+ transform: translateY(var(--wco-animate-modal-top));
52
+ transition: all 0.4s ease-in-out;
53
+ @media screen and (max-width: 768px){
54
+ --wco-modal-size: calc(100vw - var(--wco-spacing-md));
55
+ --wco-modal-padding: var(--wco-spacing-xs) var(--wco-spacing-xxs);
56
+ }
57
+
58
+ @media screen and (max-width: 550px){
59
+ --wco-modal-padding: var(--wco-spacing-xxxs) var(--wco-spacing-nano);
60
+ }
61
+
62
+ }
63
+ button.wco-modal--close {
64
+ padding: var(--wco-spacing-nano);
65
+ position: absolute;
66
+ top: 0;
67
+ right: 0;
68
+ background: none;
69
+ border: none;
70
+ cursor: pointer;
71
+ font-size: var(--wco-font-size-md);
72
+ color: var(--wco-color-primary-700);
73
+ transition: color 0.3s;
74
+ &:hover {
75
+ color: var(--wco-color-primary-500);
76
+ }
77
+ }
78
+ &::backdrop {
79
+ background-color: rgba(0, 0, 0, 0.5);
80
+ transition:
81
+ display 0.1s allow-discrete,
82
+ overlay 0.1s allow-discrete,
83
+ background-color 0.1s;
84
+ }
85
+ }