@zambon-dev/ui 0.0.1-bootstrap.0 → 1.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +177 -0
  2. package/README.md +81 -81
  3. package/fesm2022/zambon-dev-ui-framework.mjs +5995 -3980
  4. package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
  5. package/fesm2022/zambon-dev-ui-library.mjs +6003 -4272
  6. package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
  7. package/fesm2022/zambon-dev-ui-shared.mjs +2758 -1790
  8. package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
  9. package/fesm2022/zambon-dev-ui-testing.mjs +73 -77
  10. package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -1
  11. package/fesm2022/zambon-dev-ui.mjs +6 -8
  12. package/i18n/framework/en.json +63 -63
  13. package/i18n/framework/pt.json +63 -63
  14. package/i18n/shared/external-content/en.json +12 -12
  15. package/i18n/shared/external-content/pt.json +12 -12
  16. package/i18n/shared/language-selector/en.json +5 -5
  17. package/i18n/shared/language-selector/pt.json +5 -5
  18. package/i18n/shared/login/en.json +16 -14
  19. package/i18n/shared/login/pt.json +16 -14
  20. package/i18n/shared/operations-history/en.json +5 -5
  21. package/i18n/shared/operations-history/pt.json +5 -5
  22. package/i18n/shared/services-history/en.json +14 -14
  23. package/i18n/shared/services-history/pt.json +14 -14
  24. package/i18n/shared/top-bar/en.json +10 -7
  25. package/i18n/shared/top-bar/pt.json +10 -7
  26. package/package.json +1 -1
  27. package/styles/common.scss +9 -10
  28. package/styles/components/card.scss +19 -13
  29. package/styles/components/dropdown-static.scss +33 -35
  30. package/styles/components/input-group.scss +48 -44
  31. package/styles/components/input.scss +120 -99
  32. package/styles/components/label.scss +6 -3
  33. package/styles/components/row.scss +48 -48
  34. package/styles/mixins/background.scss +31 -31
  35. package/styles/theme.css +307 -75
  36. package/styles/variables.scss +86 -60
  37. package/types/zambon-dev-ui-framework.d.ts +1470 -1029
  38. package/types/zambon-dev-ui-library.d.ts +1689 -1165
  39. package/types/zambon-dev-ui-shared.d.ts +630 -543
  40. package/types/zambon-dev-ui-testing.d.ts +25 -30
  41. package/types/zambon-dev-ui.d.ts +6 -3
  42. package/fesm2022/zambon-dev-ui.mjs.map +0 -1
  43. package/styles/components/button.scss +0 -101
