{"version":3,"sources":["webpack:///./presentation/components/Shortcode/List.tsx","webpack:///./domain/constants/alignment.ts","webpack:///./presentation/components/Shortcode/stylesheets.ts"],"names":["pureEnhance","withProps","listStyles","RecursiveShortcode","elements","styles","rest","style","root","nl2br","Alignment","theme","layout","spacing","against","attributes","useStyles","default","listStylePosition","cssSides","Side","A","marginBottom","gu2px","paddingRight","paddingLeft","color","getBodyColor","icon","getTitleColor","glyph","listStyleType","modifier","CENTER","textAlign","alignment","r","listItemStyles","width","minWidth","text","display","wrapper","number","justifyContent","glyphStyles","palette","secondary","primaryContrast","highlightContrast","tertiary"],"mappings":"kVAQeA,sBACb,OAAQ,CACNC,oBAAUC,MAFCF,CAIb,EAAGG,qBAAoBC,WAAUC,YAAWC,KAC5C,wBAAIC,MAAOF,EAAOG,MAChB,kBAACL,EAAD,GACEC,SAAUA,EACVK,OAAO,GACHH,O,oBCjBH,IAAKI,EAAZ,kC,SAAYA,K,oBAAAA,E,iBAAAA,M,0BCAZ,gNAiBO,MAAMR,EAAa,EACxBS,QACAC,SACAD,OACEE,WAEFC,UACAC,gBAC6BC,YAAU,CACvCC,QAAS,CACPT,KAAM,CACJU,kBAAmB,YAChBC,YAAS,SAAUC,IAAKC,EAAG,GAC9BC,aAAcC,YAAM,EAAGV,GACvBW,aAAc,EACdC,YAAa,EACbC,MAAOC,YAAahB,EAAOG,IAG7Bc,KAAM,CACJF,MAAOG,YAAclB,EAAOG,KAGhCgB,MAAO,CACLtB,KAAM,CACJuB,cAAe,SAGnB,CAAEC,mBAAS,YAAatB,IAAUuB,SAAW,CAC3CzB,KAAM,CACJ0B,UAAW,YAGd,CACDpB,UAEAqB,UAAWC,IAAO,YAAaA,IAAY,GAAIxB,IAC/CkB,MAAOM,IAAS,QAAS,QAASA,IAAY,GAAIrB,MAGvCsB,EAAiB,EAC5B1B,QACAA,OACEE,WAEFC,UACAC,aACAH,YAC6BI,YAAU,CACvCC,QAAS,CACPT,KAAM,CACJiB,YAAa,EACbH,aAAcC,YAAM,EAAGV,IAEzBe,KAAM,CACJU,MAAOf,YAAM,EAAGV,GAChB0B,SAAUhB,YAAM,EAAGV,GACnBa,MAAOG,YAAclB,EAAOG,IAE9B0B,KAAM,CACJf,YAAa,EACbC,MAAOC,YAAahB,EAAOG,KAG/BgB,MAAO,CACLtB,KAAM,CACJiC,QAAS,QAEXC,QAAS,CACPD,QAAS,QAEXD,KAAM,CACJf,YAAaF,YAAM,EAAGV,KAG1B8B,OAAQ,CACNH,KAAM,CACJf,YAAaF,YAAM,EAAGV,KAG1B,CAAEmB,mBAAS,YAAatB,IAAUuB,SAAW,CAC3CzB,KAAM,CACJoC,eAAgB,YAGnB,CACD9B,UAEAqB,UAAWC,IAAO,YAAaA,IAAY,GAAIxB,IAC/CkB,MAAOM,IAAS,QAAS,QAASA,IAAY,GAAIrB,IAClD4B,OAAQP,IAAS,QAAS,SAAUA,IAAY,GAAIrB,MAGzC8B,EAAc,EACzBlC,OACEmC,UACAjC,WAEFC,aAC6BE,YAAU,CACvCC,QAAS,CACPT,KAAM,CACJ8B,MAAOf,YAAM,EAAGV,GAChBa,MAAOU,IAAO,CACZ,CAAEA,IAAS,SAAUA,IAASU,EAAQC,YACtC,CAAEX,IAAS,WAAYA,IAASU,EAAQE,kBACxC,CAAEZ,IAAS,aAAcA,IAASU,EAAQG,oBAC1C,CAAEb,IAAS,WAAYA,IAASU,EAAQC,YACxC,CAAEX,IAAS,QAASA,IAASU,EAAQI,WACrC,CAAEd,IAAKA,IAAS,aANXA,CAOJtB,MAGN,CACD,CAAEA","file":"pex-static/48.42415dfacbb381c4a15a.chunk.js","sourcesContent":["import React from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport { listStyles } from './stylesheets';\nimport pureEnhance from '@ux/pure-enhance';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nexport default pureEnhance(\n 'List', [\n withProps(listStyles),\n ],\n)(({ RecursiveShortcode, elements, styles, ...rest }) => (\n \n));\n","export enum Alignment {\n STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\n","import { useStyles } from '@team-griffin/stylr';\nimport { gu2px } from '@ux/theme-utils';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { Alignment } from 'domain/constants/alignment';\nimport { getTitleColor, getBodyColor } from 'presentation/utils/colorway';\nimport { modifier } from '@ux/style-utils';\nimport * as r from 'ramda';\nimport { RecursiveShortcodeProps } from './Shortcode';\nimport { CSSProperties } from 'react';\n\nexport interface Styles {\n root: CSSProperties,\n icon: CSSProperties,\n text: CSSProperties,\n wrapper: CSSProperties,\n}\n\nexport const listStyles = ({\n theme,\n layout,\n theme: {\n spacing,\n },\n against,\n attributes,\n}: RecursiveShortcodeProps) => useStyles({\n default: {\n root: {\n listStylePosition: 'inside',\n ...cssSides('margin', Side.A, 0),\n marginBottom: gu2px(2, spacing),\n paddingRight: 0,\n paddingLeft: 0,\n color: getBodyColor(theme, against),\n },\n\n icon: {\n color: getTitleColor(theme, against),\n },\n },\n glyph: {\n root: {\n listStyleType: 'none',\n },\n },\n [ modifier('alignment', Alignment.CENTER) ]: {\n root: {\n textAlign: 'center',\n },\n },\n}, {\n against,\n //@ts-ignore\n alignment: r.prop('alignment', r.defaultTo({}, layout)),\n glyph: r.propEq('style', 'glyph', r.defaultTo({}, attributes)),\n});\n\nexport const listItemStyles = ({\n theme,\n theme: {\n spacing,\n },\n against,\n attributes,\n layout,\n}: RecursiveShortcodeProps) => useStyles({\n default: {\n root: {\n paddingLeft: 0,\n marginBottom: gu2px(1, spacing),\n },\n icon: {\n width: gu2px(2, spacing),\n minWidth: gu2px(2, spacing),\n color: getTitleColor(theme, against),\n },\n text: {\n paddingLeft: 0,\n color: getBodyColor(theme, against),\n },\n },\n glyph: {\n root: {\n display: 'flex',\n },\n wrapper: {\n display: 'flex',\n },\n text: {\n paddingLeft: gu2px(2, spacing),\n },\n },\n number: {\n text: {\n paddingLeft: gu2px(1, spacing),\n },\n },\n [ modifier('alignment', Alignment.CENTER) ]: {\n root: {\n justifyContent: 'center',\n },\n },\n}, {\n against,\n //@ts-ignore\n alignment: r.prop('alignment', r.defaultTo({}, layout)),\n glyph: r.propEq('style', 'glyph', r.defaultTo({}, attributes)),\n number: r.propEq('style', 'number', r.defaultTo({}, attributes)),\n});\n\nexport const glyphStyles = ({\n theme: {\n palette,\n spacing,\n },\n against,\n}: RecursiveShortcodeProps) => useStyles({\n default: {\n root: {\n width: gu2px(3, spacing),\n color: r.cond([\n [ r.equals('LIGHT'), r.always(palette.secondary) ],\n [ r.equals('PRIMARY'), r.always(palette.primaryContrast) ],\n [ r.equals('HIGHLIGHT'), r.always(palette.highlightContrast) ],\n [ r.equals('NEUTRAL'), r.always(palette.secondary) ],\n [ r.equals('DARK'), r.always(palette.tertiary) ],\n [ r.T, r.always('inherit') ],\n ])(against),\n },\n },\n}, [\n { against },\n]);\n\n"],"sourceRoot":""}