brd-ui-kit 0.1.87 → 0.1.88

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("./utils-get-validation-state.cjs"),M=require("react"),d=require("./index.esm-ZdO9UZ3G.cjs"),T=require("./components-input-contact-input-contact.cjs"),V="+7 (000) 000-00-00",j=({name:e,rules:g,...s})=>{const[S,u]=M.useState(!1),{control:m,formState:{errors:c,touchedFields:f,isSubmitted:F},setValue:i,clearErrors:y}=d.useFormContext(),a=t=>t.replace(/\D/g,"").length>1,P=t=>{i(`${e}.type`,t),i(`${e}.value`,""),y()};return p.jsx(d.Controller,{name:`${e}.value`,rules:g,control:m,render:({field:{onChange:t,onBlur:h,value:n="",ref:l}})=>{const C=c[e].value?.message,r=typeof n=="string"?n:String(n??""),[_,q]=E.getValidationState(e,r,c,f,F,C),x=S||a(r);return p.jsx(T.InputContact,{...s,inputProps:{ref:l,onChange:t},inputPhoneProps:{mask:V,unmask:!1,lazy:!x,type:"tel",inputRef:l,onAccept:t,onFocus:o=>{u(!0),s.onFocus?.(o)},onBlur:o=>{a(o.currentTarget.value)||t(""),u(!1),h(),s.onBlur?.(o)}},onTypeChange:P,isValid:_,description:q,name:e,value:r})}})};exports.FormContactInput=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("./utils-get-validation-state.cjs"),M=require("react"),d=require("./index.esm-ZdO9UZ3G.cjs"),T=require("./components-input-contact-input-contact.cjs"),V="+7 (000) 000-00-00",j=({name:e,rules:g,...s})=>{const[S,u]=M.useState(!1),{control:m,formState:{errors:c,touchedFields:f,isSubmitted:F},setValue:i,clearErrors:y}=d.useFormContext(),a=t=>t.replace(/\D/g,"").length>1,P=t=>{i(`${e}.type`,t),i(`${e}.value`,""),y()};return p.jsx(d.Controller,{name:`${e}.value`,rules:g,control:m,render:({field:{onChange:t,onBlur:h,value:n="",ref:l}})=>{const C=c[e]?.value?.message,r=typeof n=="string"?n:String(n??""),[_,q]=E.getValidationState(e,r,c,f,F,C),x=S||a(r);return p.jsx(T.InputContact,{...s,inputProps:{ref:l,onChange:t},inputPhoneProps:{mask:V,unmask:!1,lazy:!x,type:"tel",inputRef:l,onAccept:t,onFocus:o=>{u(!0),s.onFocus?.(o)},onBlur:o=>{a(o.currentTarget.value)||t(""),u(!1),h(),s.onBlur?.(o)}},onTypeChange:P,isValid:_,description:q,name:e,value:r})}})};exports.FormContactInput=j;
2
2
  //# sourceMappingURL=components-forms-form-contact-input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-forms-form-contact-input.cjs","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError }).value?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":"sRAkBMA,EAAqB,qBAEdC,EAAmB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,KAAkB,CACnE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CACJ,QAAAC,EACA,UAAW,CAAE,OAAAC,EAAQ,cAAAC,EAAe,YAAAC,CAAA,EACpC,SAAAC,EACA,YAAAC,CAAA,EACEC,iBAAA,EAEEC,EAAyBC,GAAkBA,EAAM,QAAQ,MAAO,EAAE,EAAE,OAAS,EAE7EC,EAAgBC,GAAyB,CAC7CN,EAAS,GAAGV,CAAI,QAASgB,CAAO,EAChCN,EAAS,GAAGV,CAAI,SAAU,EAAE,EAC5BW,EAAA,CACF,EAEA,OACEM,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAM,GAAGlB,CAAI,SACb,MAAAC,EACA,QAAAK,EACA,OAAQ,CAAC,CAAE,MAAO,CAAE,SAAAa,EAAU,OAAAC,EAAQ,MAAAN,EAAQ,GAAI,IAAAO,CAAA,KAAY,CAC5D,MAAMC,EAAgBf,EAAOP,CAAI,EAA6B,OAAO,QAE/DuB,EAAa,OAAOT,GAAU,SAAWA,EAAQ,OAAOA,GAAS,EAAE,EACnE,CAACU,EAASC,CAAQ,EAAIC,EAAAA,mBAC1B1B,EACAuB,EACAhB,EACAC,EACAC,EACAa,CAAA,EAEIK,EAAiBxB,GAAaU,EAAsBU,CAAU,EAEpE,OACEN,EAAAA,IAACW,EAAAA,aAAA,CACE,GAAG1B,EACJ,WAAY,CACV,IAAAmB,EACA,SAAAF,CAAA,EAEF,gBAAiB,CACf,KAAMrB,EACN,OAAQ,GACR,KAAM,CAAC6B,EACP,KAAM,MACN,SAAUN,EACV,SAAUF,EACV,QAAUU,GAA8C,CACtDzB,EAAa,EAAI,EACjBF,EAAK,UAAU2B,CAAK,CACtB,EACA,OAASA,GAA8C,CAChDhB,EAAsBgB,EAAM,cAAc,KAAK,GAClDV,EAAS,EAAE,EAEbf,EAAa,EAAK,EAClBgB,EAAA,EACAlB,EAAK,SAAS2B,CAAK,CACrB,CAAA,EAEF,aAAAd,EACA,QAAAS,EACA,YAAaC,EACb,KAAAzB,EACA,MAAOuB,CAAA,CAAA,CAGb,CAAA,CAAA,CAGN"}