@@ -1,5 +1,5 @@
1
- {
2
- "OperationsHistory-Modal-Title": "Object changes details",
3
-
4
- "": ""
5
- }
1
+ {
2
+ "OperationsHistory-Modal-Title": "Object changes details",
3
+
4
+ "": ""
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "OperationsHistory-Modal-Title": "Detalhes de alteração do objeto",
3
-
4
- "": ""
5
- }
1
+ {
2
+ "OperationsHistory-Modal-Title": "Detalhes de alteração do objeto",
3
+
4
+ "": ""
5
+ }
@@ -1,14 +1,14 @@
1
- {
2
- "ServicesHistory-Field-ChangedBy": "Employee",
3
- "ServicesHistory-Field-ChangedOnFrom": "From",
4
- "ServicesHistory-Field-ChangedOnTo": "To",
5
- "ServicesHistory-Field-Name": "Action",
6
- "ServicesHistory-Field-OnlyCurrentEntity": "This record only?",
7
- "ServicesHistory-Field-OnlyCurrentEntity-Notes": "An action usually writes to more than one table, and every operation it performed is listed by default — that is what shows the related records a change also touched. Tick this to see only the operations on this record.",
8
- "ServicesHistory-Filters-Title": "History filters",
9
- "ServicesHistory-FormGroup-Operations": "Operations",
10
- "ServicesHistory-FormGroup-Period": "Period",
11
- "ServicesHistory-FormGroup-Service": "Action",
12
-
13
- "": ""
14
- }
1
+ {
2
+ "ServicesHistory-Field-ChangedBy": "Employee",
3
+ "ServicesHistory-Field-ChangedOnFrom": "From",
4
+ "ServicesHistory-Field-ChangedOnTo": "To",
5
+ "ServicesHistory-Field-Name": "Action",
6
+ "ServicesHistory-Field-OnlyCurrentEntity": "This record only?",
7
+ "ServicesHistory-Field-OnlyCurrentEntity-Notes": "An action usually writes to more than one table, and every operation it performed is listed by default — that is what shows the related records a change also touched. Tick this to see only the operations on this record.",
8
+ "ServicesHistory-Filters-Title": "History filters",
9
+ "ServicesHistory-FormGroup-Operations": "Operations",
10
+ "ServicesHistory-FormGroup-Period": "Period",
11
+ "ServicesHistory-FormGroup-Service": "Action",
12
+
13
+ "": ""
14
+ }
@@ -1,14 +1,14 @@
1
- {
2
- "ServicesHistory-Field-ChangedBy": "Funcionário",
3
- "ServicesHistory-Field-ChangedOnFrom": "De",
4
- "ServicesHistory-Field-ChangedOnTo": "Até",
5
- "ServicesHistory-Field-Name": "Ação",
6
- "ServicesHistory-Field-OnlyCurrentEntity": "Apenas este registro?",
7
- "ServicesHistory-Field-OnlyCurrentEntity-Notes": "Uma ação costuma alterar mais de uma tabela, e por padrão são listadas todas as operações que ela realizou — é isso que mostra os registros relacionados que a alteração também tocou. Marque para ver somente as operações sobre este registro.",
8
- "ServicesHistory-Filters-Title": "Filtros do histórico",
9
- "ServicesHistory-FormGroup-Operations": "Operações",
10
- "ServicesHistory-FormGroup-Period": "Período",
11
- "ServicesHistory-FormGroup-Service": "Ação",
12
-
13
- "": ""
14
- }
1
+ {
2
+ "ServicesHistory-Field-ChangedBy": "Funcionário",
3
+ "ServicesHistory-Field-ChangedOnFrom": "De",
4
+ "ServicesHistory-Field-ChangedOnTo": "Até",
5
+ "ServicesHistory-Field-Name": "Ação",
6
+ "ServicesHistory-Field-OnlyCurrentEntity": "Apenas este registro?",
7
+ "ServicesHistory-Field-OnlyCurrentEntity-Notes": "Uma ação costuma alterar mais de uma tabela, e por padrão são listadas todas as operações que ela realizou — é isso que mostra os registros relacionados que a alteração também tocou. Marque para ver somente as operações sobre este registro.",
8
+ "ServicesHistory-Filters-Title": "Filtros do histórico",
9
+ "ServicesHistory-FormGroup-Operations": "Operações",
10
+ "ServicesHistory-FormGroup-Period": "Período",
11
+ "ServicesHistory-FormGroup-Service": "Ação",
12
+
13
+ "": ""
14
+ }
@@ -1,7 +1,10 @@
1
- {
2
- "TopBar-Notifications-Title": "Notifications",
3
- "TopBar-Notifications-Empty": "No notifications",
4
- "TopBar-Notifications-MarkAllRead": "Mark all as read",
5
-
6
- "": ""
7
- }
1
+ {
2
+ "TopBar-Notifications-Title": "Notifications",
3
+ "TopBar-Notifications-Empty": "No notifications",
4
+ "TopBar-Notifications-MarkAllRead": "Mark all as read",
5
+ "TopBar-Theme-Light": "Light theme",
6
+ "TopBar-Theme-Dark": "Dark theme",
7
+ "TopBar-Theme-System": "Theme follows the system",
8
+
9
+ "": ""
10
+ }
@@ -1,7 +1,10 @@
1
- {
2
- "TopBar-Notifications-Title": "Notificações",
3
- "TopBar-Notifications-Empty": "Nenhuma notificação",
4
- "TopBar-Notifications-MarkAllRead": "Marcar todas como lidas",
5
-
6
- "": ""
7
- }
1
+ {
2
+ "TopBar-Notifications-Title": "Notificações",
3
+ "TopBar-Notifications-Empty": "Nenhuma notificação",
4
+ "TopBar-Notifications-MarkAllRead": "Marcar todas como lidas",
5
+ "TopBar-Theme-Light": "Tema claro",
6
+ "TopBar-Theme-Dark": "Tema escuro",
7
+ "TopBar-Theme-System": "Tema acompanha o sistema",
8
+
9
+ "": ""
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zambon-dev/ui",
3
- "version": "0.0.1-bootstrap.0",
3
+ "version": "1.1.0",
4
4
  "description": "Angular UI components, application framework and shared application layer for Zambon applications.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1,10 +1,9 @@
1
- @reference './theme.css';
2
-
3
- @import 'variables';
4
- @import 'components/button';
5
- @import 'components/card';
6
- @import 'components/dropdown-static';
7
- @import 'components/input';
8
- @import 'components/input-group';
9
- @import 'components/label';
10
- @import 'components/row';
1
+ @reference './theme.css';
2
+
3
+ @import 'variables';
4
+ @import 'components/card';
5
+ @import 'components/dropdown-static';
6
+ @import 'components/input';
7
+ @import 'components/input-group';
8
+ @import 'components/label';
9
+ @import 'components/row';
@@ -1,13 +1,19 @@
1
- .card {
2
- @apply border rounded-lg relative mt-4 pt-3 px-2 pb-2;
3
- @apply bg-white/80 border-gray-300/90;
4
- @apply grid gap-3;
5
-
6
- .title {
7
- @apply text-lg font-semibold absolute -top-4 left-2 px-2 bg-white;
8
- }
9
-
10
- .input-group:not(:first-child) {
11
- @apply mt-0;
12
- }
13
- }
1
+ .card {
2
+ @apply border relative mt-4 pt-3 px-2 pb-2;
3
+ @apply grid gap-3;
4
+ border-radius: var(--radius-control);
5
+ background-color: var(--color-surface-solid);
6
+ border-color: var(--color-line);
7
+
8
+ .title {
9
+ @apply absolute -top-4 left-2 px-2;
10
+ font-size: var(--text-title);
11
+ font-weight: var(--font-weight-emphasis);
12
+ background-color: var(--color-surface-solid);
13
+ color: var(--color-content-primary);
14
+ }
15
+
16
+ .input-group:not(:first-child) {
17
+ @apply mt-0;
18
+ }
19
+ }
@@ -1,35 +1,33 @@
1
- .dropdown {
2
- @apply relative;
3
-
4
- .btn {
5
- @apply bg-neutral-600/60 text-white border border-neutral-900/40 backdrop-blur-md;
6
-
7
- @apply focus:ring-neutral-600/30;
8
- @apply focus:bg-neutral-600/70 hover:bg-neutral-600/70;
9
- @apply active:bg-neutral-600/80;
10
-
11
- &:after {
12
- @apply content-[''] inline-block ml-1 align-middle;
13
- @apply border-x-[.3em] border-t-[.3em] border-solid border-x-white/0;
14
- }
15
- }
16
-
17
- &.show ul {
18
- @apply block;
19
- }
20
-
21
- &.right ul {
22
- @apply right-0;
23
- }
24
-
25
- ul {
26
- @apply absolute hidden py-1 rounded-sm shadow-sm;
27
- @apply bg-white/95 border border-neutral-400 backdrop-blur-md shadow-md;
28
-
29
- .dropdown-item {
30
- @apply block p-2 cursor-pointer whitespace-nowrap select-none;
31
- @apply focus:bg-neutral-200/80 hover:bg-neutral-200/80;
32
- @apply active:bg-slate-400 active:text-white;
33
- }
34
- }
35
- }
1
+ .dropdown {
2
+ @apply relative;
3
+
4
+ &.show ul {
5
+ @apply block;
6
+ }
7
+
8
+ &.right ul {
9
+ @apply right-0;
10
+ }
11
+
12
+ ul {
13
+ @apply absolute hidden py-1 border;
14
+ border-radius: var(--radius-control);
15
+ border-color: var(--color-line);
16
+ background-color: var(--color-surface-solid);
17
+ box-shadow: var(--shadow-overlay);
18
+
19
+ .dropdown-item {
20
+ @apply block p-2 cursor-pointer whitespace-nowrap select-none;
21
+ color: var(--color-content-primary);
22
+
23
+ &:hover,
24
+ &:focus-visible {
25
+ background-color: var(--state-hover);
26
+ }
27
+
28
+ &:active {
29
+ background-color: var(--state-pressed);
30
+ }
31
+ }
32
+ }
33
+ }
@@ -1,44 +1,48 @@
1
- .input-group {
2
- &.inline {
3
- @apply flex flex-row-reverse flex-wrap items-stretch mb-3;
4
-
5
- .input-group-text {
6
- @apply py-1.5 px-3 rounded-l flex flex-row items-center whitespace-nowrap select-none;
7
- @apply bg-slate-500 text-gray-50 border-blue-400;
8
- }
9
-
10
- input[type='text'].form-input,
11
- input[type='password'].form-input {
12
- @apply mt-0 rounded-l-none -ml-1;
13
- @apply w-1 grow;
14
-
15
- &.ng-touched.ng-invalid {
16
- ~ .input-group-text {
17
- @apply bg-red-600;
18
- }
19
- }
20
- }
21
- }
22
-
23
- &.checkbox {
24
- @apply pt-[1.85rem] text-center;
25
- }
26
-
27
- &:not(:first-child) {
28
- @apply mt-3;
29
- }
30
-
31
- input[type='text'].form-input,
32
- input[type='password'].form-input {
33
- &.ng-touched.ng-invalid {
34
- ~ .validations {
35
- @apply block;
36
- }
37
- }
38
- }
39
-
40
- .validations {
41
- @apply hidden basis-full mt-1;
42
- @apply text-red-600 text-sm;
43
- }
44
- }
1
+ .input-group {
2
+ &.inline {
3
+ @apply flex flex-row-reverse flex-wrap items-stretch mb-3;
4
+
5
+ .input-group-text {
6
+ @apply py-1.5 px-3 rounded-l flex flex-row items-center whitespace-nowrap select-none;
7
+ background-color: var(--color-surface-inset);
8
+ color: var(--color-content-secondary);
9
+ border-color: var(--color-line-strong);
10
+ }
11
+
12
+ input[type='text'].form-input,
13
+ input[type='password'].form-input {
14
+ @apply mt-0 rounded-l-none -ml-1;
15
+ @apply w-1 grow;
16
+
17
+ &.ng-touched.ng-invalid {
18
+ ~ .input-group-text {
19
+ background-color: var(--color-danger);
20
+ color: var(--color-content-on-accent);
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ &.checkbox {
27
+ @apply pt-[1.85rem] text-center;
28
+ }
29
+
30
+ &:not(:first-child) {
31
+ @apply mt-3;
32
+ }
33
+
34
+ input[type='text'].form-input,
35
+ input[type='password'].form-input {
36
+ &.ng-touched.ng-invalid {
37
+ ~ .validations {
38
+ @apply block;
39
+ }
40
+ }
41
+ }
42
+
43
+ .validations {
44
+ @apply hidden basis-full mt-1;
45
+ @apply text-sm;
46
+ color: var(--color-danger);
47
+ }
48
+ }
@@ -1,99 +1,120 @@
1
- .form-input {
2
- @apply border-gray-400;
3
- @apply focus:border-gray-400 focus:ring-4 focus:ring-primary-400/30;
4
- @apply transition-colors transition-shadow;
5
-
6
- @apply invalid:border-red-400;
7
-
8
- @apply disabled:bg-slate-100;
9
-
10
- &.ng-invalid.ng-touched {
11
- @apply border-red-600;
12
- }
13
- }
14
-
15
- input[type='text'],
16
- input[type='number'],
17
- input[type='password'],
18
- textarea {
19
- &.form-input {
20
- @apply mt-1 block w-full rounded-md shadow-xs;
21
-
22
- &.ng-invalid.ng-touched {
23
- @apply pr-9;
24
- @apply focus:ring-red-400/30;
25
- @apply bg-no-repeat bg-[right_0.5625rem_center] bg-[length:1.125rem_1.125rem];
26
- background-image: url("data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
27
- }
28
- }
29
- }
30
-
31
- input[type='checkbox'].form-input {
32
- @apply p-0.5 h-5 w-5 rounded-sm relative;
33
- @apply inline-flex flex-row justify-end;
34
- @apply appearance-none bg-white;
35
-
36
- @apply disabled:pointer-events-none disabled:opacity-50;
37
-
38
- &:not(.switch) {
39
- @apply border-2 shadow-md focus:ring-3 focus:shadow-none;
40
-
41
- &:before {
42
- @apply content-[''] rounded-sm;
43
- @apply flex items-center justify-center absolute inset-0 p-1;
44
- font-family: var(--fa-family-classic, 'Font Awesome 6 Free');
45
- font-weight: 900;
46
- }
47
- }
48
-
49
- &:checked {
50
- @apply bg-none bg-primary-400 border-primary-400/80;
51
-
52
- &:before {
53
- @apply content-['\f00c'];
54
- @apply text-white;
55
- }
56
- }
57
-
58
- &:disabled {
59
- ~ label {
60
- @apply opacity-50;
61
- }
62
- }
63
-
64
- ~ label {
65
- @apply ml-2 select-none;
66
- }
67
- }
68
-
69
- input[type='checkbox'].form-input.switch {
70
- @apply w-10 rounded-[2rem];
71
- @apply appearance-none bg-white;
72
-
73
- &:before {
74
- @apply content-[''] h-full aspect-square rounded-full;
75
- @apply bg-slate-500/60;
76
- }
77
-
78
- &:after {
79
- @apply content-[''] grow;
80
- transition: flex-grow 0.15s ease-in-out;
81
- }
82
-
83
- &:focus:before {
84
- @apply bg-slate-500/60;
85
- }
86
-
87
- &:checked {
88
- @apply bg-none bg-primary-400 border-primary-400/80;
89
-
90
- &:before {
91
- @apply content-[''];
92
- @apply bg-white;
93
- }
94
-
95
- &:after {
96
- @apply grow-0;
97
- }
98
- }
99
- }
1
+ .form-input {
2
+ border-color: var(--color-line-strong);
3
+
4
+ &:focus-visible {
5
+ @apply outline-hidden ring-[length:var(--focus-ring-width)];
6
+ --tw-ring-color: var(--color-focus-ring);
7
+ }
8
+ @apply transition-colors transition-shadow;
9
+
10
+ &:invalid {
11
+ border-color: var(--color-danger);
12
+ }
13
+
14
+ &:disabled {
15
+ background-color: var(--color-surface-inset);
16
+ }
17
+
18
+ &.ng-invalid.ng-touched {
19
+ border-color: var(--color-danger);
20
+ }
21
+ }
22
+
23
+ input[type='text'],
24
+ input[type='number'],
25
+ input[type='password'],
26
+ textarea {
27
+ &.form-input {
28
+ @apply mt-1 block w-full shadow-xs;
29
+ border-radius: var(--radius-field);
30
+
31
+ &.ng-invalid.ng-touched {
32
+ @apply pr-9;
33
+ &:focus-visible {
34
+ --tw-ring-color: var(--color-danger);
35
+ }
36
+ @apply bg-no-repeat bg-[right_0.5625rem_center] bg-[length:1.125rem_1.125rem];
37
+ background-image: url("data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
38
+ }
39
+ }
40
+ }
41
+
42
+ input[type='checkbox'].form-input {
43
+ @apply p-0.5 h-5 w-5 rounded-sm relative;
44
+ @apply inline-flex flex-row justify-end;
45
+ @apply appearance-none;
46
+ background-color: var(--color-surface-solid);
47
+
48
+ @apply disabled:pointer-events-none disabled:opacity-50;
49
+
50
+ &:not(.switch) {
51
+ @apply border-2 shadow-md;
52
+
53
+ &:focus-visible {
54
+ @apply shadow-none;
55
+ }
56
+
57
+ &:before {
58
+ @apply content-[''] rounded-sm;
59
+ @apply flex items-center justify-center absolute inset-0 p-1;
60
+ font-family: var(--fa-family-classic, 'Font Awesome 6 Free');
61
+ font-weight: 900;
62
+ }
63
+ }
64
+
65
+ &:checked {
66
+ @apply bg-none;
67
+ background-color: var(--color-accent);
68
+ border-color: var(--color-accent);
69
+
70
+ &:before {
71
+ @apply content-['\f00c'];
72
+ color: var(--color-content-on-accent);
73
+ }
74
+ }
75
+
76
+ &:disabled {
77
+ ~ label {
78
+ @apply opacity-50;
79
+ }
80
+ }
81
+
82
+ ~ label {
83
+ @apply ml-2 select-none;
84
+ }
85
+ }
86
+
87
+ input[type='checkbox'].form-input.switch {
88
+ @apply w-10 rounded-[2rem];
89
+ @apply appearance-none;
90
+ background-color: var(--color-surface-solid);
91
+
92
+ &:before {
93
+ @apply content-[''] h-full aspect-square rounded-full;
94
+ background-color: var(--color-content-subtle);
95
+ }
96
+
97
+ &:after {
98
+ @apply content-[''] grow;
99
+ transition: flex-grow 0.15s ease-in-out;
100
+ }
101
+
102
+ &:focus-visible:before {
103
+ background-color: var(--color-accent);
104
+ }
105
+
106
+ &:checked {
107
+ @apply bg-none;
108
+ background-color: var(--color-accent);
109
+ border-color: var(--color-accent);
110
+
111
+ &:before {
112
+ @apply content-[''];
113
+ background-color: var(--color-surface-solid);
114
+ }
115
+
116
+ &:after {
117
+ @apply grow-0;
118
+ }
119
+ }
120
+ }
@@ -1,3 +1,6 @@
1
- .form-label {
2
- @apply block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2;
3
- }
1
+ .form-label {
2
+ @apply block mb-2;
3
+ font-size: var(--text-caption);
4
+ font-weight: var(--font-weight-emphasis);
5
+ color: var(--color-content-secondary);
6
+ }