@ttoss/forms 0.31.5 → 0.31.6

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.
@@ -1,53 +1,51 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { FormField, FormFieldCNPJ, FormFieldPatternFormat, isCnpjValid } from "../chunk-7COMWRW2.js";
2
+ import { FormField, FormFieldCNPJ, FormFieldPatternFormat, __name, isCnpjValid } from "../chunk-HIARJN6N.js";
3
3
 
4
4
  // src/Brazil/FormFieldPhone.tsx
5
5
  import { Input } from "@ttoss/ui";
6
6
  import { PatternFormat } from "react-number-format";
7
- import { jsx } from "react/jsx-runtime";
8
- var FormFieldPhone = ({
7
+ var FormFieldPhone = /* @__PURE__ */__name(({
9
8
  label,
10
9
  name,
11
10
  ...patternFormatProps
12
11
  }) => {
13
- return /* @__PURE__ */jsx(FormField, {
12
+ return /* @__PURE__ */React.createElement(FormField, {
14
13
  name,
15
14
  label,
16
15
  warning: patternFormatProps.warning,
17
16
  inputTooltip: patternFormatProps.inputTooltip,
18
- render: ({
17
+ render: /* @__PURE__ */__name(({
19
18
  field
20
19
  }) => {
21
20
  const format = field.value?.length > 10 ? "(##) #####-####" : "(##) ####-#####";
22
- return /* @__PURE__ */jsx(PatternFormat, {
21
+ return /* @__PURE__ */React.createElement(PatternFormat, {
23
22
  name: field.name,
24
23
  value: field.value,
25
24
  onBlur: field.onBlur,
26
- onValueChange: values => {
25
+ onValueChange: /* @__PURE__ */__name(values => {
27
26
  field.onChange(values.value);
28
- },
27
+ }, "onValueChange"),
29
28
  format,
30
29
  customInput: Input,
31
30
  placeholder: "(11) 91234-1234",
32
31
  ...patternFormatProps
33
32
  });
34
- }
33
+ }, "render")
35
34
  });
36
- };
35
+ }, "FormFieldPhone");
37
36
 
38
37
  // src/Brazil/FormFieldCEP.tsx
39
- import { jsx as jsx2 } from "react/jsx-runtime";
40
- var FormFieldCEP = ({
38
+ var FormFieldCEP = /* @__PURE__ */__name(({
41
39
  label,
42
40
  name,
43
41
  ...formFieldPatternFormatProps
44
42
  }) => {
45
- return /* @__PURE__ */jsx2(FormFieldPatternFormat, {
43
+ return /* @__PURE__ */React.createElement(FormFieldPatternFormat, {
46
44
  name,
47
45
  label,
48
46
  format: "#####-###",
49
47
  placeholder: "12345-678",
50
48
  ...formFieldPatternFormatProps
51
49
  });
52
- };
50
+ }, "FormFieldCEP");
53
51
  export { FormFieldCEP, FormFieldCNPJ, FormFieldPhone, isCnpjValid };