{"version":3,"file":"static/js/8791.a14645a7.chunk.js","mappings":"gLAWaA,EAAiB,SAACC,GAC7B,IAAKA,EACH,MAAO,CAAEC,KAAM,CAAC,GAGlB,IAAIC,EASEC,GAPJD,EADkB,kBAATF,EACFI,KAAKC,MAAML,GAEdM,OAAAC,OAAA,GACCP,IAIgBQ,MAEvB,cADON,EAAKM,MACL,CAAEC,UAASN,EAAEF,KAAIC,EAC1B,C,kGCpBaQ,EAAU,W,yCAMrB,KAAAC,cAAgB,SAACC,GACf,IAAMC,EAAU,CAAC,gBAAiB,kBAAAC,OAAkBX,EAAKY,QAIzD,OAHIH,GACFC,EAAQG,KAAKJ,GAERC,EAAQI,KAAK,I,aAVmB,U,cACd,E,6CAY3BL,EAAAM,UAAAC,OAAA,WACQ,IAAAP,GAAsBb,EAAAA,EAAAA,GAAeqB,KAAKC,MAAxClB,EAASS,EAAAH,UAAEI,EAAID,EAAAX,KACjBqB,EAAaF,KAAKT,cAAcR,GAEtC,OACEoB,EAAAA,EAAAA,GAAA,UAAQR,MAAOK,KAAKL,MAAOS,SAAUJ,KAAKI,SAAUC,QAASL,KAAKK,UAChEF,EAAAA,EAAAA,GAAA,KAAAjB,OAAAC,OAAA,GAAQM,EAAI,CAAEL,MAAOc,KACnBC,EAAAA,EAAAA,GAAA,c,IArBa,G,QCRK,u4yB","sources":["../node_modules/@patentstyret/designsystem/dist/esm-es5/src/utils/parse-helper.ts","../node_modules/@patentstyret/designsystem/dist/esm-es5/src/components/breadcrumb/breadcrumb.tsx","../node_modules/@patentstyret/designsystem/dist/esm-es5/src/components/breadcrumb/breadcrumb.styles.scss?tag=ps-breadcrumb"],"sourcesContent":["import { RootProps } from '../types/entities';\r\n\r\n/**\r\n *\r\n * @param args\r\n * Vanilla web components are restricted to string attributes,\r\n * while React and Angular can use object literals as arguments\r\n * \r\n * @returns rootClass: for overwriting the default styles of the component\r\n * @returns attr: attributes which are added to the root element\r\n */\r\nexport const parseRootProps = (args?: RootProps | string): { rootClass?: string; attr: RootProps } => {\r\n if (!args) {\r\n return { attr: {} };\r\n }\r\n\r\n let attr: RootProps;\r\n if (typeof args === 'string') {\r\n attr = JSON.parse(args) as RootProps;\r\n } else {\r\n attr = {\r\n ...args, // immutable\r\n };\r\n }\r\n\r\n const rootClass = attr.class;\r\n delete attr.class;\r\n return { rootClass, attr };\r\n};\r\n","import { h, Component, Prop } from '@stencil/core';\r\nimport { parseRootProps } from '../../utils/parse-helper';\r\nimport { Root, Severity } from '../../types/entities';\r\n\r\n@Component({\r\n tag: 'ps-breadcrumb',\r\n styleUrl: 'breadcrumb.styles.scss',\r\n})\r\nexport class Breadcrumb {\r\n @Prop() color: 'primary' | 'secondary' = 'primary';\r\n @Prop() special: boolean = false;\r\n @Prop() severity?: Severity;\r\n @Prop() root?: Root;\r\n\r\n getClassNames = (rootClass: string) => {\r\n const classes = ['ds-breadcrumb', `ds-breadcrumb__${this.color}`];\r\n if (rootClass) {\r\n classes.push(rootClass);\r\n }\r\n return classes.join(' ');\r\n };\r\n\r\n render() {\r\n const { rootClass, attr } = parseRootProps(this.root);\r\n const classNames = this.getClassNames(rootClass);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","@mixin textTypeBody {\r\n font-weight: fontWeightValue(regular);\r\n font-size: 1rem; // 16px\r\n line-height: 150%;\r\n\r\n @media (min-width: breakpoint(md)) {\r\n font-weight: fontWeightValue(regular);\r\n font-size: 1.25rem; // 20px\r\n line-height: 150%;\r\n }\r\n}\r\n\r\n.ds-breadcrumb {\r\n list-style: none;\r\n margin: 0;\r\n padding: 1rem 0.5rem;\r\n}\r\n\r\n/* Display list items side by side */\r\n.ds-breadcrumb li {\r\n display: inline;\r\n @include textTypeBody;\r\n}\r\n\r\n/* Add a slash symbol (/) before/behind each list item */\r\n.ds-breadcrumb li:after {\r\n padding: 0.25rem;\r\n font-family: 'Material Icons';\r\n vertical-align: middle;\r\n content: 'chevron_right';\r\n}\r\n\r\n/* Add a color to all links inside the list */\r\n.ds-breadcrumb li a {\r\n color: inherit;\r\n text-decoration: none;\r\n}\r\n\r\n/* Add a color on mouse-over */\r\n.ds-breadcrumb li a:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.ds-breadcrumb li:last-child {\r\n a {\r\n &:hover {\r\n cursor: default;\r\n text-decoration: none;\r\n }\r\n }\r\n &:after {\r\n content: '';\r\n }\r\n}\r\n\r\n.ds-breadcrumb.ds-breadcrumb__primary {\r\n li:last-child {\r\n color: $ds-color-neutral-60;\r\n }\r\n}\r\n\r\n.ds-breadcrumb.ds-breadcrumb__secondary {\r\n li:last-child {\r\n color: $ds-color-neutral-20;\r\n }\r\n}\r\n"],"names":["parseRootProps","r","attr","s","t","JSON","parse","Object","assign","class","rootClass","Breadcrumb","getClassNames","o","f","concat","color","push","join","prototype","render","this","root","n","h","severity","special"],"sourceRoot":""}