@charlesgomes/leafcode-shared-lib-react 1.0.63 → 1.0.65

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.d.mts CHANGED
@@ -102,7 +102,7 @@ interface PaginatedResponse$1 {
102
102
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
103
103
  name: string;
104
104
  label?: string;
105
- value?: string;
105
+ value?: string | number | readonly string[] | undefined;
106
106
  onChange?: (value: any) => void;
107
107
  onSelect: (item: any) => void;
108
108
  error?: FieldError;
@@ -201,8 +201,10 @@ declare const customMatchModes: {
201
201
  notEndsWith: string;
202
202
  empty: string;
203
203
  notEmpty: string;
204
+ dateBeforeAndEquals: string;
205
+ dateAfterAndEquals: string;
204
206
  };
205
- declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) => {
207
+ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
206
208
  label: string;
207
209
  value: string;
208
210
  }[];
@@ -210,17 +212,17 @@ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean
210
212
  label: string;
211
213
  value: FilterMatchMode;
212
214
  }[];
213
- declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
215
+ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
214
216
  label: string;
215
- value: FilterMatchMode;
217
+ value: string;
216
218
  }[];
217
- declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
219
+ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
218
220
  label: string;
219
221
  value: string;
220
222
  }[];
221
- declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
223
+ declare const getNullable: (isLanguagePtBr: boolean) => {
222
224
  label: string;
223
- value: FilterMatchMode;
225
+ value: string;
224
226
  }[];
225
227
 
226
228
  declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
@@ -329,4 +331,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
329
331
 
330
332
  declare const defaultTheme: LeafcodeTheme;
331
333
 
332
- export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsEnumNotNullable, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getUrlParams, mapPrimeToBackendFilters };
334
+ export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ interface PaginatedResponse$1 {
102
102
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
103
103
  name: string;
104
104
  label?: string;
105
- value?: string;
105
+ value?: string | number | readonly string[] | undefined;
106
106
  onChange?: (value: any) => void;
107
107
  onSelect: (item: any) => void;
108
108
  error?: FieldError;
@@ -201,8 +201,10 @@ declare const customMatchModes: {
201
201
  notEndsWith: string;
202
202
  empty: string;
203
203
  notEmpty: string;
204
+ dateBeforeAndEquals: string;
205
+ dateAfterAndEquals: string;
204
206
  };
205
- declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) => {
207
+ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
206
208
  label: string;
207
209
  value: string;
208
210
  }[];
@@ -210,17 +212,17 @@ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean
210
212
  label: string;
211
213
  value: FilterMatchMode;
212
214
  }[];
213
- declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
215
+ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
214
216
  label: string;
215
- value: FilterMatchMode;
217
+ value: string;
216
218
  }[];
217
- declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
219
+ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
218
220
  label: string;
219
221
  value: string;
220
222
  }[];
221
- declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
223
+ declare const getNullable: (isLanguagePtBr: boolean) => {
222
224
  label: string;
223
- value: FilterMatchMode;
225
+ value: string;
224
226
  }[];
225
227
 
226
228
  declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
@@ -329,4 +331,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
329
331
 
330
332
  declare const defaultTheme: LeafcodeTheme;
331
333
 
332
- export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsEnumNotNullable, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getUrlParams, mapPrimeToBackendFilters };
334
+ export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
package/dist/index.js CHANGED
@@ -51,9 +51,9 @@ __export(index_exports, {
51
51
  defaultTheme: () => defaultTheme,
52
52
  getDefaultFilterMatchOptionsDate: () => getDefaultFilterMatchOptionsDate,
53
53
  getDefaultFilterMatchOptionsEnum: () => getDefaultFilterMatchOptionsEnum,
54
- getDefaultFilterMatchOptionsEnumNotNullable: () => getDefaultFilterMatchOptionsEnumNotNullable,
55
54
  getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString,
56
55
  getDefaultFilterMatchOptionsStringArray: () => getDefaultFilterMatchOptionsStringArray,
56
+ getNullable: () => getNullable,
57
57
  getUrlParams: () => getUrlParams,
58
58
  mapPrimeToBackendFilters: () => mapPrimeToBackendFilters
59
59
  });
