@consumidor-positivo/aurora 0.0.93 → 0.0.94
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/form/PasswordField/hook.tsx","../../../lib/components/form/PasswordField/index.tsx"],"sourcesContent":["import { useState } from 'react'\n\nexport const usePasswordField = () => {\n const [showPassword, setShowPassword] = useState<boolean>(false)\n const fieldType = showPassword ? 'text' : 'password'\n const textButton = showPassword ? 'ocultar' : 'mostrar'\n\n function changeVisibility() {\n setShowPassword((prevState) => !prevState)\n }\n\n return {\n fieldType,\n textButton,\n changeVisibility,\n }\n}\n","import Field from '../Field'\nimport { usePasswordField } from './hook'\nimport './styles.scss'\n\ntype PasswordFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {\n type?: 'password'\n showOptionalLabel?: boolean\n requiredInput?: boolean\n success?: boolean\n error?: boolean\n errorMessage?: string\n label?: string\n inputRef?: React.RefObject<HTMLInputElement>\n}\n\nexport const PasswordField = ({\n showOptionalLabel,\n requiredInput,\n success,\n error,\n errorMessage,\n label,\n inputRef,\n id,\n disabled,\n style,\n className,\n ...props\n}: PasswordFieldProps) => {\n const { fieldType, textButton, changeVisibility } = usePasswordField()\n\n return (\n <Field.Root\n style={style}\n customclass={className}\n success={success}\n error={error}\n disabled={disabled}>\n <Field.Label\n text={label}\n id={id}\n required={requiredInput}\n showOptionalLabel={showOptionalLabel}\n success={success}\n error={error}\n disabled={disabled}\n />\n <div className=\"au-password-field__container\">\n <Field.Input\n customclass=\"au-password-field__input\"\n type={fieldType}\n id={id}\n inputRef={inputRef}\n disabled={disabled}\n {...props}\n />\n <button\n className=\"au-password-field__btn\"\n onClick={changeVisibility}\n disabled={disabled}>\n {textButton}\n </button>\n </div>\n <Field.ErrorMessage hasError={!!error} message={errorMessage} />\n </Field.Root>\n )\n}\n"],"names":[],"mappings":";;;AAEO,MAAM,mB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.es.js","sources":["../../../lib/components/form/PasswordField/hook.tsx","../../../lib/components/form/PasswordField/index.tsx"],"sourcesContent":["import { useState } from 'react'\n\nexport const usePasswordField = () => {\n const [showPassword, setShowPassword] = useState<boolean>(false)\n const fieldType = showPassword ? 'text' : 'password'\n const textButton = showPassword ? 'ocultar' : 'mostrar'\n\n function changeVisibility() {\n setShowPassword((prevState) => !prevState)\n }\n\n return {\n fieldType,\n textButton,\n changeVisibility,\n }\n}\n","import Field from '../Field'\nimport { usePasswordField } from './hook'\nimport './styles.scss'\n\ntype PasswordFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {\n type?: 'password'\n showOptionalLabel?: boolean\n requiredInput?: boolean\n success?: boolean\n error?: boolean\n errorMessage?: string\n label?: string\n inputRef?: React.RefObject<HTMLInputElement>\n}\n\nexport const PasswordField = ({\n showOptionalLabel,\n requiredInput,\n success,\n error,\n errorMessage,\n label,\n inputRef,\n id,\n disabled,\n style,\n className,\n ...props\n}: PasswordFieldProps) => {\n const { fieldType, textButton, changeVisibility } = usePasswordField()\n\n return (\n <Field.Root\n style={style}\n customclass={className}\n success={success}\n error={error}\n disabled={disabled}>\n <Field.Label\n text={label}\n id={id}\n required={requiredInput}\n showOptionalLabel={showOptionalLabel}\n success={success}\n error={error}\n disabled={disabled}\n />\n <div className=\"au-password-field__container\">\n <Field.Input\n customclass=\"au-password-field__input\"\n type={fieldType}\n id={id}\n inputRef={inputRef}\n disabled={disabled}\n {...props}\n />\n <button\n className=\"au-password-field__btn\"\n onClick={changeVisibility}\n disabled={disabled}\n\t\t\t\t\ttype=\"button\">\n {textButton}\n </button>\n </div>\n <Field.ErrorMessage hasError={!!error} message={errorMessage} />\n </Field.Root>\n )\n}\n"],"names":[],"mappings":";;;AAEO,MAAM,mBAAmB,MAAM;AACpC,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,KAAK;AACzD,QAAA,YAAY,eAAe,SAAS;AACpC,QAAA,aAAa,eAAe,YAAY;AAE9C,WAAS,mBA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