@ttoss/forms 0.35.0 → 0.35.2

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,18 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { FieldValues, FieldPath } from 'react-hook-form';
3
- import { PatternFormatProps } from 'react-number-format';
4
- import { F as FormFieldProps, a as FormFieldPatternFormatProps } from '../FormFieldPatternFormat-D5CI6eUA.js';
3
+ import { a as FormFieldPatternFormatProps, F as FormFieldProps } from '../FormFieldPatternFormat-D5CI6eUA.js';
4
+ import { PatternFormatProps, NumberFormatBaseProps } from 'react-number-format';
5
5
  import '@ttoss/ui';
6
6
  import 'react';
7
7
 
8
+ type FormFieldCEPProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<FormFieldPatternFormatProps<TFieldValues, TName>, 'format'>;
9
+ declare const FormFieldCEP: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ placeholder, ...formFieldPatternFormatProps }: FormFieldCEPProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
10
+
8
11
  type FormFieldCNPJProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & Omit<PatternFormatProps, 'name' | 'format'>;
9
12
  declare const isCnpjValid: (cnpj: any) => boolean;
10
13
  declare const FormFieldCNPJ: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ disabled, ...props }: FormFieldCNPJProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
11
14
 
15
+ type FormFieldCPFProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & Omit<PatternFormatProps, 'name' | 'format'>;
16
+ declare const isCpfValid: (cpf: any) => boolean;
17
+ declare const FormFieldCPF: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ disabled, ...props }: FormFieldCPFProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
18
+
19
+ type FormFieldCPFOrCNPJProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & Omit<NumberFormatBaseProps, 'name' | 'format'>;
20
+ declare const FormFieldCPFOrCNPJ: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ disabled, ...props }: FormFieldCPFOrCNPJProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
21
+
12
22
  type FormFieldPhoneProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & Omit<PatternFormatProps, 'name' | 'format'>;
13
23
  declare const FormFieldPhone: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ disabled, ...props }: FormFieldPhoneProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
14
24
 
15
- type FormFieldCEPProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<FormFieldPatternFormatProps<TFieldValues, TName>, 'format'>;
16
- declare const FormFieldCEP: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ placeholder, ...formFieldPatternFormatProps }: FormFieldCEPProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
17
-
18
- export { FormFieldCEP, FormFieldCNPJ, FormFieldPhone, isCnpjValid };
25
+ export { FormFieldCEP, FormFieldCNPJ, FormFieldCPF, FormFieldCPFOrCNPJ, FormFieldPhone, isCnpjValid, isCpfValid };
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import '../typings.d-HZBqJJjn.js';
3
+ import '../typings.d-BZ6kUiQ4.js';
4
4
  import * as yup from 'yup';
5
5
  import { IconType } from '@ttoss/react-icons';
6
6
 
@@ -1,9 +1,79 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import * as React from 'react';
3
- import { FormField, FormFieldCNPJ, FormFieldPatternFormat, __name, isCnpjValid } from "../chunk-EA4K5JAO.js";
3
+ import { FormField, FormFieldCNPJ, FormFieldCPF, FormFieldPatternFormat, __name, isCnpjValid, isCpfValid } from "../chunk-QJQFXN4B.js";
4
4
 
5
- // src/Brazil/FormFieldPhone.tsx
5
+ // src/Brazil/FormFieldCEP.tsx
6
+ var FormFieldCEP = /* @__PURE__ */__name(({
7
+ placeholder = "12345-678",
8
+ ...formFieldPatternFormatProps
9
+ }) => {
10
+ return /* @__PURE__ */React.createElement(FormFieldPatternFormat, {
11
+ format: "#####-###",
12
+ placeholder,
13
+ ...formFieldPatternFormatProps
14
+ });
15
+ }, "FormFieldCEP");
16
+
17
+ // src/Brazil/FormFieldCPFOrCNPJ.tsx
6
18
  import { Input } from "@ttoss/ui";