@@ -325,8 +325,12 @@ var InputBase = ({
325
325
  "--input-font-size": theme.components.input.fonts.inputSize,
326
326
  // Colors
327
327
  "--label-color": theme.components.input.colors.text,
328
+ "--label-line": theme.colors.light,
328
329
  "--input-border": theme.components.input.colors.border,
329
330
  "--input-bg": theme.components.input.colors.background,
331
+ "--autofill-box-shadow": theme.components.input.colors.background,
332
+ "--autofill-text-color": theme.components.input.colors.text,
333
+ "--autofill-border": theme.components.input.colors.focusBorder,
330
334
  "--input-text-color": theme.components.input.colors.text,
331
335
  "--input-placeholder": theme.components.input.colors.placeholder,
332
336
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -421,8 +425,11 @@ var TextAreaBase = ({
421
425
  "--input-font-size": theme.components.input.fonts.inputSize,
422
426
  // Colors
423
427
  "--label-color": theme.components.input.colors.text,
428
+ "--label-line": theme.colors.light,
424
429
  "--input-border": theme.components.input.colors.border,
425
430
  "--input-bg": theme.components.input.colors.background,
431
+ "--autofill-box-shadow": theme.components.input.colors.background,
432
+ "--autofill-text-color": theme.components.input.colors.text,
426
433
  "--input-text-color": theme.components.input.colors.text,
427
434
  "--input-placeholder": theme.components.input.colors.placeholder,
428
435
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -505,6 +512,7 @@ var InputBase2 = ({
505
512
  "--label-color": theme.components.input.colors.text,
506
513
  "--input-border": theme.components.input.colors.border,
507
514
  "--input-bg": theme.components.input.colors.background,
515
+ "--label-line": theme.colors.light,
508
516
  "--input-text-color": theme.colors.light,
509
517
  "--input-placeholder": theme.components.input.colors.placeholder,
510
518
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -686,7 +694,7 @@ var import_react_query = require("@tanstack/react-query");
686
694
  var import_react10 = require("react");
687
695
  var import_jsx_runtime9 = require("react/jsx-runtime");
688
696
  var LoadingSpinner = (0, import_react10.memo)(
689
- ({ size = 24, color = "#00875F" }) => {
697
+ ({ size = 20, color = "#00875F" }) => {
690
698
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
691
699
  "span",
692
700
  {
@@ -727,6 +735,7 @@ var InputBase3 = ({
727
735
  }, ref) => {
728
736
  const theme = useLeafcodeTheme();
729
737
  const styleVars = {
738
+ "--label-line": theme.colors.light,
730
739
  "--label-font-family": theme.components.input.fonts.label,
731
740
  "--label-font-weight": theme.components.input.fonts.labelWeight,
732
741
  "--label-font-size": theme.components.input.fonts.labelSize,
@@ -795,7 +804,7 @@ var InputBase3 = ({
795
804
  },
796
805
  item.id
797
806
  )),
798
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { className: "dropdown-loading", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoadingSpinner, { size: 24 }) }),
807
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { className: "dropdown-loading", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoadingSpinner, { size: 20 }) }),
799
808
  !isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { className: "dropdown-empty", children: "N\xE3o encontrado" })
800
809
  ] }) });
801
810
  };
@@ -844,6 +853,7 @@ var InputBase3 = ({
844
853
  setValue("");
845
854
  setItems([]);
846
855
  setPageNumber(1);
856
+ onChange?.(null);
847
857
  onSelect(null);
848
858
  },
849
859
  className: "dropdown-clear",
@@ -1780,7 +1790,7 @@ var ValueFilterTemplate = (options, mask) => {
1780
1790
  return;
1781
1791
  }
1782
1792
  const valueToFilter = mask ? mask(rawValue) : rawValue;
1783
- options.filterCallback(valueToFilter, options.index);
1793
+ options.filterCallback(String(valueToFilter), options.index);
1784
1794
  };
1785
1795
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1786
1796
  import_inputnumber.InputNumber,
