Latest updates from IceHrmPro

This commit is contained in:
Thilina Pituwala
2020-05-20 18:47:29 +02:00
parent 60c92d7935
commit 7453a58aad
18012 changed files with 2089245 additions and 10173 deletions

View File

@@ -0,0 +1,46 @@
import * as React from 'react';
import { InputProps } from './Input';
import { SizeType } from '../config-provider/SizeContext';
declare const ClearableInputType: ["text", "input"];
export declare function hasPrefixSuffix(props: InputProps | ClearableInputProps): boolean;
/**
* This basic props required for input and textarea.
*/
interface BasicProps {
prefixCls: string;
inputType: typeof ClearableInputType[number];
value?: any;
allowClear?: boolean;
element: React.ReactElement<any>;
handleReset: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
className?: string;
style?: object;
disabled?: boolean;
direction?: any;
focused?: boolean;
readOnly?: boolean;
}
/**
* This props only for input.
*/
interface ClearableInputProps extends BasicProps {
size?: SizeType;
suffix?: React.ReactNode;
prefix?: React.ReactNode;
addonBefore?: React.ReactNode;
addonAfter?: React.ReactNode;
triggerFocus: () => void;
}
declare class ClearableLabeledInput extends React.Component<ClearableInputProps> {
/** @private Do not use out of this class. We do not promise this is always keep. */
private containerRef;
onInputMouseUp: React.MouseEventHandler;
renderClearIcon(prefixCls: string): JSX.Element | null;
renderSuffix(prefixCls: string): JSX.Element | null;
renderLabeledIcon(prefixCls: string, element: React.ReactElement<any>): JSX.Element;
renderInputWithLabel(prefixCls: string, labeledElement: React.ReactElement<any>): JSX.Element;
renderTextAreaWithClearIcon(prefixCls: string, element: React.ReactElement<any>): JSX.Element;
renderClearableLabeledInput(): JSX.Element;
render(): JSX.Element;
}
export default ClearableLabeledInput;

View File

@@ -0,0 +1,246 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hasPrefixSuffix = hasPrefixSuffix;
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
var _type = require("../_util/type");
var _Input = require("./Input");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var ClearableInputType = (0, _type.tuple)('text', 'input');
function hasPrefixSuffix(props) {
return !!(props.prefix || props.suffix || props.allowClear);
}
var ClearableLabeledInput = /*#__PURE__*/function (_React$Component) {
_inherits(ClearableLabeledInput, _React$Component);
var _super = _createSuper(ClearableLabeledInput);
function ClearableLabeledInput() {
var _this;
_classCallCheck(this, ClearableLabeledInput);
_this = _super.apply(this, arguments);
/** @private Do not use out of this class. We do not promise this is always keep. */
_this.containerRef = React.createRef();
_this.onInputMouseUp = function (e) {
var _a;
if ((_a = _this.containerRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
var triggerFocus = _this.props.triggerFocus;
triggerFocus();
}
};
return _this;
}
_createClass(ClearableLabeledInput, [{
key: "renderClearIcon",
value: function renderClearIcon(prefixCls) {
var _this$props = this.props,
allowClear = _this$props.allowClear,
value = _this$props.value,
disabled = _this$props.disabled,
readOnly = _this$props.readOnly,
inputType = _this$props.inputType,
handleReset = _this$props.handleReset;
if (!allowClear) {
return null;
}
var needClear = !disabled && !readOnly && value;
var className = inputType === ClearableInputType[0] ? "".concat(prefixCls, "-textarea-clear-icon") : "".concat(prefixCls, "-clear-icon");
return /*#__PURE__*/React.createElement(_CloseCircleFilled["default"], {
onClick: handleReset,
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(className, "-hidden"), !needClear)),
role: "button"
});
}
}, {
key: "renderSuffix",
value: function renderSuffix(prefixCls) {
var _this$props2 = this.props,
suffix = _this$props2.suffix,
allowClear = _this$props2.allowClear;
if (suffix || allowClear) {
return /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-suffix")
}, this.renderClearIcon(prefixCls), suffix);
}
return null;
}
}, {
key: "renderLabeledIcon",
value: function renderLabeledIcon(prefixCls, element) {
var _classNames2;
var _this$props3 = this.props,
focused = _this$props3.focused,
value = _this$props3.value,
prefix = _this$props3.prefix,
className = _this$props3.className,
size = _this$props3.size,
suffix = _this$props3.suffix,
disabled = _this$props3.disabled,
allowClear = _this$props3.allowClear,
direction = _this$props3.direction,
style = _this$props3.style;
var suffixNode = this.renderSuffix(prefixCls);
if (!hasPrefixSuffix(this.props)) {
return React.cloneElement(element, {
value: value
});
}
var prefixNode = prefix ? /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-prefix")
}, prefix) : null;
var affixWrapperCls = (0, _classnames["default"])(className, "".concat(prefixCls, "-affix-wrapper"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-focused"), focused), _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-sm"), size === 'small'), _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-lg"), size === 'large'), _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-input-with-clear-btn"), suffix && allowClear && value), _defineProperty(_classNames2, "".concat(prefixCls, "-affix-wrapper-rtl"), direction === 'rtl'), _classNames2));
return /*#__PURE__*/React.createElement("span", {
ref: this.containerRef,
className: affixWrapperCls,
style: style,
onMouseUp: this.onInputMouseUp
}, prefixNode, React.cloneElement(element, {
style: null,
value: value,
className: (0, _Input.getInputClassName)(prefixCls, size, disabled)
}), suffixNode);
}
}, {
key: "renderInputWithLabel",
value: function renderInputWithLabel(prefixCls, labeledElement) {
var _classNames3, _classNames4;
var _this$props4 = this.props,
addonBefore = _this$props4.addonBefore,
addonAfter = _this$props4.addonAfter,
style = _this$props4.style,
size = _this$props4.size,
className = _this$props4.className,
direction = _this$props4.direction; // Not wrap when there is not addons
if (!addonBefore && !addonAfter) {
return labeledElement;
}
var wrapperClassName = "".concat(prefixCls, "-group");
var addonClassName = "".concat(wrapperClassName, "-addon");
var addonBeforeNode = addonBefore ? /*#__PURE__*/React.createElement("span", {
className: addonClassName
}, addonBefore) : null;
var addonAfterNode = addonAfter ? /*#__PURE__*/React.createElement("span", {
className: addonClassName
}, addonAfter) : null;
var mergedWrapperClassName = (0, _classnames["default"])("".concat(prefixCls, "-wrapper"), (_classNames3 = {}, _defineProperty(_classNames3, wrapperClassName, addonBefore || addonAfter), _defineProperty(_classNames3, "".concat(wrapperClassName, "-rtl"), direction === 'rtl'), _classNames3));
var mergedGroupClassName = (0, _classnames["default"])(className, "".concat(prefixCls, "-group-wrapper"), (_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-group-wrapper-sm"), size === 'small'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-wrapper-lg"), size === 'large'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-wrapper-rtl"), direction === 'rtl'), _classNames4)); // Need another wrapper for changing display:table to display:inline-block
// and put style prop in wrapper
return /*#__PURE__*/React.createElement("span", {
className: mergedGroupClassName,
style: style
}, /*#__PURE__*/React.createElement("span", {
className: mergedWrapperClassName
}, addonBeforeNode, React.cloneElement(labeledElement, {
style: null
}), addonAfterNode));
}
}, {
key: "renderTextAreaWithClearIcon",
value: function renderTextAreaWithClearIcon(prefixCls, element) {
var _this$props5 = this.props,
value = _this$props5.value,
allowClear = _this$props5.allowClear,
className = _this$props5.className,
style = _this$props5.style;
if (!allowClear) {
return React.cloneElement(element, {
value: value
});
}
var affixWrapperCls = (0, _classnames["default"])(className, "".concat(prefixCls, "-affix-wrapper"), "".concat(prefixCls, "-affix-wrapper-textarea-with-clear-btn"));
return /*#__PURE__*/React.createElement("span", {
className: affixWrapperCls,
style: style
}, React.cloneElement(element, {
style: null,
value: value
}), this.renderClearIcon(prefixCls));
}
}, {
key: "renderClearableLabeledInput",
value: function renderClearableLabeledInput() {
var _this$props6 = this.props,
prefixCls = _this$props6.prefixCls,
inputType = _this$props6.inputType,
element = _this$props6.element;
if (inputType === ClearableInputType[0]) {
return this.renderTextAreaWithClearIcon(prefixCls, element);
}
return this.renderInputWithLabel(prefixCls, this.renderLabeledIcon(prefixCls, element));
}
}, {
key: "render",
value: function render() {
return this.renderClearableLabeledInput();
}
}]);
return ClearableLabeledInput;
}(React.Component);
var _default = ClearableLabeledInput;
exports["default"] = _default;

15
web/node_modules/antd/lib/input/Group.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from 'react';
export interface GroupProps {
className?: string;
size?: 'large' | 'small' | 'default';
children?: React.ReactNode;
style?: React.CSSProperties;
onMouseEnter?: React.MouseEventHandler<HTMLSpanElement>;
onMouseLeave?: React.MouseEventHandler<HTMLSpanElement>;
onFocus?: React.FocusEventHandler<HTMLSpanElement>;
onBlur?: React.FocusEventHandler<HTMLSpanElement>;
prefixCls?: string;
compact?: boolean;
}
declare const Group: React.StatelessComponent<GroupProps>;
export default Group;

