{"version":3,"file":"button-7951bc53.js","sources":["../../../../firstmile.widgets/src/helpers/getModifiers.tsx","../../../../firstmile.widgets/src/components/svg/Svg.tsx","../../../../firstmile.widgets/src/components/button/Button.tsx"],"sourcesContent":["export interface BasedModel {\n styleModifier?: string[];\n globalModifiers?: string[];\n}\n\nexport const getModifiers = (model: BasedModel, baseClass: string) => {\n const classes = [baseClass];\n\n model.styleModifier?.forEach((m) => classes.push(baseClass + '--' + m));\n model?.globalModifiers?.forEach((m) => classes.push(m));\n\n return classes.join(' ');\n};\n","export interface Props {\n iconPath: string;\n viewBoxWidth: number;\n viewBoxHeight: number;\n width?: number;\n height?: number;\n mainClass?: string;\n standardAtom?: boolean;\n onClick?: () => any;\n}\n\nconst Svg = ({ height, mainClass, iconPath, standardAtom, viewBoxHeight, viewBoxWidth, width, onClick }: Props) => {\n const classes: string[] = [];\n if (mainClass) {\n classes.push(mainClass);\n }\n if (standardAtom) {\n classes.push('fm-a-svg');\n }\n const className = classes.join(' ');\n const href = iconPath.startsWith('#') ? '/assets/images/new-icons.svg' + iconPath : iconPath;\n\n return (\n \n );\n};\n\nexport default Svg;\n","import Svg, { Props as SvgProps } from '../svg/Svg';\nimport { KeyboardEvent, MouseEvent } from 'react';\ninterface ButtonModel {\n disabled?: boolean;\n icon?: SvgProps;\n link?: boolean;\n mainClass?: string;\n styleModifier?: (\n | 'fm-a-button--yellow'\n | 'fm-a-button--dark'\n | 'fm-a-button--blue'\n | 'fm-a-button--light-outline'\n | 'fm-a-button--small-x-padding'\n | 'fm-a-button--small'\n | 'fm-a-button--icon-right'\n | 'fm-a-button--text-white'\n | 'fm-a-button--xs'\n )[];\n url?: string;\n newTab?: boolean;\n raw?: boolean;\n text: string;\n onClick?: (event: MouseEvent) => any;\n type?: 'button' | 'submit' | 'reset';\n role?: string;\n tabIndex?: number;\n onKeyDown?: (event: KeyboardEvent) => any;\n refButton?: (ref: any) => any;\n commandType?: commandTypeButton;\n dataHref?: string;\n}\n\nexport enum commandTypeButton {\n order = 'order',\n bookCollection = 'book-collection',\n openDropdown = 'open-dropdown',\n}\n\nconst ButtonInner = ({ text, raw }: ButtonModel) => {\n return raw ?
: