@ttoss/forms 0.28.0 → 0.28.1
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/esm/Brazil/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { FormField, FormFieldCNPJ, FormFieldPatternFormat, isCnpjValid } from "../chunk-
|
|
2
|
+
import { FormField, FormFieldCNPJ, FormFieldPatternFormat, isCnpjValid } from "../chunk-C7MZJ6SO.js";
|
|
3
3
|
|
|
4
4
|
// src/Brazil/FormFieldPhone.tsx
|
|
5
5
|
import { Input } from "@ttoss/ui";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { Form, useForm, yupResolver } from "../chunk-
|
|
2
|
+
import { Form, useForm, yupResolver } from "../chunk-C7MZJ6SO.js";
|
|
3
3
|
|
|
4
4
|
// src/MultistepForm/MultistepForm.tsx
|
|
5
|
-
import * as React3 from "react";
|
|
6
5
|
import { Flex as Flex6 } from "@ttoss/ui";
|
|
6
|
+
import * as React3 from "react";
|
|
7
7
|
|
|
8
8
|
// src/MultistepForm/MultistepFooter.tsx
|
|
9
9
|
import { Flex, Text } from "@ttoss/ui";
|
|
@@ -19,9 +19,9 @@ var MultistepFooter = ({
|
|
|
19
19
|
children: /* @__PURE__ */jsx(Text, {
|
|
20
20
|
sx: {
|
|
21
21
|
textAlign: "center",
|
|
22
|
-
marginTop: "
|
|
23
|
-
marginBottom: "
|
|
24
|
-
marginX: "
|
|
22
|
+
marginTop: "8",
|
|
23
|
+
marginBottom: "4",
|
|
24
|
+
marginX: "6"
|
|
25
25
|
},
|
|
26
26
|
children: footer
|
|
27
27
|
})
|
|
@@ -41,9 +41,9 @@ var MultistepFlowMessageImageText = ({
|
|
|
41
41
|
return /* @__PURE__ */jsxs(Flex2, {
|
|
42
42
|
sx: {
|
|
43
43
|
flexDirection: "column",
|
|
44
|
-
paddingY: "
|
|
45
|
-
paddingX: "
|
|
46
|
-
gap: "
|
|
44
|
+
paddingY: "5",
|
|
45
|
+
paddingX: "6",
|
|
46
|
+
gap: "5"
|
|
47
47
|
},
|
|
48
48
|
children: [/* @__PURE__ */jsx2(Image, {
|
|
49
49
|
src,
|
|
@@ -83,20 +83,20 @@ var MultistepQuestion = ({
|
|
|
83
83
|
return /* @__PURE__ */jsxs2(Flex3, {
|
|
84
84
|
sx: {
|
|
85
85
|
flexDirection: "column",
|
|
86
|
-
paddingTop: "
|
|
87
|
-
paddingX: "
|
|
86
|
+
paddingTop: "5",
|
|
87
|
+
paddingX: "6"
|
|
88
88
|
},
|
|
89
89
|
children: [/* @__PURE__ */jsx4(Text3, {
|
|
90
90
|
sx: {
|
|
91
91
|
textAlign: "center",
|
|
92
92
|
fontSize: "lg",
|
|
93
|
-
marginBottom: "
|
|
93
|
+
marginBottom: "5"
|
|
94
94
|
},
|
|
95
95
|
children: question
|
|
96
96
|
}), /* @__PURE__ */jsx4(Flex3, {
|
|
97
97
|
sx: {
|
|
98
98
|
flexDirection: "column",
|
|
99
|
-
gap: "
|
|
99
|
+
gap: "4"
|
|
100
100
|
},
|
|
101
101
|
children: fields
|
|
102
102
|
})]
|
|
@@ -136,9 +136,9 @@ var MultistepFormStepper = ({
|
|
|
136
136
|
}), /* @__PURE__ */jsx5(Button, {
|
|
137
137
|
sx: {
|
|
138
138
|
justifyContent: "center",
|
|
139
|
-
marginTop: "
|
|
140
|
-
marginBottom: "
|
|
141
|
-
marginX: "
|
|
139
|
+
marginTop: "6",
|
|
140
|
+
marginBottom: "4",
|
|
141
|
+
marginX: "6"
|
|
142
142
|
},
|
|
143
143
|
rightIcon: isLastStep ? void 0 : "nav-right",
|
|
144
144
|
"aria-label": `btn-step-${stepNumber}`,
|
|
@@ -148,9 +148,6 @@ var MultistepFormStepper = ({
|
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
// src/MultistepForm/MultistepHeader.tsx
|
|
152
|
-
import { CloseButton, Flex as Flex4, Image as Image2, Text as Text4 } from "@ttoss/ui";
|
|
153
|
-
|
|
154
151
|
// ../react-icons/src/Icon.tsx
|
|
155
152
|
import * as React2 from "react";
|
|
156
153
|
|
|
@@ -2410,6 +2407,7 @@ var Icon2 = React2.forwardRef((props, ref) => {
|
|
|
2410
2407
|
Icon2.displayName = "Icon";
|
|
2411
2408
|
|
|
2412
2409
|
// src/MultistepForm/MultistepHeader.tsx
|
|
2410
|
+
import { CloseButton, Flex as Flex4, Image as Image2, Text as Text4 } from "@ttoss/ui";
|
|
2413
2411
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2414
2412
|
var MultistepHeaderTitled = ({
|
|
2415
2413
|
title,
|
|
@@ -2422,8 +2420,8 @@ var MultistepHeaderTitled = ({
|
|
|
2422
2420
|
sx: {
|
|
2423
2421
|
display: "flex",
|
|
2424
2422
|
justifyContent: "space-between",
|
|
2425
|
-
paddingX: "
|
|
2426
|
-
paddingY: "
|
|
2423
|
+
paddingX: "5",
|
|
2424
|
+
paddingY: "4",
|
|
2427
2425
|
alignItems: "center"
|
|
2428
2426
|
},
|
|
2429
2427
|
children: [/* @__PURE__ */jsx7(Icon2, {
|
|
@@ -2449,8 +2447,8 @@ var MultistepHeaderLogo = ({
|
|
|
2449
2447
|
sx: {
|
|
2450
2448
|
justifyContent: "space-between",
|
|
2451
2449
|
alignItems: "center",
|
|
2452
|
-
paddingX: "
|
|
2453
|
-
paddingY: "
|
|
2450
|
+
paddingX: "5",
|
|
2451
|
+
paddingY: "4"
|
|
2454
2452
|
},
|
|
2455
2453
|
children: [/* @__PURE__ */jsx7(Image2, {
|
|
2456
2454
|
width: 115,
|
|
@@ -2492,7 +2490,7 @@ var MultistepNavigation = ({
|
|
|
2492
2490
|
return /* @__PURE__ */jsxs5(Flex5, {
|
|
2493
2491
|
sx: {
|
|
2494
2492
|
justifyContent: "space-between",
|
|
2495
|
-
marginX: "
|
|
2493
|
+
marginX: "5"
|
|
2496
2494
|
},
|
|
2497
2495
|
children: [/* @__PURE__ */jsxs5(Flex5, {
|
|
2498
2496
|
onClick: onBack,
|
|
@@ -133,7 +133,7 @@ var FormField = ({
|
|
|
133
133
|
sx: {
|
|
134
134
|
flexDirection: "column",
|
|
135
135
|
width: "100%",
|
|
136
|
-
gap: "
|
|
136
|
+
gap: "1",
|
|
137
137
|
...sx
|
|
138
138
|
},
|
|
139
139
|
css,
|
|
@@ -367,7 +367,7 @@ var FormFieldRadio = ({
|
|
|
367
367
|
},
|
|
368
368
|
children: [label && /* @__PURE__ */jsx11(Label2, {
|
|
369
369
|
sx: {
|
|
370
|
-
marginBottom: "
|
|
370
|
+
marginBottom: "1"
|
|
371
371
|
},
|
|
372
372
|
children: label
|
|
373
373
|
}), /* @__PURE__ */jsx11(Box3, {
|
|
@@ -488,8 +488,8 @@ var FormFieldTextarea = ({
|
|
|
488
488
|
};
|
|
489
489
|
|
|
490
490
|
// src/FormGroup.tsx
|
|
491
|
-
import * as React2 from "react";
|
|
492
491
|
import { Box as Box4, Flex as Flex3, Text } from "@ttoss/ui";
|
|
492
|
+
import * as React2 from "react";
|
|
493
493
|
import { jsx as jsx15, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
494
494
|
var FormGroupLevelsManagerContext = React2.createContext({
|
|
495
495
|
levelsLength: 1,
|
|
@@ -547,20 +547,20 @@ var FormGroupWrapper = ({
|
|
|
547
547
|
}, [level, registerChild]);
|
|
548
548
|
const childrenContainerSx = {
|
|
549
549
|
flexDirection: direction || "column",
|
|
550
|
-
gap: "
|
|
550
|
+
gap: "1",
|
|
551
551
|
width: "100%"
|
|
552
552
|
};
|
|
553
553
|
return /* @__PURE__ */jsxs3(Box4, {
|
|
554
554
|
"aria-level": level,
|
|
555
555
|
...boxProps,
|
|
556
556
|
sx: {
|
|
557
|
-
marginTop: level === 0 ? "none" : "
|
|
558
|
-
marginBottom: "
|
|
557
|
+
marginTop: level === 0 ? "none" : "4",
|
|
558
|
+
marginBottom: "4",
|
|
559
559
|
...boxProps.sx
|
|
560
560
|
},
|
|
561
561
|
children: [title && /* @__PURE__ */jsx15(Box4, {
|
|
562
562
|
sx: {
|
|
563
|
-
marginBottom: "
|
|
563
|
+
marginBottom: "2"
|
|
564
564
|
},
|
|
565
565
|
children: /* @__PURE__ */jsx15(Text, {
|
|
566
566
|
sx: {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { Controller, Form, FormErrorMessage, FormField, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldPatternFormat, FormFieldRadio, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver } from "./chunk-
|
|
2
|
+
import { Controller, Form, FormErrorMessage, FormField, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldPatternFormat, FormFieldRadio, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver } from "./chunk-C7MZJ6SO.js";
|
|
3
3
|
export { Controller, Form, FormErrorMessage, FormField, FormFieldCheckbox, FormFieldCreditCardNumber, FormFieldCurrencyInput, FormFieldInput, FormFieldNumericFormat, FormFieldPassword, FormFieldPatternFormat, FormFieldRadio, FormFieldSelect, FormFieldSwitch, FormFieldTextarea, FormGroup, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormGroup, useFormState, useWatch, yup, yupResolver };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/forms",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16.8.0",
|
|
42
|
-
"@ttoss/
|
|
43
|
-
"@ttoss/
|
|
42
|
+
"@ttoss/react-i18n": "^2.0.9",
|
|
43
|
+
"@ttoss/ui": "^5.1.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/jest": "^29.5.14",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"tsup": "^8.3.5",
|
|
52
52
|
"yup": "^1.6.1",
|
|
53
53
|
"@ttoss/config": "^1.35.2",
|
|
54
|
-
"@ttoss/i18n-cli": "^0.7.26",
|
|
55
|
-
"@ttoss/react-icons": "^0.4.9",
|
|
56
54
|
"@ttoss/react-i18n": "^2.0.9",
|
|
57
|
-
"@ttoss/
|
|
58
|
-
"@ttoss/test-utils": "^2.1.22"
|
|
55
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
56
|
+
"@ttoss/test-utils": "^2.1.22",
|
|
57
|
+
"@ttoss/i18n-cli": "^0.7.26",
|
|
58
|
+
"@ttoss/ui": "^5.1.1"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public",
|