add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

4
node_modules/antd/lib/select/style/dropdown.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import type { GenerateStyle } from '../../theme/internal';
import type { SelectToken } from './token';
declare const genSingleStyle: GenerateStyle<SelectToken>;
export default genSingleStyle;

147
node_modules/antd/lib/select/style/dropdown.js generated vendored Normal file
View File

@@ -0,0 +1,147 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _style = require("../../style");
var _motion = require("../../style/motion");
const genItemStyle = token => {
const {
optionHeight,
optionFontSize,
optionLineHeight,
optionPadding
} = token;
return {
position: 'relative',
display: 'block',
minHeight: optionHeight,
padding: optionPadding,
color: token.colorText,
fontWeight: 'normal',
fontSize: optionFontSize,
lineHeight: optionLineHeight,
boxSizing: 'border-box'
};
};
const genSingleStyle = token => {
const {
antCls,
componentCls
} = token;
const selectItemCls = `${componentCls}-item`;
const slideUpEnterActive = `&${antCls}-slide-up-enter${antCls}-slide-up-enter-active`;
const slideUpAppearActive = `&${antCls}-slide-up-appear${antCls}-slide-up-appear-active`;
const slideUpLeaveActive = `&${antCls}-slide-up-leave${antCls}-slide-up-leave-active`;
const dropdownPlacementCls = `${componentCls}-dropdown-placement-`;
const selectedItemCls = `${selectItemCls}-option-selected`;
return [{
[`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {
position: 'absolute',
top: -9999,
zIndex: token.zIndexPopup,
boxSizing: 'border-box',
padding: token.paddingXXS,
overflow: 'hidden',
fontSize: token.fontSize,
// Fix select render lag of long text in chrome
// https://github.com/ant-design/ant-design/issues/11456
// https://github.com/ant-design/ant-design/issues/11843
fontVariant: 'initial',
backgroundColor: token.colorBgElevated,
borderRadius: token.borderRadiusLG,
outline: 'none',
boxShadow: token.boxShadowSecondary,
[`
${slideUpEnterActive}${dropdownPlacementCls}bottomLeft,
${slideUpAppearActive}${dropdownPlacementCls}bottomLeft
`]: {
animationName: _motion.slideUpIn
},
[`
${slideUpEnterActive}${dropdownPlacementCls}topLeft,
${slideUpAppearActive}${dropdownPlacementCls}topLeft,
${slideUpEnterActive}${dropdownPlacementCls}topRight,
${slideUpAppearActive}${dropdownPlacementCls}topRight
`]: {
animationName: _motion.slideDownIn
},
[`${slideUpLeaveActive}${dropdownPlacementCls}bottomLeft`]: {
animationName: _motion.slideUpOut
},
[`
${slideUpLeaveActive}${dropdownPlacementCls}topLeft,
${slideUpLeaveActive}${dropdownPlacementCls}topRight
`]: {
animationName: _motion.slideDownOut
},
'&-hidden': {
display: 'none'
},
[selectItemCls]: Object.assign(Object.assign({}, genItemStyle(token)), {
cursor: 'pointer',
transition: `background ${token.motionDurationSlow} ease`,
borderRadius: token.borderRadiusSM,
// =========== Group ============
'&-group': {
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
cursor: 'default'
},
// =========== Option ===========
'&-option': {
display: 'flex',
'&-content': Object.assign({
flex: 'auto'
}, _style.textEllipsis),
'&-state': {
flex: 'none',
display: 'flex',
alignItems: 'center'
},
[`&-active:not(${selectItemCls}-option-disabled)`]: {
backgroundColor: token.optionActiveBg
},
[`&-selected:not(${selectItemCls}-option-disabled)`]: {
color: token.optionSelectedColor,
fontWeight: token.optionSelectedFontWeight,
backgroundColor: token.optionSelectedBg,
[`${selectItemCls}-option-state`]: {
color: token.colorPrimary
}
},
'&-disabled': {
[`&${selectItemCls}-option-selected`]: {
backgroundColor: token.colorBgContainerDisabled
},
color: token.colorTextDisabled,
cursor: 'not-allowed'
},
'&-grouped': {
paddingInlineStart: token.calc(token.controlPaddingHorizontal).mul(2).equal()
}
},
'&-empty': Object.assign(Object.assign({}, genItemStyle(token)), {
color: token.colorTextDisabled
})
}),
// https://github.com/ant-design/ant-design/pull/46646
[`${selectedItemCls}:has(+ ${selectedItemCls})`]: {
borderEndStartRadius: 0,
borderEndEndRadius: 0,
[`& + ${selectedItemCls}`]: {
borderStartStartRadius: 0,
borderStartEndRadius: 0
}
},
// =========================== RTL ===========================
'&-rtl': {
direction: 'rtl'
}
})
},
// Follow code may reuse in other components
(0, _motion.initSlideMotion)(token, 'slide-up'), (0, _motion.initSlideMotion)(token, 'slide-down'), (0, _motion.initMoveMotion)(token, 'move-up'), (0, _motion.initMoveMotion)(token, 'move-down')];
};
var _default = exports.default = genSingleStyle;

4
node_modules/antd/lib/select/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import type { ComponentToken } from './token';
export type { ComponentToken };
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
export default _default;

257
node_modules/antd/lib/select/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,257 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _style = require("../../style");
var _compactItem = require("../../style/compact-item");
var _internal = require("../../theme/internal");
var _dropdown = _interopRequireDefault(require("./dropdown"));
var _multiple = _interopRequireDefault(require("./multiple"));
var _single = _interopRequireDefault(require("./single"));
var _token = require("./token");
var _variants = _interopRequireDefault(require("./variants"));
// ============================= Selector =============================
const genSelectorStyle = token => {
const {
componentCls
} = token;
return {
position: 'relative',
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
input: {
cursor: 'pointer'
},
[`${componentCls}-show-search&`]: {
cursor: 'text',
input: {
cursor: 'auto',
color: 'inherit',
height: '100%'
}
},
[`${componentCls}-disabled&`]: {
cursor: 'not-allowed',
input: {
cursor: 'not-allowed'
}
}
};
};
// ============================== Styles ==============================
// /* Reset search input style */
const getSearchInputWithoutBorderStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-selection-search-input`]: {
margin: 0,
padding: 0,
background: 'transparent',
border: 'none',
outline: 'none',
appearance: 'none',
fontFamily: 'inherit',
'&::-webkit-search-cancel-button': {
display: 'none',
appearance: 'none'
}
}
};
};
// =============================== Base ===============================
const genBaseStyle = token => {
const {
antCls,
componentCls,
inputPaddingHorizontalBase,
iconCls
} = token;
const hoverShowClearStyle = {
[`${componentCls}-clear`]: {
opacity: 1,
background: token.colorBgBase,
borderRadius: '50%'
}
};
return {
[componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {
position: 'relative',
display: 'inline-flex',
cursor: 'pointer',
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: Object.assign(Object.assign({}, genSelectorStyle(token)), getSearchInputWithoutBorderStyle(token)),
// ======================== Selection ========================
[`${componentCls}-selection-item`]: Object.assign(Object.assign({
flex: 1,
fontWeight: 'normal',
position: 'relative',
userSelect: 'none'
}, _style.textEllipsis), {
// https://github.com/ant-design/ant-design/issues/40421
[`> ${antCls}-typography`]: {
display: 'inline'
}
}),
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder`]: Object.assign(Object.assign({}, _style.textEllipsis), {
flex: 1,
color: token.colorTextPlaceholder,
pointerEvents: 'none'
}),
// ========================== Arrow ==========================
[`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0, _style.resetIcon)()), {
position: 'absolute',
top: '50%',
insetInlineStart: 'auto',
insetInlineEnd: inputPaddingHorizontalBase,
height: token.fontSizeIcon,
marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
lineHeight: 1,
textAlign: 'center',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
transition: `opacity ${token.motionDurationSlow} ease`,
[iconCls]: {
verticalAlign: 'top',
transition: `transform ${token.motionDurationSlow}`,
'> svg': {
verticalAlign: 'top'
},
[`&:not(${componentCls}-suffix)`]: {
pointerEvents: 'auto'
}
},
[`${componentCls}-disabled &`]: {
cursor: 'not-allowed'
},
'> *:not(:last-child)': {
marginInlineEnd: 8 // FIXME: magic
}
}),
// ========================== Wrap ===========================
[`${componentCls}-selection-wrap`]: {
display: 'flex',
width: '100%',
position: 'relative',
minWidth: 0,
// https://github.com/ant-design/ant-design/issues/51669
'&:after': {
content: '"\\a0"',
width: 0,
overflow: 'hidden'
}
},
// ========================= Prefix ==========================
[`${componentCls}-prefix`]: {
flex: 'none',
marginInlineEnd: token.selectAffixPadding
},
// ========================== Clear ==========================
[`${componentCls}-clear`]: {
position: 'absolute',
top: '50%',
insetInlineStart: 'auto',
insetInlineEnd: inputPaddingHorizontalBase,
zIndex: 1,
display: 'inline-block',
width: token.fontSizeIcon,
height: token.fontSizeIcon,
marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
fontStyle: 'normal',
lineHeight: 1,
textAlign: 'center',
textTransform: 'none',
cursor: 'pointer',
opacity: 0,
transition: `color ${token.motionDurationMid} ease, opacity ${token.motionDurationSlow} ease`,
textRendering: 'auto',
// https://github.com/ant-design/ant-design/issues/54205
// Force GPU compositing on Safari to prevent flickering on opacity/transform transitions
transform: 'translateZ(0)',
'&:before': {
display: 'block'
},
'&:hover': {
color: token.colorIcon
}
},
'@media(hover:none)': hoverShowClearStyle,
'&:hover': hoverShowClearStyle
}),
// ========================= Feedback ==========================
[`${componentCls}-status`]: {
'&-error, &-warning, &-success, &-validating': {
[`&${componentCls}-has-feedback`]: {
[`${componentCls}-clear`]: {
insetInlineEnd: token.calc(inputPaddingHorizontalBase).add(token.fontSize).add(token.paddingXS).equal()
}
}
}
}
};
};
// ============================== Styles ==============================
const genSelectStyle = token => {
const {
componentCls
} = token;
return [{
[componentCls]: {
// ==================== In Form ====================
[`&${componentCls}-in-form-item`]: {
width: '100%'
}
}
},
// =====================================================
// == LTR ==
// =====================================================
// Base
genBaseStyle(token),
// Single
(0, _single.default)(token),
// Multiple
(0, _multiple.default)(token),
// Dropdown
(0, _dropdown.default)(token),
// =====================================================
// == RTL ==
// =====================================================
{
[`${componentCls}-rtl`]: {
direction: 'rtl'
}
},
// =====================================================
// == Space Compact ==
// =====================================================
(0, _compactItem.genCompactItemStyle)(token, {
borderElCls: `${componentCls}-selector`,
focusElCls: `${componentCls}-focused`
})];
};
// ============================== Export ==============================
var _default = exports.default = (0, _internal.genStyleHooks)('Select', (token, {
rootPrefixCls
}) => {
const selectToken = (0, _internal.mergeToken)(token, {
rootPrefixCls,
inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
multipleSelectItemHeight: token.multipleItemHeight,
selectHeight: token.controlHeight
});
return [genSelectStyle(selectToken), (0, _variants.default)(selectToken)];
}, _token.prepareComponentToken, {
unitless: {
optionLineHeight: true,
optionSelectedFontWeight: true
}
});

