UNPKG

@gsretail.com/gui-core

Version:

A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook

2 lines (1 loc) 6.38 kB
import{__makeTemplateObject as n}from"../../node_modules/tslib/tslib.es6.js";import t from"@emotion/styled";import{darken as o}from"@mui/material/styles";import e from"../../assets/theme/basicStyle.js";var r,i="".concat(e.button.size.tiny,"px"),u="".concat(e.button.size.small,"px"),a="".concat(e.button.size.medium,"px"),l="".concat(e.button.size.large,"px"),d=function(d){return t(d)(r||(r=n(["\n\n flex-shrink: 0;\n line-height: 1;\n text-transform: inherit;\n font-size: ",";\n font-weight: ",";\n\n min-width: 60px;\n min-height: ",";\n\n padding: ",";\n\n box-shadow: ",";\n\n background-color: ",";\n\n color: ",";\n\n &.MuiButton-outlined {\n &.MuiButton-outlinedPrimary {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedSecondary {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedError {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedWarning {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedSuccess {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedInfo {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n\n &:hover:not(.Mui-disabled) {\n background-color: ",";\n }\n }\n\n &.MuiButton-contained {\n &.MuiButton-containedSecondary {\n &:hover:not(.Mui-disabled) {\n background-color: ",";\n }\n }\n\n &:hover:not(.Mui-disabled) {\n box-shadow: ",";\n }\n }\n\n &.MuiButton-text {\n color: ",";\n &:hover:not(.Mui-disabled) {\n color: black;\n background-color: transparent;\n }\n }\n\n &.Mui-disabled {\n color: "," !important;\n\n &.MuiButton-outlined {\n background-color: "," !important;\n border-color: "," !important;\n }\n &.MuiButton-text {\n background-color: transparent;\n }\n }\n\n .MuiButton-startIcon {\n margin-left: -2px;\n margin-right: 4px;\n }\n .MuiButton-endIcon {\n margin-right: -2px;\n margin-left: 4px;\n }\n svg {\n font-size: ",";\n }\n"],["\n\n flex-shrink: 0;\n line-height: 1;\n text-transform: inherit;\n font-size: ",";\n font-weight: ",";\n\n min-width: 60px;\n min-height: ",";\n\n padding: ",";\n\n box-shadow: ",";\n\n background-color: ",";\n\n color: ",";\n\n &.MuiButton-outlined {\n &.MuiButton-outlinedPrimary {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedSecondary {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedError {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedWarning {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedSuccess {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n &.MuiButton-outlinedInfo {\n border-color: ",";\n &:hover:not(.Mui-disabled) {\n border-color: ",";\n }\n }\n\n &:hover:not(.Mui-disabled) {\n background-color: ",";\n }\n }\n\n &.MuiButton-contained {\n &.MuiButton-containedSecondary {\n &:hover:not(.Mui-disabled) {\n background-color: ",";\n }\n }\n\n &:hover:not(.Mui-disabled) {\n box-shadow: ",";\n }\n }\n\n &.MuiButton-text {\n color: ",";\n &:hover:not(.Mui-disabled) {\n color: black;\n background-color: transparent;\n }\n }\n\n &.Mui-disabled {\n color: "," !important;\n\n &.MuiButton-outlined {\n background-color: "," !important;\n border-color: "," !important;\n }\n &.MuiButton-text {\n background-color: transparent;\n }\n }\n\n .MuiButton-startIcon {\n margin-left: -2px;\n margin-right: 4px;\n }\n .MuiButton-endIcon {\n margin-right: -2px;\n margin-left: 4px;\n }\n svg {\n font-size: ",";\n }\n"])),e.font.size[13],(function(n){return n.theme.typography.fontWeightMedium}),(function(n){var t=n.size;return"tiny"===t?i:"small"===t?u:"large"===t?l:a}),(function(n){var t=n.size,o=n.variant;return"small"===t||"tiny"===t?"outlined"===o?"0 8px":"0 9px":"large"===t?"outlined"===o?"0 12px":"0 13px":"outlined"===o?"0 10px":"0 11px"}),(function(n){var t=n.disableElevation,o=n.variant,e=n.theme;if(!1===t&&"text"!==o)return e.shadows[1]}),(function(n){var t=n.color,o=n.variant,e=n.theme;return"outlined"===o?e.palette.common.white:"text"===o?"transparent":"secondary"===t?e.palette.grey[200]:void 0}),(function(n){var t=n.variant,o=n.color,e=n.theme;return"text"===t||"outlined"===t||void 0===t&&"secondary"===o||"contained"===t&&("secondary"===o||"inherit"===o)?e.palette.common.black:e.palette.common.white}),(function(n){return n.theme.palette.grey[400]}),(function(n){return n.theme.palette.grey[600]}),(function(n){return n.theme.palette.grey[600]}),(function(n){var t=n.theme;return o(t.palette.grey[600],.1)}),(function(n){return n.theme.palette.error.main}),(function(n){var t=n.theme;return o(t.palette.error.main,.1)}),(function(n){return n.theme.palette.warning.main}),(function(n){var t=n.theme;return o(t.palette.warning.main,.1)}),(function(n){return n.theme.palette.success.main}),(function(n){var t=n.theme;return o(t.palette.success.main,.1)}),(function(n){return n.theme.palette.info.main}),(function(n){var t=n.theme;return o(t.palette.info.main,.1)}),(function(n){return n.theme.palette.grey[100]}),(function(n){var t=n.theme;return o(t.palette.grey[100],.05)}),(function(n){return n.theme.shadows[1]}),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.palette.grey[500]}),(function(n){return n.theme.palette.grey[100]}),(function(n){return n.theme.palette.grey[400]}),(function(n){var t=n.size;return"tiny"===t?e.font.size[16]:"small"===t?e.font.size[18]:"medium"===t?e.font.size[20]:"large"===t?e.font.size[24]:e.font.size[20]}))};export{d as default};