fannypack-v5
Version:
An accessible, composable, and friendly React UI Kit
175 lines (139 loc) • 6.65 kB
JavaScript
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 { theme, breakpoint, space } 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 _templateObject11() {
var data = _taggedTemplateLiteralLoose(["\n margin-left: ", "rem;\n margin-top: ", "rem;\n\n & {\n ", ";\n }\n "]);
_templateObject11 = function _templateObject11() {
return data;
};
return data;
}
function _templateObject10() {
var data = _taggedTemplateLiteralLoose(["\n &:not(:last-child) {\n margin-bottom: ", "rem;\n }\n\n & {\n ", ";\n }\n "]);
_templateObject10 = function _templateObject10() {
return data;
};
return data;
}
function _templateObject9() {
var data = _taggedTemplateLiteralLoose(["\n ", ";\n "]);
_templateObject9 = function _templateObject9() {
return data;
};
return data;
}
function _templateObject8() {
var data = _taggedTemplateLiteralLoose(["\n &:not(:last-child) {\n margin-bottom: ", "rem;\n }\n\n & {\n ", ";\n }\n "]);
_templateObject8 = function _templateObject8() {
return data;
};
return data;
}
function _templateObject7() {
var data = _taggedTemplateLiteralLoose(["\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n margin-left: -", "rem;\n margin-top: -", "rem;\n\n & {\n ", ";\n }\n "]);
_templateObject7 = function _templateObject7() {
return data;
};
return data;
}
function _templateObject6() {
var data = _taggedTemplateLiteralLoose(["\n align-items: flex-start;\n "]);
_templateObject6 = function _templateObject6() {
return data;
};
return data;
}
function _templateObject5() {
var data = _taggedTemplateLiteralLoose(["\n flex-direction: column;\n\n ", ";\n\n & {\n ", ";\n }\n "]);
_templateObject5 = function _templateObject5() {
return data;
};
return data;
}
function _templateObject4() {
var data = _taggedTemplateLiteralLoose(["\n ", ";\n "]);
_templateObject4 = function _templateObject4() {
return data;
};
return data;
}
function _templateObject3() {
var data = _taggedTemplateLiteralLoose(["\n align-items: flex-start;\n "]);
_templateObject3 = function _templateObject3() {
return data;
};
return data;
}
function _templateObject2() {
var data = _taggedTemplateLiteralLoose(["\n flex-direction: column;\n\n ", ";\n\n & {\n ", ";\n }\n "]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = _taggedTemplateLiteralLoose(["\n display: flex;\n\n ", ";\n\n &&& > * {\n ", ";\n\n ", ";\n }\n\n &&& > *:first-child {\n ", ";\n }\n\n &&& > *:not(:last-child):not(:first-child) {\n ", ";\n }\n\n &&& > *:last-child {\n ", ";\n }\n\n & {\n ", ";\n }\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
var verticalBreakpoints = {
tablet: 'mobile',
desktop: 'tablet',
widescreen: 'desktop',
fullHD: 'widescreen'
};
var Set = function Set(styleProps) {
return css(_templateObject(), styleProps.orientation === 'vertical' ? css$1(_templateObject2(), !styleProps.isFilled && css$1(_templateObject3()), theme(styleProps.themeKey, "css.vertical")(styleProps)) : css$1(_templateObject4(), breakpoint(styleProps.verticalBelow ? "max-" + verticalBreakpoints[styleProps.verticalBelow] : null, css$1(_templateObject5(), !styleProps.isFilled && css$1(_templateObject6()), theme(styleProps.themeKey, "css.vertical")(styleProps)), {
else: css$1(_templateObject7(), space(styleProps.spacing)(styleProps), space(styleProps.spacing)(styleProps), theme(styleProps.themeKey, "css.horizontal")(styleProps))
})(styleProps)), styleProps.orientation === 'vertical' ? css$1(_templateObject8(), space(styleProps.spacing)(styleProps), theme(styleProps.themeKey, "css.child.vertical")(styleProps)) : css$1(_templateObject9(), breakpoint(styleProps.verticalBelow ? "max-" + verticalBreakpoints[styleProps.verticalBelow] : null, css$1(_templateObject10(), space(styleProps.spacing)(styleProps), theme(styleProps.themeKey, "css.child.vertical")(styleProps)), {
else: css$1(_templateObject11(), space(styleProps.spacing)(styleProps), space(styleProps.spacing)(styleProps), theme(styleProps.themeKey, "css.child.horizontal")(styleProps))
})(styleProps)), theme(styleProps.themeKey, "css.child.root")(styleProps), theme(styleProps.themeKey, "css.child.first")(styleProps), theme(styleProps.themeKey, "css.child.middle")(styleProps), theme(styleProps.themeKey, "css.child.last")(styleProps), theme(styleProps.themeKey, "css.root")(styleProps));
};
var styles = /*#__PURE__*/Object.freeze({
Set: Set
});
export { Set as S, styles as s };