fannypack-v5
Version:
An accessible, composable, and friendly React UI Kit
127 lines (106 loc) • 5.14 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, space, fontSize, fontWeight, palette } 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 _templateObject6() {
var data = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n box-shadow: inset 3px 0 0 0 ", ";\n\n & {\n ", ";\n }\n "]);
_templateObject6 = function _templateObject6() {
return data;
};
return data;
}
function _templateObject5() {
var data = _taggedTemplateLiteralLoose(["\n align-items: center;\n color: ", ";\n cursor: pointer;\n display: flex;\n min-height: 2.75em;\n padding: 0 1rem;\n padding-left: ", "rem;\n transition: box-shadow 0.1s ease-in-out 0s, background-color 0.1s, color 0.1s;\n\n a& {\n color: ", ";\n fill: ", ";\n text-decoration: unset;\n\n &:hover {\n color: ", ";\n fill: ", ";\n }\n }\n\n &&&:hover {\n color: ", ";\n\n & {\n ", ";\n }\n }\n\n &:focus {\n outline: unset;\n background-color: ", ";\n\n & {\n ", ";\n }\n }\n\n ", "\n\n & {\n ", ";\n }\n"]);
_templateObject5 = function _templateObject5() {
return data;
};
return data;
}
function _templateObject4() {
var data = _taggedTemplateLiteralLoose(["\n font-size: ", "rem;\n font-weight: ", ";\n margin-bottom: ", "rem;\n padding-left: ", "rem;\n text-transform: uppercase;\n\n & {\n ", ";\n }\n"]);
_templateObject4 = function _templateObject4() {
return data;
};
return data;
}
function _templateObject3() {
var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "rem;\n "]);
_templateObject3 = function _templateObject3() {
return data;
};
return data;
}
function _templateObject2() {
var data = _taggedTemplateLiteralLoose(["\n &&& {\n margin-left: unset;\n }\n\n ", "\n\n & {\n ", ";\n }\n"]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n\n & {\n ", ";\n }\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
var SideNav = function SideNav(styleProps) {
return css(_templateObject(), theme(styleProps.themeKey, "css.root")(styleProps));
};
var SideNavLevel = function SideNavLevel(styleProps) {
return css(_templateObject2(), styleProps.level === 0 && css$1(_templateObject3(), space(3, 'major')(styleProps)), theme(styleProps.themeKey, "css.root")(styleProps));
};
var SideNavLevelTitle = function SideNavLevelTitle(styleProps) {
return css(_templateObject4(), fontSize('150')(styleProps), fontWeight('semibold')(styleProps), space(2)(styleProps), styleProps.level + 1, theme(styleProps.themeKey, "css.root")(styleProps));
};
var SideNavItem = function SideNavItem(styleProps) {
return css(_templateObject5(), palette('text200')(styleProps), styleProps.level === 1 ? space(3, 'major')(styleProps) : styleProps.level, palette('text200')(styleProps), palette('text200')(styleProps), palette('text200')(styleProps), palette('text200')(styleProps), palette('primary')(styleProps), theme(styleProps.themeKey, "css.hover")(styleProps), palette('primaryTint')(styleProps), theme(styleProps.themeKey, "css.focus")(styleProps), styleProps.isActive && css$1(_templateObject6(), palette('primaryTint')(styleProps), palette('primary')(styleProps), theme(styleProps.themeKey, "css.active")(styleProps)), theme(styleProps.themeKey, "css.root")(styleProps));
};
var styles = /*#__PURE__*/Object.freeze({
SideNav: SideNav,
SideNavLevel: SideNavLevel,
SideNavLevelTitle: SideNavLevelTitle,
SideNavItem: SideNavItem
});
export { SideNav as S, SideNavLevel as a, SideNavLevelTitle as b, SideNavItem as c, styles as s };