47
web/node_modules/antd/lib/input/Group.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
"use strict";
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); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _configProvider = require("../config-provider");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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; }
var Group = function Group(props) {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var customizePrefixCls = props.prefixCls,
_props$className = props.className,
className = _props$className === void 0 ? '' : _props$className;
var prefixCls = getPrefixCls('input-group', customizePrefixCls);
var cls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-lg"), props.size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-sm"), props.size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-compact"), props.compact), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
return /*#__PURE__*/React.createElement("span", {
className: cls,
style: props.style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
onFocus: props.onFocus,
onBlur: props.onBlur
}, props.children);
});
};
var _default = Group;
exports["default"] = _default;

64
web/node_modules/antd/lib/input/Input.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import * as React from 'react';
import Group from './Group';
import Search from './Search';
import TextArea from './TextArea';
import Password from './Password';
import { Omit, LiteralUnion } from '../_util/type';
import ClearableLabeledInput from './ClearableLabeledInput';
import { ConfigConsumerProps } from '../config-provider';
import { SizeType } from '../config-provider/SizeContext';
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
prefixCls?: string;
size?: SizeType;
type?: LiteralUnion<'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week', string>;
onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
addonBefore?: React.ReactNode;
addonAfter?: React.ReactNode;
prefix?: React.ReactNode;
suffix?: React.ReactNode;
allowClear?: boolean;
}
export declare function fixControlledValue<T>(value: T): "" | T;
export declare function resolveOnChange(target: HTMLInputElement | HTMLTextAreaElement, e: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement> | React.MouseEvent<HTMLElement, MouseEvent>, onChange?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void): void;
export declare function getInputClassName(prefixCls: string, size?: SizeType, disabled?: boolean, direction?: any): string;
export interface InputState {
value: any;
focused: boolean;
/** `value` from prev props */
prevValue: any;
}
declare class Input extends React.Component<InputProps, InputState> {
static Group: typeof Group;
static Search: typeof Search;
static TextArea: typeof TextArea;
static Password: typeof Password;
static defaultProps: {
type: string;
};
input: HTMLInputElement;
clearableInput: ClearableLabeledInput;
removePasswordTimeout: number;
direction: any;
constructor(props: InputProps);
static getDerivedStateFromProps(nextProps: InputProps, { prevValue }: InputState): Partial<InputState>;
componentDidMount(): void;
componentDidUpdate(): void;
getSnapshotBeforeUpdate(prevProps: InputProps): null;
componentWillUnmount(): void;
focus: () => void;
blur(): void;
select(): void;
saveClearableInput: (input: ClearableLabeledInput) => void;
saveInput: (input: HTMLInputElement) => void;
onFocus: React.FocusEventHandler<HTMLInputElement>;
onBlur: React.FocusEventHandler<HTMLInputElement>;
setValue(value: string, callback?: () => void): void;
handleReset: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
renderInput: (prefixCls: string, size?: SizeType) => JSX.Element;
clearPasswordValueAttribute: () => void;
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
renderComponent: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}
export default Input;

309
web/node_modules/antd/lib/input/Input.js generated vendored Normal file
View File