32
node_modules/antd/lib/select/style/multiple.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
import type { SelectToken } from './token';
/**
* Get multiple selector needed style. The calculation:
*
* ContainerPadding = BasePadding - ItemMargin
*
* Border: ╔═══════════════════════════╗ ┬
* ContainerPadding: ║ ║ │
* ╟───────────────────────────╢ ┬ │
* Item Margin: ║ ║ │ │
* ║ ┌──────────┐ ║ │ │
* Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)
* ║ └──────────┘ ║ │ │
* Item Margin: ║ ║ │ │
* ╟───────────────────────────╢ ┴ │
* ContainerPadding: ║ ║ │
* Border: ╚═══════════════════════════╝ ┴
*/
export declare const getMultipleSelectorUnit: (token: Pick<SelectToken, "max" | "calc" | "multipleSelectItemHeight" | "paddingXXS" | "lineWidth" | "INTERNAL_FIXED_ITEM_MARGIN">) => {
basePadding: string | number;
containerPadding: string | number;
itemHeight: string;
itemLineHeight: string;
};
/**
* Get the `rc-overflow` needed style.
* It's a share style which means not affected by `size`.
*/
export declare const genOverflowStyle: (token: Pick<SelectToken, "calc" | "componentCls" | "iconCls" | "borderRadiusSM" | "motionDurationSlow" | "paddingXS" | "multipleItemColorDisabled" | "multipleItemBorderColorDisabled" | "colorIcon" | "colorIconHover" | "INTERNAL_FIXED_ITEM_MARGIN">) => CSSObject;
declare const genMultipleStyle: (token: SelectToken) => CSSInterpolation;
export default genMultipleStyle;

