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M,IAAM,YAAWD,KAC/EzC,EAAAA,cAAoBoC,EAAAA,gBAAmB,KAAMI,EAAKG,MAClD3C,EAAAA,cAAoBoC,EAAAA,gBAAmB,KAAMI,EAAK3C,MAClDG,EAAAA,cAAoBoC,EAAAA,gBAAmB,KAAMI,EAAKI,MAClD5C,EAAAA,cAAoBoC,EAAAA,gBAAmB,KACnCpC,EAAAA,cAAoB,IAAK,CAAEK,KAAMmC,EAAKK,IAAKjD,MAAOuC,EAAa,2CAA4CW,UAAU,IAAQC,EAAAA,EAAAA,GAAiBC,EAAAA,EAAAA,gBAC1JhD,EAAAA,cAAoBoC,EAAAA,YAAe,CAAE/B,KAAM2B,EAAeiB,IAAKrD,MAA0B,QAArB,EAAEoC,EAAekB,YAAI,QAAIf,EAAa,uCAAwC5B,GAAIyB,EAAezB,GAAIuC,UAAU,EAAMnD,UAAW,OAAQJ,WAAY,QAASH,MAAOY,EAAAA,cAAoBmD,EAAAA,EAAmB,SAAU,C","sources":["webpack://royal-geographical-society/./src/helpers/trackingClasses.ts","webpack://royal-geographical-society/./src/stories/Components/Buttons/Button/Button.tsx","webpack://royal-geographical-society/./src/stories/Widgets/Downloads/Downloads.styles.ts","webpack://royal-geographical-society/./src/stories/Widgets/Downloads/Downloads.tsx"],"sourcesContent":["export const ctaClasses = {\r\n buttons: 'cta-buttons-all',\r\n cards: 'cta-cards-all',\r\n homepageBanner: 'cta-hp-banner',\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonStyles } from './Button.styles';\r\nimport { ctaClasses } from '@helpers/trackingClasses';\r\nconst Button = ({ addon, addonPosition = 'right', theme, buttonSize = 'large', className, disabled, solidInvert = false, styleType, title, type = 'button', onClick, ...otherProps }) => {\r\n return (React.createElement(ButtonStyles.Button, { className: className, type: type, disabled: disabled, \"data-element-theme\": theme, \"data-element-size\": buttonSize, \"data-solid-invert\": solidInvert, styleType: styleType, iconPosition: addonPosition, onClick: onClick, ...otherProps }, renderSharedButton(title, addon, addonPosition)));\r\n};\r\nconst LinkButton = ({ addon, addonPosition = 'right', theme, buttonSize = 'large', className, href, solidInvert = false, styleType, target = '_self', title, id, ...otherProps }) => {\r\n return (React.createElement(ButtonStyles.Button, { as: \"a\", className: [className, ctaClasses.buttons].join(' '), href: href, target: target, \"data-element-theme\": theme, \"data-element-size\": buttonSize, \"data-solid-invert\": solidInvert, styleType: styleType, iconPosition: addonPosition, id: id, ...otherProps }, renderSharedButton(title, addon, addonPosition)));\r\n};\r\nconst FakeButton = ({ addon, addonPosition = 'right', theme, buttonSize = 'large', solidInvert = false, styleType, title, ...otherProps }) => {\r\n return (React.createElement(ButtonStyles.Button, { as: \"div\", \"data-element-theme\": theme, \"data-element-size\": buttonSize, \"data-solid-invert\": solidInvert, styleType: styleType, iconPosition: addonPosition, ...otherProps }, renderSharedButton(title, addon, addonPosition)));\r\n};\r\nexport { FakeButton, LinkButton, Button as default };\r\nfunction renderSharedButton(title, addon, addonPosition) {\r\n return (React.createElement(React.Fragment, null,\r\n addon && addonPosition === 'left' && (React.createElement(ButtonStyles.Icon, { position: addonPosition }, addon)),\r\n React.createElement(ButtonStyles.Text, null, title),\r\n addon && addonPosition === 'right' && (React.createElement(ButtonStyles.Icon, { position: addonPosition }, addon))));\r\n}\r\n","import { transition } from '@helpers/animate';\r\nimport brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport { Device, from, until } from '@helpers/media';\r\nimport { h2 } from '@helpers/typography';\r\nimport { LinkButton } from '@stories/Components/Buttons/Button/Button';\r\nimport SectionWrapper from '@stories/Components/Global/SectionWrapper/SectionWrapper';\r\nimport SectionWrapperStyles from '@stories/Components/Global/SectionWrapper/SectionWrapper.styles';\r\nimport styled from 'styled-components';\r\nconst Container = styled(SectionWrapper) `\r\n @media ${until(Device.TabletSmall)} {\r\n ${SectionWrapperStyles.SiteWide} {\r\n padding-left: 0;\r\n padding-right: 0;\r\n }\r\n\r\n &:last-child {\r\n ${SectionWrapperStyles.Inner} {\r\n padding-bottom: 0;\r\n }\r\n }\r\n }\r\n`;\r\nconst Inner = styled.div `\r\n padding: 30px ${fluid(36, 30)};\r\n background-color: ${brand.grey.grey91};\r\n`;\r\nconst Heading = styled.h2 `\r\n ${h2};\r\n`;\r\nconst DownloadGrid = styled.div `\r\n width: 100%;\r\n\r\n &[data-download-headings] {\r\n > *:not(:first-child) {\r\n display: none;\r\n }\r\n }\r\n\r\n @media ${from(Device.Tablet)} {\r\n display: grid;\r\n grid-template-columns: 53% 1fr 1fr 1fr;\r\n\r\n &[data-download-headings] {\r\n > *:not(:first-child) {\r\n display: block;\r\n }\r\n }\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n grid-template-columns: 63% 1fr 1fr 1fr;\r\n }\r\n`;\r\nconst DesktopHeading = styled.span `\r\n display: none;\r\n\r\n @media ${from(Device.Tablet)} {\r\n display: block;\r\n }\r\n`;\r\nconst MobileHeading = styled.span `\r\n display: block;\r\n\r\n @media ${from(Device.Tablet)} {\r\n display: none;\r\n }\r\n`;\r\nconst DownloadContent = styled.p `\r\n text-align: center;\r\n padding: 0 10px;\r\n\r\n @media ${from(Device.Tablet)} {\r\n padding: 0 16px;\r\n }\r\n\r\n &:first-child {\r\n text-align: left;\r\n }\r\n`;\r\nconst DownloadItem = styled(DownloadGrid) `\r\n align-items: center;\r\n margin-top: 10px;\r\n box-shadow: 0 0 6px rgba(0, 0, 0, 0.16);\r\n padding: 10px 0;\r\n background-color: ${brand.white};\r\n\r\n ${DownloadContent} {\r\n padding-top: 6px;\r\n padding-bottom: 6px;\r\n\r\n &:not(:first-child) {\r\n border-left: 1px solid ${brand.grey.grey44};\r\n }\r\n }\r\n\r\n a {\r\n ${transition('opacity')};\r\n\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n &:hover {\r\n opacity: 0.6;\r\n }\r\n }\r\n\r\n @media ${until(Device.Tablet)} {\r\n display: grid;\r\n grid-template-columns: repeat(3, 1fr);\r\n padding: 0;\r\n\r\n ${DownloadContent} {\r\n padding: 10px;\r\n\r\n &:first-child {\r\n grid-column: span 3;\r\n border-bottom: 1px solid ${brand.grey.grey44};\r\n }\r\n\r\n &:not(:first-child) {\r\n margin: 8px 0;\r\n }\r\n\r\n &:nth-child(2) {\r\n border-left: none;\r\n }\r\n }\r\n }\r\n`;\r\nexport const DownloadAll = styled(LinkButton) `\r\n margin-top: ${fluid(20, 24)};\r\n`;\r\nexport const DownloadsStyles = {\r\n Container,\r\n DesktopHeading,\r\n DownloadAll,\r\n DownloadContent,\r\n DownloadGrid,\r\n DownloadItem,\r\n Heading,\r\n Inner,\r\n MobileHeading,\r\n};\r\n","import { SystemIcon, getSvgFromSystem } from '@helpers/systemIcons';\r\nimport SvgHoverArrowDown from '@img/icons/hover-arrow-down.svg';\r\nimport React from 'react';\r\nimport { DownloadsStyles as S } from './Downloads.styles';\r\nconst Downloads = ({ downloadAllCta, files, heading, id, translations, }) => {\r\n return (React.createElement(S.Container, { id: id, innerWidth: \"reduced\", flush: \"top\" },\r\n React.createElement(S.Inner, null,\r\n React.createElement(S.Heading, null, heading),\r\n files && (React.createElement(React.Fragment, null,\r\n React.createElement(S.DownloadGrid, { \"data-download-headings\": true },\r\n React.createElement(S.DownloadContent, null,\r\n React.createElement(S.DesktopHeading, null, translations['translations.downloads.heading.fileName']),\r\n React.createElement(S.MobileHeading, null, translations['translations.downloads.heading.files'])),\r\n React.createElement(S.DownloadContent, null, translations['translations.downloads.heading.fileType']),\r\n React.createElement(S.DownloadContent, null, translations['translations.downloads.heading.size']),\r\n React.createElement(S.DownloadContent, null, translations['translations.downloads.heading.download'])),\r\n files.map((item, index) => (React.createElement(S.DownloadItem, { key: `download-${index}` },\r\n React.createElement(S.DownloadContent, null, item.name),\r\n React.createElement(S.DownloadContent, null, item.type),\r\n React.createElement(S.DownloadContent, null, item.size),\r\n React.createElement(S.DownloadContent, null,\r\n React.createElement(\"a\", { href: item.src, title: translations['translations.downloads.heading.download'], download: true }, getSvgFromSystem(SystemIcon.Download)))))))),\r\n React.createElement(S.DownloadAll, { href: downloadAllCta.url, title: downloadAllCta.text ?? translations['translations.global.btn.downloadAll'], id: downloadAllCta.id, download: true, styleType: \"text\", buttonSize: \"small\", addon: React.createElement(SvgHoverArrowDown, null) }))));\r\n};\r\nexport default Downloads;\r\n"],"names":["ctaClasses","buttons","cards","homepageBanner","Button","addon","addonPosition","theme","buttonSize","className","disabled","solidInvert","styleType","title","type","onClick","otherProps","React","ButtonStyles","iconPosition","renderSharedButton","LinkButton","href","target","id","as","join","FakeButton","position","Container","styled","SectionWrapper","until","Device","SectionWrapperStyles","Inner","fluid","brand","Heading","h2","DownloadGrid","from","DesktopHeading","MobileHeading","DownloadContent","DownloadItem","transition","DownloadsStyles","DownloadAll","downloadAllCta","files","heading","translations","S","innerWidth","flush","map","item","index","key","name","size","src","download","getSvgFromSystem","SystemIcon","url","text","SvgHoverArrowDown"],"sourceRoot":""}