@@ -0,0 +1,309 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fixControlledValue = fixControlledValue;
exports.resolveOnChange = resolveOnChange;
exports.getInputClassName = getInputClassName;
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _omit = _interopRequireDefault(require("omit.js"));
var _ClearableLabeledInput = _interopRequireWildcard(require("./ClearableLabeledInput"));
var _configProvider = require("../config-provider");
var _SizeContext = _interopRequireDefault(require("../config-provider/SizeContext"));
var _warning = _interopRequireDefault(require("../_util/warning"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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 fixControlledValue(value) {
if (typeof value === 'undefined' || value === null) {
return '';
}
return value;
}
function resolveOnChange(target, e, onChange) {
if (onChange) {
var event = e;
if (e.type === 'click') {
// click clear icon
event = Object.create(e);
event.target = target;
event.currentTarget = target;
var originalInputValue = target.value; // change target ref value cause e.target.value should be '' when clear input
target.value = '';
onChange(event); // reset target ref value
target.value = originalInputValue;
return;
}
onChange(event);
}
}
function getInputClassName(prefixCls, size, disabled, direction) {
var _classNames;
return (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
}
var Input = /*#__PURE__*/function (_React$Component) {
_inherits(Input, _React$Component);
var _super = _createSuper(Input);
function Input(props) {
var _this;
_classCallCheck(this, Input);
_this = _super.call(this, props);
_this.direction = 'ltr';
_this.focus = function () {
_this.input.focus();
};
_this.saveClearableInput = function (input) {
_this.clearableInput = input;
};
_this.saveInput = function (input) {
_this.input = input;
};
_this.onFocus = function (e) {
var onFocus = _this.props.onFocus;
_this.setState({
focused: true
});
if (onFocus) {
onFocus(e);
}
};
_this.onBlur = function (e) {
var onBlur = _this.props.onBlur;
_this.setState({
focused: false
});
if (onBlur) {
onBlur(e);
}
};
_this.handleReset = function (e) {
_this.setValue('', function () {
_this.focus();
});
resolveOnChange(_this.input, e, _this.props.onChange);
};
_this.renderInput = function (prefixCls, size) {
var _this$props = _this.props,
className = _this$props.className,
addonBefore = _this$props.addonBefore,
addonAfter = _this$props.addonAfter,
customizeSize = _this$props.size,
disabled = _this$props.disabled; // Fix https://fb.me/react-unknown-prop
var otherProps = (0, _omit["default"])(_this.props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear', // Input elements must be either controlled or uncontrolled,
// specify either the value prop, or the defaultValue prop, but not both.
'defaultValue', 'size', 'inputType']);
return /*#__PURE__*/React.createElement("input", _extends({}, otherProps, {
onChange: _this.handleChange,
onFocus: _this.onFocus,
onBlur: _this.onBlur,
onKeyDown: _this.handleKeyDown,
className: (0, _classnames["default"])(getInputClassName(prefixCls, customizeSize || size, disabled, _this.direction), _defineProperty({}, className, className && !addonBefore && !addonAfter)),
ref: _this.saveInput
}));
};
_this.clearPasswordValueAttribute = function () {
// https://github.com/ant-design/ant-design/issues/20541
_this.removePasswordTimeout = setTimeout(function () {
if (_this.input && _this.input.getAttribute('type') === 'password' && _this.input.hasAttribute('value')) {
_this.input.removeAttribute('value');
}
});
};
_this.handleChange = function (e) {
_this.setValue(e.target.value, _this.clearPasswordValueAttribute);
resolveOnChange(_this.input, e, _this.props.onChange);
};
_this.handleKeyDown = function (e) {
var _this$props2 = _this.props,
onPressEnter = _this$props2.onPressEnter,
onKeyDown = _this$props2.onKeyDown;
if (e.keyCode === 13 && onPressEnter) {
onPressEnter(e);
}
if (onKeyDown) {
onKeyDown(e);
}
};
_this.renderComponent = function (_ref) {
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var _this$state = _this.state,
value = _this$state.value,
focused = _this$state.focused;
var customizePrefixCls = _this.props.prefixCls;
var prefixCls = getPrefixCls('input', customizePrefixCls);
_this.direction = direction;
return /*#__PURE__*/React.createElement(_SizeContext["default"].Consumer, null, function (size) {
return /*#__PURE__*/React.createElement(_ClearableLabeledInput["default"], _extends({
size: size
}, _this.props, {
prefixCls: prefixCls,
inputType: "input",
value: fixControlledValue(value),
element: _this.renderInput(prefixCls, size),
handleReset: _this.handleReset,
ref: _this.saveClearableInput,
direction: direction,
focused: focused,
triggerFocus: _this.focus
}));
});
};
var value = typeof props.value === 'undefined' ? props.defaultValue : props.value;
_this.state = {
value: value,
focused: false,
// eslint-disable-next-line react/no-unused-state
prevValue: props.value
};
return _this;
}
_createClass(Input, [{
key: "componentDidMount",
value: function componentDidMount() {
this.clearPasswordValueAttribute();
} // Since polyfill `getSnapshotBeforeUpdate` need work with `componentDidUpdate`.
// We keep an empty function here.
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {}
}, {
key: "getSnapshotBeforeUpdate",
value: function getSnapshotBeforeUpdate(prevProps) {
if ((0, _ClearableLabeledInput.hasPrefixSuffix)(prevProps) !== (0, _ClearableLabeledInput.hasPrefixSuffix)(this.props)) {
(0, _warning["default"])(this.input !== document.activeElement, 'Input', "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ");
}
return null;
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.removePasswordTimeout) {
clearTimeout(this.removePasswordTimeout);
}
}
}, {
key: "blur",
value: function blur() {
this.input.blur();
}
}, {
key: "select",
value: function select() {
this.input.select();
}
}, {
key: "setValue",
value: function setValue(value, callback) {
if (this.props.value === undefined) {
this.setState({
value: value
}, callback);
}
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, _ref2) {
var prevValue = _ref2.prevValue;
var newState = {
prevValue: nextProps.value
};
if (nextProps.value !== undefined || prevValue !== nextProps.value) {
newState.value = nextProps.value;
}
return newState;
}
}]);
return Input;
}(React.Component);
Input.defaultProps = {
type: 'text'
};
var _default = Input;
exports["default"] = _default;

27
web/node_modules/antd/lib/input/Password.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import * as React from 'react';
import { ConfigConsumerProps } from '../config-provider';
import Input, { InputProps } from './Input';
export interface PasswordProps extends InputProps {
readonly inputPrefixCls?: string;
readonly action?: string;
visibilityToggle?: boolean;
}
export interface PasswordState {
visible: boolean;
}
export default class Password extends React.Component<PasswordProps, PasswordState> {
input: HTMLInputElement;
static defaultProps: {
action: string;
visibilityToggle: boolean;
};
state: PasswordState;
onVisibleChange: () => void;
getIcon: (prefixCls: string) => React.ReactElement<{}, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
saveInput: (instance: Input) => void;
focus(): void;
blur(): void;
select(): void;
renderPassword: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}

187
web/node_modules/antd/lib/input/Password.js generated vendored Normal file
View File

@@ -0,0 +1,187 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _omit = _interopRequireDefault(require("omit.js"));
var _EyeOutlined = _interopRequireDefault(require("@ant-design/icons/EyeOutlined"));
var _EyeInvisibleOutlined = _interopRequireDefault(require("@ant-design/icons/EyeInvisibleOutlined"));
var _configProvider = require("../config-provider");
var _Input = _interopRequireDefault(require("./Input"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var __rest = void 0 && (void 0).__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;
};
var ActionMap = {
click: 'onClick',
hover: 'onMouseOver'
};
var Password = /*#__PURE__*/function (_React$Component) {
_inherits(Password, _React$Component);
var _super = _createSuper(Password);
function Password() {
var _this;
_classCallCheck(this, Password);
_this = _super.apply(this, arguments);
_this.state = {
visible: false
};
_this.onVisibleChange = function () {
var disabled = _this.props.disabled;
if (disabled) {
return;
}
_this.setState(function (_ref) {
var visible = _ref.visible;
return {
visible: !visible
};
});
};
_this.getIcon = function (prefixCls) {
var _iconProps;
var action = _this.props.action;
var iconTrigger = ActionMap[action] || '';
var icon = _this.state.visible ? _EyeOutlined["default"] : _EyeInvisibleOutlined["default"];
var iconProps = (_iconProps = {}, _defineProperty(_iconProps, iconTrigger, _this.onVisibleChange), _defineProperty(_iconProps, "className", "".concat(prefixCls, "-icon")), _defineProperty(_iconProps, "key", 'passwordIcon'), _defineProperty(_iconProps, "onMouseDown", function onMouseDown(e) {
// Prevent focused state lost
// https://github.com/ant-design/ant-design/issues/15173
e.preventDefault();
}), _iconProps);
return React.createElement(icon, iconProps);
};
_this.saveInput = function (instance) {
if (instance && instance.input) {
_this.input = instance.input;
}
};
_this.renderPassword = function (_ref2) {
var getPrefixCls = _ref2.getPrefixCls;
var _a = _this.props,
className = _a.className,
customizePrefixCls = _a.prefixCls,
customizeInputPrefixCls = _a.inputPrefixCls,
size = _a.size,
visibilityToggle = _a.visibilityToggle,
restProps = __rest(_a, ["className", "prefixCls", "inputPrefixCls", "size", "visibilityToggle"]);
var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
var prefixCls = getPrefixCls('input-password', customizePrefixCls);
var suffixIcon = visibilityToggle && _this.getIcon(prefixCls);
var inputClassName = (0, _classnames["default"])(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-").concat(size), !!size));
var props = _extends(_extends({}, (0, _omit["default"])(restProps, ['suffix'])), {
type: _this.state.visible ? 'text' : 'password',
className: inputClassName,
prefixCls: inputPrefixCls,
suffix: suffixIcon,
ref: _this.saveInput
});
if (size) {
props.size = size;
}
return /*#__PURE__*/React.createElement(_Input["default"], props);
};
return _this;
}
_createClass(Password, [{
key: "focus",
value: function focus() {
this.input.focus();
}
}, {
key: "blur",
value: function blur() {
this.input.blur();
}
}, {
key: "select",
value: function select() {
this.input.select();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderPassword);
}
}]);
return Password;
}(React.Component);
exports["default"] = Password;
Password.defaultProps = {
action: 'click',
visibilityToggle: true
};

34
web/node_modules/antd/lib/input/ResizableTextArea.d.ts generated vendored Normal file
View File

@@ -0,0 +1,34 @@
import * as React from 'react';
import { TextAreaProps } from './TextArea';
declare const RESIZE_STATUS_NONE = 0;
declare const RESIZE_STATUS_RESIZING = 1;
declare const RESIZE_STATUS_RESIZED = 2;
export interface AutoSizeType {
minRows?: number;
maxRows?: number;
}
export interface TextAreaState {
textareaStyles?: React.CSSProperties;
/** We need add process style to disable scroll first and then add back to avoid unexpected scrollbar */
resizeStatus?: typeof RESIZE_STATUS_NONE | typeof RESIZE_STATUS_RESIZING | typeof RESIZE_STATUS_RESIZED;
}
declare class ResizableTextArea extends React.Component<TextAreaProps, TextAreaState> {
nextFrameActionId: number;
resizeFrameId: number;
constructor(props: TextAreaProps);
textArea: HTMLTextAreaElement;
saveTextArea: (textArea: HTMLTextAreaElement) => void;
componentDidMount(): void;
componentDidUpdate(prevProps: TextAreaProps): void;
handleResize: (size: {
width: number;
height: number;
}) => void;
resizeOnNextFrame: () => void;
resizeTextarea: () => void;
componentWillUnmount(): void;
fixFirefoxAutoScroll(): void;
renderTextArea: () => JSX.Element;
render(): JSX.Element;
}
export default ResizableTextArea;

218
web/node_modules/antd/lib/input/ResizableTextArea.js generated vendored Normal file
View File

@@ -0,0 +1,218 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _rcResizeObserver = _interopRequireDefault(require("rc-resize-observer"));
var _omit = _interopRequireDefault(require("omit.js"));
var _classnames = _interopRequireDefault(require("classnames"));
var _calculateNodeHeight = _interopRequireDefault(require("./calculateNodeHeight"));
var _raf = _interopRequireDefault(require("../_util/raf"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var RESIZE_STATUS_NONE = 0;
var RESIZE_STATUS_RESIZING = 1;
var RESIZE_STATUS_RESIZED = 2;
var ResizableTextArea = /*#__PURE__*/function (_React$Component) {
_inherits(ResizableTextArea, _React$Component);
var _super = _createSuper(ResizableTextArea);
function ResizableTextArea(props) {
var _this;
_classCallCheck(this, ResizableTextArea);
_this = _super.call(this, props);
_this.saveTextArea = function (textArea) {
_this.textArea = textArea;
};
_this.handleResize = function (size) {
var resizeStatus = _this.state.resizeStatus;
var _this$props = _this.props,
autoSize = _this$props.autoSize,
onResize = _this$props.onResize;
if (resizeStatus !== RESIZE_STATUS_NONE) {
return;
}
if (typeof onResize === 'function') {
onResize(size);
}
if (autoSize) {
_this.resizeOnNextFrame();
}
};
_this.resizeOnNextFrame = function () {
_raf["default"].cancel(_this.nextFrameActionId);
_this.nextFrameActionId = (0, _raf["default"])(_this.resizeTextarea);
};
_this.resizeTextarea = function () {
var autoSize = _this.props.autoSize;
if (!autoSize || !_this.textArea) {
return;
}
var minRows = autoSize.minRows,
maxRows = autoSize.maxRows;
var textareaStyles = (0, _calculateNodeHeight["default"])(_this.textArea, false, minRows, maxRows);
_this.setState({
textareaStyles: textareaStyles,
resizeStatus: RESIZE_STATUS_RESIZING
}, function () {
_raf["default"].cancel(_this.resizeFrameId);
_this.resizeFrameId = (0, _raf["default"])(function () {
_this.setState({
resizeStatus: RESIZE_STATUS_RESIZED
}, function () {
_this.resizeFrameId = (0, _raf["default"])(function () {
_this.setState({
resizeStatus: RESIZE_STATUS_NONE
});
_this.fixFirefoxAutoScroll();
});
});
});
});
};
_this.renderTextArea = function () {
var _this$props2 = _this.props,
prefixCls = _this$props2.prefixCls,
autoSize = _this$props2.autoSize,
onResize = _this$props2.onResize,
className = _this$props2.className,
disabled = _this$props2.disabled;
var _this$state = _this.state,
textareaStyles = _this$state.textareaStyles,
resizeStatus = _this$state.resizeStatus;
var otherProps = (0, _omit["default"])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'defaultValue', 'allowClear', 'onResize']);
var cls = (0, _classnames["default"])(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776
// Make sure it could be reset when using form.getFieldDecorator
if ('value' in otherProps) {
otherProps.value = otherProps.value || '';
}
var style = _extends(_extends(_extends({}, _this.props.style), textareaStyles), resizeStatus === RESIZE_STATUS_RESIZING ? // React will warning when mix `overflow` & `overflowY`.
// We need to define this separately.
{
overflowX: 'hidden',
overflowY: 'hidden'
} : null);
return /*#__PURE__*/React.createElement(_rcResizeObserver["default"], {
onResize: _this.handleResize,
disabled: !(autoSize || onResize)
}, /*#__PURE__*/React.createElement("textarea", _extends({}, otherProps, {
className: cls,
style: style,
ref: _this.saveTextArea
})));
};
_this.state = {
textareaStyles: {},
resizeStatus: RESIZE_STATUS_NONE
};
return _this;
}
_createClass(ResizableTextArea, [{
key: "componentDidMount",
value: function componentDidMount() {
this.resizeTextarea();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
// Re-render with the new content then recalculate the height as required.
if (prevProps.value !== this.props.value) {
this.resizeTextarea();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
_raf["default"].cancel(this.nextFrameActionId);
_raf["default"].cancel(this.resizeFrameId);
} // https://github.com/ant-design/ant-design/issues/21870
}, {
key: "fixFirefoxAutoScroll",
value: function fixFirefoxAutoScroll() {
try {
if (document.activeElement === this.textArea) {
var currentStart = this.textArea.selectionStart;
var currentEnd = this.textArea.selectionEnd;
this.textArea.setSelectionRange(currentStart, currentEnd);
}
} catch (e) {// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
}, {
key: "render",
value: function render() {
return this.renderTextArea();
}
}]);
return ResizableTextArea;
}(React.Component);
var _default = ResizableTextArea;
exports["default"] = _default;

27
web/node_modules/antd/lib/input/Search.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import * as React from 'react';
import Input, { InputProps } from './Input';
import { SizeType } from '../config-provider/SizeContext';
import { ConfigConsumerProps } from '../config-provider';
export interface SearchProps extends InputProps {
inputPrefixCls?: string;
onSearch?: (value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>) => void;
enterButton?: React.ReactNode;
loading?: boolean;
}
export default class Search extends React.Component<SearchProps, any> {
static defaultProps: {
enterButton: boolean;
};
private input;
saveInput: (node: Input) => void;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
onMouseDown: React.MouseEventHandler<HTMLElement>;
onSearch: (e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLInputElement>) => void;
focus(): void;
blur(): void;
renderLoading: (prefixCls: string) => JSX.Element;
renderSuffix: (prefixCls: string) => {} | null | undefined;
renderAddonAfter: (prefixCls: string, size: SizeType) => {} | null | undefined;
renderSearch: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}

287
web/node_modules/antd/lib/input/Search.js generated vendored Normal file
View File

@@ -0,0 +1,287 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _SearchOutlined = _interopRequireDefault(require("@ant-design/icons/SearchOutlined"));
var _LoadingOutlined = _interopRequireDefault(require("@ant-design/icons/LoadingOutlined"));
var _Input = _interopRequireDefault(require("./Input"));
var _button = _interopRequireDefault(require("../button"));
var _SizeContext = _interopRequireDefault(require("../config-provider/SizeContext"));
var _configProvider = require("../config-provider");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var __rest = void 0 && (void 0).__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;
};
var Search = /*#__PURE__*/function (_React$Component) {
_inherits(Search, _React$Component);
var _super = _createSuper(Search);
function Search() {
var _this;
_classCallCheck(this, Search);
_this = _super.apply(this, arguments);
_this.saveInput = function (node) {
_this.input = node;
};
_this.onChange = function (e) {
var _this$props = _this.props,
onChange = _this$props.onChange,
onSearch = _this$props.onSearch;
if (e && e.target && e.type === 'click' && onSearch) {
onSearch(e.target.value, e);
}
if (onChange) {
onChange(e);
}
};
_this.onMouseDown = function (e) {
if (document.activeElement === _this.input.input) {
e.preventDefault();
}
};
_this.onSearch = function (e) {
var _this$props2 = _this.props,
onSearch = _this$props2.onSearch,
loading = _this$props2.loading,
disabled = _this$props2.disabled;
if (loading || disabled) {
return;
}
if (onSearch) {
onSearch(_this.input.input.value, e);
}
};
_this.renderLoading = function (prefixCls) {
var _this$props3 = _this.props,
enterButton = _this$props3.enterButton,
customizeSize = _this$props3.size;
if (enterButton) {
return /*#__PURE__*/React.createElement(_SizeContext["default"].Consumer, null, function (size) {
return /*#__PURE__*/React.createElement(_button["default"], {
className: "".concat(prefixCls, "-button"),
type: "primary",
size: customizeSize || size,
key: "enterButton"
}, /*#__PURE__*/React.createElement(_LoadingOutlined["default"], null));
});
}
return /*#__PURE__*/React.createElement(_LoadingOutlined["default"], {
className: "".concat(prefixCls, "-icon"),
key: "loadingIcon"
});
};
_this.renderSuffix = function (prefixCls) {
var _this$props4 = _this.props,
suffix = _this$props4.suffix,
enterButton = _this$props4.enterButton,
loading = _this$props4.loading;
if (loading && !enterButton) {
return [suffix, _this.renderLoading(prefixCls)];
}
if (enterButton) return suffix;
var icon = /*#__PURE__*/React.createElement(_SearchOutlined["default"], {
className: "".concat(prefixCls, "-icon"),
key: "searchIcon",
onClick: _this.onSearch
});
if (suffix) {
return [React.isValidElement(suffix) ? React.cloneElement(suffix, {
key: 'suffix'
}) : null, icon];
}
return icon;
};
_this.renderAddonAfter = function (prefixCls, size) {
var _this$props5 = _this.props,
enterButton = _this$props5.enterButton,
disabled = _this$props5.disabled,
addonAfter = _this$props5.addonAfter,
loading = _this$props5.loading;
var btnClassName = "".concat(prefixCls, "-button");
if (loading && enterButton) {
return [_this.renderLoading(prefixCls), addonAfter];
}
if (!enterButton) return addonAfter;
var button;
var enterButtonAsElement = enterButton;
var isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
if (isAntdButton || enterButtonAsElement.type === 'button') {
button = React.cloneElement(enterButtonAsElement, _extends({
onMouseDown: _this.onMouseDown,
onClick: _this.onSearch,
key: 'enterButton'
}, isAntdButton ? {
className: btnClassName,
size: size
} : {}));
} else {
button = /*#__PURE__*/React.createElement(_button["default"], {
className: btnClassName,
type: "primary",
size: size,
disabled: disabled,
key: "enterButton",
onMouseDown: _this.onMouseDown,
onClick: _this.onSearch
}, enterButton === true ? /*#__PURE__*/React.createElement(_SearchOutlined["default"], null) : enterButton);
}
if (addonAfter) {
return [button, React.isValidElement(addonAfter) ? React.cloneElement(addonAfter, {
key: 'addonAfter'
}) : null];
}
return button;
};
_this.renderSearch = function (_ref) {
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
customizeInputPrefixCls = _a.inputPrefixCls,
enterButton = _a.enterButton,
className = _a.className,
customizeSize = _a.size,
restProps = __rest(_a, ["prefixCls", "inputPrefixCls", "enterButton", "className", "size"]);
delete restProps.onSearch;
delete restProps.loading;
var prefixCls = getPrefixCls('input-search', customizePrefixCls);
var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
var getClassName = function getClassName(size) {
var inputClassName;
if (enterButton) {
var _classNames;
inputClassName = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames, "".concat(prefixCls, "-enter-button"), !!enterButton), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), !!size), _classNames));
} else {
inputClassName = (0, _classnames["default"])(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
}
return inputClassName;
};
return /*#__PURE__*/React.createElement(_SizeContext["default"].Consumer, null, function (size) {
return /*#__PURE__*/React.createElement(_Input["default"], _extends({
onPressEnter: _this.onSearch
}, restProps, {
size: customizeSize || size,
prefixCls: inputPrefixCls,
addonAfter: _this.renderAddonAfter(prefixCls, customizeSize || size),
suffix: _this.renderSuffix(prefixCls),
onChange: _this.onChange,
ref: _this.saveInput,
className: getClassName(customizeSize || size)
}));
});
};
return _this;
}
_createClass(Search, [{
key: "focus",
value: function focus() {
this.input.focus();
}
}, {
key: "blur",
value: function blur() {
this.input.blur();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderSearch);
}
}]);
return Search;
}(React.Component);
exports["default"] = Search;
Search.defaultProps = {
enterButton: false
};

