@charlesgomes/leafcode-shared-lib-react 1.0.89 → 1.0.90

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.css CHANGED
@@ -11,20 +11,20 @@
11
11
  gap: 10px;
12
12
  }
13
13
  .tableClassName {
14
- font-weight: 500;
15
- font-family: "Roboto", sans-serif;
16
- font-size: 0.875rem;
14
+ font-weight: var(--table-font-weight, 600);
15
+ font-family: var(--table-font-family, "Roboto", sans-serif);
16
+ font-size: var(--table-font-size, 0.875rem);
17
17
  }
18
18
  .paginatorClassName {
19
19
  padding: 0 0 0.75rem 0;
20
- font-weight: 500;
21
- font-family: "Roboto", sans-serif;
22
- font-size: 0.875rem;
20
+ font-weight: var(--table-font-weight, 600);
21
+ font-family: var(--table-font-family, "Roboto", sans-serif);
22
+ font-size: var(--table-font-size, 0.875rem);
23
23
  }
24
24
  .custom-input {
25
- font-weight: 500;
26
- font-family: "Roboto", sans-serif;
27
- font-size: 0.875rem;
25
+ font-weight: var(--table-custom-font-weight, 500);
26
+ font-family: var(--table-font-family, "Roboto", sans-serif);
27
+ font-size: var(--table-font-size, 0.875rem);
28
28
  color: #1c1c1c;
29
29
  padding: 0 1.25rem;
30
30
  width: 13rem;
@@ -33,7 +33,7 @@
33
33
  border-radius: 0.375rem;
34
34
  }
