text: "use strict";
  
  exports.__esModule = true;
  exports["default"] = void 0;
  
  var _anatomy = require("@chakra-ui/anatomy");
  
  var _themeTools = require("@chakra-ui/theme-tools");
  
  var baseStyle = {
    field: {
      width: "100%",
      minWidth: 0,
      outline: 0,
      position: "relative",
      appearance: "none",
      transitionProperty: "common",
      transitionDuration: "normal"
    }
  };
  var size = {
    lg: {
      fontSize: "lg",
      px: 4,
      h: 12,
      borderRadius: "md"
    },
    md: {
      fontSize: "md",
      px: 4,
      h: 10,
      borderRadius: "md"
    },
    sm: {
      fontSize: "sm",
      px: 3,
      h: 8,
      borderRadius: "sm"
    },
    xs: {
      fontSize: "xs",
      px: 2,
      h: 6,
      borderRadius: "sm"
    }
  };
  var sizes = {
    lg: {
      field: size.lg,
      addon: size.lg
    },
    md: {
      field: size.md,
      addon: size.md
    },
    sm: {
      field: size.sm,
      addon: size.sm
    },
    xs: {
      field: size.xs,
      addon: size.xs
    }
  };
  
  function getDefaults(props) {
    var fc = props.focusBorderColor,
        ec = props.errorBorderColor;
    return {
      focusBorderColor: fc || (0, _themeTools.mode)("blue.500", "blue.300")(props),
      errorBorderColor: ec || (0, _themeTools.mode)("red.500", "red.300")(props)
    };
  }
  
  var variantOutline = function variantOutline(props) {
    var theme = props.theme;
  
    var _getDefaults = getDefaults(props),
        fc = _getDefaults.focusBorderColor,
        ec = _getDefaults.errorBorderColor;
  
    return {
      field: {
        border: "1px solid",
        borderColor: "inherit",
        bg: "inherit",
        _hover: {
          borderColor: (0, _themeTools.mode)("gray.300", "whiteAlpha.400")(props)
        },
        _readOnly: {
          boxShadow: "none !important",
          userSelect: "all"
        },
        _disabled: {
          opacity: 0.4,
          cursor: "not-allowed"
        },
        _invalid: {
          borderColor: (0, _themeTools.getColor)(theme, ec),
          boxShadow: "0 0 0 1px " + (0, _themeTools.getColor)(theme, ec)
        },
        _focus: {
          zIndex: 1,
          borderColor: (0, _themeTools.getColor)(theme, fc),
          boxShadow: "0 0 0 1px " + (0, _themeTools.getColor)(theme, fc)
        }
      },
      addon: {
        border: "1px solid",
        borderColor: (0, _themeTools.mode)("inherit", "whiteAlpha.50")(props),
        bg: (0, _themeTools.mode)("gray.100", "whiteAlpha.300")(props)
      }
    };
  };
  
  var variantFilled = function variantFilled(props) {
    var theme = props.theme;
  
    var _getDefaults2 = getDefaults(props),
        fc = _getDefaults2.focusBorderColor,
        ec = _getDefaults2.errorBorderColor;
  
    return {
      field: {
        border: "2px solid",
        borderColor: "transparent",
        bg: (0, _themeTools.mode)("gray.100", "whiteAlpha.50")(props),
        _hover: {
          bg: (0, _themeTools.mode)("gray.200", "whiteAlpha.100")(props)
        },
        _readOnly: {
          boxShadow: "none !important",
          userSelect: "all"
        },
        _disabled: {
          opacity: 0.4,
          cursor: "not-allowed"
        },
        _invalid: {
          borderColor: (0, _themeTools.getColor)(theme, ec)
        },
        _focus: {
          bg: "transparent",
          borderColor: (0, _themeTools.getColor)(theme, fc)
        }
      },
      addon: {
        border: "2px solid",
        borderColor: "transparent",
        bg: (0, _themeTools.mode)("gray.100", "whiteAlpha.50")(props)
      }
    };
  };
  
  var variantFlushed = function variantFlushed(props) {
    var theme = props.theme;
  
    var _getDefaults3 = getDefaults(props),
        fc = _getDefaults3.focusBorderColor,
        ec = _getDefaults3.errorBorderColor;
  
    return {
      field: {
        borderBottom: "1px solid",
        borderColor: "inherit",
        borderRadius: 0,
        px: 0,
        bg: "transparent",
        _readOnly: {
          boxShadow: "none !important",
          userSelect: "all"
        },
        _invalid: {
          borderColor: (0, _themeTools.getColor)(theme, ec),
          boxShadow: "0px 1px 0px 0px " + (0, _themeTools.getColor)(theme, ec)
        },
        _focus: {
          borderColor: (0, _themeTools.getColor)(theme, fc),
          boxShadow: "0px 1px 0px 0px " + (0, _themeTools.getColor)(theme, fc)
        }
      },
      addon: {
        borderBottom: "2px solid",
        borderColor: "inherit",
        borderRadius: 0,
        px: 0,
        bg: "transparent"
      }
    };
  };
  
  var variantUnstyled = {
    field: {
      bg: "transparent",
      px: 0,
      height: "auto"
    },
    addon: {
      bg: "transparent",
      px: 0,
      height: "auto"
    }
  };
  var variants = {
    outline: variantOutline,
    filled: variantFilled,
    flushed: variantFlushed,
    unstyled: variantUnstyled
  };
  var defaultProps = {
    size: "md",
    variant: "outline"
  };
  var _default = {
    parts: _anatomy.inputAnatomy.keys,
    baseStyle: baseStyle,
    sizes: sizes,
    variants: variants,
    defaultProps: defaultProps
  };
  exports["default"] = _default;
  //# sourceMappingURL=input.js.map