@homefile/components-v2 2.40.14 → 2.40.16
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.
|
@@ -21,5 +21,5 @@ export const HomeCardWithRecipent = ({ address: { city, state, street, number =
|
|
|
21
21
|
component: (_jsx(HomeCardRecipients, { recipients: recipients, menu: menu, onEditClick: handleEditAccountType })),
|
|
22
22
|
},
|
|
23
23
|
];
|
|
24
|
-
return (_jsxs(Container, { variant: "launchpad", children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: !disabled, editImage: false }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), handleDeleteAccountType && handleSubmitAccountType && (_jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) }))] }));
|
|
24
|
+
return (_jsxs(Container, { variant: "launchpad", overflow: 'hidden', children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: !disabled, editImage: false }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), handleDeleteAccountType && handleSubmitAccountType && (_jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) }))] }));
|
|
25
25
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputI } from '../../interfaces';
|
|
2
|
-
export declare const PasswordInput: ({ errorMessage, id, handleChange, hasError, placeholder, value, ...props }: InputI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const PasswordInput: ({ errorMessage, id, handleChange, hasError, placeholder, value, showLabel, ...props }: InputI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,15 +12,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useState } from 'react';
|
|
14
14
|
import { InputGroup, Input, InputRightElement, IconButton, FormControl, Text, } from '@chakra-ui/react';
|
|
15
|
-
import { Eye, EyeOff } from '../../components';
|
|
15
|
+
import { Eye, EyeOff, LabeledField } from '../../components';
|
|
16
16
|
export const PasswordInput = (_a) => {
|
|
17
|
-
var { errorMessage, id, handleChange, hasError, placeholder, value = '' } = _a, props = __rest(_a, ["errorMessage", "id", "handleChange", "hasError", "placeholder", "value"]);
|
|
17
|
+
var { errorMessage, id, handleChange, hasError, placeholder, value = '', showLabel = true } = _a, props = __rest(_a, ["errorMessage", "id", "handleChange", "hasError", "placeholder", "value", "showLabel"]);
|
|
18
18
|
const [show, setShow] = useState(false);
|
|
19
19
|
const handleClick = () => setShow(!show);
|
|
20
20
|
const ViewIcon = show ? _jsx(Eye, { size: 20 }) : _jsx(EyeOff, { size: 20 });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const isFilled = String(value).trim().length > 0 && showLabel;
|
|
22
|
+
return (_jsxs(FormControl, { isInvalid: hasError, children: [_jsx(LabeledField, { label: placeholder, isFilled: isFilled, children: _jsxs(InputGroup, { children: [_jsx(Input, Object.assign({ autoCapitalize: "none", autoCorrect: "off", id: id, placeholder: placeholder, type: show ? 'text' : 'password', value: value, onChange: handleChange }, props)), _jsx(InputRightElement, { width: "3rem", children: _jsx(IconButton, { variant: "icon", "aria-label": "Enter password", icon: ViewIcon, onClick: handleClick, _hover: {
|
|
23
|
+
svg: {
|
|
24
|
+
fill: 'blue.3',
|
|
25
|
+
},
|
|
26
|
+
}, children: show ? 'Hide' : 'Show' }) })] }) }), hasError && _jsx(Text, { variant: "error", children: errorMessage })] }));
|
|
26
27
|
};
|