first commit
This commit is contained in:
60
frontend/node_modules/antd/lib/input-number/index.d.ts
generated
vendored
Normal file
60
frontend/node_modules/antd/lib/input-number/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import * as React from 'react';
|
||||
import type { InputNumberProps as RcInputNumberProps, InputNumberRef as RcInputNumberRef, ValueType } from 'rc-input-number';
|
||||
import type { InputStatus } from '../_util/statusUtils';
|
||||
import type { Variant } from '../config-provider';
|
||||
import type { SizeType } from '../config-provider/SizeContext';
|
||||
export interface InputNumberProps<T extends ValueType = ValueType> extends Omit<RcInputNumberProps<T>, 'prefix' | 'size' | 'controls'> {
|
||||
prefixCls?: string;
|
||||
rootClassName?: string;
|
||||
/**
|
||||
* @deprecated Use `Space.Compact` instead.
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* import { Space, InputNumber } from 'antd';
|
||||
*
|
||||
* <Space.Compact>
|
||||
* {addon}
|
||||
* <InputNumber defaultValue={1} />
|
||||
* </Space.Compact>
|
||||
* ```
|
||||
*/
|
||||
addonBefore?: React.ReactNode;
|
||||
/**
|
||||
* @deprecated Use `Space.Compact` instead.
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* import { Space, InputNumber } from 'antd';
|
||||
*
|
||||
* <Space.Compact>
|
||||
* <InputNumber defaultValue={1} />
|
||||
* {addon}
|
||||
* </Space.Compact>
|
||||
* ```
|
||||
*/
|
||||
addonAfter?: React.ReactNode;
|
||||
prefix?: React.ReactNode;
|
||||
suffix?: React.ReactNode;
|
||||
size?: SizeType;
|
||||
disabled?: boolean;
|
||||
/** @deprecated Use `variant` instead. */
|
||||
bordered?: boolean;
|
||||
status?: InputStatus;
|
||||
controls?: boolean | {
|
||||
upIcon?: React.ReactNode;
|
||||
downIcon?: React.ReactNode;
|
||||
};
|
||||
/**
|
||||
* @since 5.13.0
|
||||
* @default "outlined"
|
||||
*/
|
||||
variant?: Variant;
|
||||
}
|
||||
declare const TypedInputNumber: (<T extends ValueType = ValueType>(props: React.PropsWithChildren<InputNumberProps<T>> & React.RefAttributes<RcInputNumberRef>) => React.ReactElement) & {
|
||||
displayName?: string;
|
||||
_InternalPanelDoNotUseOrYouWillBeFired: typeof PureInputNumber;
|
||||
};
|
||||
/** @private Internal Component. Do not use in your production. */
|
||||
declare const PureInputNumber: React.FC<InputNumberProps>;
|
||||
export default TypedInputNumber;
|
||||
169
frontend/node_modules/antd/lib/input-number/index.js
generated
vendored
Normal file
169
frontend/node_modules/antd/lib/input-number/index.js
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
|
||||
var _UpOutlined = _interopRequireDefault(require("@ant-design/icons/UpOutlined"));
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
var _rcInputNumber = _interopRequireDefault(require("rc-input-number"));
|
||||
var _ContextIsolator = _interopRequireDefault(require("../_util/ContextIsolator"));
|
||||
var _statusUtils = require("../_util/statusUtils");
|
||||
var _warning = require("../_util/warning");
|
||||
var _configProvider = _interopRequireWildcard(require("../config-provider"));
|
||||
var _DisabledContext = _interopRequireDefault(require("../config-provider/DisabledContext"));
|
||||
var _useCSSVarCls = _interopRequireDefault(require("../config-provider/hooks/useCSSVarCls"));
|
||||
var _useSize = _interopRequireDefault(require("../config-provider/hooks/useSize"));
|
||||
var _context = require("../form/context");
|
||||
var _useVariants = _interopRequireDefault(require("../form/hooks/useVariants"));
|
||||
var _Compact = require("../space/Compact");
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
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;
|
||||
};
|
||||
const InputNumber = /*#__PURE__*/React.forwardRef((props, ref) => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const typeWarning = (0, _warning.devUseWarning)('InputNumber');
|
||||
[['bordered', 'variant'], ['addonAfter', 'Space.Compact'], ['addonBefore', 'Space.Compact']].forEach(([prop, newProp]) => {
|
||||
typeWarning.deprecated(!(prop in props), prop, newProp);
|
||||
});
|
||||
typeWarning(!(props.type === 'number' && props.changeOnWheel), 'usage', 'When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.');
|
||||
}
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = React.useContext(_configProvider.ConfigContext);
|
||||
const inputRef = React.useRef(null);
|
||||
React.useImperativeHandle(ref, () => inputRef.current);
|
||||
const {
|
||||
className,
|
||||
rootClassName,
|
||||
size: customizeSize,
|
||||
disabled: customDisabled,
|
||||
prefixCls: customizePrefixCls,
|
||||
addonBefore,
|
||||
addonAfter,
|
||||
prefix,
|
||||
suffix,
|
||||
bordered,
|
||||
readOnly,
|
||||
status: customStatus,
|
||||
controls,
|
||||
variant: customVariant
|
||||
} = props,
|
||||
others = __rest(props, ["className", "rootClassName", "size", "disabled", "prefixCls", "addonBefore", "addonAfter", "prefix", "suffix", "bordered", "readOnly", "status", "controls", "variant"]);
|
||||
const prefixCls = getPrefixCls('input-number', customizePrefixCls);
|
||||
// Style
|
||||
const rootCls = (0, _useCSSVarCls.default)(prefixCls);
|
||||
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);
|
||||
const {
|
||||
compactSize,
|
||||
compactItemClassnames
|
||||
} = (0, _Compact.useCompactItemContext)(prefixCls, direction);
|
||||
let upIcon = /*#__PURE__*/React.createElement(_UpOutlined.default, {
|
||||
className: `${prefixCls}-handler-up-inner`
|
||||
});
|
||||
let downIcon = /*#__PURE__*/React.createElement(_DownOutlined.default, {
|
||||
className: `${prefixCls}-handler-down-inner`
|
||||
});
|
||||
const controlsTemp = typeof controls === 'boolean' ? controls : undefined;
|
||||
if (typeof controls === 'object') {
|
||||
upIcon = typeof controls.upIcon === 'undefined' ? upIcon : (/*#__PURE__*/React.createElement("span", {
|
||||
className: `${prefixCls}-handler-up-inner`
|
||||
}, controls.upIcon));
|
||||
downIcon = typeof controls.downIcon === 'undefined' ? downIcon : (/*#__PURE__*/React.createElement("span", {
|
||||
className: `${prefixCls}-handler-down-inner`
|
||||
}, controls.downIcon));
|
||||
}
|
||||
const {
|
||||
hasFeedback,
|
||||
status: contextStatus,
|
||||
isFormItemInput,
|
||||
feedbackIcon
|
||||
} = React.useContext(_context.FormItemInputContext);
|
||||
const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);
|
||||
const mergedSize = (0, _useSize.default)(ctx => {
|
||||
var _a;
|
||||
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
||||
});
|
||||
// ===================== Disabled =====================
|
||||
const disabled = React.useContext(_DisabledContext.default);
|
||||
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
||||
const [variant, enableVariantCls] = (0, _useVariants.default)('inputNumber', customVariant, bordered);
|
||||
const suffixNode = hasFeedback && /*#__PURE__*/React.createElement(React.Fragment, null, feedbackIcon);
|
||||
const inputNumberClass = (0, _classnames.default)({
|
||||
[`${prefixCls}-lg`]: mergedSize === 'large',
|
||||
[`${prefixCls}-sm`]: mergedSize === 'small',
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-in-form-item`]: isFormItemInput
|
||||
}, hashId);
|
||||
const wrapperClassName = `${prefixCls}-group`;
|
||||
const element = /*#__PURE__*/React.createElement(_rcInputNumber.default, Object.assign({
|
||||
ref: inputRef,
|
||||
disabled: mergedDisabled,
|
||||
className: (0, _classnames.default)(cssVarCls, rootCls, className, rootClassName, compactItemClassnames),
|
||||
upHandler: upIcon,
|
||||
downHandler: downIcon,
|
||||
prefixCls: prefixCls,
|
||||
readOnly: readOnly,
|
||||
controls: controlsTemp,
|
||||
prefix: prefix,
|
||||
suffix: suffixNode || suffix,
|
||||
addonBefore: addonBefore && (/*#__PURE__*/React.createElement(_ContextIsolator.default, {
|
||||
form: true,
|
||||
space: true
|
||||
}, addonBefore)),
|
||||
addonAfter: addonAfter && (/*#__PURE__*/React.createElement(_ContextIsolator.default, {
|
||||
form: true,
|
||||
space: true
|
||||
}, addonAfter)),
|
||||
classNames: {
|
||||
input: inputNumberClass,
|
||||
variant: (0, _classnames.default)({
|
||||
[`${prefixCls}-${variant}`]: enableVariantCls
|
||||
}, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback)),
|
||||
affixWrapper: (0, _classnames.default)({
|
||||
[`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
|
||||
[`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
|
||||
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-affix-wrapper-without-controls`]: controls === false || mergedDisabled || readOnly
|
||||
}, hashId),
|
||||
wrapper: (0, _classnames.default)({
|
||||
[`${wrapperClassName}-rtl`]: direction === 'rtl'
|
||||
}, hashId),
|
||||
groupWrapper: (0, _classnames.default)({
|
||||
[`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
|
||||
[`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
|
||||
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls
|
||||
}, (0, _statusUtils.getStatusClassNames)(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
|
||||
}
|
||||
}, others));
|
||||
return wrapCSSVar(element);
|
||||
});
|
||||
const TypedInputNumber = InputNumber;
|
||||
/** @private Internal Component. Do not use in your production. */
|
||||
const PureInputNumber = props => (/*#__PURE__*/React.createElement(_configProvider.default, {
|
||||
theme: {
|
||||
components: {
|
||||
InputNumber: {
|
||||
handleVisible: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(InputNumber, Object.assign({}, props))));
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
TypedInputNumber.displayName = 'InputNumber';
|
||||
}
|
||||
TypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber;
|
||||
var _default = exports.default = TypedInputNumber;
|
||||
18
frontend/node_modules/antd/lib/input-number/style/index.d.ts
generated
vendored
Normal file
18
frontend/node_modules/antd/lib/input-number/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { ComponentToken, InputNumberToken } from './token';
|
||||
export type { ComponentToken };
|
||||
export declare const genRadiusStyle: ({ componentCls, borderRadiusSM, borderRadiusLG }: InputNumberToken, size: "lg" | "sm") => {
|
||||
[x: string]: {
|
||||
[x: string]: {
|
||||
borderStartEndRadius: number;
|
||||
borderEndEndRadius: number;
|
||||
} | {
|
||||
borderStartEndRadius: number;
|
||||
borderEndEndRadius?: undefined;
|
||||
} | {
|
||||
borderEndEndRadius: number;
|
||||
borderStartEndRadius?: undefined;
|
||||
};
|
||||
};
|
||||
};
|
||||
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
|
||||
export default _default;
|
||||
418
frontend/node_modules/antd/lib/input-number/style/index.js
generated
vendored
Normal file
418
frontend/node_modules/antd/lib/input-number/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,418 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.genRadiusStyle = exports.default = void 0;
|
||||
var _cssinjs = require("@ant-design/cssinjs");
|
||||
var _style = require("../../input/style");
|
||||
var _variants = require("../../input/style/variants");
|
||||
var _style2 = require("../../style");
|
||||
var _compactItem = require("../../style/compact-item");
|
||||
var _internal = require("../../theme/internal");
|
||||
var _token = require("./token");
|
||||
const genRadiusStyle = ({
|
||||
componentCls,
|
||||
borderRadiusSM,
|
||||
borderRadiusLG
|
||||
}, size) => {
|
||||
const borderRadius = size === 'lg' ? borderRadiusLG : borderRadiusSM;
|
||||
return {
|
||||
[`&-${size}`]: {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
borderStartEndRadius: borderRadius,
|
||||
borderEndEndRadius: borderRadius
|
||||
},
|
||||
[`${componentCls}-handler-up`]: {
|
||||
borderStartEndRadius: borderRadius
|
||||
},
|
||||
[`${componentCls}-handler-down`]: {
|
||||
borderEndEndRadius: borderRadius
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
exports.genRadiusStyle = genRadiusStyle;
|
||||
const genInputNumberStyles = token => {
|
||||
const {
|
||||
componentCls,
|
||||
lineWidth,
|
||||
lineType,
|
||||
borderRadius,
|
||||
inputFontSizeSM,
|
||||
inputFontSizeLG,
|
||||
controlHeightLG,
|
||||
controlHeightSM,
|
||||
colorError,
|
||||
paddingInlineSM,
|
||||
paddingBlockSM,
|
||||
paddingBlockLG,
|
||||
paddingInlineLG,
|
||||
colorIcon,
|
||||
motionDurationMid,
|
||||
handleHoverColor,
|
||||
handleOpacity,
|
||||
paddingInline,
|
||||
paddingBlock,
|
||||
handleBg,
|
||||
handleActiveBg,
|
||||
colorTextDisabled,
|
||||
borderRadiusSM,
|
||||
borderRadiusLG,
|
||||
controlWidth,
|
||||
handleBorderColor,
|
||||
filledHandleBg,
|
||||
lineHeightLG,
|
||||
calc
|
||||
} = token;
|
||||
return [{
|
||||
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _style.genBasicInputStyle)(token)), {
|
||||
display: 'inline-block',
|
||||
width: controlWidth,
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
borderRadius
|
||||
}), (0, _variants.genOutlinedStyle)(token, {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
background: handleBg,
|
||||
[`${componentCls}-handler-down`]: {
|
||||
borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
|
||||
}
|
||||
}
|
||||
})), (0, _variants.genFilledStyle)(token, {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
background: filledHandleBg,
|
||||
[`${componentCls}-handler-down`]: {
|
||||
borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
|
||||
}
|
||||
},
|
||||
'&:focus-within': {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
background: handleBg
|
||||
}
|
||||
}
|
||||
})), (0, _variants.genUnderlinedStyle)(token, {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
background: handleBg,
|
||||
[`${componentCls}-handler-down`]: {
|
||||
borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
|
||||
}
|
||||
}
|
||||
})), (0, _variants.genBorderlessStyle)(token)), {
|
||||
'&-rtl': {
|
||||
direction: 'rtl',
|
||||
[`${componentCls}-input`]: {
|
||||
direction: 'rtl'
|
||||
}
|
||||
},
|
||||
'&-lg': {
|
||||
padding: 0,
|
||||
fontSize: inputFontSizeLG,
|
||||
lineHeight: lineHeightLG,
|
||||
borderRadius: borderRadiusLG,
|
||||
[`input${componentCls}-input`]: {
|
||||
height: calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal(),
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlockLG)} ${(0, _cssinjs.unit)(paddingInlineLG)}`
|
||||
}
|
||||
},
|
||||
'&-sm': {
|
||||
padding: 0,
|
||||
fontSize: inputFontSizeSM,
|
||||
borderRadius: borderRadiusSM,
|
||||
[`input${componentCls}-input`]: {
|
||||
height: calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal(),
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlockSM)} ${(0, _cssinjs.unit)(paddingInlineSM)}`
|
||||
}
|
||||
},
|
||||
// ===================== Out Of Range =====================
|
||||
'&-out-of-range': {
|
||||
[`${componentCls}-input-wrap`]: {
|
||||
input: {
|
||||
color: colorError
|
||||
}
|
||||
}
|
||||
},
|
||||
// Style for input-group: input with label, with button or dropdown...
|
||||
'&-group': Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _style.genInputGroupStyle)(token)), {
|
||||
'&-wrapper': Object.assign(Object.assign(Object.assign({
|
||||
display: 'inline-block',
|
||||
textAlign: 'start',
|
||||
verticalAlign: 'top',
|
||||
[`${componentCls}-affix-wrapper`]: {
|
||||
width: '100%'
|
||||
},
|
||||
// Size
|
||||
'&-lg': {
|
||||
[`${componentCls}-group-addon`]: {
|
||||
borderRadius: borderRadiusLG,
|
||||
fontSize: token.fontSizeLG
|
||||
}
|
||||
},
|
||||
'&-sm': {
|
||||
[`${componentCls}-group-addon`]: {
|
||||
borderRadius: borderRadiusSM
|
||||
}
|
||||
}
|
||||
}, (0, _variants.genOutlinedGroupStyle)(token)), (0, _variants.genFilledGroupStyle)(token)), {
|
||||
// Fix the issue of using icons in Space Compact mode
|
||||
// https://github.com/ant-design/ant-design/issues/45764
|
||||
[`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
|
||||
[`${componentCls}, ${componentCls}-group-addon`]: {
|
||||
borderRadius: 0
|
||||
}
|
||||
},
|
||||
[`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {
|
||||
[`${componentCls}, ${componentCls}-group-addon`]: {
|
||||
borderStartEndRadius: 0,
|
||||
borderEndEndRadius: 0
|
||||
}
|
||||
},
|
||||
[`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {
|
||||
[`${componentCls}, ${componentCls}-group-addon`]: {
|
||||
borderStartStartRadius: 0,
|
||||
borderEndStartRadius: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}),
|
||||
[`&-disabled ${componentCls}-input`]: {
|
||||
cursor: 'not-allowed'
|
||||
},
|
||||
[componentCls]: {
|
||||
'&-input': Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {
|
||||
width: '100%',
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlock)} ${(0, _cssinjs.unit)(paddingInline)}`,
|
||||
textAlign: 'start',
|
||||
backgroundColor: 'transparent',
|
||||
border: 0,
|
||||
borderRadius,
|
||||
outline: 0,
|
||||
transition: `all ${motionDurationMid} linear`,
|
||||
appearance: 'textfield',
|
||||
fontSize: 'inherit'
|
||||
}), (0, _style.genPlaceholderStyle)(token.colorTextPlaceholder)), {
|
||||
'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
|
||||
margin: 0,
|
||||
appearance: 'none'
|
||||
}
|
||||
})
|
||||
},
|
||||
[`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
|
||||
width: token.handleWidth,
|
||||
opacity: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
// Handler
|
||||
{
|
||||
[componentCls]: Object.assign(Object.assign(Object.assign({
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
position: 'absolute',
|
||||
insetBlockStart: 0,
|
||||
insetInlineEnd: 0,
|
||||
width: token.handleVisibleWidth,
|
||||
opacity: handleOpacity,
|
||||
height: '100%',
|
||||
borderStartStartRadius: 0,
|
||||
borderStartEndRadius: borderRadius,
|
||||
borderEndEndRadius: borderRadius,
|
||||
borderEndStartRadius: 0,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'stretch',
|
||||
transition: `all ${motionDurationMid}`,
|
||||
overflow: 'hidden',
|
||||
// Fix input number inside Menu makes icon too large
|
||||
// We arise the selector priority by nest selector here
|
||||
// https://github.com/ant-design/ant-design/issues/14367
|
||||
[`${componentCls}-handler`]: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flex: 'auto',
|
||||
height: '40%',
|
||||
[`
|
||||
${componentCls}-handler-up-inner,
|
||||
${componentCls}-handler-down-inner
|
||||
`]: {
|
||||
marginInlineEnd: 0,
|
||||
fontSize: token.handleFontSize
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-handler`]: {
|
||||
height: '50%',
|
||||
overflow: 'hidden',
|
||||
color: colorIcon,
|
||||
fontWeight: 'bold',
|
||||
lineHeight: 0,
|
||||
textAlign: 'center',
|
||||
cursor: 'pointer',
|
||||
borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`,
|
||||
transition: `all ${motionDurationMid} linear`,
|
||||
'&:active': {
|
||||
background: handleActiveBg
|
||||
},
|
||||
// Hover
|
||||
'&:hover': {
|
||||
height: `60%`,
|
||||
[`
|
||||
${componentCls}-handler-up-inner,
|
||||
${componentCls}-handler-down-inner
|
||||
`]: {
|
||||
color: handleHoverColor
|
||||
}
|
||||
},
|
||||
'&-up-inner, &-down-inner': Object.assign(Object.assign({}, (0, _style2.resetIcon)()), {
|
||||
color: colorIcon,
|
||||
transition: `all ${motionDurationMid} linear`,
|
||||
userSelect: 'none'
|
||||
})
|
||||
},
|
||||
[`${componentCls}-handler-up`]: {
|
||||
borderStartEndRadius: borderRadius
|
||||
},
|
||||
[`${componentCls}-handler-down`]: {
|
||||
borderEndEndRadius: borderRadius
|
||||
}
|
||||
}, genRadiusStyle(token, 'lg')), genRadiusStyle(token, 'sm')), {
|
||||
// Disabled
|
||||
'&-disabled, &-readonly': {
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
display: 'none'
|
||||
},
|
||||
[`${componentCls}-input`]: {
|
||||
color: 'inherit'
|
||||
}
|
||||
},
|
||||
[`
|
||||
${componentCls}-handler-up-disabled,
|
||||
${componentCls}-handler-down-disabled
|
||||
`]: {
|
||||
cursor: 'not-allowed'
|
||||
},
|
||||
[`
|
||||
${componentCls}-handler-up-disabled:hover &-handler-up-inner,
|
||||
${componentCls}-handler-down-disabled:hover &-handler-down-inner
|
||||
`]: {
|
||||
color: colorTextDisabled
|
||||
}
|
||||
})
|
||||
}];
|
||||
};
|
||||
const genAffixWrapperStyles = token => {
|
||||
const {
|
||||
componentCls,
|
||||
paddingBlock,
|
||||
paddingInline,
|
||||
inputAffixPadding,
|
||||
controlWidth,
|
||||
borderRadiusLG,
|
||||
borderRadiusSM,
|
||||
paddingInlineLG,
|
||||
paddingInlineSM,
|
||||
paddingBlockLG,
|
||||
paddingBlockSM,
|
||||
motionDurationMid
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}-affix-wrapper`]: Object.assign(Object.assign({
|
||||
[`input${componentCls}-input`]: {
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlock)} 0`
|
||||
}
|
||||
}, (0, _style.genBasicInputStyle)(token)), {
|
||||
// or number handler will cover form status
|
||||
position: 'relative',
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
width: controlWidth,
|
||||
padding: 0,
|
||||
paddingInlineStart: paddingInline,
|
||||
'&-lg': {
|
||||
borderRadius: borderRadiusLG,
|
||||
paddingInlineStart: paddingInlineLG,
|
||||
[`input${componentCls}-input`]: {
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlockLG)} 0`
|
||||
}
|
||||
},
|
||||
'&-sm': {
|
||||
borderRadius: borderRadiusSM,
|
||||
paddingInlineStart: paddingInlineSM,
|
||||
[`input${componentCls}-input`]: {
|
||||
padding: `${(0, _cssinjs.unit)(paddingBlockSM)} 0`
|
||||
}
|
||||
},
|
||||
[`&:not(${componentCls}-disabled):hover`]: {
|
||||
zIndex: 1
|
||||
},
|
||||
'&-focused, &:focus': {
|
||||
zIndex: 1
|
||||
},
|
||||
[`&-disabled > ${componentCls}-disabled`]: {
|
||||
background: 'transparent'
|
||||
},
|
||||
[`> div${componentCls}`]: {
|
||||
width: '100%',
|
||||
border: 'none',
|
||||
outline: 'none',
|
||||
[`&${componentCls}-focused`]: {
|
||||
boxShadow: 'none !important'
|
||||
}
|
||||
},
|
||||
'&::before': {
|
||||
display: 'inline-block',
|
||||
width: 0,
|
||||
visibility: 'hidden',
|
||||
content: '"\\a0"'
|
||||
},
|
||||
[`${componentCls}-handler-wrap`]: {
|
||||
zIndex: 2
|
||||
},
|
||||
[componentCls]: {
|
||||
position: 'static',
|
||||
color: 'inherit',
|
||||
'&-prefix, &-suffix': {
|
||||
display: 'flex',
|
||||
flex: 'none',
|
||||
alignItems: 'center',
|
||||
pointerEvents: 'none'
|
||||
},
|
||||
'&-prefix': {
|
||||
marginInlineEnd: inputAffixPadding
|
||||
},
|
||||
'&-suffix': {
|
||||
insetBlockStart: 0,
|
||||
insetInlineEnd: 0,
|
||||
height: '100%',
|
||||
marginInlineEnd: paddingInline,
|
||||
marginInlineStart: inputAffixPadding,
|
||||
transition: `margin ${motionDurationMid}`
|
||||
}
|
||||
},
|
||||
[`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
|
||||
width: token.handleWidth,
|
||||
opacity: 1
|
||||
},
|
||||
[`&:not(${componentCls}-affix-wrapper-without-controls):hover ${componentCls}-suffix`]: {
|
||||
marginInlineEnd: token.calc(token.handleWidth).add(paddingInline).equal()
|
||||
}
|
||||
}),
|
||||
// 覆盖 affix-wrapper borderRadius!
|
||||
[`${componentCls}-underlined`]: {
|
||||
borderRadius: 0
|
||||
}
|
||||
};
|
||||
};
|
||||
var _default = exports.default = (0, _internal.genStyleHooks)('InputNumber', token => {
|
||||
const inputNumberToken = (0, _internal.mergeToken)(token, (0, _style.initInputToken)(token));
|
||||
return [genInputNumberStyles(inputNumberToken), genAffixWrapperStyles(inputNumberToken),
|
||||
// =====================================================
|
||||
// == Space Compact ==
|
||||
// =====================================================
|
||||
(0, _compactItem.genCompactItemStyle)(inputNumberToken)];
|
||||
}, _token.prepareComponentToken, {
|
||||
unitless: {
|
||||
handleOpacity: true
|
||||
},
|
||||
resetFont: false
|
||||
});
|
||||
52
frontend/node_modules/antd/lib/input-number/style/token.d.ts
generated
vendored
Normal file
52
frontend/node_modules/antd/lib/input-number/style/token.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import type { SharedComponentToken, SharedInputToken } from '../../input/style/token';
|
||||
import type { FullToken, GetDefaultToken } from '../../theme/internal';
|
||||
export interface ComponentToken extends SharedComponentToken {
|
||||
/**
|
||||
* @desc 输入框宽度
|
||||
* @descEN Width of input
|
||||
*/
|
||||
controlWidth: number;
|
||||
/**
|
||||
* @desc 操作按钮宽度
|
||||
* @descEN Width of control button
|
||||
*/
|
||||
handleWidth: number;
|
||||
/**
|
||||
* @desc 操作按钮图标大小
|
||||
* @descEN Icon size of control button
|
||||
*/
|
||||
handleFontSize: number;
|
||||
/**
|
||||
* Default `auto`. Set `true` will always show the handle
|
||||
* @desc 操作按钮可见性
|
||||
* @descEN Handle visible
|
||||
*/
|
||||
handleVisible: 'auto' | true;
|
||||
/**
|
||||
* @desc 操作按钮背景色
|
||||
* @descEN Background color of handle
|
||||
*/
|
||||
handleBg: string;
|
||||
/**
|
||||
* @desc 操作按钮激活背景色
|
||||
* @descEN Active background color of handle
|
||||
*/
|
||||
handleActiveBg: string;
|
||||
/**
|
||||
* @desc 操作按钮悬浮颜色
|
||||
* @descEN Hover color of handle
|
||||
*/
|
||||
handleHoverColor: string;
|
||||
/**
|
||||
* @desc 操作按钮边框颜色
|
||||
* @descEN Border color of handle
|
||||
*/
|
||||
handleBorderColor: string;
|
||||
/**
|
||||
* @desc 面性变体操作按钮背景色
|
||||
* @descEN Background color of handle in filled variant
|
||||
*/
|
||||
filledHandleBg: string;
|
||||
}
|
||||
export type InputNumberToken = FullToken<'InputNumber'> & SharedInputToken;
|
||||
export declare const prepareComponentToken: GetDefaultToken<'InputNumber'>;
|
||||
27
frontend/node_modules/antd/lib/input-number/style/token.js
generated
vendored
Normal file
27
frontend/node_modules/antd/lib/input-number/style/token.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.prepareComponentToken = void 0;
|
||||
var _fastColor = require("@ant-design/fast-color");
|
||||
var _token = require("../../input/style/token");
|
||||
const prepareComponentToken = token => {
|
||||
var _a;
|
||||
const handleVisible = (_a = token.handleVisible) !== null && _a !== void 0 ? _a : 'auto';
|
||||
const handleWidth = token.controlHeightSM - token.lineWidth * 2;
|
||||
return Object.assign(Object.assign({}, (0, _token.initComponentToken)(token)), {
|
||||
controlWidth: 90,
|
||||
handleWidth,
|
||||
handleFontSize: token.fontSize / 2,
|
||||
handleVisible,
|
||||
handleActiveBg: token.colorFillAlter,
|
||||
handleBg: token.colorBgContainer,
|
||||
filledHandleBg: new _fastColor.FastColor(token.colorFillSecondary).onBackground(token.colorBgContainer).toHexString(),
|
||||
handleHoverColor: token.colorPrimary,
|
||||
handleBorderColor: token.colorBorder,
|
||||
handleOpacity: handleVisible === true ? 1 : 0,
|
||||
handleVisibleWidth: handleVisible === true ? handleWidth : 0
|
||||
});
|
||||
};
|
||||
exports.prepareComponentToken = prepareComponentToken;
|
||||
Reference in New Issue
Block a user