UNPKG

fannypack-v5

Version:

An accessible, composable, and friendly React UI Kit

187 lines (154 loc) 6.4 kB
import 'react'; import '../Provider/ThemeContext.js'; import 'classnames'; import { css } from 'emotion'; import { css as css$1 } from '@emotion/core'; import 'emotion-theming'; import '@emotion/styled'; import '../utils/useTheme.js'; import { a as _taggedTemplateLiteralLoose } from '../chunk-0c448560.js'; import 'lodash/kebabCase'; import 'tinycolor2'; import '../utils/isFunction.js'; import '../utils/get.js'; import { palette, theme, space, fontSize, fontWeight, altitude } from '../utils/theme.js'; import '../utils/omit.js'; import '../utils/pick.js'; import '../utils/cssProps.js'; import '../utils/useLocalStorage.js'; import '../Provider/ColorModeContext.js'; import '../utils/useColorMode.js'; import '../utils/useStyle.js'; import '../utils/omitBy.js'; import '../utils/useDefaultProps.js'; import '../utils/useDebounce.js'; import 'lodash/uniq'; import '../utils/useClassName.js'; import '../utils/useBreakpoint.js'; import '../utils/uniqueId.js'; import '../utils/times.js'; import '../utils/parseIcons.js'; import '../utils/colors.js'; import '../utils/palette.js'; import '../utils/mergeRefs.js'; import 'deepmerge'; import 'lodash/set'; import '../utils/applyTheme.js'; import '../utils/bindFns.js'; import '../utils/createComponent.js'; import '../utils/createElement.js'; import '../utils/createHook.js'; import '../utils/forwardRefWithUse.js'; import '../utils/fieldAdaptors.js'; import '@emotion/is-prop-valid'; import '../utils/htmlProps.js'; import '../utils/OutsideClickHandler.js'; function _templateObject10() { var data = _taggedTemplateLiteralLoose(["\n && {\n border-color: ", " !important;\n }\n\n background-color: ", ";\n color: ", ";\n fill: ", ";\n\n & {\n ", ";\n }\n "]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteralLoose(["\n max-width: 500px;\n\n ", ";\n\n & {\n ", ";\n }\n"]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", "rem;\n right: ", "rem;\n\n & {\n ", ";\n }\n"]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteralLoose(["\n margin-right: ", "rem;\n\n & .fp-Icon {\n vertical-align: -0.125em;\n }\n & .fp-CalloutContent .fp-Icon {\n font-size: 1.25em;\n }\n\n & {\n ", ";\n }\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteralLoose(["\n margin-top: ", "rem;\n\n & {\n ", ";\n }\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteralLoose(["\n font-size: ", "em;\n font-weight: ", ";\n\n & {\n ", ";\n }\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "rem;\n\n & {\n ", ";\n }\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteralLoose(["\n & {\n ", ";\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteralLoose(["\n position: relative;\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteralLoose(["\n ", "\n\n ", ";\n\n & {\n ", ";\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } var Callout = function Callout(styleProps) { return css(_templateObject(), styleProps.showCloseButton && css$1(_templateObject2()), styleProps.hasTint && getTintAttributes(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutContent = function CalloutContent(styleProps) { return css(_templateObject3(), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutHeader = function CalloutHeader(styleProps) { return css(_templateObject4(), space(1, 'major')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutTitle = function CalloutTitle(styleProps) { return css(_templateObject5(), fontSize('300')(styleProps), fontWeight('semibold')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutFooter = function CalloutFooter(styleProps) { return css(_templateObject6(), space(3, 'major')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutIconWrapper = function CalloutIconWrapper(styleProps) { return css(_templateObject7(), space(2, 'major')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutClose = function CalloutClose(styleProps) { return css(_templateObject8(), space(1, 'major')(styleProps), space(1, 'major')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var CalloutOverlay = function CalloutOverlay(styleProps) { return css(_templateObject9(), altitude('200')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var getTintAttributes = function getTintAttributes(styleProps) { return css$1(_templateObject10(), palette(styleProps.type + "100")(styleProps), palette(styleProps.type + "Tint")(styleProps), palette(styleProps.type + "TintInverted")(styleProps), palette(styleProps.type + "TintInverted")(styleProps), theme(styleProps.themeKey, "tint")(styleProps)); }; var styles = /*#__PURE__*/Object.freeze({ Callout: Callout, CalloutContent: CalloutContent, CalloutHeader: CalloutHeader, CalloutTitle: CalloutTitle, CalloutFooter: CalloutFooter, CalloutIconWrapper: CalloutIconWrapper, CalloutClose: CalloutClose, CalloutOverlay: CalloutOverlay, getTintAttributes: getTintAttributes }); export { Callout as C, CalloutContent as a, CalloutHeader as b, CalloutTitle as c, CalloutFooter as d, CalloutIconWrapper as e, CalloutClose as f, CalloutOverlay as g, getTintAttributes as h, styles as s };