306
node_modules/antd/lib/select/style/multiple.js generated vendored Normal file
View File

@@ -0,0 +1,306 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMultipleSelectorUnit = exports.genOverflowStyle = exports.default = void 0;
var _cssinjs = require("@ant-design/cssinjs");
var _style = require("../../style");
var _internal = require("../../theme/internal");
/**
* Get multiple selector needed style. The calculation:
*
* ContainerPadding = BasePadding - ItemMargin
*
* Border: ╔═══════════════════════════╗ ┬
* ContainerPadding: ║ ║ │
* ╟───────────────────────────╢ ┬ │
* Item Margin: ║ ║ │ │
* ║ ┌──────────┐ ║ │ │
* Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)
* ║ └──────────┘ ║ │ │
* Item Margin: ║ ║ │ │
* ╟───────────────────────────╢ ┴ │
* ContainerPadding: ║ ║ │
* Border: ╚═══════════════════════════╝ ┴
*/
const getMultipleSelectorUnit = token => {
const {
multipleSelectItemHeight,
paddingXXS,
lineWidth,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const basePadding = token.max(token.calc(paddingXXS).sub(lineWidth).equal(), 0);
const containerPadding = token.max(token.calc(basePadding).sub(INTERNAL_FIXED_ITEM_MARGIN).equal(), 0);
return {
basePadding,
containerPadding,
itemHeight: (0, _cssinjs.unit)(multipleSelectItemHeight),
itemLineHeight: (0, _cssinjs.unit)(token.calc(multipleSelectItemHeight).sub(token.calc(token.lineWidth).mul(2)).equal())
};
};
exports.getMultipleSelectorUnit = getMultipleSelectorUnit;
const getSelectItemStyle = token => {
const {
multipleSelectItemHeight,
selectHeight,
lineWidth
} = token;
const selectItemDist = token.calc(selectHeight).sub(multipleSelectItemHeight).div(2).sub(lineWidth).equal();
return selectItemDist;
};
/**
* Get the `rc-overflow` needed style.
* It's a share style which means not affected by `size`.
*/
const genOverflowStyle = token => {
const {
componentCls,
iconCls,
borderRadiusSM,
motionDurationSlow,
paddingXS,
multipleItemColorDisabled,
multipleItemBorderColorDisabled,
colorIcon,
colorIconHover,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
return {
/**
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
* may update to redesign with its align logic.
*/
// =========================== Overflow ===========================
[selectOverflowPrefixCls]: {
position: 'relative',
display: 'flex',
flex: 'auto',
flexWrap: 'wrap',
maxWidth: '100%',
'&-item': {
flex: 'none',
alignSelf: 'center',
// https://github.com/ant-design/ant-design/issues/54179
maxWidth: 'calc(100% - 4px)',
display: 'inline-flex'
},
// ======================== Selections ==========================
[`${componentCls}-selection-item`]: {
display: 'flex',
alignSelf: 'center',
flex: 'none',
boxSizing: 'border-box',
maxWidth: '100%',
marginBlock: INTERNAL_FIXED_ITEM_MARGIN,
borderRadius: borderRadiusSM,
cursor: 'default',
transition: `font-size ${motionDurationSlow}, line-height ${motionDurationSlow}, height ${motionDurationSlow}`,
marginInlineEnd: token.calc(INTERNAL_FIXED_ITEM_MARGIN).mul(2).equal(),
paddingInlineStart: paddingXS,
paddingInlineEnd: token.calc(paddingXS).div(2).equal(),
[`${componentCls}-disabled&`]: {
color: multipleItemColorDisabled,
borderColor: multipleItemBorderColorDisabled,
cursor: 'not-allowed'
},
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
'&-content': {
display: 'inline-block',
marginInlineEnd: token.calc(paddingXS).div(2).equal(),
overflow: 'hidden',
whiteSpace: 'pre',
// fix whitespace wrapping. custom tags display all whitespace within.
textOverflow: 'ellipsis'
},
'&-remove': Object.assign(Object.assign({}, (0, _style.resetIcon)()), {
display: 'inline-flex',
alignItems: 'center',
color: colorIcon,
fontWeight: 'bold',
fontSize: 10,
lineHeight: 'inherit',
cursor: 'pointer',
[`> ${iconCls}`]: {
verticalAlign: '-0.2em'
},
'&:hover': {
color: colorIconHover
}
})
}
}
};
};
exports.genOverflowStyle = genOverflowStyle;
const genSelectionStyle = (token, suffix) => {
const {
componentCls,
INTERNAL_FIXED_ITEM_MARGIN
} = token;
const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
const selectItemHeight = token.multipleSelectItemHeight;
const selectItemDist = getSelectItemStyle(token);
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const multipleSelectorUnit = getMultipleSelectorUnit(token);
return {
[`${componentCls}-multiple${suffixCls}`]: Object.assign(Object.assign({}, genOverflowStyle(token)), {
// ========================= Selector =========================
[`${componentCls}-selector`]: {
display: 'flex',
alignItems: 'center',
width: '100%',
height: '100%',
// Multiple is little different that horizontal is follow the vertical
paddingInline: multipleSelectorUnit.basePadding,
paddingBlock: multipleSelectorUnit.containerPadding,
borderRadius: token.borderRadius,
[`${componentCls}-disabled&`]: {
background: token.multipleSelectorBgDisabled,
cursor: 'not-allowed'
},
'&:after': {
display: 'inline-block',
width: 0,
margin: `${(0, _cssinjs.unit)(INTERNAL_FIXED_ITEM_MARGIN)} 0`,
lineHeight: (0, _cssinjs.unit)(selectItemHeight),
visibility: 'hidden',
content: '"\\a0"'
}
},
// ======================== Selections ========================
[`${componentCls}-selection-item`]: {
height: multipleSelectorUnit.itemHeight,
lineHeight: (0, _cssinjs.unit)(multipleSelectorUnit.itemLineHeight)
},
// ========================== Wrap ===========================
[`${componentCls}-selection-wrap`]: {
alignSelf: 'flex-start',
'&:after': {
lineHeight: (0, _cssinjs.unit)(selectItemHeight),
marginBlock: INTERNAL_FIXED_ITEM_MARGIN
}
},
// ========================== Input ==========================
[`${componentCls}-prefix`]: {
marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal()
},
[`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item,
${componentCls}-prefix + ${componentCls}-selection-wrap
`]: {
[`${componentCls}-selection-search`]: {
marginInlineStart: 0
},
[`${componentCls}-selection-placeholder`]: {
insetInlineStart: 0
}
},
// https://github.com/ant-design/ant-design/issues/44754
// Same as `wrap:after`
[`${selectOverflowPrefixCls}-item-suffix`]: {
minHeight: multipleSelectorUnit.itemHeight,
marginBlock: INTERNAL_FIXED_ITEM_MARGIN
},
[`${componentCls}-selection-search`]: {
display: 'inline-flex',
position: 'relative',
maxWidth: '100%',
marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(selectItemDist).equal(),
[`
&-input,
&-mirror
`]: {
height: selectItemHeight,
fontFamily: token.fontFamily,
lineHeight: (0, _cssinjs.unit)(selectItemHeight),
transition: `all ${token.motionDurationSlow}`
},
'&-input': {
width: '100%',
minWidth: 4.1 // fix search cursor missing
},
'&-mirror': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
insetInlineEnd: 'auto',
zIndex: 999,
whiteSpace: 'pre',
// fix whitespace wrapping caused width calculation bug
visibility: 'hidden'
}
},
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
top: '50%',
insetInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal(),
insetInlineEnd: token.inputPaddingHorizontalBase,
transform: 'translateY(-50%)',
transition: `all ${token.motionDurationSlow}`
}
})
};
};
function genSizeStyle(token, suffix) {
const {
componentCls
} = token;
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const rawStyle = {
[`${componentCls}-multiple${suffixCls}`]: {
fontSize: token.fontSize,
// ========================= Selector =========================
[`${componentCls}-selector`]: {
[`${componentCls}-show-search&`]: {
cursor: 'text'
}
},
[`
&${componentCls}-show-arrow ${componentCls}-selector,
&${componentCls}-allow-clear ${componentCls}-selector
`]: {
paddingInlineEnd: token.calc(token.fontSizeIcon).add(token.controlPaddingHorizontal).equal()
}
}
};
return [genSelectionStyle(token, suffix), rawStyle];
}
const genMultipleStyle = token => {
const {
componentCls
} = token;
const smallToken = (0, _internal.mergeToken)(token, {
selectHeight: token.controlHeightSM,
multipleSelectItemHeight: token.multipleItemHeightSM,
borderRadius: token.borderRadiusSM,
borderRadiusSM: token.borderRadiusXS
});
const largeToken = (0, _internal.mergeToken)(token, {
fontSize: token.fontSizeLG,
selectHeight: token.controlHeightLG,
multipleSelectItemHeight: token.multipleItemHeightLG,
borderRadius: token.borderRadiusLG,
borderRadiusSM: token.borderRadius
});
return [genSizeStyle(token),
// ======================== Small ========================
genSizeStyle(smallToken, 'sm'),
// Padding
{
[`${componentCls}-multiple${componentCls}-sm`]: {
[`${componentCls}-selection-placeholder`]: {
insetInline: token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal()
},
// https://github.com/ant-design/ant-design/issues/29559
[`${componentCls}-selection-search`]: {
marginInlineStart: 2 // Magic Number
}
}
},
// ======================== Large ========================
genSizeStyle(largeToken, 'lg')];
};
var _default = exports.default = genMultipleStyle;