@@ -1931,50 +1941,47 @@ var customMatchModes = {
1931
1941
  notStartsWith: "notStartsWith",
1932
1942
  notEndsWith: "notEndsWith",
1933
1943
  empty: "empty",
1934
- notEmpty: "notEmpty"
1944
+ notEmpty: "notEmpty",
1945
+ dateBeforeAndEquals: "dateBeforeAndEquals",
1946
+ dateAfterAndEquals: "dateAfterAndEquals"
1947
+ };
1948
+ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true, isNullable = true) => {
1949
+ const baseOptions = [
1950
+ {
1951
+ label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1952
+ value: import_api3.FilterMatchMode.CONTAINS
1953
+ },
1954
+ {
1955
+ label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1956
+ value: import_api3.FilterMatchMode.NOT_CONTAINS
1957
+ },
1958
+ {
1959
+ label: isLanguagePtBr ? "Igual" : "Equals",
1960
+ value: import_api3.FilterMatchMode.EQUALS
1961
+ },
1962
+ {
1963
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
1964
+ value: import_api3.FilterMatchMode.NOT_EQUALS
1965
+ },
1966
+ {
1967
+ label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
1968
+ value: import_api3.FilterMatchMode.STARTS_WITH
1969
+ },
1970
+ {
1971
+ label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
1972
+ value: customMatchModes.notStartsWith
1973
+ },
1974
+ {
1975
+ label: isLanguagePtBr ? "Termina com" : "Ends with",
1976
+ value: import_api3.FilterMatchMode.ENDS_WITH
1977
+ },
1978
+ {
1979
+ label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
1980
+ value: customMatchModes.notEndsWith
1981
+ }
1982
+ ];
1983
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
1935
1984
  };
1936
- var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1937
- {
1938
- label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1939
- value: import_api3.FilterMatchMode.CONTAINS
1940
- },
1941
- {
1942
- label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1943
- value: import_api3.FilterMatchMode.NOT_CONTAINS
1944
- },
1945
- {
1946
- label: isLanguagePtBr ? "Igual" : "Equals",
1947
- value: import_api3.FilterMatchMode.EQUALS
1948
- },
1949
- {
1950
- label: isLanguagePtBr ? "Diferente" : "Not equals",
1951
- value: import_api3.FilterMatchMode.NOT_EQUALS
1952
- },
1953
- {
1954
- label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
1955
- value: import_api3.FilterMatchMode.STARTS_WITH
1956
- },
1957
- {
1958
- label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
1959
- value: customMatchModes.notStartsWith
1960
- },
1961
- {
1962
- label: isLanguagePtBr ? "Termina com" : "Ends with",
1963
- value: import_api3.FilterMatchMode.ENDS_WITH
1964
- },
1965
- {
1966
- label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
1967
- value: customMatchModes.notEndsWith
1968
- },
1969
- {
1970
- label: isLanguagePtBr ? "Vazio" : "Empty",
1971
- value: customMatchModes.empty
1972
- },
1973
- {
1974
- label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
1975
- value: customMatchModes.notEmpty
1976
- }
1977
- ];
1978
1985
  var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1979
1986
  {
1980
1987
  label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
@@ -1985,25 +1992,41 @@ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1985
1992
  value: import_api3.FilterMatchMode.NOT_CONTAINS
1986
1993
  }
1987
1994
  ];