19
+ import { NumberFormatBase } from "react-number-format";
20
+ var formatCPFOrCNPJ = /* @__PURE__ */__name(value => {
21
+ const numericValue = value.replace(/\D/g, "");
22
+ if (numericValue.length <= 11) {
23
+ return numericValue.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
24
+ } else {
25
+ return numericValue.substring(0, 14).replace(/(\d{2})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1/$2").replace(/(\d{4})(\d{1,2})$/, "$1-$2");
26
+ }
27
+ }, "formatCPFOrCNPJ");
28
+ var FormFieldCPFOrCNPJ = /* @__PURE__ */__name(({
29
+ disabled,
30
+ ...props
31
+ }) => {
32
+ const {
33
+ label,
34
+ name,
35
+ labelTooltip,
36
+ warning,
37
+ sx,
38
+ css,
39
+ rules,
40
+ id,
41
+ defaultValue,
42
+ placeholder = "123.456.789-00 or 12.345.678/0000-00",
43
+ ...formatProps
44
+ } = props;
45
+ return /* @__PURE__ */React.createElement(FormField, {
46
+ id,
47
+ label,
48
+ name,
49
+ labelTooltip,
50
+ warning,
51
+ sx,
52
+ css,
53
+ defaultValue,
54
+ rules,
55
+ disabled,
56
+ render: /* @__PURE__ */__name(({
57
+ field
58
+ }) => {
59
+ return /* @__PURE__ */React.createElement(NumberFormatBase, {
60
+ ...formatProps,
61
+ value: field.value,
62
+ onBlur: field.onBlur,
63
+ onValueChange: /* @__PURE__ */__name(values => {
64
+ field.onChange(values.value);
65
+ }, "onValueChange"),
66
+ format: formatCPFOrCNPJ,
67
+ customInput: Input,
68
+ placeholder,
69
+ disabled: disabled ?? field.disabled
70
+ });
71
+ }, "render")
72
+ });
73
+ }, "FormFieldCPFOrCNPJ");
74
+
75
+ // src/Brazil/FormFieldPhone.tsx
76
+ import { Input as Input2 } from "@ttoss/ui";
7
77
  import { PatternFormat } from "react-number-format";
8
78
  var FormFieldPhone = /* @__PURE__ */__name(({
9
79
  disabled,
@@ -48,23 +118,11 @@ var FormFieldPhone = /* @__PURE__ */__name(({
48
118
  field.onChange(values.value);
49
119
  }, "onValueChange"),
50
120
  format,
51
- customInput: Input,
121
+ customInput: Input2,
52
122
  placeholder,
53
123
  disabled: disabled ?? field.disabled
54
124
  });
55
125
  }, "render")
56
126
  });
57
127
  }, "FormFieldPhone");
58
-
59
- // src/Brazil/FormFieldCEP.tsx
60
- var FormFieldCEP = /* @__PURE__ */__name(({
61
- placeholder = "12345-678",
62
- ...formFieldPatternFormatProps
63
- }) => {
64
- return /* @__PURE__ */React.createElement(FormFieldPatternFormat, {
65
- format: "#####-###",
66
- placeholder,
67
- ...formFieldPatternFormatProps
68
- });
69
- }, "FormFieldCEP");
70
- export { FormFieldCEP, FormFieldCNPJ, FormFieldPhone, isCnpjValid };
128
+ export { FormFieldCEP, FormFieldCNPJ, FormFieldCPF, FormFieldCPFOrCNPJ, FormFieldPhone, isCnpjValid, isCpfValid };
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import * as React from 'react';
3
- import { Form, useForm, yupResolver } from "../chunk-X2A7XW2U.js";
4
- import { __name } from "../chunk-EA4K5JAO.js";
3
+ import { Form, useForm, yupResolver } from "../chunk-YXYTHWIU.js";
4
+ import { __name } from "../chunk-QJQFXN4B.js";
5
5
 
6
6
  // src/MultistepForm/MultistepForm.tsx
7
7
  import { Flex as Flex6 } from "@ttoss/ui";
@@ -357,4 +357,86 @@ var FormFieldCNPJ = /* @__PURE__ */__name(({
357
357
  }, "render")
358
358
  });
359
359
  }, "FormFieldCNPJ");