3
node_modules/antd/lib/select/style/single.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { CSSInterpolation } from '@ant-design/cssinjs';
import type { SelectToken } from './token';
export default function genSingleStyle(token: SelectToken): CSSInterpolation;

154
node_modules/antd/lib/select/style/single.js generated vendored Normal file
View File

@@ -0,0 +1,154 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = genSingleStyle;
var _cssinjs = require("@ant-design/cssinjs");
var _style = require("../../style");
var _internal = require("../../theme/internal");
function genSizeStyle(token, suffix) {
const {
componentCls,
inputPaddingHorizontalBase,
borderRadius
} = token;
const selectHeightWithoutBorder = token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal();
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
return {
[`${componentCls}-single${suffixCls}`]: {
fontSize: token.fontSize,
height: token.controlHeight,
// ========================= Selector =========================
[`${componentCls}-selector`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token, true)), {
display: 'flex',
borderRadius,
flex: '1 1 auto',
[`${componentCls}-selection-wrap:after`]: {
lineHeight: (0, _cssinjs.unit)(selectHeightWithoutBorder)
},
[`${componentCls}-selection-search`]: {
position: 'absolute',
inset: 0,
width: '100%',
'&-input': {
width: '100%',
WebkitAppearance: 'textfield'
}
},
[`
${componentCls}-selection-item,
${componentCls}-selection-placeholder
`]: {
display: 'block',
padding: 0,
lineHeight: (0, _cssinjs.unit)(selectHeightWithoutBorder),
transition: `all ${token.motionDurationSlow}, visibility 0s`,
alignSelf: 'center'
},
[`${componentCls}-selection-placeholder`]: {
transition: 'none',
pointerEvents: 'none'
},
// For common baseline align
[['&:after', /* For '' value baseline align */
`${componentCls}-selection-item:empty:after`, /* For undefined value baseline align */
`${componentCls}-selection-placeholder:empty:after`].join(',')]: {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
}
}),
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-search,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: token.showArrowPaddingInlineEnd
},
// Opacity selection if open
[`&${componentCls}-open ${componentCls}-selection-item`]: {
color: token.colorTextPlaceholder
},
// ========================== Input ==========================
// We only change the style of non-customize input which is only support by `combobox` mode.
// Not customize
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selector`]: {
width: '100%',
height: '100%',
alignItems: 'center',
padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalBase)}`,
[`${componentCls}-selection-search-input`]: {
height: selectHeightWithoutBorder,
fontSize: token.fontSize
},
'&:after': {
lineHeight: (0, _cssinjs.unit)(selectHeightWithoutBorder)
}
}
},
[`&${componentCls}-customize-input`]: {
[`${componentCls}-selector`]: {
'&:after': {
display: 'none'
},
[`${componentCls}-selection-search`]: {
position: 'static',
width: '100%'
},
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
insetInlineStart: 0,
insetInlineEnd: 0,
padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalBase)}`,
'&:after': {
display: 'none'
}
}
}
}
}
};
}
function genSingleStyle(token) {
const {
componentCls
} = token;
const inputPaddingHorizontalSM = token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal();
return [genSizeStyle(token),
// ======================== Small ========================
// Shared
genSizeStyle((0, _internal.mergeToken)(token, {
controlHeight: token.controlHeightSM,
borderRadius: token.borderRadiusSM
}), 'sm'),
// padding
{
[`${componentCls}-single${componentCls}-sm`]: {
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selector`]: {
padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalSM)}`
},
// With arrow should provides `padding-right` to show the arrow
[`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {
insetInlineEnd: token.calc(inputPaddingHorizontalSM).add(token.calc(token.fontSize).mul(1.5)).equal()
},
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: token.calc(token.fontSize).mul(1.5).equal()
}
}
}
},
// ======================== Large ========================
// Shared
genSizeStyle((0, _internal.mergeToken)(token, {
controlHeight: token.singleItemHeightLG,
fontSize: token.fontSizeLG,
borderRadius: token.borderRadiusLG
}), 'lg')];
}