38
web/node_modules/antd/lib/input/TextArea.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import * as React from 'react';
import ClearableLabeledInput from './ClearableLabeledInput';
import ResizableTextArea, { AutoSizeType } from './ResizableTextArea';
import { ConfigConsumerProps } from '../config-provider';
export declare type HTMLTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
export interface TextAreaProps extends HTMLTextareaProps {
prefixCls?: string;
autoSize?: boolean | AutoSizeType;
onPressEnter?: React.KeyboardEventHandler<HTMLTextAreaElement>;
allowClear?: boolean;
onResize?: (size: {
width: number;
height: number;
}) => void;
}
export interface TextAreaState {
value: any;
}
declare class TextArea extends React.Component<TextAreaProps, TextAreaState> {
resizableTextArea: ResizableTextArea;
clearableInput: ClearableLabeledInput;
constructor(props: TextAreaProps);
static getDerivedStateFromProps(nextProps: TextAreaProps): {
value: string | number | string[] | undefined;
} | null;
setValue(value: string, callback?: () => void): void;
focus: () => void;
blur(): void;
saveTextArea: (resizableTextArea: ResizableTextArea) => void;
saveClearableInput: (clearableInput: ClearableLabeledInput) => void;
handleChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
handleKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
handleReset: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
renderTextArea: (prefixCls: string) => JSX.Element;
renderComponent: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}
export default TextArea;

