{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/Accordion/index.tsx"],"names":["spacingStyle","marginLeft","marginRight","HeaderWrapper","props","Div","restProps","Header","width","height","textAlign","paddingTop","paddingBottom","HeaderLayout","padding","compose","css","display","justifyContent","alignItems","Body","shouldTranslateHeight","position","overflow","property","duration","DURATION","willChange","Panel","div","right","bottom","left","IconWrap","Plus","transition","AccordionHeader","span","lineHeight","fontWeight","fontSize","marginBottom","Accordion","mounted","state","componentWillReceiveProps","nextProps","isOpen","this","setState","shouldComponentUpdate","nextState","header","onToggle","children","componentDidMount","componentWillUnmount","updateOffsetHeight","ref","requestAnimationFrame","offsetHeight","Math","abs","render","borderWidth","noBorder","borderBottom","style","color","monochrome","black","onClick","disabled","appearance","Full","Bare","id","className","extraPadding","cursor","mediumGrey","upperCaseHeading","textTransform","headerFontSize","transform","isCompact","iconWidth","ToggleableField"],"mappings":"qLAMMA,EAAe,CAGnBC,WAAY,OACZC,YAAa,QAMTC,EAA6D,SAAAC,GACjE,IAAQ,oBACR,OACE,kBAAC,IAAOC,IAAG,eACLC,KAKJC,EAAS,YAAO,IAAQ,CAC5BC,MAAO,OACPC,OAAQ,OACRC,UAAW,OACXC,WAAY,EACZC,cAAe,IAQXC,EAAe,aAAO,SAACT,GACnB,EAAAU,QAAA,IAASC,EAAA,EAAAA,QAAS,uCAC1B,OACE,kBAAC,IAAOV,IAAG,eACLC,EAAS,CACbU,IAAKD,EAAQ,aACXE,QAAS,OACTC,eAAgB,gBAChBC,WAAY,UACTnB,UAYLoB,EAAO,aAAO,SAAChB,GACX,IAAAiB,EAAA,EAAAA,sBAAuBN,EAAA,EAAAA,QAAS,qDACxC,OACE,kBAAC,IAAOV,IAAG,eACLC,EAAS,CACbU,IAAKD,EAAQ,yBACXO,SAAU,WACVC,SAAU,UACPvB,GACCqB,GAAyB,eACxB,IAAiB,CAClBG,SAAU,SACVC,SAAaC,QACbC,YAAY,aAQlBC,EAAQ,IAAOC,IAAI,CACvBP,SAAU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A,GAAO,SAAKD,mBAAmBC,KAAOV,KAAK5C,MAAMkD,aAKvE,EA7FsB,CACO,cA+FhB,MAER,IAAMiC,EAAkB,YAAO7C,EAAW","file":"assets/7.chunk.5da1ccc81ff8bd81d858.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { styled, StyledProps } from '@glitz/react';\r\nimport { Plus24x24 } from 'Shared/Icons/Plus';\r\nimport * as style from 'Shared/Style';\r\nimport Button, { Appearance as ButtonAppearance } from 'Shared/Button';\r\n\r\nconst spacingStyle = {\r\n // When the accordion is stretched to full viewport width we want\r\n // to narrows the content like with page components\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n};\r\n\r\ntype HeaderWrapperType = React.HTMLAttributes & {\r\n \r\n};\r\nconst HeaderWrapper: React.StatelessComponent = props => {\r\n const { ...restProps } = props;\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst Header = styled(Button, {\r\n width: '100%',\r\n height: '100%',\r\n textAlign: 'left',\r\n paddingTop: 0,\r\n paddingBottom: 0\r\n});\r\n\r\ntype HeaderLayoutPropType = React.HTMLAttributes &\r\n StyledProps & {\r\n padding: boolean;\r\n };\r\n\r\nconst HeaderLayout = styled((props: HeaderLayoutPropType) => {\r\n const { padding, compose, ...restProps } = props;\r\n return (\r\n \r\n );\r\n});\r\n\r\nconst DURATION = 300;\r\n\r\ntype BodyStyleType = React.HTMLAttributes &\r\n StyledProps & {\r\n shouldTranslateHeight: boolean;\r\n };\r\nconst Body = styled((props: BodyStyleType) => {\r\n const { shouldTranslateHeight, compose, ...restProps } = props;\r\n return (\r\n \r\n );\r\n});\r\n\r\nconst Panel = styled.div({\r\n position: 'absolute',\r\n right: 0,\r\n bottom: 0,\r\n left: 0,\r\n});\r\n\r\nconst IconWrap = styled.div({\r\n display: 'inline-flex',\r\n})\r\n\r\nconst Plus = styled(Plus24x24, {\r\n transition: {\r\n property: 'transform',\r\n duration: 300,\r\n },\r\n});\r\n\r\nexport const AccordionHeader = styled.span({\r\n lineHeight: '130%',\r\n fontWeight: 500,\r\n fontSize: 20,\r\n marginBottom: 0,\r\n display: 'inline-block'\r\n});\r\n\r\ntype StateType = {\r\n height?: number;\r\n shouldTranslateHeight?: boolean;\r\n};\r\n\r\ntype PropType = {\r\n header: string | React.ReactNode;\r\n onToggle: () => void;\r\n isOpen?: boolean;\r\n className?: string;\r\n hasLinks?: boolean;\r\n extraPadding?: boolean;\r\n noBorder?: boolean;\r\n children?: string | React.ReactNode;\r\n upperCaseHeading?: boolean;\r\n headerFontSize?: string;\r\n iconWidth?: string;\r\n isCompact?: boolean;\r\n borderWidth?: number; \r\n fontWeight?: number;\r\n disabled?: boolean;\r\n /* css?: StyledDecorator | StyleOrStyleArray