Latest updates from IceHrmPro
This commit is contained in:
11
web/node_modules/antd/es/space/index.d.ts
generated
vendored
Normal file
11
web/node_modules/antd/es/space/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import * as React from 'react';
|
||||
import { SizeType } from '../config-provider/SizeContext';
|
||||
export interface SpaceProps {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
size?: SizeType | number;
|
||||
direction?: 'horizontal' | 'vertical';
|
||||
}
|
||||
declare const Space: React.FC<SpaceProps>;
|
||||
export default Space;
|
||||
66
web/node_modules/antd/es/space/index.js
generated
vendored
Normal file
66
web/node_modules/antd/es/space/index.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
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; }
|
||||
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import toArray from "rc-util/es/Children/toArray";
|
||||
import { ConfigContext } from '../config-provider';
|
||||
var spaceSize = {
|
||||
small: 8,
|
||||
middle: 16,
|
||||
large: 24
|
||||
};
|
||||
|
||||
var Space = function Space(props) {
|
||||
var _React$useContext = React.useContext(ConfigContext),
|
||||
getPrefixCls = _React$useContext.getPrefixCls,
|
||||
space = _React$useContext.space,
|
||||
directionConfig = _React$useContext.direction;
|
||||
|
||||
var _props$size = props.size,
|
||||
size = _props$size === void 0 ? (space === null || space === void 0 ? void 0 : space.size) || 'small' : _props$size,
|
||||
className = props.className,
|
||||
children = props.children,
|
||||
_props$direction = props.direction,
|
||||
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
||||
customizePrefixCls = props.prefixCls,
|
||||
otherProps = __rest(props, ["size", "className", "children", "direction", "prefixCls"]);
|
||||
|
||||
var items = toArray(children);
|
||||
var len = items.length;
|
||||
|
||||
if (len === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var prefixCls = getPrefixCls('space', customizePrefixCls);
|
||||
var cn = classNames(prefixCls, "".concat(prefixCls, "-").concat(direction), _defineProperty({}, "".concat(prefixCls, "-rtl"), directionConfig === 'rtl'), className);
|
||||
var itemClassName = "".concat(prefixCls, "-item");
|
||||
var marginDirection = directionConfig === 'rtl' ? 'marginLeft' : 'marginRight';
|
||||
return /*#__PURE__*/React.createElement("div", _extends({
|
||||
className: cn
|
||||
}, otherProps), items.map(function (child, i) {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: itemClassName // eslint-disable-next-line react/no-array-index-key
|
||||
,
|
||||
key: "".concat(itemClassName, "-").concat(i),
|
||||
style: i === len - 1 ? {} : _defineProperty({}, direction === 'vertical' ? 'marginBottom' : marginDirection, typeof size === 'string' ? spaceSize[size] : size)
|
||||
}, child);
|
||||
}));
|
||||
};
|
||||
|
||||
export default Space;
|
||||
2
web/node_modules/antd/es/space/style/css.js
generated
vendored
Normal file
2
web/node_modules/antd/es/space/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.css';
|
||||
import './index.css';
|
||||
23
web/node_modules/antd/es/space/style/index.css
generated
vendored
Normal file
23
web/node_modules/antd/es/space/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/* 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-space {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
}
|
||||
.ant-space-horizontal {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ant-space-vertical {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.ant-space-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
2
web/node_modules/antd/es/space/style/index.d.ts
generated
vendored
Normal file
2
web/node_modules/antd/es/space/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
2
web/node_modules/antd/es/space/style/index.js
generated
vendored
Normal file
2
web/node_modules/antd/es/space/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
16
web/node_modules/antd/es/space/style/index.less
generated
vendored
Normal file
16
web/node_modules/antd/es/space/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
|
||||
@space-prefix-cls: ~'@{ant-prefix}-space';
|
||||
|
||||
.@{space-prefix-cls} {
|
||||
display: inline-flex;
|
||||
&-horizontal {
|
||||
align-items: center;
|
||||
}
|
||||
&-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
10
web/node_modules/antd/es/space/style/rtl.less
generated
vendored
Normal file
10
web/node_modules/antd/es/space/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
|
||||
@space-prefix-cls: ~'@{ant-prefix}-space';
|
||||
|
||||
.@{space-prefix-cls} {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user