1
+ {"version":3,"file":"components-forms-form-contact-input.cjs","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError } | undefined)?.value\n ?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":"sRAkBMA,EAAqB,qBAEdC,EAAmB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,KAAkB,CACnE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CACJ,QAAAC,EACA,UAAW,CAAE,OAAAC,EAAQ,cAAAC,EAAe,YAAAC,CAAA,EACpC,SAAAC,EACA,YAAAC,CAAA,EACEC,iBAAA,EAEEC,EAAyBC,GAAkBA,EAAM,QAAQ,MAAO,EAAE,EAAE,OAAS,EAE7EC,EAAgBC,GAAyB,CAC7CN,EAAS,GAAGV,CAAI,QAASgB,CAAO,EAChCN,EAAS,GAAGV,CAAI,SAAU,EAAE,EAC5BW,EAAA,CACF,EAEA,OACEM,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAM,GAAGlB,CAAI,SACb,MAAAC,EACA,QAAAK,EACA,OAAQ,CAAC,CAAE,MAAO,CAAE,SAAAa,EAAU,OAAAC,EAAQ,MAAAN,EAAQ,GAAI,IAAAO,CAAA,KAAY,CAC5D,MAAMC,EAAgBf,EAAOP,CAAI,GAA0C,OACvE,QAEEuB,EAAa,OAAOT,GAAU,SAAWA,EAAQ,OAAOA,GAAS,EAAE,EACnE,CAACU,EAASC,CAAQ,EAAIC,EAAAA,mBAC1B1B,EACAuB,EACAhB,EACAC,EACAC,EACAa,CAAA,EAEIK,EAAiBxB,GAAaU,EAAsBU,CAAU,EAEpE,OACEN,EAAAA,IAACW,EAAAA,aAAA,CACE,GAAG1B,EACJ,WAAY,CACV,IAAAmB,EACA,SAAAF,CAAA,EAEF,gBAAiB,CACf,KAAMrB,EACN,OAAQ,GACR,KAAM,CAAC6B,EACP,KAAM,MACN,SAAUN,EACV,SAAUF,EACV,QAAUU,GAA8C,CACtDzB,EAAa,EAAI,EACjBF,EAAK,UAAU2B,CAAK,CACtB,EACA,OAASA,GAA8C,CAChDhB,EAAsBgB,EAAM,cAAc,KAAK,GAClDV,EAAS,EAAE,EAEbf,EAAa,EAAK,EAClBgB,EAAA,EACAlB,EAAK,SAAS2B,CAAK,CACrB,CAAA,EAEF,aAAAd,EACA,QAAAS,EACA,YAAaC,EACb,KAAAzB,EACA,MAAOuB,CAAA,CAAA,CAGb,CAAA,CAAA,CAGN"}
@@ -19,7 +19,7 @@ const I = "+7 (000) 000-00-00", R = ({ name: o, rules: m, ...s }) => {
19
19
  rules: m,
20
20
  control: f,
21
21
  render: ({ field: { onChange: t, onBlur: P, value: e = "", ref: l } }) => {
22
- const y = c[o].value?.message, n = typeof e == "string" ? e : String(e ?? ""), [E, C] = T(
22
+ const y = c[o]?.value?.message, n = typeof e == "string" ? e : String(e ?? ""), [E, C] = T(
23
23
  o,
24
24
  n,
25
25
  c,
@@ -1 +1 @@
1
- {"version":3,"file":"components-forms-form-contact-input.js","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError }).value?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,sBAEdC,IAAmB,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,GAAGC,QAAkB;AACnE,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C;AAAA,IACJ,SAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,eAAAC,GAAe,aAAAC,EAAA;AAAA,IACpC,UAAAC;AAAA,IACA,aAAAC;AAAA,EAAA,IACEC,EAAA,GAEEC,IAAwB,CAACC,MAAkBA,EAAM,QAAQ,OAAO,EAAE,EAAE,SAAS,GAE7EC,IAAe,CAACC,MAAyB;AAC7C,IAAAN,EAAS,GAAGV,CAAI,SAASgB,CAAO,GAChCN,EAAS,GAAGV,CAAI,UAAU,EAAE,GAC5BW,EAAA;AAAA,EACF;AAEA,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAM,GAAGlB,CAAI;AAAA,MACb,OAAAC;AAAA,MACA,SAAAK;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAa,GAAU,QAAAC,GAAQ,OAAAN,IAAQ,IAAI,KAAAO,EAAA,QAAY;AAC5D,cAAMC,IAAgBf,EAAOP,CAAI,EAA6B,OAAO,SAE/DuB,IAAa,OAAOT,KAAU,WAAWA,IAAQ,OAAOA,KAAS,EAAE,GACnE,CAACU,GAASC,CAAQ,IAAIC;AAAA,UAC1B1B;AAAA,UACAuB;AAAA,UACAhB;AAAA,UACAC;AAAA,UACAC;AAAA,UACAa;AAAA,QAAA,GAEIK,IAAiBxB,KAAaU,EAAsBU,CAAU;AAEpE,eACE,gBAAAN;AAAA,UAACW;AAAA,UAAA;AAAA,YACE,GAAG1B;AAAA,YACJ,YAAY;AAAA,cACV,KAAAmB;AAAA,cACA,UAAAF;AAAA,YAAA;AAAA,YAEF,iBAAiB;AAAA,cACf,MAAMrB;AAAA,cACN,QAAQ;AAAA,cACR,MAAM,CAAC6B;AAAA,cACP,MAAM;AAAA,cACN,UAAUN;AAAA,cACV,UAAUF;AAAA,cACV,SAAS,CAACU,MAA8C;AACtD,gBAAAzB,EAAa,EAAI,GACjBF,EAAK,UAAU2B,CAAK;AAAA,cACtB;AAAA,cACA,QAAQ,CAACA,MAA8C;AACrD,gBAAKhB,EAAsBgB,EAAM,cAAc,KAAK,KAClDV,EAAS,EAAE,GAEbf,EAAa,EAAK,GAClBgB,EAAA,GACAlB,EAAK,SAAS2B,CAAK;AAAA,cACrB;AAAA,YAAA;AAAA,YAEF,cAAAd;AAAA,YACA,SAAAS;AAAA,YACA,aAAaC;AAAA,YACb,MAAAzB;AAAA,YACA,OAAOuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAGb;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"components-forms-form-contact-input.js","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError } | undefined)?.value\n ?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,sBAEdC,IAAmB,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,GAAGC,QAAkB;AACnE,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C;AAAA,IACJ,SAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,eAAAC,GAAe,aAAAC,EAAA;AAAA,IACpC,UAAAC;AAAA,IACA,aAAAC;AAAA,EAAA,IACEC,EAAA,GAEEC,IAAwB,CAACC,MAAkBA,EAAM,QAAQ,OAAO,EAAE,EAAE,SAAS,GAE7EC,IAAe,CAACC,MAAyB;AAC7C,IAAAN,EAAS,GAAGV,CAAI,SAASgB,CAAO,GAChCN,EAAS,GAAGV,CAAI,UAAU,EAAE,GAC5BW,EAAA;AAAA,EACF;AAEA,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAM,GAAGlB,CAAI;AAAA,MACb,OAAAC;AAAA,MACA,SAAAK;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAa,GAAU,QAAAC,GAAQ,OAAAN,IAAQ,IAAI,KAAAO,EAAA,QAAY;AAC5D,cAAMC,IAAgBf,EAAOP,CAAI,GAA0C,OACvE,SAEEuB,IAAa,OAAOT,KAAU,WAAWA,IAAQ,OAAOA,KAAS,EAAE,GACnE,CAACU,GAASC,CAAQ,IAAIC;AAAA,UAC1B1B;AAAA,UACAuB;AAAA,UACAhB;AAAA,UACAC;AAAA,UACAC;AAAA,UACAa;AAAA,QAAA,GAEIK,IAAiBxB,KAAaU,EAAsBU,CAAU;AAEpE,eACE,gBAAAN;AAAA,UAACW;AAAA,UAAA;AAAA,YACE,GAAG1B;AAAA,YACJ,YAAY;AAAA,cACV,KAAAmB;AAAA,cACA,UAAAF;AAAA,YAAA;AAAA,YAEF,iBAAiB;AAAA,cACf,MAAMrB;AAAA,cACN,QAAQ;AAAA,cACR,MAAM,CAAC6B;AAAA,cACP,MAAM;AAAA,cACN,UAAUN;AAAA,cACV,UAAUF;AAAA,cACV,SAAS,CAACU,MAA8C;AACtD,gBAAAzB,EAAa,EAAI,GACjBF,EAAK,UAAU2B,CAAK;AAAA,cACtB;AAAA,cACA,QAAQ,CAACA,MAA8C;AACrD,gBAAKhB,EAAsBgB,EAAM,cAAc,KAAK,KAClDV,EAAS,EAAE,GAEbf,EAAa,EAAK,GAClBgB,EAAA,GACAlB,EAAK,SAAS2B,CAAK;AAAA,cACrB;AAAA,YAAA;AAAA,YAEF,cAAAd;AAAA,YACA,SAAAS;AAAA,YACA,aAAaC;AAAA,YACb,MAAAzB;AAAA,YACA,OAAOuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAGb;AAAA,IAAA;AAAA,EAAA;AAGN;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brd-ui-kit",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.cjs",