1988
- var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
1989
- {
1990
- label: isLanguagePtBr ? "Data antes de" : "Date before",
1991
- value: import_api3.FilterMatchMode.DATE_BEFORE
1992
- },
1993
- {
1994
- label: isLanguagePtBr ? "Data depois de" : "Date after",
1995
- value: import_api3.FilterMatchMode.DATE_AFTER
1996
- }
1997
- ];
1998
- var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
1999
- {
2000
- label: isLanguagePtBr ? "Igual" : "Equals",
2001
- value: import_api3.FilterMatchMode.EQUALS
2002
- },
2003
- {
2004
- label: isLanguagePtBr ? "Diferente" : "Not equals",
2005
- value: import_api3.FilterMatchMode.NOT_EQUALS
2006
- },
1995
+ var getDefaultFilterMatchOptionsDate = (isLanguagePtBr, isNullable = true) => {
1996
+ const baseOptions = [
1997
+ {
1998
+ label: isLanguagePtBr ? "Data anterior a" : "Date before",
1999
+ value: import_api3.FilterMatchMode.DATE_BEFORE
2000
+ },
2001
+ {
2002
+ label: isLanguagePtBr ? "Data anterior ou igual a" : "Date prior to or equal to",
2003
+ value: customMatchModes.dateBeforeAndEquals
2004
+ },
2005
+ {
2006
+ label: isLanguagePtBr ? "Data posterior a" : "Date after",
2007
+ value: import_api3.FilterMatchMode.DATE_AFTER
2008
+ },
2009
+ {
2010
+ label: isLanguagePtBr ? "Data posterior ou igual a" : "Date later than or equal to",
2011
+ value: customMatchModes.dateAfterAndEquals
2012
+ }
2013
+ ];
2014
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
2015
+ };
2016
+ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr, isNullable = true) => {
2017
+ const baseOptions = [
2018
+ {
2019
+ label: isLanguagePtBr ? "Igual" : "Equals",
2020
+ value: import_api3.FilterMatchMode.EQUALS
2021
+ },
2022
+ {
2023
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
2024
+ value: import_api3.FilterMatchMode.NOT_EQUALS
2025
+ }
2026
+ ];
2027
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
2028
+ };
2029
+ var getNullable = (isLanguagePtBr) => [
2007
2030
  {
2008
2031
  label: isLanguagePtBr ? "Vazio" : "Empty",
2009
2032
  value: customMatchModes.empty
@@ -2013,16 +2036,6 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
2013
2036
  value: customMatchModes.notEmpty
2014
2037
  }
2015
2038
  ];
2016
- var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
2017
- {
2018
- label: isLanguagePtBr ? "Igual" : "Equals",
2019
- value: import_api3.FilterMatchMode.EQUALS
2020
- },
2021
- {
2022
- label: isLanguagePtBr ? "Diferente" : "Not equals",
2023
- value: import_api3.FilterMatchMode.NOT_EQUALS
2024
- }
2025
- ];
2026
2039
 
2027
2040
  // src/components/DataTableAdvancedFilter/utils/DataTableUtils.tsx
2028
2041
  var import_api4 = require("primereact/api");
@@ -2331,9 +2344,9 @@ var import_api5 = require("primereact/api");
2331
2344
  defaultTheme,
2332
2345
  getDefaultFilterMatchOptionsDate,
2333
2346
  getDefaultFilterMatchOptionsEnum,
2334
- getDefaultFilterMatchOptionsEnumNotNullable,
2335
2347
  getDefaultFilterMatchOptionsString,
2336
2348
  getDefaultFilterMatchOptionsStringArray,
2349
+ getNullable,
2337
2350
  getUrlParams,
2338
2351
  mapPrimeToBackendFilters
2339
2352
  });