172
web/node_modules/antd/lib/input/TextArea.js generated vendored Normal file
View File

@@ -0,0 +1,172 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _ClearableLabeledInput = _interopRequireDefault(require("./ClearableLabeledInput"));
var _ResizableTextArea = _interopRequireDefault(require("./ResizableTextArea"));
var _configProvider = require("../config-provider");
var _Input = require("./Input");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var TextArea = /*#__PURE__*/function (_React$Component) {
_inherits(TextArea, _React$Component);
var _super = _createSuper(TextArea);
function TextArea(props) {
var _this;
_classCallCheck(this, TextArea);
_this = _super.call(this, props);
_this.focus = function () {
_this.resizableTextArea.textArea.focus();
};
_this.saveTextArea = function (resizableTextArea) {
_this.resizableTextArea = resizableTextArea;
};
_this.saveClearableInput = function (clearableInput) {
_this.clearableInput = clearableInput;
};
_this.handleChange = function (e) {
_this.setValue(e.target.value, function () {
_this.resizableTextArea.resizeTextarea();
});
(0, _Input.resolveOnChange)(_this.resizableTextArea.textArea, e, _this.props.onChange);
};
_this.handleKeyDown = function (e) {
var _this$props = _this.props,
onPressEnter = _this$props.onPressEnter,
onKeyDown = _this$props.onKeyDown;
if (e.keyCode === 13 && onPressEnter) {
onPressEnter(e);
}
if (onKeyDown) {
onKeyDown(e);
}
};
_this.handleReset = function (e) {
_this.setValue('', function () {
_this.resizableTextArea.renderTextArea();
_this.focus();
});
(0, _Input.resolveOnChange)(_this.resizableTextArea.textArea, e, _this.props.onChange);
};
_this.renderTextArea = function (prefixCls) {
return /*#__PURE__*/React.createElement(_ResizableTextArea["default"], _extends({}, _this.props, {
prefixCls: prefixCls,
onKeyDown: _this.handleKeyDown,
onChange: _this.handleChange,
ref: _this.saveTextArea
}));
};
_this.renderComponent = function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var value = _this.state.value;
var customizePrefixCls = _this.props.prefixCls;
var prefixCls = getPrefixCls('input', customizePrefixCls);
return /*#__PURE__*/React.createElement(_ClearableLabeledInput["default"], _extends({}, _this.props, {
prefixCls: prefixCls,
inputType: "text",
value: (0, _Input.fixControlledValue)(value),
element: _this.renderTextArea(prefixCls),
handleReset: _this.handleReset,
ref: _this.saveClearableInput,
triggerFocus: _this.focus
}));
};
var value = typeof props.value === 'undefined' ? props.defaultValue : props.value;
_this.state = {
value: value
};
return _this;
}
_createClass(TextArea, [{
key: "setValue",
value: function setValue(value, callback) {
if (!('value' in this.props)) {
this.setState({
value: value
}, callback);
}
}
}, {
key: "blur",
value: function blur() {
this.resizableTextArea.textArea.blur();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('value' in nextProps) {
return {
value: nextProps.value
};
}
return null;
}
}]);
return TextArea;
}(React.Component);
var _default = TextArea;
exports["default"] = _default;

View File

@@ -0,0 +1,13 @@
export interface NodeType {
sizingStyle: string;
paddingSize: number;
borderSize: number;
boxSizing: string;
}
export declare function calculateNodeStyling(node: HTMLElement, useCache?: boolean): NodeType;
export default function calculateNodeHeight(uiTextNode: HTMLTextAreaElement, useCache?: boolean, minRows?: number | null, maxRows?: number | null): {
height: number;
minHeight: number;
maxHeight: number;
overflowY: any;
};

126
web/node_modules/antd/lib/input/calculateNodeHeight.js generated vendored Normal file
View File

@@ -0,0 +1,126 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.calculateNodeStyling = calculateNodeStyling;
exports["default"] = calculateNodeHeight;
// Thanks to https://github.com/andreypopp/react-textarea-autosize/
/**
* calculateNodeHeight(uiTextNode, useCache = false)
*/
var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n";
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
var computedStyleCache = {};
var hiddenTextarea;
function calculateNodeStyling(node) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
if (useCache && computedStyleCache[nodeRef]) {
return computedStyleCache[nodeRef];
}
var style = window.getComputedStyle(node);
var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
var sizingStyle = SIZING_STYLE.map(function (name) {
return "".concat(name, ":").concat(style.getPropertyValue(name));
}).join(';');
var nodeInfo = {
sizingStyle: sizingStyle,
paddingSize: paddingSize,
borderSize: borderSize,
boxSizing: boxSizing
};
if (useCache && nodeRef) {
computedStyleCache[nodeRef] = nodeInfo;
}
return nodeInfo;
}
function calculateNodeHeight(uiTextNode) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
hiddenTextarea.setAttribute('tab-index', '-1');
hiddenTextarea.setAttribute('aria-hidden', 'true');
document.body.appendChild(hiddenTextarea);
} // Fix wrap="off" issue
// https://github.com/ant-design/ant-design/issues/6577
if (uiTextNode.getAttribute('wrap')) {
hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
} else {
hiddenTextarea.removeAttribute('wrap');
} // Copy all CSS properties that have an impact on the height of the content in
// the textbox
var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
paddingSize = _calculateNodeStyling.paddingSize,
borderSize = _calculateNodeStyling.borderSize,
boxSizing = _calculateNodeStyling.boxSizing,
sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise
// text-lines will not calculated properly as the shadow will technically be
// narrower for content
hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
var minHeight = Number.MIN_SAFE_INTEGER;
var maxHeight = Number.MAX_SAFE_INTEGER;
var height = hiddenTextarea.scrollHeight;
var overflowY;
if (boxSizing === 'border-box') {
// border-box: add border, since height = content + padding + border
height += borderSize;
} else if (boxSizing === 'content-box') {
// remove padding, since height = content
height -= paddingSize;
}
if (minRows !== null || maxRows !== null) {
// measure height of a textarea with a single row
hiddenTextarea.value = ' ';
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (minRows !== null) {
minHeight = singleRowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
}
if (maxRows !== null) {
maxHeight = singleRowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
overflowY = height > maxHeight ? '' : 'hidden';
height = Math.min(maxHeight, height);
}
}
return {
height: height,
minHeight: minHeight,
maxHeight: maxHeight,
overflowY: overflowY
};
}

7
web/node_modules/antd/lib/input/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import Input from './Input';
export { InputProps } from './Input';
export { GroupProps } from './Group';
export { SearchProps } from './Search';
export { TextAreaProps } from './TextArea';
export { PasswordProps } from './Password';
export default Input;

