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AA,GACAC,EAA6B,UAA7BA,OAAAA,QAAAA,IAAAA,UAAAA,IAAAA,UAAAA,GACAP,EAAAA,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,GAAAA,UAAAA,GAAgD,CAAC,EAE3CQ,EAAiBF,EAAuB,QAAU,KAClDG,EAAqBF,EAA6B,GAAKC,EACvDE,EAAcC,OAAOZ,GAE3B,OAAOW,EACHZ,EAAqBY,EAAaV,GAClCS,CACN,EA0BEL,OAAQN,E,wJCnDGc,GAAE,W,OAAFA,C,EAIb,QAAsB,W,OAAtB,C,cAZiB,Q,izBAGjB,IAKaA,EAAK,W,2BAAI1D,EAAAA,IAAAA,MAAAA,GAAAA,EAAAA,EAAAA,EAAAA,EAAAA,IAAAA,EAAAA,GAAAA,UAAAA,GACpB,OAAOA,EAAQ2D,OAAOC,SAASC,KAAK,IACtC,EAEA,EATe,W,2BAAI7D,EAAAA,IAAAA,MAAAA,GAAAA,EAAAA,EAAAA,EAAAA,EAAAA,IAAAA,EAAAA,GAAAA,UAAAA,GACjB,OAAO2C,EAAAA,QAAAA,WAAAA,EAAK,EAAG3C,GACjB,C,0ICOA,C,YAZoC,O,48BAEpC,IAUA,EAVqB,WACnB,IAA8B8D,EAAAA,GAAAA,EAAAA,EAAAA,WAAS,GAAK,GAArCC,EAAuBD,EAAAA,GAAdE,EAAcF,EAAAA,GAM9B,OAJA9B,EAAAA,EAAAA,YAAU,WACRgC,GAAW,EACb,GAAG,IAEID,CACT,C","sources":["webpack://webstaurantstore/./common/Buttons/index.tsx","webpack://webstaurantstore/./common/ModalReact/index.tsx","webpack://webstaurantstore/./__alias__/cls/index.ts","webpack://webstaurantstore/./__alias__/utilities/formatAsCurrency.ts","webpack://webstaurantstore/./common/concat.ts","webpack://webstaurantstore/./common/useIsMounted.ts"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport { cls } from \"cls\";\nexport const colors = {\n base: cls(\"bg-gray-50\", \"hover:bg-gray-100\", \"active:bg-gray-100\", \"disabled:bg-gray-100\", \"text-gray-800\", \"border-black-20\", \"shadow-inset-white-25\"),\n light: cls(\"bg-white\", \"border-gray-600\", \"text-gray-800\", \"hover:bg-gray-primary\", \"focus-visible:outline-gray-800\", \"btn\"),\n green: cls(\"hover:bg-green-800\", \"text-white\", \"bg-green-500\", \"border-black-10\", \"focus-visible:outline-green-800\", \"btn\"),\n blue: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-info\"),\n purple: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-custom\"),\n glass: cls(\"bg-white\", \"hover:bg-white\", \"px-2\", \"text-gray-800\", \"capitalize\", \"border-gray-glass\"),\n inverse: cls(\"text-white\", \"bg-gray-inverse\", \"border-black-10\", \"hover:bg-gray-inverse-dark\"),\n custom: \"\",\n red: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-cart\"),\n \"red-outline\": cls(\"bg-transparent\", \"hover:bg-red-800\", \"border-red-800\", \"text-red-700\", \"hover:text-white\"),\n \"green-solid\": cls(\"text-white\", \"hover:text-white\", \"btn\", \"btn-primary\"),\n \"green-outline\": cls(\"bg-transparent\", \"hover:bg-green-500\", \"border-green-500\", \"text-green-500\", \"hover:text-white\"),\n \"glass-outline\": cls(\"bg-transparent\", \"hover:bg-gray-50\", \"border-gray-600\", \"text-gray-800\", \"btn-glass-shadow\"),\n ui: cls(\"text-shadow-white-75\", \"hover:bg-gray-50\", \"border-gray-400\", \"text-gray-800\", \"focus-visible:outline-gray-800\", \"active:shadow-inset-black-15\"),\n orange: cls(\"text-white\", \"border-black-20\", \"btn\", \"btn-checkout\")\n};\nexport const sizes = {\n small: cls(\"rounded-sm-1/2\", \"text-sm-1/2\", \"leading-3\", \"px-3\", \"pb-1-1/2\", \"pt-1-3/4\"),\n standard: cls(\"rounded-normal\", \"text-base\", \"leading-normal\", \"px-7\", \"py-2-1/2\"),\n mini: cls(\"rounded\", \"text-xs\", \"leading-3\", \"py-1\", \"px-2\"),\n large: cls(\"rounded\", \"text-xl\", \"py-4\", \"px-10\"),\n toolbar: cls(\"rounded\", \"text-xs\", \"leading-3\", \"px-3\", \"py-1-1/2\"),\n custom: \"\"\n};\ntype BaseProps = {\n className?: string;\n children: React.ReactNode;\n color: keyof typeof colors;\n size?: keyof typeof sizes;\n alignment?: string;\n weight?: string;\n focusClasses?: string;\n};\ntype AnchorProps = BaseProps & Omit, \"type\"> & {\n href: Exclude[\"href\"], undefined>;\n};\ntype ButtonProps = BaseProps & React.DetailedHTMLProps, HTMLButtonElement> & {\n type: Exclude[\"type\"], undefined>;\n};\ntype ElementProps = BaseProps & {\n element: React.ElementType;\n} & HTMLAttributes;\nfunction Buttons(props: ButtonProps, ref?: React.RefObject): JSX.Element;\nfunction Buttons(props: AnchorProps): JSX.Element;\nfunction Buttons(props: ElementProps): JSX.Element;\nfunction Buttons(props: ButtonProps | AnchorProps | ElementProps, ref?: React.RefObject) {\n const {\n children,\n className = \"\",\n size = \"standard\",\n color,\n alignment = \"align-middle\",\n weight = \"font-semibold\",\n focusClasses = cls(\"focus-visible:outline\", \"focus-visible:outline-offset-2\", \"focus-visible:outline-2\"),\n ...rest\n } = props;\n const baseClasses = cls(\"border-solid\", \"border\", \"box-border\", \"cursor-pointer\", \"inline-block\", \"text-center\", \"no-underline\", \"antialiased\", focusClasses);\n const colorClass = colors[color];\n const sizeClass = sizes[size];\n const classes = `${baseClasses} ${className} ${sizeClass} ${colorClass} ${alignment} ${weight}`;\n if (\"element\" in rest) {\n const {\n element,\n ...forwardedProps\n } = rest;\n // eslint-disable-next-line react/destructuring-assignment\n return React.createElement(element, {\n ...forwardedProps,\n className: classes\n }, children);\n }\n if (\"href\" in rest) {\n return \n {children}\n ;\n }\n if (\"type\" in rest) {\n return (\n // eslint-disable-next-line react/button-has-type\n \n );\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\nexport default React.forwardRef(Buttons) as unknown as typeof Buttons;","import React, { useEffect } from \"react\";\nimport ReactModal from \"react-modal\";\nimport { cls } from \"@wss/cls\";\ntype HeaderProps = {\n children: React.ReactNode;\n closeModal: () => void;\n className?: string;\n style?: React.CSSProperties;\n};\ntype FooterProps = {\n children: React.ReactNode;\n className?: string;\n};\ntype BodyProps = {\n children: React.ReactNode;\n className?: string;\n};\nexport const Header = ({\n children,\n closeModal,\n className = \"\",\n style = {}\n}: HeaderProps) =>
\n {children}\n \n
;\nexport const Body = ({\n children,\n className = \"\"\n}: BodyProps) =>
\n {children}\n
;\nexport const Footer = ({\n children,\n className = \"\"\n}: FooterProps) =>
\n {children}\n
;\ntype ModalProps = {\n isOpen: boolean;\n onRequestClose?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n onAfterOpen?: ReactModal.OnAfterOpenCallback;\n children: React.ReactNode;\n className: string;\n role?: string;\n contentStyle?: React.CSSProperties;\n overlayStyle?: React.CSSProperties;\n preventScroll?: boolean;\n closeTimeoutMS?: number;\n overFlowY?: string;\n};\nexport default ({\n isOpen,\n onRequestClose,\n onAfterOpen,\n children,\n className,\n role,\n contentStyle,\n overlayStyle,\n preventScroll,\n closeTimeoutMS,\n overFlowY\n}: ModalProps) => {\n useEffect(() => {\n ReactModal.setAppElement(\"body\");\n }, []);\n return \n {children}\n ;\n};","/*\nThis file acts as an alias for the class name package currently installed.\nIn the event Storefront needs to use a different class name library,\njust replace the import from this file with the new one and the entire\ncodebase will be updated.\n*/\n\nimport { twMerge } from \"tailwind-merge\";\n// eslint-disable-next-line filenames/match-exported, import/extensions\nimport clsx, { ClassValue } from \"../../../node_modules/clsx\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport const cls = (...classes: ClassValue[]) => twMerge(clsx(...classes));\n","/**\n * Used for a function to convert numbers into currency.\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat NumberFormat Documentation}\n *\n * @example\n * const numberToFormat = 12345.67\n * new Intl.NumberFormat(\"en-US\", {style: \"currency\"}).format(numberToFormat);\n */\n\n/**\n * This should be the one we mainly use. It handle all cases when using the currency formatter.\n *\n * @example\n * import formatAsCurrency from \"@wss/utilities/formatAsCurrency\"\n *\n * const priceToFormat = 12345.67\n * const formatWithAllTheChecks = formatAsCurrency.formatIfUndefined(priceToFormat)\n *\n * return formatWithAllTheChecks;\n */\nconst formatAsCurrencyWrapper = (\n value: number | string | undefined,\n showCentsIfUndefined = true,\n showEmptyStringIfUndefined = false,\n numberFormatOptions: Intl.NumberFormatOptions = {}\n) => {\n const formattedCents = showCentsIfUndefined ? \"$0.00\" : \"$0\";\n const undefinedFormatted = showEmptyStringIfUndefined ? \"\" : formattedCents;\n const parsedValue = Number(value);\n\n return parsedValue\n ? formatAsCurrencyPure(parsedValue, numberFormatOptions)\n : undefinedFormatted;\n};\n\n/**\n * If you want to just use a pure version of the currency formatter and handle the checks in the consumer then you can use this version.\n *\n * @example\n * import formatAsCurrency from \"@wss/utilities/formatAsCurrency\"\n *\n * const priceToFormat = 12345.67\n * const formatCurrencyNoChecks = formatAsCurrency.formatAsCurrencyPure(priceToFormat)\n *\n * return formatCurrencyNoChecks;\n */\nconst formatAsCurrencyPure = (\n value: number,\n numberFormatOptions: Intl.NumberFormatOptions = {}\n) => {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n ...numberFormatOptions,\n }).format(value);\n};\n\nconst formatAsCurrency = {\n formatIfUndefined: formatAsCurrencyWrapper,\n format: formatAsCurrencyPure,\n};\n\nexport default formatAsCurrency;\n","import clsx from \"clsx\";\n\n/** @deprecated Please use `clsx` instead. [Documentation](https://www.npmjs.com/package/clsx) */\nconst concat = (...classes: string[]): string => {\n return clsx(...classes);\n};\n\n/** @deprecated Please use `clsx` instead. [Documentation](https://www.npmjs.com/package/clsx) */\nexport const tw = (...classes: string[]): string => {\n return classes.filter(Boolean).join(\" \");\n};\n\nexport default concat;\n","import { useEffect, useState } from \"react\";\n\nconst useIsMounted = () => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n return mounted;\n};\n\nexport default useIsMounted;\n"],"names":["colors","sizes","base","cls","light","green","blue","purple","glass","inverse","custom","red","ui","orange","small","standard","mini","large","toolbar","Buttons","props","ref","children","className","size","color","alignment","weight","focusClasses","rest","baseClasses","colorClass","sizeClass","classes","element","forwardedProps","React","createElement","a","button","forwardRef","Header","Body","Footer","closeModal","style","header","data-testid","data-sentry-component","data-sentry-source-file","type","aria-label","onClick","textShadow","main","footer","isOpen","onRequestClose","onAfterOpen","role","contentStyle","overlayStyle","preventScroll","closeTimeoutMS","overFlowY","useEffect","ReactModal","setAppElement","overlayClassName","overlay","backgroundColor","zIndex","overflowY","content","bodyOpenClassName","twMerge","clsx","formatAsCurrencyPure","value","numberFormatOptions","Intl","NumberFormat","currency","format","formatIfUndefined","showCentsIfUndefined","showEmptyStringIfUndefined","formattedCents","undefinedFormatted","parsedValue","Number","tw","filter","Boolean","join","useState","mounted","setMounted"],"sourceRoot":""}