@charlesgomes/leafcode-shared-lib-react 1.0.58 → 1.0.59

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.
@@ -0,0 +1,20 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+ *::after,
7
+ *::before {
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ html,
12
+ body {
13
+ width: 100%;
14
+ height: 100%;
15
+ }
16
+
17
+ body {
18
+ -webkit-font-smoothing: antialiased;
19
+ scroll-behavior: smooth;
20
+ }
@@ -6,66 +6,66 @@
6
6
  }
7
7
 
8
8
  .button-primary {
9
- font-size: 14px;
9
+ font-size: var(--button-font-size, 14px);
10
10
  cursor: pointer;
11
- font-family: sans-serif;
12
- font-weight: 600;
13
- color: #fff;
11
+ font-family: var(--button-font-family, "Roboto", sans-serif);
12
+ font-weight: var(--button-font-weight, 600);
13
+ color: var(--button-color, #ffffff);
14
14
  transition: all 300ms ease-in-out;
15
- background-color: #175dbf;
16
- border-radius: 0.375rem;
15
+ background-color: var(--button-primary-bg-color, #175dbf);
16
+ border-radius: var(--button-border-radius, 0.375rem);
17
17
  padding-left: 1.5rem;
18
18
  padding-right: 1.5rem;
19
- height: 2.5rem;
20
- width: 100%;
21
- min-width: 8rem;
19
+ height: var(--button-height, 2.5rem);
20
+ width: fit-content;
21
+ min-width: var(--button-min-width, 8rem);
22
22
  border: none;
23
23
  }
24
24
 
25
25
  .button-primary:hover {
26
- background-color: #70a3ff;
27
- color: #fff;
26
+ background-color: var(--button-primary-hover-bg-color, #70a3ff);
27
+ color: var(--button-color, #ffffff);
28
28
  }
29
29
 
30
30
  .button-secundary {
31
- font-size: 14px;
31
+ font-size: var(--button-font-size, 14px);
32
32
  cursor: pointer;
33
- font-family: sans-serif;
34
- font-weight: 600;
35
- color: #fff;
33
+ font-family: var(--button-font-family, "Roboto", sans-serif);
34
+ font-weight: var(--button-font-weight, 600);
35
+ color: var(--button-color, #ffffff);
36
36
  transition: all 300ms ease-in-out;
37
- background-color: #bf1717;
38
- border-radius: 0.375rem;
37
+ background-color: var(--button-secundary-bg-color, #bf1717);
38
+ border-radius: var(--button-border-radius, 0.375rem);
39
39
  padding-left: 1.5rem;
40
40
  padding-right: 1.5rem;
41
- height: 2.5rem;
42
- width: 100%;
43
- min-width: 8rem;
41
+ height: var(--button-height, 2.5rem);
42
+ width: fit-content;
43
+ min-width: var(--button-min-width, 8rem);
44
44
  border: none;
45
45
  }
46
46
 
47
47
  .button-secundary:hover {
48
- background-color: #f35353;
49
- color: #fff;
48
+ background-color: var(--button-secundary-hover-bg-color, #f35353);
49
+ color: var(--button-color, #ffffff);
50
50
  }
51
51
 
52
- .button-primary-disabled {
53
- font-size: 14px;
54
- font-family: sans-serif;
55
- font-weight: 600;
56
- color: #fff;
52
+ .button-disabled {
53
+ font-size: var(--button-font-size, 14px);
54
+ font-family: var(--button-font-family, "Roboto", sans-serif);
55
+ font-weight: var(--button-font-weight, 600);
56
+ color: var(--button-disabled-color, #ffffff);
57
57
  transition: all 300ms ease-in-out;
58
- border: 1px solid #b6b9d3;
59
- background-color: #b6b9d3;
58
+ border: 1px solid var(--button-disabled-border-color, #b6b9d3);
59
+ background-color: var(--button-disabled-bg-color, #b6b9d3);
60
60
  cursor: not-allowed;
61
- border-radius: 0.375rem;
61
+ border-radius: var(--button-border-radius, 0.375rem);
62
62
  padding-left: 1.5rem;
63
63
  padding-right: 1.5rem;
64
64
  padding-top: 0.375rem;
65
65
  padding-bottom: 0.5rem;
66
- height: 2.5rem;
67
- width: 100%;
68
- min-width: 8rem;
66
+ height: var(--button-height, 2.5rem);
67
+ width: fit-content;
68
+ min-width: var(--button-min-width, 8rem);
69
69
  line-height: normal;
70
70
  border: none;
71
71
  }
@@ -79,9 +79,9 @@
79
79
  }
80
80
 
81
81
  .animate-spin {
82
- height: 1.25rem;
83
- width: 1.25rem;
84
- color: #fff;
82
+ height: var(--button-height, 1.25rem);
83
+ width: var(--button-height, 1.25rem);
84
+ color: var(--button-color, #ffffff);
85
85
  }
86
86
 
87
87
  .opacity-01 {
@@ -92,16 +92,10 @@
92
92
  opacity: 0.75;
93
93
  }
94
94
 
95
- @media (min-width: 640px) {
96
- .button-primary {
97
- width: fit-content;
98
- }
99
-
100
- .button-secundary {
101
- width: fit-content;
102
- }
103
-
104
- .button-primary-disabled {
105
- width: fit-content;
95
+ @media (max-width: 576px) {
96
+ .button-primary,
97
+ .button-secundary,
98
+ .button-disabled {
99
+ width: 100%;
106
100
  }
107
101
  }
@@ -1,12 +1,8 @@
1
- * {
2
- box-sizing: border-box;
3
- }
4
-
5
1
  /* LABEL */
6
2
  .label-input {
7
3
  font-family: var(--label-font-family, "Roboto", sans-serif);
8
- font-weight: var(--label-font-weight, 400);
9
- font-size: 13px;
4
+ font-weight: var(--label-font-weight, 600);
5
+ font-size: var(--label-font-size, 13px);
10
6
  line-height: 14px;
11
7
  color: var(--label-color, #070707);
12
8
  position: absolute;
@@ -43,14 +39,14 @@
43
39
  .input {
44
40
  font-family: var(--input-font-family, "Roboto", sans-serif);
45
41
  font-weight: var(--input-font-weight, 400);
46
- font-size: 13.5px;
42
+ font-size: var(--input-font-size, 13px);
47
43
  width: 100%;
48
44
  border: 1px solid var(--input-border, #d1d5db);
49
- border-radius: 6px;
50
- height: 2.5rem;
45
+ border-radius: var(--input-border-radius, 6px);
46
+ height: var(--input-height, 2.5rem);
51
47
  padding: 0.75rem;
52
48
  background-color: var(--input-bg, #ffffff);
53
- color: var(--input-text, #070707);
49
+ color: var(--input-text-color, #070707);
54
50
  position: relative;
55
51
  }
56
52
 
@@ -59,6 +55,11 @@
59
55
  border-color: var(--input-focus-border, #60a5fa);
60
56
  }
61
57
 
58
+ .input:hover {
59
+ outline: none;
60
+ border-color: var(--input-focus-border, #60a5fa);
61
+ }
62
+
62
63
  .input::placeholder {
63
64
  color: var(--input-placeholder, #a5a5a5);
64
65
  }
@@ -124,5 +125,122 @@ input:-webkit-autofill:focus {
124
125
  /* TEXTAREA */
125
126
  .textArea {
126
127
  resize: none;
127
- height: var(--height-text-area, 6rem);
128
+ height: var(--input-height-text-area, 6rem);
129
+ }
130
+
131
+ /* REACT SELECT */
132
+ .react-select-container.has-error .react-select__control {
133
+ border: 1px solid var(--input-error-border, #f87171) !important;
134
+ }
135
+
136
+ .react-select__control {
137
+ min-height: var(--input-height, 40px) !important;
138
+ border: 1px solid var(--input-border, #d1d5db) !important;
139
+ border-radius: var(--input-border-radius, 6px) !important;
140
+ font-family: var(--input-font-family, "Roboto", sans-serif);
141
+ font-weight: var(--input-font-weight, 400);
142
+ font-size: var(--input-font-size, 13px);
143
+ box-shadow: none !important;
144
+ background-color: var(--input-bg, #ffffff) !important;
145
+ }
146
+
147
+ .react-select__control--is-focused {
148
+ border-color: var(--input-focus-border, #60a5fa) !important;
149
+ }
150
+
151
+ .react-select__control:hover {
152
+ border-color: var(--input-focus-border, #60a5fa) !important;
153
+ }
154
+
155
+ .react-select__placeholder {
156
+ color: var(--input-placeholder, #a5a5a5) !important;
157
+ }
158
+
159
+ .react-select__option {
160
+ background-color: var(--input-bg, #ffffff) !important;
161
+ color: var(--input-text-color, #070707);
162
+ cursor: pointer;
163
+ padding: 8px 12px;
164
+ font-family: var(--input-font-family, "Roboto", sans-serif);
165
+ font-weight: var(--input-font-weight, 400);
166
+ font-size: var(--input-font-size, 13px) !important;
167
+ }
168
+
169
+ .react-select__option--is-focused {
170
+ background-color: var(--input-focus-border, #79bdd8) !important;
171
+ color: var(--input-text-color, #ffffff);
172
+ }
173
+
174
+ .react-select__option--is-selected {
175
+ background-color: var(--input-focus-border, #60a5fa) !important;
176
+ color: var(--input-text-color, #ffffff) !important;
177
+ }
178
+
179
+ .react-select__option:hover {
180
+ background-color: var(--input-focus-border, #79bdd8) !important;
181
+ color: var(--input-text-color, #ffffff) !important;
182
+ }
183
+
184
+ /* INPUT AUTOCOMPLETE */
185
+ .dropdown-container {
186
+ position: absolute;
187
+ z-index: 40;
188
+ margin-top: 0.25rem;
189
+ width: 100%;
190
+ border: 1px solid var(--input-border, #d1d5db);
191
+ border-radius: var(--input-border-radius, 6px);
192
+ background-color: var(--input-bg, #ffffff);
193
+ color: var(--input-text-color, #070707);
194
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
195
+ }
196
+
197
+ .dropdown-list {
198
+ max-height: 13rem;
199
+ overflow-y: auto;
200
+ list-style: none;
201
+ margin: 0;
202
+ padding: 0;
203
+ }
204
+
205
+ .dropdown-item {
206
+ padding: 0.5rem 0.75rem;
207
+ cursor: pointer;
208
+ color: var(--input-text-color, #070707);
209
+ font-family: var(--input-font-family, "Roboto", sans-serif);
210
+ font-weight: var(--input-font-weight, 400);
211
+ font-size: var(--input-font-size, 13px);
212
+ }
213
+
214
+ .dropdown-item:hover {
215
+ background-color: var(--dropdown-item-hover-bg-color, #79bdd8);
216
+ color: var(--dropdown-item-hover-color, #ffffff);
217
+ }
218
+
219
+ .dropdown-loading {
220
+ display: flex;
221
+ justify-content: center;
222
+ padding: 0.5rem 0;
223
+ }
224
+
225
+ .dropdown-empty {
226
+ padding: 0.5rem 0.75rem;
227
+ font-size: 0.875rem;
228
+ color: var(--dropdown-empty-color, #71717a);
229
+ font-family: var(--input-font-family, "Roboto", sans-serif);
230
+ font-weight: var(--input-font-weight, 400);
231
+ font-size: var(--input-font-size, 13px);
232
+ }
233
+
234
+ .dropdown-clear {
235
+ position: absolute;
236
+ right: 0.75rem;
237
+ top: 0.75rem;
238
+ background: none;
239
+ border: none;
240
+ padding: 0;
241
+ cursor: pointer;
242
+ }
243
+
244
+ .icone-clear {
245
+ color: var(--input-error-border, #f87171);
128
246
  }
@@ -0,0 +1,99 @@
1
+ .modal-overlay {
2
+ position: fixed;
3
+ inset: 0;
4
+ z-index: 60;
5
+ display: flex;
6
+ justify-content: center;
7
+ align-items: flex-start;
8
+ padding-top: 2.75rem;
9
+ overflow-x: hidden;
10
+ overflow-y: auto;
11
+ outline: none;
12
+ }
13
+
14
+ .modal-wrapper {
15
+ position: relative;
16
+ width: auto;
17
+ margin: 1.5rem auto;
18
+ width: 100%;
19
+ max-width: var(--modal-max-width, 36rem);
20
+ }
21
+
22
+ .modal-content {
23
+ display: flex;
24
+ text-align: center;
25
+ flex-direction: column;
26
+ width: 100%;
27
+ background-color: var(--modal-bg-color, #ffffff);
28
+ border-radius: 0.5rem;
29
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
30
+ border: 0;
31
+ position: relative;
32
+ }
33
+
34
+ .modal-header {
35
+ display: flex;
36
+ justify-content: space-between;
37
+ align-items: center;
38
+ padding: 0.5rem;
39
+ position: relative;
40
+ }
41
+
42
+ .button-close {
43
+ color: var(--modal-close-color, #000);
44
+ }
45
+
46
+ .modal-title {
47
+ font-size: var(--modal-title-font-size, 1.125rem);
48
+ font-weight: var(--modal-title-font-weight, 700);
49
+ color: var(--modal-title-color, #000);
50
+ position: absolute;
51
+ top: 1.5rem;
52
+ left: 50%;
53
+ transform: translate(-50%, -50%);
54
+ text-align: center;
55
+ font-family: var(--modal-title-font-family, "roboto", sans-serif);
56
+ }
57
+
58
+ .modal-close {
59
+ padding: 0.25rem;
60
+ margin-left: auto;
61
+ margin-right: 0.25rem;
62
+ background: none;
63
+ border: none;
64
+ cursor: pointer;
65
+ }
66
+
67
+ .modal-body {
68
+ width: 100%;
69
+ padding: 1.5rem;
70
+ font-family: var(--modal-body-font-family, "roboto", sans-serif);
71
+ font-size: var(--modal-body-font-size, 1rem);
72
+ color: var(--modal-body-color, #000);
73
+ }
74
+
75
+ .modal-backdrop {
76
+ position: fixed;
77
+ inset: 0;
78
+ background-color: black;
79
+ opacity: 0.4;
80
+ z-index: 50;
81
+ }
82
+
83
+ .modal-footer {
84
+ padding: 1.5rem;
85
+ padding-top: 2rem;
86
+ }
87
+
88
+ .modal-footer {
89
+ display: flex;
90
+ gap: 1rem;
91
+ justify-content: flex-end;
92
+ }
93
+
94
+ @media (max-width: 576px) {
95
+ .modal-footer {
96
+ display: grid;
97
+ justify-content: center;
98
+ }
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -11,9 +11,11 @@
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.cjs"
13
13
  },
14
+ "./base.css": "./dist/styles/base.css",
14
15
  "./table.css": "./dist/styles/table.css",
15
16
  "./button.css": "./dist/styles/button.css",
16
- "./input.css": "./dist/styles/input.css"
17
+ "./input.css": "./dist/styles/input.css",
18
+ "./modalBase.css": "./dist/styles/modalBase.css"
17
19
  },
18
20
  "files": [
19
21
  "dist"
@@ -41,6 +43,8 @@
41
43
  "devDependencies": {
42
44
  "@tailwindcss/postcss": "^4.1.12",
43
45
  "@tanstack/react-query": "^5.85.9",
46
+ "@types/lodash": "^4.17.21",
47
+ "@types/lodash.merge": "^4.6.9",
44
48
  "@types/react": "^19.1.12",
45
49
  "@types/react-dom": "^19.1.9",
46
50
  "@vitejs/plugin-react": "^5.0.2",
@@ -53,9 +57,10 @@
53
57
  "vite": "^7.1.4"
54
58
  },
55
59
  "dependencies": {
56
- "@charlesgomes/leafcode-shared-lib-react": "^1.0.57",
57
60
  "@phosphor-icons/react": "^2.1.10",
58
61
  "clsx": "^2.1.1",
62
+ "lodash": "^4.17.21",
63
+ "lodash.merge": "^4.6.2",
59
64
  "moment": "^2.30.1",
60
65
  "primereact": "^10.9.7",
61
66
  "react-hook-form": "^7.70.0",