Latest updates from IceHrmPro
This commit is contained in:
7
web/node_modules/antd/es/button/LoadingIcon.d.ts
generated
vendored
Normal file
7
web/node_modules/antd/es/button/LoadingIcon.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="react" />
|
||||
export interface LoadingIconProps {
|
||||
prefixCls: string;
|
||||
existIcon: boolean;
|
||||
loading?: boolean | object;
|
||||
}
|
||||
export default function LoadingIcon({ prefixCls, loading, existIcon }: LoadingIconProps): JSX.Element;
|
||||
56
web/node_modules/antd/es/button/LoadingIcon.js
generated
vendored
Normal file
56
web/node_modules/antd/es/button/LoadingIcon.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import CSSMotion from "rc-animate/es/CSSMotion";
|
||||
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
||||
|
||||
var getCollapsedWidth = function getCollapsedWidth() {
|
||||
return {
|
||||
width: 0,
|
||||
opacity: 0,
|
||||
transform: 'scale(0)'
|
||||
};
|
||||
};
|
||||
|
||||
var getRealWidth = function getRealWidth(node) {
|
||||
return {
|
||||
width: node.scrollWidth,
|
||||
opacity: 1,
|
||||
transform: 'scale(1)'
|
||||
};
|
||||
};
|
||||
|
||||
export default function LoadingIcon(_ref) {
|
||||
var prefixCls = _ref.prefixCls,
|
||||
loading = _ref.loading,
|
||||
existIcon = _ref.existIcon;
|
||||
var visible = !!loading;
|
||||
|
||||
if (existIcon) {
|
||||
return /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-loading-icon")
|
||||
}, /*#__PURE__*/React.createElement(LoadingOutlined, null));
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(CSSMotion, {
|
||||
visible: visible // We do not really use this motionName
|
||||
,
|
||||
motionName: "".concat(prefixCls, "-loading-icon-motion"),
|
||||
removeOnLeave: true,
|
||||
onAppearStart: getCollapsedWidth,
|
||||
onAppearActive: getRealWidth,
|
||||
onEnterStart: getCollapsedWidth,
|
||||
onEnterActive: getRealWidth,
|
||||
onLeaveStart: getRealWidth,
|
||||
onLeaveActive: getCollapsedWidth
|
||||
}, function (_ref2, ref) {
|
||||
var className = _ref2.className,
|
||||
style = _ref2.style;
|
||||
return /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-loading-icon"),
|
||||
style: style,
|
||||
ref: ref
|
||||
}, /*#__PURE__*/React.createElement(LoadingOutlined, {
|
||||
className: classNames(className)
|
||||
}));
|
||||
});
|
||||
}
|
||||
10
web/node_modules/antd/es/button/button-group.d.ts
generated
vendored
Normal file
10
web/node_modules/antd/es/button/button-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { SizeType } from '../config-provider/SizeContext';
|
||||
export interface ButtonGroupProps {
|
||||
size?: SizeType;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
prefixCls?: string;
|
||||
}
|
||||
declare const ButtonGroup: React.FC<ButtonGroupProps>;
|
||||
export default ButtonGroup;
|
||||
65
web/node_modules/antd/es/button/button-group.js
generated
vendored
Normal file
65
web/node_modules/antd/es/button/button-group.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
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 { ConfigConsumer } from '../config-provider';
|
||||
import UnreachableException from '../_util/unreachableException';
|
||||
|
||||
var ButtonGroup = function ButtonGroup(props) {
|
||||
return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {
|
||||
var _classNames;
|
||||
|
||||
var getPrefixCls = _ref.getPrefixCls,
|
||||
direction = _ref.direction;
|
||||
|
||||
var customizePrefixCls = props.prefixCls,
|
||||
size = props.size,
|
||||
className = props.className,
|
||||
others = __rest(props, ["prefixCls", "size", "className"]);
|
||||
|
||||
var prefixCls = getPrefixCls('btn-group', customizePrefixCls); // large => lg
|
||||
// small => sm
|
||||
|
||||
var sizeCls = '';
|
||||
|
||||
switch (size) {
|
||||
case 'large':
|
||||
sizeCls = 'lg';
|
||||
break;
|
||||
|
||||
case 'small':
|
||||
sizeCls = 'sm';
|
||||
break;
|
||||
|
||||
case 'middle':
|
||||
case undefined:
|
||||
break;
|
||||
|
||||
default:
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(new UnreachableException(size));
|
||||
}
|
||||
|
||||
var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
|
||||
return /*#__PURE__*/React.createElement("div", _extends({}, others, {
|
||||
className: classes
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
export default ButtonGroup;
|
||||
41
web/node_modules/antd/es/button/button.d.ts
generated
vendored
Normal file
41
web/node_modules/antd/es/button/button.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import * as React from 'react';
|
||||
import Group from './button-group';
|
||||
import { Omit } from '../_util/type';
|
||||
import { SizeType } from '../config-provider/SizeContext';
|
||||
declare const ButtonTypes: ["default", "primary", "ghost", "dashed", "danger", "link"];
|
||||
export declare type ButtonType = typeof ButtonTypes[number];
|
||||
declare const ButtonShapes: ["circle", "circle-outline", "round"];
|
||||
export declare type ButtonShape = typeof ButtonShapes[number];
|
||||
declare const ButtonHTMLTypes: ["submit", "button", "reset"];
|
||||
export declare type ButtonHTMLType = typeof ButtonHTMLTypes[number];
|
||||
export interface BaseButtonProps {
|
||||
type?: ButtonType;
|
||||
icon?: React.ReactNode;
|
||||
shape?: ButtonShape;
|
||||
size?: SizeType;
|
||||
loading?: boolean | {
|
||||
delay?: number;
|
||||
};
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
ghost?: boolean;
|
||||
danger?: boolean;
|
||||
block?: boolean;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
export declare type AnchorButtonProps = {
|
||||
href: string;
|
||||
target?: string;
|
||||
onClick?: React.MouseEventHandler<HTMLElement>;
|
||||
} & BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, 'type' | 'onClick'>;
|
||||
export declare type NativeButtonProps = {
|
||||
htmlType?: ButtonHTMLType;
|
||||
onClick?: React.MouseEventHandler<HTMLElement>;
|
||||
} & BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, 'type' | 'onClick'>;
|
||||
export declare type ButtonProps = Partial<AnchorButtonProps & NativeButtonProps>;
|
||||
interface ButtonTypeProps extends React.FC<ButtonProps> {
|
||||
Group: typeof Group;
|
||||
__ANT_BUTTON: boolean;
|
||||
}
|
||||
declare const Button: ButtonTypeProps;
|
||||
export default Button;
|
||||
258
web/node_modules/antd/es/button/button.js
generated
vendored
Normal file
258
web/node_modules/antd/es/button/button.js
generated
vendored
Normal file
@@ -0,0 +1,258 @@
|
||||
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
function _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); }
|
||||
|
||||
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;
|
||||
};
|
||||
/* eslint-disable react/button-has-type */
|
||||
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'omit.js';
|
||||
import Group from './button-group';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import Wave from '../_util/wave';
|
||||
import { tuple } from '../_util/type';
|
||||
import warning from '../_util/warning';
|
||||
import SizeContext from '../config-provider/SizeContext';
|
||||
import LoadingIcon from './LoadingIcon';
|
||||
var rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||
var isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
||||
|
||||
function isString(str) {
|
||||
return typeof str === 'string';
|
||||
} // Insert one space between two chinese characters automatically.
|
||||
|
||||
|
||||
function insertSpace(child, needInserted) {
|
||||
// Check the child if is undefined or null.
|
||||
if (child == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var SPACE = needInserted ? ' ' : ''; // strictNullChecks oops.
|
||||
|
||||
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
|
||||
return React.cloneElement(child, {}, child.props.children.split('').join(SPACE));
|
||||
}
|
||||
|
||||
if (typeof child === 'string') {
|
||||
if (isTwoCNChar(child)) {
|
||||
child = child.split('').join(SPACE);
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement("span", null, child);
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
|
||||
function spaceChildren(children, needInserted) {
|
||||
var isPrevChildPure = false;
|
||||
var childList = [];
|
||||
React.Children.forEach(children, function (child) {
|
||||
var type = _typeof(child);
|
||||
|
||||
var isCurrentChildPure = type === 'string' || type === 'number';
|
||||
|
||||
if (isPrevChildPure && isCurrentChildPure) {
|
||||
var lastIndex = childList.length - 1;
|
||||
var lastChild = childList[lastIndex];
|
||||
childList[lastIndex] = "".concat(lastChild).concat(child);
|
||||
} else {
|
||||
childList.push(child);
|
||||
}
|
||||
|
||||
isPrevChildPure = isCurrentChildPure;
|
||||
}); // Pass to React.Children.map to auto fill key
|
||||
|
||||
return React.Children.map(childList, function (child) {
|
||||
return insertSpace(child, needInserted);
|
||||
});
|
||||
}
|
||||
|
||||
var ButtonTypes = tuple('default', 'primary', 'ghost', 'dashed', 'danger', 'link');
|
||||
var ButtonShapes = tuple('circle', 'circle-outline', 'round');
|
||||
var ButtonHTMLTypes = tuple('submit', 'button', 'reset');
|
||||
|
||||
var Button = function Button(_a) {
|
||||
var props = __rest(_a, []);
|
||||
|
||||
var _React$useState = React.useState(props.loading),
|
||||
_React$useState2 = _slicedToArray(_React$useState, 2),
|
||||
loading = _React$useState2[0],
|
||||
setLoading = _React$useState2[1];
|
||||
|
||||
var _React$useState3 = React.useState(false),
|
||||
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
||||
hasTwoCNChar = _React$useState4[0],
|
||||
setHasTwoCNChar = _React$useState4[1];
|
||||
|
||||
var _React$useContext = React.useContext(ConfigContext),
|
||||
getPrefixCls = _React$useContext.getPrefixCls,
|
||||
autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton,
|
||||
direction = _React$useContext.direction;
|
||||
|
||||
var buttonRef = React.createRef();
|
||||
var delayTimeout;
|
||||
|
||||
var isNeedInserted = function isNeedInserted() {
|
||||
var icon = props.icon,
|
||||
children = props.children,
|
||||
type = props.type;
|
||||
return React.Children.count(children) === 1 && !icon && type !== 'link';
|
||||
};
|
||||
|
||||
var fixTwoCNChar = function fixTwoCNChar() {
|
||||
// Fix for HOC usage like <FormatMessage />
|
||||
if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
var buttonText = buttonRef.current.textContent;
|
||||
|
||||
if (isNeedInserted() && isTwoCNChar(buttonText)) {
|
||||
if (!hasTwoCNChar) {
|
||||
setHasTwoCNChar(true);
|
||||
}
|
||||
} else if (hasTwoCNChar) {
|
||||
setHasTwoCNChar(false);
|
||||
}
|
||||
};
|
||||
|
||||
React.useEffect(function () {
|
||||
if (props.loading && typeof props.loading !== 'boolean') {
|
||||
clearTimeout(delayTimeout);
|
||||
}
|
||||
|
||||
if (props.loading && typeof props.loading !== 'boolean' && props.loading.delay) {
|
||||
delayTimeout = window.setTimeout(function () {
|
||||
setLoading(props.loading);
|
||||
}, props.loading.delay);
|
||||
} else if (props.loading !== loading) {
|
||||
setLoading(props.loading);
|
||||
}
|
||||
}, [props.loading]);
|
||||
React.useEffect(function () {
|
||||
fixTwoCNChar();
|
||||
}, [buttonRef]);
|
||||
|
||||
var handleClick = function handleClick(e) {
|
||||
var onClick = props.onClick;
|
||||
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (onClick) {
|
||||
onClick(e);
|
||||
}
|
||||
};
|
||||
|
||||
return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {
|
||||
var _classNames;
|
||||
|
||||
var customizePrefixCls = props.prefixCls,
|
||||
type = props.type,
|
||||
danger = props.danger,
|
||||
shape = props.shape,
|
||||
customizeSize = props.size,
|
||||
className = props.className,
|
||||
children = props.children,
|
||||
icon = props.icon,
|
||||
ghost = props.ghost,
|
||||
block = props.block,
|
||||
rest = __rest(props, ["prefixCls", "type", "danger", "shape", "size", "className", "children", "icon", "ghost", "block"]);
|
||||
|
||||
warning(!(typeof icon === 'string' && icon.length > 2), 'Button', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon"));
|
||||
var prefixCls = getPrefixCls('btn', customizePrefixCls);
|
||||
var autoInsertSpace = autoInsertSpaceInButton !== false; // large => lg
|
||||
// small => sm
|
||||
|
||||
var sizeCls = '';
|
||||
|
||||
switch (customizeSize || size) {
|
||||
case 'large':
|
||||
sizeCls = 'lg';
|
||||
break;
|
||||
|
||||
case 'small':
|
||||
sizeCls = 'sm';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
var iconType = loading ? 'loading' : icon;
|
||||
var classes = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), type), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(shape), shape), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), _defineProperty(_classNames, "".concat(prefixCls, "-icon-only"), !children && children !== 0 && iconType), _defineProperty(_classNames, "".concat(prefixCls, "-background-ghost"), ghost), _defineProperty(_classNames, "".concat(prefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(prefixCls, "-two-chinese-chars"), hasTwoCNChar && autoInsertSpace), _defineProperty(_classNames, "".concat(prefixCls, "-block"), block), _defineProperty(_classNames, "".concat(prefixCls, "-dangerous"), !!danger), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
|
||||
var iconNode = icon && !loading ? icon : /*#__PURE__*/React.createElement(LoadingIcon, {
|
||||
existIcon: !!icon,
|
||||
prefixCls: prefixCls,
|
||||
loading: loading
|
||||
});
|
||||
var kids = children || children === 0 ? spaceChildren(children, isNeedInserted() && autoInsertSpace) : null;
|
||||
var linkButtonRestProps = omit(rest, ['htmlType', 'loading']);
|
||||
|
||||
if (linkButtonRestProps.href !== undefined) {
|
||||
return /*#__PURE__*/React.createElement("a", _extends({}, linkButtonRestProps, {
|
||||
className: classes,
|
||||
onClick: handleClick,
|
||||
ref: buttonRef
|
||||
}), iconNode, kids);
|
||||
} // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
|
||||
|
||||
|
||||
var _a = rest,
|
||||
htmlType = _a.htmlType,
|
||||
otherProps = __rest(_a, ["htmlType"]);
|
||||
|
||||
var buttonNode = /*#__PURE__*/React.createElement("button", _extends({}, omit(otherProps, ['loading']), {
|
||||
type: htmlType,
|
||||
className: classes,
|
||||
onClick: handleClick,
|
||||
ref: buttonRef
|
||||
}), iconNode, kids);
|
||||
|
||||
if (type === 'link') {
|
||||
return buttonNode;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(Wave, null, buttonNode);
|
||||
});
|
||||
};
|
||||
|
||||
Button.defaultProps = {
|
||||
loading: false,
|
||||
ghost: false,
|
||||
block: false,
|
||||
htmlType: 'button'
|
||||
};
|
||||
Button.Group = Group;
|
||||
Button.__ANT_BUTTON = true;
|
||||
export default Button;
|
||||
5
web/node_modules/antd/es/button/index.d.ts
generated
vendored
Normal file
5
web/node_modules/antd/es/button/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import Button from './button';
|
||||
export { ButtonProps, ButtonShape, ButtonType } from './button';
|
||||
export { ButtonGroupProps } from './button-group';
|
||||
export { SizeType as ButtonSize } from '../config-provider/SizeContext';
|
||||
export default Button;
|
||||
2
web/node_modules/antd/es/button/index.js
generated
vendored
Normal file
2
web/node_modules/antd/es/button/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import Button from './button';
|
||||
export default Button;
|
||||
2
web/node_modules/antd/es/button/style/css.js
generated
vendored
Normal file
2
web/node_modules/antd/es/button/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.css';
|
||||
import './index.css';
|
||||
2304
web/node_modules/antd/es/button/style/index.css
generated
vendored
Normal file
2304
web/node_modules/antd/es/button/style/index.css
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
web/node_modules/antd/es/button/style/index.d.ts
generated
vendored
Normal file
2
web/node_modules/antd/es/button/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/button/style/index.js
generated
vendored
Normal file
2
web/node_modules/antd/es/button/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
245
web/node_modules/antd/es/button/style/index.less
generated
vendored
Normal file
245
web/node_modules/antd/es/button/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import './mixin';
|
||||
|
||||
@btn-prefix-cls: ~'@{ant-prefix}-btn';
|
||||
|
||||
// for compatible
|
||||
@btn-ghost-color: @text-color;
|
||||
@btn-ghost-bg: transparent;
|
||||
@btn-ghost-border: @border-color-base;
|
||||
|
||||
// Button styles
|
||||
// -----------------------------
|
||||
.@{btn-prefix-cls} {
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/12978
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/20058
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/19972
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/18107
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/13214
|
||||
// It is a render problem of chrome, which is only happened in the codesandbox demo
|
||||
// 0.001px solution works and I don't why
|
||||
line-height: @line-height-base;
|
||||
.btn;
|
||||
.btn-default;
|
||||
// Make sure that the target of Button's click event always be `button`
|
||||
// Ref: https://github.com/ant-design/ant-design/issues/7034
|
||||
> i,
|
||||
> span {
|
||||
display: inline-block;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&-primary {
|
||||
.btn-primary;
|
||||
|
||||
.@{btn-prefix-cls}-group &:not(:first-child):not(:last-child) {
|
||||
border-right-color: @btn-group-border;
|
||||
border-left-color: @btn-group-border;
|
||||
|
||||
&:disabled {
|
||||
border-color: @btn-default-border;
|
||||
}
|
||||
}
|
||||
|
||||
.@{btn-prefix-cls}-group &:first-child {
|
||||
&:not(:last-child) {
|
||||
border-right-color: @btn-group-border;
|
||||
|
||||
&[disabled] {
|
||||
border-right-color: @btn-default-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{btn-prefix-cls}-group &:last-child:not(:first-child),
|
||||
.@{btn-prefix-cls}-group & + & {
|
||||
border-left-color: @btn-group-border;
|
||||
|
||||
&[disabled] {
|
||||
border-left-color: @btn-default-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-ghost {
|
||||
.btn-ghost;
|
||||
}
|
||||
|
||||
&-dashed {
|
||||
.btn-dashed;
|
||||
}
|
||||
|
||||
// type="danger" will deprecated
|
||||
// use danger instead
|
||||
&-danger {
|
||||
.btn-danger;
|
||||
}
|
||||
|
||||
&-link {
|
||||
.btn-link;
|
||||
}
|
||||
|
||||
&-dangerous {
|
||||
.btn-danger-default;
|
||||
}
|
||||
|
||||
&-dangerous&-primary {
|
||||
.btn-danger;
|
||||
}
|
||||
|
||||
&-dangerous&-link {
|
||||
.btn-danger-link;
|
||||
}
|
||||
|
||||
&-icon-only {
|
||||
.btn-square(@btn-prefix-cls);
|
||||
|
||||
> i {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&-round {
|
||||
.btn-round(@btn-prefix-cls);
|
||||
&.@{btn-prefix-cls}-icon-only {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-circle,
|
||||
&-circle-outline {
|
||||
.btn-circle(@btn-prefix-cls);
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
right: -1px;
|
||||
bottom: -1px;
|
||||
left: -1px;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
background: @component-background;
|
||||
border-radius: inherit;
|
||||
opacity: 0.35;
|
||||
transition: opacity 0.2s;
|
||||
content: '';
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
transition: margin-left 0.3s @ease-in-out;
|
||||
|
||||
// Follow icon blur under windows. Change the render.
|
||||
// https://github.com/ant-design/ant-design/issues/13924
|
||||
&.@{iconfont-css-prefix}-plus,
|
||||
&.@{iconfont-css-prefix}-minus {
|
||||
> svg {
|
||||
shape-rendering: optimizeSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&&-loading {
|
||||
position: relative;
|
||||
&:not([disabled]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
& > &-loading-icon {
|
||||
transition: all 0.3s @ease-in-out;
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
padding-right: @margin-xs;
|
||||
}
|
||||
}
|
||||
|
||||
&-group {
|
||||
.btn-group(@btn-prefix-cls);
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/a/21281554/3040605
|
||||
&:focus > span,
|
||||
&:active > span {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// To ensure that a space will be placed between character and `Icon`.
|
||||
> .@{iconfont-css-prefix} + span,
|
||||
> span + .@{iconfont-css-prefix} {
|
||||
margin-left: @margin-xs;
|
||||
}
|
||||
|
||||
&-background-ghost {
|
||||
color: @btn-default-ghost-color;
|
||||
background: @btn-default-ghost-bg !important;
|
||||
border-color: @btn-default-ghost-border;
|
||||
}
|
||||
|
||||
&-background-ghost&-primary {
|
||||
.button-variant-ghost(@btn-primary-bg);
|
||||
}
|
||||
|
||||
&-background-ghost&-danger {
|
||||
.button-variant-ghost(@btn-danger-border);
|
||||
}
|
||||
|
||||
&-background-ghost&-dangerous {
|
||||
.button-variant-ghost(@btn-danger-border);
|
||||
}
|
||||
|
||||
&-background-ghost&-dangerous&-link {
|
||||
.button-variant-ghost(@btn-danger-border, transparent);
|
||||
}
|
||||
|
||||
&-background-ghost&-link {
|
||||
.button-variant-ghost(@link-color; transparent);
|
||||
|
||||
color: @btn-link-ghost-color;
|
||||
}
|
||||
|
||||
&-two-chinese-chars::first-letter {
|
||||
letter-spacing: 0.34em;
|
||||
}
|
||||
|
||||
&-two-chinese-chars > *:not(.@{iconfont-css-prefix}) {
|
||||
margin-right: -0.34em;
|
||||
letter-spacing: 0.34em;
|
||||
}
|
||||
|
||||
&-block {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/12681
|
||||
// same method as Select
|
||||
&:empty {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
visibility: hidden;
|
||||
content: '\a0';
|
||||
}
|
||||
}
|
||||
|
||||
a.@{btn-prefix-cls} {
|
||||
// Fixing https://github.com/ant-design/ant-design/issues/12978
|
||||
// It is a render problem of chrome, which is only happened in the codesandbox demo
|
||||
// 0.1px for padding-top solution works and I don't why
|
||||
padding-top: 0.1px;
|
||||
line-height: @btn-height-base - 2px;
|
||||
|
||||
&-lg {
|
||||
line-height: @btn-height-lg - 2px;
|
||||
}
|
||||
&-sm {
|
||||
line-height: @btn-height-sm - 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
484
web/node_modules/antd/es/button/style/mixin.less
generated
vendored
Normal file
484
web/node_modules/antd/es/button/style/mixin.less
generated
vendored
Normal file
@@ -0,0 +1,484 @@
|
||||
// mixins for button
|
||||
// ------------------------
|
||||
.button-size(@height; @padding-horizontal; @font-size; @border-radius) {
|
||||
@padding-vertical: max(
|
||||
round((@height - @font-size * @line-height-base) / 2 * 10) / 10 - @border-width-base,
|
||||
0
|
||||
);
|
||||
height: @height;
|
||||
padding: @padding-vertical @padding-horizontal;
|
||||
font-size: @font-size;
|
||||
border-radius: @border-radius;
|
||||
}
|
||||
|
||||
.button-disabled(@color: @btn-disable-color; @background: @btn-disable-bg; @border: @btn-disable-border) {
|
||||
&-disabled,
|
||||
&.disabled,
|
||||
&[disabled] {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
.button-color(@color; @background; @border);
|
||||
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-variant-primary(@color; @background) {
|
||||
.button-color(@color; @background; @background);
|
||||
|
||||
text-shadow: @btn-text-shadow;
|
||||
box-shadow: @btn-primary-shadow;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) `
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) `
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
.button-disabled();
|
||||
}
|
||||
|
||||
.button-variant-other(@color; @background; @border) {
|
||||
.button-color(@color; @background; @border);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
& when (@theme = dark) {
|
||||
.button-color(@primary-5; @background; @primary-5);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 5) `; @background;
|
||||
~`colorPalette('@{btn-primary-bg}', 5) `
|
||||
);
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
& when (@theme = dark) {
|
||||
.button-color(@primary-7; @background; @primary-7);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 7) `; @background;
|
||||
~`colorPalette('@{btn-primary-bg}', 7) `
|
||||
);
|
||||
}
|
||||
}
|
||||
.button-disabled();
|
||||
}
|
||||
.button-variant-ghost(@color; @border: @color) {
|
||||
.button-color(@color; transparent; @border);
|
||||
text-shadow: none;
|
||||
&:hover,
|
||||
&:focus {
|
||||
& when (@border = transparent) {
|
||||
& when (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{color}', 7) `; transparent; transparent);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{color}', 5) `; transparent; transparent);
|
||||
}
|
||||
}
|
||||
& when not (@border = transparent) {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
& when (@border = transparent) {
|
||||
& when (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{color}', 5) `; transparent; transparent);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{color}', 7) `; transparent; transparent);
|
||||
}
|
||||
}
|
||||
& when not(@border = transparent) {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-disabled();
|
||||
}
|
||||
.button-color(@color; @background; @border) {
|
||||
color: @color;
|
||||
background-color: @background;
|
||||
border-color: @border; // a inside Button which only work in Chrome
|
||||
// http://stackoverflow.com/a/17253457
|
||||
> a:only-child {
|
||||
color: currentColor;
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-group-base(@btnClassName) {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
> .@{btnClassName},
|
||||
> span > .@{btnClassName} {
|
||||
position: relative;
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
z-index: 2;
|
||||
}
|
||||
&:disabled {
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
> .@{btnClassName}-icon-only {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
// size
|
||||
&-lg > .@{btnClassName},
|
||||
&-lg > span > .@{btnClassName} {
|
||||
.button-size(@btn-height-lg; @btn-padding-horizontal-lg; @btn-font-size-lg; 0);
|
||||
}
|
||||
&-lg > .@{btnClassName}.@{btnClassName}-icon-only {
|
||||
.square(@btn-height-lg);
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
&-sm > .@{btnClassName},
|
||||
&-sm > span > .@{btnClassName} {
|
||||
.button-size(@btn-height-sm; @btn-padding-horizontal-sm; @font-size-base; 0);
|
||||
> .@{iconfont-css-prefix} {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
}
|
||||
&-sm > .@{btnClassName}.@{btnClassName}-icon-only {
|
||||
.square(@btn-height-sm);
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
// Base styles of buttons
|
||||
// --------------------------------------------------
|
||||
.btn() {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font-weight: @btn-font-weight;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
background-image: none;
|
||||
border: @btn-border-width @btn-border-style transparent;
|
||||
box-shadow: @btn-shadow;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s @ease-in-out;
|
||||
user-select: none;
|
||||
touch-action: manipulation;
|
||||
.button-size(
|
||||
@btn-height-base; @btn-padding-horizontal-base; @font-size-base; @btn-border-radius-base
|
||||
);
|
||||
> .@{iconfont-css-prefix} {
|
||||
line-height: 1;
|
||||
}
|
||||
&,
|
||||
&:active,
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
&:not([disabled]):hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
&:not([disabled]):active {
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
&.disabled,
|
||||
&[disabled] {
|
||||
cursor: not-allowed;
|
||||
> * {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
&-lg {
|
||||
.button-size(
|
||||
@btn-height-lg; @btn-padding-horizontal-lg; @btn-font-size-lg; @btn-border-radius-base
|
||||
);
|
||||
}
|
||||
&-sm {
|
||||
.button-size(
|
||||
@btn-height-sm; @btn-padding-horizontal-sm; @btn-font-size-sm; @btn-border-radius-sm
|
||||
);
|
||||
line-height: @btn-height-sm - 2px;
|
||||
}
|
||||
}
|
||||
// primary button style
|
||||
.btn-primary() {
|
||||
.button-variant-primary(@btn-primary-color; @btn-primary-bg);
|
||||
}
|
||||
// default button style
|
||||
.btn-default() {
|
||||
.button-variant-other(@btn-default-color; @btn-default-bg; @btn-default-border);
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
text-decoration: none;
|
||||
background: @btn-default-bg;
|
||||
}
|
||||
}
|
||||
// ghost button style
|
||||
.btn-ghost() {
|
||||
.button-variant-other(@btn-ghost-color, @btn-ghost-bg, @btn-ghost-border);
|
||||
}
|
||||
// dashed button style
|
||||
.btn-dashed() {
|
||||
.button-variant-other(@btn-default-color, @btn-default-bg, @btn-default-border);
|
||||
border-style: dashed;
|
||||
}
|
||||
// danger button style
|
||||
.btn-danger() {
|
||||
.button-variant-primary(@btn-danger-color, @btn-danger-bg);
|
||||
}
|
||||
// danger default button style
|
||||
.btn-danger-default() {
|
||||
.button-color(@error-color, @btn-default-bg, @error-color);
|
||||
&:hover,
|
||||
&:focus {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7)
|
||||
`
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5)
|
||||
`
|
||||
);
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5)
|
||||
`
|
||||
);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7)
|
||||
`
|
||||
);
|
||||
}
|
||||
}
|
||||
.button-disabled();
|
||||
}
|
||||
// danger link button style
|
||||
.btn-danger-link() {
|
||||
.button-variant-other(@error-color, transparent, transparent);
|
||||
box-shadow: none;
|
||||
&:hover,
|
||||
&:focus {
|
||||
& when (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{error-color}', 7) `; transparent; transparent);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{error-color}', 5) `; transparent; transparent);
|
||||
}
|
||||
}
|
||||
&:active {
|
||||
& when (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{error-color}', 5) `; transparent; transparent);
|
||||
}
|
||||
& when not (@theme = dark) {
|
||||
.button-color(~`colorPalette('@{error-color}', 7) `; transparent; transparent);
|
||||
}
|
||||
}
|
||||
.button-disabled(@disabled-color; transparent; transparent);
|
||||
}
|
||||
// link button style
|
||||
.btn-link() {
|
||||
.button-variant-other(@link-color, transparent, transparent);
|
||||
box-shadow: none;
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
.button-disabled(@disabled-color; transparent; transparent);
|
||||
}
|
||||
// round button
|
||||
.btn-round(@btnClassName: btn) {
|
||||
.button-size(@btn-circle-size; @btn-circle-size / 2; @font-size-base; @btn-circle-size);
|
||||
&.@{btnClassName}-lg {
|
||||
.button-size(
|
||||
@btn-circle-size-lg; @btn-circle-size-lg / 2; @btn-font-size-lg; @btn-circle-size-lg
|
||||
);
|
||||
}
|
||||
&.@{btnClassName}-sm {
|
||||
.button-size(
|
||||
@btn-circle-size-sm; @btn-circle-size-sm / 2; @font-size-base; @btn-circle-size-sm
|
||||
);
|
||||
}
|
||||
}
|
||||
// square button: the content only contains icon
|
||||
.btn-square(@btnClassName: btn) {
|
||||
.square(@btn-square-size);
|
||||
.button-size(@btn-square-size; 0; @btn-square-only-icon-size; @btn-border-radius-base);
|
||||
& > * {
|
||||
font-size: @btn-square-only-icon-size;
|
||||
}
|
||||
&.@{btnClassName}-lg {
|
||||
.square(@btn-square-size-lg);
|
||||
.button-size(@btn-square-size-lg; 0; @btn-square-only-icon-size-lg; @btn-border-radius-base);
|
||||
& > * {
|
||||
font-size: @btn-square-only-icon-size-lg;
|
||||
}
|
||||
}
|
||||
&.@{btnClassName}-sm {
|
||||
.square(@btn-square-size-sm);
|
||||
.button-size(@btn-square-size-sm; 0; @btn-square-only-icon-size-sm; @btn-border-radius-base);
|
||||
& > * {
|
||||
font-size: @btn-square-only-icon-size-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
// circle button: the content only contains icon
|
||||
.btn-circle(@btnClassName: btn) {
|
||||
min-width: @btn-height-base;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
&.@{btnClassName}-lg {
|
||||
min-width: @btn-height-lg;
|
||||
border-radius: 50%;
|
||||
}
|
||||
&.@{btnClassName}-sm {
|
||||
min-width: @btn-height-sm;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
// Horizontal button groups style
|
||||
// --------------------------------------------------
|
||||
.btn-group(@btnClassName: btn) {
|
||||
.button-group-base(@btnClassName);
|
||||
.@{btnClassName} + .@{btnClassName},
|
||||
.@{btnClassName} + &,
|
||||
span + .@{btnClassName},
|
||||
.@{btnClassName} + span,
|
||||
> span + span,
|
||||
& + .@{btnClassName},
|
||||
& + & {
|
||||
margin-left: -1px;
|
||||
}
|
||||
.@{btnClassName}-primary + .@{btnClassName}:not(.@{btnClassName}-primary):not([disabled]) {
|
||||
border-left-color: transparent;
|
||||
}
|
||||
.@{btnClassName} {
|
||||
border-radius: 0;
|
||||
}
|
||||
> .@{btnClassName}:first-child,
|
||||
> span:first-child > .@{btnClassName} {
|
||||
margin-left: 0;
|
||||
}
|
||||
> .@{btnClassName}:only-child {
|
||||
border-radius: @btn-border-radius-base;
|
||||
}
|
||||
> span:only-child > .@{btnClassName} {
|
||||
border-radius: @btn-border-radius-base;
|
||||
}
|
||||
> .@{btnClassName}:first-child:not(:last-child),
|
||||
> span:first-child:not(:last-child) > .@{btnClassName} {
|
||||
border-top-left-radius: @btn-border-radius-base;
|
||||
border-bottom-left-radius: @btn-border-radius-base;
|
||||
}
|
||||
> .@{btnClassName}:last-child:not(:first-child),
|
||||
> span:last-child:not(:first-child) > .@{btnClassName} {
|
||||
border-top-right-radius: @btn-border-radius-base;
|
||||
border-bottom-right-radius: @btn-border-radius-base;
|
||||
}
|
||||
&-sm {
|
||||
> .@{btnClassName}:only-child {
|
||||
border-radius: @btn-border-radius-sm;
|
||||
}
|
||||
> span:only-child > .@{btnClassName} {
|
||||
border-radius: @btn-border-radius-sm;
|
||||
}
|
||||
> .@{btnClassName}:first-child:not(:last-child),
|
||||
> span:first-child:not(:last-child) > .@{btnClassName} {
|
||||
border-top-left-radius: @btn-border-radius-sm;
|
||||
border-bottom-left-radius: @btn-border-radius-sm;
|
||||
}
|
||||
> .@{btnClassName}:last-child:not(:first-child),
|
||||
> span:last-child:not(:first-child) > .@{btnClassName} {
|
||||
border-top-right-radius: @btn-border-radius-sm;
|
||||
border-bottom-right-radius: @btn-border-radius-sm;
|
||||
}
|
||||
}
|
||||
& > & {
|
||||
float: left;
|
||||
}
|
||||
& > &:not(:first-child):not(:last-child) > .@{btnClassName} {
|
||||
border-radius: 0;
|
||||
}
|
||||
& > &:first-child:not(:last-child) {
|
||||
> .@{btnClassName}:last-child {
|
||||
padding-right: 8px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
& > &:last-child:not(:first-child) > .@{btnClassName}:first-child {
|
||||
padding-left: 8px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
125
web/node_modules/antd/es/button/style/rtl.less
generated
vendored
Normal file
125
web/node_modules/antd/es/button/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
|
||||
@btn-prefix-cls: ~'@{ant-prefix}-btn';
|
||||
|
||||
.@{btn-prefix-cls} {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
&-primary {
|
||||
.@{btn-prefix-cls}-group &:last-child:not(:first-child),
|
||||
.@{btn-prefix-cls}-group & + & {
|
||||
.@{btn-prefix-cls}-group-rtl& {
|
||||
border-right-color: @btn-group-border;
|
||||
border-left-color: @btn-default-border;
|
||||
}
|
||||
&[disabled] {
|
||||
.@{btn-prefix-cls}-group-rtl& {
|
||||
border-right-color: @btn-default-border;
|
||||
border-left-color: @btn-group-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
|
||||
.@{btn-prefix-cls}-rtl& {
|
||||
padding-right: 29px;
|
||||
padding-left: @padding-md - 1px;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix}:not(:last-child) {
|
||||
.@{btn-prefix-cls}-rtl& {
|
||||
margin-right: -14px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-sm&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
|
||||
.@{btn-prefix-cls}-rtl& {
|
||||
padding-right: 24px;
|
||||
padding-left: @padding-xs - 1px;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
.@{btn-prefix-cls}-rtl& {
|
||||
margin-right: -17px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .@{iconfont-css-prefix} + span,
|
||||
> span + .@{iconfont-css-prefix} {
|
||||
.@{btn-prefix-cls}-rtl& {
|
||||
margin-right: 8px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mixin
|
||||
.btn-group(@btnClassName: btn) {
|
||||
.@{btnClassName} + .@{btnClassName},
|
||||
.@{btnClassName} + &,
|
||||
span + .@{btnClassName},
|
||||
.@{btnClassName} + span,
|
||||
> span + span,
|
||||
& + .@{btnClassName},
|
||||
& + & {
|
||||
.@{btnClassName}-rtl&,
|
||||
.@{btnClassName}-group-rtl& {
|
||||
margin-right: -1px;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&.@{btnClassName}-group-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
> .@{btnClassName}:first-child:not(:last-child),
|
||||
> span:first-child:not(:last-child) > .@{btnClassName} {
|
||||
.@{btnClassName}-group-rtl& {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: @btn-border-radius-base;
|
||||
border-bottom-right-radius: @btn-border-radius-base;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
> .@{btnClassName}:last-child:not(:first-child),
|
||||
> span:last-child:not(:first-child) > .@{btnClassName} {
|
||||
.@{btnClassName}-group-rtl& {
|
||||
border-top-left-radius: @btn-border-radius-base;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: @btn-border-radius-base;
|
||||
}
|
||||
}
|
||||
|
||||
&-sm {
|
||||
> .@{btnClassName}:first-child:not(:last-child),
|
||||
> span:first-child:not(:last-child) > .@{btnClassName} {
|
||||
.@{btnClassName}-group-rtl& {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: @btn-border-radius-sm;
|
||||
border-bottom-right-radius: @btn-border-radius-sm;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
> .@{btnClassName}:last-child:not(:first-child),
|
||||
> span:last-child:not(:first-child) > .@{btnClassName} {
|
||||
.@{btnClassName}-group-rtl& {
|
||||
border-top-left-radius: @btn-border-radius-sm;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: @btn-border-radius-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user