fannypack-v5
Version:
An accessible, composable, and friendly React UI Kit
91 lines (80 loc) • 4.39 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 './useTheme.js';
import { a as _taggedTemplateLiteralLoose } from '../chunk-0c448560.js';
import 'lodash/kebabCase';
import 'tinycolor2';
import './isFunction.js';
import './get.js';
import { palette, theme } from './theme.js';
import './omit.js';
import './pick.js';
import './cssProps.js';
import './useLocalStorage.js';
import '../Provider/ColorModeContext.js';
import './useColorMode.js';
import './useStyle.js';
import './omitBy.js';
import './useDefaultProps.js';
import './useDebounce.js';
import 'lodash/uniq';
import './useClassName.js';
import './useBreakpoint.js';
import './uniqueId.js';
import './times.js';
import './parseIcons.js';
import './colors.js';
import './palette.js';
import './mergeRefs.js';
import 'deepmerge';
import 'lodash/set';
import './applyTheme.js';
import './bindFns.js';
import './createComponent.js';
import './createElement.js';
import './createHook.js';
import './forwardRefWithUse.js';
import './fieldAdaptors.js';
import '@emotion/is-prop-valid';
import './htmlProps.js';
import './OutsideClickHandler.js';
function _templateObject3() {
var data = _taggedTemplateLiteralLoose(["\n box-shadow: ", " 0px 0px 0px 3px !important;\n "]);
_templateObject3 = function _templateObject3() {
return data;
};
return data;
}
function _templateObject2() {
var data = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n "]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = _taggedTemplateLiteralLoose(["\n height: 1em;\n width: 1em;\n overflow: hidden;\n position: absolute;\n opacity: 0;\n\n &:focus {\n outline: none;\n }\n\n & + .", " {\n ", "\n\n &::before {\n ", ";\n\n & {\n ", ";\n }\n }\n }\n &:not(:checked) + .", " {\n ", "\n }\n &[disabled] + .", " {\n background-color: ", ";\n box-shadow: unset;\n\n &::before {\n ", ";\n & {\n ", ";\n }\n }\n\n & {\n ", ";\n }\n }\n &:focus + .", " {\n border-color: ", ";\n box-shadow: ", " 0px 0px 0px 3px !important;\n\n & {\n ", ";\n }\n }\n &:not([disabled]):checked + .", " {\n border-color: ", ";\n ", ";\n }\n &:checked + .", " {\n ", ";\n\n &::before {\n ", ";\n }\n\n & {\n ", ";\n }\n }\n &[disabled]:checked + .", "::before {\n ", ";\n\n & {\n ", ";\n }\n }\n\n & {\n ", ";\n }\n "]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
function getHiddenInputStyles(_ref) {
var iconClassName = _ref.iconClassName,
checkedCss = _ref.checkedCss,
disabledCheckedCss = _ref.disabledCheckedCss,
disabledCheckedIconCss = _ref.disabledCheckedIconCss,
disabledUncheckedIconCss = _ref.disabledUncheckedIconCss,
checkedIconCss = _ref.checkedIconCss,
uncheckedIconCss = _ref.uncheckedIconCss,
styleProps = _ref.styleProps,
themeKey = _ref.themeKey;
// @ts-ignore
return css(_templateObject(), iconClassName, styleProps.state && css$1(_templateObject2(), palette("" + styleProps.state)(styleProps)), uncheckedIconCss, theme(themeKey, "unchecked")(styleProps), iconClassName, styleProps.state && css$1(_templateObject3(), palette(styleProps.state + "Tint")(styleProps)), iconClassName, palette('white700')(styleProps), disabledUncheckedIconCss, theme(themeKey, "uncheckedDisabled")(styleProps), theme(themeKey, "disabled")(styleProps), iconClassName, palette("" + (styleProps.palette || 'primary'))(styleProps), palette((styleProps.palette || 'primary') + "100")(styleProps), theme(themeKey, "focusChecked")(styleProps), iconClassName, palette("" + (styleProps.palette || 'primary'))(styleProps), checkedCss, iconClassName, disabledCheckedCss, checkedIconCss, theme(themeKey, "checked")(styleProps), iconClassName, disabledCheckedIconCss, theme(themeKey, "checkedDisabled")(styleProps), theme(styleProps.themeKey, "css.root")(styleProps));
}
export { getHiddenInputStyles };