UNPKG

fannypack-v5

Version:

An accessible, composable, and friendly React UI Kit

166 lines (139 loc) 5.39 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 { theme, palette, fontWeight } 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'; import { getHiddenInputStyles } from '../utils/getHiddenInputStyles.js'; function _templateObject8() { var data = _taggedTemplateLiteralLoose(["\n & {\n ", ";\n }\n"]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteralLoose(["\n & {\n ", ";\n }\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteralLoose(["\n & {\n ", ";\n }\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n background: ", ";\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteralLoose(["\n background: ", ";\n border-radius: 50%;\n content: '';\n height: 0.5em;\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 0.5em;\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteralLoose(["\n && {\n font-weight: ", ";\n }\n\n & {\n ", ";\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteralLoose(["\n -webkit-appearance: none;\n background-color: ", ";\n border: 1px solid #bdbdbd;\n border-radius: 100%;\n height: 1em;\n position: relative;\n min-width: 1em;\n width: 1em;\n transition: box-shadow 0.1s ease-in-out 0s, border-color 0.1s, background-color 0.1s;\n\n & {\n ", ";\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteralLoose(["\n && {\n display: flex;\n align-items: flex-start;\n }\n\n & {\n ", ";\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } var Radio = function Radio(styleProps) { return css(_templateObject(), theme(styleProps.themeKey, "css.root")(styleProps)); }; var RadioIcon = function RadioIcon(styleProps) { return css(_templateObject2(), palette('background')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var RadioLabel = function RadioLabel(styleProps) { return css(_templateObject3(), fontWeight('normal')(styleProps), theme(styleProps.themeKey, "css.root")(styleProps)); }; var HiddenRadio = function HiddenRadio(styleProps) { return getHiddenInputStyles({ iconClassName: 'fp-RadioIcon', checkedIconCss: css$1(_templateObject4(), palette('primary')(styleProps)), disabledCheckedIconCss: css$1(_templateObject5(), palette('gray300')(styleProps), palette('gray300')(styleProps)), styleProps: styleProps, themeKey: 'Radio.Icon' }); }; var RadioField = function RadioField(styleProps) { return css(_templateObject6(), theme(styleProps.themeKey, "css.root")(styleProps)); }; var RadioGroup = function RadioGroup(styleProps) { return css(_templateObject7(), theme(styleProps.themeKey, "css.root")(styleProps)); }; var RadioGroupField = function RadioGroupField(styleProps) { return css(_templateObject8(), theme(styleProps.themeKey, "css.root")(styleProps)); }; var styles = /*#__PURE__*/Object.freeze({ Radio: Radio, RadioIcon: RadioIcon, RadioLabel: RadioLabel, HiddenRadio: HiddenRadio, RadioField: RadioField, RadioGroup: RadioGroup, RadioGroupField: RadioGroupField }); export { HiddenRadio as H, Radio as R, RadioIcon as a, RadioLabel as b, RadioField as c, RadioGroup as d, RadioGroupField as e, styles as s };