{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/Button/Themed/ThemedButtonSigvaris.tsx"],"names":["ThemeButton","_a","ref","as","Primary","casing","None","restProps","theme","disabled","Disabled","createElement","Object","assign","css","themeDecorators","ThemeButtonSigvaris","property","display","alignItems","justifyContent","borderRadius","color","backgroundColor","border","bottom","width","style","PrimaryLight","PrimaryDark","Secondary","xy","Positive","Negative","cursor","White","Black","Grey","LightGrey","Transparent","OutlinedWhite","OutlinedBlack","OutlinedGrey","OutlinedTheme","OutlinedThemeLight","OutlinedThemeDark"],"mappings":";2FAAA,0GAQO,MAAMA,EAAc,sBAAW,CAACC,EAAIC,KACvC,IAAI,GAAEC,EAAK,IAAMC,QAAO,OAAEC,EAAS,IAAOC,MAASL,EAAIM,EAAY,YAAON,EAAI,CAAC,KAAM,WAErF,MAAMO,EAAQL,IAAO,IAAMG,MAAQC,EAAUE,SAAW,IAAMC,SAAWP,EACzE,OAAO,IAAMQ,cAAc,IAAaC,OAAOC,OAAO,GAAIN,EAAW,CAAEL,IAAKA,EAAKY,IAAK,YAAOC,EAAgBP,GAAQ,IAAeH,UAE3HW,EAAsB,YAAOhB,EAAa,YAA0B,CAAEiB,SAAU,CAAC,QAAS,mBAAoB,kBAAoB,CAC3IC,QAAS,cACTC,WAAY,SACZC,eAAgB,SAChBC,aAAc,OAEZN,EAAkB,CACpB,CAAC,IAAMT,MAAO,cACd,CAAC,IAAMF,SAAU,YAAO,CAKpBkB,MAAO,KACPC,gBAAiB,IACjBC,OAAQ,CACJC,OAAQ,CACJH,MAAO,KACPI,MAAO,KACPC,MAAO,UAGf,SAAU,CACNL,MAAO,KACPC,gBAAiB,QAGzB,CAAC,IAAMK,cAAe,YAAO,CACzBN,MAAO,KACPC,gBAAiB,KACjB,SAAU,CACND,MAAO,KACPC,gBAAiB,OAGzB,CAAC,IAAMM,aAAc,YAAO,CACxBP,MAAO,KACPC,gBAAiB,KACjB,SAAU,CACND,MAAO,KACPC,gBAAiB,OAGzB,CAA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AAgB,YAAO5B,OAAOC,OAAO,CAAES,MAAO,KAAcC,gBAAiB,cAAeC,OAAQ,CACnGO,GAAI,CACAT,MAAO,KACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,IACPC,gBAAiB,QAErB,CAAC,IAAMkB,eAAgB,YAAO7B,OAAOC,OAAO,CAAES,MAAO,IAAcC,gBAAiB,cAAeC,OAAQ,CACnGO,GAAI,CACAT,MAAO,IACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,IACPC,gBAAiB,QAErB,CAAC,IAAMmB,cAAe,YAAO9B,OAAOC,OAAO,CAAES,MAAO,IAAaC,gBAAiB,cAAeC,OAAQ,CACjGO,GAAI,CACAT,MAAO,IACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,IACPC,gBAAiB,QAErB,CAAC,IAAMoB,eAAgB,YAAO/B,OAAOC,OAAO,CAAES,MAAO,IAAgBC,gBAAiB,cAAeC,OAAQ,CACrGO,GAAI,CACAT,MAAO,IACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,IACPC,gBAAiB,SAErB,CAAC,IAAMqB,oBAAqB,YAAOhC,OAAOC,OAAO,CAAES,MAAO,KAAkBC,gBAAiB,cAAeC,OAAQ,CAC5GO,GAAI,CACAT,MAAO,IACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,KACPC,gBAAiB,QAErB,CAAC,IAAMsB,mBAAoB,YAAOjC,OAAOC,OAAO,CAAES,MAAO,KAAoBC,gBAAiB,cAAeC,OAAQ,CAC7GO,GAAI,CACAT,MAAO,KACPI,MAAO,KACPC,MAAO,WAEV,YAAS,yBAA0B,CACxCL,MAAO,KACPC,gBAAiB","file":"assets/oedema~sigvaris.chunk.3946fe65ad479e846706.js","sourcesContent":["import { __rest } from \"tslib\";\r\nimport { Theme, caseDecorators, Casing } from '.';\r\nimport { selector } from '@glitz/core';\r\nimport { styled } from '@glitz/react';\r\nimport { createTransitionDecorator, radius, thicker, thin } from 'Shared/Style';\r\nimport React, { forwardRef } from 'react';\r\nimport * as colors from 'Shared/Style/colors-sigvaris';\r\nimport { PlainButton } from '..';\r\nexport const ThemeButton = forwardRef((_a, ref) => {\r\n var { as = Theme.Primary, casing = Casing.None } = _a, restProps = __rest(_a, [\"as\", \"casing\"]);\r\n // Always keep `None` theme\r\n const theme = as !== Theme.None && restProps.disabled ? Theme.Disabled : as;\r\n return React.createElement(PlainButton, Object.assign({}, restProps, { ref: ref, css: styled(themeDecorators[theme], caseDecorators[casing]) }));\r\n});\r\nexport const ThemeButtonSigvaris = styled(ThemeButton, createTransitionDecorator({ property: ['color', 'background-color', 'border-color'] }), {\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n borderRadius: radius,\r\n});\r\nconst themeDecorators = {\r\n [Theme.None]: styled(),\r\n [Theme.Primary]: styled({\r\n /**\r\n * This styling is mirrored in a static CSS file for Episerver CMS editor.\r\n * If you change the styling here, please update it in Avensia.Shop\\ClientResources\\Avensia\\tinymce.css\r\n * */\r\n color: colors.primaryText,\r\n backgroundColor: colors.primary,\r\n border: {\r\n bottom: {\r\n color: colors.primaryDark,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n ':hover': {\r\n color: colors.primaryText,\r\n backgroundColor: colors.primaryDark,\r\n },\r\n }),\r\n [Theme.PrimaryLight]: styled({\r\n color: colors.primaryDark,\r\n backgroundColor: colors.secondary,\r\n ':hover': {\r\n color: colors.primaryText,\r\n backgroundColor: colors.primary,\r\n },\r\n }),\r\n [Theme.PrimaryDark]: styled({\r\n color: colors.primaryText,\r\n backgroundColor: colors.primaryDark,\r\n ':hover': {\r\n color: colors.primaryText,\r\n backgroundColor: colors.primary,\r\n },\r\n }),\r\n [Theme.Secondary]: styled(Object.assign({ color: colors.primary, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.primary,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.primary,\r\n backgroundColor: colors.secondary,\r\n }))),\r\n [Theme.Positive]: styled({\r\n color: colors.positiveText,\r\n backgroundColor: colors.positive,\r\n border: {\r\n bottom: {\r\n color: colors.positiveDark,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n ':hover': {\r\n color: colors.positiveText,\r\n backgroundColor: colors.positiveDark,\r\n },\r\n }),\r\n [Theme.Negative]: styled({\r\n color: colors.negativeText,\r\n backgroundColor: colors.negative,\r\n border: {\r\n bottom: {\r\n color: colors.negativeDark,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n ':hover': {\r\n color: colors.negativeText,\r\n backgroundColor: colors.negativeDark,\r\n },\r\n }),\r\n [Theme.Disabled]: styled({\r\n color: colors.white,\r\n backgroundColor: colors.disabledGrey,\r\n border: {\r\n bottom: {\r\n color: colors.disabledBorderGrey,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n cursor: 'default',\r\n }),\r\n [Theme.White]: styled({\r\n color: colors.black,\r\n backgroundColor: colors.white,\r\n border: {\r\n xy: {\r\n color: colors.outlineGrey,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n ':hover': {\r\n color: colors.black,\r\n backgroundColor: colors.darkWhite,\r\n },\r\n }),\r\n [Theme.Black]: styled({\r\n color: colors.white,\r\n backgroundColor: colors.black,\r\n ':hover': {\r\n color: colors.white,\r\n backgroundColor: colors.lightBlack,\r\n },\r\n }),\r\n [Theme.Grey]: styled({\r\n color: colors.grey,\r\n backgroundColor: colors.lightGrey,\r\n ':hover': {\r\n color: colors.grey,\r\n backgroundColor: colors.primary,\r\n },\r\n }),\r\n [Theme.LightGrey]: styled({\r\n color: colors.grey,\r\n backgroundColor: colors.lightGrey,\r\n border: {\r\n bottom: {\r\n color: colors.grey40,\r\n width: thicker,\r\n style: 'solid',\r\n },\r\n },\r\n ':hover': {\r\n color: colors.grey,\r\n backgroundColor: colors.primaryDark,\r\n },\r\n }),\r\n [Theme.Transparent]: styled({\r\n color: colors.black,\r\n }),\r\n // Outlined Button\r\n [Theme.OutlinedWhite]: styled(Object.assign({ color: colors.white, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.white,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.black,\r\n backgroundColor: colors.lightGrey,\r\n }))),\r\n [Theme.OutlinedBlack]: styled(Object.assign({ color: colors.black, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.black,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.black,\r\n backgroundColor: colors.lightBlack,\r\n }))),\r\n [Theme.OutlinedGrey]: styled(Object.assign({ color: colors.grey, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.grey,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.grey,\r\n backgroundColor: colors.lightGrey,\r\n }))),\r\n [Theme.OutlinedTheme]: styled(Object.assign({ color: colors.primary, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.primary,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.primary,\r\n backgroundColor: colors.secondary,\r\n }))),\r\n [Theme.OutlinedThemeLight]: styled(Object.assign({ color: colors.secondary, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.primary,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.secondary,\r\n backgroundColor: colors.primary,\r\n }))),\r\n [Theme.OutlinedThemeDark]: styled(Object.assign({ color: colors.primaryDark, backgroundColor: 'transparent', border: {\r\n xy: {\r\n color: colors.primaryDark,\r\n width: thin,\r\n style: 'solid',\r\n },\r\n } }, selector(':not([disabled]):hover', {\r\n color: colors.white,\r\n backgroundColor: colors.primaryDark,\r\n }))),\r\n};\r\n"],"sourceRoot":""}