Latest updates from IceHrmPro
This commit is contained in:
22
web/node_modules/antd/es/auto-complete/index.d.ts
generated
vendored
Normal file
22
web/node_modules/antd/es/auto-complete/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* TODO: 4.0
|
||||
* - remove `dataSource`
|
||||
* - `size` not work with customizeInput
|
||||
* - customizeInput not feedback `ENTER` key since accessibility enhancement
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import Select, { InternalSelectProps, OptionType } from '../select';
|
||||
export interface DataSourceItemObject {
|
||||
value: string;
|
||||
text: string;
|
||||
}
|
||||
export declare type DataSourceItemType = string | DataSourceItemObject;
|
||||
export interface AutoCompleteProps extends Omit<InternalSelectProps<string>, 'inputIcon' | 'loading' | 'mode' | 'optionLabelProp' | 'labelInValue'> {
|
||||
dataSource?: DataSourceItemType[];
|
||||
}
|
||||
declare const RefAutoComplete: React.ForwardRefExoticComponent<AutoCompleteProps & React.RefAttributes<Select<import("../select").SelectValue>>>;
|
||||
declare type RefAutoComplete = typeof RefAutoComplete & {
|
||||
Option: OptionType;
|
||||
};
|
||||
declare const _default: RefAutoComplete;
|
||||
export default _default;
|
||||
100
web/node_modules/antd/es/auto-complete/index.js
generated
vendored
Normal file
100
web/node_modules/antd/es/auto-complete/index.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
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 _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); }
|
||||
|
||||
/**
|
||||
* TODO: 4.0
|
||||
* - remove `dataSource`
|
||||
* - `size` not work with customizeInput
|
||||
* - customizeInput not feedback `ENTER` key since accessibility enhancement
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import toArray from "rc-util/es/Children/toArray";
|
||||
import classNames from 'classnames';
|
||||
import omit from 'omit.js';
|
||||
import Select from '../select';
|
||||
import { ConfigConsumer } from '../config-provider';
|
||||
import warning from '../_util/warning';
|
||||
var Option = Select.Option;
|
||||
var InternalSelect = Select;
|
||||
|
||||
function isSelectOptionOrSelectOptGroup(child) {
|
||||
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
|
||||
}
|
||||
|
||||
var AutoComplete = function AutoComplete(props, ref) {
|
||||
var customizePrefixCls = props.prefixCls,
|
||||
className = props.className,
|
||||
children = props.children,
|
||||
dataSource = props.dataSource;
|
||||
var childNodes = toArray(children);
|
||||
var selectRef = React.useRef();
|
||||
React.useImperativeHandle(ref, function () {
|
||||
return selectRef.current;
|
||||
}); // ============================= Input =============================
|
||||
|
||||
var customizeInput;
|
||||
|
||||
if (childNodes.length === 1 && React.isValidElement(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
||||
customizeInput = childNodes[0];
|
||||
}
|
||||
|
||||
var getInputElement = function getInputElement() {
|
||||
return customizeInput;
|
||||
}; // ============================ Options ============================
|
||||
|
||||
|
||||
var optionChildren; // [Legacy] convert `children` or `dataSource` into option children
|
||||
|
||||
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
||||
optionChildren = children;
|
||||
} else {
|
||||
optionChildren = dataSource ? dataSource.map(function (item) {
|
||||
if (React.isValidElement(item)) {
|
||||
return item;
|
||||
}
|
||||
|
||||
switch (_typeof(item)) {
|
||||
case 'string':
|
||||
return /*#__PURE__*/React.createElement(Option, {
|
||||
key: item,
|
||||
value: item
|
||||
}, item);
|
||||
|
||||
case 'object':
|
||||
{
|
||||
var optionValue = item.value;
|
||||
return /*#__PURE__*/React.createElement(Option, {
|
||||
key: optionValue,
|
||||
value: optionValue
|
||||
}, item.text);
|
||||
}
|
||||
|
||||
default:
|
||||
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
|
||||
}
|
||||
}) : [];
|
||||
} // ============================ Warning ============================
|
||||
|
||||
|
||||
React.useEffect(function () {
|
||||
warning(!('dataSource' in props), 'AutoComplete', '`dataSource` is deprecated, please use `options` instead.');
|
||||
warning(!customizeInput || !('size' in props), 'AutoComplete', 'You need to control style self instead of setting `size` when using customize input.');
|
||||
}, []);
|
||||
return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {
|
||||
var getPrefixCls = _ref.getPrefixCls;
|
||||
var prefixCls = getPrefixCls('select', customizePrefixCls);
|
||||
return /*#__PURE__*/React.createElement(InternalSelect, _extends({
|
||||
ref: selectRef
|
||||
}, omit(props, ['dataSource']), {
|
||||
prefixCls: prefixCls,
|
||||
className: classNames(className, "".concat(prefixCls, "-auto-complete")),
|
||||
mode: Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
|
||||
getInputElement: getInputElement
|
||||
}), optionChildren);
|
||||
});
|
||||
};
|
||||
|
||||
var RefAutoComplete = React.forwardRef(AutoComplete);
|
||||
RefAutoComplete.Option = Option;
|
||||
export default RefAutoComplete;
|
||||
4
web/node_modules/antd/es/auto-complete/style/css.js
generated
vendored
Normal file
4
web/node_modules/antd/es/auto-complete/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import '../../style/index.css';
|
||||
import './index.css'; // style dependencies
|
||||
|
||||
import '../../select/style/css';
|
||||
20
web/node_modules/antd/es/auto-complete/style/index.css
generated
vendored
Normal file
20
web/node_modules/antd/es/auto-complete/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/* 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-select-auto-complete {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5715;
|
||||
list-style: none;
|
||||
-webkit-font-feature-settings: 'tnum';
|
||||
font-feature-settings: 'tnum';
|
||||
}
|
||||
.ant-select-auto-complete .ant-select-clear {
|
||||
right: 13px;
|
||||
}
|
||||
3
web/node_modules/antd/es/auto-complete/style/index.d.ts
generated
vendored
Normal file
3
web/node_modules/antd/es/auto-complete/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
import '../../select/style';
|
||||
4
web/node_modules/antd/es/auto-complete/style/index.js
generated
vendored
Normal file
4
web/node_modules/antd/es/auto-complete/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less'; // style dependencies
|
||||
|
||||
import '../../select/style';
|
||||
16
web/node_modules/antd/es/auto-complete/style/index.less
generated
vendored
Normal file
16
web/node_modules/antd/es/auto-complete/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
||||
|
||||
@input-prefix-cls: ~'@{ant-prefix}-input';
|
||||
@select-prefix-cls: ~'@{ant-prefix}-select';
|
||||
@autocomplete-prefix-cls: ~'@{select-prefix-cls}-auto-complete';
|
||||
|
||||
.@{autocomplete-prefix-cls} {
|
||||
.reset-component;
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/22302
|
||||
.@{select-prefix-cls}-clear {
|
||||
right: 13px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user