package/dist/index.mjs CHANGED
@@ -267,8 +267,12 @@ var InputBase = ({
267
267
  "--input-font-size": theme.components.input.fonts.inputSize,
268
268
  // Colors
269
269
  "--label-color": theme.components.input.colors.text,
270
+ "--label-line": theme.colors.light,
270
271
  "--input-border": theme.components.input.colors.border,
271
272
  "--input-bg": theme.components.input.colors.background,
273
+ "--autofill-box-shadow": theme.components.input.colors.background,
274
+ "--autofill-text-color": theme.components.input.colors.text,
275
+ "--autofill-border": theme.components.input.colors.focusBorder,
272
276
  "--input-text-color": theme.components.input.colors.text,
273
277
  "--input-placeholder": theme.components.input.colors.placeholder,
274
278
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -363,8 +367,11 @@ var TextAreaBase = ({
363
367
  "--input-font-size": theme.components.input.fonts.inputSize,
364
368
  // Colors
365
369
  "--label-color": theme.components.input.colors.text,
370
+ "--label-line": theme.colors.light,
366
371
  "--input-border": theme.components.input.colors.border,
367
372
  "--input-bg": theme.components.input.colors.background,
373
+ "--autofill-box-shadow": theme.components.input.colors.background,
374
+ "--autofill-text-color": theme.components.input.colors.text,
368
375
  "--input-text-color": theme.components.input.colors.text,
369
376
  "--input-placeholder": theme.components.input.colors.placeholder,
370
377
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -451,6 +458,7 @@ var InputBase2 = ({
451
458
  "--label-color": theme.components.input.colors.text,
452
459
  "--input-border": theme.components.input.colors.border,
453
460
  "--input-bg": theme.components.input.colors.background,
461
+ "--label-line": theme.colors.light,
454
462
  "--input-text-color": theme.colors.light,
455
463
  "--input-placeholder": theme.components.input.colors.placeholder,
456
464
  "--input-focus-border": theme.components.input.colors.focusBorder,
@@ -637,7 +645,7 @@ import { useQuery } from "@tanstack/react-query";
637
645
  import { memo } from "react";
638
646
  import { jsx as jsx9 } from "react/jsx-runtime";
639
647
  var LoadingSpinner = memo(
640
- ({ size = 24, color = "#00875F" }) => {
648
+ ({ size = 20, color = "#00875F" }) => {
641
649
  return /* @__PURE__ */ jsx9(
642
650
  "span",
643
651
  {
@@ -678,6 +686,7 @@ var InputBase3 = ({
678
686
  }, ref) => {
679
687
  const theme = useLeafcodeTheme();
680
688
  const styleVars = {
689
+ "--label-line": theme.colors.light,
681
690
  "--label-font-family": theme.components.input.fonts.label,
682
691
  "--label-font-weight": theme.components.input.fonts.labelWeight,
683
692
  "--label-font-size": theme.components.input.fonts.labelSize,
@@ -746,7 +755,7 @@ var InputBase3 = ({
746
755
  },
747
756
  item.id
748
757
  )),
749
- isLoading && /* @__PURE__ */ jsx10("li", { className: "dropdown-loading", children: /* @__PURE__ */ jsx10(LoadingSpinner, { size: 24 }) }),
758
+ isLoading && /* @__PURE__ */ jsx10("li", { className: "dropdown-loading", children: /* @__PURE__ */ jsx10(LoadingSpinner, { size: 20 }) }),
750
759
  !isLoading && items.length === 0 && /* @__PURE__ */ jsx10("li", { className: "dropdown-empty", children: "N\xE3o encontrado" })
751
760
  ] }) });
752
761
  };
@@ -795,6 +804,7 @@ var InputBase3 = ({
795
804
  setValue("");
796
805
  setItems([]);
797
806
  setPageNumber(1);
807
+ onChange?.(null);
798
808
  onSelect(null);
799
809
  },
800
810
  className: "dropdown-clear",
@@ -1731,7 +1741,7 @@ var ValueFilterTemplate = (options, mask) => {
1731
1741
  return;
1732
1742
  }
1733
1743
  const valueToFilter = mask ? mask(rawValue) : rawValue;
1734
- options.filterCallback(valueToFilter, options.index);
1744
+ options.filterCallback(String(valueToFilter), options.index);
1735
1745
  };
1736
1746
  return /* @__PURE__ */ jsx18(
1737
1747
  InputNumber,
@@ -1882,50 +1892,47 @@ var customMatchModes = {
1882
1892
  notStartsWith: "notStartsWith",
1883
1893
  notEndsWith: "notEndsWith",
1884
1894
  empty: "empty",
1885
- notEmpty: "notEmpty"
1895
+ notEmpty: "notEmpty",
1896
+ dateBeforeAndEquals: "dateBeforeAndEquals",
1897
+ dateAfterAndEquals: "dateAfterAndEquals"
1898
+ };
1899
+ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true, isNullable = true) => {
1900
+ const baseOptions = [
1901
+ {
1902
+ label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1903
+ value: FilterMatchMode3.CONTAINS
1904
+ },
1905
+ {
1906
+ label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1907
+ value: FilterMatchMode3.NOT_CONTAINS
1908
+ },
1909
+ {
1910
+ label: isLanguagePtBr ? "Igual" : "Equals",
1911
+ value: FilterMatchMode3.EQUALS
1912
+ },
1913
+ {
1914
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
1915
+ value: FilterMatchMode3.NOT_EQUALS
1916
+ },
1917
+ {
1918
+ label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
1919
+ value: FilterMatchMode3.STARTS_WITH
1920
+ },
1921
+ {
1922
+ label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
1923
+ value: customMatchModes.notStartsWith
1924
+ },
1925
+ {
1926
+ label: isLanguagePtBr ? "Termina com" : "Ends with",
1927
+ value: FilterMatchMode3.ENDS_WITH
1928
+ },
1929
+ {
1930
+ label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
1931
+ value: customMatchModes.notEndsWith
1932
+ }
1933
+ ];
1934
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
1886
1935
  };
1887
- var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1888
- {
1889
- label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1890
- value: FilterMatchMode3.CONTAINS
1891
- },
1892
- {
1893
- label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1894
- value: FilterMatchMode3.NOT_CONTAINS
1895
- },
1896
- {
1897
- label: isLanguagePtBr ? "Igual" : "Equals",
1898
- value: FilterMatchMode3.EQUALS
1899
- },
1900
- {
1901
- label: isLanguagePtBr ? "Diferente" : "Not equals",
1902
- value: FilterMatchMode3.NOT_EQUALS
1903
- },
1904
- {
1905
- label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
1906
- value: FilterMatchMode3.STARTS_WITH
1907
- },
1908
- {
1909
- label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
1910
- value: customMatchModes.notStartsWith
1911
- },
1912
- {
1913
- label: isLanguagePtBr ? "Termina com" : "Ends with",
1914
- value: FilterMatchMode3.ENDS_WITH
1915
- },
1916
- {
1917
- label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
1918
- value: customMatchModes.notEndsWith
1919
- },
1920
- {
1921
- label: isLanguagePtBr ? "Vazio" : "Empty",
1922
- value: customMatchModes.empty
1923
- },
1924
- {
1925
- label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
1926
- value: customMatchModes.notEmpty
1927
- }
1928
- ];
1929
1936
  var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1930
1937
  {
1931
1938
  label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
@@ -1936,25 +1943,41 @@ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1936
1943
  value: FilterMatchMode3.NOT_CONTAINS
1937
1944
  }
1938
1945
  ];
1939
- var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
1940
- {
1941
- label: isLanguagePtBr ? "Data antes de" : "Date before",
1942
- value: FilterMatchMode3.DATE_BEFORE
1943
- },
1944
- {
1945
- label: isLanguagePtBr ? "Data depois de" : "Date after",
1946
- value: FilterMatchMode3.DATE_AFTER
1947
- }
1948
- ];
1949
- var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
1950
- {
1951
- label: isLanguagePtBr ? "Igual" : "Equals",
1952
- value: FilterMatchMode3.EQUALS
1953
- },
1954
- {
1955
- label: isLanguagePtBr ? "Diferente" : "Not equals",
1956
- value: FilterMatchMode3.NOT_EQUALS
1957
- },
1946
+ var getDefaultFilterMatchOptionsDate = (isLanguagePtBr, isNullable = true) => {
1947
+ const baseOptions = [
1948
+ {
1949
+ label: isLanguagePtBr ? "Data anterior a" : "Date before",
1950
+ value: FilterMatchMode3.DATE_BEFORE
1951
+ },
1952
+ {
1953
+ label: isLanguagePtBr ? "Data anterior ou igual a" : "Date prior to or equal to",
1954
+ value: customMatchModes.dateBeforeAndEquals
1955
+ },
1956
+ {
1957
+ label: isLanguagePtBr ? "Data posterior a" : "Date after",
1958
+ value: FilterMatchMode3.DATE_AFTER
1959
+ },
1960
+ {
1961
+ label: isLanguagePtBr ? "Data posterior ou igual a" : "Date later than or equal to",
1962
+ value: customMatchModes.dateAfterAndEquals
1963
+ }
1964
+ ];
1965
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
1966
+ };
1967
+ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr, isNullable = true) => {
1968
+ const baseOptions = [
1969
+ {
1970
+ label: isLanguagePtBr ? "Igual" : "Equals",
1971
+ value: FilterMatchMode3.EQUALS
1972
+ },
1973
+ {
1974
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
1975
+ value: FilterMatchMode3.NOT_EQUALS
1976
+ }
1977
+ ];
1978
+ return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
1979
+ };
1980
+ var getNullable = (isLanguagePtBr) => [
1958
1981
  {
1959
1982
  label: isLanguagePtBr ? "Vazio" : "Empty",
1960
1983
  value: customMatchModes.empty
@@ -1964,16 +1987,6 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
1964
1987
  value: customMatchModes.notEmpty
1965
1988
  }
1966
1989
  ];
1967
- var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
1968
- {
1969
- label: isLanguagePtBr ? "Igual" : "Equals",
1970
- value: FilterMatchMode3.EQUALS
1971
- },
1972
- {
1973
- label: isLanguagePtBr ? "Diferente" : "Not equals",
1974
- value: FilterMatchMode3.NOT_EQUALS
1975
- }
1976
- ];
1977
1990
 
1978
1991
  // src/components/DataTableAdvancedFilter/utils/DataTableUtils.tsx
1979
1992
  import { FilterMatchMode as FilterMatchMode4, FilterOperator } from "primereact/api";
@@ -2281,9 +2294,9 @@ export {
2281
2294
  defaultTheme,
2282
2295
  getDefaultFilterMatchOptionsDate,
2283
2296
  getDefaultFilterMatchOptionsEnum,
2284
- getDefaultFilterMatchOptionsEnumNotNullable,
2285
2297
  getDefaultFilterMatchOptionsString,
2286
2298
  getDefaultFilterMatchOptionsStringArray,
2299
+ getNullable,
2287
2300
  getUrlParams,
2288
2301
  mapPrimeToBackendFilters
2289
2302
  };
@@ -79,8 +79,8 @@
79
79
  }