360
- export { __name, FormErrorMessage, FormField, FormFieldPatternFormat, isCnpjValid, FormFieldCNPJ };
360
+
361
+ // src/Brazil/FormFieldCPF.tsx
362
+ import { Input as Input3 } from "@ttoss/ui";
363
+ import { PatternFormat as PatternFormat3 } from "react-number-format";
364
+ var isCpfValid = /* @__PURE__ */__name(cpf => {
365
+ if (cpf?.length != 11) {
366
+ return false;
367
+ }
368
+ if (cpf == "00000000000" || cpf == "11111111111" || cpf == "22222222222" || cpf == "33333333333" || cpf == "44444444444" || cpf == "55555555555" || cpf == "66666666666" || cpf == "77777777777" || cpf == "88888888888" || cpf == "99999999999") {
369
+ return false;
370
+ }
371
+ let soma = 0;
372
+ for (let i = 0; i < 9; i++) {
373
+ soma += parseInt(cpf.charAt(i)) * (10 - i);
374
+ }
375
+ let resto = soma * 10 % 11;
376
+ if (resto === 10 || resto === 11) {
377
+ resto = 0;
378
+ }
379
+ if (resto != parseInt(cpf.charAt(9))) {
380
+ return false;
381
+ }
382
+ soma = 0;
383
+ for (let i = 0; i < 10; i++) {
384
+ soma += parseInt(cpf.charAt(i)) * (11 - i);
385
+ }
386
+ resto = soma * 10 % 11;
387
+ if (resto === 10 || resto === 11) {
388
+ resto = 0;
389
+ }
390
+ if (resto != parseInt(cpf.charAt(10))) {
391
+ return false;
392
+ }
393
+ return true;
394
+ }, "isCpfValid");
395
+ var FormFieldCPF = /* @__PURE__ */__name(({
396
+ disabled,
397
+ ...props
398
+ }) => {
399
+ const {
400
+ label,
401
+ name,
402
+ labelTooltip,
403
+ warning,
404
+ sx,
405
+ css,
406
+ rules,
407
+ id,
408
+ defaultValue,
409
+ placeholder = "123.456.789-00",
410
+ ...patternFormatProps
411
+ } = props;
412
+ return /* @__PURE__ */React.createElement(FormField, {
413
+ id,
414
+ label,
415
+ name,
416
+ labelTooltip,
417
+ warning,
418
+ sx,
419
+ css,
420
+ defaultValue,
421
+ rules,
422
+ disabled,
423
+ render: /* @__PURE__ */__name(({
424
+ field
425
+ }) => {
426
+ return /* @__PURE__ */React.createElement(PatternFormat3, {
427
+ ...patternFormatProps,
428
+ name: field.name,
429
+ value: field.value,
430
+ onBlur: field.onBlur,
431
+ onValueChange: /* @__PURE__ */__name(values => {
432
+ field.onChange(values.value);
433
+ }, "onValueChange"),
434
+ format: "###.###.###-##",
435
+ customInput: Input3,
436
+ placeholder,
437
+ disabled: disabled ?? field.disabled
438
+ });
439
+ }, "render")
440
+ });
441
+ }, "FormFieldCPF");
442
+ export { __name, FormErrorMessage, FormField, FormFieldPatternFormat, isCnpjValid, FormFieldCNPJ, isCpfValid, FormFieldCPF };
@@ -1,6 +1,6 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import * as React from 'react';
3
- import { FormErrorMessage, FormField, FormFieldPatternFormat, __name, isCnpjValid } from "./chunk-EA4K5JAO.js";
3
+ import { FormErrorMessage, FormField, FormFieldPatternFormat, __name, isCnpjValid, isCpfValid } from "./chunk-QJQFXN4B.js";
4
4
 
5
5
  // src/Form.tsx
6
6
  import { Box } from "@ttoss/ui";
@@ -196,6 +196,51 @@ var FormFieldCurrencyInput = /* @__PURE__ */__name(({
196
196
  });
197
197
  }, "FormFieldCurrencyInput");
198
198
 
199
+ // src/FormFieldDatePicker.tsx
200
+ import { DatePicker } from "@ttoss/components/DatePicker";
201
+ var FormFieldDatePicker = /* @__PURE__ */__name(({
202
+ disabled,
203
+ ...props
204
+ }) => {
205
+ const {
206
+ label,
207
+ name,
208
+ labelTooltip,
209
+ warning,
210
+ sx,
211
+ css,
212
+ rules,
213
+ id,
214
+ defaultValue,
215
+ presets,
216
+ ...datePickerProps
217
+ } = props;
218
+ return /* @__PURE__ */React.createElement(FormField, {
219
+ id,
220
+ label,
221
+ name,
222
+ labelTooltip,
223
+ warning,
224
+ sx,
225
+ css,
226
+ defaultValue,
227
+ rules,
228
+ disabled,
229
+ render: /* @__PURE__ */__name(({
230
+ field
231
+ }) => {
232
+ return /* @__PURE__ */React.createElement(DatePicker, {
233
+ ...datePickerProps,
234
+ value: field.value,
235
+ onChange: /* @__PURE__ */__name(range => {
236
+ field.onChange(range);
237
+ }, "onChange"),
238
+ presets
239
+ });
240
+ }, "render")
241
+ });
242
+ }, "FormFieldDatePicker");
243
+
199
244
  // src/FormFieldInput.tsx
200
245
  import { Input as Input2 } from "@ttoss/ui";
