UNPKG

@ant-design/compatible

Version:

Ant Design v3 to v4 compatible package

58 lines (56 loc) 2.05 kB
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } export var resetForm = function resetForm(token) { var _ref; var colorText = token.colorText, colorTextSecondary = token.colorTextSecondary, fontSizeLG = token.fontSizeLG, lineHeight = token.lineHeight, lineWidth = token.lineWidth, lineType = token.lineType, colorBorder = token.colorBorder, fontSize = token.fontSize; return _ref = { // Based on Bootstrap framework legend: { display: 'block', width: '100%', marginBottom: '20px', padding: '0', color: colorTextSecondary, fontSize: fontSizeLG, lineHeight: 'inherit', border: '0', borderBottom: "".concat(lineWidth, "px ").concat(lineType, " ").concat(colorBorder) }, label: { fontSize: fontSize } }, _defineProperty(_ref, "input[type='search']", { boxSizing: 'border-box' }), _defineProperty(_ref, "input[type='radio'], input[type='checkbox']", { lineHeight: 'normal' }), _defineProperty(_ref, "input[type='file']", { display: 'block' }), _defineProperty(_ref, "input[type='range']", { display: 'block', width: '100%' }), _defineProperty(_ref, 'select[multiple], select[size]', { height: 'auto' }), _defineProperty(_ref, "input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus", [{ outline: 'thin dotted' }, { outline: '5px auto -webkit-focus-ring-color', outlineOffset: '-2px' }]), _defineProperty(_ref, "output", { display: 'block', paddingTop: '15px', color: colorText, fontSize: fontSize, lineHeight: lineHeight }), _ref; }; export var genFormControlValidation = function genFormControlValidation(componentCls, colorText) { return _defineProperty({}, "".concat(componentCls, "-explain, ").concat(componentCls, "-split"), { color: colorText }); };