80
80
 
81
81
  .animate-spin {
82
- height: var(--button-height, 1.25rem);
83
- width: var(--button-height, 1.25rem);
82
+ height: 1.25rem;
83
+ width: 1.25rem;
84
84
  color: var(--button-color, #ffffff);
85
85
  }
86
86
 
@@ -16,7 +16,7 @@
16
16
  .label-input::before {
17
17
  content: "";
18
18
  position: absolute;
19
- background-color: var(--label-bg, #f9fafb);
19
+ background-color: var(--label-line, #ffffff);
20
20
  width: 100%;
21
21
  height: 4px;
22
22
  left: 0;
@@ -27,7 +27,7 @@
27
27
  .label-input::after {
28
28
  content: "";
29
29
  position: absolute;
30
- background-color: var(--label-bg, #f9fafb);
30
+ background-color: var(--label-line, #ffffff);
31
31
  width: 100%;
32
32
  height: 2px;
33
33
  left: 0;
@@ -48,15 +48,15 @@
48
48
  background-color: var(--input-bg, #ffffff);
49
49
  color: var(--input-text-color, #070707);
50
50
  position: relative;
51
+ outline: none;
51
52
  }
52
53
 
53
54
  .input:focus {
54
- outline: none;
55
55
  border-color: var(--input-focus-border, #60a5fa);
56
+ box-shadow: none;
56
57
  }
57
58
 
58
59
  .input:hover {
59
- outline: none;
60
60
  border-color: var(--input-focus-border, #60a5fa);
61
61
  }
62
62
 
@@ -88,14 +88,22 @@
88
88
 
89
89
  input:-webkit-autofill {
90
90
  -webkit-box-shadow: 0 0 0 30px
91
- light-dark(var(--autofill-box-shadow, --autofill-box-shadow)) inset !important;
91
+ light-dark(
92
+ var(--autofill-box-shadow, #fff),
93
+ var(--autofill-box-shadow, #fff)
94
+ )
95
+ inset !important;
92
96
  -webkit-text-fill-color: var(--autofill-text-color, #070707) !important;
93
97
  border: 1px solid var(--autofill-border, #ffffff);
94
98
  }
95
99
 
96
100
  input:-webkit-autofill:focus {
97
101
  -webkit-box-shadow: 0 0 0 30px
98
- light-dark(var(--autofill-focus, --autofill-focus)) inset !important;
102
+ light-dark(
103
+ var(--autofill-box-shadow, #fff),
104
+ var(--autofill-box-shadow, #fff)
105
+ )
106
+ inset !important;
99
107
  -webkit-text-fill-color: var(--autofill-text-color, #070707) !important;
100
108
  border: 1px solid var(--autofill-border, #ffffff);
101
109
  }
@@ -174,7 +182,7 @@ input:-webkit-autofill:focus {
174
182
 
175
183
  .react-select__option--is-focused {
176
184
  background-color: var(--input-focus-border, #79bdd8) !important;
177
- color: var(--input-text-color, #ffffff);
185
+ color: var(--input-text-color, #ffffff) !important;
178
186
  }
179
187
 
180
188
  .react-select__option--is-selected {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",