{"version":3,"sources":["webpack:///./presentation/components/ribbons/legal-document/Heading.stylesheet.ts","webpack:///./presentation/components/ribbons/legal-document/Heading.ts","webpack:///./presentation/components/ribbons/legal-document/Paragraph.tsx","webpack:///./presentation/components/ribbons/legal-document/ListItem.tsx","webpack:///./presentation/components/ribbons/legal-document/Link.tsx","webpack:///src/presentation/components/ribbons/legal-document/ThematicBreak.tsx","webpack:///./presentation/components/ribbons/legal-document/renderers.ts","webpack:///./presentation/components/ribbons/legal-document/LegalDocument.tsx"],"names":["levelFunctions","headingXl","headingL","headingM","headingS","headingXs","headingXxs","headingXxl","PureHeading","children","level","colorway","styles","theme","useTheme","typography","isMinSm","isMinLg","useBreakpoints","levelFunction","index","useStyles","default","root","color","getTitleColor","fontFamily","display","fontWeight","useStylesheet","createElement","style","displayName","PureParagraph","getBodyColor","content","PureListItem","props","itemProps","PureLink","href","isExternalRoute","route","useIsExternalRoute","PureThematicBreak","height","longhand","width","createRenderer","Element","ownerProps","PureLegalDocument","id","loading","layout","document","name","themedRenderers","heading","Heading","paragraph","Paragraph","listItem","ListItem","thematicBreak","ThematicBreak","link","Link","renderers","Ribbon","type","Type","LEGAL_DOCUMENT","source","errorBoundary","visibilitySet"],"mappings":"sPAOA,MAAMA,EAAiB,CAErB,CACEC,IACAC,IACAC,IACAC,IACAC,IACAC,KAGF,CAACC,IAAYN,IAAWC,IAAUC,IAAUC,IAAUC,KAEtD,CAACE,IAAYA,IAAYN,IAAWC,IAAUC,IAAUC,MCT1D,MAAMI,EAAc,IAA+C,IAA9C,SAAEC,EAAF,MAAYC,EAAZ,SAAmBC,GAA2B,EACjE,MAAM,OAAEC,GDWK,KAAgE,IAA/D,MAAEF,EAAF,SAASC,GAAsD,EAC7E,MAAM,MAAEE,GAAUC,eACZ,WAAEC,GAAeF,GACjB,QAAEG,EAAF,QAAWC,GAAYC,cACvBC,EAAiBC,GAAkBpB,EAAeoB,GAAOV,EAAQ,KAEvE,OAAOW,YACL,CACEC,QAAS,CACPC,K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AAD,CAAeC,OAAQlB,EAAUa,UAAWX,WAOtDN,EAAkBnB,YAAc,gBAEjB0C,kBAAcC,YAAcxB","file":"pex-static/34/38.4752405f39bd2ba78453.chunk.js","sourcesContent":["import { useStyles } from '@team-griffin/stylr';\nimport { useBreakpoints } from '@ux/responsive';\nimport { useTheme, Colorway } from '@uds/theme-utils';\nimport { headingXxl, headingXl, headingL, headingM, headingS, headingXs, headingXxs } from '@ux/type-size';\nimport { getTitleColor } from 'presentation/utils/colorway';\n\n// cascading font sizes per heading level and breakpoint\nconst levelFunctions = [\n // xs\n [\n headingXl, // h1\n headingL, // h2\n headingM, // h3\n headingS, // h4\n headingXs, // h5\n headingXxs, // h6\n ],\n // sm\n [headingXxl, headingXl, headingL, headingM, headingS, headingXs],\n // lg\n [headingXxl, headingXxl, headingXl, headingL, headingM, headingS],\n];\n\nexport default ({ level, colorway }: { level: number; colorway: Colorway }) => {\n const { theme } = useTheme();\n const { typography } = theme;\n const { isMinSm, isMinLg } = useBreakpoints();\n const levelFunction = (index: number) => levelFunctions[index][level - 1]();\n\n return useStyles(\n {\n default: {\n root: {\n color: getTitleColor(theme, colorway),\n fontFamily: typography.display,\n fontWeight: 'normal',\n ...levelFunction(0),\n },\n },\n\n isMinSm: {\n root: {\n ...levelFunction(1),\n },\n },\n\n isMinLg: {\n root: {\n ...levelFunction(2),\n },\n },\n },\n [{ isMinSm }, { isMinLg }],\n );\n};\n","import { createElement, ReactNode } from 'react';\nimport { Colorway } from '@uds/theme-utils';\n\nimport useStylesheet from './Heading.stylesheet';\n\ninterface OuterProps {\n colorway: Colorway;\n level: number;\n children?: ReactNode;\n}\n\nconst PureHeading = ({ children, level, colorway }: OuterProps) => {\n const { styles } = useStylesheet({\n level,\n colorway,\n });\n\n return createElement(`h${level}`, { style: styles.root }, children);\n};\n\nPureHeading.displayName = 'LegalDocumentHeading';\n\n// const Heading = ({ colorway, ...props }: OuterProps) => PureHeading({ colorway, ...props });\n\nexport default PureHeading;\n","import { createElement, ReactNode } from 'react';\nimport { useStyles } from '@team-griffin/stylr';\nimport { useTheme, Colorway } from '@uds/theme-utils';\nimport { content } from '@ux/type-size';\nimport { getBodyColor } from 'presentation/utils/colorway';\n\ninterface OuterProps {\n colorway: Colorway;\n children?: ReactNode;\n}\n\nconst useStylesheet = ({ colorway }: { colorway: Colorway }) => {\n const { theme } = useTheme();\n const { typography } = theme;\n\n return useStyles({\n default: {\n root: {\n color: getBodyColor(theme, colorway),\n ...content(),\n fontFamily: typography.content,\n },\n },\n });\n};\n\nconst PureParagraph = ({ colorway, children }: OuterProps) => {\n const { styles } = useStylesheet({ colorway });\n\n return createElement('p', { style: styles.root }, children);\n};\n\nPureParagraph.displayName = 'LegalDocumentParagraph';\n\nexport default PureParagraph;\n","import { createElement, ReactNode } from 'react';\nimport { useStyles } from '@team-griffin/stylr';\nimport { content } from '@ux/type-size';\nimport { useTheme, Colorway } from '@uds/theme-utils';\nimport { getBodyColor } from 'presentation/utils/colorway';\n\ninterface OuterProps {\n colorway: Colorway;\n children?: ReactNode;\n [key: string]: any;\n}\n\nconst useStylesheet = ({ colorway }: { colorway: Colorway }) => {\n const { theme } = useTheme();\n const { typography } = theme;\n\n return useStyles({\n default: {\n root: {\n color: getBodyColor(theme, colorway),\n ...content(),\n fontFamily: typography.content,\n },\n },\n });\n};\n\nconst PureListItem = ({ colorway, children, ...props }: OuterProps) => {\n const { styles } = useStylesheet({ colorway });\n const itemProps = props['data-sourcepos'] ?? {};\n\n return createElement(\n 'li',\n {\n ...itemProps,\n style: styles.root,\n },\n children,\n );\n};\n\nPureListItem.displayName = 'LegalDocumentListItem';\n\nexport default PureListItem;\n","import React, { ReactNode } from 'react';\nimport { ReactRouterTextButton } from '@uds/react-router-adapter';\nimport { useIsExternalRoute } from 'domain/selectors/common';\n\ninterface OuterProps {\n href: string;\n children?: ReactNode;\n}\n\nconst PureLink = ({ href, children }: OuterProps) => {\n const [isExternalRoute, route] = useIsExternalRoute(href);\n\n return (\n \n {children}\n \n );\n};\n\nPureLink.displayName = 'LegalDocumentLink';\n\nexport default PureLink;\n","import { createElement, ReactNode } from 'react';\nimport longhand from '@team-griffin/css-longhand';\nimport { useStyles } from '@team-griffin/stylr';\nimport { useTheme, Colorway } from '@uds/theme-utils';\nimport { getBodyColor } from 'presentation/utils/colorway';\n\ninterface OuterProps {\n colorway: Colorway;\n children?: ReactNode;\n ['data-sourcepos']?: string;\n}\n\nconst useStylesheet = ({ colorway }: { colorway: Colorway }) => {\n const { theme } = useTheme();\n\n return useStyles({\n default: {\n root: {\n height: 0,\n ...longhand('border', {\n style: 'solid',\n width: 1,\n color: getBodyColor(theme, colorway),\n }),\n },\n },\n });\n};\n\nconst PureThematicBreak = ({ colorway, children, ...props }: OuterProps) => {\n const { styles } = useStylesheet({ colorway });\n const itemProps = props['data-sourcepos'] ?? {};\n\n return createElement(\n 'hr',\n {\n ...itemProps,\n style: styles.root,\n },\n children,\n );\n};\n\nPureThematicBreak.displayName = 'LegalDocumentThematicBreak';\n\nexport default PureThematicBreak;\n","import { createElement, ReactNode, ComponentType } from 'react';\nimport { Colorway } from '@uds/theme-utils';\n\nimport Heading from './Heading';\nimport Paragraph from './Paragraph';\nimport ListItem from './ListItem';\nimport Link from './Link';\nimport ThematicBreak from './ThematicBreak';\n\ninterface OuterProps {\n colorway?: Colorway;\n children?: ReactNode;\n href?: string;\n level?: number;\n}\n\nconst createRenderer = (Element: ComponentType, ownerProps: OuterProps) => {\n return createElement(Element, ownerProps);\n};\n\nexport default ({ colorway }: OuterProps) => ({\n heading: (props: OuterProps) =>\n createRenderer(Heading, {\n colorway,\n ...props,\n }),\n paragraph: (props: OuterProps) =>\n createRenderer(Paragraph, {\n colorway,\n ...props,\n }),\n listItem: (props: OuterProps) =>\n createRenderer(ListItem, {\n colorway,\n ...props,\n }),\n thematicBreak: (props: OuterProps) =>\n createRenderer(ThematicBreak, {\n colorway,\n ...props,\n }),\n link: (props: OuterProps) =>\n createRenderer(Link, {\n colorway,\n ...props,\n }),\n});\n","import React, { ComponentType } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport { Container } from '@uds/grid';\nimport PaddingBox from '@uds/padding-box';\nimport { RibbonProps, Type } from 'domain/constants/ribbons';\nimport visibilitySet from 'presentation/hocs/visibilitySet';\nimport errorBoundary from 'presentation/hocs/errorBoundary';\nimport Ribbon from 'components/ribbons/Ribbon';\n\nimport renderers from './renderers';\n\ninterface OuterProps extends RibbonProps {\n document: string;\n}\nconst PureLegalDocument = ({ id, colorway, loading, layout, document, name }: OuterProps) => {\n const themedRenderers = renderers({ colorway });\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nPureLegalDocument.displayName = 'LegalDocument';\n\nexport default errorBoundary(visibilitySet(PureLegalDocument)) as ComponentType;\n"],"sourceRoot":""}