138
node_modules/antd/lib/select/style/token.d.ts generated vendored Normal file
View File

@@ -0,0 +1,138 @@
import type { CSSProperties } from 'react';
import type { FullToken, GetDefaultToken } from 'antd/es/theme/internal';
export interface MultipleSelectorToken {
/**
* @desc 多选标签背景色
* @descEN Background color of multiple tag
*/
multipleItemBg: string;
/**
* @desc 多选标签边框色
* @descEN Border color of multiple tag
*/
multipleItemBorderColor: string;
/**
* @desc 多选标签高度
* @descEN Height of multiple tag
*/
multipleItemHeight: number;
/**
* @desc 小号多选标签高度
* @descEN Height of multiple tag with small size
*/
multipleItemHeightSM: number;
/**
* @desc 大号多选标签高度
* @descEN Height of multiple tag with large size
*/
multipleItemHeightLG: number;
/**
* @desc 多选框禁用背景
* @descEN Background color of multiple selector when disabled
*/
multipleSelectorBgDisabled: string;
/**
* @desc 多选标签禁用文本颜色
* @descEN Text color of multiple tag when disabled
*/
multipleItemColorDisabled: string;
/**
* @desc 多选标签禁用边框色
* @descEN Border color of multiple tag when disabled
*/
multipleItemBorderColorDisabled: string;
}
export interface ComponentToken extends MultipleSelectorToken {
/**
* @desc 下拉菜单 z-index
* @descEN z-index of dropdown
*/
zIndexPopup: number;
/**
* @desc 选项选中时文本颜色
* @descEN Text color when option is selected
*/
optionSelectedColor: string;
/**
* @desc 选项选中时文本字重
* @descEN Font weight when option is selected
*/
optionSelectedFontWeight: CSSProperties['fontWeight'];
/**
* @desc 选项选中时背景色
* @descEN Background color when option is selected
*/
optionSelectedBg: string;
/**
* @desc 选项激活态时背景色
* @descEN Background color when option is active
*/
optionActiveBg: string;
/**
* @desc 选项内间距
* @descEN Padding of option
*/
optionPadding: CSSProperties['padding'];
/**
* @desc 选项字体大小
* @descEN Font size of option
*/
optionFontSize: number;
/**
* @desc 选项行高
* @descEN Line height of option
*/
optionLineHeight: CSSProperties['lineHeight'];
/**
* @desc 选项高度
* @descEN Height of option
*/
optionHeight: number;
/**
* @desc 选框背景色
* @descEN Background color of selector
*/
selectorBg: string;
/**
* @desc 清空按钮背景色
* @descEN Background color of clear button
*/
clearBg: string;
/**
* @desc 单选大号回填项高度
* @descEN Height of single selected item with large size
*/
singleItemHeightLG: number;
/**
* @desc 箭头的行末内边距
* @descEN Inline end padding of arrow
*/
showArrowPaddingInlineEnd: number;
/**
* @desc 悬浮态边框色
* @descEN Hover border color
*/
hoverBorderColor: string;
/**
* @desc 激活态边框色
* @descEN Active border color
*/
activeBorderColor: string;
/**
* @desc 激活态 outline 颜色
* @descEN Active outline color
*/
activeOutlineColor: string;
}
export interface SelectorToken {
selectAffixPadding: number | string;
inputPaddingHorizontalBase: number | string;
multipleSelectItemHeight: number;
selectHeight: number;
}
export interface SelectToken extends FullToken<'Select'>, SelectorToken {
rootPrefixCls: string;
/** @private Used for internal calculation */
INTERNAL_FIXED_ITEM_MARGIN: number;
}
export declare const prepareComponentToken: GetDefaultToken<'Select'>;

