{"version":3,"file":"Base-auGUvgLn.js","sources":["../../Client/legacy/Components/FormGroups/Base.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport Skeleton from 'react-loading-skeleton';\r\n\r\nexport interface IFormGroupProps extends React.PropsWithChildren {\r\n /** The identifier for the form group. */\r\n id?: string;\r\n\r\n /** The human-readable label shown to the user for the form group. */\r\n label?: string | JSX.Element;\r\n\r\n /** An optional CSS class. */\r\n className?: string;\r\n\r\n /** An optional CSS class for the label element. */\r\n labelClassName?: string;\r\n\r\n /** An optional Id for the label element */\r\n labelId?: string;\r\n\r\n /** The tab index used in keyboard navigation. */\r\n tabIndex?: number;\r\n\r\n /** Optional, turns homeowners style on if set to true. */\r\n homeownersStyle?: boolean;\r\n\r\n /** Optional. Set to true to remove all styles. Defaults to false. */\r\n unstyled?: boolean;\r\n\r\n /** Optional. Set to true to display a skeleton loading bar instead of input fields. */\r\n loading?: boolean;\r\n}\r\n\r\nexport class FormGroup extends React.Component<IFormGroupProps, {}> {\r\n render() {\r\n return (\r\n <div\r\n id={this.props.id}\r\n className={`${this.props.unstyled ? '' : 'form-group-cp'} ${this.props.className || ''}`}\r\n >\r\n {this.props.label && (\r\n <label id={this.props.labelId ? this.props.labelId : ''} className={this.getLabelClassName()}>\r\n {this.props.label}\r\n </label>\r\n )}\r\n\r\n {this.props.loading ?\r\n <Skeleton className='form-group-skeleton-cp' />\r\n : this.props.children}\r\n </div>\r\n );\r\n }\r\n\r\n getLabelClassName(): string {\r\n if (this.props.unstyled) return '';\r\n\r\n return `${this.props.homeownersStyle ? 'input-field-label-md' : 'form-group-label-cp'} ${this.props.labelClassName || ''}`;\r\n }\r\n}\r\n"],"names":["FormGroup","React.Component","jsxs","jsx","Skeleton"],"mappings":"4FAgCa,MAAAA,UAAkBC,EAAAA,SAAqC,CAChE,QAAS,CAED,OAAAC,EAAA,KAAC,MAAA,CACG,GAAI,KAAK,MAAM,GACf,UAAW,GAAG,KAAK,MAAM,SAAW,GAAK,eAAe,IAAI,KAAK,MAAM,WAAa,EAAE,GAErF,SAAA,CAAA,KAAK,MAAM,OACRC,MAAC,SAAM,GAAI,KAAK,MAAM,QAAU,KAAK,MAAM,QAAU,GAAI,UAAW,KAAK,oBACpE,SAAA,KAAK,MAAM,MAChB,EAGH,KAAK,MAAM,QACRA,EAAAA,IAACC,GAAS,UAAU,wBAAyB,CAAA,EAC7C,KAAK,MAAM,QAAA,CAAA,CACnB,CAAA,CAIR,mBAA4B,CACpB,OAAA,KAAK,MAAM,SAAiB,GAEzB,GAAG,KAAK,MAAM,gBAAkB,uBAAyB,qBAAqB,IAAI,KAAK,MAAM,gBAAkB,EAAE,EAAA,CAEhI"}