201
246
  var FormFieldInput = /* @__PURE__ */__name(({
@@ -901,6 +946,11 @@ yup.addMethod(yup.string, "cnpj", function () {
901
946
  return isCnpjValid(value);
902
947
  });
903
948
  });
949
+ yup.addMethod(yup.string, "cpf", function () {
950
+ return this.test("valid-cpf", "Invalid CPF", value => {
951
+ return isCpfValid(value);
952
+ });
953
+ });
904
954
  yup.addMethod(yup.string, "password", function ({
905
955
  required
906
956
  } = {}) {
@@ -918,4 +968,4 @@ import * as yup2 from "yup";
918
968
  import { yupResolver } from "@hookform/resolvers/yup";
919
969
  import { Controller, FormProvider as FormProvider2, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from "react-hook-form";
920
970
  export * from "react-hook-form";
921
- export { Form, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldNumericFormat, FormFieldCurrencyInput, FormFieldInput, FormFieldPassword, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, useFormGroup, FormGroup, yup2 as yup, yupResolver, Controller, FormProvider2 as FormProvider, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };
971
+ export { Form, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldNumericFormat, FormFieldCurrencyInput, FormFieldDatePicker, FormFieldInput, FormFieldPassword, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, useFormGroup, FormGroup, yup2 as yup, yupResolver, Controller, FormProvider2 as FormProvider, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { Controller, Form, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver } from "./chunk-X2A7XW2U.js";
3
- import { FormErrorMessage, FormField, FormFieldPatternFormat } from "./chunk-EA4K5JAO.js";
4
- export { Controller, Form, FormErrorMessage, FormField, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldPatternFormat, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver };
2
+ import { Controller, Form, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldDatePicker, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver } from "./chunk-YXYTHWIU.js";
3
+ import { FormErrorMessage, FormField, FormFieldPatternFormat } from "./chunk-QJQFXN4B.js";
4
+ export { Controller, Form, FormErrorMessage, FormField, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldDatePicker, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldPatternFormat, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver };
package/dist/index.d.ts CHANGED
@@ -7,7 +7,8 @@ export { Controller, FormProvider, useController, useFieldArray, useForm, useFor
7
7
  import { F as FormFieldProps, a as FormFieldPatternFormatProps } from './FormFieldPatternFormat-D5CI6eUA.js';
8
8
  export { b as FormField, c as FormFieldPatternFormat } from './FormFieldPatternFormat-D5CI6eUA.js';
9
9
  import { NumericFormatProps } from 'react-number-format';
10
- import './typings.d-HZBqJJjn.js';
10
+ import { DateRange } from '@ttoss/components/DatePicker';
11
+ import './typings.d-BZ6kUiQ4.js';
11
12
  import * as yup from 'yup';
12
13
  export { yup };
13
14
  export { yupResolver } from '@hookform/resolvers/yup';
@@ -39,6 +40,15 @@ type FormFieldCurrencyInputProps<TFieldValues extends FieldValues = FieldValues,
39
40
  };
40
41
  declare const FormFieldCurrencyInput: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ prefix, decimalSeparator, thousandSeparator, ...formFieldNumericFormatProps }: FormFieldCurrencyInputProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
41
42
 
43
+ interface DateRangePreset {
44
+ label: string;
45
+ getValue: () => DateRange;
46
+ }
47
+ type FormFieldDatePickerProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & {
48
+ presets?: DateRangePreset[];
49
+ };
50
+ declare const FormFieldDatePicker: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ disabled, ...props }: FormFieldDatePickerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
51
+
42
52
  type FormFieldInputProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldProps<TFieldValues, TName> & Omit<InputProps, 'name'>;
43
53
  declare const FormFieldInput: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ defaultValue, disabled, ...props }: FormFieldInputProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
44
54
 
@@ -107,4 +117,4 @@ type FormGroupProps = {
107
117
  } & BoxProps;
108
118
  declare const FormGroup: (props: FormGroupProps) => react_jsx_runtime.JSX.Element;
109
119
 
110
- export { Form, FormErrorMessage, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldProps, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, type FormRadioOption, useFormGroup };
120
+ export { type DateRangePreset, Form, FormErrorMessage, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldDatePicker, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldProps, FormFieldRadio, FormFieldRadioCard, FormFieldRadioCardIcony, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, type FormRadioOption, useFormGroup };
@@ -8,5 +8,6 @@ declare module 'yup' {
8
8
  TFlags extends Flags = '',
9
9
  > extends Schema<TType, TContext, TDefault, TFlags> {
10
10
  cnpj(): this;
11
+ cpf(): this;
11
12
  }
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/forms",
3
- "version": "0.35.0",
3
+ "version": "0.35.2",
4
4
  "license": "MIT",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",
42
+ "@ttoss/components": "^2.10.1",
42
43
  "@ttoss/react-i18n": "^2.0.24",
43
44
  "@ttoss/ui": "^6.0.4"
44
45
  },
@@ -50,10 +51,11 @@
50
51
  "react-error-boundary": "^6.0.0",
51
52
  "tsup": "^8.5.1",
52
53
  "yup": "^1.7.1",
54
+ "@ttoss/components": "^2.10.1",
53
55
  "@ttoss/config": "^1.35.12",
54
56
  "@ttoss/react-i18n": "^2.0.24",
55
- "@ttoss/react-icons": "^0.5.5",
56
57
  "@ttoss/i18n-cli": "^0.7.38",
58
+ "@ttoss/react-icons": "^0.5.5",
57
59
  "@ttoss/test-utils": "^4.0.1",
58
60
  "@ttoss/ui": "^6.0.4"
59
61
  },