69
node_modules/antd/lib/select/style/token.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.prepareComponentToken = void 0;
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
lineWidth,
controlHeight,
controlHeightSM,
controlHeightLG,
paddingXXS,
controlPaddingHorizontal,
zIndexPopupBase,
colorText,
fontWeightStrong,
controlItemBgActive,
controlItemBgHover,
colorBgContainer,
colorFillSecondary,
colorBgContainerDisabled,
colorTextDisabled,
colorPrimaryHover,
colorPrimary,
controlOutline
} = token;
// Item height default use `controlHeight - 2 * paddingXXS`,
// but some case `paddingXXS=0`.
// Let's fallback it.
const dblPaddingXXS = paddingXXS * 2;
const dblLineWidth = lineWidth * 2;
const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
// FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding
const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
return {
INTERNAL_FIXED_ITEM_MARGIN,
zIndexPopup: zIndexPopupBase + 50,
optionSelectedColor: colorText,
optionSelectedFontWeight: fontWeightStrong,
optionSelectedBg: controlItemBgActive,
optionActiveBg: controlItemBgHover,
optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,
optionFontSize: fontSize,
optionLineHeight: lineHeight,
optionHeight: controlHeight,
selectorBg: colorBgContainer,
clearBg: colorBgContainer,
singleItemHeightLG: controlHeightLG,
multipleItemBg: colorFillSecondary,
multipleItemBorderColor: 'transparent',
multipleItemHeight,
multipleItemHeightSM,
multipleItemHeightLG,
multipleSelectorBgDisabled: colorBgContainerDisabled,
multipleItemColorDisabled: colorTextDisabled,
multipleItemBorderColorDisabled: 'transparent',
showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25),
hoverBorderColor: colorPrimaryHover,
activeBorderColor: colorPrimary,
activeOutlineColor: controlOutline,
selectAffixPadding: paddingXXS
};
};
exports.prepareComponentToken = prepareComponentToken;

