@axos-web-dev/shared-components 0.0.52 → 0.0.54

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.
@@ -6,5 +6,7 @@ export type ApplicationStartInputs = {
6
6
  email: string;
7
7
  phone: string;
8
8
  checkbox__c: string;
9
+ Send_SMS__c: boolean;
10
+ DoNotCall: boolean;
9
11
  };
10
12
  export declare const ApplicationStart: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -57,7 +57,7 @@ const ApplicationStart = ({
57
57
  }
58
58
  return removeDashes;
59
59
  }),
60
- checkbox__c: z.boolean().transform((val) => val.toString())
60
+ checkbox__c: z.boolean()
61
61
  });
62
62
  const methods = useForm({
63
63
  resolver: zodResolver(schema.merge(SalesforceSchema), {
@@ -74,7 +74,12 @@ const ApplicationStart = ({
74
74
  formState: { errors, isValid, isSubmitting }
75
75
  } = methods;
76
76
  const submitForm = async (data) => {
77
- await onSubmit(data);
77
+ const processData = {
78
+ ...data,
79
+ Send_SMS__c: data.checkbox__c ? true : false,
80
+ DoNotCall: data.checkbox__c ? false : true
81
+ };
82
+ await onSubmit(processData);
78
83
  };
79
84
  const variant = getVariant(fullVariant);
80
85
  return /* @__PURE__ */ jsx(
@@ -155,12 +160,8 @@ const ApplicationStart = ({
155
160
  Checkbox,
156
161
  {
157
162
  id: "checkbox__c",
158
- ...register("checkbox__c", {
159
- required: true,
160
- maxLength: 12
161
- }),
163
+ ...register("checkbox__c"),
162
164
  sizes: "medium",
163
- required: true,
164
165
  error: !!errors.checkbox__c,
165
166
  helperText: errors.checkbox__c?.message,
166
167
  variant,
@@ -56,7 +56,7 @@
56
56
  }
57
57
  ._13pdpuj3:active {
58
58
  background-color: var(--_1073cm85);
59
- color: var(--_1073cm85);
59
+ color: var(--_1073cm86);
60
60
  }
61
61
  ._13pdpuj4 {
62
62
  background: #D4D4D4;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "0.0.52",
4
+ "version": "0.0.54",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",