25
web/node_modules/antd/lib/input/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Input = _interopRequireDefault(require("./Input"));
var _Group = _interopRequireDefault(require("./Group"));
var _Search = _interopRequireDefault(require("./Search"));
var _TextArea = _interopRequireDefault(require("./TextArea"));
var _Password = _interopRequireDefault(require("./Password"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Input["default"].Group = _Group["default"];
_Input["default"].Search = _Search["default"];
_Input["default"].TextArea = _TextArea["default"];
_Input["default"].Password = _Password["default"];
var _default = _Input["default"];
exports["default"] = _default;

46
web/node_modules/antd/lib/input/style/affix.less generated vendored Normal file
View File

@@ -0,0 +1,46 @@
@import './index';
@import './mixin';
@input-affix-margin: 4px;
.@{ant-prefix}-input {
&-affix-wrapper {
.input();
display: inline-flex;
&-disabled {
.@{ant-prefix}-input[disabled] {
background: transparent;
}
}
> input.@{ant-prefix}-input {
padding: 0;
border: none;
outline: none;
&:focus {
box-shadow: none;
}
}
&::before {
width: 0;
visibility: hidden;
content: '\a0';
}
}
&-prefix,
&-suffix {
flex: none;
}
&-prefix {
margin-right: @input-affix-margin;
}
&-suffix {
margin-left: @input-affix-margin;
}
}

51
web/node_modules/antd/lib/input/style/allow-clear.less generated vendored Normal file
View File

@@ -0,0 +1,51 @@
@import './index';
.clear-icon() {
color: @disabled-color;
font-size: @font-size-sm;
// https://github.com/ant-design/ant-design/pull/18151
// https://codesandbox.io/s/wizardly-sun-u10br
cursor: pointer;
transition: color 0.3s;
&:hover {
color: @text-color-secondary;
}
&:active {
color: @text-color;
}
+ i {
margin-left: 6px;
}
&-hidden {
visibility: hidden;
}
}
// ========================= Input =========================
.@{ant-prefix}-input-clear-icon {
.clear-icon;
margin: 0 @input-affix-margin;
vertical-align: -1px;
&:last-child {
margin-right: 0;
}
}
// ======================= TextArea ========================
.@{ant-prefix}-input-affix-wrapper-textarea-with-clear-btn {
padding: 0 !important;
border: 0 !important;
}
.@{ant-prefix}-input-textarea-clear-icon {
.clear-icon;
position: absolute;
top: 0;
right: 0;
margin: 8px 8px 0 0;
}

7
web/node_modules/antd/lib/input/style/css.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
require("../../style/index.css");
require("./index.css");
require("../../button/style/css");

679
web/node_modules/antd/lib/input/style/index.css generated vendored Normal file
View File

@@ -0,0 +1,679 @@
/* 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-input-affix-wrapper {
position: relative;
display: inline-block;
width: 100%;
min-width: 0;
padding: 4px 11px;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
line-height: 1.5715;
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 2px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ant-input-affix-wrapper::-moz-placeholder {
opacity: 1;
}
.ant-input-affix-wrapper::-webkit-input-placeholder {
color: #bfbfbf;
}
.ant-input-affix-wrapper:-ms-input-placeholder {
color: #bfbfbf;
}
.ant-input-affix-wrapper::-ms-input-placeholder {
color: #bfbfbf;
}
.ant-input-affix-wrapper::placeholder {
color: #bfbfbf;
}
.ant-input-affix-wrapper:placeholder-shown {
text-overflow: ellipsis;
}
.ant-input-affix-wrapper:hover {
border-color: #40a9ff;
border-right-width: 1px !important;
}
.ant-input-rtl .ant-input-affix-wrapper:hover {
border-right-width: 0;
border-left-width: 1px !important;
}
.ant-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused {
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-input-rtl .ant-input-affix-wrapper:focus,
.ant-input-rtl .ant-input-affix-wrapper-focused {
border-right-width: 0;
border-left-width: 1px !important;
}
.ant-input-affix-wrapper-disabled {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
cursor: not-allowed;
opacity: 1;
}
.ant-input-affix-wrapper-disabled:hover {
border-color: #d9d9d9;
border-right-width: 1px !important;
}
.ant-input-affix-wrapper[disabled] {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
cursor: not-allowed;
opacity: 1;
}
.ant-input-affix-wrapper[disabled]:hover {
border-color: #d9d9d9;
border-right-width: 1px !important;
}
textarea.ant-input-affix-wrapper {
max-width: 100%;
height: auto;
min-height: 32px;
line-height: 1.5715;
vertical-align: bottom;
-webkit-transition: all 0.3s, height 0s;
transition: all 0.3s, height 0s;
}
.ant-input-affix-wrapper-lg {
padding: 6.5px 11px;
font-size: 16px;
}
.ant-input-affix-wrapper-sm {
padding: 0px 7px;
}
.ant-input-affix-wrapper-rtl {
direction: rtl;
}
.ant-input-affix-wrapper-disabled .ant-input[disabled] {
background: transparent;
}
.ant-input-affix-wrapper > input.ant-input {
padding: 0;
border: none;
outline: none;
}
.ant-input-affix-wrapper > input.ant-input:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
.ant-input-affix-wrapper::before {
width: 0;
visibility: hidden;
content: '\a0';
}
.ant-input-prefix,
.ant-input-suffix {
-webkit-box-flex: 0;
-ms-flex: none;
flex: none;
}
.ant-input-prefix {
margin-right: 4px;
}
.ant-input-suffix {
margin-left: 4px;
}
.ant-input-clear-icon {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
cursor: pointer;
-webkit-transition: color 0.3s;
transition: color 0.3s;
margin: 0 4px;
vertical-align: -1px;
}
.ant-input-clear-icon:hover {
color: rgba(0, 0, 0, 0.45);
}
.ant-input-clear-icon:active {
color: rgba(0, 0, 0, 0.65);
}
.ant-input-clear-icon + i {
margin-left: 6px;
}
.ant-input-clear-icon-hidden {
visibility: hidden;
}
.ant-input-clear-icon:last-child {
margin-right: 0;
}
.ant-input-affix-wrapper-textarea-with-clear-btn {
padding: 0 !important;
border: 0 !important;
}
.ant-input-textarea-clear-icon {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
cursor: pointer;
-webkit-transition: color 0.3s;
transition: color 0.3s;
position: absolute;
top: 0;
right: 0;
margin: 8px 8px 0 0;
}
.ant-input-textarea-clear-icon:hover {
color: rgba(0, 0, 0, 0.45);
}
.ant-input-textarea-clear-icon:active {
color: rgba(0, 0, 0, 0.65);
}
.ant-input-textarea-clear-icon + i {
margin-left: 6px;
}
.ant-input-textarea-clear-icon-hidden {
visibility: hidden;
}
.ant-input {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
font-variant: tabular-nums;
list-style: none;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
position: relative;
display: inline-block;
width: 100%;
min-width: 0;
padding: 4px 11px;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
line-height: 1.5715;
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 2px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-input::-moz-placeholder {
opacity: 1;
}
.ant-input::-webkit-input-placeholder {
color: #bfbfbf;
}
.ant-input:-ms-input-placeholder {
color: #bfbfbf;
}
.ant-input::-ms-input-placeholder {
color: #bfbfbf;
}
.ant-input::placeholder {
color: #bfbfbf;
}
.ant-input:placeholder-shown {
text-overflow: ellipsis;
}
.ant-input:hover {
border-color: #40a9ff;
border-right-width: 1px !important;
}
.ant-input-rtl .ant-input:hover {
border-right-width: 0;
border-left-width: 1px !important;
}
.ant-input:focus,
.ant-input-focused {
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-input-rtl .ant-input:focus,
.ant-input-rtl .ant-input-focused {
border-right-width: 0;
border-left-width: 1px !important;
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
cursor: not-allowed;
opacity: 1;
}
.ant-input-disabled:hover {
border-color: #d9d9d9;
border-right-width: 1px !important;
}
.ant-input[disabled] {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
cursor: not-allowed;
opacity: 1;
}
.ant-input[disabled]:hover {
border-color: #d9d9d9;
border-right-width: 1px !important;
}
textarea.ant-input {
max-width: 100%;
height: auto;
min-height: 32px;
line-height: 1.5715;
vertical-align: bottom;
-webkit-transition: all 0.3s, height 0s;
transition: all 0.3s, height 0s;
}
.ant-input-lg {
padding: 6.5px 11px;
font-size: 16px;
}
.ant-input-sm {
padding: 0px 7px;
}
.ant-input-rtl {
direction: rtl;
}
.ant-input-group {
-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';
position: relative;
display: table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
}
.ant-input-group[class*='col-'] {
float: none;
padding-right: 0;
padding-left: 0;
}
.ant-input-group > [class*='col-'] {
padding-right: 8px;
}
.ant-input-group > [class*='col-']:last-child {
padding-right: 0;
}
.ant-input-group-addon,
.ant-input-group-wrap,
.ant-input-group > .ant-input {
display: table-cell;
}
.ant-input-group-addon:not(:first-child):not(:last-child),
.ant-input-group-wrap:not(:first-child):not(:last-child),
.ant-input-group > .ant-input:not(:first-child):not(:last-child) {
border-radius: 0;
}
.ant-input-group-addon,
.ant-input-group-wrap {
width: 1px;
white-space: nowrap;
vertical-align: middle;
}
.ant-input-group-wrap > * {
display: block !important;
}
.ant-input-group .ant-input {
float: left;
width: 100%;
margin-bottom: 0;
text-align: inherit;
}
.ant-input-group .ant-input:focus {
z-index: 1;
border-right-width: 1px;
}
.ant-input-group .ant-input:hover {
z-index: 1;
border-right-width: 1px;
}
.ant-input-group-addon {
position: relative;
padding: 0 11px;
color: rgba(0, 0, 0, 0.65);
font-weight: normal;
font-size: 14px;
text-align: center;
background-color: #fafafa;
border: 1px solid #d9d9d9;
border-radius: 2px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-input-group-addon .ant-select {
margin: -5px -11px;
}
.ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background-color: inherit;
border: 1px solid transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.ant-input-group-addon .ant-select-open .ant-select-selector,
.ant-input-group-addon .ant-select-focused .ant-select-selector {
color: #1890ff;
}
.ant-input-group-addon > i:only-child::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
.ant-input-group > .ant-input:first-child,
.ant-input-group-addon:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ant-input-group > .ant-input:first-child .ant-select .ant-select-selector,
.ant-input-group-addon:first-child .ant-select .ant-select-selector {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ant-input-group > .ant-input-affix-wrapper:not(:first-child) .ant-input {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group > .ant-input-affix-wrapper:not(:last-child) .ant-input {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ant-input-group-addon:first-child {
border-right: 0;
}
.ant-input-group-addon:last-child {
border-left: 0;
}
.ant-input-group > .ant-input:last-child,
.ant-input-group-addon:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group > .ant-input:last-child .ant-select .ant-select-selector,
.ant-input-group-addon:last-child .ant-select .ant-select-selector {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group-lg .ant-input,
.ant-input-group-lg > .ant-input-group-addon {
padding: 6.5px 11px;
font-size: 16px;
}
.ant-input-group-sm .ant-input,
.ant-input-group-sm > .ant-input-group-addon {
padding: 0px 7px;
}
.ant-input-group-lg .ant-select-single .ant-select-selector {
height: 40px;
}
.ant-input-group-sm .ant-select-single .ant-select-selector {
height: 24px;
}
.ant-input-group .ant-input-affix-wrapper:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group .ant-input-affix-wrapper:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ant-input-group.ant-input-group-compact {
display: block;
}
.ant-input-group.ant-input-group-compact::before {
display: table;
content: '';
}
.ant-input-group.ant-input-group-compact::after {
display: table;
clear: both;
content: '';
}
.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child),
.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child),
.ant-input-group.ant-input-group-compact > .ant-input:not(:first-child):not(:last-child) {
border-right-width: 1px;
}
.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):hover,
.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):hover,
.ant-input-group.ant-input-group-compact > .ant-input:not(:first-child):not(:last-child):hover {
z-index: 1;
}
.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):focus,
.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):focus,
.ant-input-group.ant-input-group-compact > .ant-input:not(:first-child):not(:last-child):focus {
z-index: 1;
}
.ant-input-group.ant-input-group-compact > * {
display: inline-block;
float: none;
vertical-align: top;
border-radius: 0;
}
.ant-input-group.ant-input-group-compact > .ant-input-affix-wrapper {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ant-input-group.ant-input-group-compact > .ant-picker-range {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ant-input-group.ant-input-group-compact > *:not(:last-child) {
margin-right: -1px;
border-right-width: 1px;
}
.ant-input-group.ant-input-group-compact .ant-input {
float: none;
}
.ant-input-group.ant-input-group-compact > .ant-select > .ant-select-selector,
.ant-input-group.ant-input-group-compact > .ant-calendar-picker .ant-input,
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete .ant-input,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker .ant-input,
.ant-input-group.ant-input-group-compact > .ant-mention-wrapper .ant-mention-editor,
.ant-input-group.ant-input-group-compact > .ant-time-picker .ant-time-picker-input,
.ant-input-group.ant-input-group-compact > .ant-input-group-wrapper .ant-input {
border-right-width: 1px;
border-radius: 0;
}
.ant-input-group.ant-input-group-compact > .ant-select > .ant-select-selector:hover,
.ant-input-group.ant-input-group-compact > .ant-calendar-picker .ant-input:hover,
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete .ant-input:hover,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker .ant-input:hover,
.ant-input-group.ant-input-group-compact > .ant-mention-wrapper .ant-mention-editor:hover,
.ant-input-group.ant-input-group-compact > .ant-time-picker .ant-time-picker-input:hover,
.ant-input-group.ant-input-group-compact > .ant-input-group-wrapper .ant-input:hover {
z-index: 1;
}
.ant-input-group.ant-input-group-compact > .ant-select > .ant-select-selector:focus,
.ant-input-group.ant-input-group-compact > .ant-calendar-picker .ant-input:focus,
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete .ant-input:focus,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker .ant-input:focus,
.ant-input-group.ant-input-group-compact > .ant-mention-wrapper .ant-mention-editor:focus,
.ant-input-group.ant-input-group-compact > .ant-time-picker .ant-time-picker-input:focus,
.ant-input-group.ant-input-group-compact > .ant-input-group-wrapper .ant-input:focus {
z-index: 1;
}
.ant-input-group.ant-input-group-compact > .ant-select > .ant-select-arrow {
z-index: 1;
}
.ant-input-group.ant-input-group-compact > *:first-child,
.ant-input-group.ant-input-group-compact > .ant-select:first-child > .ant-select-selector,
.ant-input-group.ant-input-group-compact > .ant-calendar-picker:first-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:first-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker:first-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-mention-wrapper:first-child .ant-mention-editor,
.ant-input-group.ant-input-group-compact > .ant-time-picker:first-child .ant-time-picker-input {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
.ant-input-group.ant-input-group-compact > *:last-child,
.ant-input-group.ant-input-group-compact > .ant-select:last-child > .ant-select-selector,
.ant-input-group.ant-input-group-compact > .ant-calendar-picker:last-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:last-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker:last-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-cascader-picker-focused:last-child .ant-input,
.ant-input-group.ant-input-group-compact > .ant-mention-wrapper:last-child .ant-mention-editor,
.ant-input-group.ant-input-group-compact > .ant-time-picker:last-child .ant-time-picker-input {
border-right-width: 1px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
.ant-input-group.ant-input-group-compact > .ant-select-auto-complete .ant-input {
vertical-align: top;
}
.ant-input-group > .ant-input-rtl:first-child,
.ant-input-group-rtl .ant-input-group-addon:first-child {
border-radius: 2px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group-rtl .ant-input-group-addon:first-child {
border-right: 1px solid #d9d9d9;
border-left: 0;
}
.ant-input-group-rtl .ant-input-group-addon:last-child {
border-right: 0;
border-left: 1px solid #d9d9d9;
}
.ant-input-group-rtl .ant-input-group > .ant-input:last-child,
.ant-input-group-rtl .ant-input-group-addon:last-child {
border-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > *:not(:last-child) {
margin-right: 0;
margin-left: -1px;
border-left-width: 1px;
}
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > *:first-child,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select:first-child > .ant-select-selector,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-calendar-picker:first-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:first-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker:first-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-mention-wrapper:first-child .ant-mention-editor,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-time-picker:first-child .ant-time-picker-input {
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > *:last-child,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select:last-child > .ant-select-selector,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-calendar-picker:last-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:last-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker:last-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker-focused:last-child .ant-input,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-mention-wrapper:last-child .ant-mention-editor,
.ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-time-picker:last-child .ant-time-picker-input {
border-left-width: 1px;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.ant-input-group-wrapper {
display: inline-block;
width: 100%;
text-align: start;
vertical-align: top;
}
.ant-input-password-icon {
color: rgba(0, 0, 0, 0.45);
cursor: pointer;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-input-password-icon:hover {
color: rgba(0, 0, 0, 0.85);
}
.ant-input[type='color'] {
height: 32px;
}
.ant-input[type='color'].ant-input-lg {
height: 40px;
}
.ant-input[type='color'].ant-input-sm {
height: 24px;
padding-top: 3px;
padding-bottom: 3px;
}
.ant-input-search-icon {
color: rgba(0, 0, 0, 0.45);
cursor: pointer;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-input-search-icon:hover {
color: rgba(0, 0, 0, 0.85);
}
.ant-input-search-enter-button input {
border-right: 0;
}
.ant-input-search-enter-button input:hover,
.ant-input-search-enter-button input:focus {
border-color: #40a9ff;
}
.ant-input-search-enter-button.ant-input-affix-wrapper {
border-right: 0;
}
.ant-input-search-enter-button + .ant-input-group-addon,
.ant-input-search-enter-button input + .ant-input-group-addon {
padding: 0;
border: 0;
}
.ant-input-search-enter-button + .ant-input-group-addon .ant-input-search-button,
.ant-input-search-enter-button input + .ant-input-group-addon .ant-input-search-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-input-group-wrapper-rtl {
direction: rtl;
}
.ant-input-group-rtl {
direction: rtl;
}
.ant-input-affix-wrapper-rtl .ant-input-prefix {
margin: 0 0 0 4px;
}
.ant-input-affix-wrapper-rtl .ant-input-suffix {
margin: 0 4px 0 0;
}
.ant-input-search-rtl {
direction: rtl;
}
.ant-input-search-rtl.ant-input-search-enter-button input {
border: 1px solid #d9d9d9;
border-left: 0;
}
.ant-input-search-enter-button input:hover,
.ant-input-search-enter-button input:focus {
border-color: #40a9ff;
}
.ant-input-search-rtl.ant-input-search-enter-button + .ant-input-group-addon .ant-input-search-button,
.ant-input-search-rtl.ant-input-search-enter-button input + .ant-input-group-addon .ant-input-search-button {
width: 100%;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}

3
web/node_modules/antd/lib/input/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import '../../style/index.less';
import './index.less';
import '../../button/style';

7
web/node_modules/antd/lib/input/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
require("../../style/index.less");
require("./index.less");
require("../../button/style");

49
web/node_modules/antd/lib/input/style/index.less generated vendored Normal file
View File

@@ -0,0 +1,49 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './mixin';
@import './affix';
@import './allow-clear';
// Input styles
.@{ant-prefix}-input {
.reset-component;
.input;
//== Style for input-group: input with label, with button or dropdown...
&-group {
.reset-component;
.input-group(~'@{ant-prefix}-input');
&-wrapper {
display: inline-block;
width: 100%;
text-align: start;
vertical-align: top; // https://github.com/ant-design/ant-design/issues/6403
}
}
&-password-icon {
color: @text-color-secondary;
cursor: pointer;
transition: all 0.3s;
&:hover {
color: @input-icon-hover-color;
}
}
&[type='color'] {
height: @input-height-base;
&.@{ant-prefix}-input-lg {
height: @input-height-lg;
}
&.@{ant-prefix}-input-sm {
height: @input-height-sm;
padding-top: 3px;
padding-bottom: 3px;
}
}
}
@import './search-input';
@import './rtl';

381
web/node_modules/antd/lib/input/style/mixin.less generated vendored Normal file
View File

@@ -0,0 +1,381 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@input-affix-with-clear-btn-width: 38px;
// size mixins for input
.input-lg() {
padding: @input-padding-vertical-lg @input-padding-horizontal-lg;
font-size: @font-size-lg;
}
.input-sm() {
padding: @input-padding-vertical-sm @input-padding-horizontal-sm;
}
// input status
// == when focus or actived
.active(@color: @outline-color) {
& when (@theme = dark) {
border-color: @color;
}
& when not (@theme = dark) {
border-color: ~`colorPalette('@{color}', 5) `;
}
border-right-width: @border-width-base !important;
outline: 0;
box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@color, @outline-fade);
}
// == when hoverd
.hover(@color: @input-hover-border-color) {
border-color: @color;
border-right-width: @border-width-base !important;
}
.disabled() {
color: @disabled-color;
background-color: @input-disabled-bg;
cursor: not-allowed;
opacity: 1;
&:hover {
.hover(@input-border-color);
}
}
// Basic style for input
.input() {
position: relative;
display: inline-block;
width: 100%;
min-width: 0;
padding: @input-padding-vertical-base @input-padding-horizontal-base;
color: @input-color;
font-size: @font-size-base;
line-height: @line-height-base;
background-color: @input-bg;
background-image: none;
border: @border-width-base @border-style-base @input-border-color;
border-radius: @border-radius-base;
transition: all 0.3s;
.placeholder(); // Reset placeholder
&:hover {
.hover();
}
&:focus,
&-focused {
.active();
}
&-disabled {
.disabled();
}
&[disabled] {
.disabled();
}
// Reset height for `textarea`s
textarea& {
max-width: 100%; // prevent textearea resize from coming out of its container
height: auto;
min-height: @input-height-base;
line-height: @line-height-base;
vertical-align: bottom;
transition: all 0.3s, height 0s;
}
// Size
&-lg {
.input-lg();
}
&-sm {
.input-sm();
}
}
// label input
.input-group(@inputClass) {
position: relative;
display: table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
// Undo padding and float of grid classes
&[class*='col-'] {
float: none;
padding-right: 0;
padding-left: 0;
}
> [class*='col-'] {
padding-right: 8px;
&:last-child {
padding-right: 0;
}
}
&-addon,
&-wrap,
> .@{inputClass} {
display: table-cell;
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
}
&-addon,
&-wrap {
width: 1px; // To make addon/wrap as small as possible
white-space: nowrap;
vertical-align: middle;
}
&-wrap > * {
display: block !important;
}
.@{inputClass} {
float: left;
width: 100%;
margin-bottom: 0;
text-align: inherit;
&:focus {
z-index: 1; // Fix https://gw.alipayobjects.com/zos/rmsportal/DHNpoqfMXSfrSnlZvhsJ.png
border-right-width: 1px;
}
&:hover {
z-index: 1;
border-right-width: 1px;
}
}
&-addon {
position: relative;
padding: 0 @input-padding-horizontal-base;
color: @input-color;
font-weight: normal;
font-size: @font-size-base;
text-align: center;
background-color: @input-addon-bg;
border: @border-width-base @border-style-base @input-border-color;
border-radius: @border-radius-base;
transition: all 0.3s;
// Reset Select's style in addon
.@{ant-prefix}-select {
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
background-color: inherit;
border: @border-width-base @border-style-base transparent;
box-shadow: none;
}
&-open,
&-focused {
.@{ant-prefix}-select-selector {
color: @primary-color;
}
}
}
// Expand addon icon click area
// https://github.com/ant-design/ant-design/issues/3714
> i:only-child::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
}
// Reset rounded corners
> .@{inputClass}:first-child,
&-addon:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
> .@{inputClass}-affix-wrapper {
&:not(:first-child) .@{inputClass} {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
&:not(:last-child) .@{inputClass} {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
&-addon:first-child {
border-right: 0;
}
&-addon:last-child {
border-left: 0;
}
> .@{inputClass}:last-child,
&-addon:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
// Sizing options
&-lg .@{inputClass},
&-lg > &-addon {
.input-lg();
}
&-sm .@{inputClass},
&-sm > &-addon {
.input-sm();
}
// Fix https://github.com/ant-design/ant-design/issues/5754
&-lg .@{ant-prefix}-select-single .ant-select-selector {
height: @input-height-lg;
}
&-sm .@{ant-prefix}-select-single .ant-select-selector {
height: @input-height-sm;
}
.@{inputClass}-affix-wrapper {
&:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
&:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
&&-compact {
display: block;
.clearfix;
&-addon,
&-wrap,
> .@{inputClass} {
&:not(:first-child):not(:last-child) {
border-right-width: @border-width-base;
&:hover {
z-index: 1;
}
&:focus {
z-index: 1;
}
}
}
& > * {
display: inline-block;
float: none;
vertical-align: top; // https://github.com/ant-design/ant-design-pro/issues/139
border-radius: 0;
}
& > .@{inputClass}-affix-wrapper {
display: inline-flex;
}
& > .@{ant-prefix}-picker-range {
display: inline-flex;
}
& > *:not(:last-child) {
margin-right: -@border-width-base;
border-right-width: @border-width-base;
}
// Undo float for .ant-input-group .ant-input
.@{inputClass} {
float: none;
}
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker .@{ant-prefix}-time-picker-input,
& > .@{ant-prefix}-input-group-wrapper .@{ant-prefix}-input {
border-right-width: @border-width-base;
border-radius: 0;
&:hover {
z-index: 1;
}
&:focus {
z-index: 1;
}
}
// update z-index for arrow icon
& > .@{ant-prefix}-select > .@{ant-prefix}-select-arrow {
z-index: 1; // https://github.com/ant-design/ant-design/issues/20371
}
& > *:first-child,
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:first-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:first-child .@{ant-prefix}-time-picker-input {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
& > *:last-child,
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker-focused:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:last-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:last-child .@{ant-prefix}-time-picker-input {
border-right-width: @border-width-base;
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
// https://github.com/ant-design/ant-design/issues/12493
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input {
vertical-align: top;
}
}
}

163
web/node_modules/antd/lib/input/style/rtl.less generated vendored Normal file
View File

@@ -0,0 +1,163 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
//== Style for input-group: input with label, with button or dropdown...
.@{ant-prefix}-input-group {
&-wrapper {
&-rtl {
direction: rtl;
}
}
&-rtl {
direction: rtl;
}
}
// affix
@input-affix-margin: 4px;
.@{ant-prefix}-input {
&-affix-wrapper-rtl {
.@{ant-prefix}-input-prefix {
margin: 0 0 0 @input-affix-margin;
}
.@{ant-prefix}-input-suffix {
margin: 0 @input-affix-margin 0 0;
}
}
}
// mixin
@input-rtl-cls: ~'@{ant-prefix}-input-rtl';
.active() {
.@{input-rtl-cls} & {
border-right-width: 0;
border-left-width: @border-width-base !important;
}
}
.hover() {
.@{input-rtl-cls} & {
border-right-width: 0;
border-left-width: @border-width-base !important;
}
}
.input() {
&-rtl {
direction: rtl;
}
}
// label input
.input-group(@inputClass) {
> .@{inputClass}-rtl:first-child,
&-rtl &-addon:first-child {
border-radius: @border-radius-base;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
&-addon:first-child {
.@{inputClass}-group-rtl & {
border-right: @border-width-base @border-style-base @input-border-color;
border-left: 0;
}
}
&-addon:last-child {
.@{inputClass}-group-rtl & {
border-right: 0;
border-left: @border-width-base @border-style-base @input-border-color;
}
}
> .@{inputClass}:last-child,
&-addon:last-child {
.@{inputClass}-group-rtl & {
border-radius: @border-radius-base;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
&&-compact {
& > *:not(:last-child) {
.@{inputClass}-group-rtl& {
margin-right: 0;
margin-left: -@border-width-base;
border-left-width: @border-width-base;
}
}
& > *:first-child,
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:first-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:first-child .@{ant-prefix}-time-picker-input {
.@{inputClass}-group-rtl& {
border-top-left-radius: 0;
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
border-bottom-left-radius: 0;
}
}
& > *:last-child,
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker-focused:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:last-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:last-child .@{ant-prefix}-time-picker-input {
.@{inputClass}-group-rtl& {
border-left-width: @border-width-base;
border-top-left-radius: @border-radius-base;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: @border-radius-base;
}
}
}
}
// search-input
@search-rtl-cls: ~'@{search-prefix}-rtl';
.@{search-prefix} {
&-rtl {
direction: rtl;
}
&-enter-button {
input {
.@{search-rtl-cls}& {
border: @border-width-base @border-style-base @input-border-color;
border-left: 0;
}
&:hover,
&:focus {
border-color: @input-hover-border-color;
}
}
& + .@{ant-prefix}-input-group-addon,
input + .@{ant-prefix}-input-group-addon {
.@{search-rtl-cls}& {
.@{search-prefix}-button {
width: 100%;
border-top-left-radius: @border-radius-base;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: @border-radius-base;
}
}
}
}
}

View File

@@ -0,0 +1,43 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../button/style/mixin';
@import './mixin';
@search-prefix: ~'@{ant-prefix}-input-search';
.@{search-prefix} {
&-icon {
color: @text-color-secondary;
cursor: pointer;
transition: all 0.3s;
&:hover {
color: @input-icon-hover-color;
}
}
&-enter-button {
input {
border-right: 0;
&:hover,
&:focus {
border-color: @input-hover-border-color;
}
}
&.@{ant-prefix}-input-affix-wrapper {
border-right: 0;
}
& + .@{ant-prefix}-input-group-addon,
input + .@{ant-prefix}-input-group-addon {
padding: 0;
border: 0;
.@{search-prefix}-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
}