4
node_modules/antd/lib/select/style/variants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import type { CSSObject } from '@ant-design/cssinjs';
import type { SelectToken } from './token';
declare const genVariantsStyle: (token: SelectToken) => CSSObject;
export default genVariantsStyle;

235
node_modules/antd/lib/select/style/variants.js generated vendored Normal file
View File

@@ -0,0 +1,235 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _cssinjs = require("@ant-design/cssinjs");
// =====================================================
// == Outlined ==
// =====================================================
const genBaseOutlinedStyle = (token, options) => {
const {
componentCls,
antCls,
controlOutlineWidth
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${options.borderColor}`,
background: token.selectorBg
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
borderColor: options.hoverBorderHover
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
borderColor: options.activeBorderColor,
boxShadow: `0 0 0 ${(0, _cssinjs.unit)(controlOutlineWidth)} ${options.activeOutlineColor}`,
outline: 0
},
[`${componentCls}-prefix`]: {
color: options.color
}
}
};
};
const genOutlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseOutlinedStyle(token, options))
});
const genOutlinedStyle = token => ({
'&-outlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderHover: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeOutlineColor: token.activeOutlineColor,
color: token.colorText
})), genOutlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderHover: token.colorErrorHover,
activeBorderColor: token.colorError,
activeOutlineColor: token.colorErrorOutline,
color: token.colorError
})), genOutlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderHover: token.colorWarningHover,
activeBorderColor: token.colorWarning,
activeOutlineColor: token.colorWarningOutline,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
background: token.colorBgContainerDisabled,
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
})
});
// =====================================================
// == Filled ==
// =====================================================
const genBaseFilledStyle = (token, options) => {
const {
componentCls,
antCls
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
background: options.bg,
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
color: options.color
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
background: options.hoverBg
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
background: token.selectorBg,
borderColor: options.activeBorderColor,
outline: 0
}
}
};
};
const genFilledStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseFilledStyle(token, options))
});
const genFilledStyle = token => ({
'&-filled': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {
bg: token.colorFillTertiary,
hoverBg: token.colorFillSecondary,
activeBorderColor: token.activeBorderColor,
color: token.colorText
})), genFilledStatusStyle(token, {
status: 'error',
bg: token.colorErrorBg,
hoverBg: token.colorErrorBgHover,
activeBorderColor: token.colorError,
color: token.colorError
})), genFilledStatusStyle(token, {
status: 'warning',
bg: token.colorWarningBg,
hoverBg: token.colorWarningBgHover,
activeBorderColor: token.colorWarning,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
borderColor: token.colorBorder,
background: token.colorBgContainerDisabled,
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.colorBgContainer,
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
})
});
// =====================================================
// == Borderless ==
// =====================================================
const genBorderlessStyle = token => ({
'&-borderless': {
[`${token.componentCls}-selector`]: {
background: 'transparent',
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`
},
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
},
// Status
[`&${token.componentCls}-status-error`]: {
[`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
color: token.colorError
}
},
[`&${token.componentCls}-status-warning`]: {
[`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
color: token.colorWarning
}
}
}
});
// =====================================================
// == Underlined ==
// =====================================================
const genBaseUnderlinedStyle = (token, options) => {
const {
componentCls,
antCls
} = token;
return {
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
borderWidth: `${(0, _cssinjs.unit)(token.lineWidth)} 0`,
borderStyle: `${token.lineType} none`,
borderColor: `transparent transparent ${options.borderColor} transparent`,
background: token.selectorBg,
borderRadius: 0
},
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
[`&:hover ${componentCls}-selector`]: {
borderColor: `transparent transparent ${options.hoverBorderHover} transparent`
},
[`${componentCls}-focused& ${componentCls}-selector`]: {
borderColor: `transparent transparent ${options.activeBorderColor} transparent`,
outline: 0
},
[`${componentCls}-prefix`]: {
color: options.color
}
}
};
};
const genUnderlinedStatusStyle = (token, options) => ({
[`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseUnderlinedStyle(token, options))
});
const genUnderlinedStyle = token => ({
'&-underlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, {
borderColor: token.colorBorder,
hoverBorderHover: token.hoverBorderColor,
activeBorderColor: token.activeBorderColor,
activeOutlineColor: token.activeOutlineColor,
color: token.colorText
})), genUnderlinedStatusStyle(token, {
status: 'error',
borderColor: token.colorError,
hoverBorderHover: token.colorErrorHover,
activeBorderColor: token.colorError,
activeOutlineColor: token.colorErrorOutline,
color: token.colorError
})), genUnderlinedStatusStyle(token, {
status: 'warning',
borderColor: token.colorWarning,
hoverBorderHover: token.colorWarningHover,
activeBorderColor: token.colorWarning,
activeOutlineColor: token.colorWarningOutline,
color: token.colorWarning
})), {
[`&${token.componentCls}-disabled`]: {
[`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
color: token.colorTextDisabled
}
},
[`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
})
});
const genVariantsStyle = token => ({
[token.componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token)), genUnderlinedStyle(token))
});
var _default = exports.default = genVariantsStyle;