{"version":3,"sources":["webpack:///./presentation/components/Shortcode/Alt.tsx","webpack:///./presentation/components/Shortcode/Bold.tsx","webpack:///./presentation/components/Shortcode/Italic.tsx","webpack:///./presentation/components/Shortcode/Link.tsx","webpack:///./presentation/components/Shortcode/Text.tsx","webpack:///src/presentation/components/Shortcode/Tooltip.tsx","webpack:///./presentation/components/Shortcode/PendingShortcode.tsx","webpack:///./presentation/components/Shortcode/Shortcode.tsx","webpack:///./presentation/components/Shortcode/index.ts","webpack:///./domain/constants/alignment.ts","webpack:///./presentation/components/ribbons/table/Cell.tsx","webpack:///./presentation/components/ribbons/table/Cell.stylesheet.ts","webpack:///./presentation/components/ribbons/table/WideCell.tsx","webpack:///src/presentation/components/ribbons/table/WideCell.stylesheet.ts","webpack:///./presentation/components/ribbons/table/WideTableRow.tsx","webpack:///src/presentation/components/ribbons/table/WideTableRow.stylesheet.ts","webpack:///./presentation/components/ribbons/table/WideTable.tsx","webpack:///src/presentation/components/ribbons/table/WideTable.stylesheet.ts"],"names":["getColor","theme","against","Against","LIGHT","NEUTRAL","palette","primary","DARK","tertiary","Alt","RecursiveShortcode","elements","rest","useTheme","style","color","displayName","Bold","fontWeight","fontStyle","Link","contentType","attributes","isExternalRoute","route","useIsExternalRoute","goto","href","id","analyticskey","size","TextButtonSize","INHERIT","rel","target","newTab","formatText","text","newline","values","formattedText","replace","_","match","replaceValues","split","join","escapeShortCodes","string","reduce","prev","cur","i","nl2br","Text","ReactTooltip","lazy","TooltipShortcode","isMinLg","useBreakpoints","eventToggle","undefined","padding","cssTheme","CallToAction","fallback","tagName","useDefaultStyles","content","maxWidth","randomWidth","Math","floor","random","PendingShortcode","code","display","width","lines","Glyph","Sup","List","OrderedList","ListItem","TickListItem","ProductPrice","PhoneNumber","map","element","index","Shortcode","JSON","stringify","props","String","getAgainst","type","name","glyph","Italic","Tooltip","ShortcodeWrapper","Alignment","PureCell","colorway","cell","styles","useStyles","default","root","textAlign","centered","layout","alignment","CENTER","useStylesheet","Boolean","body","PureWideCell","first","last","spacing","cssSides","Side","gu2px","firstChild","paddingLeft","lastChild","paddingRight","firstChildLg","lastChildLg","Cell","PureWideTableRow","row","isOdd","isLast","tbodyRow","longhand","opacify","backgroundColor","grey12","flex","flexBasis","paddingBottom","borderBottomWidth","isMinLgAndLast","WideCell","j","length","n","PureWideTable","head","hBaseline","curvature","table","grey02","theadRow","tCellCenter","paddingTop","depth","WideTableRow"],"mappings":"gHAKA,MAAMA,EAAW,CAACC,EAAcC,KAC9B,OAAQA,GACN,KAAKC,IAAQC,MAEb,KAAKD,IAAQE,QACX,OAAOJ,EAAMK,QAAQC,QACvB,KAAKJ,IAAQK,KACX,OAAOP,EAAMK,QAAQG,SACvB,QACE,MAAO,YAGPC,EAAM,IAAiF,IAAhF,mBAAEC,EAAF,SAAsBC,EAAtB,QAAgCV,KAAYW,GAAoC,EAC3F,MAAM,MAAEZ,GAAUa,cAClB,OACE,sBACEC,MAAO,CACLC,MAAOhB,EAASC,EAAOC,IAF3B,SAKGS,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,EAAUV,QAASA,KAAaW,IAAW,QAKrGH,EAAIO,YAAc,MAEHP,QC5Bf,MAAMQ,EAAO,QAAC,SAAEN,EAAF,mBAAYD,KAAuBE,GAApC,SACX,sBAAME,MAAO,CAAEI,WAAY,QAA3B,SACGR,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,KAAcC,IAAW,QAIjFK,EAAKD,YAAc,OAEJC,QCRf,MAAMA,EAAO,QAAC,SAAEN,EAAF,mBAAYD,KAAuBE,GAApC,SACX,sBAAME,MAAO,CAAEK,UAAW,UAA1B,SACGT,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,KAAcC,IAAW,QAIjFK,EAAKD,YAAc,OAEJC,Q,wBCLf,MAAMG,EAAO,IAA0G,IAAzG,mBAAEV,EAAF,SAAsBC,EAAtB,YAAgCU,EAAhC,WAA6CC,EAA7C,QAAyDrB,KAAYW,GAAoC,EACrH,MAAOW,EAAiBC,GA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AAMiG,EAa7CC,EAAgB,IAAyD,IAAxD,SAAE9C,EAAF,KAAY+C,EAAZ,KAAkBlC,EAAlB,UAAwBmC,EAAY,GAAoB,EAC7E,MAAM,MAAExJ,GAAUa,eACZ,OAAE6F,GCnBK,KAAkE,IAA/D1G,OAAO,8BAAoByJ,IAAoC,EAC/E,MAAM,QAAE/F,GAAYC,cACpB,OAAOgD,YACL,CACEC,QAAS,CACP8C,MAAO,CACLf,gBADK,OAEL5H,MAAOV,EAAQsJ,QAGjBC,SAAU,CACRhF,QADQ,UAEL8C,YAAS,UAAWC,IAAZ,EAAoBC,YAAM,EAF7B,OAGLa,YAAS,eAAgB,CAC1B5D,MAD0B,EAE1B9D,MAAOV,EAFmB,UAG1BS,MAAO,WAIX2F,KAAM,CACJoC,KADI,EAEJC,UAAW,GAGbe,YAAa,CACX/C,UAAW,WAIfpD,QAAS,CACPkG,SAAU,CACRE,WAAYlC,YAAM,EAAGH,MAI3B,CAAC,CAAE/D,WAAW,CAAE+F,gBDjBCtC,CAAc,CAC/BnH,UAEF,OACE,sBAAKc,MAAO4F,EAAOgD,MAAnB,UACE,qBAAK5I,MAAO4F,EAAOkD,SAAnB,SACuBL,EADvB,0BAEI,qBAAKzI,MAAO4F,EAAOD,KAAnB,SACE,cAAC,IAAD,CAAWsD,MAAOP,EAAlB,SACE,cAACN,EAAD,CAAU1C,SAAUA,EAAUC,KAAMA,EAAcc,MAAa,IAANnE,EAASoE,KAAMpE,IAAMmG,EAAKH,OAAS,GAA7ChG,MAFrBA,UAFlC,KASoBiE,EAVtB,0BAWI,cAAC2C,EAAD,CAAcxD,SAAUA,EAAU6B,IAAKA,EAAKC,MAAOA,EAAMlF,GAAImF,OAAQA,EAAOnF,EAAGiE,EAAK+B,SAAchG,UAXtG,OAiBJkG,EAActI,YAAc,YAEbsI","file":"pex-static/34/75.bd5b7690cbdd37b5ca7d.chunk.js","sourcesContent":["import React from 'react';\nimport { Theme, useTheme, Colorway as Against } from '@uds/theme-utils';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst getColor = (theme: Theme, against: Against | undefined) => {\n switch (against) {\n case Against.LIGHT:\n return theme.palette.primary;\n case Against.NEUTRAL:\n return theme.palette.primary;\n case Against.DARK:\n return theme.palette.tertiary;\n default:\n return 'inherit';\n }\n};\nconst Alt = ({ RecursiveShortcode, elements, against, ...rest }: RecursiveShortcodeProps) => {\n const { theme } = useTheme();\n return (\n \n {RecursiveShortcode ? : null}\n \n );\n};\n\nAlt.displayName = 'Alt';\n\nexport default Alt;\n","import React from 'react';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n {RecursiveShortcode ? : null}\n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;\n","import React from 'react';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n {RecursiveShortcode ? : null}\n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;\n","import React from 'react';\nimport { ReactRouterTextButton } from '@uds/react-router-adapter';\nimport { Size as TextButtonSize } from '@uds/text-button';\nimport { useIsExternalRoute } from 'domain/selectors/common';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Link = ({ RecursiveShortcode, elements, contentType, attributes, against, ...rest }: RecursiveShortcodeProps) => {\n const [isExternalRoute, route] = useIsExternalRoute(attributes?.goto);\n return (\n \n {/* @ts-ignore: error when upgrading to @ux/config */}\n \n \n );\n};\n\nLink.displayName = 'Link';\n\nexport default Link;\n","import React, { Fragment } from 'react';\n\nconst escapeShortCodes = (text: string) => {\n if (typeof text !== 'string') {\n return null;\n }\n const replaceA = (text ?? '').split('[!').join('[');\n const replaceB = replaceA.split('!/]').join('/]');\n const replaceC = replaceB.split('[/!').join('[/');\n return replaceC;\n // using split/join because for some reason replaceAll fails for backstop\n // tests but not for backstop storybook?\n // if anyone can tell me why, I'd appreciate it.\n // return (text ?? '').replaceAll('[!', '[').replaceAll('!/]', '/]')\n // .replaceAll('[/!', '[/');\n};\n\nconst replaceValues = (text: string, values?: Record) => {\n if (values == null) {\n return text;\n }\n return text.replace(/{(?[^{]*)}/g, (_, match) => {\n return values[match];\n });\n};\n\nconst nl2br = (string: string) =>\n (string ?? '')\n .split('\\n')\n // @ts-ignore typescript cant figure typing out\n // eslint-disable-next-line react/no-array-index-key\n .reduce((prev, cur, i) => [prev,
, cur]);\n\nconst formatText = (text: string, newline: boolean | Element | undefined, values?: Record) => {\n const formattedText = replaceValues(escapeShortCodes(text) ?? '', values);\n if (newline === false) {\n return formattedText;\n }\n return nl2br(formattedText);\n};\n\ninterface OuterProps {\n text?: string | undefined;\n nl2br?: boolean | Element;\n values?: Record;\n}\nconst Text = ({ text, nl2br, values }: OuterProps) => {formatText(text ?? '', nl2br, values)};\n\nText.displayName = 'Text';\n\nexport default Text;\n","import React, { lazy, Suspense } from 'react';\nimport TextButton, { Size as TextButtonSize } from '@uds/text-button';\nimport { cssTheme } from '@uds/theme-utils';\nimport { useBreakpoints } from '@uds/responsive';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\n/*\n React-Tooltip is a heavy dependency therefore we asynchronously load it in\n and gracefully decorate the functionality in once it has loaded\n*/\nconst ReactTooltip = lazy(\n () =>\n import(\n /* webpackChunkName: \"react-tooltip-lite\" */\n 'react-tooltip-lite'\n ),\n);\n\nconst TooltipShortcode = ({ RecursiveShortcode, attributes, elements }: RecursiveShortcodeProps) => {\n const { isMinLg } = useBreakpoints();\n const eventToggle = isMinLg ? undefined : 'onClick';\n const padding = cssTheme.gu2;\n const CallToAction = {attributes?.label};\n\n return (\n \n {/* @ts-ignore children doesnt exist */}\n \n {/* @ts-ignore: error when upgrading to @ux/config */}\n \n \n }\n >\n {CallToAction}\n \n \n );\n};\n\nTooltipShortcode.displayName = 'TooltipShortcode';\n\nexport default TooltipShortcode;\n","import React from 'react';\nimport { Shimmer } from '@uds/penders';\n\nimport { ShortcodeProps } from './';\n\nexport interface OuterProps {\n code?: ShortcodeProps;\n}\n\n// random % width for shimmer betwen 50% and 95%\nconst randomWidth = () => Math.floor(Math.random() * (95 - 50) + 50);\n\nconst PendingShortcode = ({ code }: OuterProps) => (\n \n \n \n);\n\nPendingShortcode.displayName = 'PendingShortcode';\n\nexport default PendingShortcode;\n","import React, { Suspense, lazy, ReactNode } from 'react';\nimport { getAgainst } from 'presentation/utils/colorway';\nimport { Layout } from 'domain/constants/layout';\n/*\n These shortcodes should not be lazy loaded in as they are already in the\n main bundle and it causes a unnecessary shimmer which makes the page feel\n less responsive\n*/\nimport { Colorway as Against } from '@uds/theme-utils';\nimport { IconName } from '@uds/glyphs';\n\nimport Alt from './Alt';\nimport Bold from './Bold';\nimport Italic from './Italic';\nimport Link from './Link';\nimport Text from './Text';\nimport Tooltip from './Tooltip';\nimport PendingShortcode from './PendingShortcode';\n\nimport { ShortcodeProps } from '.';\n\nconst Glyph = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-glyph\" */\n './Glyph'\n ),\n);\n\nconst Sup = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-sup\" */\n './Sup'\n ),\n);\n\nconst List = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-list\" */\n './List'\n ),\n);\n\nconst OrderedList = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-ordered-list\" */\n './OrderedList'\n ),\n);\n\nconst ListItem = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-list-item\" */\n './ListItem'\n ),\n);\n\nconst TickListItem = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-tick-list-item\" */\n './TickListItem'\n ),\n);\n\nconst ProductPrice = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-product-price\" */\n './ProductPrice'\n ),\n);\n\nconst PhoneNumber = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-phone-number\" */\n './PhoneNumber'\n ),\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare const i: number;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare const element: ShortcodeProps;\n\nexport interface ShortcodeAttributesProps {\n glyph: string;\n use?: number;\n number?: number;\n RecursiveShortcode: (props: RecursiveShortcodeProps) => JSX.Element;\n analyticskey?: string;\n goto?: string;\n label?: ReactNode;\n icon: IconName;\n prices?: Array<{\n gross: number;\n net: number;\n raw: number;\n tax: number;\n }>;\n inctax?: string;\n style?: string;\n rel?: string;\n newTab?: string;\n}\nexport interface RecursiveShortcodeProps {\n elements?: Array;\n RecursiveShortcode?: (props: RecursiveShortcodeProps) => JSX.Element;\n type?: string;\n name?: string;\n layout?: Layout;\n against?: Against;\n attributes?: ShortcodeAttributesProps | undefined;\n nl2br?: boolean;\n rest?: {\n [key: string]: any;\n };\n [key: string]: any;\n}\n\nconst RecursiveShortcode = ({ elements = [], ...rest }: RecursiveShortcodeProps) => (\n <>\n {elements.map((element, index) => (\n // Temporarily allow index as key waiting for BE to add ids\n // eslint-disable-next-line react/no-array-index-key\n \n ))}\n >\n);\n\nexport interface ShortcodeOuterProps {\n against?: Against;\n code: RecursiveShortcodeProps;\n type?: string;\n name?: string;\n values?: Record;\n}\n\nconst Shortcode = ({ code, ...rest }: RecursiveShortcodeProps) => {\n let props = {\n ...rest,\n } as RecursiveShortcodeProps;\n if (typeof code === 'string' || code instanceof String) {\n props.code = code;\n } else {\n props = {\n ...props,\n ...code,\n };\n }\n\n props.against = getAgainst(props.against);\n props.RecursiveShortcode = RecursiveShortcode;\n props.attributes = props?.attributes ?? ({} as ShortcodeAttributesProps);\n\n const { type, name, values } = props;\n if (typeof props.code === 'string') {\n return ;\n }\n if (props.type === 'text') {\n return ;\n }\n if (type === 'element') {\n switch (name) {\n case 'list':\n if (props?.attributes?.style === 'number') {\n return ;\n }\n return
;\n case 'li':\n if (props?.attributes?.style === 'glyph') {\n return ;\n }\n return ;\n case 'i':\n return ;\n case 'b':\n return ;\n case 'alt':\n return ;\n case 'sup':\n return ;\n case 'glyph':\n return ;\n case 'tel':\n return ;\n case 'link':\n return ;\n case 'productprice':\n return ;\n case 'tooltip':\n return ;\n case 'root':\n return ;\n default:\n return null;\n }\n }\n return null;\n};\n\nconst ShortcodeWrapper = (props: RecursiveShortcodeProps) => (\n }>\n \n \n);\n\nShortcodeWrapper.displayName = 'Shortcode';\n\nexport default ShortcodeWrapper;\n","import Shortcode, { RecursiveShortcodeProps } from './Shortcode';\n\n// TODO: help.. please.\nexport type ShortcodeProps = RecursiveShortcodeProps;\n\nexport default Shortcode;\n","export enum Alignment {\n STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\n","import React from 'react';\nimport Shortcode, { ShortcodeProps } from 'components/Shortcode';\nimport { Colorway } from '@uds/theme-utils';\nimport { Alignment } from 'domain/constants/alignment';\n\nimport useStylesheet from './Cell.stylesheet';\n\nexport interface CellProps {\n body: ShortcodeProps;\n layout?: {\n alignment?: Alignment;\n };\n}\n\nexport interface OuterProps {\n colorway: Colorway;\n cell: CellProps;\n}\n\nconst PureCell = ({ colorway, cell }: OuterProps) => {\n const { styles } = useStylesheet({ cell });\n return (\n \n \n \n \n
\n );\n};\n\nPureCell.displayName = 'Cell';\n\nexport default PureCell;\n","import { useStyles } from '@team-griffin/stylr';\nimport { Alignment } from 'domain/constants/alignment';\n\nimport { CellProps } from './Cell';\n\nexport default ({ cell }: { cell: CellProps }) =>\n useStyles(\n {\n default: {\n root: {\n textAlign: 'left',\n },\n },\n centered: {\n root: {\n textAlign: 'center',\n },\n },\n },\n {\n centered: cell.layout?.alignment === Alignment.CENTER,\n },\n );\n","import React from 'react';\n\nimport useStylesheet from './WideCell.stylesheet';\nimport Cell, { OuterProps as CellProperties } from './Cell';\n\ninterface OuterProps extends CellProperties {\n first: boolean;\n last: boolean;\n}\n\nconst PureWideCell = ({ colorway, cell, first, last }: OuterProps) => {\n const { styles } = useStylesheet({\n first,\n last,\n });\n return (\n \n | \n
\n );\n};\n\nPureWideCell.displayName = 'WideCell';\n\nexport default PureWideCell;\n","import { gu2px, useTheme } from '@uds/theme-utils';\nimport { useStyles } from '@team-griffin/stylr';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { useBreakpoints } from '@ux/responsive';\n\nexport default ({ first, last }: { first: boolean; last: boolean }) => {\n const {\n theme: { spacing },\n } = useTheme();\n const { isMinLg } = useBreakpoints();\n return useStyles(\n {\n default: {\n cell: {\n ...cssSides('padding', Side.X, gu2px(1.5, spacing)),\n },\n },\n\n firstChild: {\n cell: {\n paddingLeft: gu2px(3, spacing),\n },\n },\n lastChild: {\n cell: {\n paddingRight: gu2px(3, spacing),\n },\n },\n\n isMinLg: {\n cell: {\n ...cssSides('padding', Side.X, gu2px(2, spacing)),\n },\n },\n\n firstChildLg: {\n cell: {\n paddingLeft: gu2px(4, spacing),\n },\n },\n\n lastChildLg: {\n cell: {\n paddingRight: gu2px(4, spacing),\n },\n },\n },\n [\n { isMinLg: isMinLg },\n { firstChild: first },\n { lastChild: last },\n { firstChildLg: first && isMinLg },\n { lastChildLg: last && isMinLg },\n ],\n );\n};\n","import React from 'react';\nimport { Colorway } from '@uds/theme-utils';\n\nimport useStylesheet from './WideTableRow.stylesheet';\nimport WideCell from './WideCell';\nimport { CellProps } from './Cell';\n\ninterface OuterProps {\n colorway: Colorway;\n row: Array;\n isOdd: boolean;\n isLast: boolean;\n}\n\ndeclare const j: number;\ndeclare const cell: CellProps;\n\nconst PureWideTableRow = ({ colorway, row, isOdd, isLast }: OuterProps) => {\n const { styles } = useStylesheet({\n isOdd,\n isLast,\n });\n return (\n \n );\n};\n\nPureWideTableRow.displayName = 'WideTableRow';\n\nexport default PureWideTableRow;\n","import cssSides, { Side } from '@team-griffin/css-sides';\nimport { gu2px, useTheme } from '@uds/theme-utils';\nimport { opacify } from '@ux/style-utils';\nimport longhand from '@team-griffin/css-longhand';\nimport { useStyles } from '@team-griffin/stylr';\nimport { useBreakpoints } from '@ux/responsive';\n\nexport default ({ isOdd, isLast }: { isOdd: boolean; isLast: boolean }) => {\n const {\n theme: { palette, spacing },\n } = useTheme();\n const { isMinLg } = useBreakpoints();\n return useStyles(\n {\n default: {\n tbodyRow: {\n display: 'flex',\n ...cssSides('padding', Side.Y, gu2px(2, spacing)),\n ...longhand('borderBottom', {\n width: 2,\n color: opacify(palette.grey06, 0.2),\n style: 'solid',\n }),\n backgroundColor: palette.grey12,\n },\n\n cell: {\n flex: 1,\n flexBasis: 0,\n },\n },\n\n isOdd: {\n tbodyRow: {\n backgroundColor: '#fff',\n },\n },\n\n isLast: {\n tbodyRow: {\n paddingBottom: gu2px(3, spacing),\n borderBottomWidth: 0,\n },\n },\n\n isMinLg: {\n tbodyRow: {\n ...cssSides('padding', Side.Y, gu2px(2, spacing)),\n },\n },\n\n isMinLgAndLast: {\n tbodyRow: {\n paddingBottom: gu2px(4, spacing),\n },\n },\n },\n [{ isOdd }, { isLast }, { isMinLg }, { isMinLgAndLast: isLast && isMinLg }],\n );\n};\n","import React from 'react';\nimport { Heading04 } from '@uds/typography';\nimport { useTheme, Colorway } from '@uds/theme-utils';\n\nimport useStylesheet from './WideTable.stylesheet';\nimport WideCell from './WideCell';\nimport WideTableRow from './WideTableRow';\nimport { CellProps } from './Cell';\n\nconst isOdd = (i: number) => i % 2 === 1;\nconst isLast = (i: number, n: number) => i + 1 === n;\n\ninterface OuterProps {\n colorway: Colorway;\n head: Array;\n body: Array>;\n hBaseline?: number;\n}\n\ndeclare const i: number;\ndeclare const cell: CellProps;\ndeclare const row: Array;\n\nconst PureWideTable = ({ colorway, head, body, hBaseline = 1 }: OuterProps) => {\n const { theme } = useTheme();\n const { styles } = useStylesheet({\n theme,\n });\n return (\n \n );\n};\n\nPureWideTable.displayName = 'WideTable';\n\nexport default PureWideTable;\n","import cssSides, { Side } from '@team-griffin/css-sides';\nimport { gu2px, Theme } from '@uds/theme-utils';\nimport longhand from '@team-griffin/css-longhand';\nimport { useStyles } from '@team-griffin/stylr';\nimport { useBreakpoints } from '@ux/responsive';\n\nexport default ({ theme: { spacing, palette, curvature } }: { theme: Theme }) => {\n const { isMinLg } = useBreakpoints();\n return useStyles(\n {\n default: {\n table: {\n backgroundColor: '#fff',\n color: palette.grey02,\n },\n\n theadRow: {\n display: 'flex',\n ...cssSides('padding', Side.Y, gu2px(3, spacing)),\n ...longhand('borderBottom', {\n width: 3,\n color: palette.secondary,\n style: 'solid',\n }),\n },\n\n cell: {\n flex: 1,\n flexBasis: 0,\n },\n\n tCellCenter: {\n textAlign: 'center',\n },\n },\n\n isMinLg: {\n theadRow: {\n paddingTop: gu2px(4, spacing),\n },\n },\n },\n [{ isMinLg }, { curvature }],\n );\n};\n"],"sourceRoot":""}