35
35
  .custom-input:focus {
36
- border: 1px solid #175dbf;
36
+ border: 1px solid var(--custom-input-focus, #6366f1);
37
37
  box-shadow: none;
38
38
  }
39
39
  .custom-input::placeholder {
@@ -61,12 +61,12 @@
61
61
  }
62
62
  .PrevPageEnabled:hover,
63
63
  .NextPageEnabled:hover {
64
- background-color: #175dbf;
64
+ background-color: var(--prev-next-enabled-hover, #6366f1);
65
65
  }
66
66
  .pageReport {
67
- font-weight: 500;
68
- font-family: "Roboto", sans-serif;
69
- font-size: 0.875rem;
67
+ font-weight: var(--table-custom-font-weight, 500);
68
+ font-family: var(--table-font-family, "Roboto", sans-serif);
69
+ font-size: var(--table-font-size, 0.875rem);
70
70
  color: #191919;
71
71
  padding: 0 0.5rem;
72
72
  }
@@ -77,14 +77,14 @@
77
77
  }
78
78
  .custom-select-filtro {
79
79
  height: 2rem;
80
- font-weight: 500;
81
- font-family: "Roboto", sans-serif;
82
- font-size: 0.875rem;
80
+ font-weight: var(--table-custom-font-weight, 500);
81
+ font-family: var(--table-font-family, "Roboto", sans-serif);
82
+ font-size: var(--table-font-size, 0.875rem);
83
83
  }
84
84
  .mensagem-nenhum-dado {
85
85
  text-align: center;
86
- font-weight: 500;
87
- font-family: "Roboto", sans-serif;
86
+ font-weight: var(--table-custom-font-weight, 500);
87
+ font-family: var(--table-font-family, "Roboto", sans-serif);
88
88
  padding: 2rem 0;
89
89
  color: #191919;
90
90
  }
@@ -109,8 +109,8 @@ th {
109
109
  border-bottom: 1px solid #edf0f2;
110
110
  border-left: 1px solid #edf0f2;
111
111
  padding: 0 0 0 7px;
112
- font-size: 14px;
113
- font-family: "Roboto", sans-serif;
112
+ font-size: var(--table-th-font-size, 14px);
113
+ font-family: var(--table-font-family, "Roboto", sans-serif);
114
114
  font-weight: bold;
115
115
  color: #373737;
116
116
  }
@@ -148,27 +148,27 @@ th {
148
148
  .p-datatable .p-datatable-tbody > tr {
149
149
  background: #fff;
150
150
  color: #000;
151
- font-family: "roboto", sans-serif;
152
- font-weight: 500;
151
+ font-family: var(--table-font-family, "Roboto", sans-serif);
152
+ font-weight: var(--table-custom-font-weight, 500);
153
153
  }
154
154
  .p-checkbox .p-checkbox-box {
155
155
  width: 1rem;
156
156
  height: 1rem;
157
- border: 1px solid #094394 !important;
157
+ border: 1px solid var(--p-checkbox-box-border, #6366f1) !important;
158
158
  border-radius: 4px !important;
159
159
  background-color: #fff;
160
160
  }
161
161
  .p-checkbox.p-highlight .p-checkbox-box {
162
- border-color: #094394;
163
- background: #094394;
162
+ border-color: var(--p-checkbox-highlight-border, #6366f1);
163
+ background: var(--p-checkbox-highlight-bg, #6366f1);
164
164
  }
165
165
  .p-checkbox {
166
166
  width: 1rem;
167
167
  height: 1rem;
168
168
  }
169
169
  .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover).p-highlight .p-checkbox-box {
170
- border-color: #094394;
171
- background: #094394;
170
+ border-color: var(--p-checkbox-boder-hover, #4f46e5);
171
+ background: var(--p-checkbox-bg, #6366f1);
172
172
  color: #ffffff;
173
173
  }
174
174
  .p-datatable .p-datatable-tbody > tr > td.p-selection-column {
@@ -197,7 +197,7 @@ th {
197
197
  left: -2px;
198
198
  }
199
199
  .p-datatable .p-datatable-tbody > tr.p-highlight {
200
- background: #fafbfc;
200
+ background: #f3f3f3;
201
201
  }
202
202
  .p-dropdown {
203
203
  background-color: #fff;
@@ -210,15 +210,15 @@ th {
210
210
  }
211
211
  .p-dropdown-label,
212
212
  .p-dropdown-item-label {
213
- font-size: 14px;
214
- font-family: "roboto", sans-serif;
213
+ font-size: var(--table-th-font-size, 14px);
214
+ font-family: var(--table-font-family, "Roboto", sans-serif);
215
215
  font-weight: bold;
216
216
  padding: 0 1rem 0 1rem;
217
217
  }
218
218
  .p-dropdown-item-label {
219
219
  padding: 6px 1rem;
220
- font-weight: 500;
221
- font-family: "Roboto", sans-serif;
220
+ font-weight: var(--table-custom-font-weight, 500);
221
+ font-family: var(--table-font-family, "Roboto", sans-serif);
222
222
  }
223
223
  .p-dropdown-panel .p-dropdown-items .p-dropdown-item {
224
224
  margin: 0;
@@ -226,7 +226,7 @@ th {
226
226
  border-radius: 0;
227
227
  }
228
228
  .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight.p-focus {
229
- background: #094394;
229
+ background: var(--p-dropdown-bg, #6366f1);
230
230
  color: #fff;
231
231
  padding: 0;
232
232
  }
@@ -247,8 +247,8 @@ th {
247
247
  border-bottom: 1px solid #e1e1e6;
248
248
  }
249
249
  .p-column-filter {
250
- font-family: "Roboto", sans-serif;
251
- font-weight: 500;
250
+ font-family: var(--table-font-family, "Roboto", sans-serif);
251
+ font-weight: var(--table-custom-font-weight, 500);
252
252
  margin-top: 0.25rem;
253
253
  transition: all 0.3s ease-in-out;
254
254
  border: 1px solid #e1e1e6;
@@ -267,7 +267,7 @@ th {
267
267
  }
268
268
  .p-column-filter:hover,
269
269
  .p-column-filter:focus {
270
- border-color: #094394;
270
+ border-color: var(--p-column-filter-hover-focus, #6366f1);
271
271
  }
272
272
  .p-column-filter-menu {
273
273
  background-color: transparent;
@@ -288,7 +288,7 @@ th {
288
288
  top: -2px;
289
289
  }
290
290
  .p-column-filter-menu-button.p-column-filter-menu-button-active {
291
- background-color: #094394;
291
+ background-color: var(--p-column-filter-button-active, #6366f1);
292
292
  color: #ffffff;
293
293
  padding: 6px;
294
294
  margin-left: 4px;
@@ -299,7 +299,7 @@ th {
299
299
  }
300
300
  [aria-sort=ascending] .p-sortable-column-icon,
301
301
  [aria-sort=descending] .p-sortable-column-icon {
302
- background-color: #094394;
302
+ background-color: var(--p-sortable-column-icon-bg, #6366f1);
303
303
  color: #ffffff !important;
304
304
  padding: 6px;
305
305
  margin-left: 4px;
@@ -314,12 +314,13 @@ th {
314
314
  .p-column-title {
315
315
  flex: 1;
316
316
  text-align: left;
317
+ font-weight: var(--table-th-font-weight, 800);
317
318
  }
318
319
  .p-column-filter-add-button {
319
- font-family: "Roboto", sans-serif;
320
- font-weight: 500;
320
+ font-family: var(--table-font-family, "Roboto", sans-serif);
321
+ font-weight: var(--table-custom-font-weight, 500);
321
322
  font-size: 12px;
322
- color: #094394;
323
+ color: var(--p-column-filter-add-button-color, #6366f1);
323
324
  box-shadow: none;
324
325
  display: flex;
325
326
  gap: 8px;
@@ -337,24 +338,24 @@ th {
337
338
  padding: 1.25rem 0;
338
339
  }
339
340
  .p-column-filter-buttonbar .p-c {
340
- font-family: "Roboto", sans-serif;
341
- font-weight: 500;
341
+ font-family: var(--table-font-family, "Roboto", sans-serif);
342
+ font-weight: var(--table-custom-font-weight, 500);
342
343
  font-size: 13px;
343
344
  color: #fff;
344
- background-color: #1b3540;
345
+ background-color: var(--p-column-filter-buttonbar-bg, #6366f1);
345
346
  padding: 4px 10px;
346
347
  border-radius: 4px;
347
348
  }
348
349
  .p-column-filter-buttonbar .p-c:hover {
349
- background-color: #094394;
350
+ background-color: var(--p-column-filter-buttonbar-bg-hover, #4f46e5);
350
351
  }
351
352
  .p-component .p-button-outlined,
352
353
  .p-button-sm {
353
354
  box-shadow: none;
354
355
  }
355
356
  .p-column-filter-remove-button {
356
- font-family: "Roboto", sans-serif;
357
- font-weight: 500;
357
+ font-family: var(--table-font-family, "Roboto", sans-serif);
358
+ font-weight: var(--table-custom-font-weight, 500);
358
359
  font-size: 12px;
359
360
  color: #f35353;
360
361
  box-shadow: none;
@@ -398,7 +399,7 @@ th {
398
399
  }
399
400
  .enable-button-table-actions:hover {
400
401
  color: #fff;
401
- background-color: #175dbf;
402
+ background-color: var(--enable-button-table-actions-hover, #6366f1);
402
403
  }
403
404
  .disable-button-table-actions {
404
405
  color: #1c1c1c;
@@ -457,10 +458,10 @@ th {
457
458
  }
458
459
  .btn-icone-actions-column:hover {
459
460
  color: #ffffff;
460
- background-color: #175dbf;
461
+ background-color: var(--btn-icone-actions-column-hover, #6366f1);
461
462
  }
462
463
  .tooltip-custom {
463
- font-weight: 500;
464
+ font-weight: var(--table-custom-font-weight, 500);
464
465
  font-size: 13px;
465
466
  }
466
467
  @media (max-width: 767px) {
@@ -504,14 +505,14 @@ th {
504
505
  }
505
506
  .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,
506
507
  .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month {
507
- color: #4b5563 !important;
508
+ color: var(--p-datepicker, #4f46e5) !important;
508
509
  }
509
510
  .p-datepicker .p-datepicker-header .p-datepicker-prev,
510
511
  .p-datepicker .p-datepicker-header .p-datepicker-next {
511
- color: #6b7280 !important;
512
+ color: var(--p-datepicker-prev-next, #4f46e5) !important;
512
513
  }
513
514
  .p-datepicker .p-timepicker button {
514
- color: #6b7280 !important;
515
+ color: var(--p-datepicker-button, #4f46e5) !important;
515
516
  }
516
517
  .p-datepicker-calendar th {
517
518
  padding: 0;
package/dist/index.d.mts CHANGED
@@ -335,7 +335,21 @@ interface LeafcodeTheme {
335
335
  radius: string;
336
336
  };
337
337
  };
338
+ table: {
339
+ colors: {
340
+ text: string;
341
+ primaryBg: string;
342
+ primaryHoverBg: string;
343
+ };
338
344
 
345
+ fonts: {
346
+ family: string;
347
+ weight: number | string;
348
+ customWeight: number | string;
349
+ thWeight: number | string;
350
+ size: string | number;
351
+ };
352
+ };
339
353
  modalBase: {
340
354
  colors: {
341
355
  modalTitleColor: string;
package/dist/index.d.ts CHANGED
@@ -335,7 +335,21 @@ interface LeafcodeTheme {
335
335
  radius: string;
336
336
  };
337
337
  };
338
+ table: {
339
+ colors: {
340
+ text: string;
341
+ primaryBg: string;
342
+ primaryHoverBg: string;
343
+ };
338
344
 
345
+ fonts: {
346
+ family: string;
347
+ weight: number | string;
348
+ customWeight: number | string;
349
+ thWeight: number | string;
350
+ size: string | number;
351
+ };
352
+ };
339
353
  modalBase: {
340
354
  colors: {
341
355
  modalTitleColor: string;
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ var import_react = require("react");
69
69
  // src/provider/defaultTheme.ts
70
70
  var defaultTheme = {
71
71
  colors: {
72
- primary: "#6366f1",
72
+ primary: "#3c3fe8",
73
73
  primaryHover: "#4f46e5",
74
74
  secundary: "",
75
75
  secundaryHover: "",
@@ -124,7 +124,7 @@ var defaultTheme = {
124
124
  button: {
125
125
  colors: {
126
126
  text: "#FFFFFF",
127
- primaryBg: "#6366f1",
127
+ primaryBg: "#3c3fe8",
128
128
  primaryHoverBg: "#4f46e5",
129
129
  secondaryBg: "#bf1717",
130
130
  secondaryHoverBg: "#f35353",
@@ -142,6 +142,20 @@ var defaultTheme = {
142
142
  radius: "6px"
143
143
  }
144
144
  },
145
+ table: {
146
+ colors: {
147
+ text: "#FFFFFF",
148
+ primaryBg: "#3c3fe8",
149
+ primaryHoverBg: "#4f46e5"
150
+ },
151
+ fonts: {
152
+ family: '"Roboto", sans-serif',
153
+ customWeight: 500,
154
+ thWeight: 600,
155
+ weight: 800,
156
+ size: "13px"
157
+ }
158
+ },
145
159
  modalBase: {
146
160
  colors: {
147
161
  modalTitleColor: "#000",
@@ -377,7 +391,7 @@ var InputBase = ({
377
391
  };
378
392
  const handleChange = (e) => {
379
393
  let val = e.target.value;
380
- if (validationMode === "restricted") {
394
+ if (validationMode === "restricted" && !showPasswordToggle) {
381
395
  val = val.replace(/[^a-zA-Z0-9_.-]/g, "");
382
396
  val = val.replace(/^\.+/, "");
383
397
  val = val.replace(/\.+$/, "");
@@ -386,7 +400,8 @@ var InputBase = ({
386
400
  e.target.value = val;
387
401
  onChange?.(e);
388
402
  };
389
- const [show, setShow] = (0, import_react4.useState)(true);
403
+ const [show, setShow] = (0, import_react4.useState)(false);
404
+ const isPassword = showPasswordToggle;
390
405
  const handleClick = () => setShow(!show);
391
406
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
392
407
  "div",
@@ -409,7 +424,8 @@ var InputBase = ({
409
424
  id: name,
410
425
  name,
411
426
  disabled,
412
- type: show ? "text" : "password",
427
+ type: isPassword ? show ? "text" : "password" : rest.type ?? "text",
428
+ autoComplete: isPassword ? rest.autoComplete ?? "current-password" : rest.autoComplete,
413
429
  className: `input ${error && "input-error"} ${isUppercaseText && "is-uppercase"}`,
414
430
  placeholder,
415
431
  onFocus,
@@ -1311,9 +1327,13 @@ function DataTableAdvancedFilterWrapper({
1311
1327
  };
1312
1328
  const [page, setPage] = (0, import_react17.useState)(initialState.page);
1313
1329
  const [rows, setRows] = (0, import_react17.useState)(initialState.rows);
1314
- const [first, setFirst] = (0, import_react17.useState)((initialState.page - 1) * initialState.rows);
1330
+ const [first, setFirst] = (0, import_react17.useState)(
1331
+ (initialState.page - 1) * initialState.rows
1332
+ );
1315
1333
  const [sortField, setSortField] = (0, import_react17.useState)(initialState.sortField);
1316
- const [sortOrder, setSortOrder] = (0, import_react17.useState)(initialState.sortOrder ?? 1);
1334
+ const [sortOrder, setSortOrder] = (0, import_react17.useState)(
1335
+ initialState.sortOrder ?? 1
1336
+ );
1317
1337
  const [searchText, setSearchText] = (0, import_react17.useState)(initialState.filter ?? "");
1318
1338
  const [filters, setFilters] = (0, import_react17.useState)({
1319
1339
  ...initFilters,
@@ -1453,7 +1473,35 @@ function DataTableAdvancedFilterWrapper({
1453
1473
  customActions
1454
1474
  ]
1455
1475
  );
1456
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: isClient && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
1476
+ const theme = useLeafcodeTheme();
1477
+ const styleVars = {
1478
+ "--table-font-family": theme.components.table.fonts.family,
1479
+ "--table-font-weight": theme.components.table.fonts.weight,
1480
+ "--table-custom-font-weight": theme.components.table.fonts.customWeight,
1481
+ "--table-font-size": theme.components.table.fonts.size,
1482
+ "--table-th-font-weight": theme.components.table.fonts.thWeight,
1483
+ "--table-th-font-size": theme.components.table.fonts.size,
1484
+ "--custom-input-focus": theme.colors.primary,
1485
+ "--prev-next-enabled-hover": theme.colors.primaryHover,
1486
+ "--p-checkbox-box-border": theme.colors.primary,
1487
+ "--p-checkbox-highlight-border": theme.colors.primary,
1488
+ "--p-checkbox-highlight-bg": theme.colors.primary,
1489
+ "--p-checkbox-boder-hover": theme.colors.primaryHover,
1490
+ "--p-checkbox-bg": theme.colors.primary,
1491
+ "--p-dropdown-bg": theme.colors.primary,
1492
+ "--p-column-filter-hover-focus": theme.colors.primary,
1493
+ "--p-column-filter-button-active": theme.colors.primary,
1494
+ "--p-sortable-column-icon-bg": theme.colors.primary,
1495
+ "--p-column-filter-add-button-color": theme.colors.primary,
1496
+ "--p-column-filter-buttonbar-bg": theme.colors.primary,
1497
+ "--p-column-filter-buttonbar-bg-hover": theme.colors.primaryHover,
1498
+ "--enable-button-table-actions-hover": theme.colors.primaryHover,
1499
+ "--btn-icone-actions-column-hover": theme.colors.primaryHover,
1500
+ "--p-datepicker": theme.colors.primary,
1501
+ "--p-datepicker-prev-next": theme.colors.primary,
1502
+ "--p-datepicker-button": theme.colors.primary
1503
+ };
1504
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: isClient && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: styleVars, children: [
1457
1505
  disablePagination && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "disablePagination", children: TableHeaderAndTableActions }),
1458
1506
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1459
1507
  import_datatable.DataTable,
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { createContext, useContext } from "react";
5
5
  // src/provider/defaultTheme.ts
6
6
  var defaultTheme = {
7
7
  colors: {
8
- primary: "#6366f1",
8
+ primary: "#3c3fe8",
9
9
  primaryHover: "#4f46e5",
10
10
  secundary: "",
11
11
  secundaryHover: "",
@@ -60,7 +60,7 @@ var defaultTheme = {
60
60
  button: {
61
61
  colors: {
62
62
  text: "#FFFFFF",
63
- primaryBg: "#6366f1",
63
+ primaryBg: "#3c3fe8",
64
64
  primaryHoverBg: "#4f46e5",
65
65
  secondaryBg: "#bf1717",
66
66
  secondaryHoverBg: "#f35353",
@@ -78,6 +78,20 @@ var defaultTheme = {
78
78
  radius: "6px"
79
79
  }
80
80
  },
81
+ table: {
82
+ colors: {
83
+ text: "#FFFFFF",
84
+ primaryBg: "#3c3fe8",
85
+ primaryHoverBg: "#4f46e5"
86
+ },
87
+ fonts: {
88
+ family: '"Roboto", sans-serif',
89
+ customWeight: 500,
90
+ thWeight: 600,
91
+ weight: 800,
92
+ size: "13px"
93
+ }
94
+ },
81
95
  modalBase: {
82
96
  colors: {
83
97
  modalTitleColor: "#000",
@@ -316,7 +330,7 @@ var InputBase = ({
316
330
  };
317
331
  const handleChange = (e) => {
318
332
  let val = e.target.value;
319
- if (validationMode === "restricted") {
333
+ if (validationMode === "restricted" && !showPasswordToggle) {
320
334
  val = val.replace(/[^a-zA-Z0-9_.-]/g, "");
321
335
  val = val.replace(/^\.+/, "");
322
336
  val = val.replace(/\.+$/, "");
@@ -325,7 +339,8 @@ var InputBase = ({
325
339
  e.target.value = val;
326
340
  onChange?.(e);
327
341
  };
328
- const [show, setShow] = useState2(true);
342
+ const [show, setShow] = useState2(false);
343
+ const isPassword = showPasswordToggle;
329
344
  const handleClick = () => setShow(!show);
330
345
  return /* @__PURE__ */ jsxs3(
331
346
  "div",
@@ -348,7 +363,8 @@ var InputBase = ({
348
363
  id: name,
349
364
  name,
350
365
  disabled,
351
- type: show ? "text" : "password",
366
+ type: isPassword ? show ? "text" : "password" : rest.type ?? "text",
367
+ autoComplete: isPassword ? rest.autoComplete ?? "current-password" : rest.autoComplete,
352
368
  className: `input ${error && "input-error"} ${isUppercaseText && "is-uppercase"}`,
353
369
  placeholder,
354
370
  onFocus,
@@ -1259,9 +1275,13 @@ function DataTableAdvancedFilterWrapper({
1259
1275
  };
1260
1276
  const [page, setPage] = useState6(initialState.page);
1261
1277
  const [rows, setRows] = useState6(initialState.rows);
1262
- const [first, setFirst] = useState6((initialState.page - 1) * initialState.rows);
1278
+ const [first, setFirst] = useState6(
1279
+ (initialState.page - 1) * initialState.rows
1280
+ );
1263
1281
  const [sortField, setSortField] = useState6(initialState.sortField);
1264
- const [sortOrder, setSortOrder] = useState6(initialState.sortOrder ?? 1);
1282
+ const [sortOrder, setSortOrder] = useState6(
1283
+ initialState.sortOrder ?? 1
1284
+ );
1265
1285
  const [searchText, setSearchText] = useState6(initialState.filter ?? "");
1266
1286
  const [filters, setFilters] = useState6({
1267
1287
  ...initFilters,
@@ -1401,7 +1421,35 @@ function DataTableAdvancedFilterWrapper({
1401
1421
  customActions
1402
1422
  ]
1403
1423
  );
1404
- return /* @__PURE__ */ jsx16(Fragment6, { children: isClient && /* @__PURE__ */ jsxs11("div", { children: [
1424
+ const theme = useLeafcodeTheme();
1425
+ const styleVars = {
1426
+ "--table-font-family": theme.components.table.fonts.family,
1427
+ "--table-font-weight": theme.components.table.fonts.weight,
1428
+ "--table-custom-font-weight": theme.components.table.fonts.customWeight,
1429
+ "--table-font-size": theme.components.table.fonts.size,
1430
+ "--table-th-font-weight": theme.components.table.fonts.thWeight,
1431
+ "--table-th-font-size": theme.components.table.fonts.size,
1432
+ "--custom-input-focus": theme.colors.primary,
1433
+ "--prev-next-enabled-hover": theme.colors.primaryHover,
1434
+ "--p-checkbox-box-border": theme.colors.primary,
1435
+ "--p-checkbox-highlight-border": theme.colors.primary,
1436
+ "--p-checkbox-highlight-bg": theme.colors.primary,
1437
+ "--p-checkbox-boder-hover": theme.colors.primaryHover,
1438
+ "--p-checkbox-bg": theme.colors.primary,
1439
+ "--p-dropdown-bg": theme.colors.primary,
1440
+ "--p-column-filter-hover-focus": theme.colors.primary,
1441
+ "--p-column-filter-button-active": theme.colors.primary,
1442
+ "--p-sortable-column-icon-bg": theme.colors.primary,
1443
+ "--p-column-filter-add-button-color": theme.colors.primary,
1444
+ "--p-column-filter-buttonbar-bg": theme.colors.primary,
1445
+ "--p-column-filter-buttonbar-bg-hover": theme.colors.primaryHover,
1446
+ "--enable-button-table-actions-hover": theme.colors.primaryHover,
1447
+ "--btn-icone-actions-column-hover": theme.colors.primaryHover,
1448
+ "--p-datepicker": theme.colors.primary,
1449
+ "--p-datepicker-prev-next": theme.colors.primary,
1450
+ "--p-datepicker-button": theme.colors.primary
1451
+ };
1452
+ return /* @__PURE__ */ jsx16(Fragment6, { children: isClient && /* @__PURE__ */ jsxs11("div", { style: styleVars, children: [
1405
1453
  disablePagination && /* @__PURE__ */ jsx16("div", { className: "disablePagination", children: TableHeaderAndTableActions }),
1406
1454
  /* @__PURE__ */ jsxs11(
1407
1455
  DataTable,
@@ -114,7 +114,8 @@ input:-webkit-autofill:focus {
114
114
 
115
115
  .password-toggle {
116
116
  position: absolute;
117
- bottom: 0.75rem;
117
+ top: 50%;
118
+ transform: translateY(-50%);
118
119
  color: var(--color-password-toggle, #a5a5a5);
119
120
  cursor: pointer;
120
121
  width: 1.25rem;
@@ -250,7 +251,8 @@ input:-webkit-autofill:focus {
250
251
  .dropdown-clear {
251
252
  position: absolute;
252
253
  right: 0.75rem;
253
- top: 0.8rem;
254
+ top: 50%;
255
+ transform: translateY(-50%);
254
256
  background: none;
255
257
  border: none;
256
258
  padding: 0;
@@ -277,3 +279,10 @@ input:-webkit-autofill:focus {
277
279
  .react-select__single-value {
278
280
  color: var(--input-text-single-color, #070707) !important;
279
281
  }
282
+
283
+ /* ESTADO DESABILITADO */
284
+ .react-select__control--is-disabled {
285
+ border-color: var(--input-disabled-border, #d1d5db) !important;
286
+ background-color: var(--input-disabled-bg, #f3f4f6) !important;
287
+ cursor: not-allowed;
288
+ }
@@ -12,22 +12,22 @@
12
12
  }
13
13
 
14
14
  .tableClassName {
15
- font-weight: 500;
16
- font-family: "Roboto", sans-serif;
17
- font-size: 0.875rem;
15
+ font-weight: var(--table-font-weight, 600);
16
+ font-family: var(--table-font-family, "Roboto", sans-serif);
17
+ font-size: var(--table-font-size, 0.875rem);
18
18
  }
19
19
 
20
20
  .paginatorClassName {
21
21
  padding: 0 0 0.75rem 0;
22
- font-weight: 500;
23
- font-family: "Roboto", sans-serif;
24
- font-size: 0.875rem;
22
+ font-weight: var(--table-font-weight, 600);
23
+ font-family: var(--table-font-family, "Roboto", sans-serif);
24
+ font-size: var(--table-font-size, 0.875rem);
25
25
  }
26
26
 
27
27
  .custom-input {
28
- font-weight: 500;
29
- font-family: "Roboto", sans-serif;
30
- font-size: 0.875rem;
28
+ font-weight: var(--table-custom-font-weight, 500);
29
+ font-family: var(--table-font-family, "Roboto", sans-serif);
30
+ font-size: var(--table-font-size, 0.875rem);
31
31
  color: #1c1c1c;
32
32
  padding: 0 1.25rem;
33
33
  width: 13rem;
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .custom-input:focus {
40
- border: 1px solid #175dbf;
40
+ border: 1px solid var(--custom-input-focus, #6366f1);
41
41
  box-shadow: none;
42
42
  }
43
43
 
@@ -70,13 +70,13 @@
70
70
 
71
71
  .PrevPageEnabled:hover,
72
72
  .NextPageEnabled:hover {
73
- background-color: #175dbf;
73
+ background-color: var(--prev-next-enabled-hover, #6366f1);
74
74
  }
75
75
 
76
76
  .pageReport {
77
- font-weight: 500;
78
- font-family: "Roboto", sans-serif;
79
- font-size: 0.875rem;
77
+ font-weight: var(--table-custom-font-weight, 500);
78
+ font-family: var(--table-font-family, "Roboto", sans-serif);
79
+ font-size: var(--table-font-size, 0.875rem);
80
80
  color: #191919;
81
81
  padding: 0 0.5rem;
82
82
  }
@@ -89,15 +89,15 @@
89
89
 
90
90
  .custom-select-filtro {
91
91
  height: 2rem;
92
- font-weight: 500;
93
- font-family: "Roboto", sans-serif;
94
- font-size: 0.875rem;
92
+ font-weight: var(--table-custom-font-weight, 500);
93
+ font-family: var(--table-font-family, "Roboto", sans-serif);
94
+ font-size: var(--table-font-size, 0.875rem);
95
95
  }
96
96
 
97
97
  .mensagem-nenhum-dado {
98
98
  text-align: center;
99
- font-weight: 500;
100
- font-family: "Roboto", sans-serif;
99
+ font-weight: var(--table-custom-font-weight, 500);
100
+ font-family: var(--table-font-family, "Roboto", sans-serif);
101
101
  padding: 2rem 0;
102
102
  color: #191919;
103
103
  }
@@ -126,8 +126,8 @@ th {
126
126
  border-bottom: 1px solid #edf0f2;
127
127
  border-left: 1px solid #edf0f2;
128
128
  padding: 0 0 0 7px;
129
- font-size: 14px;
130
- font-family: "Roboto", sans-serif;
129
+ font-size: var(--table-th-font-size, 14px);
130
+ font-family: var(--table-font-family, "Roboto", sans-serif);
131
131
  font-weight: bold;
132
132
  color: #373737;
133
133
  }
@@ -174,21 +174,21 @@ th {
174
174
  .p-datatable .p-datatable-tbody > tr {
175
175
  background: #fff;
176
176
  color: #000;
177
- font-family: "roboto", sans-serif;
178
- font-weight: 500;
177
+ font-family: var(--table-font-family, "Roboto", sans-serif);
178
+ font-weight: var(--table-custom-font-weight, 500);
179
179
  }
180
180
 
181
181
  .p-checkbox .p-checkbox-box {
182
182
  width: 1rem;
183
183
  height: 1rem;
184
- border: 1px solid #094394 !important;
184
+ border: 1px solid var(--p-checkbox-box-border, #6366f1) !important;
185
185
  border-radius: 4px !important;
186
186
  background-color: #fff;
187
187
  }
188
188
 
189
189
  .p-checkbox.p-highlight .p-checkbox-box {
190
- border-color: #094394;
191
- background: #094394;
190
+ border-color: var(--p-checkbox-highlight-border, #6366f1);
191
+ background: var(--p-checkbox-highlight-bg, #6366f1);
192
192
  }
193
193
 
194
194
  .p-checkbox {
@@ -198,8 +198,8 @@ th {
198
198
 
199
199
  .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover).p-highlight
200
200
  .p-checkbox-box {
201
- border-color: #094394;
202
- background: #094394;
201
+ border-color: var(--p-checkbox-boder-hover, #4f46e5);
202
+ background: var(--p-checkbox-bg, #6366f1);
203
203
  color: #ffffff;
204
204
  }
205
205
 
@@ -245,7 +245,7 @@ th {
245
245
  }
246
246
 
247
247
  .p-datatable .p-datatable-tbody > tr.p-highlight {
248
- background: #fafbfc;
248
+ background: #f3f3f3;
249
249
  }
250
250
 
251
251
  .p-dropdown {
@@ -260,16 +260,16 @@ th {
260
260
 
261
261
  .p-dropdown-label,
262
262
  .p-dropdown-item-label {
263
- font-size: 14px;
264
- font-family: "roboto", sans-serif;
263
+ font-size: var(--table-th-font-size, 14px);
264
+ font-family: var(--table-font-family, "Roboto", sans-serif);
265
265
  font-weight: bold;
266
266
  padding: 0 1rem 0 1rem;
267
267
  }
268
268
 
269
269
  .p-dropdown-item-label {
270
270
  padding: 6px 1rem;
271
- font-weight: 500;
272
- font-family: "Roboto", sans-serif;
271
+ font-weight: var(--table-custom-font-weight, 500);
272
+ font-family: var(--table-font-family, "Roboto", sans-serif);
273
273
  }
274
274
 
275
275
  .p-dropdown-panel .p-dropdown-items .p-dropdown-item {
@@ -279,7 +279,7 @@ th {
279
279
  }
280
280
 
281
281
  .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight.p-focus {
282
- background: #094394;
282
+ background: var(--p-dropdown-bg, #6366f1);
283
283
  color: #fff;
284
284
  padding: 0;
285
285
  }
@@ -304,8 +304,8 @@ th {
304
304
  }
305
305
 
306
306
  .p-column-filter {
307
- font-family: "Roboto", sans-serif;
308
- font-weight: 500;
307
+ font-family: var(--table-font-family, "Roboto", sans-serif);
308
+ font-weight: var(--table-custom-font-weight, 500);
309
309
  margin-top: 0.25rem;
310
310
  transition: all 0.3s ease-in-out;
311
311
  border: 1px solid #e1e1e6;
@@ -326,7 +326,7 @@ th {
326
326
 
327
327
  .p-column-filter:hover,
328
328
  .p-column-filter:focus {
329
- border-color: #094394;
329
+ border-color: var(--p-column-filter-hover-focus, #6366f1);
330
330
  }
331
331
 
332
332
  .p-column-filter-menu {
@@ -352,7 +352,7 @@ th {
352
352
 
353
353
  /* Botão ativo */
354
354
  .p-column-filter-menu-button.p-column-filter-menu-button-active {
355
- background-color: #094394;
355
+ background-color: var(--p-column-filter-button-active, #6366f1);
356
356
  color: #ffffff;
357
357
  padding: 6px;
358
358
  margin-left: 4px;
@@ -364,7 +364,7 @@ th {
364
364
 
365
365
  [aria-sort="ascending"] .p-sortable-column-icon,
366
366
  [aria-sort="descending"] .p-sortable-column-icon {
367
- background-color: #094394;
367
+ background-color: var(--p-sortable-column-icon-bg, #6366f1);
368
368
  color: #ffffff !important;
369
369
  padding: 6px;
370
370
  margin-left: 4px;
@@ -381,13 +381,14 @@ th {
381
381
  .p-column-title {
382
382
  flex: 1;
383
383
  text-align: left;
384
+ font-weight: var(--table-th-font-weight, 800);
384
385
  }
385
386
 
386
387
  .p-column-filter-add-button {
387
- font-family: "Roboto", sans-serif;
388
- font-weight: 500;
388
+ font-family: var(--table-font-family, "Roboto", sans-serif);
389
+ font-weight: var(--table-custom-font-weight, 500);
389
390
  font-size: 12px;
390
- color: #094394;
391
+ color: var(--p-column-filter-add-button-color, #6366f1);
391
392
  box-shadow: none;
392
393
  display: flex;
393
394
  gap: 8px;
@@ -409,17 +410,17 @@ th {
409
410
  }
410
411
 
411
412
  .p-column-filter-buttonbar .p-c {
412
- font-family: "Roboto", sans-serif;
413
- font-weight: 500;
413
+ font-family: var(--table-font-family, "Roboto", sans-serif);
414
+ font-weight: var(--table-custom-font-weight, 500);
414
415
  font-size: 13px;
415
416
  color: #fff;
416
- background-color: #1b3540;
417
+ background-color: var(--p-column-filter-buttonbar-bg, #6366f1);
417
418
  padding: 4px 10px;
418
419
  border-radius: 4px;
419
420
  }
420
421
 
421
422
  .p-column-filter-buttonbar .p-c:hover {
422
- background-color: #094394;
423
+ background-color: var(--p-column-filter-buttonbar-bg-hover, #4f46e5);
423
424
  }
424
425
 
425
426
  .p-component .p-button-outlined,
@@ -428,8 +429,8 @@ th {
428
429
  }
429
430
 
430
431
  .p-column-filter-remove-button {
431
- font-family: "Roboto", sans-serif;
432
- font-weight: 500;
432
+ font-family: var(--table-font-family, "Roboto", sans-serif);
433
+ font-weight: var(--table-custom-font-weight, 500);
433
434
  font-size: 12px;
434
435
  color: #f35353;
435
436
  box-shadow: none;
@@ -480,7 +481,7 @@ th {
480
481
 
481
482
  .enable-button-table-actions:hover {
482
483
  color: #fff;
483
- background-color: #175dbf;
484
+ background-color: var(--enable-button-table-actions-hover, #6366f1);
484
485
  }
485
486
 
486
487
  .disable-button-table-actions {
@@ -553,11 +554,11 @@ th {
553
554
 
554
555
  .btn-icone-actions-column:hover {
555
556
  color: #ffffff;
556
- background-color: #175dbf;
557
+ background-color: var(--btn-icone-actions-column-hover, #6366f1);
557
558
  }
558
559
 
559
560
  .tooltip-custom {
560
- font-weight: 500;
561
+ font-weight: var(--table-custom-font-weight, 500);
561
562
  font-size: 13px;
562
563
  }
563
564
 
@@ -610,16 +611,16 @@ th {
610
611
 
611
612
  .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,
612
613
  .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month {
613
- color: #4b5563 !important;
614
+ color: var(--p-datepicker, #4f46e5) !important;
614
615
  }
615
616
 
616
617
  .p-datepicker .p-datepicker-header .p-datepicker-prev,
617
618
  .p-datepicker .p-datepicker-header .p-datepicker-next {
618
- color: #6b7280 !important;
619
+ color: var(--p-datepicker-prev-next, #4f46e5) !important;
619
620
  }
620
621
 
621
622
  .p-datepicker .p-timepicker button {
622
- color: #6b7280 !important;
623
+ color: var(--p-datepicker-button, #4f46e5) !important;
623
624
  }
624
625
 
625
626
  .p-datepicker-calendar th {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",