1 | 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; }
|
2 |
|
3 | export var resetForm = function resetForm(token) {
|
4 | var _ref;
|
5 |
|
6 | var colorText = token.colorText,
|
7 | colorTextSecondary = token.colorTextSecondary,
|
8 | fontSizeLG = token.fontSizeLG,
|
9 | lineHeight = token.lineHeight,
|
10 | lineWidth = token.lineWidth,
|
11 | lineType = token.lineType,
|
12 | colorBorder = token.colorBorder,
|
13 | fontSize = token.fontSize;
|
14 | return _ref = {
|
15 |
|
16 | legend: {
|
17 | display: 'block',
|
18 | width: '100%',
|
19 | marginBottom: '20px',
|
20 | padding: '0',
|
21 | color: colorTextSecondary,
|
22 | fontSize: fontSizeLG,
|
23 | lineHeight: 'inherit',
|
24 | border: '0',
|
25 | borderBottom: "".concat(lineWidth, "px ").concat(lineType, " ").concat(colorBorder)
|
26 | },
|
27 | label: {
|
28 | fontSize: fontSize
|
29 | }
|
30 | }, _defineProperty(_ref, "input[type='search']", {
|
31 | boxSizing: 'border-box'
|
32 | }), _defineProperty(_ref, "input[type='radio'], input[type='checkbox']", {
|
33 | lineHeight: 'normal'
|
34 | }), _defineProperty(_ref, "input[type='file']", {
|
35 | display: 'block'
|
36 | }), _defineProperty(_ref, "input[type='range']", {
|
37 | display: 'block',
|
38 | width: '100%'
|
39 | }), _defineProperty(_ref, 'select[multiple], select[size]', {
|
40 | height: 'auto'
|
41 | }), _defineProperty(_ref, "input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus", [{
|
42 | outline: 'thin dotted'
|
43 | }, {
|
44 | outline: '5px auto -webkit-focus-ring-color',
|
45 | outlineOffset: '-2px'
|
46 | }]), _defineProperty(_ref, "output", {
|
47 | display: 'block',
|
48 | paddingTop: '15px',
|
49 | color: colorText,
|
50 | fontSize: fontSize,
|
51 | lineHeight: lineHeight
|
52 | }), _ref;
|
53 | };
|
54 | export var genFormControlValidation = function genFormControlValidation(componentCls, colorText) {
|
55 | return _defineProperty({}, "".concat(componentCls, "-explain, ").concat(componentCls, "-split"), {
|
56 | color: colorText
|
57 | });
|
58 | }; |
\ | No newline at end of file |