Latest updates from IceHrmPro
This commit is contained in:
24
web/node_modules/antd/es/form/Form.d.ts
generated
vendored
Normal file
24
web/node_modules/antd/es/form/Form.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import * as React from 'react';
|
||||
import { List } from 'rc-field-form';
|
||||
import { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
|
||||
import { ColProps } from '../grid/col';
|
||||
import { FormLabelAlign } from './interface';
|
||||
import { useForm, FormInstance } from './util';
|
||||
import { SizeType } from '../config-provider/SizeContext';
|
||||
export declare type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
||||
export interface FormProps extends Omit<RcFormProps, 'form'> {
|
||||
prefixCls?: string;
|
||||
hideRequiredMark?: boolean;
|
||||
colon?: boolean;
|
||||
name?: string;
|
||||
layout?: FormLayout;
|
||||
labelAlign?: FormLabelAlign;
|
||||
labelCol?: ColProps;
|
||||
wrapperCol?: ColProps;
|
||||
form?: FormInstance;
|
||||
size?: SizeType;
|
||||
scrollToFirstError?: boolean;
|
||||
}
|
||||
declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<FormInstance>>;
|
||||
export { useForm, List, FormInstance };
|
||||
export default Form;
|
||||
99
web/node_modules/antd/es/form/Form.js
generated
vendored
Normal file
99
web/node_modules/antd/es/form/Form.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
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; }
|
||||
|
||||
import * as React from 'react';
|
||||
import omit from 'omit.js';
|
||||
import classNames from 'classnames';
|
||||
import FieldForm, { List } from 'rc-field-form';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import { FormContext } from './context';
|
||||
import { useForm } from './util';
|
||||
import SizeContext, { SizeContextProvider } from '../config-provider/SizeContext';
|
||||
|
||||
var InternalForm = function InternalForm(props, ref) {
|
||||
var _classNames;
|
||||
|
||||
var contextSize = React.useContext(SizeContext);
|
||||
|
||||
var _React$useContext = React.useContext(ConfigContext),
|
||||
getPrefixCls = _React$useContext.getPrefixCls,
|
||||
direction = _React$useContext.direction;
|
||||
|
||||
var form = props.form,
|
||||
colon = props.colon,
|
||||
name = props.name,
|
||||
labelAlign = props.labelAlign,
|
||||
labelCol = props.labelCol,
|
||||
wrapperCol = props.wrapperCol,
|
||||
customizePrefixCls = props.prefixCls,
|
||||
hideRequiredMark = props.hideRequiredMark,
|
||||
_props$className = props.className,
|
||||
className = _props$className === void 0 ? '' : _props$className,
|
||||
_props$layout = props.layout,
|
||||
layout = _props$layout === void 0 ? 'horizontal' : _props$layout,
|
||||
_props$size = props.size,
|
||||
size = _props$size === void 0 ? contextSize : _props$size,
|
||||
scrollToFirstError = props.scrollToFirstError,
|
||||
onFinishFailed = props.onFinishFailed;
|
||||
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
||||
var formClassName = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(layout), true), _defineProperty(_classNames, "".concat(prefixCls, "-hide-required-mark"), hideRequiredMark), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _classNames), className);
|
||||
var formProps = omit(props, ['prefixCls', 'className', 'layout', 'hideRequiredMark', 'wrapperCol', 'labelAlign', 'labelCol', 'colon', 'scrollToFirstError']);
|
||||
|
||||
var _useForm = useForm(form),
|
||||
_useForm2 = _slicedToArray(_useForm, 1),
|
||||
wrapForm = _useForm2[0];
|
||||
|
||||
wrapForm.__INTERNAL__.name = name;
|
||||
var formContextValue = React.useMemo(function () {
|
||||
return {
|
||||
name: name,
|
||||
labelAlign: labelAlign,
|
||||
labelCol: labelCol,
|
||||
wrapperCol: wrapperCol,
|
||||
vertical: layout === 'vertical',
|
||||
colon: colon
|
||||
};
|
||||
}, [name, labelAlign, labelCol, wrapperCol, layout, colon]);
|
||||
React.useImperativeHandle(ref, function () {
|
||||
return wrapForm;
|
||||
});
|
||||
|
||||
var onInternalFinishFailed = function onInternalFinishFailed(errorInfo) {
|
||||
if (onFinishFailed) {
|
||||
onFinishFailed(errorInfo);
|
||||
}
|
||||
|
||||
if (scrollToFirstError && errorInfo.errorFields.length) {
|
||||
wrapForm.scrollToField(errorInfo.errorFields[0].name);
|
||||
}
|
||||
};
|
||||
|
||||
return /*#__PURE__*/React.createElement(SizeContextProvider, {
|
||||
size: size
|
||||
}, /*#__PURE__*/React.createElement(FormContext.Provider, {
|
||||
value: formContextValue
|
||||
}, /*#__PURE__*/React.createElement(FieldForm, _extends({
|
||||
id: name
|
||||
}, formProps, {
|
||||
onFinishFailed: onInternalFinishFailed,
|
||||
form: wrapForm,
|
||||
className: formClassName
|
||||
}))));
|
||||
};
|
||||
|
||||
var Form = React.forwardRef(InternalForm);
|
||||
export { useForm, List };
|
||||
export default Form;
|
||||
25
web/node_modules/antd/es/form/FormItem.d.ts
generated
vendored
Normal file
25
web/node_modules/antd/es/form/FormItem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import * as React from 'react';
|
||||
import { FormInstance } from 'rc-field-form';
|
||||
import { FieldProps } from 'rc-field-form/lib/Field';
|
||||
import { FormItemLabelProps } from './FormItemLabel';
|
||||
import { FormItemInputProps } from './FormItemInput';
|
||||
declare const ValidateStatuses: ["success", "warning", "error", "validating", ""];
|
||||
export declare type ValidateStatus = typeof ValidateStatuses[number];
|
||||
declare type RenderChildren = (form: FormInstance) => React.ReactNode;
|
||||
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
||||
declare type ChildrenType = RenderChildren | React.ReactNode;
|
||||
export interface FormItemProps extends FormItemLabelProps, FormItemInputProps, RcFieldProps {
|
||||
prefixCls?: string;
|
||||
noStyle?: boolean;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
children: ChildrenType;
|
||||
id?: string;
|
||||
hasFeedback?: boolean;
|
||||
validateStatus?: ValidateStatus;
|
||||
required?: boolean;
|
||||
/** Auto passed by List render props. User should not use this. */
|
||||
fieldKey?: number;
|
||||
}
|
||||
declare function FormItem(props: FormItemProps): React.ReactElement;
|
||||
export default FormItem;
|
||||
298
web/node_modules/antd/es/form/FormItem.js
generated
vendored
Normal file
298
web/node_modules/antd/es/form/FormItem.js
generated
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||
|
||||
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; }
|
||||
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
import * as React from 'react';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import classNames from 'classnames';
|
||||
import { Field } from 'rc-field-form';
|
||||
import omit from 'omit.js';
|
||||
import Row from '../grid/row';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import { tuple } from '../_util/type';
|
||||
import warning from '../_util/warning';
|
||||
import FormItemLabel from './FormItemLabel';
|
||||
import FormItemInput from './FormItemInput';
|
||||
import { FormContext, FormItemContext } from './context';
|
||||
import { toArray, getFieldId, useFrameState } from './util';
|
||||
var ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '');
|
||||
var MemoInput = React.memo(function (_ref) {
|
||||
var children = _ref.children;
|
||||
return children;
|
||||
}, function (prev, next) {
|
||||
return prev.value === next.value && prev.update === next.update;
|
||||
});
|
||||
|
||||
function hasValidName(name) {
|
||||
if (name === null) {
|
||||
warning(false, 'Form.Item', '`null` is passed as `name` property');
|
||||
}
|
||||
|
||||
return !(name === undefined || name === null);
|
||||
}
|
||||
|
||||
function FormItem(props) {
|
||||
var name = props.name,
|
||||
fieldKey = props.fieldKey,
|
||||
noStyle = props.noStyle,
|
||||
dependencies = props.dependencies,
|
||||
customizePrefixCls = props.prefixCls,
|
||||
style = props.style,
|
||||
className = props.className,
|
||||
shouldUpdate = props.shouldUpdate,
|
||||
hasFeedback = props.hasFeedback,
|
||||
help = props.help,
|
||||
rules = props.rules,
|
||||
validateStatus = props.validateStatus,
|
||||
children = props.children,
|
||||
required = props.required,
|
||||
label = props.label,
|
||||
_props$trigger = props.trigger,
|
||||
trigger = _props$trigger === void 0 ? 'onChange' : _props$trigger,
|
||||
_props$validateTrigge = props.validateTrigger,
|
||||
validateTrigger = _props$validateTrigge === void 0 ? 'onChange' : _props$validateTrigge,
|
||||
restProps = __rest(props, ["name", "fieldKey", "noStyle", "dependencies", "prefixCls", "style", "className", "shouldUpdate", "hasFeedback", "help", "rules", "validateStatus", "children", "required", "label", "trigger", "validateTrigger"]);
|
||||
|
||||
var destroyRef = React.useRef(false);
|
||||
|
||||
var _React$useContext = React.useContext(ConfigContext),
|
||||
getPrefixCls = _React$useContext.getPrefixCls;
|
||||
|
||||
var formContext = React.useContext(FormContext);
|
||||
|
||||
var _React$useContext2 = React.useContext(FormItemContext),
|
||||
updateItemErrors = _React$useContext2.updateItemErrors;
|
||||
|
||||
var _React$useState = React.useState(!!help),
|
||||
_React$useState2 = _slicedToArray(_React$useState, 2),
|
||||
domErrorVisible = _React$useState2[0],
|
||||
innerSetDomErrorVisible = _React$useState2[1];
|
||||
|
||||
var _useFrameState = useFrameState({}),
|
||||
_useFrameState2 = _slicedToArray(_useFrameState, 2),
|
||||
inlineErrors = _useFrameState2[0],
|
||||
setInlineErrors = _useFrameState2[1];
|
||||
|
||||
function setDomErrorVisible(visible) {
|
||||
if (!destroyRef.current) {
|
||||
innerSetDomErrorVisible(visible);
|
||||
}
|
||||
}
|
||||
|
||||
var formName = formContext.name;
|
||||
var hasName = hasValidName(name); // Cache Field NamePath
|
||||
|
||||
var nameRef = React.useRef([]); // Should clean up if Field removed
|
||||
|
||||
React.useEffect(function () {
|
||||
return function () {
|
||||
destroyRef.current = true;
|
||||
updateItemErrors(nameRef.current.join('__SPLIT__'), []);
|
||||
};
|
||||
}, []);
|
||||
var prefixCls = getPrefixCls('form', customizePrefixCls); // ======================== Errors ========================
|
||||
// Collect noStyle Field error to the top FormItem
|
||||
|
||||
var updateChildItemErrors = noStyle ? updateItemErrors : function (subName, subErrors) {
|
||||
if (!isEqual(inlineErrors[subName], subErrors)) {
|
||||
setInlineErrors(function (prevInlineErrors) {
|
||||
return _extends(_extends({}, prevInlineErrors), _defineProperty({}, subName, subErrors));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function renderLayout(baseChildren, fieldId, meta, isRequired) {
|
||||
var _itemClassName;
|
||||
|
||||
if (noStyle) {
|
||||
return baseChildren;
|
||||
} // ======================== Errors ========================
|
||||
|
||||
|
||||
var mergedErrors;
|
||||
|
||||
if (help !== undefined && help !== null) {
|
||||
mergedErrors = toArray(help);
|
||||
} else {
|
||||
mergedErrors = meta ? meta.errors : [];
|
||||
Object.keys(inlineErrors).forEach(function (subName) {
|
||||
var subErrors = inlineErrors[subName] || [];
|
||||
|
||||
if (subErrors.length) {
|
||||
mergedErrors = [].concat(_toConsumableArray(mergedErrors), _toConsumableArray(subErrors));
|
||||
}
|
||||
});
|
||||
} // ======================== Status ========================
|
||||
|
||||
|
||||
var mergedValidateStatus = '';
|
||||
|
||||
if (validateStatus !== undefined) {
|
||||
mergedValidateStatus = validateStatus;
|
||||
} else if (meta && meta.validating) {
|
||||
mergedValidateStatus = 'validating';
|
||||
} else if (!help && mergedErrors.length) {
|
||||
mergedValidateStatus = 'error';
|
||||
} else if (meta && meta.touched) {
|
||||
mergedValidateStatus = 'success';
|
||||
}
|
||||
|
||||
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), domErrorVisible || help), _defineProperty(_itemClassName, "".concat(className), !!className), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-feedback"), mergedValidateStatus && hasFeedback), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-success"), mergedValidateStatus === 'success'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-warning"), mergedValidateStatus === 'warning'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-error"), mergedValidateStatus === 'error'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-error-leave"), !help && domErrorVisible && mergedValidateStatus !== 'error'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-is-validating"), mergedValidateStatus === 'validating'), _itemClassName); // ======================= Children =======================
|
||||
|
||||
return /*#__PURE__*/React.createElement(Row, _extends({
|
||||
className: classNames(itemClassName),
|
||||
style: style,
|
||||
key: "row"
|
||||
}, omit(restProps, ['colon', 'extra', 'getValueFromEvent', 'hasFeedback', 'help', 'htmlFor', 'id', 'label', 'labelAlign', 'labelCol', 'normalize', 'required', 'validateFirst', 'validateStatus', 'valuePropName', 'wrapperCol'])), /*#__PURE__*/React.createElement(FormItemLabel, _extends({
|
||||
htmlFor: fieldId,
|
||||
required: isRequired
|
||||
}, props, {
|
||||
prefixCls: prefixCls
|
||||
})), /*#__PURE__*/React.createElement(FormItemInput, _extends({}, props, meta, {
|
||||
errors: mergedErrors,
|
||||
prefixCls: prefixCls,
|
||||
onDomErrorVisibleChange: setDomErrorVisible,
|
||||
validateStatus: mergedValidateStatus
|
||||
}), /*#__PURE__*/React.createElement(FormItemContext.Provider, {
|
||||
value: {
|
||||
updateItemErrors: updateChildItemErrors
|
||||
}
|
||||
}, baseChildren)));
|
||||
}
|
||||
|
||||
var isRenderProps = typeof children === 'function'; // Record for real component render
|
||||
|
||||
var updateRef = React.useRef(0);
|
||||
updateRef.current += 1;
|
||||
|
||||
if (!hasName && !isRenderProps && !dependencies) {
|
||||
return renderLayout(children);
|
||||
}
|
||||
|
||||
var variables = {};
|
||||
|
||||
if (typeof label === 'string') {
|
||||
variables.label = label;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(Field, _extends({}, props, {
|
||||
messageVariables: variables,
|
||||
trigger: trigger,
|
||||
validateTrigger: validateTrigger,
|
||||
onReset: function onReset() {
|
||||
setDomErrorVisible(false);
|
||||
}
|
||||
}), function (control, meta, context) {
|
||||
var errors = meta.errors;
|
||||
var mergedName = toArray(name).length && meta ? meta.name : [];
|
||||
var fieldId = getFieldId(mergedName, formName);
|
||||
|
||||
if (noStyle) {
|
||||
nameRef.current = _toConsumableArray(mergedName);
|
||||
|
||||
if (fieldKey) {
|
||||
nameRef.current[nameRef.current.length - 1] = fieldKey;
|
||||
}
|
||||
|
||||
updateItemErrors(nameRef.current.join('__SPLIT__'), errors);
|
||||
}
|
||||
|
||||
var isRequired = required !== undefined ? required : !!(rules && rules.some(function (rule) {
|
||||
if (rule && _typeof(rule) === 'object' && rule.required) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof rule === 'function') {
|
||||
var ruleEntity = rule(context);
|
||||
return ruleEntity && ruleEntity.required;
|
||||
}
|
||||
|
||||
return false;
|
||||
})); // ======================= Children =======================
|
||||
|
||||
var mergedControl = _extends(_extends({}, control), {
|
||||
id: fieldId
|
||||
});
|
||||
|
||||
var childNode = null;
|
||||
|
||||
if (Array.isArray(children) && hasName) {
|
||||
warning(false, 'Form.Item', '`children` is array of render props cannot have `name`.');
|
||||
childNode = children;
|
||||
} else if (isRenderProps && (!shouldUpdate || hasName)) {
|
||||
warning(!!shouldUpdate, 'Form.Item', '`children` of render props only work with `shouldUpdate`.');
|
||||
warning(!hasName, 'Form.Item', "Do not use `name` with `children` of render props since it's not a field.");
|
||||
} else if (dependencies && !isRenderProps && !hasName) {
|
||||
warning(false, 'Form.Item', 'Must set `name` or use render props when `dependencies` is set.');
|
||||
} else if (React.isValidElement(children)) {
|
||||
warning(children.props.defaultValue === undefined, 'Form.Item', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.');
|
||||
|
||||
var childProps = _extends(_extends({}, children.props), mergedControl); // We should keep user origin event handler
|
||||
|
||||
|
||||
var triggers = new Set([].concat(_toConsumableArray(toArray(trigger)), _toConsumableArray(toArray(validateTrigger))));
|
||||
triggers.forEach(function (eventName) {
|
||||
childProps[eventName] = function () {
|
||||
var _a2, _c2;
|
||||
|
||||
var _a, _b, _c;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
(_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));
|
||||
(_c = (_b = children.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));
|
||||
};
|
||||
});
|
||||
childNode = /*#__PURE__*/React.createElement(MemoInput, {
|
||||
value: mergedControl[props.valuePropName || 'value'],
|
||||
update: updateRef.current
|
||||
}, React.cloneElement(children, childProps));
|
||||
} else if (isRenderProps && shouldUpdate && !hasName) {
|
||||
childNode = children(context);
|
||||
} else {
|
||||
warning(!mergedName.length, 'Form.Item', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.');
|
||||
childNode = children;
|
||||
}
|
||||
|
||||
return renderLayout(childNode, fieldId, meta, isRequired);
|
||||
});
|
||||
}
|
||||
|
||||
export default FormItem;
|
||||
18
web/node_modules/antd/es/form/FormItemInput.d.ts
generated
vendored
Normal file
18
web/node_modules/antd/es/form/FormItemInput.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as React from 'react';
|
||||
import { ColProps } from '../grid/col';
|
||||
import { ValidateStatus } from './FormItem';
|
||||
interface FormItemInputMiscProps {
|
||||
prefixCls: string;
|
||||
children: React.ReactNode;
|
||||
errors: React.ReactNode[];
|
||||
hasFeedback?: boolean;
|
||||
validateStatus?: ValidateStatus;
|
||||
onDomErrorVisibleChange: (visible: boolean) => void;
|
||||
}
|
||||
export interface FormItemInputProps {
|
||||
wrapperCol?: ColProps;
|
||||
help?: React.ReactNode;
|
||||
extra?: React.ReactNode;
|
||||
}
|
||||
declare const FormItemInput: React.FC<FormItemInputProps & FormItemInputMiscProps>;
|
||||
export default FormItemInput;
|
||||
126
web/node_modules/antd/es/form/FormItemInput.js
generated
vendored
Normal file
126
web/node_modules/antd/es/form/FormItemInput.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
||||
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
||||
import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
|
||||
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
||||
import useMemo from "rc-util/es/hooks/useMemo";
|
||||
import CSSMotion from "rc-animate/es/CSSMotion";
|
||||
import Col from '../grid/col';
|
||||
import { FormContext } from './context';
|
||||
import { useCacheErrors } from './util';
|
||||
var iconMap = {
|
||||
success: CheckCircleFilled,
|
||||
warning: ExclamationCircleFilled,
|
||||
error: CloseCircleFilled,
|
||||
validating: LoadingOutlined
|
||||
};
|
||||
|
||||
var FormItemInput = function FormItemInput(_ref) {
|
||||
var prefixCls = _ref.prefixCls,
|
||||
wrapperCol = _ref.wrapperCol,
|
||||
children = _ref.children,
|
||||
help = _ref.help,
|
||||
errors = _ref.errors,
|
||||
onDomErrorVisibleChange = _ref.onDomErrorVisibleChange,
|
||||
hasFeedback = _ref.hasFeedback,
|
||||
validateStatus = _ref.validateStatus,
|
||||
extra = _ref.extra;
|
||||
|
||||
var _React$useState = React.useState({}),
|
||||
_React$useState2 = _slicedToArray(_React$useState, 2),
|
||||
forceUpdate = _React$useState2[1];
|
||||
|
||||
var baseClassName = "".concat(prefixCls, "-item");
|
||||
var formContext = React.useContext(FormContext);
|
||||
var mergedWrapperCol = wrapperCol || formContext.wrapperCol || {};
|
||||
var className = classNames("".concat(baseClassName, "-control"), mergedWrapperCol.className);
|
||||
|
||||
var _useCacheErrors = useCacheErrors(errors, function (changedVisible) {
|
||||
if (changedVisible) {
|
||||
/**
|
||||
* We trigger in sync to avoid dom shaking but this get warning in react 16.13.
|
||||
* So use Promise to keep in micro async to handle this.
|
||||
* https://github.com/ant-design/ant-design/issues/21698#issuecomment-593743485
|
||||
*/
|
||||
Promise.resolve().then(function () {
|
||||
onDomErrorVisibleChange(true);
|
||||
});
|
||||
}
|
||||
|
||||
forceUpdate({});
|
||||
}, !!help),
|
||||
_useCacheErrors2 = _slicedToArray(_useCacheErrors, 2),
|
||||
visible = _useCacheErrors2[0],
|
||||
cacheErrors = _useCacheErrors2[1];
|
||||
|
||||
React.useEffect(function () {
|
||||
return function () {
|
||||
onDomErrorVisibleChange(false);
|
||||
};
|
||||
}, []);
|
||||
var memoErrors = useMemo(function () {
|
||||
return cacheErrors;
|
||||
}, visible, function (_, nextVisible) {
|
||||
return nextVisible;
|
||||
}); // Should provides additional icon if `hasFeedback`
|
||||
|
||||
var IconNode = validateStatus && iconMap[validateStatus];
|
||||
var icon = hasFeedback && IconNode ? /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(baseClassName, "-children-icon")
|
||||
}, /*#__PURE__*/React.createElement(IconNode, null)) : null; // Pass to sub FormItem should not with col info
|
||||
|
||||
var subFormContext = _extends({}, formContext);
|
||||
|
||||
delete subFormContext.labelCol;
|
||||
delete subFormContext.wrapperCol;
|
||||
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
||||
value: subFormContext
|
||||
}, /*#__PURE__*/React.createElement(Col, _extends({}, mergedWrapperCol, {
|
||||
className: className
|
||||
}), /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(baseClassName, "-control-input")
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(baseClassName, "-control-input-content")
|
||||
}, children), icon), /*#__PURE__*/React.createElement(CSSMotion, {
|
||||
visible: visible,
|
||||
motionName: "show-help",
|
||||
onLeaveEnd: function onLeaveEnd() {
|
||||
onDomErrorVisibleChange(false);
|
||||
},
|
||||
motionAppear: true,
|
||||
removeOnLeave: true
|
||||
}, function (_ref2) {
|
||||
var motionClassName = _ref2.className;
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(baseClassName, "-explain"), motionClassName),
|
||||
key: "help"
|
||||
}, memoErrors.map(function (error, index) {
|
||||
return (
|
||||
/*#__PURE__*/
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
React.createElement("div", {
|
||||
key: index
|
||||
}, error)
|
||||
);
|
||||
}));
|
||||
}), extra && /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(baseClassName, "-extra")
|
||||
}, extra)));
|
||||
};
|
||||
|
||||
export default FormItemInput;
|
||||
15
web/node_modules/antd/es/form/FormItemLabel.d.ts
generated
vendored
Normal file
15
web/node_modules/antd/es/form/FormItemLabel.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { ColProps } from '../grid/col';
|
||||
import { FormLabelAlign } from './interface';
|
||||
export interface FormItemLabelProps {
|
||||
colon?: boolean;
|
||||
htmlFor?: string;
|
||||
label?: React.ReactNode;
|
||||
labelAlign?: FormLabelAlign;
|
||||
labelCol?: ColProps;
|
||||
}
|
||||
declare const FormItemLabel: React.FC<FormItemLabelProps & {
|
||||
required?: boolean;
|
||||
prefixCls: string;
|
||||
}>;
|
||||
export default FormItemLabel;
|
||||
52
web/node_modules/antd/es/form/FormItemLabel.js
generated
vendored
Normal file
52
web/node_modules/antd/es/form/FormItemLabel.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
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; }
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Col from '../grid/col';
|
||||
import { FormContext } from './context';
|
||||
|
||||
var FormItemLabel = function FormItemLabel(_ref) {
|
||||
var prefixCls = _ref.prefixCls,
|
||||
label = _ref.label,
|
||||
htmlFor = _ref.htmlFor,
|
||||
labelCol = _ref.labelCol,
|
||||
labelAlign = _ref.labelAlign,
|
||||
colon = _ref.colon,
|
||||
required = _ref.required;
|
||||
if (!label) return null;
|
||||
return /*#__PURE__*/React.createElement(FormContext.Consumer, {
|
||||
key: "label"
|
||||
}, function (_ref2) {
|
||||
var _classNames;
|
||||
|
||||
var vertical = _ref2.vertical,
|
||||
contextLabelAlign = _ref2.labelAlign,
|
||||
contextLabelCol = _ref2.labelCol,
|
||||
contextColon = _ref2.colon;
|
||||
var mergedLabelCol = labelCol || contextLabelCol || {};
|
||||
var mergedLabelAlign = labelAlign || contextLabelAlign;
|
||||
var labelClsBasic = "".concat(prefixCls, "-item-label");
|
||||
var labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className);
|
||||
var labelChildren = label; // Keep label is original where there should have no colon
|
||||
|
||||
var computedColon = colon === true || contextColon !== false && colon !== false;
|
||||
var haveColon = computedColon && !vertical; // Remove duplicated user input colon
|
||||
|
||||
if (haveColon && typeof label === 'string' && label.trim() !== '') {
|
||||
labelChildren = label.replace(/[:|:]\s*$/, '');
|
||||
}
|
||||
|
||||
var labelClassName = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-item-required"), required), _defineProperty(_classNames, "".concat(prefixCls, "-item-no-colon"), !computedColon), _classNames));
|
||||
return /*#__PURE__*/React.createElement(Col, _extends({}, mergedLabelCol, {
|
||||
className: labelColClassName
|
||||
}), /*#__PURE__*/React.createElement("label", {
|
||||
htmlFor: htmlFor,
|
||||
className: labelClassName,
|
||||
title: typeof label === 'string' ? label : ''
|
||||
}, labelChildren));
|
||||
});
|
||||
};
|
||||
|
||||
export default FormItemLabel;
|
||||
18
web/node_modules/antd/es/form/FormList.d.ts
generated
vendored
Normal file
18
web/node_modules/antd/es/form/FormList.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as React from 'react';
|
||||
import { StoreValue } from 'rc-field-form/lib/interface';
|
||||
interface FieldData {
|
||||
name: number;
|
||||
key: number;
|
||||
fieldKey: number;
|
||||
}
|
||||
interface Operation {
|
||||
add: (defaultValue?: StoreValue) => void;
|
||||
remove: (index: number) => void;
|
||||
move: (from: number, to: number) => void;
|
||||
}
|
||||
interface FormListProps {
|
||||
name: string | number | (string | number)[];
|
||||
children: (fields: FieldData[], operation: Operation) => React.ReactNode;
|
||||
}
|
||||
declare const FormList: React.FC<FormListProps>;
|
||||
export default FormList;
|
||||
34
web/node_modules/antd/es/form/FormList.js
generated
vendored
Normal file
34
web/node_modules/antd/es/form/FormList.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
import * as React from 'react';
|
||||
import { List } from 'rc-field-form';
|
||||
import warning from '../_util/warning';
|
||||
|
||||
var FormList = function FormList(_a) {
|
||||
var children = _a.children,
|
||||
props = __rest(_a, ["children"]);
|
||||
|
||||
warning(!!props.name, 'Form.List', 'Miss `name` prop.');
|
||||
return /*#__PURE__*/React.createElement(List, props, function (fields, operation) {
|
||||
return children(fields.map(function (field) {
|
||||
return _extends(_extends({}, field), {
|
||||
fieldKey: field.key
|
||||
});
|
||||
}), operation);
|
||||
});
|
||||
};
|
||||
|
||||
export default FormList;
|
||||
32
web/node_modules/antd/es/form/context.d.ts
generated
vendored
Normal file
32
web/node_modules/antd/es/form/context.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as React from 'react';
|
||||
import { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext';
|
||||
import { ColProps } from '../grid/col';
|
||||
import { FormLabelAlign } from './interface';
|
||||
/**
|
||||
* Form Context
|
||||
* Set top form style and pass to Form Item usage.
|
||||
*/
|
||||
export interface FormContextProps {
|
||||
vertical: boolean;
|
||||
name?: string;
|
||||
colon?: boolean;
|
||||
labelAlign?: FormLabelAlign;
|
||||
labelCol?: ColProps;
|
||||
wrapperCol?: ColProps;
|
||||
}
|
||||
export declare const FormContext: React.Context<FormContextProps>;
|
||||
/**
|
||||
* Form Item Context
|
||||
* Used for Form noStyle Item error collection
|
||||
*/
|
||||
export interface FormItemContextProps {
|
||||
updateItemErrors: (name: string, errors: string[]) => void;
|
||||
}
|
||||
export declare const FormItemContext: React.Context<FormItemContextProps>;
|
||||
/**
|
||||
* Form Provider
|
||||
*
|
||||
*/
|
||||
export interface FormProviderProps extends Omit<RcFormProviderProps, 'validateMessages'> {
|
||||
}
|
||||
export declare const FormProvider: React.FC<FormProviderProps>;
|
||||
14
web/node_modules/antd/es/form/context.js
generated
vendored
Normal file
14
web/node_modules/antd/es/form/context.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react';
|
||||
import omit from 'omit.js';
|
||||
import { FormProvider as RcFormProvider } from 'rc-field-form';
|
||||
export var FormContext = React.createContext({
|
||||
labelAlign: 'right',
|
||||
vertical: false
|
||||
});
|
||||
export var FormItemContext = React.createContext({
|
||||
updateItemErrors: function updateItemErrors() {}
|
||||
});
|
||||
export var FormProvider = function FormProvider(props) {
|
||||
var providerProps = omit(props, ['prefixCls']);
|
||||
return /*#__PURE__*/React.createElement(RcFormProvider, providerProps);
|
||||
};
|
||||
17
web/node_modules/antd/es/form/index.d.ts
generated
vendored
Normal file
17
web/node_modules/antd/es/form/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Rule } from 'rc-field-form/lib/interface';
|
||||
import InternalForm, { useForm, FormInstance, FormProps } from './Form';
|
||||
import Item, { FormItemProps } from './FormItem';
|
||||
import List from './FormList';
|
||||
import { FormProvider } from './context';
|
||||
declare type InternalForm = typeof InternalForm;
|
||||
interface Form extends InternalForm {
|
||||
useForm: typeof useForm;
|
||||
Item: typeof Item;
|
||||
List: typeof List;
|
||||
Provider: typeof FormProvider;
|
||||
/** @deprecated Only for warning usage. Do not use. */
|
||||
create: () => void;
|
||||
}
|
||||
declare const Form: Form;
|
||||
export { FormInstance, FormProps, FormItemProps, Rule };
|
||||
export default Form;
|
||||
16
web/node_modules/antd/es/form/index.js
generated
vendored
Normal file
16
web/node_modules/antd/es/form/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import InternalForm, { useForm } from './Form';
|
||||
import Item from './FormItem';
|
||||
import List from './FormList';
|
||||
import { FormProvider } from './context';
|
||||
import warning from '../_util/warning';
|
||||
var Form = InternalForm;
|
||||
Form.Item = Item;
|
||||
Form.List = List;
|
||||
Form.useForm = useForm;
|
||||
Form.Provider = FormProvider;
|
||||
|
||||
Form.create = function () {
|
||||
warning(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.');
|
||||
};
|
||||
|
||||
export default Form;
|
||||
3
web/node_modules/antd/es/form/interface.d.ts
generated
vendored
Normal file
3
web/node_modules/antd/es/form/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { Options as ScrollOptions } from 'scroll-into-view-if-needed';
|
||||
export declare type FormLabelAlign = 'left' | 'right';
|
||||
export { Store, StoreValue } from 'rc-field-form/lib/interface';
|
||||
0
web/node_modules/antd/es/form/interface.js
generated
vendored
Normal file
0
web/node_modules/antd/es/form/interface.js
generated
vendored
Normal file
69
web/node_modules/antd/es/form/style/components.less
generated
vendored
Normal file
69
web/node_modules/antd/es/form/style/components.less
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
@import './index';
|
||||
|
||||
// ================================================================
|
||||
// = Children Component =
|
||||
// ================================================================
|
||||
.@{form-item-prefix-cls} {
|
||||
.@{ant-prefix}-mentions,
|
||||
textarea.@{ant-prefix}-input {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// input[type=file]
|
||||
.@{ant-prefix}-upload {
|
||||
background: transparent;
|
||||
}
|
||||
.@{ant-prefix}-upload.@{ant-prefix}-upload-drag {
|
||||
background: @background-color-light;
|
||||
}
|
||||
|
||||
input[type='radio'],
|
||||
input[type='checkbox'] {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
// Radios and checkboxes on same line
|
||||
.@{ant-prefix}-radio-inline,
|
||||
.@{ant-prefix}-checkbox-inline {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-checkbox-vertical,
|
||||
.@{ant-prefix}-radio-vertical {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.@{ant-prefix}-checkbox-vertical + .@{ant-prefix}-checkbox-vertical,
|
||||
.@{ant-prefix}-radio-vertical + .@{ant-prefix}-radio-vertical {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-number {
|
||||
+ .@{form-prefix-cls}-text {
|
||||
margin-left: 8px;
|
||||
}
|
||||
&-handler-wrap {
|
||||
z-index: 2; // https://github.com/ant-design/ant-design/issues/6289
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-select,
|
||||
.@{ant-prefix}-cascader-picker {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Don't impact select inside input group
|
||||
.@{ant-prefix}-input-group .@{ant-prefix}-select,
|
||||
.@{ant-prefix}-input-group .@{ant-prefix}-cascader-picker {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
4
web/node_modules/antd/es/form/style/css.js
generated
vendored
Normal file
4
web/node_modules/antd/es/form/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import '../../style/index.css';
|
||||
import './index.css'; // style dependencies
|
||||
|
||||
import '../../grid/style/css';
|
||||
10
web/node_modules/antd/es/form/style/horizontal.less
generated
vendored
Normal file
10
web/node_modules/antd/es/form/style/horizontal.less
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
@import './index';
|
||||
|
||||
.@{form-prefix-cls}-horizontal {
|
||||
.@{form-item-prefix-cls}-label {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.@{form-item-prefix-cls}-control {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
}
|
||||
938
web/node_modules/antd/es/form/style/index.css
generated
vendored
Normal file
938
web/node_modules/antd/es/form/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,938 @@
|
||||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
||||
/* stylelint-disable no-duplicate-selectors */
|
||||
/* stylelint-disable */
|
||||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
||||
.ant-form-item .ant-mentions,
|
||||
.ant-form-item textarea.ant-input {
|
||||
height: auto;
|
||||
}
|
||||
.ant-form-item .ant-upload {
|
||||
background: transparent;
|
||||
}
|
||||
.ant-form-item .ant-upload.ant-upload-drag {
|
||||
background: #fafafa;
|
||||
}
|
||||
.ant-form-item input[type='radio'],
|
||||
.ant-form-item input[type='checkbox'] {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
.ant-form-item .ant-radio-inline,
|
||||
.ant-form-item .ant-checkbox-inline {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ant-form-item .ant-radio-inline:first-child,
|
||||
.ant-form-item .ant-checkbox-inline:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.ant-form-item .ant-checkbox-vertical,
|
||||
.ant-form-item .ant-radio-vertical {
|
||||
display: block;
|
||||
}
|
||||
.ant-form-item .ant-checkbox-vertical + .ant-checkbox-vertical,
|
||||
.ant-form-item .ant-radio-vertical + .ant-radio-vertical {
|
||||
margin-left: 0;
|
||||
}
|
||||
.ant-form-item .ant-input-number + .ant-form-text {
|
||||
margin-left: 8px;
|
||||
}
|
||||
.ant-form-item .ant-input-number-handler-wrap {
|
||||
z-index: 2;
|
||||
}
|
||||
.ant-form-item .ant-select,
|
||||
.ant-form-item .ant-cascader-picker {
|
||||
width: 100%;
|
||||
}
|
||||
.ant-form-item .ant-input-group .ant-select,
|
||||
.ant-form-item .ant-input-group .ant-cascader-picker {
|
||||
width: auto;
|
||||
}
|
||||
.ant-form-inline {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.ant-form-inline .ant-form-item {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: none;
|
||||
flex: none;
|
||||
-ms-flex-wrap: nowrap;
|
||||
flex-wrap: nowrap;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ant-form-inline .ant-form-item-with-help {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.ant-form-inline .ant-form-item > .ant-form-item-label,
|
||||
.ant-form-inline .ant-form-item > .ant-form-item-control {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.ant-form-inline .ant-form-item .ant-form-text {
|
||||
display: inline-block;
|
||||
}
|
||||
.ant-form-inline .ant-form-item .ant-form-item-has-feedback {
|
||||
display: inline-block;
|
||||
}
|
||||
.ant-form-horizontal .ant-form-item-label {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex-positive: 0;
|
||||
flex-grow: 0;
|
||||
}
|
||||
.ant-form-horizontal .ant-form-item-control {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1 1 0px;
|
||||
flex: 1 1 0;
|
||||
}
|
||||
.ant-form-vertical .ant-form-item {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.ant-form-vertical .ant-form-item-label > label {
|
||||
height: auto;
|
||||
}
|
||||
.ant-form-vertical .ant-form-item-label,
|
||||
.ant-col-24.ant-form-item-label,
|
||||
.ant-col-xl-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-form-vertical .ant-form-item-label > label,
|
||||
.ant-col-24.ant-form-item-label > label,
|
||||
.ant-col-xl-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-form-vertical .ant-form-item-label > label::after,
|
||||
.ant-col-24.ant-form-item-label > label::after,
|
||||
.ant-col-xl-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-form-vertical .ant-form-item-label,
|
||||
.ant-form-rtl.ant-col-24.ant-form-item-label,
|
||||
.ant-form-rtl.ant-col-xl-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
@media (max-width: 575px) {
|
||||
.ant-form-item .ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-form-item .ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-form-item .ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-form-item .ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
.ant-form .ant-form-item {
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.ant-form .ant-form-item .ant-form-item-label,
|
||||
.ant-form .ant-form-item .ant-form-item-control {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 100%;
|
||||
flex: 0 0 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
.ant-col-xs-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-col-xs-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-col-xs-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-col-xs-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.ant-col-sm-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-col-sm-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-col-sm-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-col-sm-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.ant-col-md-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-col-md-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-col-md-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-col-md-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199px) {
|
||||
.ant-col-lg-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-col-lg-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-col-lg-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-col-lg-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1599px) {
|
||||
.ant-col-xl-24.ant-form-item-label {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
line-height: 1.5715;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-col-xl-24.ant-form-item-label > label {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-col-xl-24.ant-form-item-label > label::after {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-rtl.ant-col-xl-24.ant-form-item-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.ant-form-item {
|
||||
/* Some non-status related component style is in `components.less` */
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-input {
|
||||
padding-right: 24px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix {
|
||||
padding-right: 18px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix {
|
||||
right: 28px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-switch {
|
||||
margin: 2px 0 4px;
|
||||
}
|
||||
.ant-form-item-has-feedback > .ant-select .ant-select-arrow,
|
||||
.ant-form-item-has-feedback > .ant-select .ant-select-selection__clear,
|
||||
.ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow,
|
||||
.ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {
|
||||
right: 28px;
|
||||
}
|
||||
.ant-form-item-has-feedback > .ant-select .ant-select-selection-selected-value,
|
||||
.ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection-selected-value {
|
||||
padding-right: 42px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-cascader-picker-arrow {
|
||||
margin-right: 17px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-cascader-picker-clear {
|
||||
right: 28px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-picker {
|
||||
padding-right: 29.2px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-picker-large {
|
||||
padding-right: 29.2px;
|
||||
}
|
||||
.ant-form-item-has-feedback .ant-picker-small {
|
||||
padding-right: 25.2px;
|
||||
}
|
||||
.ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,
|
||||
.ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,
|
||||
.ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,
|
||||
.ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
width: 32px;
|
||||
height: 20px;
|
||||
margin-top: -10px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
visibility: visible;
|
||||
-webkit-animation: zoomIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
||||
animation: zoomIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
||||
pointer-events: none;
|
||||
}
|
||||
.ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon svg,
|
||||
.ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon svg,
|
||||
.ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon svg,
|
||||
.ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {
|
||||
color: #52c41a;
|
||||
-webkit-animation-name: diffZoomIn1 !important;
|
||||
animation-name: diffZoomIn1 !important;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-form-item-explain,
|
||||
.ant-form-item-has-warning .ant-form-item-split {
|
||||
color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input,
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper,
|
||||
.ant-form-item-has-warning .ant-input:hover,
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper:hover {
|
||||
background-color: #fff;
|
||||
border-color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input:focus,
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper:focus,
|
||||
.ant-form-item-has-warning .ant-input-focused,
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper-focused {
|
||||
border-color: #ffc53d;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input:not([disabled]):hover,
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper:not([disabled]):hover {
|
||||
border-color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-affix-wrapper input:focus {
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {
|
||||
border-color: #ffc53d;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-prefix {
|
||||
color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-group-addon {
|
||||
color: #faad14;
|
||||
background-color: #fff;
|
||||
border-color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .has-feedback {
|
||||
color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {
|
||||
color: #faad14;
|
||||
-webkit-animation-name: diffZoomIn3 !important;
|
||||
animation-name: diffZoomIn3 !important;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {
|
||||
border-color: #faad14 !important;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector,
|
||||
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {
|
||||
border-color: #ffc53d;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-number,
|
||||
.ant-form-item-has-warning .ant-picker {
|
||||
border-color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-number-focused,
|
||||
.ant-form-item-has-warning .ant-picker-focused,
|
||||
.ant-form-item-has-warning .ant-input-number:focus,
|
||||
.ant-form-item-has-warning .ant-picker:focus {
|
||||
border-color: #ffc53d;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
}
|
||||
.ant-form-item-has-warning .ant-input-number:not([disabled]):hover,
|
||||
.ant-form-item-has-warning .ant-picker:not([disabled]):hover {
|
||||
border-color: #faad14;
|
||||
}
|
||||
.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {
|
||||
border-color: #ffc53d;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-form-item-explain,
|
||||
.ant-form-item-has-error .ant-form-item-split {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input,
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper,
|
||||
.ant-form-item-has-error .ant-input:hover,
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
|
||||
background-color: #fff;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input:focus,
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper:focus,
|
||||
.ant-form-item-has-error .ant-input-focused,
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper-focused {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-input:not([disabled]):hover,
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper:not([disabled]):hover {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-affix-wrapper input:focus {
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-prefix {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-group-addon {
|
||||
color: #ff4d4f;
|
||||
background-color: #fff;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .has-feedback {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {
|
||||
color: #ff4d4f;
|
||||
-webkit-animation-name: diffZoomIn2 !important;
|
||||
animation-name: diffZoomIn2 !important;
|
||||
}
|
||||
.ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {
|
||||
border-color: #ff4d4f !important;
|
||||
}
|
||||
.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector,
|
||||
.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
|
||||
border: 0;
|
||||
}
|
||||
.ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-number,
|
||||
.ant-form-item-has-error .ant-picker {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-number-focused,
|
||||
.ant-form-item-has-error .ant-picker-focused,
|
||||
.ant-form-item-has-error .ant-input-number:focus,
|
||||
.ant-form-item-has-error .ant-picker:focus {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-input-number:not([disabled]):hover,
|
||||
.ant-form-item-has-error .ant-picker:not([disabled]):hover {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor,
|
||||
.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,
|
||||
.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {
|
||||
border-color: #ff7875;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error .ant-transfer-list {
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {
|
||||
border-color: #d9d9d9;
|
||||
}
|
||||
.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {
|
||||
border-color: #40a9ff;
|
||||
border-right-width: 1px !important;
|
||||
}
|
||||
.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):focus {
|
||||
border-color: #40a9ff;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
||||
}
|
||||
.ant-form-item-has-error-leave .ant-form-item-explain {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-form-item-is-validating.ant-form-item-has-feedback .ant-form-item-children-icon {
|
||||
display: inline-block;
|
||||
color: #1890ff;
|
||||
}
|
||||
.ant-form {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5715;
|
||||
list-style: none;
|
||||
-webkit-font-feature-settings: 'tnum';
|
||||
font-feature-settings: 'tnum';
|
||||
}
|
||||
.ant-form legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 16px;
|
||||
line-height: inherit;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
.ant-form label {
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-form input[type='search'] {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.ant-form input[type='radio'],
|
||||
.ant-form input[type='checkbox'] {
|
||||
line-height: normal;
|
||||
}
|
||||
.ant-form input[type='file'] {
|
||||
display: block;
|
||||
}
|
||||
.ant-form input[type='range'] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.ant-form select[multiple],
|
||||
.ant-form select[size] {
|
||||
height: auto;
|
||||
}
|
||||
.ant-form input[type='file']:focus,
|
||||
.ant-form input[type='radio']:focus,
|
||||
.ant-form input[type='checkbox']:focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
.ant-form output {
|
||||
display: block;
|
||||
padding-top: 15px;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
}
|
||||
.ant-form .ant-form-text {
|
||||
display: inline-block;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.ant-form-small .ant-form-item-label > label {
|
||||
height: 24px;
|
||||
}
|
||||
.ant-form-small .ant-form-item-control-input {
|
||||
min-height: 24px;
|
||||
}
|
||||
.ant-form-large .ant-form-item-label > label {
|
||||
height: 40px;
|
||||
}
|
||||
.ant-form-large .ant-form-item-control-input {
|
||||
min-height: 40px;
|
||||
}
|
||||
.ant-form-item {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5715;
|
||||
list-style: none;
|
||||
-webkit-font-feature-settings: 'tnum';
|
||||
font-feature-settings: 'tnum';
|
||||
margin-bottom: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.ant-form-item-with-help {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ant-form-item-label {
|
||||
display: inline-block;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex-positive: 0;
|
||||
flex-grow: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ant-form-item-label-left {
|
||||
text-align: left;
|
||||
}
|
||||
.ant-form-item-label > label {
|
||||
position: relative;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-form-item-label > label > .anticon {
|
||||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.ant-form-item-label > label.ant-form-item-required::before {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
color: #ff4d4f;
|
||||
font-size: 14px;
|
||||
font-family: SimSun, sans-serif;
|
||||
line-height: 1;
|
||||
content: '*';
|
||||
}
|
||||
.ant-form-hide-required-mark .ant-form-item-label > label.ant-form-item-required::before {
|
||||
display: none;
|
||||
}
|
||||
.ant-form-item-label > label::after {
|
||||
content: ':';
|
||||
position: relative;
|
||||
top: -0.5px;
|
||||
margin: 0 8px 0 2px;
|
||||
}
|
||||
.ant-form-item-label > label.ant-form-item-no-colon::after {
|
||||
content: ' ';
|
||||
}
|
||||
.ant-form-item-control {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.ant-form-item-control:first-child:not([class^='ant-col-']):not([class*=' ant-col-']) {
|
||||
width: 100%;
|
||||
}
|
||||
.ant-form-item-control-input {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
min-height: 32px;
|
||||
}
|
||||
.ant-form-item-control-input-content {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: auto;
|
||||
flex: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
.ant-form-item-explain,
|
||||
.ant-form-item-extra {
|
||||
clear: both;
|
||||
min-height: 24px;
|
||||
padding-top: 0px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
-webkit-transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
.show-help-enter,
|
||||
.show-help-appear {
|
||||
-webkit-animation-duration: 0.3s;
|
||||
animation-duration: 0.3s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation-play-state: paused;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.show-help-leave {
|
||||
-webkit-animation-duration: 0.3s;
|
||||
animation-duration: 0.3s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation-play-state: paused;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.show-help-enter.show-help-enter-active,
|
||||
.show-help-appear.show-help-appear-active {
|
||||
-webkit-animation-name: antShowHelpIn;
|
||||
animation-name: antShowHelpIn;
|
||||
-webkit-animation-play-state: running;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.show-help-leave.show-help-leave-active {
|
||||
-webkit-animation-name: antShowHelpOut;
|
||||
animation-name: antShowHelpOut;
|
||||
-webkit-animation-play-state: running;
|
||||
animation-play-state: running;
|
||||
pointer-events: none;
|
||||
}
|
||||
.show-help-enter,
|
||||
.show-help-appear {
|
||||
opacity: 0;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
.show-help-leave {
|
||||
-webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
@-webkit-keyframes antShowHelpIn {
|
||||
0% {
|
||||
-webkit-transform: translateY(-5px);
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes antShowHelpIn {
|
||||
0% {
|
||||
-webkit-transform: translateY(-5px);
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes antShowHelpOut {
|
||||
to {
|
||||
-webkit-transform: translateY(-5px);
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes antShowHelpOut {
|
||||
to {
|
||||
-webkit-transform: translateY(-5px);
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes diffZoomIn1 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@keyframes diffZoomIn1 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes diffZoomIn2 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@keyframes diffZoomIn2 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes diffZoomIn3 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@keyframes diffZoomIn3 {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
.ant-form-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-label {
|
||||
text-align: left;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-label > label.ant-form-item-required::before {
|
||||
margin-right: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-label > label::after {
|
||||
margin: 0 2px 0 8px;
|
||||
}
|
||||
.ant-col-rtl .ant-form-item-control:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-input {
|
||||
padding-right: 11px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix {
|
||||
padding-right: 11px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input {
|
||||
padding: 0;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-input-number {
|
||||
padding-left: 18px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-arrow,
|
||||
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-selection__clear,
|
||||
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow,
|
||||
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-selection-selected-value,
|
||||
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection-selected-value {
|
||||
padding-right: 0;
|
||||
padding-left: 42px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-arrow {
|
||||
margin-right: 0;
|
||||
margin-left: 17px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-clear {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-picker {
|
||||
padding-right: 11px;
|
||||
padding-left: 29.2px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-picker-large {
|
||||
padding-right: 11px;
|
||||
padding-left: 29.2px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback .ant-picker-small {
|
||||
padding-right: 7px;
|
||||
padding-left: 25.2px;
|
||||
}
|
||||
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,
|
||||
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,
|
||||
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,
|
||||
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
.ant-form-rtl.ant-form-inline .ant-form-item {
|
||||
margin-right: 0;
|
||||
margin-left: 16px;
|
||||
}
|
||||
3
web/node_modules/antd/es/form/style/index.d.ts
generated
vendored
Normal file
3
web/node_modules/antd/es/form/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
import '../../grid/style';
|
||||
4
web/node_modules/antd/es/form/style/index.js
generated
vendored
Normal file
4
web/node_modules/antd/es/form/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less'; // style dependencies
|
||||
|
||||
import '../../grid/style';
|
||||
227
web/node_modules/antd/es/form/style/index.less
generated
vendored
Normal file
227
web/node_modules/antd/es/form/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,227 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
||||
@import '../../button/style/mixin';
|
||||
@import '../../grid/style/mixin';
|
||||
@import './components';
|
||||
@import './inline';
|
||||
@import './horizontal';
|
||||
@import './vertical';
|
||||
@import './status';
|
||||
@import './mixin';
|
||||
|
||||
@form-prefix-cls: ~'@{ant-prefix}-form';
|
||||
@form-item-prefix-cls: ~'@{form-prefix-cls}-item';
|
||||
@form-font-height: ceil(@font-size-base * @line-height-base);
|
||||
|
||||
.@{form-prefix-cls} {
|
||||
.reset-component;
|
||||
.reset-form;
|
||||
|
||||
.@{form-prefix-cls}-text {
|
||||
display: inline-block;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// = Size =
|
||||
// ================================================================
|
||||
.formSize(@input-height) {
|
||||
.@{form-item-prefix-cls}-label > label {
|
||||
height: @input-height;
|
||||
}
|
||||
|
||||
.@{form-item-prefix-cls}-control-input {
|
||||
min-height: @input-height;
|
||||
}
|
||||
}
|
||||
|
||||
&-small {
|
||||
.formSize(@input-height-sm);
|
||||
}
|
||||
&-large {
|
||||
.formSize(@input-height-lg);
|
||||
}
|
||||
}
|
||||
|
||||
.explainAndExtraDistance(@num) when (@num>=0) {
|
||||
padding-top: floor(@num);
|
||||
}
|
||||
.explainAndExtraDistance(@num) when (@num<0) {
|
||||
margin-top: floor(@num);
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// = Item =
|
||||
// ================================================================
|
||||
.@{form-item-prefix-cls} {
|
||||
.reset-component;
|
||||
|
||||
margin-bottom: @form-item-margin-bottom;
|
||||
vertical-align: top;
|
||||
|
||||
&-with-help {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// ==============================================================
|
||||
// = Label =
|
||||
// ==============================================================
|
||||
&-label {
|
||||
display: inline-block;
|
||||
flex-grow: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
|
||||
&-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
> label {
|
||||
position: relative;
|
||||
// display: inline;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: @form-item-label-height;
|
||||
color: @label-color;
|
||||
font-size: @form-item-label-font-size;
|
||||
|
||||
> .@{iconfont-css-prefix} {
|
||||
font-size: @form-item-label-font-size;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
&.@{form-item-prefix-cls}-required::before {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
color: @label-required-color;
|
||||
font-size: @form-item-label-font-size;
|
||||
font-family: SimSun, sans-serif;
|
||||
line-height: 1;
|
||||
content: '*';
|
||||
|
||||
.@{form-prefix-cls}-hide-required-mark & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
& when (@form-item-trailing-colon=true) {
|
||||
content: ':';
|
||||
}
|
||||
& when not (@form-item-trailing-colon=true) {
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
position: relative;
|
||||
top: -0.5px;
|
||||
margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left;
|
||||
}
|
||||
|
||||
&.@{form-item-prefix-cls}-no-colon::after {
|
||||
content: ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ==============================================================
|
||||
// = Input =
|
||||
// ==============================================================
|
||||
&-control {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
|
||||
&:first-child:not([class^=~"'@{ant-prefix}-col-'"]):not([class*=~"' @{ant-prefix}-col-'"]) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-control-input {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: @input-height-base;
|
||||
|
||||
&-content {
|
||||
flex: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-explain,
|
||||
&-extra {
|
||||
clear: both;
|
||||
min-height: @form-item-margin-bottom;
|
||||
.explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2);
|
||||
color: @text-color-secondary;
|
||||
font-size: @font-size-base;
|
||||
line-height: @line-height-base;
|
||||
transition: color 0.3s @ease-out; // sync input color transition
|
||||
}
|
||||
}
|
||||
|
||||
.show-help-motion(@className, @keyframeName, @duration: @animation-duration-slow) {
|
||||
.make-motion(@className, @keyframeName, @duration);
|
||||
.@{className}-enter,
|
||||
.@{className}-appear {
|
||||
opacity: 0;
|
||||
animation-timing-function: @ease-in-out;
|
||||
}
|
||||
.@{className}-leave {
|
||||
animation-timing-function: @ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.show-help-motion(show-help, antShowHelp, 0.3s);
|
||||
|
||||
@keyframes antShowHelpIn {
|
||||
0% {
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes antShowHelpOut {
|
||||
to {
|
||||
transform: translateY(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// need there different zoom animation
|
||||
// otherwise won't trigger anim
|
||||
@keyframes diffZoomIn1 {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes diffZoomIn2 {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes diffZoomIn3 {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
31
web/node_modules/antd/es/form/style/inline.less
generated
vendored
Normal file
31
web/node_modules/antd/es/form/style/inline.less
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
@import './index';
|
||||
|
||||
.@{form-prefix-cls}-inline {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.@{form-prefix-cls}-item {
|
||||
flex: none;
|
||||
flex-wrap: nowrap;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 0;
|
||||
|
||||
&-with-help {
|
||||
margin-bottom: @form-item-margin-bottom;
|
||||
}
|
||||
|
||||
> .@{form-item-prefix-cls}-label,
|
||||
> .@{form-item-prefix-cls}-control {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.@{form-prefix-cls}-text {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.@{form-item-prefix-cls}-has-feedback {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
115
web/node_modules/antd/es/form/style/mixin.less
generated
vendored
Normal file
115
web/node_modules/antd/es/form/style/mixin.less
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
@import '../../input/style/mixin';
|
||||
|
||||
.form-control-validation(@text-color: @input-color; @border-color: @input-border-color; @background-color: @input-bg) {
|
||||
.@{ant-prefix}-form-item-explain,
|
||||
.@{ant-prefix}-form-item-split {
|
||||
color: @text-color;
|
||||
}
|
||||
// 输入框的不同校验状态
|
||||
.@{ant-prefix}-input,
|
||||
.@{ant-prefix}-input-affix-wrapper {
|
||||
&,
|
||||
&:hover {
|
||||
background-color: @background-color;
|
||||
border-color: @border-color;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&-focused {
|
||||
.active(@border-color);
|
||||
}
|
||||
|
||||
&:not([disabled]):hover {
|
||||
border-color: @border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-affix-wrapper {
|
||||
input:focus {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-calendar-picker-open .@{ant-prefix}-calendar-picker-input {
|
||||
.active(@border-color);
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-prefix {
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-group-addon {
|
||||
color: @text-color;
|
||||
background-color: @background-color;
|
||||
border-color: @border-color;
|
||||
}
|
||||
|
||||
.has-feedback {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset form styles
|
||||
// -----------------------------
|
||||
// Based on Bootstrap framework
|
||||
.reset-form() {
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
padding: 0;
|
||||
color: @text-color-secondary;
|
||||
font-size: @font-size-lg;
|
||||
line-height: inherit;
|
||||
border: 0;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-base;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
|
||||
input[type='search'] {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// Position radios and checkboxes better
|
||||
input[type='radio'],
|
||||
input[type='checkbox'] {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
input[type='file'] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Make range inputs behave like textual form controls
|
||||
input[type='range'] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Make multiple select elements height not fixed
|
||||
select[multiple],
|
||||
select[size] {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Focus for file, radio, and checkbox
|
||||
input[type='file']:focus,
|
||||
input[type='radio']:focus,
|
||||
input[type='checkbox']:focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
// Adjust output element
|
||||
output {
|
||||
display: block;
|
||||
padding-top: 15px;
|
||||
color: @input-color;
|
||||
font-size: @font-size-base;
|
||||
line-height: @line-height-base;
|
||||
}
|
||||
}
|
||||
180
web/node_modules/antd/es/form/style/rtl.less
generated
vendored
Normal file
180
web/node_modules/antd/es/form/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
||||
@import '../../button/style/mixin';
|
||||
@import '../../grid/style/mixin';
|
||||
|
||||
@form-prefix-cls: ~'@{ant-prefix}-form';
|
||||
@form-item-prefix-cls: ~'@{form-prefix-cls}-item';
|
||||
|
||||
.@{form-prefix-cls} {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// = Item =
|
||||
// ================================================================
|
||||
.@{form-item-prefix-cls} {
|
||||
// ==============================================================
|
||||
// = Label =
|
||||
// ==============================================================
|
||||
&-label {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
> label {
|
||||
&.@{form-item-prefix-cls}-required::before {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
margin-right: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
&::after {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
margin: 0 @form-item-label-colon-margin-left 0 @form-item-label-colon-margin-right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ==============================================================
|
||||
// = Input =
|
||||
// ==============================================================
|
||||
&-control {
|
||||
.@{ant-prefix}-col-rtl &:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// status
|
||||
&-has-feedback {
|
||||
.@{ant-prefix}-input {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: @input-padding-horizontal-base;
|
||||
padding-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-affix-wrapper {
|
||||
.@{ant-prefix}-input-suffix {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: @input-padding-horizontal-base;
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
.@{ant-prefix}-input {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-search:not(.@{ant-prefix}-input-search-enter-button) {
|
||||
.@{ant-prefix}-input-suffix {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-input-number {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-selection__clear,
|
||||
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
||||
:not(.@{ant-prefix}-input-group-addon)
|
||||
> .@{ant-prefix}-select
|
||||
.@{ant-prefix}-select-selection__clear {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-selection-selected-value,
|
||||
:not(.@{ant-prefix}-input-group-addon)
|
||||
> .@{ant-prefix}-select
|
||||
.@{ant-prefix}-select-selection-selected-value {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: 0;
|
||||
padding-left: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-cascader-picker {
|
||||
&-arrow {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
margin-right: 0;
|
||||
margin-left: 17px;
|
||||
}
|
||||
}
|
||||
&-clear {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-picker {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: @input-padding-horizontal-base;
|
||||
padding-left: @input-padding-horizontal-base + @font-size-base * 1.3;
|
||||
}
|
||||
|
||||
&-large {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: @input-padding-horizontal-lg;
|
||||
padding-left: @input-padding-horizontal-lg + @font-size-base * 1.3;
|
||||
}
|
||||
}
|
||||
|
||||
&-small {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
padding-right: @input-padding-horizontal-sm;
|
||||
padding-left: @input-padding-horizontal-sm + @font-size-base * 1.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{form-item-prefix-cls} {
|
||||
&-has-success,
|
||||
&-has-warning,
|
||||
&-has-error,
|
||||
&-is-validating {
|
||||
// ====================== Icon ======================
|
||||
.@{form-item-prefix-cls}-children-icon {
|
||||
.@{form-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// inline
|
||||
.@{form-prefix-cls}-inline {
|
||||
.@{form-prefix-cls}-item {
|
||||
.@{form-prefix-cls}-rtl& {
|
||||
margin-right: 0;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vertical
|
||||
.make-vertical-layout-label() {
|
||||
.@{form-prefix-cls}-rtl& {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
253
web/node_modules/antd/es/form/style/status.less
generated
vendored
Normal file
253
web/node_modules/antd/es/form/style/status.less
generated
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
@import './index.less';
|
||||
|
||||
.@{form-item-prefix-cls} {
|
||||
// ================================================================
|
||||
// = Status =
|
||||
// ================================================================
|
||||
/* Some non-status related component style is in `components.less` */
|
||||
|
||||
&-has-feedback {
|
||||
// ========================= Input =========================
|
||||
.@{ant-prefix}-input {
|
||||
padding-right: 24px;
|
||||
}
|
||||
// https://github.com/ant-design/ant-design/issues/19884
|
||||
.@{ant-prefix}-input-affix-wrapper {
|
||||
.@{ant-prefix}-input-suffix {
|
||||
padding-right: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
// Fix issue: https://github.com/ant-design/ant-design/issues/7854
|
||||
.@{ant-prefix}-input-search:not(.@{ant-prefix}-input-search-enter-button) {
|
||||
.@{ant-prefix}-input-suffix {
|
||||
right: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== Switch =========================
|
||||
.@{ant-prefix}-switch {
|
||||
margin: 2px 0 4px;
|
||||
}
|
||||
|
||||
// ======================== Select =========================
|
||||
// Fix overlapping between feedback icon and <Select>'s arrow.
|
||||
// https://github.com/ant-design/ant-design/issues/4431
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-selection__clear,
|
||||
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
||||
:not(.@{ant-prefix}-input-group-addon)
|
||||
> .@{ant-prefix}-select
|
||||
.@{ant-prefix}-select-selection__clear {
|
||||
right: 28px;
|
||||
}
|
||||
> .@{ant-prefix}-select .@{ant-prefix}-select-selection-selected-value,
|
||||
:not(.@{ant-prefix}-input-group-addon)
|
||||
> .@{ant-prefix}-select
|
||||
.@{ant-prefix}-select-selection-selected-value {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
// ======================= Cascader ========================
|
||||
.@{ant-prefix}-cascader-picker {
|
||||
&-arrow {
|
||||
margin-right: 17px;
|
||||
}
|
||||
&-clear {
|
||||
right: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== Picker =========================
|
||||
// Fix issue: https://github.com/ant-design/ant-design/issues/4783
|
||||
.@{ant-prefix}-picker {
|
||||
padding-right: @input-padding-horizontal-base + @font-size-base * 1.3;
|
||||
|
||||
&-large {
|
||||
padding-right: @input-padding-horizontal-lg + @font-size-base * 1.3;
|
||||
}
|
||||
|
||||
&-small {
|
||||
padding-right: @input-padding-horizontal-sm + @font-size-base * 1.3;
|
||||
}
|
||||
}
|
||||
|
||||
// ===================== Status Group ======================
|
||||
&.@{form-item-prefix-cls} {
|
||||
&-has-success,
|
||||
&-has-warning,
|
||||
&-has-error,
|
||||
&-is-validating {
|
||||
// ====================== Icon ======================
|
||||
.@{form-item-prefix-cls}-children-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
width: @input-height-base;
|
||||
height: 20px;
|
||||
margin-top: -10px;
|
||||
font-size: @font-size-base;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
visibility: visible;
|
||||
animation: zoomIn 0.3s @ease-out-back;
|
||||
pointer-events: none;
|
||||
|
||||
& svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== Success ========================
|
||||
&-has-success {
|
||||
&.@{form-item-prefix-cls}-has-feedback .@{form-item-prefix-cls}-children-icon {
|
||||
color: @success-color;
|
||||
animation-name: diffZoomIn1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== Warning ========================
|
||||
&-has-warning {
|
||||
.form-control-validation(@warning-color; @warning-color; @form-warning-input-bg);
|
||||
|
||||
&.@{form-item-prefix-cls}-has-feedback .@{form-item-prefix-cls}-children-icon {
|
||||
color: @warning-color;
|
||||
animation-name: diffZoomIn3 !important;
|
||||
}
|
||||
|
||||
//select
|
||||
.@{ant-prefix}-select:not(.@{ant-prefix}-select-borderless) {
|
||||
.@{ant-prefix}-select-selector {
|
||||
border-color: @warning-color !important;
|
||||
}
|
||||
&.@{ant-prefix}-select-open .@{ant-prefix}-select-selector,
|
||||
&.@{ant-prefix}-select-focused .@{ant-prefix}-select-selector {
|
||||
.active(@warning-color);
|
||||
}
|
||||
}
|
||||
|
||||
//input-number, timepicker
|
||||
.@{ant-prefix}-input-number,
|
||||
.@{ant-prefix}-picker {
|
||||
border-color: @warning-color;
|
||||
&-focused,
|
||||
&:focus {
|
||||
.active(@warning-color);
|
||||
}
|
||||
&:not([disabled]):hover {
|
||||
border-color: @warning-color;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input {
|
||||
.active(@warning-color);
|
||||
}
|
||||
}
|
||||
|
||||
// ========================= Error =========================
|
||||
&-has-error {
|
||||
.form-control-validation(@error-color; @error-color; @form-error-input-bg);
|
||||
|
||||
&.@{form-item-prefix-cls}-has-feedback .@{form-item-prefix-cls}-children-icon {
|
||||
color: @error-color;
|
||||
animation-name: diffZoomIn2 !important;
|
||||
}
|
||||
|
||||
//select
|
||||
.@{ant-prefix}-select:not(.@{ant-prefix}-select-borderless) {
|
||||
.@{ant-prefix}-select-selector {
|
||||
border-color: @error-color !important;
|
||||
}
|
||||
&.@{ant-prefix}-select-open .@{ant-prefix}-select-selector,
|
||||
&.@{ant-prefix}-select-focused .@{ant-prefix}-select-selector {
|
||||
.active(@error-color);
|
||||
}
|
||||
}
|
||||
|
||||
// fixes https://github.com/ant-design/ant-design/issues/20482
|
||||
.@{ant-prefix}-input-group-addon .@{ant-prefix}-select {
|
||||
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
|
||||
.@{ant-prefix}-select-selector {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-select.@{ant-prefix}-select-auto-complete {
|
||||
.@{ant-prefix}-input:focus {
|
||||
border-color: @error-color;
|
||||
}
|
||||
}
|
||||
|
||||
//input-number, timepicker
|
||||
.@{ant-prefix}-input-number,
|
||||
.@{ant-prefix}-picker {
|
||||
border-color: @error-color;
|
||||
&-focused,
|
||||
&:focus {
|
||||
.active(@error-color);
|
||||
}
|
||||
&:not([disabled]):hover {
|
||||
border-color: @error-color;
|
||||
}
|
||||
}
|
||||
.@{ant-prefix}-mention-wrapper {
|
||||
.@{ant-prefix}-mention-editor {
|
||||
&,
|
||||
&:not([disabled]):hover {
|
||||
border-color: @error-color;
|
||||
}
|
||||
}
|
||||
&.@{ant-prefix}-mention-active:not([disabled]) .@{ant-prefix}-mention-editor,
|
||||
.@{ant-prefix}-mention-editor:not([disabled]):focus {
|
||||
.active(@error-color);
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input {
|
||||
.active(@error-color);
|
||||
}
|
||||
|
||||
// transfer
|
||||
.@{ant-prefix}-transfer {
|
||||
&-list {
|
||||
border-color: @error-color;
|
||||
|
||||
&-search:not([disabled]) {
|
||||
border-color: @input-border-color;
|
||||
|
||||
&:hover {
|
||||
.hover();
|
||||
}
|
||||
|
||||
&:focus {
|
||||
.active();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Patch to keep error explain color
|
||||
&-has-error-leave {
|
||||
.@{form-item-prefix-cls}-explain {
|
||||
color: @error-color;
|
||||
}
|
||||
}
|
||||
|
||||
// ====================== Validating =======================
|
||||
&-is-validating {
|
||||
&.@{form-item-prefix-cls}-has-feedback .@{form-item-prefix-cls}-children-icon {
|
||||
display: inline-block;
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
82
web/node_modules/antd/es/form/style/vertical.less
generated
vendored
Normal file
82
web/node_modules/antd/es/form/style/vertical.less
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
@import './index';
|
||||
|
||||
// ================== Label ==================
|
||||
.make-vertical-layout-label() {
|
||||
margin: @form-vertical-label-margin;
|
||||
padding: @form-vertical-label-padding;
|
||||
line-height: @line-height-base;
|
||||
white-space: initial;
|
||||
text-align: left;
|
||||
|
||||
> label {
|
||||
margin: 0;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.make-vertical-layout() {
|
||||
.@{form-prefix-cls}-item .@{form-prefix-cls}-item-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
.@{form-prefix-cls} {
|
||||
.@{form-prefix-cls}-item {
|
||||
flex-wrap: wrap;
|
||||
.@{form-prefix-cls}-item-label,
|
||||
.@{form-prefix-cls}-item-control {
|
||||
flex: 0 0 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{form-prefix-cls}-vertical {
|
||||
.@{form-item-prefix-cls} {
|
||||
flex-direction: column;
|
||||
|
||||
&-label > label {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{form-prefix-cls}-vertical .@{form-item-prefix-cls}-label,
|
||||
// when labelCol is 24, it is a vertical form
|
||||
.@{ant-prefix}-col-24.@{form-item-prefix-cls}-label,
|
||||
.@{ant-prefix}-col-xl-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
|
||||
@media (max-width: @screen-xs-max) {
|
||||
.make-vertical-layout();
|
||||
.@{ant-prefix}-col-xs-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-sm-max) {
|
||||
.@{ant-prefix}-col-sm-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-md-max) {
|
||||
.@{ant-prefix}-col-md-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-lg-max) {
|
||||
.@{ant-prefix}-col-lg-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-xl-max) {
|
||||
.@{ant-prefix}-col-xl-24.@{form-item-prefix-cls}-label {
|
||||
.make-vertical-layout-label();
|
||||
}
|
||||
}
|
||||
20
web/node_modules/antd/es/form/util.d.ts
generated
vendored
Normal file
20
web/node_modules/antd/es/form/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import * as React from 'react';
|
||||
import { FormInstance as RcFormInstance } from 'rc-field-form';
|
||||
import { ScrollOptions } from './interface';
|
||||
declare type InternalNamePath = (string | number)[];
|
||||
/**
|
||||
* Always debounce error to avoid [error -> null -> error] blink
|
||||
*/
|
||||
export declare function useCacheErrors(errors: React.ReactNode[], changeTrigger: (visible: boolean) => void, directly: boolean): [boolean, React.ReactNode[]];
|
||||
export declare function toArray<T>(candidate?: T | T[] | false): T[];
|
||||
export declare function getFieldId(namePath: InternalNamePath, formName?: string): string | undefined;
|
||||
export interface FormInstance extends RcFormInstance {
|
||||
scrollToField: (name: string | number | InternalNamePath, options?: ScrollOptions) => void;
|
||||
__INTERNAL__: {
|
||||
name?: string;
|
||||
};
|
||||
}
|
||||
export declare function useForm(form?: FormInstance): [FormInstance];
|
||||
declare type Updater<ValueType> = (prev?: ValueType) => ValueType;
|
||||
export declare function useFrameState<ValueType>(defaultValue: ValueType): [ValueType, (updater: Updater<ValueType>) => void];
|
||||
export {};
|
||||
137
web/node_modules/antd/es/form/util.js
generated
vendored
Normal file
137
web/node_modules/antd/es/form/util.js
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
import * as React from 'react';
|
||||
import raf from 'raf';
|
||||
import { useForm as useRcForm } from 'rc-field-form';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
/**
|
||||
* Always debounce error to avoid [error -> null -> error] blink
|
||||
*/
|
||||
|
||||
export function useCacheErrors(errors, changeTrigger, directly) {
|
||||
var cacheRef = React.useRef({
|
||||
errors: errors,
|
||||
visible: !!errors.length
|
||||
});
|
||||
|
||||
var _React$useState = React.useState({}),
|
||||
_React$useState2 = _slicedToArray(_React$useState, 2),
|
||||
forceUpdate = _React$useState2[1];
|
||||
|
||||
var update = function update() {
|
||||
var prevVisible = cacheRef.current.visible;
|
||||
var newVisible = !!errors.length;
|
||||
var prevErrors = cacheRef.current.errors;
|
||||
cacheRef.current.errors = errors;
|
||||
cacheRef.current.visible = newVisible;
|
||||
|
||||
if (prevVisible !== newVisible) {
|
||||
changeTrigger(newVisible);
|
||||
} else if (prevErrors.length !== errors.length || prevErrors.some(function (prevErr, index) {
|
||||
return prevErr !== errors[index];
|
||||
})) {
|
||||
forceUpdate({});
|
||||
}
|
||||
};
|
||||
|
||||
React.useEffect(function () {
|
||||
if (!directly) {
|
||||
var timeout = setTimeout(update, 10);
|
||||
return function () {
|
||||
return clearTimeout(timeout);
|
||||
};
|
||||
}
|
||||
}, [errors]);
|
||||
|
||||
if (directly) {
|
||||
update();
|
||||
}
|
||||
|
||||
return [cacheRef.current.visible, cacheRef.current.errors];
|
||||
}
|
||||
export function toArray(candidate) {
|
||||
if (candidate === undefined || candidate === false) return [];
|
||||
return Array.isArray(candidate) ? candidate : [candidate];
|
||||
}
|
||||
export function getFieldId(namePath, formName) {
|
||||
if (!namePath.length) return undefined;
|
||||
var mergedId = namePath.join('_');
|
||||
return formName ? "".concat(formName, "_").concat(mergedId) : mergedId;
|
||||
}
|
||||
export function useForm(form) {
|
||||
var _useRcForm = useRcForm(),
|
||||
_useRcForm2 = _slicedToArray(_useRcForm, 1),
|
||||
rcForm = _useRcForm2[0];
|
||||
|
||||
var wrapForm = React.useMemo(function () {
|
||||
return form || _extends(_extends({}, rcForm), {
|
||||
__INTERNAL__: {},
|
||||
scrollToField: function scrollToField(name) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var namePath = toArray(name);
|
||||
var fieldId = getFieldId(namePath, wrapForm.__INTERNAL__.name);
|
||||
var node = fieldId ? document.getElementById(fieldId) : null;
|
||||
|
||||
if (node) {
|
||||
scrollIntoView(node, _extends({
|
||||
scrollMode: 'if-needed',
|
||||
block: 'nearest'
|
||||
}, options));
|
||||
}
|
||||
}
|
||||
});
|
||||
}, [form, rcForm]);
|
||||
return [wrapForm];
|
||||
}
|
||||
export function useFrameState(defaultValue) {
|
||||
var _React$useState3 = React.useState(defaultValue),
|
||||
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
||||
value = _React$useState4[0],
|
||||
setValue = _React$useState4[1];
|
||||
|
||||
var frameRef = React.useRef(null);
|
||||
var batchRef = React.useRef([]);
|
||||
var destroyRef = React.useRef(false);
|
||||
React.useEffect(function () {
|
||||
return function () {
|
||||
destroyRef.current = true;
|
||||
raf.cancel(frameRef.current);
|
||||
};
|
||||
}, []);
|
||||
|
||||
function setFrameValue(updater) {
|
||||
if (destroyRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (frameRef.current === null) {
|
||||
batchRef.current = [];
|
||||
frameRef.current = raf(function () {
|
||||
frameRef.current = null;
|
||||
setValue(function (prevValue) {
|
||||
var current = prevValue;
|
||||
batchRef.current.forEach(function (func) {
|
||||
current = func(current);
|
||||
});
|
||||
return current;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
batchRef.current.push(updater);
|
||||
}
|
||||
|
||||
return [value, setFrameValue];
|
||||
}
|
||||
Reference in New Issue
Block a user